diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 35734e64c1c..9c4cea72f1e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,10 +9,13 @@ v33.0.0 (next next, roadmap) - OpenWRT packages. - Yocto/BitBake .bb recipes. + - Fallback packages for non-native dependencies of SCTK. - Dependencies for - Support for copyright detection objects. +- We can now collect packages from a Go binary using go-inspector (Linux-only) + - A new field in packages with the license category for the detected license expression and also an API function to compute license categories from license expressions. @@ -34,6 +37,22 @@ v33.0.0 (next next, roadmap) of these in other summary plugins. See https://github.com/nexB/scancode-toolkit/issues/1745 +- Update link references of ownership from nexB to aboutcode-org + See https://github.com/aboutcode-org/scancode-toolkit/issues/3885 + +- New and updated licenses, including support for newly released + SPDX license list versions: + - SPDX License List 3.25.0: + This release of the SPDX license list had 9 new licenses + and exceptions, and out of them 5 were present as licenses + and 2 were present as rules already. There were 2 new + license/exception texts added, and also 1 license was deprecated. + For more details see https://github.com/aboutcode-org/scancode-toolkit/pull/3897 + +- New and improved copyright detection with many false positive removed + and refined detection added. + +- Fix Python ``SyntaxWarning`` in textcode module. v32.2.1 - 2024-07-02 --------------------- @@ -155,7 +174,7 @@ Changes in Output Data Structure: file-level ``package_data`` * ``license_detections`` and ``other_license_detections`` in codebase level ``packages`` - + - On using the CLI option ``--license-text-diagnostics`` there is now a new license match attribute ``matched_text_diagnostics`` with the matched text and highlighted diagnostics, instead of @@ -164,7 +183,7 @@ Changes in Output Data Structure: - A new ``reference_matches`` attribute is added to codebase-level ``license_detections`` which is same as the ``matches`` attribute in other license detections. - + - We now have SPDX license expressions everywhere we have ScanCode license expressions for ease of use and adopting SPDX everywhere. A new attribute ``license_expression_spdx`` @@ -212,7 +231,7 @@ Changes in Output Data Structure: and https://github.com/nexB/scancode-toolkit/issues/3443 Also improve debian manifests parsing and purl parsing from filenames. Support for https://github.com/nexB/purldb/issues/245 - Bumps debian-inspector to v31.1.0 + Bumps debian-inspector to v31.1.0 - Bump commoncode to v31.0.3 @@ -870,6 +889,8 @@ Package detection: - For Pypi packages, python_requires is treated as a package dependency. +- Update JavaScript package handlers to handle aliases in npm and yarn manifests. + License Clarity Scoring Update: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/README.rst b/README.rst index 71e3ce6ba48..1860d46b490 100644 --- a/README.rst +++ b/README.rst @@ -89,7 +89,7 @@ Why use ScanCode? InstallShield installers, iOS apps, ISO images, Apache IVY, JBoss Sar, R CRAN, Apache Maven, Meteor, Mozilla extensions, MSI installers, JavaScript npm packages, package-lock.json, yarn.lock, NSIS Installers, - NugGet, OPam, Cocoapods, Python PyPI setup.py, setup.cfg, and + NuGet, OPam, Cocoapods, Python PyPI setup.py, setup.cfg, and several related lockfile formats, semi structured README files such as README.android, README.chromium, README.facebook, README.google, README.thirdparty, RPMs, Shell Archives, Squashfs images, Java WAR, Windows @@ -246,6 +246,7 @@ See the NOTICE file and the .ABOUT files that document the origin and license of the third-party code used in ScanCode for more details. + .. |azure| image:: https://dev.azure.com/nexB/scancode-toolkit/_apis/build/status/nexB.scancode-toolkit?branchName=develop :target: https://dev.azure.com/nexB/scancode-toolkit/_build/latest?definitionId=1&branchName=develop :alt: Azure tests status (Linux, macOS, Windows) @@ -261,3 +262,142 @@ the third-party code used in ScanCode for more details. .. |release-github-actions| image:: https://github.com/nexB/scancode-toolkit/actions/workflows/scancode-release.yml/badge.svg?event=push :target: https://github.com/nexB/scancode-toolkit/actions/workflows/scancode-release.yml :alt: Release tests + + +Acknowledgements, Funding, Support and Sponsoring +-------------------------------------------------------- + +This project is funded, supported and sponsored by: + +- Generous support and contributions from users like you! +- the European Commission NGI programme +- the NLnet Foundation +- the Swiss State Secretariat for Education, Research and Innovation (SERI) +- Google, including the Google Summer of Code and the Google Seasons of Doc programmes +- Mercedes-Benz Group +- Microsoft and Microsoft Azure +- AboutCode ASBL +- nexB Inc. + + + +|europa| |dgconnect| + +|ngi| |nlnet| + +|aboutcode| |nexb| + + +This project was funded through the NGI0 Discovery Fund, a fund established by NLnet with financial +support from the European Commission's Next Generation Internet programme, under the aegis of DG +Communications Networks, Content and Technology under grant agreement No 825322. + +|ngidiscovery| https://nlnet.nl/project/vulnerabilitydatabase/ + + +This project was funded through the NGI0 Entrust Fund, a fund established by NLnet with financial +support from the European Commission's Next Generation Internet programme, under the aegis of DG +Communications Networks, Content and Technology under grant agreement No 101069594. + +|ngizeroentrust| https://nlnet.nl/project/Back2source/ + + +This project was funded through the NGI0 Core Fund, a fund established by NLnet with financial +support from the European Commission's Next Generation Internet programme, under the aegis of DG +Communications Networks, Content and Technology under grant agreement No 101092990. + +|ngizerocore| https://nlnet.nl/project/Back2source-next/ + + +This project was funded through the NGI0 Core Fund, a fund established by NLnet with financial +support from the European Commission's Next Generation Internet programme, under the aegis of DG +Communications Networks, Content and Technology under grant agreement No 101092990. + +|ngizerocore| https://nlnet.nl/project/FastScan/ + + +This project was funded through the NGI0 Commons Fund, a fund established by NLnet with financial +support from the European Commission's Next Generation Internet programme, under the aegis of DG +Communications Networks, Content and Technology under grant agreement No 101135429. Additional +funding is made available by the Swiss State Secretariat for Education, Research and Innovation +(SERI). + +|ngizerocommons| |swiss| https://nlnet.nl/project/MassiveFOSSscan/ + +This project was funded through the NGI0 Entrust Fund, a fund established by NLnet with financial +support from the European Commission's Next Generation Internet programme, under the aegis of DG +Communications Networks, Content and Technology under grant agreement No 101069594. + +|ngizeroentrust| https://nlnet.nl/project/purl2sym/ + + +.. |nlnet| image:: https://nlnet.nl/logo/banner.png + :target: https://nlnet.nl + :height: 50 + :alt: NLnet foundation logo + +.. |ngi| image:: https://ngi.eu/wp-content/uploads/thegem-logos/logo_8269bc6efcf731d34b6385775d76511d_1x.png + :target: https://ngi.eu35 + :height: 50 + :alt: NGI logo + +.. |nexb| image:: https://nexb.com/wp-content/uploads/2022/04/nexB.svg + :target: https://nexb.com + :height: 30 + :alt: nexB logo + +.. |europa| image:: https://ngi.eu/wp-content/uploads/sites/77/2017/10/bandiera_stelle.png + :target: http://ec.europa.eu/index_en.htm + :height: 40 + :alt: Europa logo + +.. |aboutcode| image:: https://aboutcode.org/wp-content/uploads/2023/10/AboutCode.svg + :target: https://aboutcode.org/ + :height: 30 + :alt: AboutCode logo + +.. |swiss| image:: https://www.sbfi.admin.ch/sbfi/en/_jcr_content/logo/image.imagespooler.png/1493119032540/logo.png + :target: https://www.sbfi.admin.ch/sbfi/en/home/seri/seri.html + :height: 40 + :alt: Swiss logo + +.. |dgconnect| image:: https://commission.europa.eu/themes/contrib/oe_theme/dist/ec/images/logo/positive/logo-ec--en.svg + :target: https://commission.europa.eu/about-european-commission/departments-and-executive-agencies/communications-networks-content-and-technology_en + :height: 40 + :alt: EC DG Connect logo + +.. |ngizerocore| image:: https://nlnet.nl/image/logos/NGI0_tag.svg + :target: https://nlnet.nl/core + :height: 40 + :alt: NGI Zero Core Logo + +.. |ngizerocommons| image:: https://nlnet.nl/image/logos/NGI0_tag.svg + :target: https://nlnet.nl/commonsfund/ + :height: 40 + :alt: NGI Zero Commons Logo + +.. |ngizeropet| image:: https://nlnet.nl/image/logos/NGI0PET_tag.svg + :target: https://nlnet.nl/PET + :height: 40 + :alt: NGI Zero PET logo + +.. |ngizeroentrust| image:: https://nlnet.nl/image/logos/NGI0Entrust_tag.svg + :target: https://nlnet.nl/entrust + :height: 38 + :alt: NGI Zero Entrust logo + +.. |ngiassure| image:: https://nlnet.nl/image/logos/NGIAssure_tag.svg + :target: https://nlnet.nl/image/logos/NGIAssure_tag.svg + :height: 32 + :alt: NGI Assure logo + +.. |ngidiscovery| image:: https://nlnet.nl/image/logos/NGI0Discovery_tag.svg + :target: https://nlnet.nl/discovery/ + :height: 40 + :alt: NGI Discovery logo + + + + + + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 304cdc79925..65bf09d0411 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -75,6 +75,33 @@ jobs: tests/licensedcode/test_detection_validate.py \ -k TestValidateLicenseExtended5 + + license_validate_ignorables_1: | + venv/bin/pytest -n 3 -vvs --test-suite=validate \ + tests/licensedcode/test_detection_validate.py \ + -k TestValidateLicenseIgnorableClues1 + + license_validate_ignorables_2: | + venv/bin/pytest -n 3 -vvs --test-suite=validate \ + tests/licensedcode/test_detection_validate.py \ + -k TestValidateLicenseIgnorableClues2 + + license_validate_ignorables_3: | + venv/bin/pytest -n 3 -vvs --test-suite=validate \ + tests/licensedcode/test_detection_validate.py \ + -k TestValidateLicenseIgnorableClues3 + + license_validate_ignorables_4: | + venv/bin/pytest -n 3 -vvs --test-suite=validate \ + tests/licensedcode/test_detection_validate.py \ + -k TestValidateLicenseIgnorableClues4 + + license_validate_ignorables_5: | + venv/bin/pytest -n 3 -vvs --test-suite=validate \ + tests/licensedcode/test_detection_validate.py \ + -k TestValidateLicenseIgnorableClues5 + + license_cache: | venv/bin/pytest -n 3 -vvs --test-suite=all \ tests/licensedcode/test_zzzz_cache.py --reruns 2 diff --git a/docs/source/cli-reference/basic-options.rst b/docs/source/cli-reference/basic-options.rst index 19240944b75..92ac1fa04d7 100644 --- a/docs/source/cli-reference/basic-options.rst +++ b/docs/source/cli-reference/basic-options.rst @@ -108,7 +108,7 @@ "license_expression": "apache-2.0", "rule_identifier": "apache-2.0_65.RULE", "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", "matched_text": "License: Apache-2.0" } ], @@ -587,7 +587,7 @@ A scan example using the ``--license-url-template TEXT`` option :: - scancode -clpieu --json-pp output.json samples --license-url-template https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/{}.LICENSE + scancode -clpieu --json-pp output.json samples --license-url-template https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/{}.LICENSE In a normal scan, reference url for "ZLIB License" is as follows:: @@ -595,11 +595,11 @@ After using the option in the following manner:: - ``--license-url-template https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/{}.LICENSE`` + ``--license-url-template https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/{}.LICENSE`` - the reference URL changes to this `zlib.LICENSE file `_:: + the reference URL changes to this `zlib.LICENSE file `_:: - "reference_url": "https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/zlib.LICENSE", + "reference_url": "https://github.com/aboutcode-org/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/zlib.LICENSE", The reference URL changes for all detected licenses in the scan, across the scan result file. @@ -691,7 +691,7 @@ "license_expression": "unknown-license-reference", "rule_identifier": "lead-in_unknown_30.RULE", "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lead-in_unknown_30.RULE", + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lead-in_unknown_30.RULE", "matched_text": "dual-licensed under [` }, { @@ -704,7 +704,7 @@ "license_expression": "wtfpl-2.0", "rule_identifier": "spdx_license_id_wtfpl_for_wtfpl-2.0.RULE", "rule_relevance": 50, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_wtfpl_for_wtfpl-2.0.RULE", + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_wtfpl_for_wtfpl-2.0.RULE", "matched_text": "WTFPL" }, { @@ -717,7 +717,7 @@ "license_expression": "wtfpl-2.0", "rule_identifier": "wtfpl-2.0_27.RULE", "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/wtfpl-2.0_27.RULE", + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/wtfpl-2.0_27.RULE", "matched_text": "www.wtfpl.net/" }, { @@ -730,7 +730,7 @@ "license_expression": "mit", "rule_identifier": "mit_64.RULE", "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_64.RULE", + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_64.RULE", "matched_text": "MIT`](https://opensource.org/licenses/MIT)." } ], diff --git a/docs/source/cli-reference/help-text-options.rst b/docs/source/cli-reference/help-text-options.rst index 58a4d6d8711..5e7a7694601 100644 --- a/docs/source/cli-reference/help-text-options.rst +++ b/docs/source/cli-reference/help-text-options.rst @@ -79,7 +79,7 @@ The Following Help Text is displayed, i.e. This is the help text for Scancode Ve --csv FILE [DEPRECATED] Write scan output as CSV to FILE. The --csv option is deprecated and will be replaced by new CSV and tabular output formats in the next ScanCode - release. Visit https://github.com/nexB/scancode- + release. Visit https://github.com/aboutcode-org/scancode- toolkit/issues/3043 to provide inputs and feedback. --html FILE Write scan output as HTML to FILE. --custom-output FILE Write scan output to FILE formatted with the custom @@ -321,7 +321,7 @@ The Following Text is displayed, i.e. This is the available plugins for Scancode required_plugins: options: help_group: output formats, name: csv: --csv - help: [DEPRECATED] Write scan output as CSV to FILE. The --csv option is deprecated and will be replaced by new CSV and tabular output formats in the next ScanCode release. Visit https://github.com/nexB/scancode-toolkit/issues/3043 to provide inputs and feedback. + help: [DEPRECATED] Write scan output as CSV to FILE. The --csv option is deprecated and will be replaced by new CSV and tabular output formats in the next ScanCode release. Visit https://github.com/aboutcode-org/scancode-toolkit/issues/3043 to provide inputs and feedback. doc: None -------------------------------------------- diff --git a/docs/source/cli-reference/output-format.rst b/docs/source/cli-reference/output-format.rst index 4e4c67aff9c..ebc20396f92 100644 --- a/docs/source/cli-reference/output-format.rst +++ b/docs/source/cli-reference/output-format.rst @@ -58,7 +58,7 @@ following options. "--package": true, "--url": true }, - "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.", + "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/aboutcode-org/scancode-toolkit/ for support and download.", "start_timestamp": "2019-10-19T191117.292858", "end_timestamp": "2019-10-19T191219.743133", "message": null, @@ -221,7 +221,7 @@ following options. The whole Output file looks like:: - {"headers":[{"tool_name":"scancode-toolkit","tool_version":"3.1.1","options":{"input":["samples/"],"--copyright":true,"--email":true,"--info":true,"--json-lines":"output.json","--license":true,"--package":true,"--url":true},"notice":"Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.","start_timestamp":"2019-10-19T210920.143831","end_timestamp":"2019-10-19T211052.048182","message":null,"errors":[],"extra_data":{"files_count":36}}]} + {"headers":[{"tool_name":"scancode-toolkit","tool_version":"3.1.1","options":{"input":["samples/"],"--copyright":true,"--email":true,"--info":true,"--json-lines":"output.json","--license":true,"--package":true,"--url":true},"notice":"Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/aboutcode-org/scancode-toolkit/ for support and download.","start_timestamp":"2019-10-19T210920.143831","end_timestamp":"2019-10-19T211052.048182","message":null,"errors":[],"extra_data":{"files_count":36}}]} {"files":[{"path":"samples" ... "scan_errors":[]}]} {"files":[{"path":"samples/README", ... "scan_errors":[]}]} {"files":[{"path":"samples/screenshot.png", ... "scan_errors":[]}]} @@ -340,7 +340,7 @@ Comparing Different ``json`` Output Formats ScanCode should be considered or used as legal advice. Consult an Attorney for any legal advice. ScanCode is a free software code scanning tool from nexB Inc. and others. - Visit https://github.com/nexB/scancode-toolkit/ for support and download. + Visit https://github.com/aboutcode-org/scancode-toolkit/ for support and download. # Creation Info @@ -459,7 +459,7 @@ Comparing Different ``json`` Output Formats This option is deprecated and will be replaced by new CSV and tabular output formats in the next ScanCode release. Visit - https://github.com/nexB/scancode-toolkit/issues/3043 + https://github.com/aboutcode-org/scancode-toolkit/issues/3043 for details and to provide inputs and feedback. The following code performs a scan on the samples directory, and publishes the results in diff --git a/docs/source/cli-reference/scan-options-post.rst b/docs/source/cli-reference/scan-options-post.rst index ccd21dd0644..01d305433af 100644 --- a/docs/source/cli-reference/scan-options-post.rst +++ b/docs/source/cli-reference/scan-options-post.rst @@ -409,7 +409,7 @@ To see all plugins available via command line help, use ``--plugins``. "ignorable_urls": [], "ignorable_emails": [], "text": "Permission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", + "scancode_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE", "licensedb_url": "https://scancode-licensedb.aboutcode.org/mit", "spdx_url": "https://spdx.org/licenses/MIT" } @@ -419,7 +419,7 @@ To see all plugins available via command line help, use ``--plugins``. "license_expression": "mit", "identifier": "mit_30.RULE", "language": "en", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", "is_license_text": false, "is_license_notice": false, "is_license_reference": false, @@ -462,7 +462,7 @@ To see all plugins available via command line help, use ``--plugins``. "license_expression": "mit", "rule_identifier": "mit_30.RULE", "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE", "matched_text": "License: mit" } ], diff --git a/docs/source/cli-reference/synopsis.rst b/docs/source/cli-reference/synopsis.rst index 16226d8e419..0e322bf0f1a 100644 --- a/docs/source/cli-reference/synopsis.rst +++ b/docs/source/cli-reference/synopsis.rst @@ -127,7 +127,7 @@ A sample JSON output file structure will look like:: "--package": true, "--url": true }, - "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.", + "notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/aboutcode-org/scancode-toolkit/ for support and download.", "start_timestamp": "2019-10-19T191117.292858", "end_timestamp": "2019-10-19T191219.743133", "message": null, diff --git a/docs/source/contribute/contrib_dev.rst b/docs/source/contribute/contrib_dev.rst index 9a6c5ef49e9..af9b010e5dd 100644 --- a/docs/source/contribute/contrib_dev.rst +++ b/docs/source/contribute/contrib_dev.rst @@ -12,7 +12,7 @@ TL;DR: - We use DCO signoff in commit messages, like Linux does. - Porting ScanCode to other OS (FreeBSD is supported, etc.) is possible. Enter an issue for help. -See `CONTRIBUTING.rst `_ +See `CONTRIBUTING.rst `_ for details. @@ -82,7 +82,7 @@ If you have a multiprocessor machine you might want to run the tests in parallel typically run the tests in verbose mode with ``pytest -vvs -n4``. You can also run a subset of the test suite as shown in the CI configs -https://github.com/nexB/scancode-toolkit/blob/develop/azure-pipelines.yml e,g, +https://github.com/aboutcode-org/scancode-toolkit/blob/develop/azure-pipelines.yml e,g, ``pytest -n 2 -vvs tests/scancode`` runs only the test scripts present in the ``tests/scancode`` directory. (You can give the path to a specific test script file there too). @@ -166,7 +166,7 @@ needing a compiler and toolchain to be installed. The corresponding source code and build scripts for all for the pre-built binaries are stored in a separate repository at -https://github.com/nexB/scancode-plugins +https://github.com/aboutcode-org/scancode-plugins ScanCode app archives should not require network access for installation or configuration of its third-party libraries and dependencies. To enable this, diff --git a/docs/source/contribute/contrib_doc.rst b/docs/source/contribute/contrib_doc.rst index 530f159b9f4..085c0d3c25e 100644 --- a/docs/source/contribute/contrib_doc.rst +++ b/docs/source/contribute/contrib_doc.rst @@ -12,7 +12,7 @@ To get started, create or identify a working directory on your local machine. Open that directory and execute the following command in a terminal session:: - git clone https://github.com/nexB/scancode-toolkit.git + git clone https://github.com/aboutcode-org/scancode-toolkit.git That will create an ``/scancode-toolkit`` directory in your working directory. Now you can install the dependencies in a virtualenv:: @@ -324,9 +324,9 @@ Automatic Docs Generation It's possible to generate docs automatically from data by using a combination of: -- `shell scripts: example `_ -- `python scripts: example `_ -- `jinja templates: example `_ +- `shell scripts: example `_ +- `python scripts: example `_ +- `jinja templates: example `_ And we do this currently to keep a documentation page for all the supported package formats. See :ref:`supported_packages` for details. diff --git a/docs/source/contribute/cut_new_release.rst b/docs/source/contribute/cut_new_release.rst index 2b47450983a..77b57f95a74 100644 --- a/docs/source/contribute/cut_new_release.rst +++ b/docs/source/contribute/cut_new_release.rst @@ -41,7 +41,7 @@ Tag and publish Automated Release Process ------------------------- -- We have an `automated release script `_ +- We have an `automated release script `_ triggered by a pushed tag, where jobs run to: - Build pypi wheels and sdist archives diff --git a/docs/source/contribute/gsoc17_final_report.rst b/docs/source/contribute/gsoc17_final_report.rst index 8dec03b8bd0..15c368153ba 100644 --- a/docs/source/contribute/gsoc17_final_report.rst +++ b/docs/source/contribute/gsoc17_final_report.rst @@ -9,11 +9,11 @@ Yash D. Saraf `yashdsaraf@gmail.com `_ ---- This project’s purpose was to create a decoupled plugin architecture for -`ScanCode `_ such that it can handle plugins at different +`ScanCode `_ such that it can handle plugins at different stages of a scan and can be coupled at runtime. These stages were, -1. `Format `_ : ---------------------------------------------------------------------- +1. `Format `_ : +----------------------------------------------------------------------------- In this stage, the plugins are supposed to run **after** the scanning is done and ``post-scan`` plugins are called. These plugins could be used for: @@ -35,8 +35,8 @@ format : ``' = :'``. The ```` name will be automatically added to the ``--format`` command line option and (if called) the scanned data will be passed to the plugin. -2. `Post-scan `_ : ------------------------------------------------------------------------- +2. `Post-scan `_ : +-------------------------------------------------------------------------------- In this stage, the plugins are supposed to run **after** the scanning is done. Some uses for these plugins were: @@ -67,8 +67,8 @@ format ``' = :'`` The command line option for this plugin will be automatically created using the ```` 's doctring as its help text and (if called) the scanned files will be passed to the plugin. -3. `Pre-scan `_ : ------------------------------------------------------------------------ +3. `Pre-scan `_ : +------------------------------------------------------------------------------- In this stage, the plugins are supposed to run **before** the scan starts. So the potential uses for these types of plugins were to: @@ -110,14 +110,14 @@ No development has been done for this stage, but it will be quite similar to ``p 5. Other work: -------------- -`Group cli options in cli help `_ +`Group cli options in cli help `_ Here, the goal was to add command line options to pre-defined groups such that they are displayed in their respective groups when ``scancode -h`` or ``scancode --help`` is called. This helped to better visually represent the command line options and determine more easily what context they belong to. -`Add a Resource class to hold all scanned info `_ +`Add a Resource class to hold all scanned info `_ * ``Ongoing`` * Here, the goal was to create a ``Resource`` class, such that it holds all the scanned data for a @@ -132,4 +132,4 @@ logic entirely. For now, it just holds the ``info`` and ``path`` of a resource. - More complex post-scan plugins - Support plugins written in languages other than python -**Additionally, all my commits can be found** `here `_. +**Additionally, all my commits can be found** `here `_. diff --git a/docs/source/contribute/gsoc19_final_report.rst b/docs/source/contribute/gsoc19_final_report.rst index c51473583e7..5468258454f 100644 --- a/docs/source/contribute/gsoc19_final_report.rst +++ b/docs/source/contribute/gsoc19_final_report.rst @@ -13,7 +13,7 @@ Overview **Problem:** Since Python 2.7 will retire in few months and will not be maintained any longer. -**Solution:** `Scancode `__ needs to be ported to +**Solution:** `Scancode `__ needs to be ported to python 3 and all test suites must pass on both version of Python. The main difference that makes Python 3 better than Python 2.x is that the support for unicode is greatly improved in Python 3. This will also be useful for scancode as scancode has users in more than 100 languages @@ -77,7 +77,7 @@ We came with various Solution: We choose the third solution because it is most fundamental and simple and easy to use. -Project was tracked in this ticket `nexB/scancode-toolkit#295 `__ +Project was tracked in this ticket `nexB/scancode-toolkit#295 `__ **Project link :** `Port Scancode to Python 3 `__ @@ -85,9 +85,9 @@ Project was tracked in this ticket `nexB/scancode-toolkit#295 `__ +**My contribution :** `List of Commits `__ -**Note :** Please give your feedback `here `_ +**Note :** Please give your feedback `here `_ Outcome ------- diff --git a/docs/source/contribute/gsoc21_final_report.rst b/docs/source/contribute/gsoc21_final_report.rst index 2d4da89dd64..c3836b27e5d 100644 --- a/docs/source/contribute/gsoc21_final_report.rst +++ b/docs/source/contribute/gsoc21_final_report.rst @@ -13,7 +13,7 @@ Akanksha Garg Project: Detect Unknown Licenses and Indirect License References in Scancode ----------------------------------------------------------------------------- -`ScanCode-toolkit `_ +`ScanCode-toolkit `_ `Project Link `_ @@ -37,7 +37,7 @@ to identify them beyond just the naming convention of having "unknown" as part o Rules that match at least one unknown license have a flag **"has_unknown"** set in the returned match results. -`nexB/scancode-toolkit#2548 `_ +`nexB/scancode-toolkit#2548 `_ **Reporting known and Unknown licenses separately** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -46,7 +46,7 @@ We considered having a separate section for of scan results to report 'unknown l separately and not mixed with main license detection results. But after implementing a separate section for unknown ones ,it doesn't seem to be good idea to have currently. -`nexB/scancode-toolkit#2578 `_ +`nexB/scancode-toolkit#2578 `_ **Follow License References to another file** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -59,11 +59,11 @@ Since this was a ``process_codebase`` step in scan plugin , it was needed that o should return ``refrenced_filenames`` to keep track of these files corresponding to licenses detected. This was tracked in - -`nexB/scancode-toolkit#2632 `_ +`nexB/scancode-toolkit#2632 `_ The ```process_codebase``` step is tracked in - -`nexB/scancode-toolkit#2616 `_ +`nexB/scancode-toolkit#2616 `_ **Improve license detection of Unknown Licenses** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -73,7 +73,7 @@ detection of "unknown" license rules. Firstly matches were filtered after runnin procedure of license detection and the remaining spans are run through a automaton index containing n-grams from all regular license texts and rules. This is tracked in - -`nexB/scancode-toolkit#2592 `_ +`nexB/scancode-toolkit#2592 `_ **Addition of some new Licenses** ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -81,7 +81,7 @@ containing n-grams from all regular license texts and rules. This is tracked in There were some licenses that were not present in Scancode-toolkit as for now. They have been added now. -`nexB/scancode-toolkit#2625 `_ +`nexB/scancode-toolkit#2625 `_ Pre-GSoC @@ -89,10 +89,10 @@ Pre-GSoC **Contributions** -- `nexB/scancode-toolkit#2423 `_ -- `nexB/scancode-toolkit#2473 `_ -- `nexB/scancode-toolkit#2464 `_ -- `nexB/scancode-toolkit#2381 `_ +- `nexB/scancode-toolkit#2423 `_ +- `nexB/scancode-toolkit#2473 `_ +- `nexB/scancode-toolkit#2464 `_ +- `nexB/scancode-toolkit#2381 `_ I’ve had a wonderful summer during these 10 weeks journey and have learned plenty of things. I am thankful to Google and Aboutcode for giving me this opportunity to work with such an amazing diff --git a/docs/source/contribute/roadmap.rst b/docs/source/contribute/roadmap.rst index f97b8e7f81c..c66dc989a06 100644 --- a/docs/source/contribute/roadmap.rst +++ b/docs/source/contribute/roadmap.rst @@ -10,7 +10,7 @@ This is a high level list of what we are working on and what is completed. .. _note: - This is not updated regularly, see the `milestones `_ + This is not updated regularly, see the `milestones `_ instead for updated shorter and longer term roadmaps. Legend @@ -27,9 +27,9 @@ Package manifest and dependency parsers ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - |clock1030| Docker image base (as part of: https://github.com/pombredanne/conan ) #651 -- |clock1030| RubyGems base and dependencies #650 (code in https://github.com/nexB/scancode-toolkit-contrib/ ) -- |clock1030| Perl, CPAN (basic in https://github.com/nexB/scancode-toolkit-contrib/) -- |clock1030| Go : parsing for Godep in https://github.com/nexB/scancode-toolkit-contrib/ +- |clock1030| RubyGems base and dependencies #650 (code in https://github.com/aboutcode-org/scancode-toolkit-contrib/ ) +- |clock1030| Perl, CPAN (basic in https://github.com/aboutcode-org/scancode-toolkit-contrib/) +- |clock1030| Go : parsing for Godep in https://github.com/aboutcode-org/scancode-toolkit-contrib/ - |clock1030| Windows PE #652 - |white_large_square| RPM dependencies #649 - |white_large_square| Windows Nuget dependencies #648 @@ -45,7 +45,7 @@ Package manifest and dependency parsers License Detection ^^^^^^^^^^^^^^^^^ -- |white_check_mark| support and detect license expressions (code in https://github.com/nexB/license-expression) +- |white_check_mark| support and detect license expressions (code in https://github.com/aboutcode-org/license-expression) - |clock1030| support and detect composite licenses - |white_check_mark| support custom licenses - |white_large_square| move licenses data set to external separate repository @@ -88,16 +88,16 @@ Classification, summarization and deduction Source code support (some will be spawned as their own tool) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- |clock1030| symbols : parsing complete in https://github.com/nexB/scancode-toolkit-contrib/ -- |clock1030| metrics : some elements in https://github.com/nexB/scancode-toolkit-contrib/ +- |clock1030| symbols : parsing complete in https://github.com/aboutcode-org/scancode-toolkit-contrib/ +- |clock1030| metrics : some elements in https://github.com/aboutcode-org/scancode-toolkit-contrib/ Compiled code support (will be spawned as their own tool) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- |clock1030| ELFs : parsing complete in https://github.com/nexB/scancode-toolkit-contrib/ -- |clock1030| Java bytecode : parsing complete in https://github.com/nexB/scancode-toolkit-contrib/ -- |clock1030| Windows PE : parsing complete in https://github.com/nexB/scancode-toolkit-contrib/ -- |clock1030| Mach-O : parsing complete in in https://github.com/nexB/scancode-toolkit-contrib/ +- |clock1030| ELFs : parsing complete in https://github.com/aboutcode-org/scancode-toolkit-contrib/ +- |clock1030| Java bytecode : parsing complete in https://github.com/aboutcode-org/scancode-toolkit-contrib/ +- |clock1030| Windows PE : parsing complete in https://github.com/aboutcode-org/scancode-toolkit-contrib/ +- |clock1030| Mach-O : parsing complete in in https://github.com/aboutcode-org/scancode-toolkit-contrib/ - |white_large_square| Dalvik/dex Data exchange @@ -133,9 +133,9 @@ Other work in progress - |clock1030| ScanCode server: Separate project: https://github.com/nexB/scancode-server. Will include Integration / webhooks for Github, Bitbucket. - |clock1030| VulnerableCode: NVD and CVE lookups: Separate project: - https://github.com/nexB/vulnerablecode + https://github.com/aboutcode-org/vulnerablecode - |white_check_mark| ScanCode Workbench: desktop app for scan review: Separate project: - https://github.com/nexB/scancode-workbench + https://github.com/aboutcode-org/scancode-workbench - |white_large_square| DependentCode: dynamic dependencies resolutions: Separate project: https://github.com/nexB/dependentcode @@ -143,7 +143,7 @@ Package mining and matching ^^^^^^^^^^^^^^^^^^^^^^^^^^^ (Note that this will be a separate project) -Some code is in https://github.com/nexB/scancode-toolkit-contrib/ +Some code is in https://github.com/aboutcode-org/scancode-toolkit-contrib/ - |clock1030| exact matching - |clock1030| attribute-based matching diff --git a/docs/source/getting-started/home.rst b/docs/source/getting-started/home.rst index 4acfe645f73..c32b6979286 100644 --- a/docs/source/getting-started/home.rst +++ b/docs/source/getting-started/home.rst @@ -80,7 +80,7 @@ How does it work? Given a code directory, ScanCode will "scan code": - Extract files from any archive using a `universal archive extractor - `_ + `_ - Collect an inventory of the code files and classify the code using file types - Extract texts from binary files as needed diff --git a/docs/source/getting-started/install.rst b/docs/source/getting-started/install.rst index ff8601c7c27..a91cdd23e36 100644 --- a/docs/source/getting-started/install.rst +++ b/docs/source/getting-started/install.rst @@ -126,10 +126,10 @@ Installation as an Application: Downloading Releases ----------------------------------------------------- Get the Scancode Toolkit tarball archive of a specific version and your -operating system by going to the `project releases page `_ +operating system by going to the `project releases page `_ For example, Version 30.0.1 archive can be obtained from -`Toolkit release 30.0.1 `_ +`Toolkit release 30.0.1 `_ under assets options. .. Note:: @@ -198,7 +198,7 @@ Installation on Windows 10 ^^^^^^^^^^^^^^^^^^^^^^^^^^ - Download the latest ScanCode release zip file for Windows from the latest - version at https://github.com/nexB/scancode-toolkit/releases/ + version at https://github.com/aboutcode-org/scancode-toolkit/releases/ - In the File Explorer, select the downloaded ScanCode zip and right-click. @@ -274,7 +274,7 @@ The prerequisite is a working `docker installation `_ installed:: - git clone https://github.com/nexB/scancode-toolkit.git + git clone https://github.com/aboutcode-org/scancode-toolkit.git cd scancode-toolkit @@ -381,8 +381,8 @@ the standard Python package management tool. for ARM (like py-ahocorasick, intbitset). See :ref:`system_requirements` for more information. See related issues for more info: - - `Fallback pure-python deps `_ - - `pip install failing on M1 `_ + - `Fallback pure-python deps `_ + - `pip install failing on M1 `_ The steps are: diff --git a/docs/source/getting-started/newcomer.rst b/docs/source/getting-started/newcomer.rst index c4eb0ae8699..8fcdf7aabb8 100644 --- a/docs/source/getting-started/newcomer.rst +++ b/docs/source/getting-started/newcomer.rst @@ -91,7 +91,7 @@ Before you start using ScanCode Alternatively, you can also :ref:`source_code_install`. #. Run ``scancode -h`` to make sure Scancode was installed properly. - If this shows any Error, refer the `Common Installation Errors Issue `_ + If this shows any Error, refer the `Common Installation Errors Issue `_ for common errors. .. note:: @@ -121,7 +121,7 @@ Once you are all set up with Scancode Toolkit, i.e. Running ``scancode -h`` show follow the basic instructions. #. ScanCode generates output files with scan results. You can visualize ``JSON`` result files using - `Scancode Workbench `_. Follow this tutorial :ref:`how_to_visualize_scan_results` + `Scancode Workbench `_. Follow this tutorial :ref:`how_to_visualize_scan_results` to visualize the scan results. .. _newcomer_scancode_tips: @@ -156,8 +156,8 @@ The How-To's are: ScanCode Versions ^^^^^^^^^^^^^^^^^ -#. You can see all Scancode Toolkit versions on the `GitHub release page `_. -#. Read the `CHANGELOG `_ for more information on specific releases. +#. You can see all Scancode Toolkit versions on the `GitHub release page `_. +#. Read the `CHANGELOG `_ for more information on specific releases. #. If you want to use/test a specific version of Scancode Toolkit, you can follow the instructions in :ref:`source_code_install` docs. @@ -225,7 +225,7 @@ If you are looking to Contribute to Scancode Toolkit, this is where you start. General Information ^^^^^^^^^^^^^^^^^^^ -#. Also refer the `Contribution `_ page here. +#. Also refer the `Contribution `_ page here. #. For more Project Ideas, refer :ref:`contributor_project_ideas`. #. Before committing your work, make sure you have read this post on :ref:`good_commit_messages`. @@ -238,8 +238,8 @@ If you haven't contributed to Scancode Toolkit refer :ref:`newcomer_good_first_i To determine where to contribute, you can refer: -#. ScanCode Toolkit tracks issues via the `GitHub Issue tracker `_ -#. Broad `milestones `_ for upcoming versions are also maintained. +#. ScanCode Toolkit tracks issues via the `GitHub Issue tracker `_ +#. Broad `milestones `_ for upcoming versions are also maintained. And documentation related to contributing code can be referred at :ref:`contrib_code_dev`. @@ -248,7 +248,7 @@ And documentation related to contributing code can be referred at :ref:`contrib_ Good First Issues ^^^^^^^^^^^^^^^^^ -A `good first issue `_ +A `good first issue `_ means it's recommended for people who haven't contributed to Scancode Toolkit before. .. _newcomer_add_functionalirty: @@ -262,7 +262,7 @@ They are: #. Add the functionality to Scancode itself. #. Add plugins if the functionality is very much application dependent. -Refer `enhancement issues `_ for the first type of +Refer `enhancement issues `_ for the first type of enhancements. If you want to add a plugin to implement the functionality, refer all the :ref:`plugin_tutorials`. @@ -287,10 +287,10 @@ The sections in this page cover the following: You can contribute to the following Open Issues on documentation. -#. `First Timers Only Issues List `_ -#. `Documentation Inconsistencies Tracker `_ -#. `ScanCode Toolkit Documentation Roadmap `_ -#. `Issues with label Documentation `_ +#. `First Timers Only Issues List `_ +#. `Documentation Inconsistencies Tracker `_ +#. `ScanCode Toolkit Documentation Roadmap `_ +#. `Issues with label Documentation `_ .. note:: diff --git a/docs/source/how-to-guides/add_new_license.rst b/docs/source/how-to-guides/add_new_license.rst index b4db99f96e7..85b3a8bdd28 100644 --- a/docs/source/how-to-guides/add_new_license.rst +++ b/docs/source/how-to-guides/add_new_license.rst @@ -33,7 +33,7 @@ You need to create a file with: - the data attributes for the license in YAML format as `YAML frontmatter `_. -See an example license: `apache-2.0.LICENSE `_ +See an example license: `apache-2.0.LICENSE `_ There are a couple of mandatory attributes: diff --git a/docs/source/how-to-guides/generate_attribution.rst b/docs/source/how-to-guides/generate_attribution.rst index 2d852c5ac84..9deeb84f746 100644 --- a/docs/source/how-to-guides/generate_attribution.rst +++ b/docs/source/how-to-guides/generate_attribution.rst @@ -11,7 +11,7 @@ attrbution document from a ScanCode scan. Read more about AboutCode Toolkit here: https://aboutcode-toolkit.readthedocs.io/. -Check out the code at https://github.com/nexB/aboutcode-toolkit +Check out the code at https://github.com/aboutcode-org/aboutcode-toolkit Command in AboutCode Toolkit to generate attribution: https://aboutcode-toolkit.readthedocs.io/en/latest/reference.html#attrib. diff --git a/docs/source/misc/faq.rst b/docs/source/misc/faq.rst index 7c3a35ea8ec..ba6606deb99 100644 --- a/docs/source/misc/faq.rst +++ b/docs/source/misc/faq.rst @@ -68,7 +68,7 @@ Can I install ScanCode in a Unicode path? ----------------------------------------- Yes and this is fully supported and tested. See -https://github.com/nexB/scancode-toolkit/issues/867 +https://github.com/aboutcode-org/scancode-toolkit/issues/867 for a previous bug that was preventing this. There was a bug in virtualenv https://github.com/pypa/virtualenv/issues/457 that diff --git a/docs/source/misc/support.rst b/docs/source/misc/support.rst index 8dc9c6fc074..40dee1ba0eb 100644 --- a/docs/source/misc/support.rst +++ b/docs/source/misc/support.rst @@ -11,13 +11,13 @@ The ScanCode toolkit documentation lives at https://scancode-toolkit.readthedocs Issue Tracker ------------- -Post issues you are having and bugs as `GitHub tickets `_ +Post issues you are having and bugs as `GitHub tickets `_ Discussions ----------- If you want to ask questions or anything else that you think are not bugs/new -features, open a `discussion `_ +features, open a `discussion `_ Join the conversation ---------------------- diff --git a/docs/source/misc/versioning.rst b/docs/source/misc/versioning.rst index f2bc3619851..fdbf62ef5c9 100644 --- a/docs/source/misc/versioning.rst +++ b/docs/source/misc/versioning.rst @@ -54,4 +54,4 @@ adapted for data this way: - For any format version changes, we will provide a documentation on the format and its updates using JSON examples and a comprehensive and updated data - dictionary. See https://github.com/nexB/scancode-toolkit/issues/2008 for details. + dictionary. See https://github.com/aboutcode-org/scancode-toolkit/issues/2008 for details. diff --git a/docs/source/reference/license-detection-reference.rst b/docs/source/reference/license-detection-reference.rst index e7db1416816..b21135651bc 100644 --- a/docs/source/reference/license-detection-reference.rst +++ b/docs/source/reference/license-detection-reference.rst @@ -3,9 +3,9 @@ License Detection Updates References: -* `Issue `_ -* `Pull Request `_ -* `A presentation on this `_ +* `Issue `_ +* `Pull Request `_ +* `A presentation on this `_ The Problem: @@ -17,18 +17,18 @@ license_expressions. To tackle this the following solution elements were discuss implemented: 1. Reporting the primary, declared license in a scan summary record -2. tagging mandatory portions in rules `#2773 `_ -3. Adding license detections by combine multiple license matches `#2961 `_ +2. tagging mandatory portions in rules `#2773 `_ +3. Adding license detections by combine multiple license matches `#2961 `_ 4. Integrating the existing scancode-analyzer tool into SCTK to combine multiple matches - based on statistics and heuristics `#2961 `_ + based on statistics and heuristics `#2961 `_ 5. Reporting license clues when the matched license rule data is not sufficient to - create a LicenseDetection `#2961 `_ + create a LicenseDetection `#2961 `_ 6. web app for efficient scan and review of a single license to ease - reporting license detection issues `nexB/scancode.io#450 `_ -7. also apply LicenseDetection to package license detections `#2961 `_ -8. rename resource and package license fields `#2961 `_ + reporting license detection issues `nexB/scancode.io#450 `_ +7. also apply LicenseDetection to package license detections `#2961 `_ +8. rename resource and package license fields `#2961 `_ -Some other elements are still WIP, see `issue #3300 `_ for more details on this. +Some other elements are still WIP, see `issue #3300 `_ for more details on this. .. _what-is-a-licensedetection: @@ -180,8 +180,8 @@ Before:: "homepage_url": "http://www.apache.org/licenses/", "text_url": "http://www.apache.org/licenses/LICENSE-2.0", "reference_url": "https://scancode-licensedb.aboutcode.org/apache-2.0", - "scancode_text_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-2.0.LICENSE", - "scancode_data_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-2.0.yml", + "scancode_text_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-2.0.LICENSE", + "scancode_data_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-2.0.yml", "spdx_license_key": "Apache-2.0", "spdx_url": "https://spdx.org/licenses/Apache-2.0", "start_line": 1, @@ -233,7 +233,7 @@ After:: "license_expression": "apache-2.0", "rule_identifier": "apache-2.0_65.RULE", "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", "matched_text": "license: apache 2.0" } ], @@ -279,7 +279,7 @@ After:: "license_expression": "mit", "rule_identifier": "mit_in_manifest.RULE", "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_in_manifest.RULE", + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_in_manifest.RULE", "matched_text": ":type = MIT, :file = LICENSE" } ], @@ -337,7 +337,7 @@ For the corresponding resource level license detection:: "license_expression": "epl-1.0", "rule_identifier": "epl-1.0_3.RULE", "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/epl-1.0_3.RULE", + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/epl-1.0_3.RULE", }, { "score": 100.0, @@ -349,7 +349,7 @@ For the corresponding resource level license detection:: "license_expression": "epl-1.0", "rule_identifier": "epl-1.0_7.RULE", "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/epl-1.0_7.RULE", + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/epl-1.0_7.RULE", } ], "detection_log": [], @@ -399,8 +399,8 @@ Before:: "homepage_url": "http://www.gnu.org/licenses/gpl-2.0.html", "text_url": "http://www.gnu.org/licenses/gpl-2.0.txt", "reference_url": "https://scancode-licensedb.aboutcode.org/gpl-2.0", - "scancode_text_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/gpl-2.0.LICENSE", - "scancode_data_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/gpl-2.0.yml", + "scancode_text_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/gpl-2.0.LICENSE", + "scancode_data_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/gpl-2.0.yml", "spdx_license_key": "GPL-2.0-only", "spdx_url": "https://spdx.org/licenses/GPL-2.0-only", "start_line": 4, @@ -438,10 +438,10 @@ Before:: "homepage_url": null, "text_url": "", "reference_url": "https://scancode-licensedb.aboutcode.org/patent-disclaimer", - "scancode_text_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/patent-disclaimer.LICENSE", - "scancode_data_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/patent-disclaimer.yml", + "scancode_text_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/patent-disclaimer.LICENSE", + "scancode_data_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/patent-disclaimer.yml", "spdx_license_key": "LicenseRef-scancode-patent-disclaimer", - "spdx_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/patent-disclaimer.LICENSE", + "spdx_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/patent-disclaimer.LICENSE", "start_line": 4, "end_line": 30, "matched_rule": { @@ -489,7 +489,7 @@ After:: "license_expression": "gpl-2.0 AND patent-disclaimer", "rule_identifier": "gpl-2.0_and_patent-disclaimer_3.RULE", "rule_relevance": 100, - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_and_patent-disclaimer_3.RULE" + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_and_patent-disclaimer_3.RULE" } ], "identifier": "gpl_2_0_and_patent_disclaimer-3bb2602f-86f5-b9da-9bf5-b52e6920c8d1" @@ -566,7 +566,7 @@ Before:: "matcher": "1-hash", "license_expression": "apache-2.0", "rule_identifier": "apache-2.0_65.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", "referenced_filenames": [], "is_license_text": false, "is_license_notice": false, @@ -588,7 +588,7 @@ Before:: "homepage_url": "http://www.apache.org/licenses/", "text_url": "http://www.apache.org/licenses/LICENSE-2.0", "reference_url": "https://scancode-licensedb.aboutcode.org/apache-2.0", - "scancode_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-2.0.LICENSE", + "scancode_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/apache-2.0.LICENSE", "spdx_license_key": "Apache-2.0", "spdx_url": "https://spdx.org/licenses/Apache-2.0" } @@ -638,7 +638,7 @@ After:: { "license_expression": "apache-2.0", "rule_identifier": "apache-2.0_65.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE", "referenced_filenames": [], "is_license_text": false, "is_license_notice": false, @@ -671,7 +671,7 @@ After:: "license_expression": "apache-2.0", "rule_identifier": "apache-2.0_65.RULE", "matched_text": "License: Apache-2.0", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE" + "rule_url": "https://github.com/aboutcode-org/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_65.RULE" } ] } @@ -692,4 +692,4 @@ detections. See the :ref:`license_detections_unique` above for more details on this. There could be a list of ambiguous detections as a summary to review. -This is WIP, see `scancode-toolkit#3122 `_. +This is WIP, see `scancode-toolkit#3122 `_. diff --git a/docs/source/rst_snippets/custom_output_format.rst b/docs/source/rst_snippets/custom_output_format.rst index 697ded6c229..25f81923e1b 100644 --- a/docs/source/rst_snippets/custom_output_format.rst +++ b/docs/source/rst_snippets/custom_output_format.rst @@ -53,7 +53,7 @@ Now the results are saved in ``output.txt`` and we can easily view them with ``h copyright:"copyrighted by the Free Software Foundation", ] -For a more elaborate template, refer this `default template `_ +For a more elaborate template, refer this `default template `_ given with Scancode, to generate HTML output with the ``--html`` output format option. Documentation on `Jinja templates `_. diff --git a/docs/source/rst_snippets/improve_docs.rst b/docs/source/rst_snippets/improve_docs.rst index 04a3a2d6d39..43e524ee543 100644 --- a/docs/source/rst_snippets/improve_docs.rst +++ b/docs/source/rst_snippets/improve_docs.rst @@ -2,6 +2,6 @@ Something Missing? ------------------ If something is missing in the documentation or if you found some part confusing, please file -an `issue `_ with your suggestions for +an `issue `_ with your suggestions for improvement. Use the "Documentation Improvement" template. Your help makes ScanCode docs better, we love hearing from you! diff --git a/docs/source/rst_snippets/note_snippets/output_htmlapp_search.rst b/docs/source/rst_snippets/note_snippets/output_htmlapp_search.rst index 308b5e833c8..a091591897f 100644 --- a/docs/source/rst_snippets/note_snippets/output_htmlapp_search.rst +++ b/docs/source/rst_snippets/note_snippets/output_htmlapp_search.rst @@ -2,4 +2,4 @@ The HTML app also contains a Search option to easily find what you are looking for. But the HTML app output is deprecated and we recommend using scancode-workbench instead: - https://github.com/nexB/scancode-workbench. + https://github.com/aboutcode-org/scancode-workbench. diff --git a/docs/source/rst_snippets/output_format_options.rst b/docs/source/rst_snippets/output_format_options.rst index 7bb42d5fc16..859a7608f60 100644 --- a/docs/source/rst_snippets/output_format_options.rst +++ b/docs/source/rst_snippets/output_format_options.rst @@ -20,7 +20,7 @@ All Scan Output Options new CSV and tabular output formats in the next ScanCode release. Visit this issue for details, and to provide input and feedback: - https://github.com/nexB/scancode-toolkit/issues/3043 + https://github.com/aboutcode-org/scancode-toolkit/issues/3043 --html FILE Write scan output as HTML to FILE. diff --git a/docs/source/rst_snippets/warning_snippets/output_htmlapp_dep.rst b/docs/source/rst_snippets/warning_snippets/output_htmlapp_dep.rst index afec603f48f..9f272c4750c 100644 --- a/docs/source/rst_snippets/warning_snippets/output_htmlapp_dep.rst +++ b/docs/source/rst_snippets/warning_snippets/output_htmlapp_dep.rst @@ -1,5 +1,5 @@ .. WARNING:: The html-app feature has been deprecated and you should use Scancode Workbench instead - to visualize scan results. The official Repository `link `_. + to visualize scan results. The official Repository `link `_. Also refer :ref:`how_to_visualize_scan_results`. diff --git a/docs/source/tutorials/how_to_add_a_post_scan_plugin.rst b/docs/source/tutorials/how_to_add_a_post_scan_plugin.rst index ea6aa728f3a..d773554e043 100644 --- a/docs/source/tutorials/how_to_add_a_post_scan_plugin.rst +++ b/docs/source/tutorials/how_to_add_a_post_scan_plugin.rst @@ -66,10 +66,10 @@ Built-In ^^^^^^^^ Some post-scan plugins are installed when ScanCode itself is installed, and they are specified at -``[options.entry_points]`` in the `setup.cfg `_ file. +``[options.entry_points]`` in the `setup.cfg `_ file. For example, the :ref:`license_policy_plugin` is a built-in plugin, whose code is located here:: - https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/plugin_license_policy.py + https://github.com/aboutcode-org/scancode-toolkit/blob/develop/src/licensedcode/plugin_license_policy.py These plugins do not require any additional installation steps and can be used as soon as ScanCode is up and running. @@ -80,7 +80,7 @@ Optional ScanCode is also designed to use post-scan plugins that must be installed separately from the installation of ScanCode. The code for this sort of plugin is located here:: - https://github.com/nexB/scancode-plugins + https://github.com/aboutcode-org/scancode-plugins This wiki page will focus on optional post-scan plugins. @@ -112,7 +112,7 @@ We'll start by creating three folders: The 7 Files are: 1. ``.gitignore`` -- See, e.g., - `/scancode-ignore-binaries/.gitignore `_ + `/scancode-ignore-binaries/.gitignore `_ :: @@ -120,7 +120,7 @@ The 7 Files are: /dist/ 2. ``apache-2.0.LICENSE`` -- See, e.g., - `/scancode-ignore-binaries/apache-2.0.LICENSE `_ + `/scancode-ignore-binaries/apache-2.0.LICENSE `_ 3. ``MANIFEST.in`` @@ -139,7 +139,7 @@ The 7 Files are: global-exclude *.py[co] __pycache__ *.*~ 4. ``NOTICE`` -- See, e.g., - `/scancode-ignore-binaries/NOTICE `__ + `/scancode-ignore-binaries/NOTICE `__ 5. ``README.md`` @@ -185,7 +185,7 @@ The 7 Files are: long_description=desc, author='nexB', author_email='info@aboutcode.org', - url='https://github.com/nexB/scancode-plugins/blob/main/misc/scancode-hello/', + url='https://github.com/aboutcode-org/scancode-plugins/blob/main/misc/scancode-hello/', packages=find_packages('src'), package_dir={'': 'src'}, py_modules=[splitext(basename(path))[0] for path in glob('src/*.py')], @@ -311,6 +311,6 @@ One good example is the License Policy post-scan plugin. This plugin is installe is installed and consequently is not located in the ``/plugins/`` directory used for manually-installed post-scan plugins. The code for the License Policy plugin can be found at `/scancode-toolkit/src/licensedcode/plugin_license_policy.py -`_ +`_ and illustrates how a plugin can be used to analyze the results of a ScanCode scan using external data files and add the results of that analysis as a new field in the ScanCode JSON output file. diff --git a/docs/source/tutorials/how_to_run_a_scan.rst b/docs/source/tutorials/how_to_run_a_scan.rst index 5a47a05b52e..9d0b09829f3 100644 --- a/docs/source/tutorials/how_to_run_a_scan.rst +++ b/docs/source/tutorials/how_to_run_a_scan.rst @@ -47,7 +47,7 @@ according to your requirements. #. The basic scan options, i.e. ``-c`` or ``--copyright``, ``-l`` or ``--license``, ``-p`` or ``--package``, ``-e`` or ``--email``, ``-u`` or ``--url``, and ``-i`` - or ``--info`` cane be selected according to your requirements. If you do not + or ``--info`` can be selected according to your requirements. If you do not need one specific type of information (say, licenses), consider removing it because the more options you scan for, the longer it will take for the scan to complete. diff --git a/docs/source/tutorials/how_to_set_what_will_be_detected_in_a_scan.rst b/docs/source/tutorials/how_to_set_what_will_be_detected_in_a_scan.rst index 2380eb28780..e501b124d83 100644 --- a/docs/source/tutorials/how_to_set_what_will_be_detected_in_a_scan.rst +++ b/docs/source/tutorials/how_to_set_what_will_be_detected_in_a_scan.rst @@ -13,7 +13,7 @@ Different Scans --------------- The following examples will use the ``samples`` directory that is provided with the `ScanCode -Toolkit code `_. All examples will +Toolkit code `_. All examples will be saved in the JSON format, which can be loaded into Scancode Workbench for visualization. See :ref:`how_to_visualize_scan_results` for more information. Another output format option is a static html file. See :ref:`cli_output_format` for more information. diff --git a/docs/source/tutorials/how_to_visualize_scan_results.rst b/docs/source/tutorials/how_to_visualize_scan_results.rst index f88b5b108ab..041092a012a 100644 --- a/docs/source/tutorials/how_to_visualize_scan_results.rst +++ b/docs/source/tutorials/how_to_visualize_scan_results.rst @@ -12,5 +12,5 @@ Detailed Installation and Usage guide can be found here - :ref:`scancode-workbe This tutorial uses the 32.x version of Scancode Toolkit, and Scancode Workbench 4.0.x (This version of ScanCode Workbench is compatible with scans from any ScanCode Toolkit develop version/branch at or after v32.x). If you are using an older version of Scancode Toolkit, check respective versions of this documentation. Also refer the Scancode Workbench - `release highlights `_. + `release highlights `_. .. diff --git a/etc/scripts/gen_copyright_tests.py b/etc/scripts/gen_copyright_tests.py index 2aef0179f38..969df9e2be1 100755 --- a/etc/scripts/gen_copyright_tests.py +++ b/etc/scripts/gen_copyright_tests.py @@ -93,7 +93,7 @@ def create_copyright_tests( content = url if end_line != 0: - content = "".join(content.strip().splitlines()[start_line:end_line]) + content = "\n".join(content.strip().splitlines()[start_line:end_line]) with open(name, "w") as out: out.write(content) diff --git a/etc/scripts/licenses/buildrules.py b/etc/scripts/licenses/buildrules.py index 731702b0e04..9970114fb9f 100644 --- a/etc/scripts/licenses/buildrules.py +++ b/etc/scripts/licenses/buildrules.py @@ -72,6 +72,7 @@ def __attrs_post_init__(self, *args, **kwargs): print(rdat) print("########################################################") raise + self.data = {k: v for k, v in self.data.items() if v is not None or (v is None and k == "license_expression")} def load_data(location="00-new-licenses.txt"): diff --git a/requirements-linux.txt b/requirements-linux.txt index a14a3f9fe6a..cd7dbabc2fe 100644 --- a/requirements-linux.txt +++ b/requirements-linux.txt @@ -1,3 +1,4 @@ packagedcode-msitools==0.101.210706 regipy==3.1.0 rpm-inspector-rpm==4.16.1.3.210404 +go-inspector==0.3.1 diff --git a/requirements.txt b/requirements.txt index fb80bf9b596..bc1db1fa341 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ chardet==5.0.0 charset-normalizer==2.1.0 click==8.1.7 colorama==0.4.5 -commoncode==31.2.1 +commoncode==32.0.0 construct==2.10.68 container-inspector==31.1.0 cryptography==42.0.5 @@ -54,7 +54,7 @@ ply==3.11 publicsuffix2==2.20191221 pyahocorasick==2.1.0 pycparser==2.21 -pygmars==0.7.0 +pygmars==0.9.0 Pygments==2.13.0 pymaven-patch==0.3.2 pyparsing==3.0.9 diff --git a/setup-mini.cfg b/setup-mini.cfg index 07df7b692cd..0465d2e581a 100644 --- a/setup-mini.cfg +++ b/setup-mini.cfg @@ -70,7 +70,7 @@ install_requires = chardet >= 3.0.0 click >= 6.7, !=7.0 colorama >= 0.3.9 - commoncode >= 31.0.3 + commoncode >= 32.0.0 container-inspector >= 31.0.0 debian-inspector >= 31.1.0 dparse2 >= 0.7.0 @@ -100,7 +100,7 @@ install_requires = plugincode >= 32.0.0 publicsuffix2 pyahocorasick >= 2.0.0 - pygmars >= 0.7.0 + pygmars >= 0.9.0 pygments pymaven_patch >= 0.2.8 requests >= 2.7.0 @@ -112,7 +112,7 @@ install_requires = xmltodict >= 0.11.0 zipp >= 3.0.0; python_version < "3.9" typecode >= 30.0.1 -# typecode[full] >= 30.0.0 +# typecode[full] >= 30.0.1 # extractcode[full] >= 31.0.0 @@ -150,6 +150,7 @@ packages = rpm_inspector_rpm >= 4.16.1.3; platform_system == 'Linux' regipy >= 3.1.0; platform_system == 'Linux' packagedcode_msitools >= 0.101.210706; platform_system == 'Linux' + go-inspector >= 0.3.1; platform_system == 'Linux' [options.entry_points] @@ -199,6 +200,7 @@ scancode_post_scan = filter-clues = cluecode.plugin_filter_clues:RedundantCluesFilter consolidate = summarycode.plugin_consolidate:Consolidator license-references = licensedcode.licenses_reference:LicenseReference + todo = summarycode.todo:AmbiguousDetectionsToDoPlugin classify = summarycode.classify_plugin:FileClassifier diff --git a/setup.cfg b/setup.cfg index 3a095718c1b..4174b422cdd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -70,7 +70,7 @@ install_requires = chardet >= 3.0.0 click >= 6.7, !=7.0 colorama >= 0.3.9 - commoncode >= 31.0.3 + commoncode >= 32.0.0 container-inspector >= 31.0.0 debian-inspector >= 31.1.0 dparse2 >= 0.7.0 @@ -100,7 +100,7 @@ install_requires = plugincode >= 32.0.0 publicsuffix2 pyahocorasick >= 2.0.0 - pygmars >= 0.7.0 + pygmars >= 0.9.0 pygments pymaven_patch >= 0.2.8 requests >= 2.7.0 @@ -138,9 +138,9 @@ testing = docs = Sphinx == 5.1.0 - sphinx-rtd-theme >= 0.5.0 - doc8 >= 0.8.1 + sphinx_rtd_theme >= 0.5.1 sphinx-reredirects >= 0.1.2 + doc8 >= 0.8.1 sphinx-autobuild sphinx-rtd-dark-mode>=1.3.0 sphinx-copybutton @@ -150,6 +150,7 @@ packages = rpm_inspector_rpm >= 4.16.1.3; platform_system == 'Linux' regipy >= 3.1.0; platform_system == 'Linux' packagedcode_msitools >= 0.101.210706; platform_system == 'Linux' + go-inspector >= 0.3.1; platform_system == 'Linux' [options.entry_points] diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index 040e9863a34..190ff2082ae 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -12,19 +12,21 @@ import re import string import sys + from collections import deque from time import time import attr + +from commoncode.text import toascii +from commoncode.text import unixlinesep from pygmars import lex from pygmars import parse from pygmars import Token from pygmars.tree import Tree -from commoncode.text import toascii -from commoncode.text import unixlinesep - from cluecode import copyrights_hint +from textcode.markup import strip_known_markup_from_text # Tracing flags TRACE = False or os.environ.get('SCANCODE_DEBUG_COPYRIGHT', False) @@ -88,7 +90,6 @@ def detect_copyrights( include_authors=True, include_copyright_years=True, include_copyright_allrights=False, - demarkup=True, deadline=sys.maxsize, ): """ @@ -105,10 +106,25 @@ def detect_copyrights( Strip markup from text if ``demarkup`` is True. Run for up to ``deadline`` seconds and return results found so far. """ + from cluecode.linux_credits import detect_credits_authors + from textcode.analysis import numbered_text_lines - numbered_lines = numbered_text_lines(location, demarkup=demarkup) - numbered_lines = list(numbered_lines) + if include_authors: + author_detections = list(detect_credits_authors(location)) + + if TRACE: + logger_debug('detect_copyrights: detect_credits_authors') + for detecta in author_detections: + logger_debug(f' {detecta}') + + # bail out if we have a credits file with credits + if author_detections: + for a in author_detections: + yield a + return + + numbered_lines = list(numbered_text_lines(location, demarkup=True)) if TRACE or TRACE_TOK: logger_debug('detect_copyrights: numbered_lines') @@ -168,24 +184,24 @@ def detect_copyrights_from_lines( else: detector = DETECTOR - candidate_lines_groups = candidate_lines(numbered_lines) + candidate_lines_groups = list(collect_candidate_lines(numbered_lines)) if TRACE or TRACE_TOK: - candidate_lines_groups = list(candidate_lines_groups) + candidate_lines_groups = candidate_lines_groups logger_debug( f'detect_copyrights_from_lines: ALL groups of candidate ' f'lines collected: {len(candidate_lines_groups)}', ) - for candidates in candidate_lines_groups: + for candidate_lines in candidate_lines_groups: if TRACE or TRACE_DEEP: logger_debug(f'\n========================================================================') - logger_debug(f'detect_copyrights_from_lines: processing candidates group:') - for can in candidates: + logger_debug(f'detect_copyrights_from_lines: processing candidate_lines group:') + for can in candidate_lines: logger_debug(f' {can}') detections = detector.detect( - numbered_lines=candidates, + numbered_lines=candidate_lines, include_copyrights=include_copyrights, include_holders=include_holders, include_authors=include_authors, @@ -250,7 +266,6 @@ def detect(self, include_copyright_years = include_copyrights and include_copyright_years include_copyright_allrights = include_copyrights and include_copyright_allrights - numbered_lines = list(numbered_lines) if not numbered_lines: return @@ -298,14 +313,13 @@ def detect(self, non_holder_labels_mini = frozenset([ 'COPY', 'YR-RANGE', 'YR-AND', 'YR', 'YR-PLUS', 'BARE-YR', - 'HOLDER', 'AUTHOR', 'IS', 'HELD', ]) non_authors_labels = frozenset([ 'COPY', 'YR-RANGE', 'YR-AND', 'YR', 'YR-PLUS', 'BARE-YR', - 'HOLDER', 'AUTHOR', + 'AUTH', 'AUTH2', 'HOLDER', 'IS', 'HELD', ]) @@ -322,10 +336,9 @@ def detect(self, copyrght = build_detection_from_node( node=tree_node, cls=CopyrightDetection, - ignores=non_copyright_labels, + ignored_labels=non_copyright_labels, include_copyright_allrights=include_copyright_allrights, refiner=refine_copyright, - junk=COPYRIGHTS_JUNK, ) if TRACE or TRACE_DEEP: @@ -340,7 +353,7 @@ def detect(self, holder = build_detection_from_node( node=tree_node, cls=HolderDetection, - ignores=non_holder_labels, + ignored_labels=non_holder_labels, refiner=refine_holder, ) @@ -351,7 +364,7 @@ def detect(self, holder = build_detection_from_node( node=tree_node, cls=HolderDetection, - ignores=non_holder_labels_mini, + ignored_labels=non_holder_labels_mini, refiner=refine_holder, ) @@ -365,9 +378,8 @@ def detect(self, author = build_detection_from_node( node=tree_node, cls=AuthorDetection, - ignores=non_authors_labels, + ignored_labels=non_authors_labels, refiner=refine_author, - junk=AUTHORS_JUNK, ) if author: @@ -384,16 +396,35 @@ def get_tokens(numbered_lines, splitter=re.compile(r'[\t =;]+').split): We perform a simple tokenization on spaces, tabs and some punctuation: =; """ + last_line = "" for start_line, line in numbered_lines: + pos = 0 + if TRACE_TOK: logger_debug(' get_tokens: bare line: ' + repr(line)) - line = prepare_text_line(line) + # keep or skip empty lines + if not line.strip(): + stripped = last_line.lower().strip(string.punctuation) + if ( + stripped.startswith("copyright") + or stripped.endswith(("by", "copyright", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9")) + ): + continue + else: + yield Token(value="\n", label="EMPTY_LINE", start_line=start_line, pos=pos) + pos += 1 + last_line = "" + continue + + if TRACE_TOK: + logger_debug(' get_tokens: before preped line: ' + repr(line)) + + last_line = line if TRACE_TOK: logger_debug(' get_tokens: preped line: ' + repr(line)) - pos = 0 for tok in splitter(line): # strip trailing quotes+comma if tok.endswith("',"): @@ -406,7 +437,7 @@ def get_tokens(numbered_lines, splitter=re.compile(r'[\t =;]+').split): .strip() ) - # the tokenizer allows a sinble colon or dot to be atoken and we discard these + # the tokenizer allows a single colon or dot to be a token and we discard these if tok and tok not in ':.': yield Token(value=tok, start_line=start_line, pos=pos) pos += 1 @@ -475,42 +506,45 @@ class AuthorDetection(Detection): end_line = attr.ib() +def filter_tokens(node, ignored_labels=frozenset()): + """ + Yield tokens for this parse tree Tree, ignoring nodes with a label in the ``ignored_labels`` set. + The order reflects the order of the leaves in the tree's hierarchical structure, breadth-first. + """ + for token in node: + if token.label in ignored_labels: + continue + if isinstance(token, Tree): + yield from filter_tokens(token, ignored_labels=ignored_labels) + else: + yield token + + def build_detection_from_node( node, cls, - ignores=frozenset(), + ignored_labels=frozenset(), include_copyright_allrights=False, refiner=None, - junk=frozenset(), - junk_patterns=frozenset(), ): """ Return a ``cls`` Detection object from a pygmars.tree.Tree ``node`` with a space-normalized string value or None. - Filter ``node`` Tokens with a type found in the ``ignores`` set of ignorable + Filter ``node`` Tokens with a type found in the ``ignored_labels`` set of ignorable token types. For copyright detection, include trailing "All rights reserved" if ``include_copyright_allrights`` is True. Apply the ``refiner`` callable function to the detection string. - - Return None if the value exists in the ``junk`` strings set or is matched by - any of the regex in the ``junk_patterns`` set. """ include_copyright_allrights = ( cls == CopyrightDetection and include_copyright_allrights ) - if ignores: - leaves = [ - token for token in node.leaves() - if token.label not in ignores - ] - else: - leaves = node.leaves() + leaves = list(filter_tokens(node, ignored_labels=ignored_labels)) if include_copyright_allrights: filtered = leaves @@ -545,7 +579,7 @@ def build_detection_from_node( if refiner: node_string = refiner(node_string) - if node_string and not is_junk_copyryright(node_string): + if node_string and not is_junk_copyright(node_string): start_line = filtered[0].start_line end_line = filtered[-1].start_line @@ -579,6 +613,10 @@ def build_detection_from_node( '(20[0-3][0-9][\\.,\\-])+[0-9]' # 2001-4 not 2012 '|' '(20[0-3][0-9][\\.,\\-])+20[0-3][0-9]' # 2001-2012 + '|' + '(20[0-3][0-9][\\.,\\-])+20[0-3]x' # 2001-201x + '|' + '(20[0-3][0-9][\\.,\\-])+20[0-3][0-9]a' # 2001-2012a ')') _PUNCT = ( @@ -638,8 +676,9 @@ def build_detection_from_node( # Slovenian: avtorske pravice # Ukrainian: авторське право - # rare typo copyrighy + # rare typos incopyright (r'^Copyrighy$', 'COPY'), + (r'^Copyirght$', 'COPY'), # OSGI (r'^Bundle-Copyright', 'COPY'), @@ -770,6 +809,7 @@ def build_detection_from_node( (r'^A11yance', 'NNP'), (r'^Fu$', 'NNP'), (r'^W3C\(r\)$', 'COMP'), + (r'^TeX$', 'NNP'), # Three or more AsCamelCase GetQueueReference, with some exceptions (r'^(?:OpenStreetMap|AliasDotCom|AllThingsTalk).?$', 'NAME'), @@ -779,6 +819,15 @@ def build_detection_from_node( (r'^Earth$', 'NN'), (r'^Maps/Google$', 'NN'), + # verbatime star + (r'^\*$', 'JUNK'), + + # misc company names exception to next rule + (r'^TinCanTools$', 'NNP'), + (r'^SoftwareBitMaker$', 'NNP'), + (r'^NetCommWireless$', 'NNP'), + + # Repeated CamelCasedWords (r'^([A-Z][a-z]+){3,}$', 'JUNK'), ############################################################################ @@ -811,6 +860,9 @@ def build_detection_from_node( (r'^@?link:?$', 'JUNK'), (r'@license:?$', 'JUNK'), + # hex is JUNK 0x3fc3/0x7cff + (r'^0x[a-fA-F0-9]+', 'JUNK'), + # found in crypto certificates and LDAP (r'^O=$', 'JUNK'), (r'^OU=?$', 'JUNK'), @@ -868,6 +920,10 @@ def build_detection_from_node( (r'^[Ss]tring$', 'JUNK'), (r'^Implementation-Vendor$', 'JUNK'), (r'^dnl$', 'JUNK'), + (r'^ifndef$', 'JUNK'), + + (r'^as$', 'NN'), + (r'^[Vv]isit$', 'JUNK'), (r'^rem$', 'JUNK'), (r'^REM$', 'JUNK'), @@ -891,6 +947,8 @@ def build_detection_from_node( (r'^WARRANTS?$', 'JUNK'), (r'^WARRANTYS?$', 'JUNK'), + (r'^Row\(', 'JUNK'), + (r'^hispagestyle$', 'JUNK'), (r'^Generic$', 'JUNK'), (r'^generate-', 'JUNK'), @@ -898,7 +956,6 @@ def build_detection_from_node( (r'^Add$', 'JUNK'), (r'^Average$', 'JUNK'), (r'^Taken$', 'JUNK'), - (r'^LAWS\.?$', 'JUNK'), (r'^design$', 'JUNK'), (r'^Driver$', 'JUNK'), (r'^[Cc]ontribution\.?', 'JUNK'), @@ -906,8 +963,9 @@ def build_detection_from_node( (r'DeclareUnicodeCharacter$', 'JUNK'), (r'^Language-Team$', 'JUNK'), (r'^Last-Translator$', 'JUNK'), + (r'^Translated$', 'JUNK'), (r'^OMAP730$', 'JUNK'), - (r'^Law\.$', 'JUNK'), + (r'^dylid$', 'JUNK'), (r'^BeOS$', 'JUNK'), (r'^Generates?$', 'JUNK'), @@ -949,7 +1007,6 @@ def build_detection_from_node( (r'^Disclaimer$', 'JUNK'), (r'^Directive.?$', 'JUNK'), (r'^LAWS\,?$', 'JUNK'), - (r'^[Ll]aws?,?$', 'JUNK'), (r'^me$', 'JUNK'), (r'^Derived$', 'JUNK'), (r'^Limitations?$', 'JUNK'), @@ -995,6 +1052,11 @@ def build_detection_from_node( (r'^Privacy$', 'JUNK'), (r'^within$', 'JUNK'), + (r'^official$', 'JUNK'), + (r'^duties$', 'JUNK'), + (r'^civil$', 'JUNK'), + (r'^servants?$', 'JUNK'), + # various trailing words that are junk (r'^Copyleft$', 'JUNK'), (r'^LegalCopyright$', 'JUNK'), @@ -1015,7 +1077,15 @@ def build_detection_from_node( (r'^Much$', 'JUNK'), (r'^remains?,?$', 'JUNK'), (r'^earlier$', 'JUNK'), - (r'^[lL]aws?$', 'JUNK'), + + # there is a Mr. Law + (r'^Law[\.,]?$', 'NN'), + (r'^laws?[\.,]?$', 'JUNK'), + (r'^Laws[\.,]?$', 'JUNK'), + (r'^LAWS?[\.,]?$', 'JUNK'), + (r'^LAWS?$', 'NN'), + + (r'^taken$', 'NN'), (r'^Insert$', 'JUNK'), (r'^url$', 'JUNK'), (r'^[Ss]ee$', 'JUNK'), @@ -1033,12 +1103,13 @@ def build_detection_from_node( (r'^Owner$', 'JUNK'), (r'^behalf$', 'JUNK'), (r'^know-how$', 'JUNK'), - (r'^interfaces?,?$', 'JUNK'), + (r'^[Ii]nterfaces?,?$', 'JUNK'), (r'^than$', 'JUNK'), (r'^whom$', 'JUNK'), + (r'^Definitions?$', 'JUNK'), (r'^However,?$', 'JUNK'), (r'^[Cc]ollectively$', 'JUNK'), - (r'^following$', 'JUNK'), + (r'^following$', 'FOLLOWING'), (r'^[Cc]onfig$', 'JUNK'), (r'^file\.$', 'JUNK'), @@ -1060,6 +1131,7 @@ def build_detection_from_node( # FIXME: may be lowercase instead? (r'^Title:?$', 'JUNK'), (r'^Debianized-By:?$', 'JUNK'), + (r'^[Dd]ebianized$', 'JUNK'), (r'^Upstream-Maintainer:?$', 'JUNK'), (r'^Content', 'JUNK'), (r'^Upstream-Author:?$', 'JUNK'), @@ -1142,7 +1214,8 @@ def build_detection_from_node( (r'^[a-z]{3,10}[A-Z][a-z]{3,10}$', 'JUNK'), (r'^\$?Guid$', 'JUNK'), - (r'^Small$', 'NN'), + # there is a Mr Small + # (r'^Small$', 'NN'), (r'^implementing$', 'JUNK'), (r'^Unlike$', 'JUNK'), (r'^using$', 'JUNK'), @@ -1164,6 +1237,11 @@ def build_detection_from_node( # single period (r"^\.$", 'JUNK'), + # exception to the next rule + + # by PaX Team + (r"PaX$", 'NN'), + # short mixed caps with trailing cap: ZoY (r"[A-Z][a-z][A-Z]$", 'JUNK'), @@ -1193,6 +1271,10 @@ def build_detection_from_node( (r'^False.?$', 'JUNK'), (r'^True.?$', 'JUNK'), + (r'^high$', 'JUNK'), + (r'^low$', 'JUNK'), + (r'^on$', 'JUNK'), + (r'^imports?$', 'JUNK'), (r'^[Ww]arnings?$', 'JUNK'), (r'^[Ww]hether$', 'JUNK'), @@ -1213,6 +1295,8 @@ def build_detection_from_node( # NN often used in conjunction with copyright (r'^[Ss]tatements?.?$', 'JUNK'), (r'^issues?.?$', 'JUNK'), + (r'^retain?.?$', 'JUNK'), + (r'^Sun3x$', 'JUNK'), ############################################################################ # Nouns and proper Nouns @@ -1223,7 +1307,7 @@ def build_detection_from_node( (r'^This_file_is_part_of_KDE$', 'NAME'), # K.K. (a company suffix), needs special handling - (r'^K.K.,?$', 'NAME'), + (r'^K.K.,?$', 'COMP'), # MIT is problematic # With a comma, always CAPS (MIT alone is too error prone to be always tagged as CAPS @@ -1245,6 +1329,7 @@ def build_detection_from_node( (r'^Activation\.?$', 'NN'), (r'^Act[\.,]?$', 'NN'), (r'^Added$', 'NN'), + (r'^added$', 'JUNK'), (r'^As$', 'NN'), (r'^I$', 'NN'), (r'^Additional$', 'NN'), @@ -1288,7 +1373,7 @@ def build_detection_from_node( (r'^Code$', 'NN'), (r'^Collators?$', 'NN'), (r'^Commercial', 'NN'), - (r'^Commons$', 'NN'), + (r'^Commons?$', 'NN'), # TODO: Compilation could be JUNK? (r'^Compilation', 'NN'), (r'^Contact', 'NN'), @@ -1303,10 +1388,11 @@ def build_detection_from_node( (r'^DATED$', 'NN'), (r'^Delay', 'NN'), (r'^Derivative', 'NN'), + (r'^Direct$', 'NN'), (r'^DISCLAIMED', 'NN'), (r'^Docs?$', 'NN'), (r'^DOCUMENTATION', 'NN'), - (r'^Download', 'NN'), + (r'^Download', 'JUNK'), (r'^DOM$', 'NN'), (r'^Do$', 'NN'), (r'^DoubleClick$', 'NN'), @@ -1317,11 +1403,18 @@ def build_detection_from_node( (r'^EXHIBIT$', 'JUNK'), (r'^Exhibit$', 'JUNK'), (r'^Digitized', 'NN'), + (r'^OPENING', 'JUNK'), (r'^[Ds]istributed?.?$', 'NN'), (r'^Distributions?', 'NN'), (r'^Multiply$', 'NN'), (r'^Convert$', 'NN'), (r'^Compute$', 'NN'), + + (r'^\(Computer$', 'JUNK'), + (r'^Programs\)', 'JUNK'), + (r'^Regulations', 'JUNK'), + (r'^message\.', 'JUNK'), + (r'^Case$', 'NN'), (r'^Hessian$', 'NN'), (r'^Include', 'NN'), @@ -1338,8 +1431,28 @@ def build_detection_from_node( (r'^Entity$', 'NN'), (r'^Example', 'NN'), (r'^Except', 'NN'), + (r'^Fragments$', 'NN'), + (r'^With$', 'NN'), + (r'^Tick$', 'NN'), + (r'^Dynamic$', 'NN'), + (r'^Battery$', 'NN'), + (r'^Charger$', 'NN'), + (r'^Dynamic$', 'NN'), + (r'^Bugfixes?$', 'NN'), + (r'^Likes?$', 'NN'), + (r'^STA$', 'NN'), + (r'^Page$', 'NN'), + (r'^Todo/Under$', 'JUNK'), + (r'^Under$', 'NN'), + + (r'^Interrupt$', 'NN'), + (r'^cleanups?$', 'JUNK'), + (r'^Tape$', 'NN'), + (r'^When$', 'NN'), # (r'^Owner$', 'NN'), + (r'^Specifications?$', 'NN'), + (r'^Final$', 'NN'), (r'^Holds$', 'NN'), (r'^Image', 'NN'), (r'^Supplier', 'NN'), @@ -1362,19 +1475,26 @@ def build_detection_from_node( (r'^Gaim$', 'NN'), (r'^Generated', 'NN'), (r'^Glib$', 'NN'), - (r'^GPLd', 'NN'), - (r'^GPL\'d', 'NN'), + (r'^GPLd?\.?$', 'NN'), + (r'^GPL\'d$', 'NN'), (r'^Gnome$', 'NN'), + (r'^Port$', 'NN'), (r'^GnuPG$', 'NN'), (r'^Government.', 'NNP'), (r'^OProfile$', 'NNP'), - (r'^Government', 'NN'), + (r'^Government$', 'COMP'), + # there is a Ms. Grant + (r'^Grant$', 'NNP'), (r'^Grants?\.?,?$', 'NN'), (r'^Header', 'NN'), (r'^HylaFAX$', 'NN'), (r'^IA64$', 'NN'), (r'^IDEA$', 'NN'), (r'^Id$', 'NN'), + + # miscapitalized last name + (r'^king$', 'NNP'), + (r'^IDENTIFICATION?\.?$', 'NN'), (r'^IEEE$', 'NN'), (r'^If$', 'NN'), @@ -1385,6 +1505,8 @@ def build_detection_from_node( (r'^INCLUDING', 'NN'), (r'^Indemnification', 'NN'), (r'^Indemnified', 'NN'), + (r'^Unified$', 'NN'), + (r'^Cleaned$', 'JUNK'), (r'^Information', 'NN'), (r'^In$', 'NN'), (r'^Intellij$', 'NN'), @@ -1399,7 +1521,6 @@ def build_detection_from_node( (r'^List$', 'NN'), (r'^Set$', 'NN'), (r'^Last$', 'NN'), - (r'^LAW', 'NN'), (r'^Legal$', 'NN'), (r'^LegalTrademarks$', 'NN'), (r'^Library$', 'NN'), @@ -1411,7 +1532,7 @@ def build_detection_from_node( (r'^Initials$', 'NN'), (r'^Licen[cs]e', 'NN'), (r'^License-Alias\:?$', 'NN'), - (r'^Linux$', 'NN'), + (r'^Linux$', 'LINUX'), (r'^Locker$', 'NN'), (r'^Log$', 'NN'), (r'^Logos?$', 'NN'), @@ -1455,7 +1576,7 @@ def build_detection_from_node( (r'^POSIX$', 'NN'), (r'^Possible', 'NN'), (r'^Powered$', 'NN'), - (r'^defined$', 'NN'), + (r'^defined?$', 'JUNK'), (r'^Predefined$', 'NN'), (r'^Promise$', 'NN'), (r'^Products?\.?$', 'NN'), @@ -1481,7 +1602,7 @@ def build_detection_from_node( (r'^[Rr]espective', 'NN'), (r'^SAX$', 'NN'), (r'^Sections?$', 'NN'), - (r'^Send$', 'NN'), + (r'^Send$', 'JUNK'), (r'^Separa', 'NN'), (r'^Service$', 'NN'), (r'^Several$', 'NN'), @@ -1512,7 +1633,7 @@ def build_detection_from_node( (r'^Those$', 'NN'), (r'^Timer', 'NN'), (r'^TODO$', 'NN'), - (r'^Tool.?$', 'NN'), + (r'^Tools?.?$', 'NN'), (r'^Trademarks?$', 'NN'), (r'^True$', 'NN'), (r'^TRUE$', 'NN'), @@ -1552,6 +1673,22 @@ def build_detection_from_node( (r'^CodeMirror$', 'NN'), (r'^They$', 'JUNK'), (r'^Branched$', 'NN'), + (r'^Partial$', 'NN'), + (r'^Fixed$', 'NN'), + (r'^Later$', 'NN'), + (r'^Rear$', 'NN'), + (r'^Left$', 'NN'), + + (r'^Improved$', 'NN'), + (r'^Designed$', 'NN'), + (r'^Organised$', 'NN'), + (r'^Re-organised$', 'NN'), + (r'^Swap$', 'NN'), + (r'^Adapted$', 'JUNK'), + (r'^Thumb$', 'NN'), + + # SEEN IN Copyright (c) 1997 Dan error_act (dmalek@jlc.net) + (r'^error_act$', 'NN'), # alone this is not enough for an NNP (r'^Free$', 'NN'), @@ -1562,19 +1699,6 @@ def build_detection_from_node( (r'^AM$', 'NN'), (r'^PM$', 'NN'), - (r'^January$', 'NN'), - (r'^February$', 'NN'), - (r'^March$', 'NN'), - (r'^April$', 'NN'), - (r'^May$', 'NN'), - (r'^June$', 'NN'), - (r'^July$', 'NN'), - (r'^August$', 'NN'), - (r'^September$', 'NN'), - (r'^October$', 'NN'), - (r'^November$', 'NN'), - (r'^December$', 'NN'), - (r'^Name[\.,]?$', 'NN'), (r'^Co-Author[\.,]?$', 'NN'), (r'^Author\'s$', 'NN'), @@ -1583,10 +1707,14 @@ def build_detection_from_node( (r'^Convention[\.,]?$', 'NN'), (r'^Paris[\.,]?$', 'NN'), - # we do not include Jan and Jun that are common enough first names - (r'^(Feb|Mar|Apr|May|Jul|Aug|Sep|Oct|Nov|Dec)$', 'NN'), - (r'^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)$', 'NN'), - (r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun)$', 'NN'), + (r'^([Jj]anuary|[Ff]ebruary|[Mm]arch|[Aa]pril|[Jj]uly|[Aa]ugust|[Ss]eptember|[Oo]ctober|[Nn]ovember|[Dd]ecember)$', 'NN'), + # we do not include May, Jan and Jun that are common enough first names + (r'^(Feb|Mar|Apr|Jul|Aug|Sep|Oct|Nov|Dec),?$', 'MONTH'), + + (r'^([Mm]onday|[Tt]uesday|[Ww]ednesday|[Tt]hursday|[Ff]riday|[Ss]aturday|[Ss]unday),?$', 'DAY'), + (r'^(Mon|Tue|Wed|Thu|Fri|Sat|Sun|May),?$', 'NN'), + + (r'^[Dd]ebugging$', 'JUNK'), # misc words that are not NNs # lowercase verbs ending in "ing" @@ -1617,6 +1745,12 @@ def build_detection_from_node( (r'^Unlike$', 'NN'), (r'^Compression$', 'NN'), (r'^Letter$', 'NN'), + (r'^Moved$', 'NN'), + (r'^More$', 'NN'), + (r'^Phone$', 'NN'), + (r'^[Tt]ests?$', 'JUNK'), + + (r'^Inputs?$', 'NN'), # dual caps that are not NNP (r'^Make[A-Z]', 'JUNK'), @@ -1718,6 +1852,13 @@ def build_detection_from_node( (r'werkstaetten\.?$', 'NNP'), (r'werken$', 'NNP'), (r'various\.?$', 'NNP'), + (r'SuSE$', 'COMPANY'), + (r'Suse$', 'COMPANY'), + (r'\(Winbond\),?$', 'COMP'), + + # copyright : (C) 2002 by karsten wiese + (r'karsten$', 'NNP'), + (r'wiese$', 'NNP'), # treat Attributable as proper noun as it is seen in Author tags such as in: # @author not attributable @@ -1743,16 +1884,18 @@ def build_detection_from_node( # company suffix name with suffix Tech.,ltd (r'^[A-Z][a-z]+[\.,]+(LTD|LTd|LtD|Ltd|ltd|lTD|lTd|ltD).?,?$', 'COMP'), - # company suffix - (r'^[Ii]nc[\.]?[,\.]?\)?$', 'COMP'), + # company suffix, including rarer Inc> + (r'^[Ii]nc[\.]?[,\.>]?\)?$', 'COMP'), (r'^Incorporated[,\.]?\)?$', 'COMP'), # ,Inc. suffix without spaces is directly a company name (r'^.+,Inc\.$', 'COMPANY'), (r'^[Cc]ompany[,\.]?\)?$', 'COMP'), - (r'^Limited[,\.]??$', 'COMP'), - (r'^LIMITED[,\.]??$', 'COMP'), + (r'^Limited[,\.]?$', 'COMP'), + (r'^LIMITED[,\.]?$', 'COMP'), + + (r'^COMPANY,LTD$', 'COMP'), # Caps company suffixes (r'^INC[\.,\)]*$', 'COMP'), @@ -1796,6 +1939,17 @@ def build_detection_from_node( (r'^(S\.?A\.?S?|Sas|sas|A\/S|AG,?|AB|Labs?|[Cc][Oo]|Research|Center|INRIA|Societe|KG)[,\.]?$', 'COMP'), # French SARL (r'^(SARL|S\.A\.R\.L\.)[\.,\)]*$', 'COMP'), + # More company suffix : a.s. in Czechia and others + (r'^(a\.s\.|S\.r\.l\.?)$', 'COMP'), + (r'^Vertriebsges\.m\.b\.H\.?,?$', 'COMP'), + # Iceland + (r'^(ehf|hf|svf|ohf)\.,?$', 'COMP'), + # Move company abbreviations + (r'^(SPRL|srl)[\.,]?$', 'COMP'), + # Poland + (r'^(sp\.|o\.o\.)$', 'COMP'), + # Eingetragener Kaufmann + (r'^(e\.K\.|e\.Kfm\.|e\.Kfr\.)$', 'COMP'), # company suffix : AS: this is frequent beyond Norway. (r'^AS', 'CAPS'), @@ -1852,6 +2006,7 @@ def build_detection_from_node( # Various rare company names/suffix (r'^FedICT$', 'COMPANY'), + (r'^10gen$', 'COMPANY'), # Division, District (r'^(District|Division)\)?[,\.]?$', 'COMP'), @@ -1861,10 +2016,11 @@ def build_detection_from_node( ############################################################################ # "authors" or "contributors" is interesting, and so a tag of its own + (r'^[Aa]uthors,$', 'AUTHDOT'), (r'^[Aa]uthor$', 'AUTH'), (r'^[Aa]uthor\.$', 'AUTHDOT'), (r'^[Aa]uthors?\.$', 'AUTHDOT'), - (r'^[Aa]uthors|author\'$', 'AUTHS'), + (r'^([Aa]uthors|author\')$', 'AUTHS'), (r'^[Aa]uthor\(s\)$', 'AUTHS'), (r'^[Aa]uthor\(s\)\.?$', 'AUTHDOT'), # as javadoc @@ -1873,6 +2029,9 @@ def build_detection_from_node( # et al. (r'^al\.$', 'AUTHDOT'), + # in Linux LKMs + (r'^MODULEAUTHOR$', 'AUTH'), + # Contributor(s) (r'^[Cc]ontributors[,\.]?$', 'CONTRIBUTORS'), (r'^Contributor[,\.]?$', 'NN'), @@ -1900,6 +2059,7 @@ def build_detection_from_node( (r'^[Aa]dmins?$', 'MAINT'), (r'^[Dd]evelopers?\.?$', 'MAINT'), (r'^[Mm]aintainers?\.?$', 'MAINT'), + (r'^[Cc]o-maintainers?\.?$', 'MAINT'), ############################################################################ # Conjunctions and related @@ -1960,6 +2120,7 @@ def build_detection_from_node( # and Spanish/French Da Siva and De Gaulle (r'^(([Vv][ao]n)|[Dd][aeu])$', 'VAN'), + (r'^aan$', 'OF'), (r'^van$', 'VAN'), (r'^Van$', 'VAN'), (r'^von$', 'VAN'), @@ -1976,7 +2137,7 @@ def build_detection_from_node( ############################################################################ # rare cases of trailing + signon years - (r'^20[0-2][0-9]\+$', 'YR-PLUS'), + (r'^20[0-3][0-9]\+$', 'YR-PLUS'), # year or year ranges # plain year with various leading and trailing punct @@ -2005,6 +2166,9 @@ def build_detection_from_node( (r'^(' + _YEAR_DASH_PRESENT + ')+$', 'YR'), + # ISO dates as in 2024-12-09 + (r'^' + _YEAR + '-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$', 'YR'), + # 88, 93, 94, 95, 96: this is a pattern mostly used in FSF copyrights (r'^[8-9][0-9],$', 'YR'), @@ -2022,8 +2186,11 @@ def build_detection_from_node( (r'^\$?date-of-software$', 'YR'), (r'^\$?date-of-document$', 'YR'), - # cardinal numbers - (r'^-?[0-9]+(.[0-9]+)?\.?$', 'CD'), + # small-cardinal numbers, under 30 + (r'^[0-3]?[0-9]?[\.,]?$', 'CDS'), + + # all other cardinal numbers + (r'^-?[0-9]+(.[0-9]+)?[\.,]?$', 'CD'), ############################################################################ # All caps and proper nouns @@ -2043,6 +2210,7 @@ def build_detection_from_node( (r'^Meridian\'93$', 'NNP'), (r'^Xiph.Org$', 'NNP'), (r'^iClick,?$', 'NNP'), + (r'^electronics?$', 'NNP'), # proper nouns with digits (r'^([A-Z][a-z0-9]+){1,2}[\.,]?$', 'NNP'), @@ -2062,6 +2230,17 @@ def build_detection_from_node( # proper noun with apostrophe ': d'Itri (r"^[a-z]'[A-Z]?[a-z]+[,\.]?$", 'NNP'), + # exceptions to all CAPS words + (r'^[A-Z]{3,4}[0-9]{4},?$', 'NN'), + + # exceptions to CAPS used in obfuscated emails like in joe AT foo DOT com + (r'^AT$', 'AT'), + (r'^AT$', ''), + (r'^DOT$', 'DOT'), + + # exceptions to CAPS + (r'^MMC$', 'JUNK'), + # all CAPS word, at least 1 char long such as MIT, including an optional trailing comma or dot (r'^[A-Z0-9]+,?$', 'CAPS'), @@ -2087,7 +2266,8 @@ def build_detection_from_node( # a .sh shell scripts is NOT an email. (r'^.*\.sh\.?$', 'JUNK'), # email eventually in parens or brackets with some trailing punct. Note the @ or "at " - (r'^[\<\(]?[a-zA-Z0-9]+[a-zA-Z0-9\+_\-\.\%]*(@|at)[a-zA-Z0-9][a-zA-Z0-9\+_\-\.\%]+\.[a-zA-Z]{2,3}[\>\)\.\,]*$', 'EMAIL'), + (r'^(?:[A-Za-z])*[\<\(]?[a-zA-Z0-9]+[a-zA-Z0-9\+_\-\.\%]*(@|at)[a-zA-Z0-9][a-zA-Z0-9\+_\-\.\%]+\.[a-zA-Z]{2,3}[\>\)\.\,]*$', 'EMAIL'), + # mailto URLs (r'^mailto:.{2,}@.{2,}\.[a-z]{2,3}', 'EMAIL'), @@ -2129,6 +2309,11 @@ def build_detection_from_node( (r'Keio_University\)?,?$', 'NAME'), (r'__MyCompanyName__[\.,]?$', 'NAME'), + # email in brackets + # (karl AT indy.rr.com) + # + (r'(?i:^[<\(][\w\.\-\+]+at[\w\.\-\+]+(dot)?[\w\.\-\+]+[/)>]$)', 'EMAIL'), + # Code variable names including snake case (r'^.*(_.*)+$', 'JUNK'), @@ -2162,6 +2347,8 @@ def build_detection_from_node( # some punctuation combos (r'^(?:=>|->|<-|<=)$', 'JUNK'), + (r'^semiconductors?[\.,]?$', 'NNP'), + ############################################################################ # catch all other as Nouns ############################################################################ @@ -2173,6 +2360,7 @@ def build_detection_from_node( # Comments in the Grammar are lines that start with # # End of line commenst are rules descriptions. # One rule per line. + GRAMMAR = """ ####################################### @@ -2181,15 +2369,21 @@ def build_detection_from_node( YR-RANGE: {+ + } #20 YR-RANGE: { * +} #30 - YR-RANGE: {? ?} #40 + YR-RANGE: {? ?} #40 YR-RANGE: {+ ? } #50 YR-AND: {? + + } #60 - YR-RANGE: {+} #70| + YR-RANGE: {+} #70 YR-RANGE: {+ +} #71 YR-RANGE: {+ ?} #72 + # Copyright (c) 1999, 2000, 01, 03, 06 Ralf Baechle + YR-RANGE: { +} #72.2 CD: {} #bareyear + # 5 Jan 2003 + YR-RANGE: { } #72.3 + + ####################################### # All/No/Some Rights Reserved ####################################### @@ -2203,11 +2397,20 @@ def build_detection_from_node( EMAIL: { * } # composite_email + # created by Jason Hunter + EMAIL: { } # email_start + + # Copyright (c) 2001 Karl Garrison (karl AT indy.rr.com) + EMAIL: { } # email_at + EMAIL: { } # foo at bat dot com # foo@bar.com or baz@bar.com EMAIL: { } # email or email + # + EMAIL: { } #email with brackets + ####################################### # NAMES and COMPANIES ####################################### @@ -2273,8 +2476,9 @@ def build_detection_from_node( # AT&T Laboratories, Cambridge COMPANY: { } #145 + COMPANY: { } #170 + # rare "Software in the public interest, Inc." - COMPANY: { } #170 COMPANY: { +?} #180 # Commonwealth Scientific and Industrial Research Organisation (CSIRO) @@ -2318,7 +2522,10 @@ def build_detection_from_node( # Project contributors COMPANY: { } #256 - COMPANY: {+} #260 + # Copyright (C) 2013 Ideas on board SPRL + COMPANY: { } #259 + + COMPANY: {? +} #260 # Nokia Corporation and/or its subsidiary(-ies) COMPANY: { } #265 @@ -2343,12 +2550,25 @@ def build_detection_from_node( # NAME-YEAR starts or ends with a YEAR range NAME-YEAR: { +} #350 + COPYRIGHT: { } #350.1 + + # Copyright (C) 1995-06 ICP vortex, Achim Leubner + COPYRIGHT: { } #350.2 + + # Jason Hunter + EMAIL: { } #350.3 + # Academy of Motion Picture Arts NAME: {+ +} #351 # Distributed Management Task Force NAME: { {3}} #881111 + # Rudolf Marek + # David Hubbard + # Daniel J Blueman + # NAME: { } #351.0 + # @author Stephane Hillion NAME: { ? ? } #351.1 @@ -2405,23 +2625,27 @@ def build_detection_from_node( NAME-YEAR: { + } #540 NAME: {+ ? } #550 + NAME: {+ ? } #560 - NAME: {} #5611 + NAME: {} #561 # strip Software from Copyright (c) Ian Darwin 1995. Software - NAME-YEAR: {+ } #5611 + NAME-YEAR: {+ } #561.1 # Copyright 2018, OpenCensus Authors - COPYRIGHT: {+ } #1579991 + COPYRIGHT: {+ } #561.2 + + # Tom aan de Wiel + NAME: { } # 561.3 - NAME-YEAR: { + ?} #5612 + NAME-YEAR: { + ? ?} #562 #Academy of Motion Picture Arts and Sciences - NAME: { } #561 + NAME: { } #563 # Adam Weinberger and the GNOME Foundation - NAME: { } #565 + ANDCO: { } #565 # (c) 1991-1992, Thomas G. Lane , Part of the Independent JPEG Group's NAME: { +} #566 @@ -2430,16 +2654,24 @@ def build_detection_from_node( URL: { } #5700 + NAME-YEAR: { } #5700.1 + #also accept trailing email and URLs - NAME-YEAR: { ??} #5701 + # and "VAN" e.g. Du: Copyright (c) 2008 Alek Du + NAME-YEAR: { ? ??} #5701 + + # Copyright (C) 2008 Jim Law - Iris LP All rights reserved. + NAME-YEAR: { } # 5701.1 + NAME-YEAR: {+} #5702 + NAME: { } #580 NAME: { } #590 NAME: {+ } #600 NAME: { } #610 NAME: { ? } #620 - NAME: { } #630 + NAME: { } #630 NAME: { +} #640 # Copyright 2018-2019 @paritytech/substrate-light-ui authors & contributors @@ -2511,7 +2743,7 @@ def build_detection_from_node( COMPANY: { +} #970 # Copyright © 1998-2009 Bill Spitzak (spitzak@users.sourceforge.net ) and others, - COMPANY: { ? +} #970.11 + COMPANY: { ? +} #970 # de Nemours and Company NAME: {? +} #980 @@ -2653,6 +2885,10 @@ def build_detection_from_node( # Copyright (c) 2013-2015 Streams Standard Reference Implementation Authors COPYRIGHT: {+ + } #1566 + # Nicolas Pitre, (c) 2002 Monta Vista Software Inc + # Cliff Brake, (c) 2001 + #COPYRIGHT: { } #1566.1 + # copyright: Copyright (c) Joe Joyce and contributors, 2016-2019. COPYRIGHT: {+ } #1579992 @@ -2664,9 +2900,16 @@ def build_detection_from_node( # Bart Hanssens from FedICT COPYRIGHT: {+ } #83005 + # Gracenote, Inc., copyright © 2000-2008 Gracenote. + # Gracenote Software, copyright © 2000-2008 Gracenote. + # COPYRIGHT: { {1,2} } #157999.12 + # Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. COPYRIGHT: {+ + *} #157999 + # Copyright (c) 2014 Czech Technical University in Prague + COPYRIGHT: { } #157999-name + COPYRIGHT: {+ + ?} #1590 # // (c) (C) → © @@ -2792,7 +3035,7 @@ def build_detection_from_node( COPYRIGHT: {+ ?} #22791 # Copyright 1996, 1997 Linux International. - COPYRIGHT: {+ } #22792 + COPYRIGHT: {+ } #22792 # Copyright (C) 2001-2008 the LGPL VGABios developers Team COPYRIGHT: { } #22793.1 @@ -2819,8 +3062,22 @@ def build_detection_from_node( # Copyright 2018 (c) DistributedLock COPYRIGHT: { } #230020 + # Copyright (C) 1999-2000 VA Linux Systems + COPYRIGHT: { } #2280-1 + + # Russ Dill 2001-2003 + # Rewrited by Vladimir Oleynik (C) 2003 + COPYRIGHT: { } #2280-2 + + # Copyright (C) 2018 + # Author: Jeff LaBundy + COPYRIGHT: { } #2280-3 + + COPYRIGHT2: {+ ? + *} #2280 + COPYRIGHT: { ? ? } #2280-4 + # using #2280 above: Copyright 2018 Developers of the Rand project COPYRIGHT: { } #2280.123 @@ -2895,6 +3152,9 @@ def build_detection_from_node( # maintainer Norbert Tretkowski 2005-04-16 AUTHOR: { ?} #26382 + # Russ Dill 2001-2003 + # COPYRIGHT: { } #2638 + # (C) 2001-2009, Takuo KITAME, Bart Martens, and Canonical, LTD COPYRIGHT: { } #26381 @@ -2934,13 +3194,14 @@ def build_detection_from_node( COPYRIGHT: { ? } #2007 # Copyright (C) 2005 SUSE Linux Products GmbH. - COPYRIGHT: { } #2008 + COPYRIGHT: { } #2008 # Copyright (c) 2016-2018 JSR 371 expert group and contributors - COPYRIGHT: { } #2009.1 + COPYRIGHT: { } #2009.1 # COPYRIGHT (c) 2006 - 2009 DIONYSOS - COPYRIGHT: { } #2009 + # Copyright 2003 ICT CAS + COPYRIGHT: { +} #2009 # Copyright (C) 2000 See Beyond Communications Corporation COPYRIGHT2: { } # 2010 @@ -2957,6 +3218,9 @@ def build_detection_from_node( #Copyright or Copr. CNRS NAME-CAPS: {+} #2530 + # (C) SGI 2006, Christoph Lameter + COPYRIGHT: { } #25501 + #Copyright or Copr. CNRS COPYRIGHT: { } #2560 COPYRIGHT: { } #2561 @@ -3063,7 +3327,7 @@ def build_detection_from_node( COPYRIGHT: { ?} #15720 # Copyright (c) 2008-1010 Intel Corporation - COPYRIGHT: { } #rare-cd-not-year + COPYRIGHT: { } #rare-cd-not-year # Copyright (C) 2005-2006 dann frazier COPYRIGHT: { } #999991 @@ -3086,6 +3350,9 @@ def build_detection_from_node( # copyrighted by the Open Source Vulnerability Database (http://osvdb.org) COPYRIGHT: { {3} } #83002.1 + # (C) by the respective authors, + : { } #83002.2 + # weird //opylefted by <-Harvie 2oo7 COPYRIGHT: { ?} #83003 @@ -3096,7 +3363,7 @@ def build_detection_from_node( COPYRIGHT: { } #83020 # copyright its authors - COPYRIGHT: { } #83030 + COPYRIGHT: { } #83030 # Copyright: 2004-2007 by Internet Systems Consortium, Inc. ("ISC") # 1995-2003 by Internet Software Consortium @@ -3112,7 +3379,7 @@ def build_detection_from_node( # the Initial Developer. All Rights Reserved. COPYRIGHT: { + ? } #2609.1 - # Portions created by the Initial Developer are Copyright (C) + # Portions created by the Initial Developer are Copyright (C) # the Initial Developer. All Rights Reserved. # and # Portions created by the Initial Developer are Copyright (C) 2002 @@ -3129,6 +3396,14 @@ def build_detection_from_node( # Gracenote Software, copyright © 2000-2008 Gracenote. COPYRIGHT: { {1,2} } #157999.12 + #Copyright (C) 2012-2016 by the following authors: + #- Wladimir J. van der Laan + + NAME-EMAIL: { } #157999.13 + NAME-EMAIL: { ?} #157999.14 + COPYRIGHT: { + } #157999.14 + + ####################################### # Copyright is held by .... ####################################### @@ -3154,6 +3429,9 @@ def build_detection_from_node( # @author anatol@google.com (Anatol Pomazau) AUTHOR: {+ ? * ? + ?} #2650 + # developed by the National Center for Supercomputing Applications at the University of Illinois at Urbana-Champaign + AUTHOR: {+ ? + ? + *} #2660 + AUTHOR: {+ ? + *} #2660 # developed by the Center for Information @@ -3179,7 +3457,7 @@ def build_detection_from_node( AUTHOR: { ? } #2761 # developed by the National Center for Supercomputing Applications at the University of Illinois at Urbana-Champaign - AUTHOR: { } #2762 + AUTHOR: { + } #2762 # created by Axel Metzger and Till Jaeger, Institut fur Rechtsfragen der Freien und Open Source Software AUTHOR: { } #2645-4 @@ -3212,7 +3490,7 @@ def build_detection_from_node( COPYRIGHT: { ? + *} #2800-1 COPYRIGHT: { } #2820 - COPYRIGHT: { } #2830 + # copyrighted by MIT COPYRIGHT: { } #2840 @@ -3237,11 +3515,11 @@ def build_detection_from_node( COPYRIGHT: {+} #99900 - COPYRIGHT: { + } #99999 + COPYRIGHT: { + } #99999 # * Copyright (C) 2004 Red Hat, Inc. # * Copyright (C) 200 Matthias Clasen - COPYRIGHT: { } #9999970 + COPYRIGHT: { } #9999970 # ', 'or', + 'taken', + 'from', ]) # these final holders are ignored. @@ -3973,19 +4263,6 @@ def strip_balanced_edge_parens(s): ################################################################################ -remove_non_chars = re.compile(r'[^a-z0-9]').sub - - -def prep_line(line): - """ - Return a tuple of (line, line with only chars) from a line of text prepared - for candidate and other checks or None. - """ - line = prepare_text_line(line.lower(), dedeb=False) - chars_only = remove_non_chars('', line) - return line, chars_only.strip() - - is_only_digit_and_punct = re.compile('^[^A-Za-z]+$').match @@ -3993,13 +4270,15 @@ def is_candidate(prepared_line): """ Return True if a prepared line is a candidate line for copyright detection """ + if TRACE: + logger_debug(f'is_candidate: prepared_line: {prepared_line!r}') + if not prepared_line: return False if is_only_digit_and_punct(prepared_line): if TRACE: - logger_debug( - f'is_candidate: is_only_digit_and_punct:\n{prepared_line!r}') + logger_debug(f'is_candidate: is_only_digit_and_punct:\n{prepared_line!r}') return False @@ -4007,7 +4286,7 @@ def is_candidate(prepared_line): return True else: pass - + prepared_line = prepared_line.lower() for marker in copyrights_hint.statement_markers: if marker in prepared_line: return True @@ -4035,12 +4314,14 @@ def is_end_of_statement(chars_only_line): ) +remove_non_chars = re.compile(r'[^a-z0-9]', re.IGNORECASE).sub + has_trailing_year = re.compile(r'(?:19\d\d|20[0-4]\d)+$').findall -def candidate_lines(numbered_lines): +def collect_candidate_lines(numbered_lines): """ - Yield groups of candidate line lists where each list element is a tuple of + Yield groups of prepared candidate line lists where each list element is a tuple of (line number, line text) given an iterable of ``numbered_lines`` as tuples of (line number, line text) . @@ -4056,60 +4337,41 @@ def candidate_lines(numbered_lines): if TRACE_TOK: numbered_lines = list(numbered_lines) - logger_debug(f'candidate_lines: numbered_lines: {numbered_lines!r}') + logger_debug(f'collect_candidate_lines: numbered_lines: {numbered_lines!r}') # the previous line (chars only) previous_chars = None - for numbered_line in numbered_lines: + for (ln, line) in numbered_lines: if TRACE: - logger_debug(f'# candidate_lines: evaluating line: {numbered_line!r}') + logger_debug(f'## collect_candidate_lines: evaluating line: {(ln, line)!r}') - _line_number, line = numbered_line + is_debian = 's>' in line + prepared = prepare_text_line(line) + if TRACE: + logger_debug(f'## collect_candidate_lines: prepared: {prepared!r}, candidate: {is_candidate(prepared)}') - # FIXME: we should get the prepared text from here and return - # effectively pre-preped lines... but the prep taking place here is - # different? - prepped, chars_only = prep_line(line) + chars_only = remove_non_chars('', line.lower()).strip() if is_end_of_statement(chars_only): - candidates_append(numbered_line) + candidates_append((ln, prepared,)) if TRACE: - cands = list(candidates) - logger_debug(f' candidate_lines: is EOS: yielding candidates\n {cands!r}\n') + logger_debug(f' collect_candidate_lines: is EOS: yielding candidates\n {list(candidates)!r}\n') yield list(candidates) candidates_clear() in_copyright = 0 previous_chars = None - elif is_candidate(prepped): - # the state is now "in copyright" - in_copyright = 2 - candidates_append(numbered_line) - - previous_chars = chars_only - if TRACE: - logger_debug(' candidate_lines: line is candidate') - - elif 's>' in line: - # this is for debian-style copyright name tags + # and are legacy debian-style copyright name tags in copyright files + # http are for copyrights listing many URLs + elif is_candidate(prepared) or 'http' in chars_only or is_debian: # the state is now "in copyright" in_copyright = 2 - candidates_append(numbered_line) - + candidates_append((ln, prepared,)) previous_chars = chars_only if TRACE: - logger_debug(' candidate_lines: line is candidate') - - elif 'http' in line: - # this is for copyright listing many URLs - in_copyright = 2 - candidates_append(numbered_line) - - previous_chars = chars_only - if TRACE: - logger_debug(' candidate_lines: line is HTTP candidate') + logger_debug(' collect_candidate_lines: line is candidate') elif in_copyright > 0: # these are a sign that the copyrights continue after @@ -4117,7 +4379,7 @@ def candidate_lines(numbered_lines): # see https://github.com/nexB/scancode-toolkit/issues/1565 # if these are no present we treat empty lines... as empty! if ( - (not chars_only) + not chars_only and ( not previous_chars.endswith(( 'copyright', @@ -4130,10 +4392,8 @@ def candidate_lines(numbered_lines): and not has_trailing_year(previous_chars) ): - # completely empty or only made of punctuations if TRACE: - cands = list(candidates) - logger_debug(f' candidate_lines: empty: yielding candidates\n {cands!r}\n') + logger_debug(f' collect_candidate_lines: empty: yielding candidates\n {list(candidates)!r}\n') yield list(candidates) candidates_clear() @@ -4141,16 +4401,15 @@ def candidate_lines(numbered_lines): previous_chars = None else: - candidates_append(numbered_line) + candidates_append((ln, prepared,)) # and decrement our state in_copyright -= 1 if TRACE: - logger_debug(' candidate_lines: line is in copyright') + logger_debug(' collect_candidate_lines: line is in copyright') elif candidates: if TRACE: - cands = list(candidates) - logger_debug(f' candidate_lines: not in COP: yielding candidates\n {cands!r}\n') + logger_debug(f' collect_candidate_lines: not in COP: yielding candidates\n {list(candidates)!r}\n') yield list(candidates) candidates_clear() @@ -4160,8 +4419,7 @@ def candidate_lines(numbered_lines): # finally if candidates: if TRACE: - cands = list(candidates) - logger_debug(f'candidate_lines: finally yielding candidates\n {cands!r}\n') + logger_debug(f'collect_candidate_lines: finally yielding candidates\n {list(candidates)!r}\n') yield list(candidates) @@ -4170,32 +4428,6 @@ def candidate_lines(numbered_lines): ################################################################################ -# this catches tags but not does not remove the text inside tags -remove_tags = re.compile( - r'<' - r'[(-\-)\?\!\%\/]?' - r'[a-gi-vx-zA-GI-VX-Z][a-zA-Z#\"\=\s\.\;\:\%\&?!,\+\*\-_\/]*' - r'[a-zA-Z0-9#\"\=\s\.\;\:\%\&?!,\+\*\-_\/]+' - r'\/?>', - re.MULTILINE | re.UNICODE -).sub - - -def strip_markup(text, dedeb=True): - """ - Strip markup tags from ``text``. - - If ``dedeb`` is True, remove "Debian" markup tags seen in - older copyright files. - """ - text = remove_tags(' ', text) - # Debian copyright file markup - if dedeb: - return text.replace('', '').replace('', '').replace('', '') - else: - return text - - # this catches the common C-style percent string formatting codes remove_printf_format_codes = re.compile(r' [\#\%][a-zA-Z] ').sub @@ -4207,23 +4439,36 @@ def strip_markup(text, dedeb=True): # less common rem comment line prefix in dos # less common dnl comment line prefix in autotools am/in -remove_comment_markers = re.compile(r'^(rem|\@rem|dnl)\s+').sub +remove_weird_comment_markers = re.compile(r'^(rem|\@rem|dnl)\s+').sub # common comment line prefix in man pages remove_man_comment_markers = re.compile(r'\."').sub -def prepare_text_line(line, dedeb=True, to_ascii=True): +def remove_code_comment_markers(s): """ - Prepare a text ``line`` for copyright detection. + Return ``s`` removing code comments such as C and C++ style comment markers and assimilated + + >>> remove_code_comment_markers(r"\\*#%; /\\/*a*/b/*c\\d#e%f \\*#%; /") + 'a b c\\\\d e f' + """ + return (s + .replace('/*', ' ') + .replace('*/', ' ') + .replace('*', ' ') + .replace('#', ' ') + .replace('%', ' ') + .strip(' \\/*#%;') + ) - If ``dedeb`` is True, remove "Debian" markup tags seen in - older copyright files. - If ``to_ascii`` convert the text to ASCII characters. +def prepare_text_line(line): + """ + Prepare a text ``line`` for copyright detection. + Always convert line to ASCII. """ if TRACE_TOK: - logger_debug(' prepare_text_line: initial: ' + repr(line)) + logger_debug(' prepare_text_line: initial: ' + repr(line)) # remove some junk in man pages: \(co line = (line @@ -4233,26 +4478,29 @@ def prepare_text_line(line, dedeb=True, to_ascii=True): ) line = remove_printf_format_codes(' ', line) if TRACE_TOK: - logger_debug(' prepare_text_line: after remove_printf_format_codes: ' + repr(line)) + logger_debug(' prepare_text_line: after remove_printf_format_codes: ' + repr(line)) # less common comment line prefixes - line = remove_comment_markers(' ', line) + line = remove_weird_comment_markers(' ', line) if TRACE_TOK: - logger_debug(' prepare_text_line: after remove_comment_markers: ' + repr(line)) + logger_debug(' prepare_text_line: after remove_weird_comment_markers: ' + repr(line)) line = remove_man_comment_markers(' ', line) + if TRACE_TOK: + logger_debug(' prepare_text_line: after remove_man_comment_markers: ' + repr(line)) + line = remove_code_comment_markers(line) if TRACE_TOK: - logger_debug(' prepare_text_line: after remove_man_comment_markers: ' + repr(line)) + logger_debug(' prepare_text_line: after remove_code_comment_markers: ' + repr(line)) line = (line # C and C++ style comment markers - .replace('/*', ' ').replace('*/', ' ') - .strip().strip('/*#') + # in rst + .replace('|copy|', ' (c) ') # un common pipe chars in some ascii art .replace('|', ' ') - # normalize copyright signs and spacing around them + # normalize copyright signs, quotes and spacing around them .replace('"Copyright', '" Copyright') .replace('( C)', ' (c) ') .replace('(C)', ' (c) ') @@ -4278,6 +4526,11 @@ def prepare_text_line(line, dedeb=True, to_ascii=True): .replace('\\XA9', ' (c) ') .replace('\\A9', ' (c) ') .replace('\\a9', ' (c) ') + .replace('', ' (c) ') + .replace('XA9;', ' (c) ') + .replace('Xa9;', ' (c) ') + .replace('xA9;', ' (c) ') + .replace('xa9;', ' (c) ') # \xc2 is a  .replace('\xc2', '') .replace('\\xc2', '') @@ -4303,25 +4556,35 @@ def prepare_text_line(line, dedeb=True, to_ascii=True): .replace('&', '&') .replace('&', '&') .replace('>', '>') + .replace('>', '>') .replace('>', '>') .replace('<', '<') + .replace('<', '<') .replace('<', '<') # normalize (possibly repeated) quotes to unique single quote ' # backticks ` and " .replace('`', "'") .replace('"', "'") - # u nicode prefix in Python strings + # u unicode prefix in legacy Python2 strings .replace(" u'", " '") # see https://github.com/nexB/scancode-toolkit/issues/3667 .replace('§', " ") + # keep http + .replace('', " ") + .replace('', " ") + .replace('', " ") + ) if TRACE_TOK: - logger_debug(' prepare_text_line: after replacements: ' + repr(line)) + logger_debug(' prepare_text_line: after replacements1: ' + repr(line)) # keep only one quote - line = fold_consecutive_quotes(u"'", line) + line = fold_consecutive_quotes("'", line) # treat some escaped literal CR, LF, tabs, \00 as new lines # such as in code literals: a="\\n some text" @@ -4337,11 +4600,21 @@ def prepare_text_line(line, dedeb=True, to_ascii=True): # replace (' .replace('("', ' ') # some trailing garbage ') - .replace(u"')", ' ') - .replace(u"],", ' ') + .replace("')", ' ') + .replace("],", ' ') ) + if TRACE_TOK: + logger_debug(' prepare_text_line: after replacements2: ' + repr(line)) + # note that we do not replace the debian tag by a space: we remove it - line = strip_markup(line, dedeb=dedeb) + # This "Debian" legacy copyright file markup tags seen in + # older copyright files. Note we replace by nothing. + line = line.replace("", "").replace("", "").replace("", "") + + line = strip_known_markup_from_text(line) + + if TRACE_TOK: + logger_debug(' prepare_text_line: after strip_markup: ' + repr(line)) line = remove_punctuation(' ', line) @@ -4356,17 +4629,15 @@ def prepare_text_line(line, dedeb=True, to_ascii=True): line = line.replace('>', '> ').replace('<', ' <') # normalize to ascii text - if to_ascii: - line = toascii(line, translit=True) + line = toascii(line, translit=True) + + # remove stars + line = line.strip(' *') # normalize to use only LF as line endings so we can split correctly # and keep line endings line = unixlinesep(line) - # strip verbatim back slash and comment signs again at both ends of a line - # FIXME: this is done at the start of this function already - line = line.strip('\\/*#%;') - # normalize spaces line = ' '.join(line.split()) diff --git a/src/cluecode/copyrights_hint.py b/src/cluecode/copyrights_hint.py index c928f12816d..958ee0f5e82 100644 --- a/src/cluecode/copyrights_hint.py +++ b/src/cluecode/copyrights_hint.py @@ -48,6 +48,8 @@ statement_markers = ( '©', '(c)', + # C sign in Restructured Text: + '|copy|', '©', '©', '169', @@ -69,6 +71,8 @@ '', '', 'by ', # note the trailing space + # common for emails + '@', ) ''' diff --git a/src/cluecode/linux_credits.py b/src/cluecode/linux_credits.py new file mode 100644 index 00000000000..247035ce460 --- /dev/null +++ b/src/cluecode/linux_credits.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +# +# Copyright (c) nexB Inc. and others. All rights reserved. +# ScanCode is a trademark of nexB Inc. +# SPDX-License-Identifier: Apache-2.0 +# See http://www.apache.org/licenses/LICENSE-2.0 for the license text. +# See https://github.com/aboutcode-org/scancode-toolkit for support or download. +# See https://aboutcode.org for more information about nexB OSS projects. +# + +import os +import sys + +from collections import deque + +from commoncode.fileutils import file_name + +""" +Detect and collect authors from a Linux-formatted CREDITS file. +This used by Linux, but also Raku, Phasar, u-boot, LLVM, Botan and other projects. +An enetry looks like this: + N: Jack Lloyd + E: lloyd@randombit.net + W: http://www.randombit.net/ + P: 3F69 2E64 6D92 3BBE E7AE 9258 5C0F 96E8 4EC1 6D6B + B: 1DwxWb2J4vuX4vjsbzaCXW696rZfeamahz + +We only consider the entries: N: name, E: email and W: web URL +""" +# Tracing flags +TRACE = False or os.environ.get('SCANCODE_DEBUG_CREDITS', False) + + +# Tracing flags +def logger_debug(*args): + pass + + +if TRACE: + import logging + + logger = logging.getLogger(__name__) + logging.basicConfig(stream=sys.stdout) + logger.setLevel(logging.DEBUG) + + def logger_debug(*args): + return logger.debug(' '.join(isinstance(a, str) and a or repr(a) for a in args)) + + +def is_credits_file(location): + """ + Return True if the file is likely to be a credits file + """ + credits_filenames = set([ + "credit", + "credits", + "credits.rst", + "credits.txt", + "credits.md", + "author", + "authors", + "authors.rst", + "authors.txt", + "authors.md", + ]) + + fn = file_name(location).lower() + return fn in credits_filenames + + +def detect_credits_authors(location): + """ + Yield AuthorDetection objects detected in the CREDITS file at ``location``. + """ + if not is_credits_file(location): + return + + from textcode.analysis import numbered_text_lines + + numbered_lines = list(numbered_text_lines(location, demarkup=False)) + yield from detect_credits_authors_from_lines(numbered_lines) + + +def detect_credits_authors_from_lines(numbered_lines): + """ + Yield AuthorDetection objects detected in the CREDITS file ``numbered_lines`` iterable of (line + number, line text). + """ + + if TRACE: + logger_debug('detect_credits_authors_from_lines: numbered_lines') + for nl in numbered_lines: + logger_debug(' numbered_line:', repr(nl)) + + from cluecode.copyrights import AuthorDetection + + for lines in get_credit_lines_groups(numbered_lines): + if TRACE: + logger_debug('detect_credits_authors_from_lines: credit_lines group:', lines) + + start_line, _ = lines[0] + end_line, _ = lines[-1] + names = [] + emails = [] + webs = [] + for _, line in lines: + ltype, _, line = line.partition(":") + line = line.strip() + if ltype == "N": + names.append(line) + elif ltype == "E": + emails.append(line) + elif ltype == "W": + webs.append(line) + + items = list(" ".join(item) for item in (names, emails, webs) if item) + if TRACE: + logger_debug('detect_credits_authors_from_lines: items:', items) + + author = " ".join(items) + if author: + yield AuthorDetection(author=author, start_line=start_line, end_line=end_line) + + +def get_credit_lines_groups(numbered_lines): + """ + Yield groups of contiguous credit lines as separated by one of more empty lines. + Only keep line of interest. + """ + lines_group = [] + lines_group_append = lines_group.append + lines_group_clear = lines_group.clear + + has_credits = False + for ln, line in numbered_lines: + line = line.strip() + + if not line and lines_group: + if TRACE: + logger_debug('get_credit_lines_groups: lines_group:', lines_group) + + yield list(lines_group) + lines_group_clear() + + if line.startswith(("N:", "E:", "W:")): + has_credits = True + lines_group_append((ln, line)) + + # bail out if there are no structured credits in the first 50 lines + if ln > 50 and not has_credits: + return + + if lines_group: + yield list(lines_group) diff --git a/src/cluecode/plugin_filter_clues.py b/src/cluecode/plugin_filter_clues.py index a00197fc6c8..a6ba2908468 100644 --- a/src/cluecode/plugin_filter_clues.py +++ b/src/cluecode/plugin_filter_clues.py @@ -164,7 +164,12 @@ def from_scan_data(data): for a in detected_authors ) - license_matches = list(chain.from_iterable(d['matches'] for d in data['license_detections'])) + license_matches = list( + chain.from_iterable( + d.get('matches', []) + for d in data.get('license_detections', {}) + ) + ) detections = Detections( copyrights=detected_copyrights, diff --git a/src/licensedcode/data/licenses/agpl-3.0-plus.LICENSE b/src/licensedcode/data/licenses/agpl-3.0-plus.LICENSE index 2367337d377..5d44cfb5794 100644 --- a/src/licensedcode/data/licenses/agpl-3.0-plus.LICENSE +++ b/src/licensedcode/data/licenses/agpl-3.0-plus.LICENSE @@ -24,7 +24,7 @@ other_urls: - https://www.gnu.org/licenses/agpl.txt minimum_coverage: 99 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/agpl-3.0.LICENSE b/src/licensedcode/data/licenses/agpl-3.0.LICENSE index bb46d545da1..eb70b15387b 100644 --- a/src/licensedcode/data/licenses/agpl-3.0.LICENSE +++ b/src/licensedcode/data/licenses/agpl-3.0.LICENSE @@ -24,7 +24,7 @@ other_urls: - https://opensource.org/licenses/AGPL-3.0 - https://www.gnu.org/licenses/agpl.txt ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/array-input-method-pl.LICENSE b/src/licensedcode/data/licenses/array-input-method-pl.LICENSE index 172297bdf93..b9d768e6101 100644 --- a/src/licensedcode/data/licenses/array-input-method-pl.LICENSE +++ b/src/licensedcode/data/licenses/array-input-method-pl.LICENSE @@ -11,8 +11,6 @@ ignorable_copyrights: - copyright holder of Array Input Method ignorable_holders: - Array Input Method -ignorable_authors: - - Array Input --- Array Input Method Public License @@ -80,4 +78,4 @@ or other liability obligations and/or rights consistent with this License. Howev obligations, licensee may act only on his own behalf and on his sole responsibility, not on behalf of anyone else, and only if the licensee agrees toindemnify, defend, and hold everyone else harmless for any liability incurred by, or claims asserted against, such everyone else by reason of licensee's -accepting any such warranty or additional liability. \ No newline at end of file +accepting any such warranty or additional liability. diff --git a/src/licensedcode/data/licenses/autoconf-exception-3.0.LICENSE b/src/licensedcode/data/licenses/autoconf-exception-3.0.LICENSE index 3318f87063a..adf2bcc5aa3 100644 --- a/src/licensedcode/data/licenses/autoconf-exception-3.0.LICENSE +++ b/src/licensedcode/data/licenses/autoconf-exception-3.0.LICENSE @@ -55,7 +55,7 @@ standard_notice: | that third-party software is unaffected by the copyleft requirements of the license of Autoconf. ignorable_copyrights: - - Copyright (c) 2009 Free Software Foundation, Inc. + - Copyright (c) 2009 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/cmigemo.LICENSE b/src/licensedcode/data/licenses/cmigemo.LICENSE index 30e35e8ea6a..a0d7152ab5f 100644 --- a/src/licensedcode/data/licenses/cmigemo.LICENSE +++ b/src/licensedcode/data/licenses/cmigemo.LICENSE @@ -12,6 +12,7 @@ other_urls: - http://fedoraproject.org/wiki/Licensing/CMigemo ignorable_authors: - MURAOKA Taro + - Translator Mamoru Tasaka ignorable_emails: - koron@tka.att.ne.jp - mtasaka@ioa.s.u-tokyo.ac.jp @@ -84,4 +85,4 @@ below. THE MAIN RULE ENDS HERE If you cannot agree with the conditions above, please -stop using this software. \ No newline at end of file +stop using this software. diff --git a/src/licensedcode/data/licenses/d-fsl-1.0-en.LICENSE b/src/licensedcode/data/licenses/d-fsl-1.0-en.LICENSE index 9df1395b83a..2202f886203 100644 --- a/src/licensedcode/data/licenses/d-fsl-1.0-en.LICENSE +++ b/src/licensedcode/data/licenses/d-fsl-1.0-en.LICENSE @@ -18,7 +18,7 @@ ignorable_copyrights: ignorable_holders: - Ministry of Science and Research, State of North-Rhine Westphalia ignorable_authors: - - Axel Metzger and Till Jaeger, Institut + - Axel Metzger and Till Jaeger, Institut fur Rechtsfragen der Freien ignorable_urls: - http://www.d-fsl.org/ - http://www.fsf.org/licenses/gpl @@ -462,4 +462,4 @@ This Program may be used by anyone in accordance with the terms of the German Free Software License -The License may be obtained under ." \ No newline at end of file +The License may be obtained under ." diff --git a/src/licensedcode/data/licenses/docbook-schema.LICENSE b/src/licensedcode/data/licenses/docbook-schema.LICENSE new file mode 100644 index 00000000000..998a5516700 --- /dev/null +++ b/src/licensedcode/data/licenses/docbook-schema.LICENSE @@ -0,0 +1,32 @@ +--- +key: docbook-schema +short_name: DocBook Schema License +name: DocBook Schema License +category: Permissive +owner: OASIS +spdx_license_key: DocBook-Schema +other_urls: + - https://github.com/docbook/xslt10-stylesheets/blob/efd62655c11cc8773708df7a843613fa1e932bf8/xsl/assembly/schema/docbook51b7.rnc +ignorable_urls: + - http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook + - http://www.oasis-open.org/docbook +ignorable_emails: + - docbook@lists.oasis-open.org +--- + +Permission to use, copy, modify and distribute the DocBook schema +and its accompanying documentation for any purpose and without fee +is hereby granted in perpetuity, provided that the above copyright +notice and this paragraph appear in all copies. The copyright +holders make no representation about the suitability of the schema +for any purpose. It is provided "as is" without expressed or implied +warranty. + +If you modify the DocBook schema in any way, label your schema as a +variant of DocBook. See the reference documentation +(http://docbook.org/tdg5/en/html/ch05.html#s-notdocbook) +for more information. + +Please direct all questions, bug reports, or suggestions for changes +to the docbook@lists.oasis-open.org mailing list. For more +information, see http://www.oasis-open.org/docbook/. \ No newline at end of file diff --git a/src/licensedcode/data/licenses/docbook.LICENSE b/src/licensedcode/data/licenses/docbook.LICENSE index f23df3af6d4..67466b3622a 100644 --- a/src/licensedcode/data/licenses/docbook.LICENSE +++ b/src/licensedcode/data/licenses/docbook.LICENSE @@ -6,8 +6,12 @@ category: Permissive owner: DocBook Project homepage_url: https://github.com/docbook/xslt10-stylesheets/blob/282955cda01b7ace132a734dca0a241cfd736d91/xsl/COPYING notes: this is an MIT/X11 style license with an extra advertizing clause -spdx_license_key: LicenseRef-scancode-docbook +spdx_license_key: DocBook-XML +other_spdx_license_keys: + - LicenseRef-scancode-docbook faq_url: https://web-beta.archive.org/web/20160118144348/http://wiki.docbook.org/DocBookLicense +other_urls: + - https://github.com/docbook/xslt10-stylesheets/blob/efd62655c11cc8773708df7a843613fa1e932bf8/xsl/COPYING#L27 minimum_coverage: 80 --- diff --git a/src/licensedcode/data/licenses/efsl-1.0.LICENSE b/src/licensedcode/data/licenses/efsl-1.0.LICENSE index e1fcfb001f7..33c184163a0 100644 --- a/src/licensedcode/data/licenses/efsl-1.0.LICENSE +++ b/src/licensedcode/data/licenses/efsl-1.0.LICENSE @@ -13,13 +13,11 @@ other_urls: - https://www.eclipse.org/legal/epl-2.0 - https://www.opensource.org/licenses/EPL-2.0 ignorable_copyrights: - - COPYRIGHT HOLDERS AND THE ECLIPSE FOUNDATION - Copyright (c) Eclipse Foundation - Copyright (c) Eclipse Foundation, Inc. ignorable_holders: - Eclipse Foundation - Eclipse Foundation, Inc. - - THE ECLIPSE FOUNDATION --- Eclipse Foundation Specification License - v1.0 @@ -73,4 +71,4 @@ DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF. The name and trademarks of the copyright holders or the Eclipse Foundation may NOT be used in advertising or publicity pertaining to this document or its contents without specific, written prior permission. Title to copyright in this -document will at all times remain with copyright holders. \ No newline at end of file +document will at all times remain with copyright holders. diff --git a/src/licensedcode/data/licenses/erlang-otp-linking-exception.LICENSE b/src/licensedcode/data/licenses/erlang-otp-linking-exception.LICENSE new file mode 100644 index 00000000000..e7c993ec27e --- /dev/null +++ b/src/licensedcode/data/licenses/erlang-otp-linking-exception.LICENSE @@ -0,0 +1,28 @@ +--- +key: erlang-otp-linking-exception +short_name: Erlang/OTP Linking Exception +name: Erlang/OTP Linking Exception +category: Copyleft Limited +owner: Erlang +is_exception: yes +spdx_license_key: erlang-otp-linking-exception +other_urls: + - https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs + - https://erlang.org/pipermail/erlang-questions/2012-May/066355.html + - https://gitea.osmocom.org/erlang/osmo_ss7/src/commit/2286c1b8738d715950026650bf53f19a69d6ed0e/src/ss7_links.erl#L20 +ignorable_urls: + - https://www.erlang.org/ + - https://www.erlang.org/EPLICENSE +--- + +If you modify this Program, or any covered work, by linking or +combining it with runtime libraries of Erlang/OTP as released by +Ericsson on https://www.erlang.org (or a modified version of these +libraries), containing parts covered by the terms of the Erlang Public +License (https://www.erlang.org/EPLICENSE), the licensors of this +Program grant you additional permission to convey the resulting work +without the need to license the runtime libraries of Erlang/OTP under +the GNU Affero General Public License. Corresponding Source for a +non-source form of such a combination shall include the source code +for the parts of the runtime libraries of Erlang/OTP used as well as +that of the covered work. \ No newline at end of file diff --git a/src/licensedcode/data/licenses/fcl-1.0-apache-2.0.LICENSE b/src/licensedcode/data/licenses/fcl-1.0-apache-2.0.LICENSE new file mode 100644 index 00000000000..d8552d0987f --- /dev/null +++ b/src/licensedcode/data/licenses/fcl-1.0-apache-2.0.LICENSE @@ -0,0 +1,134 @@ +--- +key: fcl-1.0-apache-2.0 +short_name: FCL-1.0-Apache-2.0 +name: Fair Core License, Version 1.0, Apache 2.0 Future License +category: Source-available +owner: keygen +homepage_url: https://github.com/keygen-sh/fcl.dev/blob/master/FCL-1.0-Apache-2.0.md +spdx_license_key: LicenseRef-scancode-fcl-1.0-apache-2.0 +other_urls: + - https://fcl.dev/ +ignorable_urls: + - http://www.apache.org/licenses/LICENSE-2.0 +--- + +# Fair Core License, Version 1.0, Apache 2.0 Future License + +## Abbreviation + +FCL-1.0-Apache-2.0 + +## Notice + +Copyright ${year} ${licensor name} + +## Terms and Conditions + +### Licensor ("We") + +The party offering the Software under these Terms and Conditions. + +### The Software + +The "Software" is each version of the software that we make available under +these Terms and Conditions, as indicated by our inclusion of these Terms and +Conditions with the Software. + +### License Grant + +Subject to your compliance with this License Grant and the Limitations, +Patents, Redistribution and Trademark clauses below, we hereby grant you the +right to use, copy, modify, create derivative works, publicly perform, publicly +display and redistribute the Software for any Permitted Purpose identified +below. + +### Permitted Purpose + +A Permitted Purpose is any purpose other than a Competing Use. A Competing Use +means making the Software available to others in a commercial product or +service that: + +1. substitutes for the Software; + +2. substitutes for any other product or service we offer using the Software + that exists as of the date we make the Software available; or + +3. offers the same or substantially similar functionality as the Software. + +Permitted Purposes specifically include using the Software: + +1. for your internal use and access; + +2. for non-commercial education; + +3. for non-commercial research; and + +4. in connection with professional services that you provide to a licensee + using the Software in accordance with these Terms and Conditions. + +### Limitations + +You must not move, change, disable, or circumvent the license key functionality +in the Software; or modify any portion of the Software protected by the license +key to: + +1. enable access to the protected functionality without a valid license key; or + +2. remove the protected functionality. + +### Patents + +To the extent your use for a Permitted Purpose would necessarily infringe our +patents, the license grant above includes a license under our patents. If you +make a claim against any party that the Software infringes or contributes to +the infringement of any patent, then your patent license to the Software ends +immediately. + +### Redistribution + +The Terms and Conditions apply to all copies, modifications and derivatives of +the Software. + +If you redistribute any copies, modifications or derivatives of the Software, +you must include a copy of or a link to these Terms and Conditions and not +remove any copyright or other proprietary notices provided in or with the +Software. + +### Disclaimer + +THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR +PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT. + +IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE +SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, +EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE. + +In the event the provision of this Disclaimer section is unenforceable under +applicable law, the licenses granted herein are void. + +### Trademarks + +Except for displaying the License Details and identifying us as the origin of +the Software, you have no right under these Terms and Conditions to use our +trademarks, trade names, service marks or product names. + +## Grant of Future License + +We hereby irrevocably grant you an additional license to use the Software, +under the Apache License, Version 2.0, that is effective on the second +anniversary of the date we make the Software available. On or after that date, +you may use the Software under the Apache License, Version 2.0, in which case +the following will apply: + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. \ No newline at end of file diff --git a/src/licensedcode/data/licenses/fcl-1.0-mit.LICENSE b/src/licensedcode/data/licenses/fcl-1.0-mit.LICENSE new file mode 100644 index 00000000000..290201ea29f --- /dev/null +++ b/src/licensedcode/data/licenses/fcl-1.0-mit.LICENSE @@ -0,0 +1,137 @@ +--- +key: fcl-1.0-mit +short_name: FCL-1.0-MIT +name: Fair Core License, Version 1.0, MIT Future License +category: Source-available +owner: keygen +homepage_url: https://github.com/keygen-sh/fcl.dev/blob/master/FCL-1.0-MIT.md +spdx_license_key: LicenseRef-scancode-fcl-1.0-mit +other_urls: + - https://fcl.dev/ +--- + +# Fair Core License, Version 1.0, MIT Future License + +## Abbreviation + +FCL-1.0-MIT + +## Notice + +Copyright ${year} ${licensor name} + +## Terms and Conditions + +### Licensor ("We") + +The party offering the Software under these Terms and Conditions. + +### The Software + +The "Software" is each version of the software that we make available under +these Terms and Conditions, as indicated by our inclusion of these Terms and +Conditions with the Software. + +### License Grant + +Subject to your compliance with this License Grant and the Limitations, +Patents, Redistribution and Trademark clauses below, we hereby grant you the +right to use, copy, modify, create derivative works, publicly perform, publicly +display and redistribute the Software for any Permitted Purpose identified +below. + +### Permitted Purpose + +A Permitted Purpose is any purpose other than a Competing Use. A Competing Use +means making the Software available to others in a commercial product or +service that: + +1. substitutes for the Software; + +2. substitutes for any other product or service we offer using the Software + that exists as of the date we make the Software available; or + +3. offers the same or substantially similar functionality as the Software. + +Permitted Purposes specifically include using the Software: + +1. for your internal use and access; + +2. for non-commercial education; + +3. for non-commercial research; and + +4. in connection with professional services that you provide to a licensee + using the Software in accordance with these Terms and Conditions. + +### Limitations + +You must not move, change, disable, or circumvent the license key functionality +in the Software; or modify any portion of the Software protected by the license +key to: + +1. enable access to the protected functionality without a valid license key; or + +2. remove the protected functionality. + +### Patents + +To the extent your use for a Permitted Purpose would necessarily infringe our +patents, the license grant above includes a license under our patents. If you +make a claim against any party that the Software infringes or contributes to +the infringement of any patent, then your patent license to the Software ends +immediately. + +### Redistribution + +The Terms and Conditions apply to all copies, modifications and derivatives of +the Software. + +If you redistribute any copies, modifications or derivatives of the Software, +you must include a copy of or a link to these Terms and Conditions and not +remove any copyright or other proprietary notices provided in or with the +Software. + +### Disclaimer + +THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR +PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT. + +IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE +SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, +EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE. + +In the event the provision of this Disclaimer section is unenforceable under +applicable law, the licenses granted herein are void. + +### Trademarks + +Except for displaying the License Details and identifying us as the origin of +the Software, you have no right under these Terms and Conditions to use our +trademarks, trade names, service marks or product names. + +## Grant of Future License + +We hereby irrevocably grant you an additional license to use the Software, +under the MIT license, that is effective on the second anniversary of the date +we make the Software available. On or after that date, you may use the Software +under the MIT license, in which case the following will apply: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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. 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. \ No newline at end of file diff --git a/src/licensedcode/data/licenses/first-epss-usage.LICENSE b/src/licensedcode/data/licenses/first-epss-usage.LICENSE index fee2f80bcba..511cce6c62c 100644 --- a/src/licensedcode/data/licenses/first-epss-usage.LICENSE +++ b/src/licensedcode/data/licenses/first-epss-usage.LICENSE @@ -7,11 +7,11 @@ owner: FIRST homepage_url: https://www.first.org/epss/#Usage-Agreement spdx_license_key: LicenseRef-scancode-first-epss-usage ignorable_authors: - - a volunteer group of researchers + - volunteer group of researchers ignorable_urls: - https://www.first.org/epss --- Usage Agreement -EPSS is an emerging standard developed by a volunteer group of researchers, practitioners, academics and government personnel. We grant the use of EPSS scores freely to the public, subject to the conditions below. We reserve the right to update the model and these webpages periodically, as necessary, though we will make every attempt to provide sufficient notice to users in the event of material changes. While membership in the EPSS SIG is not required to use or implement EPSS, however, we ask that if you are using EPSS, that you provide appropriate attribution where possible. EPSS can be cited either from this website (e.g. "See EPSS at https://www.first.org/epss), or as: Jay Jacobs, Sasha Romanosky, Benjamin Edwards, Michael Roytman, Idris Adjerid, (2021), Exploit Prediction Scoring System, Digital Threats Research and Practice, 2(3) \ No newline at end of file +EPSS is an emerging standard developed by a volunteer group of researchers, practitioners, academics and government personnel. We grant the use of EPSS scores freely to the public, subject to the conditions below. We reserve the right to update the model and these webpages periodically, as necessary, though we will make every attempt to provide sufficient notice to users in the event of material changes. While membership in the EPSS SIG is not required to use or implement EPSS, however, we ask that if you are using EPSS, that you provide appropriate attribution where possible. EPSS can be cited either from this website (e.g. "See EPSS at https://www.first.org/epss), or as: Jay Jacobs, Sasha Romanosky, Benjamin Edwards, Michael Roytman, Idris Adjerid, (2021), Exploit Prediction Scoring System, Digital Threats Research and Practice, 2(3) diff --git a/src/licensedcode/data/licenses/first-works-appreciative-1.2.LICENSE b/src/licensedcode/data/licenses/first-works-appreciative-1.2.LICENSE index 4b5f7742b57..70994ba146e 100644 --- a/src/licensedcode/data/licenses/first-works-appreciative-1.2.LICENSE +++ b/src/licensedcode/data/licenses/first-works-appreciative-1.2.LICENSE @@ -6,7 +6,7 @@ category: Proprietary Free owner: Jonathan Michael Davis spdx_license_key: LicenseRef-scancode-first-works-appreciative-1.2 ignorable_copyrights: - - Copyright (c) 2005 Jonathan Michael Davis + - Copyright (c) 2005 Jonathan Michael Davis ignorable_holders: - Jonathan Michael Davis ignorable_emails: @@ -137,4 +137,4 @@ License. whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use or distribution of the Original Work or the exercise of any rights granted hereunder, even if advised of - the possibility of such damages. \ No newline at end of file + the possibility of such damages. diff --git a/src/licensedcode/data/licenses/fsl-1.1-apache-2.0.LICENSE b/src/licensedcode/data/licenses/fsl-1.1-apache-2.0.LICENSE new file mode 100644 index 00000000000..8269a6dbac3 --- /dev/null +++ b/src/licensedcode/data/licenses/fsl-1.1-apache-2.0.LICENSE @@ -0,0 +1,119 @@ +--- +key: fsl-1.1-apache-2.0 +short_name: FSL-1.1-Apache-2.0 +name: Functional Source License, Version 1.1, Apache 2.0 Future License +category: Source-available +owner: Sentry +homepage_url: https://raw.githubusercontent.com/getsentry/fsl.software/main/FSL-1.1-Apache-2.0.template.md +spdx_license_key: LicenseRef-scancode-fsl-1.1-apache-2.0 +other_urls: + - https://fsl.software/ +ignorable_urls: + - http://www.apache.org/licenses/LICENSE-2.0 +--- + +# Functional Source License, Version 1.1, Apache 2.0 Future License + +## Abbreviation + +FSL-1.1-Apache-2.0 + +## Notice + +Copyright ${year} ${licensor name} + +## Terms and Conditions + +### Licensor ("We") + +The party offering the Software under these Terms and Conditions. + +### The Software + +The "Software" is each version of the software that we make available under +these Terms and Conditions, as indicated by our inclusion of these Terms and +Conditions with the Software. + +### License Grant + +Subject to your compliance with this License Grant and the Patents, +Redistribution and Trademark clauses below, we hereby grant you the right to +use, copy, modify, create derivative works, publicly perform, publicly display +and redistribute the Software for any Permitted Purpose identified below. + +### Permitted Purpose + +A Permitted Purpose is any purpose other than a Competing Use. A Competing Use +means making the Software available to others in a commercial product or +service that: + +1. substitutes for the Software; + +2. substitutes for any other product or service we offer using the Software + that exists as of the date we make the Software available; or + +3. offers the same or substantially similar functionality as the Software. + +Permitted Purposes specifically include using the Software: + +1. for your internal use and access; + +2. for non-commercial education; + +3. for non-commercial research; and + +4. in connection with professional services that you provide to a licensee + using the Software in accordance with these Terms and Conditions. + +### Patents + +To the extent your use for a Permitted Purpose would necessarily infringe our +patents, the license grant above includes a license under our patents. If you +make a claim against any party that the Software infringes or contributes to +the infringement of any patent, then your patent license to the Software ends +immediately. + +### Redistribution + +The Terms and Conditions apply to all copies, modifications and derivatives of +the Software. + +If you redistribute any copies, modifications or derivatives of the Software, +you must include a copy of or a link to these Terms and Conditions and not +remove any copyright notices provided in or with the Software. + +### Disclaimer + +THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR +PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT. + +IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE +SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, +EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE. + +### Trademarks + +Except for displaying the License Details and identifying us as the origin of +the Software, you have no right under these Terms and Conditions to use our +trademarks, trade names, service marks or product names. + +## Grant of Future License + +We hereby irrevocably grant you an additional license to use the Software under +the Apache License, Version 2.0 that is effective on the second anniversary of +the date we make the Software available. On or after that date, you may use the +Software under the Apache License, Version 2.0, in which case the following +will apply: + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. + +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. \ No newline at end of file diff --git a/src/licensedcode/data/licenses/fsl-1.1-mit.LICENSE b/src/licensedcode/data/licenses/fsl-1.1-mit.LICENSE new file mode 100644 index 00000000000..a9530ad03ab --- /dev/null +++ b/src/licensedcode/data/licenses/fsl-1.1-mit.LICENSE @@ -0,0 +1,122 @@ +--- +key: fsl-1.1-mit +short_name: FSL-1.1-MIT +name: Functional Source License, Version 1.1, MIT Future License +category: Source-available +owner: Sentry +homepage_url: https://github.com/getsentry/fsl.software/blob/main/FSL-1.1-MIT.template.md +spdx_license_key: LicenseRef-scancode-fsl-1.1-mit +other_urls: + - https://fsl.software/ +--- + +# Functional Source License, Version 1.1, MIT Future License + +## Abbreviation + +FSL-1.1-MIT + +## Notice + +Copyright ${year} ${licensor name} + +## Terms and Conditions + +### Licensor ("We") + +The party offering the Software under these Terms and Conditions. + +### The Software + +The "Software" is each version of the software that we make available under +these Terms and Conditions, as indicated by our inclusion of these Terms and +Conditions with the Software. + +### License Grant + +Subject to your compliance with this License Grant and the Patents, +Redistribution and Trademark clauses below, we hereby grant you the right to +use, copy, modify, create derivative works, publicly perform, publicly display +and redistribute the Software for any Permitted Purpose identified below. + +### Permitted Purpose + +A Permitted Purpose is any purpose other than a Competing Use. A Competing Use +means making the Software available to others in a commercial product or +service that: + +1. substitutes for the Software; + +2. substitutes for any other product or service we offer using the Software + that exists as of the date we make the Software available; or + +3. offers the same or substantially similar functionality as the Software. + +Permitted Purposes specifically include using the Software: + +1. for your internal use and access; + +2. for non-commercial education; + +3. for non-commercial research; and + +4. in connection with professional services that you provide to a licensee + using the Software in accordance with these Terms and Conditions. + +### Patents + +To the extent your use for a Permitted Purpose would necessarily infringe our +patents, the license grant above includes a license under our patents. If you +make a claim against any party that the Software infringes or contributes to +the infringement of any patent, then your patent license to the Software ends +immediately. + +### Redistribution + +The Terms and Conditions apply to all copies, modifications and derivatives of +the Software. + +If you redistribute any copies, modifications or derivatives of the Software, +you must include a copy of or a link to these Terms and Conditions and not +remove any copyright notices provided in or with the Software. + +### Disclaimer + +THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR +PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT. + +IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE +SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, +EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE. + +### Trademarks + +Except for displaying the License Details and identifying us as the origin of +the Software, you have no right under these Terms and Conditions to use our +trademarks, trade names, service marks or product names. + +## Grant of Future License + +We hereby irrevocably grant you an additional license to use the Software under +the MIT license that is effective on the second anniversary of the date we make +the Software available. On or after that date, you may use the Software under +the MIT license, in which case the following will apply: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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. 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. \ No newline at end of file diff --git a/src/licensedcode/data/licenses/gcc-exception-3.0.LICENSE b/src/licensedcode/data/licenses/gcc-exception-3.0.LICENSE index b6edeac5a04..6cdf58adb1e 100644 --- a/src/licensedcode/data/licenses/gcc-exception-3.0.LICENSE +++ b/src/licensedcode/data/licenses/gcc-exception-3.0.LICENSE @@ -16,7 +16,7 @@ other_urls: - https://github.com/earthcomputing/Netronome/blob/9f5132ecea3c134322305c9524da7189374881ec/nfp-sdk-6.0.1/NFP_SDK_EULA.txt minimum_coverage: 98 ignorable_copyrights: - - Copyright (c) 2009 Free Software Foundation, Inc. + - Copyright (c) 2009 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/gcc-exception-3.1.LICENSE b/src/licensedcode/data/licenses/gcc-exception-3.1.LICENSE index cb4d6b4f43d..ae44d2f9d45 100644 --- a/src/licensedcode/data/licenses/gcc-exception-3.1.LICENSE +++ b/src/licensedcode/data/licenses/gcc-exception-3.1.LICENSE @@ -79,7 +79,7 @@ standard_notice: | that third-party software is unaffected by the copyleft requirements of the license of GCC. ignorable_copyrights: - - Copyright (c) 2009 Free Software Foundation, Inc. + - Copyright (c) 2009 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/generic-amiwm.LICENSE b/src/licensedcode/data/licenses/generic-amiwm.LICENSE new file mode 100644 index 00000000000..4a42345385d --- /dev/null +++ b/src/licensedcode/data/licenses/generic-amiwm.LICENSE @@ -0,0 +1,47 @@ +--- +key: generic-amiwm +short_name: Generic-amiwm +name: Generic-amiwm +category: Proprietary Free +owner: Marcus Comstedt +homepage_url: https://metadata.ftp-master.debian.org/changelogs//non-free/a/amiwm/amiwm_0.22pl2-3_copyright +spdx_license_key: LicenseRef-scancode-generic-amiwm +--- + +License: Generic-amiwm + Generic amiwm License + ===================== + . + This license applies to whomever receives this file. It is a generic + license to use and distribute amiwm. If you want to acquire the software + under a different license, please contact the author. This license is + in part based on the XV license by John Bradley. + . + Permission to copy and distribute amiwm in its entirety, for + non-commercial purposes, is hereby granted without fee, provided + that this license information and copyright notice appear in all copies. + . + If you redistribute amiwm, the *entire* contents of this distribution + must be distributed, including the README, INSTALL and LICENSE files, + the sources, and the various scripts and Makefiles. + . + You may distribute binaries built from the unmodified amiwm sources, for + non-commercial purposes, provided that the entire amiwm source distribution + is also included, as per the preceding paragraph. + . + You may distribute amiwm as a component of an aggregate software + distribution, provided that no other condition of this license is violated. + In particular, the entire amiwm distribution must be included in the + aggregate software distribution. + . + Unrestricted use of the software is also hereby granted without fee. + Distribution and modification of source or binaries are not considered use + and explicitly covered by other paragraphs of this license. + . + The software may be modified for your own purposes, but modified versions + may not be distributed without prior consent of the author. You may + freely distribute patches against the unmodified source code. + . + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. \ No newline at end of file diff --git a/src/licensedcode/data/licenses/gfdl-1.3-invariants-only.LICENSE b/src/licensedcode/data/licenses/gfdl-1.3-invariants-only.LICENSE index 0f96f633cf9..69758ceb27c 100644 --- a/src/licensedcode/data/licenses/gfdl-1.3-invariants-only.LICENSE +++ b/src/licensedcode/data/licenses/gfdl-1.3-invariants-only.LICENSE @@ -20,7 +20,7 @@ standard_notice: | Texts being LIST . A copy of the license is included in the section entitled "GNU Free Documentation License". ignorable_copyrights: - - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/gfdl-1.3-invariants-or-later.LICENSE b/src/licensedcode/data/licenses/gfdl-1.3-invariants-or-later.LICENSE index 93d78d762d6..75cf7086adc 100644 --- a/src/licensedcode/data/licenses/gfdl-1.3-invariants-or-later.LICENSE +++ b/src/licensedcode/data/licenses/gfdl-1.3-invariants-or-later.LICENSE @@ -21,7 +21,7 @@ standard_notice: | copy of the license is included in the section entitled "GNU Free Documentation License". ignorable_copyrights: - - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/gfdl-1.3-no-invariants-only.LICENSE b/src/licensedcode/data/licenses/gfdl-1.3-no-invariants-only.LICENSE index b05e73058d5..36966f7ec6a 100644 --- a/src/licensedcode/data/licenses/gfdl-1.3-no-invariants-only.LICENSE +++ b/src/licensedcode/data/licenses/gfdl-1.3-no-invariants-only.LICENSE @@ -19,7 +19,7 @@ standard_notice: | no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". ignorable_copyrights: - - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/gfdl-1.3-no-invariants-or-later.LICENSE b/src/licensedcode/data/licenses/gfdl-1.3-no-invariants-or-later.LICENSE index c7e7df2222f..4be1c5f3e90 100644 --- a/src/licensedcode/data/licenses/gfdl-1.3-no-invariants-or-later.LICENSE +++ b/src/licensedcode/data/licenses/gfdl-1.3-no-invariants-or-later.LICENSE @@ -20,7 +20,7 @@ standard_notice: | Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". ignorable_copyrights: - - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/gfdl-1.3-plus.LICENSE b/src/licensedcode/data/licenses/gfdl-1.3-plus.LICENSE index 94ba3709368..cbd34028600 100644 --- a/src/licensedcode/data/licenses/gfdl-1.3-plus.LICENSE +++ b/src/licensedcode/data/licenses/gfdl-1.3-plus.LICENSE @@ -15,7 +15,7 @@ other_urls: - https://www.gnu.org/licenses/fdl-1.3.txt minimum_coverage: 99 ignorable_copyrights: - - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/gfdl-1.3.LICENSE b/src/licensedcode/data/licenses/gfdl-1.3.LICENSE index d9a5a9aebbc..bccc655d127 100644 --- a/src/licensedcode/data/licenses/gfdl-1.3.LICENSE +++ b/src/licensedcode/data/licenses/gfdl-1.3.LICENSE @@ -14,7 +14,7 @@ text_urls: other_urls: - https://www.gnu.org/licenses/fdl-1.3.txt ignorable_copyrights: - - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/gpl-3.0-plus.LICENSE b/src/licensedcode/data/licenses/gpl-3.0-plus.LICENSE index d85ed0536cc..de474f12f8c 100644 --- a/src/licensedcode/data/licenses/gpl-3.0-plus.LICENSE +++ b/src/licensedcode/data/licenses/gpl-3.0-plus.LICENSE @@ -20,7 +20,7 @@ other_urls: - https://www.gnu.org/licenses/gpl-3.0-standalone.html minimum_coverage: 99 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/gpl-3.0.LICENSE b/src/licensedcode/data/licenses/gpl-3.0.LICENSE index fa5254dbcf5..534ad858a6e 100644 --- a/src/licensedcode/data/licenses/gpl-3.0.LICENSE +++ b/src/licensedcode/data/licenses/gpl-3.0.LICENSE @@ -24,7 +24,7 @@ other_urls: - https://opensource.org/licenses/GPL-3.0 - https://www.gnu.org/licenses/gpl-3.0-standalone.html ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/gtpl-v1.LICENSE b/src/licensedcode/data/licenses/gtpl-v1.LICENSE index 0ed3e33627a..872871482ff 100644 --- a/src/licensedcode/data/licenses/gtpl-v1.LICENSE +++ b/src/licensedcode/data/licenses/gtpl-v1.LICENSE @@ -10,9 +10,6 @@ ignorable_copyrights: - Copyright (c) 1999 University of Chicago and The University of Southern California ignorable_holders: - University of Chicago and The University of Southern California -ignorable_authors: - - and/or derived from the Globus Project (http://www.globus.org/) - - and/or derived from the Globus project (http://www.globus.org/) ignorable_urls: - http://www.globus.org/ --- @@ -140,4 +137,4 @@ Southern California. All Rights Reserved. RESULTING FROM EXERCISE OF THIS LICENSE AGREEMENT OR THE USE OF THE SOFTWARE. - END OF LICENSE \ No newline at end of file + END OF LICENSE diff --git a/src/licensedcode/data/licenses/hidapi.LICENSE b/src/licensedcode/data/licenses/hidapi.LICENSE index 0026b536a4b..502ff1633fd 100644 --- a/src/licensedcode/data/licenses/hidapi.LICENSE +++ b/src/licensedcode/data/licenses/hidapi.LICENSE @@ -5,7 +5,11 @@ name: HIDAPI License category: Permissive owner: Signal 11 Software homepage_url: https://github.com/signal11/hidapi/blob/master/LICENSE-orig.txt -spdx_license_key: LicenseRef-scancode-hidapi +spdx_license_key: HIDAPI +other_spdx_license_keys: + - LicenseRef-scancode-hidapi +other_urls: + - https://github.com/signal11/hidapi/blob/master/LICENSE-orig.txt --- This software may be used by anyone for any reason so long as the copyright diff --git a/src/licensedcode/data/licenses/hpnd-netrek.LICENSE b/src/licensedcode/data/licenses/hpnd-netrek.LICENSE new file mode 100644 index 00000000000..c13cd7f8c0b --- /dev/null +++ b/src/licensedcode/data/licenses/hpnd-netrek.LICENSE @@ -0,0 +1,17 @@ +--- +key: hpnd-netrek +short_name: HPND Netrek variant +name: Historical Permission Notice and Disclaimer Netrek variant +category: Permissive +owner: S. M. Patel +spdx_license_key: HPND-Netrek +--- + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting +documentation. No representations are made about the +suitability of this software for any purpose. It is +provided "as is" without express or implied warranty. \ No newline at end of file diff --git a/src/licensedcode/data/licenses/ietf-trust.LICENSE b/src/licensedcode/data/licenses/ietf-trust.LICENSE index 10cd3f0a2e7..bb2f8465e73 100644 --- a/src/licensedcode/data/licenses/ietf-trust.LICENSE +++ b/src/licensedcode/data/licenses/ietf-trust.LICENSE @@ -21,7 +21,6 @@ ignorable_holders: - IETF Trust - IETF Trust and the persons identified as the document authors ignorable_authors: - - IETF Trust - the IETF Trust ignorable_urls: - http://opensource.org/licenses/bsd-license.php @@ -328,4 +327,4 @@ licensing administrator for the IRTF Document Stream and that these Legal Provis applied to documents submitted and published in the IRTF Document Stream following December 28, 2009. Section 4 of these Legal Provisions shall not apply to documents in the IRTF Document Stream, and all references to Section 4 hereof shall be disregarded with respect -to documents in the IRTF Document Stream. \ No newline at end of file +to documents in the IRTF Document Stream. diff --git a/src/licensedcode/data/licenses/jdom.LICENSE b/src/licensedcode/data/licenses/jdom.LICENSE index eea900a72a3..8b088b926b1 100644 --- a/src/licensedcode/data/licenses/jdom.LICENSE +++ b/src/licensedcode/data/licenses/jdom.LICENSE @@ -9,11 +9,11 @@ notes: this based on an Apache 1.1 license spdx_license_key: LicenseRef-scancode-jdom faq_url: http://www.jdom.org/docs/faq.html#a0030 ignorable_authors: - - Jason Hunter and Brett McLaughlin - - the JDOM Project (http://www.jdom.org/) + - Jason Hunter and Brett McLaughlin + - the JDOM Project (http://www.jdom.org/) ignorable_urls: - - http://www.jdom.org/ - - http://www.jdom.org/images/logos + - http://www.jdom.org/ + - http://www.jdom.org/images/logos --- Redistribution and use in source and binary forms, with or without @@ -61,4 +61,4 @@ This software consists of voluntary contributions made by many individuals on behalf of the JDOM Project and was originally created by Jason Hunter and Brett McLaughlin . For more information -on the JDOM Project, please see . \ No newline at end of file +on the JDOM Project, please see . diff --git a/src/licensedcode/data/licenses/ko-man-page.LICENSE b/src/licensedcode/data/licenses/ko-man-page.LICENSE index c6c3d7d7a03..a4d721d0293 100644 --- a/src/licensedcode/data/licenses/ko-man-page.LICENSE +++ b/src/licensedcode/data/licenses/ko-man-page.LICENSE @@ -6,10 +6,6 @@ category: Permissive owner: Korean Manpage Project homepage_url: https://git.centos.org/rpms/man-pages-ko/blob/c7/f/SOURCES/Man_Page_Copyright spdx_license_key: LicenseRef-scancode-ko-man-page -ignorable_copyrights: - - Copyright Man Page -ignorable_holders: - - Man Page --- Translated Copyright Man Page @@ -26,4 +22,4 @@ The copyrights of all translated manpages in the Korean Manpage Project are inhe Exception -It is possible the documents on this site may contain false information due to a technical error or mistranslation. However, Korean Manpage Project does not guarantee anything even in this case. If there is false information, please let administrator know or report the error to the appropriate place on the homepage. The documents of this site are subject to change, delete, or move without notice due to error correction of the documents. \ No newline at end of file +It is possible the documents on this site may contain false information due to a technical error or mistranslation. However, Korean Manpage Project does not guarantee anything even in this case. If there is false information, please let administrator know or report the error to the appropriate place on the homepage. The documents of this site are subject to change, delete, or move without notice due to error correction of the documents. diff --git a/src/licensedcode/data/licenses/ldpl-2.0.LICENSE b/src/licensedcode/data/licenses/ldpl-2.0.LICENSE index 7c17b285323..306851cddae 100644 --- a/src/licensedcode/data/licenses/ldpl-2.0.LICENSE +++ b/src/licensedcode/data/licenses/ldpl-2.0.LICENSE @@ -8,12 +8,8 @@ homepage_url: http://tldp.org/COPYRIGHT.html spdx_license_key: LicenseRef-scancode-ldpl-2.0 text_urls: - http://linuxmafia.com/faq/Licensing_and_Law/ldp-license-2.0.html -ignorable_copyrights: - - copyright to each Linux Documentation Project ignorable_emails: - guylhem@metalab.unc.edu -ignorable_holders: - - each Linux Documentation Project ignorable_urls: - http://sunsite.unc.edu/LDP --- diff --git a/src/licensedcode/data/licenses/lgpl-3.0-plus.LICENSE b/src/licensedcode/data/licenses/lgpl-3.0-plus.LICENSE index 47e29307f03..9dbf65d2e56 100644 --- a/src/licensedcode/data/licenses/lgpl-3.0-plus.LICENSE +++ b/src/licensedcode/data/licenses/lgpl-3.0-plus.LICENSE @@ -21,7 +21,7 @@ other_urls: - https://www.gnu.org/licenses/lgpl-3.0-standalone.html minimum_coverage: 99 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/lgpl-3.0.LICENSE b/src/licensedcode/data/licenses/lgpl-3.0.LICENSE index 6f998a2284b..59a43ea43a5 100644 --- a/src/licensedcode/data/licenses/lgpl-3.0.LICENSE +++ b/src/licensedcode/data/licenses/lgpl-3.0.LICENSE @@ -24,7 +24,7 @@ other_urls: - https://www.gnu.org/licenses/lgpl+gpl-3.0.txt - https://www.gnu.org/licenses/lgpl-3.0-standalone.html ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/licenses/linking-exception-agpl-3.0.LICENSE b/src/licensedcode/data/licenses/linking-exception-agpl-3.0.LICENSE index 1ba52c4a07e..799a12d42a9 100644 --- a/src/licensedcode/data/licenses/linking-exception-agpl-3.0.LICENSE +++ b/src/licensedcode/data/licenses/linking-exception-agpl-3.0.LICENSE @@ -6,7 +6,16 @@ category: Copyleft Limited owner: Unspecified homepage_url: http://mo.morsi.org/blog/2009/08/13/lesser_affero_gplv3/ is_exception: yes -spdx_license_key: LicenseRef-scancode-linking-exception-agpl-3.0 +spdx_license_key: romic-exception +other_spdx_license_keys: + - LicenseRef-scancode-linking-exception-agpl-3.0 +other_urls: + - https://github.com/zenbones/SmallMind/blob/3c62b5995fe7f27c453f140ff9b60560a0893f2a/COPYRIGHT#L25-L30 + - https://github.com/savearray2/py.js/blob/b781273c08c8afa89f4954de4ecf42ec01429bae/README.md#license + - https://github.com/CubeArtisan/cubeartisan/blob/2c6ab53455237b88a3ea07be02a838a135c4ab79/LICENSE.LESSER#L10-L15 + - https://web.archive.org/web/20210124015834/http://mo.morsi.org/blog/2009/08/13/lesser_affero_gplv3/ + - https://sourceforge.net/p/romic/code/ci/3ab2856180cf0d8b007609af53154cf092efc58f/tree/COPYING + - https://github.com/moll/node-mitm/blob/bbf24b8bd7596dc6e091e625363161ce91984fc7/LICENSE#L8-L11 --- Additional permission under the GNU Affero GPL version 3 section 7: diff --git a/src/licensedcode/data/licenses/llama-3.1-license-2024.LICENSE b/src/licensedcode/data/licenses/llama-3.1-license-2024.LICENSE new file mode 100644 index 00000000000..b8c695b1893 --- /dev/null +++ b/src/licensedcode/data/licenses/llama-3.1-license-2024.LICENSE @@ -0,0 +1,70 @@ +--- +key: llama-3.1-license-2024 +short_name: Llama 3.1 Community License Agreement 2024 +name: Llama 3.1 Community License Agreement 2024 +category: Proprietary Free +owner: Facebook +homepage_url: https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE +spdx_license_key: LicenseRef-scancode-llama-3.1-license-2024 +text_urls: + - https://raw.githubusercontent.com/meta-llama/llama-models/main/models/llama3_1/LICENSE +other_urls: + - https://github.com/meta-llama/llama-models +ignorable_copyrights: + - Copyright (c) Meta Platforms, Inc. +ignorable_holders: + - Meta Platforms, Inc. +ignorable_urls: + - https://about.meta.com/brand/resources/meta/company-brand + - https://llama.meta.com/doc/overview + - https://llama.meta.com/llama-downloads + - https://llama.meta.com/llama3_1/use-policy +--- + +LLAMA 3.1 COMMUNITY LICENSE AGREEMENT + Llama 3.1 Version Release Date: July 23, 2024 + +“Agreement” means the terms and conditions for use, reproduction, distribution and modification of the Llama Materials set forth herein. + +“Documentation” means the specifications, manuals and documentation accompanying Llama 3.1 distributed by Meta at https://llama.meta.com/doc/overview. + +“Licensee” or “you” means you, or your employer or any other person or entity (if you are entering into this Agreement on such person or entity’s behalf), of the age required under applicable laws, rules or regulations to provide legal consent and that has legal authority to bind your employer or such other person or entity if you are entering in this Agreement on their behalf. + +“Llama 3.1” means the foundational large language models and software and algorithms, including machine-learning model code, trained model weights, inference-enabling code, training-enabling code, fine-tuning enabling code and other elements of the foregoing distributed by Meta at https://llama.meta.com/llama-downloads. + +“Llama Materials” means, collectively, Meta’s proprietary Llama 3.1 and Documentation (and any portion thereof) made available under this Agreement. + +“Meta” or “we” means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your principal place of business is in the EEA or Switzerland) and Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland). + +By clicking “I Accept” below or by using or distributing any portion or element of the Llama Materials, you agree to be bound by this Agreement. + +1. License Rights and Redistribution. + a. Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Meta’s intellectual property or other rights owned by Meta embodied in the Llama Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the Llama Materials. + + b. Redistribution and Use. + + i. If you distribute or make available the Llama Materials (or any derivative works thereof), or a product or service (including another AI model) that contains any of them, you shall (A) provide a copy of this Agreement with any such Llama Materials; and (B) prominently display “Built with Llama” on a related website, user interface, blogpost, about page, or product documentation. If you use the Llama Materials or any outputs or results of the Llama Materials to create, train, fine tune, or otherwise improve an AI model, which is distributed or made available, you shall also include “Llama” at the beginning of any such AI model name. + + ii. If you receive Llama Materials, or any derivative works thereof, from a Licensee as part of an integrated end user product, then Section 2 of this Agreement will not apply to you. + + iii. You must retain in all copies of the Llama Materials that you distribute the following attribution notice within a “Notice” text file distributed as a part of such copies: “Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.” + + iv. Your use of the Llama Materials must comply with applicable laws and regulations (including trade compliance laws and regulations) and adhere to the Acceptable Use Policy for the Llama Materials (available at https://llama.meta.com/llama3_1/use-policy), which is hereby incorporated by reference into this Agreement. + +2. Additional Commercial Terms. If, on the Llama 3.1 version release date, the monthly active users of the products or services made available by or for Licensee, or Licensee’s affiliates, is greater than 700 million monthly active users in the preceding calendar month, you must request a license from Meta, which Meta may grant to you in its sole discretion, and you are not authorized to exercise any of the rights under this Agreement unless or until Meta otherwise expressly grants you such rights. + +3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE LLAMA MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE LLAMA MATERIALS AND ANY OUTPUT AND RESULTS. + +4. Limitation of Liability. IN NO EVENT WILL META OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING. + +5. Intellectual Property. + + a. No trademark licenses are granted under this Agreement, and in connection with the Llama Materials, neither Meta nor Licensee may use any name or mark owned by or associated with the other or any of its affiliates, except as required for reasonable and customary use in describing and redistributing the Llama Materials or as set forth in this Section 5(a). Meta hereby grants you a license to use “Llama” (the “Mark”) solely as required to comply with the last sentence of Section 1.b.i. You will comply with Meta’s brand guidelines (currently accessible at https://about.meta.com/brand/resources/meta/company-brand/). All goodwill arising out of your use of the Mark will inure to the benefit of Meta. + + b. Subject to Meta’s ownership of Llama Materials and derivatives made by or for Meta, with respect to any derivative works and modifications of the Llama Materials that are made by you, as between you and Meta, you are and will be the owner of such derivative works and modifications. + + c. If you institute litigation or other proceedings against Meta or any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Llama Materials or Llama 3.1 outputs or results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other rights owned or licensable by you, then any licenses granted to you under this Agreement shall terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold harmless Meta from and against any claim by any third party arising out of or related to your use or distribution of the Llama Materials. + +6. Term and Termination. The term of this Agreement will commence upon your acceptance of this Agreement or access to the Llama Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein. Meta may terminate this Agreement if you are in breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete and cease use of the Llama Materials. Sections 3, 4 and 7 shall survive the termination of this Agreement. + +7. Governing Law and Jurisdiction. This Agreement will be governed and construed under the laws of the State of California without regard to choice of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement. The courts of California shall have exclusive jurisdiction of any dispute arising out of this Agreement. \ No newline at end of file diff --git a/src/licensedcode/data/licenses/lucent-pl-1.0.LICENSE b/src/licensedcode/data/licenses/lucent-pl-1.0.LICENSE index aeead720453..1526fb86d31 100644 --- a/src/licensedcode/data/licenses/lucent-pl-1.0.LICENSE +++ b/src/licensedcode/data/licenses/lucent-pl-1.0.LICENSE @@ -13,6 +13,10 @@ osi_url: http://www.opensource.org/licenses/plan9.php other_urls: - http://opensource.org/licenses/LPL-1.0 - https://opensource.org/licenses/LPL-1.0 +ignorable_copyrights: + - Copyright (c), and others +ignorable_holders: + - others --- Lucent Public License Version 1.0 @@ -231,4 +235,4 @@ This Agreement is governed by the laws of the State of and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in -any resulting litigation. \ No newline at end of file +any resulting litigation. diff --git a/src/licensedcode/data/licenses/max-mojo-community-20240828.LICENSE b/src/licensedcode/data/licenses/max-mojo-community-20240828.LICENSE new file mode 100644 index 00000000000..fea2ff92f7e --- /dev/null +++ b/src/licensedcode/data/licenses/max-mojo-community-20240828.LICENSE @@ -0,0 +1,93 @@ +--- +key: max-mojo-community-20240828 +short_name: MAX & Mojo Community License 20240828 +name: MAX & Mojo Community License 20240828 +category: Proprietary Free +owner: Modular +homepage_url: https://www.modular.com/legal/max-mojo-license +spdx_license_key: LicenseRef-scancode-max-mojo-community-20240828 +faq_url: https://www.modular.com/pricing +ignorable_urls: + - https://docs.modular.com/ + - https://www.modular.com/legal/privacy + - https://www.modular.com/pricing +--- + +MAX & Mojo Community License + +Last Modified: August 28th, 2024 + +These MAX Community License Terms (these "Terms") are entered into by and between Modular, Inc. ("Modular") and the individual or entity agreeing to these terms ("Licensee"), and form part of Modular’s Terms of Use. Capitalized terms used herein but not otherwise defined have the meanings set forth in the Terms of Use. By clicking the "Agree" button or by downloading, installing, copying, or otherwise using any software development kits made available by Modular as part of the Max Platform (each, the "SDK"), or otherwise developing software using Modular’s Mojo programming language, Licensee agrees to be bound by these Terms. If Licensee does not agree to these Terms, Licensee should not proceed with the download, installation, or use of the applicable SDK. If Licensee is an individual downloading the SDK on behalf of an entity or organization, Licensee represents and warrants that it has the requisite authority to bind that entity (and any applicable Affiliates) to these Terms. + +1. SDK AND DOCUMENTATION LICENSE GRANT + +Subject to Licensee’s compliance with these Terms, Modular hereby grants Licensee a non-exclusive, non-transferable license to use the SDK and accompanying Documentation (as defined below), as made available at https://docs.modular.com, solely for use in developed software applications ("Applications") that meet the Usage and Distribution Requirements specified in this Agreement. This license does not grant Licensee the right to distribute the SDK or any part thereof to third parties, except as expressly stated otherwise herein. For the avoidance of doubt, Licensee may under no circumstances redistribute the SDK itself outside of any Applications. Nothing herein shall be construed as a grant of a license or any other rights with respect to Modular’s trademarks, logos, or other branding for Mojo or any other Modular offerings (collectively, the “Marks”). Licensee shall seek prior written consent for the use of the Marks in connection with its use of the SDK, and agrees and acknowledges that Modular is under no obligation to grant any such requests. + +2. MAX RESTRICTIONS AND USAGE + +Licensee shall not: + +(a) modify, adapt, translate, reverse engineer, decompile, or disassemble the SDK or any part thereof, or otherwise attempt to derive or gain access to SDK source code; +(b) remove, alter, or obscure any proprietary notices, labels, or marks from the SDK; +(c) use the SDK in an Application or standalone, or otherwise develop an Application in Mojo, for any Competitive Activity; or +(d) use the SDK in any manner that violates any applicable laws, the Distribution Requirements, regulations, third-party rights, or other Modular terms or agreements by which Licensee is bound. + +Licensee acknowledges and understands that its use of the SDK may be subject to the collection of certain telemetry, usage, and other data which captures Licensee’s interactions with and use of the SDK (collectively, the “Usage Data”). + +“Competitive Activity” means making commercially, publicly available software-as-a-service, platform-as-a-service, infrastructure-as-a-service, support services, or similar online or offline managed, cloud services for the primary purposes of providing artificial intelligence platform infrastructure to third parties without explicit written permission. For clarity, artificial intelligence platform infrastructure encapsulates: + +(i) data processing, transformation, and querying services for artificial intelligence, +(ii) artificial intelligence training or artificial intelligence inference services, +(iii) hosting and/or compute services for the above, and +(iv) data center services and/or similarly situated services offering MAX in connection with a broader service offering to third parties. + +For the avoidance of doubt, this provision will not apply “ex-post-facto” (“after the fact”) to any software you develop that is not competitive at the time you develop it, but later on becomes competitive to Modular based on Modular’s new product offerings or pivots resulting in an expanded definition of Competitive Activity. Development of any internal or personal use-only software is not a Competitive Activity. Please see our pricing page (https://www.modular.com/pricing) for more information and examples on Competitive Activities. + +3. REDISTRIBUTABLE COMPONENTS & LIMITATIONS + +Modular hereby grants Licensee the limited right to redistribute certain components of the SDK as part of Licensee's Applications, subject to the conditions and limitations set forth in this clause, including the Distribution Requirements. The redistributable components of the SDK ("Redistributable Components") are specified in the accompanying SDK documentation or materials provided by Modular (the “Documentation”). Licensee shall only redistribute the Redistributable Components as expressly permitted in these Terms and in any Documentation, in accordance with the Distribution Requirements. + +“Distribution Requirements” means each of the following requirements: + +(a) The Application must have material additional functionality, beyond the included portions of the SDK; +(b) The distributable portions of the SDK shall only be accessed by the Application; +(c) The terms under which Licensee distributes an Application must be consistent with the terms of this Agreement, including (without limitation) terms relating to the license grant and license restrictions and protection of Modular’s intellectual property rights; +(d) Licensee shall not redistribute the Redistributable Components as standalone components, libraries, or tools in any way that would enable third parties to violate the terms of this License; +(e) Licensee shall not modify, reverse engineer, decompile, disassemble, or attempt to derive the source code of the Redistributable Components, except to the extent expressly permitted by applicable law; +(f) Licensee shall include all proprietary notices, labels, and marks provided by Modular in the Documentation (or elsewhere) in connection with the Redistributable Components in all copies of Applications that incorporate the Redistributable Components; +(g) The text of this Agreement shall be conspicuously displayed in each original or modified copy of the SDK; and +(h) The Application must only be run on hardware expressly supported by MAX. If Licensee wishes to run the Application on custom hardware it is developing or has developed, Licensee must contact Modular with a written request to secure appropriate rights to do so. Modular reserves the right to approve or deny such requests in its sole discretion. + +Licensee agrees to notify Modular in writing of any known or suspected violation of the Distribution Requirements and to reasonably enforce the terms of its Application. If Licensee receives the SDK in original or modified form from any third party, Licensee agrees and accepts that the terms of this Agreement are still binding upon Licensee. + +4. OWNERSHIP & PERSONAL INFORMATION + +Modular and its applicable licensors retain all right, title, and interest in and to the SDK (including any Redistributable Components) and Documentation, including all intellectual property rights therein. Licensee acknowledges and agrees that, other than as explicitly stated herein, nothing in these Terms grants it any rights to or ownership interest in the SDK or Documentation. As between the parties, Licensee acknowledges that Modular owns all right, title, and interest in and to the Usage Data and may use or exploit it for any purpose it deems fit, including but not limited to the purposes of improving the SDK or any other component or aspect of the Max Platform. Any collection, storage, or use of Licensee personal information is governed by Modular’s Privacy Policy (https://www.modular.com/legal/privacy), which Licensee hereby acknowledges upon acceptance of these Terms. + +5. SUPPORT AND UPDATES + +Modular is not obligated to provide any support, patches, fixes or updates for the SDK. However, Modular may, at its sole discretion, provide updates, patches, fixes or support at any time. + +6. FEES + +The community license variant of the SDK is provided free of charge. Licensee acknowledges that Modular may at any time change its provision of its community variant of the SDK for free or generally. In the event Modular does the foregoing, it will make commercially reasonable efforts to provide Licensee of advanced notice of its plans to either change its provision of the SDK or offer the applicable, commercial variant of the SDK for a fee to the contact information provided by Licensee to Modular. + +7. WARRANTY DISCLAIMER + +THE SDK IS PROVIDED "AS IS" AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, MODULAR MAKES NO OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. LICENSEE ACKNOWLEDGES AND AGREES THAT THE USE OF THE SDK IS AT THEIR OWN RISK, AND MODULAR DOES NOT MAKE ANY REPRESENTATIONS OR WARRANTIES REGARDING THE ACCURACY, RELIABILITY, OR COMPLETENESS OF THE SDK, OR INFORMATION OBTAINED THROUGH THE SDK. MODULAR DOES NOT WARRANT OR GUARANTEE THAT THE SDK WILL MEET LICENSEE'S REQUIREMENTS OR EXPECTATIONS FOR ITS APPLICATIONS OR GENERALLY, OR THAT ANY ERRORS OR DEFECTS IN THE SDK WILL BE CORRECTED. FURTHERMORE, MODULAR DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE RESULTS THAT MAY BE OBTAINED FROM THE USE OF THE SDK OR THE SUITABILITY OF THE SDK FOR ANY PARTICULAR PURPOSE. MODULAR MAKES NO WARRANTIES OR REPRESENTATIONS THAT THE SDK WILL BE COMPATIBLE WITH LICENSEE'S SYSTEMS, SOFTWARE, OR APPLICATIONS, OR THAT THE SDK WILL BE SECURE FROM UNAUTHORIZED ACCESS, HACKING, OR OTHER POTENTIAL SECURITY THREATS. MODULAR DISCLAIMS ANY LIABILITY ARISING OUT OF OR IN CONNECTION WITH THE USE OF THE SDK. LICENSEE ASSUMES ALL RISKS AND RESPONSIBILITIES FOR USING THE SDK TO ACHIEVE THEIR INTENDED RESULTS AND FOR THE INSTALLATION, USE, AND RESULTS OBTAINED FROM THE SDK. ADDITIONALLY, VERSIONS OF THE SDK IDENTIFIED AS ‘PREVIEW VERSIONS’ MAY HAVE ADDITIONAL BUGS OR DESIGN FLAWS. MODULAR MAKES NO WARRANTIES ABOUT THE PREVIEW VERSIONS WHATSOEVER, AND LICENSEE’S USE OF THE SDK IN COMMERCIAL, PRODUCTION ENVIRONMENTS IN VIOLATION OF THIS AGREEMENT IS AT ITS OWN RISK. + +8. INDEMNIFICATION + +Licensee shall defend, indemnify and hold harmless Modular, its affiliates and their respective officers, directors, employees, agents and representatives from any and all third party claims, damages, liabilities, costs and fees (including reasonable attorneys’ fees) arising from: (i) its material breach of these Terms; or (ii) an allegation that any Application violates, misappropriates, or infringes any third party intellectual, contractual or proprietary right. + +9. LIMITATION OF LIABILITY + +TO THE EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL MODULAR BE RESPONSIBLE OR LIABLE WITH RESPECT TO ANY SUBJECT MATTER OF THIS AGREEMENT UNDER ANY CONTRACT, NEGLIGENCE, STRICT LIABILITY OR OTHER THEORY FOR: (I) LOSS OR INACCURACY OF DATA OR COST OF PROCUREMENT OF SUBSTITUTE GOODS, SERVICES, OR TECHNOLOGY; OR (II) ANY INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO LOSS OF REVENUES OR PROFITS; (III) ANY MATTER BEYOND ITS REASONABLE CONTROL; OR (IV) ANY AMOUNT IN THE AGGREGATE OVER $100. SOME JURISDICTIONS DO NOT ALLOW CERTAIN WARRANTY DISCLAIMERS OR LIMITATIONS ON LIABILITY. ONLY DISCLAIMERS OR LIMITATIONS THAT ARE LAWFUL IN THE APPLICABLE JURISDICTION WILL APPLY TO YOU, AND MODULAR’S LIABILITY WILL BE LIMITED TO THE MAXIMUM EXTENT PERMITTED BY LAW. + +10. TERMINATION + +These Terms may be terminated if the Licensee wants to terminate this Agreement by stopping use of the SDK. Modular may terminate this License if the Licensee fails to comply with any term in this Agreement, or if the Licensee commences, or participates, in any legal proceed against Modular. Upon termination, Licensee shall immediately cease all use of the SDK. These terms may be also discontinued by Modular if it decides to no longer provide any SDK, or if in Modular soles discretion, continued use is no longer commercially viable. Modular will attempt to provide written notice of termination to Licensee either through a posting on its website, or via the contact method for Licensee it has available. Upon any termination of this License all provisions survive except for the license grant provisions. + +11. EXPORT CONTROL + +Licensee shall comply with, and shall, at Modular’s request, demonstrate compliance with all applicable export laws, restrictions, and regulations of any United States or foreign agency or authority. Licensee shall not export or re-export, or allow the export or re-export of any product, technology or information it obtains pursuant to these Terms (including but not limited to the SDK) in violation of any such laws, embargoes, restrictions or regulations. Licensee shall obtain and bear all expenses relating to any licenses and/or exemptions required to comply with foregoing. \ No newline at end of file diff --git a/src/licensedcode/data/licenses/maxmind-geolite2-eula-2019.LICENSE b/src/licensedcode/data/licenses/maxmind-geolite2-eula-2019.LICENSE index 459d7035a9f..2a537e13c0b 100644 --- a/src/licensedcode/data/licenses/maxmind-geolite2-eula-2019.LICENSE +++ b/src/licensedcode/data/licenses/maxmind-geolite2-eula-2019.LICENSE @@ -10,7 +10,7 @@ ignorable_authors: - the USA Department of Commerce - the USA Department of State. Specifically - the USA Treasury Department's Office of Foreign Assets Control, and the International - Traffic in Arms Regulations + Traffic in Arms ignorable_urls: - http://www.maxmind.com/ - https://www.maxmind.com/ @@ -114,4 +114,4 @@ Should any provision of this Agreement be held void, invalid, or inoperative, su COMPLIANCE WITH LAW. -Notwithstanding any provisions of this Agreement to the contrary, you shall in performance of this Agreement comply with all applicable laws, executive orders, regulations ordinances and rules of all governments (“Applicable Laws”), including all applicable export and re-export control laws and regulations, such as the Export Administration Regulations (“EAR”) maintained by the USA Department of Commerce, trade and economic sanctions maintained by the USA Treasury Department’s Office of Foreign Assets Control, and the International Traffic in Arms Regulations (“ITAR”) maintained by the USA Department of State. Specifically, and without limitation, you agree that you shall not, directly or indirectly, sell, export, re-export, transfer, divert, or otherwise dispose of any Services (including products derived from or based on such Services) to any destination, entity, or person prohibited by the laws or regulations of the USA, without obtaining prior authorization from the competent government authorities as required by those laws and regulations. \ No newline at end of file +Notwithstanding any provisions of this Agreement to the contrary, you shall in performance of this Agreement comply with all applicable laws, executive orders, regulations ordinances and rules of all governments (“Applicable Laws”), including all applicable export and re-export control laws and regulations, such as the Export Administration Regulations (“EAR”) maintained by the USA Department of Commerce, trade and economic sanctions maintained by the USA Treasury Department’s Office of Foreign Assets Control, and the International Traffic in Arms Regulations (“ITAR”) maintained by the USA Department of State. Specifically, and without limitation, you agree that you shall not, directly or indirectly, sell, export, re-export, transfer, divert, or otherwise dispose of any Services (including products derived from or based on such Services) to any destination, entity, or person prohibited by the laws or regulations of the USA, without obtaining prior authorization from the competent government authorities as required by those laws and regulations. diff --git a/src/licensedcode/data/licenses/mediatek-proprietary-2008.LICENSE b/src/licensedcode/data/licenses/mediatek-proprietary-2008.LICENSE index 75e1cc23de4..3faaea200ae 100644 --- a/src/licensedcode/data/licenses/mediatek-proprietary-2008.LICENSE +++ b/src/licensedcode/data/licenses/mediatek-proprietary-2008.LICENSE @@ -7,9 +7,9 @@ owner: MediaTek homepage_url: https://github.com/LIFECorp/mediatek/blob/master/external/mp3dec/mp3dec_exp.h spdx_license_key: LicenseRef-scancode-mediatek-proprietary-2008 ignorable_copyrights: - - MediaTek Inc. (c) 2008 BY OPENING + - MediaTek Inc. (c) 2008 ignorable_holders: - - MediaTek Inc. BY OPENING + - MediaTek Inc. --- This software is protected by Copyright and the information contained @@ -40,4 +40,4 @@ THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER -THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). \ No newline at end of file +THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). diff --git a/src/licensedcode/data/licenses/minpack.LICENSE b/src/licensedcode/data/licenses/minpack.LICENSE index 70122cfb4e6..9341b8a546d 100644 --- a/src/licensedcode/data/licenses/minpack.LICENSE +++ b/src/licensedcode/data/licenses/minpack.LICENSE @@ -17,7 +17,7 @@ ignorable_copyrights: ignorable_holders: - University of Chicago ignorable_authors: - - the University of Chicago + - the University of Chicago, as Operator of Argonne National Laboratory --- Minpack Copyright Notice (1999) University of Chicago. All rights reserved @@ -70,4 +70,4 @@ PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE -POSSIBILITY OF SUCH LOSS OR DAMAGES. \ No newline at end of file +POSSIBILITY OF SUCH LOSS OR DAMAGES. diff --git a/src/licensedcode/data/licenses/mit-old-style-sparse.LICENSE b/src/licensedcode/data/licenses/mit-old-style-sparse.LICENSE index 6fbdb37cac5..ded19521fdb 100644 --- a/src/licensedcode/data/licenses/mit-old-style-sparse.LICENSE +++ b/src/licensedcode/data/licenses/mit-old-style-sparse.LICENSE @@ -7,8 +7,6 @@ owner: Kenneth S. Kundert homepage_url: http://sparse.sourceforge.net notes: Used in old Sparse versions and a few other places. This is very similar to the mit-old-style. spdx_license_key: LicenseRef-scancode-mit-old-style-sparse -ignorable_authors: - - the University of California --- Permission to use, copy, modify, and distribute this software and @@ -18,4 +16,4 @@ supporting documentation and that the authors and the University of California are properly credited. The authors and the University of California make no representations as to the suitability of this software for any purpose. It is provided `as is', without express -or implied warranty. \ No newline at end of file +or implied warranty. diff --git a/src/licensedcode/data/licenses/mit-taylor-variant.LICENSE b/src/licensedcode/data/licenses/mit-taylor-variant.LICENSE index ed53aec5e9e..1341d76a74b 100644 --- a/src/licensedcode/data/licenses/mit-taylor-variant.LICENSE +++ b/src/licensedcode/data/licenses/mit-taylor-variant.LICENSE @@ -9,13 +9,14 @@ other_spdx_license_keys: - LicenseRef-scancode-mit-taylor-variant other_urls: - https://github.com/pkgconf/pkgconf/blob/master/cli/main.c#L8 +notes: Originally from https://github.com/quinntaylor/CHDataStructures/blob/097c0e3f4d7ae1c24266d3d03434e07b9b76f3db/source/Util.h#L6C1-L9C1 --- Permission to use, copy, modify, and/or 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, including all +The software is provided "as is", without warranty of any kind, including all implied warranties of merchantability and fitness. 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 diff --git a/src/licensedcode/data/licenses/ms-rndis.LICENSE b/src/licensedcode/data/licenses/ms-rndis.LICENSE new file mode 100644 index 00000000000..6034d7f54a2 --- /dev/null +++ b/src/licensedcode/data/licenses/ms-rndis.LICENSE @@ -0,0 +1,67 @@ +--- +key: ms-rndis +short_name: MS-RNDIS +name: Remote Network Driver Interface Specification (RNDIS) Protocol +category: Proprietary Free +owner: Microsoft +spdx_license_key: LicenseRef-scancode-ms-rndis +text_urls: + - https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/WinArchive/%255BMS-RNDIS%255D.pdf&ved=2ahUKEwj7tLeb1K6IAxVLGDQIHT04EPcQFnoECBQQAQ&usg=AOvVaw1MW_JFPyy4nCIfftPqsKC_ +other_urls: + - https://en.wikipedia.org/wiki/RNDIS + - https://learn.microsoft.com/en-us/openspecs/dev_center/ms-devcentlp/1c24c7c8-28b0-4ce1-a47d-95fe1ff504bc + - https://learn.microsoft.com/en-us/openspecs/dev_center/ms-devcentlp/8b8d1b7a-a10a-4667-9558-6d9c43adf60d + - https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks +ignorable_urls: + - http://www.microsoft.com/trademarks +ignorable_emails: + - iplg@microsoft.com +--- + +[MS-RNDIS]: +Remote Network Driver Interface Specification (RNDIS) Protocol + +Intellectual Property Rights Notice for Open Specifications Documentation + + - Technical Documentation. Microsoft publishes Open Specifications documentation for +protocols, file formats, languages, standards as well as overviews of the interaction among each +of these technologies. + + - Copyrights. This documentation is covered by Microsoft copyrights. Regardless of any other +terms that are contained in the terms of use for the Microsoft website that hosts this +documentation, you may make copies of it in order to develop implementations of the +technologies described in the Open Specifications and may distribute portions of it in your +implementations using these technologies or your documentation as necessary to properly +document the implementation. You may also distribute in your implementation, with or without +modification, any schema, IDL’s, or code samples that are included in the documentation. This +permission also applies to any documents that are referenced in the Open Specifications. + + - No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation. + + - Patents. Microsoft has patents that may cover your implementations of the technologies +described in the Open Specifications. Neither this notice nor Microsoft's delivery of the +documentation grants any licenses under those or any other Microsoft patents. However, a given +Open Specification may be covered by Microsoft Open Specification Promise or the Community +Promise. If you would prefer a written license, or if the technologies described in the Open +Specifications are not covered by the Open Specifications Promise or Community Promise, as +applicable, patent licenses are available by contacting iplg@microsoft.com. + + - Trademarks. The names of companies and products contained in this documentation may be +covered by trademarks or similar intellectual property rights. This notice does not grant any +licenses under those rights. For a list of Microsoft trademarks, visit +www.microsoft.com/trademarks. + + - Fictitious Names. The example companies, organizations, products, domain names, email +addresses, logos, people, places, and events depicted in this documentation are fictitious. No +association with any real company, organization, product, domain name, email address, logo, +person, place, or event is intended or should be inferred. + +Reservation of Rights. All other rights are reserved, and this notice does not grant any rights +other than specifically described above, whether by implication, estoppel, or otherwise. + +Tools. The Open Specifications do not require the use of Microsoft programming tools or +programming environments in order for you to develop an implementation. If you have access to +Microsoft programming tools and environments you are free to take advantage of them. Certain +Open Specifications are intended for use in conjunction with publicly available standard +specifications and network programming art, and assumes that the reader either is familiar with the +aforementioned material or has immediate access to it. \ No newline at end of file diff --git a/src/licensedcode/data/licenses/mtll.LICENSE b/src/licensedcode/data/licenses/mtll.LICENSE index 71009a1d9a1..3fa49ad205d 100644 --- a/src/licensedcode/data/licenses/mtll.LICENSE +++ b/src/licensedcode/data/licenses/mtll.LICENSE @@ -10,9 +10,6 @@ notes: | derived from the Apache Software License v1.1, but it is modified in several ways. It is Free, but GPL-incompatible. spdx_license_key: MTLL -ignorable_authors: - - at the University of Notre Dame, the Pervasive Technology Labs at Indiana University, and - Dresden University of Technology --- Software License for MTL diff --git a/src/licensedcode/data/licenses/nero-eula.LICENSE b/src/licensedcode/data/licenses/nero-eula.LICENSE index ef830b563b4..9cf54c67230 100644 --- a/src/licensedcode/data/licenses/nero-eula.LICENSE +++ b/src/licensedcode/data/licenses/nero-eula.LICENSE @@ -43,7 +43,7 @@ ignorable_holders: - Simon Tatham - The OpenSSL Project ignorable_authors: - - Coding Technologies + - Coding Technologies 'CT www.codingtechnologies.com - the OpenSSL Project ignorable_urls: - http://ffmpeg.mplayerhq.hu/ diff --git a/src/licensedcode/data/licenses/net-snmp.LICENSE b/src/licensedcode/data/licenses/net-snmp.LICENSE index 3b9a42c6416..b80c6ee829b 100644 --- a/src/licensedcode/data/licenses/net-snmp.LICENSE +++ b/src/licensedcode/data/licenses/net-snmp.LICENSE @@ -5,8 +5,10 @@ name: Net SNMP License category: Permissive owner: Net-SNMP homepage_url: http://net-snmp.sourceforge.net/about/license.html -notes: composite -spdx_license_key: Net-SNMP +notes: composite, this was deprecated in SPDX License List 3.25 +spdx_license_key: LicenseRef-scancode-net-snmp +other_spdx_license_keys: + - Net-SNMP minimum_coverage: 70 ignorable_copyrights: - Copyright (c) 2001-2003, Networks Associates Technology, Inc diff --git a/src/licensedcode/data/licenses/node-js.LICENSE b/src/licensedcode/data/licenses/node-js.LICENSE index b8a4d32b411..d721aa53395 100644 --- a/src/licensedcode/data/licenses/node-js.LICENSE +++ b/src/licensedcode/data/licenses/node-js.LICENSE @@ -24,9 +24,9 @@ ignorable_copyrights: - Copyright (c) by Tjarda Koster, http://jelloween.deviantart.com - Copyright 1998 by the Massachusetts Institute of Technology - Copyright 2006-2012, the V8 project authors - - Copyright 2011 Mathias Bynens + - Copyright 2011 Mathias Bynens http://mathiasbynens.be - Copyright Joyent, Inc. and other Node contributors - - copyright 2011 Mathias Bynens + - copyright 2011 Mathias Bynens http://mathiasbynens.be - copyright Igor Sysoev - copyright Joyent, Inc. and other Node contributors - copyrighted by Apple Computer, Inc. diff --git a/src/licensedcode/data/licenses/nvidia-cuda-supplement-2020.LICENSE b/src/licensedcode/data/licenses/nvidia-cuda-supplement-2020.LICENSE index e5c7ef513de..69f4fb4e840 100644 --- a/src/licensedcode/data/licenses/nvidia-cuda-supplement-2020.LICENSE +++ b/src/licensedcode/data/licenses/nvidia-cuda-supplement-2020.LICENSE @@ -45,7 +45,7 @@ ignorable_holders: - Yann Collet - Zoltan Herczeg ignorable_authors: - - Ahmad Abdelfattah (ahmad.ahmad@kaust.edu.sa) David Keyes (david.keyes@kaust.edu.sa) + - Ahmad Abdelfattah (ahmad.ahmad@kaust.edu.sa) David Keyes (david.keyes@kaust.edu.sa) Hatem Ltaief (hatem.ltaief@kaust.edu.sa) - Ahmad M. Abdelfattah, David Keyes, and Hatem Ltaief - D. E. Shaw Research - Davide Barbieri @@ -727,4 +727,4 @@ 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. Licensee's use of linmath.h header for CPU functions for GL vector/matrix operations from lunarG is subject to the Apache License Version 2.0. -The DX12-CUDA sample uses the d3dx12.h header, which is subject to the MIT license . \ No newline at end of file +The DX12-CUDA sample uses the d3dx12.h header, which is subject to the MIT license . diff --git a/src/licensedcode/data/licenses/ossn-3.0.LICENSE b/src/licensedcode/data/licenses/ossn-3.0.LICENSE index 7305d19859d..e4a22cc53ef 100644 --- a/src/licensedcode/data/licenses/ossn-3.0.LICENSE +++ b/src/licensedcode/data/licenses/ossn-3.0.LICENSE @@ -10,7 +10,7 @@ text_urls: - https://github.com/opensource-socialnetwork/opensource-socialnetwork/blob/v4.x/LICENSE.txt minimum_coverage: 90 ignorable_copyrights: - - Copyright (c) 2014-2017 OPEN SOURCE SOCIAL NETWORK. + - Copyright (c) 2014-2017 OPEN SOURCE SOCIAL NETWORK. https://www.opensource-socialnetwork.org ignorable_holders: - OPEN SOURCE SOCIAL NETWORK. ignorable_urls: diff --git a/src/licensedcode/data/licenses/otnla-2016-11-30.LICENSE b/src/licensedcode/data/licenses/otnla-2016-11-30.LICENSE new file mode 100644 index 00000000000..985b10cfec9 --- /dev/null +++ b/src/licensedcode/data/licenses/otnla-2016-11-30.LICENSE @@ -0,0 +1,111 @@ +--- +key: otnla-2016-11-30 +short_name: OTNLA 2016-11-30 +name: Oracle Technology Network License Agreement 2016-11-30 +category: Proprietary Free +owner: Oracle Corporation +homepage_url: https://www.oracle.com/downloads/licenses/distribution-license.html +spdx_license_key: LicenseRef-scancode-otnla-2016-11-30 +other_urls: + - https://www.infoworld.com/article/3478122/get-ready-for-more-java-licensing-changes.html +ignorable_urls: + - http://docs.oracle.com/en + - http://www.oracle.com/goto/opensourcecode + - http://www.oracle.com/legal/privacy/privacy-policy.html + - https://oss.oracle.com/sources/ +--- + +Oracle Technology Network License Agreement + +Oracle is willing to authorize Your access to software associated with this License Agreement (“Agreement”) only upon the condition that You accept that this Agreement governs Your use of the software. By selecting the “Accept License Agreement” button or box (or the equivalent) or installing or using the Programs You indicate Your acceptance of this Agreement and Your agreement, as an authorized representative of Your company or organization (if being acquired for use by an entity) or as an individual, to comply with the license terms that apply to the software that You wish to download and access. If You are not willing to be bound by this Agreement, do not select the “Accept License Agreement” button or box (or the equivalent) and do not download or access the software. + +Definitions + +"Oracle" refers to Oracle America, Inc. "You" and "Your" refers to (a) a company or organization (each an “Entity”) accessing the Programs, if use of the Programs will be on behalf of such Entity; or (b) an individual accessing the Programs, if use of the Programs will not be on behalf of an Entity. “Contractors” refers to Your agents and contractors (including, without limitation, outsourcers). "Program(s)" refers to Oracle software provided by Oracle pursuant to this Agreement and any updates, error corrections, and/or Program Documentation provided by Oracle. “Program Documentation” refers to Program user manuals and Program installation manuals, if any. If available, Program Documentation may be delivered with the Programs and/or may be accessed from http://docs.oracle.com/en/. “Associated Product” refers to the Oracle product(s), if any, and as identified in the Programs documentation or on the Programs download site, with which the Programs are intended to enable or enhance interoperation with Your application(s). “Separate Terms” refers to separate license terms that are specified in the Program Documentation, readmes or notice files and that apply to Separately Licensed Third Party Technology. “Separately Licensed Third Party Technology” refers to third party technology that is licensed under Separate Terms and not under the terms of this Agreement. + +License Rights and Restrictions + +Oracle grants You a nonexclusive, nontransferable, limited license to, subject to the restrictions stated in this Agreement, (a) internally use the Programs solely for the purposes of developing, testing, prototyping and demonstrating Your applications, and running the Programs for Your own internal business operations; and (b) redistribute unmodified Programs and Programs Documentation pursuant to the Programs Redistribution section below. You may allow Your Contractor(s) to use the Programs, provided they are acting on Your behalf to exercise license rights granted in this Agreement and further provided that You are responsible for their compliance with this Agreement in such use. You will have a written agreement with Your Contractor(s) that strictly limits their right to use the Programs and that otherwise protects Oracle’s intellectual property rights to the same extent as this Agreement. You may make copies of the Programs to the extent reasonably necessary to exercise the license rights granted in this Agreement. You may make one copy of the Programs for backup purposes. + +Further, You may not: + + remove or modify any Program markings or any notice of Oracle’s or a licensor’s proprietary rights; + use the Programs to provide third party training unless Oracle expressly authorizes such use on the Program’s download page; + assign this Agreement or distribute, give, or transfer the Programs or an interest in them to any third party, except as expressly permitted in this Agreement (the foregoing shall not be construed to limit the rights You may otherwise have with respect to Separately Licensed Third Party Technology); + cause or permit reverse engineering (unless required by law for interoperability), disassembly or decompilation of the Programs; and + disclose results of any Program benchmark tests without Oracle’s prior consent. + +The Programs may contain source code that, unless expressly licensed in this Agreement for other purposes (for example, licensed under an open source license), is provided solely for reference purposes pursuant to the terms of this Agreement and may not be modified. + +All rights not expressly granted in this Agreement are reserved by Oracle. If You want to use the Programs or Your application for any purpose other than as expressly permitted under this Agreement, You must obtain from Oracle or an Oracle reseller a valid Programs license under a separate agreement permitting such use. However, You acknowledge that the Programs may not be intended for production use and/or Oracle may not make a version of the Programs available for production or other purposes; any development or other work You undertake with the Programs is at Your sole risk. + +Programs Redistribution + +We grant You a nonexclusive, nontransferable right to copy and distribute unmodified Programs and Programs Documentation as part of and included in Your application that is intended to interoperate with the Associated Product, if any, provided that You do not charge Your end users any additional fees for the use of the Programs. Prior to distributing the Programs and Programs Documentation, You shall require Your end users to execute an agreement binding them to terms, with respect to the Programs and Programs Documentation, materially consistent and no less restrictive than those contained in this section and the sections of this Agreement entitled “License Rights and Restrictions” (except that the redistribution right granted to You shall not be included; Your end users may not distribute Programs and Programs Documentation to any third parties), "Ownership," "Export Controls," "Disclaimer of Warranties; Limitation of Liability," "No Technical Support" (with respect to Oracle support; You may provide Your own support for Programs at Your discretion), "Audit; Termination (except that Oracle’s audit right shall not be included)," "Relationship Between the Parties," and “U.S. Government End Users.” You must also include a provision stating that Your end users shall have no right to distribute the Programs and Programs Documentation, and a provision specifying us as a third party beneficiary of the agreement. You are responsible for obtaining these agreements with Your end users. + +You agree to: (a) defend and indemnify us against all claims and damages caused by Your distribution of the Programs and Programs Documentation in breach of this Agreement and/or failure to include the required contractual provisions in Your end user agreement as stated above; (b) keep executed end user agreements and records of end user information including name, address, date of distribution and identity of Programs distributed; (c) allow us to inspect Your end user agreements and records upon request; and, (d) enforce the terms of Your end user agreements so as to effect a timely cure of any end user breach, and to notify us of any breach of the terms. + +Ownership + +Oracle or its licensors retain all ownership and intellectual property rights to the Programs. + +Third-Party Technology + +The Programs may contain or require the use of third party technology that is provided with the Programs. Oracle may provide certain notices to You in Program Documentation, readmes or notice files in connection with such third party technology. Third party technology will be licensed to You either under the terms of this Agreement or, if specified in the Program Documentation, readmes or notice files, under Separate Terms. Your rights to use Separately Licensed Third Party Technology under Separate Terms are not restricted in any way by this Agreement. However, for clarity, notwithstanding the existence of a notice, third party technology that is not Separately Licensed Third Party Technology shall be deemed part of the Programs and is licensed to You under the terms of this Agreement. + +Source Code for Open Source Software + +For software that You receive from Oracle in binary form that is licensed under an open source license that gives You the right to receive the source code for that binary, You can obtain a copy of the applicable source code from https://oss.oracle.com/sources/ or http://www.oracle.com/goto/opensourcecode. If the source code for such software was not provided to You with the binary, You can also receive a copy of the source code on physical media by submitting a written request pursuant to the instructions in the "Written Offer for Source Code" section of the latter website. + +Export Controls + +Export laws and regulations of the United States and any other relevant local export laws and regulations apply to the Programs . You agree that such export control laws govern Your use of the Programs (including technical data) and any services deliverables provided under this agreement, and You agree to comply with all such export laws and regulations (including "deemed export" and "deemed re-export" regulations). You agree that no data, information, program and/or materials resulting from Programs or services (or direct products thereof) will be exported, directly or indirectly, in violation of these laws, or will be used for any purpose prohibited by these laws including, without limitation, nuclear, chemical, or biological weapons proliferation, or development of missile technology. Accordingly, You confirm: + + You will not download, provide, make available or otherwise export or re-export the Programs, directly or indirectly, to countries prohibited by applicable laws and regulations nor to citizens, nationals or residents of those countries. + You are not listed on the United States Department of Treasury lists of Specially Designated Nationals and Blocked Persons, Specially Designated Terrorists, and Specially Designated Narcotic Traffickers, nor are You listed on the United States Department of Commerce Table of Denial Orders. + You will not download or otherwise export or re-export the Programs, directly or indirectly, to persons on the above mentioned lists. + You will not use the Programs for, and will not allow the Programs to be used for, any purposes prohibited by applicable law, including, without limitation, for the development, design, manufacture or production of nuclear, chemical or biological weapons of mass destruction. + +Information Collection + +The Programs’ installation and/or auto-update processes, if any, may transmit a limited amount of data to Oracle or its service provider about those processes to help Oracle understand and optimize them. Oracle does not associate the data with personally identifiable information. Refer to Oracle’s Privacy Policy at http://www.oracle.com/legal/privacy/privacy-policy.html. + +Disclaimer of Warranties; Limitation of Liability + +THE PROGRAMS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ORACLE FURTHER DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT . + +IN NO EVENT WILL ORACLE BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, REVENUE, DATA OR DATA USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER IN AN ACTION IN CONTRACT OR TORT, EVEN IF ORACLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ORACLE’S ENTIRE LIABILITY FOR DAMAGES UNDER THIS AGREEMENT SHALL IN NO EVENT EXCEED ONE THOUSAND DOLLARS (U.S. $1,000) . + +No Technical Support + +Unless Oracle support for the Programs, if any, is expressly included in a separate, current support agreement between You and Oracle, Oracle’s technical support organization will not provide technical support, phone support, or updates to You for the Programs provided under this Agreement. + +Audit; Termination + +Oracle may audit Your use of the Programs. You may terminate this Agreement by destroying all copies of the Programs. This Agreement shall automatically terminate without notice if You fail to comply with any of the terms of this Agreement, in which case You shall promptly destroy all copies of the Programs. + +U.S. Government End Users + +Programs and/or Programs Documentation delivered to U.S. Government end users are “commercial computer software” pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs and/or Programs Documentation shall be subject to the license terms and license restrictions set forth in this Agreement. No other rights are granted to the U.S. Government. + +Relationship Between the Parties + +Oracle is an independent contractor and we agree that no partnership, joint venture, or agency relationship exists between us. We each will be responsible for paying our own employees, including employment related taxes and insurance.. Nothing in this agreement shall be construed to limit either party's right to independently develop or distribute software that is functionally similar to the other party's products, so long as proprietary information of the other party is not included in such software. + +Entire Agreement; Governing Law + +You agree that this Agreement is the complete agreement for the Programs and this Agreement supersedes all prior or contemporaneous agreements or representations, including any clickwrap, shrinkwrap or similar licenses, or license agreements for prior versions of the Programs. This Agreement may not be modified and the rights and restrictions may not be altered or waived except in a writing signed by authorized representatives of You and of Oracle. If any term of this Agreement is found to be invalid or unenforceable, the remaining provisions will remain effective. + +This Agreement is governed by the substantive and procedural laws of the State of California, USA, and You and Oracle agree to submit to the exclusive jurisdiction of, and venue in, the courts of San Francisco or Santa Clara counties in California in any dispute arising out of or relating to this Agreement. + +Notices + +Should you have any questions concerning this License Agreement, or if you desire to contact Oracle for any reason, please write: + + Oracle America, Inc. + 500 Oracle Parkway + Redwood City, CA 94065 + +Oracle Employees: Under no circumstances are Oracle Employees authorized to download software for the purpose of distributing it to customers. Oracle products are available to employees for internal use or demonstration purposes only. In keeping with Oracle's trade compliance obligations under U.S. and applicable multilateral law, failure to comply with this policy could result in disciplinary action up to and including termination. + +Last updated: 30 November 2016 \ No newline at end of file diff --git a/src/licensedcode/data/licenses/pcre.LICENSE b/src/licensedcode/data/licenses/pcre.LICENSE index f09354a2dda..1f522ab6f08 100644 --- a/src/licensedcode/data/licenses/pcre.LICENSE +++ b/src/licensedcode/data/licenses/pcre.LICENSE @@ -16,6 +16,8 @@ ignorable_holders: - the University of Cambridge, England ignorable_authors: - Philip Hazel + - Philip Hazel University of Cambridge Computing Service, Cambridge, England + ignorable_urls: - ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ ignorable_emails: @@ -68,4 +70,4 @@ which it is incompatible. The documentation for PCRE, supplied in the "doc" directory, is distributed under the same terms as the software itself. -End PCRE LICENCE \ No newline at end of file +End PCRE LICENCE diff --git a/src/licensedcode/data/licenses/plural-20211124.LICENSE b/src/licensedcode/data/licenses/plural-20211124.LICENSE index dff6571e235..f65abd8cae1 100644 --- a/src/licensedcode/data/licenses/plural-20211124.LICENSE +++ b/src/licensedcode/data/licenses/plural-20211124.LICENSE @@ -7,7 +7,7 @@ owner: Plural homepage_url: https://github.com/pluralsh/plural/blob/master/LICENSE spdx_license_key: LicenseRef-scancode-plural-20211124 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org - Copyright (c) 2021 Plural Labs, Inc ignorable_holders: - Free Software Foundation, Inc. diff --git a/src/licensedcode/data/licenses/pygres-2.2.LICENSE b/src/licensedcode/data/licenses/pygres-2.2.LICENSE index 6b06a01f209..f86e76fda78 100644 --- a/src/licensedcode/data/licenses/pygres-2.2.LICENSE +++ b/src/licensedcode/data/licenses/pygres-2.2.LICENSE @@ -7,6 +7,8 @@ owner: Unspecified spdx_license_key: LicenseRef-scancode-pygres-2.2 text_urls: - http://shell.vex.net/viewvc.cgi/pygresql/trunk/module/pgmodule.c?view=markup&pathrev=431 +ignorable_authors: + - Pascal Andre, andre@chimay.via.ecp.fr ignorable_copyrights: - Copyright (c) 1995, Pascal Andre (andre@via.ecp.fr) - copyright 1997, 1998, 1999 by D'Arcy J.M. Cain (darcy@druid.net) @@ -42,4 +44,4 @@ AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. Further modifications copyright 1997, 1998, 1999 by D'Arcy J.M. Cain -(darcy@druid.net) subject to the same terms and conditions as above. \ No newline at end of file +(darcy@druid.net) subject to the same terms and conditions as above. diff --git a/src/licensedcode/data/licenses/qhull.LICENSE b/src/licensedcode/data/licenses/qhull.LICENSE index 56901b51a74..159a3f62316 100644 --- a/src/licensedcode/data/licenses/qhull.LICENSE +++ b/src/licensedcode/data/licenses/qhull.LICENSE @@ -38,4 +38,4 @@ This software includes Qhull from The Geometry Center. Qhull is copyrighted as n 4. When distributing modified versions of Qhull, or other software products that include Qhull, you must provide notice that the original source code may be obtained as noted above. -5. There is no warranty or other guarantee of fitness for Qhull, it is provided solely "as is". Bug reports or fixes may be sent to qhull_bug@qhull.org; the authors may or may not act on them as they desire. \ No newline at end of file +5. There is no warranty or other guarantee of fitness for Qhull, it is provided solely "as is". Bug reports or fixes may be sent to qhull_bug@qhull.org; the authors may or may not act on them as they desire. diff --git a/src/licensedcode/data/licenses/qpopper.LICENSE b/src/licensedcode/data/licenses/qpopper.LICENSE index 2cb7b41d32c..904f08d5645 100644 --- a/src/licensedcode/data/licenses/qpopper.LICENSE +++ b/src/licensedcode/data/licenses/qpopper.LICENSE @@ -15,7 +15,7 @@ ignorable_holders: - QUALCOMM Incorporated - The Regents of the University of California ignorable_authors: - - Austin Shelton + - Austin Shelton, Information Systems and Technology, University of California, Berkeley --- Qpopper(tm) is licensed by QUALCOMM Incorporated under the following @@ -158,4 +158,4 @@ Qpopper(tm) is licensed by QUALCOMM Incorporated under the following OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE POPPER SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE - MAINTENANCE, SUPPORT, UPDATES, ENCHANCEMENTS, OR MODIFICATIONS. \ No newline at end of file + MAINTENANCE, SUPPORT, UPDATES, ENCHANCEMENTS, OR MODIFICATIONS. diff --git a/src/licensedcode/data/licenses/rsalv2.LICENSE b/src/licensedcode/data/licenses/rsalv2.LICENSE index 5c72e716c15..6420dfc3629 100644 --- a/src/licensedcode/data/licenses/rsalv2.LICENSE +++ b/src/licensedcode/data/licenses/rsalv2.LICENSE @@ -6,6 +6,7 @@ category: Source-available owner: Redis homepage_url: https://redis.com/legal/rsalv2-agreement/ spdx_license_key: LicenseRef-scancode-rsalv2 +faq_url: https://redis.com/blog/redis-adopts-dual-source-available-licensing/ other_urls: - https://redis.com/blog/redis-adopts-dual-source-available-licensing/ --- diff --git a/src/licensedcode/data/licenses/ruby-pty.LICENSE b/src/licensedcode/data/licenses/ruby-pty.LICENSE new file mode 100644 index 00000000000..4bc8738fd1c --- /dev/null +++ b/src/licensedcode/data/licenses/ruby-pty.LICENSE @@ -0,0 +1,21 @@ +--- +key: ruby-pty +short_name: Ruby pty extension license +name: Ruby pty extension license +category: Permissive +owner: Ruby +spdx_license_key: Ruby-pty +other_urls: + - https://github.com/ruby/ruby/blob/9f6deaa6888a423720b4b127b5314f0ad26cc2e6/ext/pty/pty.c#L775-L786 + - https://github.com/ruby/ruby/commit/0a64817fb80016030c03518fb9459f63c11605ea#diff-ef5fa30838d6d0cecad9e675cc50b24628cfe2cb277c346053fafcc36c91c204 + - https://github.com/ruby/ruby/commit/0a64817fb80016030c03518fb9459f63c11605ea#diff-fedf217c1ce44bda01f0a678d3ff8b198bed478754d699c527a698ad933979a0 +--- + +This software may be redistributed freely for this purpose, in full +or in part, provided that this entire copyright notice is included +on any copies of this software and applications and derivations thereof. + +This software is provided on an "as is" basis, without warranty of any +kind, either expressed or implied, as to any matter including, but not +limited to warranty of fitness of purpose, or merchantability, or +results obtained from use of this software. \ No newline at end of file diff --git a/src/licensedcode/data/licenses/sfl-license.LICENSE b/src/licensedcode/data/licenses/sfl-license.LICENSE index 536a571d382..ff7f372cdaf 100644 --- a/src/licensedcode/data/licenses/sfl-license.LICENSE +++ b/src/licensedcode/data/licenses/sfl-license.LICENSE @@ -13,7 +13,7 @@ other_urls: - http://www.imatix.com ignorable_copyrights: - Copyright (c) 1991-2000 iMatix Corporation - - Copyright (c) 1991-2000 iMatix Corporation + - Copyright (c) 1991-2000 iMatix Corporation http://www.imatix.com - Parts copyright (c) 1991-2000 iMatix Corporation ignorable_holders: - iMatix Corporation diff --git a/src/licensedcode/data/licenses/slint-commercial-2.0.LICENSE b/src/licensedcode/data/licenses/slint-commercial-2.0.LICENSE index d164f64cfab..efbb4204fc8 100644 --- a/src/licensedcode/data/licenses/slint-commercial-2.0.LICENSE +++ b/src/licensedcode/data/licenses/slint-commercial-2.0.LICENSE @@ -9,7 +9,7 @@ spdx_license_key: LicenseRef-scancode-slint-commercial-2.0 other_urls: - https://slint.dev/blog/sixtyfps-becomes-slint ignorable_copyrights: - - Copyright (c) 2023 SixtyFPS GmbH + - Copyright (c) 2023 SixtyFPS GmbH https://slint.dev/imprint.html ignorable_holders: - SixtyFPS GmbH ignorable_urls: diff --git a/src/licensedcode/data/licenses/sparky.LICENSE b/src/licensedcode/data/licenses/sparky.LICENSE index 5602f708cca..c2598142083 100644 --- a/src/licensedcode/data/licenses/sparky.LICENSE +++ b/src/licensedcode/data/licenses/sparky.LICENSE @@ -13,7 +13,7 @@ ignorable_copyrights: ignorable_holders: - The Regents of the University of California ignorable_authors: - - the UCSF Resource + - the UCSF Resource for Biocomputing, Visualization, and Informatics --- Copyright, License, and Disclaimer @@ -48,4 +48,4 @@ OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/licensedcode/data/licenses/tanuki-community-sla-1.3.LICENSE b/src/licensedcode/data/licenses/tanuki-community-sla-1.3.LICENSE index 8aed6a54b7d..c0a62efd7c7 100644 --- a/src/licensedcode/data/licenses/tanuki-community-sla-1.3.LICENSE +++ b/src/licensedcode/data/licenses/tanuki-community-sla-1.3.LICENSE @@ -11,7 +11,7 @@ text_urls: ignorable_copyrights: - Copyright (c) 1989, 1991 Free Software Foundation, Inc. - Copyright (c) 2001 Silver Egg Technology - - Copyright c 2007 Free Software Foundation, Inc. + - Copyright c 2007 Free Software Foundation, Inc. http://fsf.org - copyrighted by the Free Software Foundation ignorable_holders: - Free Software Foundation, Inc. diff --git a/src/licensedcode/data/licenses/toppers-educational.LICENSE b/src/licensedcode/data/licenses/toppers-educational.LICENSE index aaa675fe628..a367452f39e 100644 --- a/src/licensedcode/data/licenses/toppers-educational.LICENSE +++ b/src/licensedcode/data/licenses/toppers-educational.LICENSE @@ -6,10 +6,6 @@ category: Permissive owner: TOPPERS homepage_url: https://www.toppers.jp/en/license.html spdx_license_key: LicenseRef-scancode-toppers-educational -ignorable_copyrights: - - copyright holder and the TOPPERS Project -ignorable_holders: - - the TOPPERS Project --- The above copyright holder, limited to cases in which one satisfies @@ -31,4 +27,4 @@ accompanying redistribution (user's manual, etc.). (3) The above copyright holder and the TOPPERS Project shall be exempt from responsibility for whatever damages occur either directly or -indirectly through the utilization of this software. \ No newline at end of file +indirectly through the utilization of this software. diff --git a/src/licensedcode/data/licenses/toppers-license.LICENSE b/src/licensedcode/data/licenses/toppers-license.LICENSE index 09d856dfb9a..3851b8e1fec 100644 --- a/src/licensedcode/data/licenses/toppers-license.LICENSE +++ b/src/licensedcode/data/licenses/toppers-license.LICENSE @@ -6,10 +6,6 @@ category: Permissive owner: TOPPERS homepage_url: https://www.toppers.jp/en/license.html spdx_license_key: LicenseRef-scancode-toppers-license -ignorable_copyrights: - - copyright holders and the TOPPERS Project -ignorable_holders: - - the TOPPERS Project --- The above copyright holders grant permission gratis to use, @@ -53,4 +49,4 @@ The above copyright holders grant permission gratis to use, INCLUDING, BUT NOT LIMITED TO, ITS APPLICABILITY TO A PARTICULAR PURPOSE. IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS AND THE TOPPERS PROJECT BE LIABLE FOR ANY TYPE OF DAMAGE DIRECTLY OR - INDIRECTLY CAUSED FROM THE USE OF THIS SOFTWARE. \ No newline at end of file + INDIRECTLY CAUSED FROM THE USE OF THIS SOFTWARE. diff --git a/src/licensedcode/data/licenses/ubuntu-font-1.0.LICENSE b/src/licensedcode/data/licenses/ubuntu-font-1.0.LICENSE index 206298b6e55..9d2a68c0808 100644 --- a/src/licensedcode/data/licenses/ubuntu-font-1.0.LICENSE +++ b/src/licensedcode/data/licenses/ubuntu-font-1.0.LICENSE @@ -5,13 +5,17 @@ name: Ubuntu Font Licence v1.0 category: Copyleft Limited owner: Ubuntu Font Family homepage_url: http://font.ubuntu.com/licence/ -spdx_license_key: LicenseRef-scancode-ubuntu-font-1.0 +spdx_license_key: Ubuntu-font-1.0 +other_spdx_license_keys: + - LicenseRef-scancode-ubuntu-font-1.0 text_urls: - https://assets.ubuntu.com/v1/81e5605d-ubuntu-font-licence-1.0.txt faq_url: https://www.ubuntu.com/legal/font-licence other_urls: - - https://launchpad.net/ubuntu-font-licence - https://design.ubuntu.com/font/ + - https://launchpad.net/ubuntu-font-licence + - https://ubuntu.com/legal/font-licence + - https://assets.ubuntu.com/v1/81e5605d-ubuntu-font-licence-1.0.txt standard_notice: | This Font Software is licensed under the Ubuntu Font Licence, Version 1.0. https://launchpad.net/ubuntu-font-licence diff --git a/src/licensedcode/data/licenses/ucar.LICENSE b/src/licensedcode/data/licenses/ucar.LICENSE index 956a80e5567..6952daab87a 100644 --- a/src/licensedcode/data/licenses/ucar.LICENSE +++ b/src/licensedcode/data/licenses/ucar.LICENSE @@ -8,7 +8,7 @@ homepage_url: https://github.com/Unidata/UDUNITS-2/blob/master/COPYRIGHT spdx_license_key: UCAR ignorable_authors: - the Unidata Program Center of the University Corporation for Atmospheric Research (UCAR) - + http://www.unidata.ucar.edu ignorable_urls: - http://www.unidata.ucar.edu/ --- diff --git a/src/licensedcode/data/licenses/us-govt-public-domain.LICENSE b/src/licensedcode/data/licenses/us-govt-public-domain.LICENSE index c66e19c7dc8..0ca12711794 100644 --- a/src/licensedcode/data/licenses/us-govt-public-domain.LICENSE +++ b/src/licensedcode/data/licenses/us-govt-public-domain.LICENSE @@ -13,9 +13,13 @@ other_urls: - https://www.law.cornell.edu/uscode/text/17/105 - https://en.wikipedia.org/wiki/Copyright_status_of_works_by_the_federal_government_of_the_United_States - https://en.wikipedia.org/wiki/Wikipedia:Public_domain#U.S._government_works +ignorable_copyrights: + - copyright United States Government +ignorable_holders: + - United States Government --- 17 U.S. Code $ 105. Subject matter of copyright: United States Government works Copyright protection under this title is not available for any work of the -United States Government. \ No newline at end of file +United States Government. diff --git a/src/licensedcode/data/licenses/vhfpl-1.1.LICENSE b/src/licensedcode/data/licenses/vhfpl-1.1.LICENSE index 85857381c33..f96144ebca0 100644 --- a/src/licensedcode/data/licenses/vhfpl-1.1.LICENSE +++ b/src/licensedcode/data/licenses/vhfpl-1.1.LICENSE @@ -10,10 +10,10 @@ notes: The original name of Cenon was vhf interservice GmbH at http://www.vhf-in spdx_license_key: LicenseRef-scancode-vhfpl-1.1 ignorable_copyrights: - Copyright (c) 2003 vhf interservice GmbH service@vhf.de - - Copyright (c) 2003/2004 vhf interservice GmbH, Im Marxle 3 + - Copyright (c) 2003/2004 vhf interservice GmbH, Im Marxle ignorable_holders: - vhf interservice GmbH - - vhf interservice GmbH, Im Marxle 3 + - vhf interservice GmbH, Im Marxle ignorable_emails: - service@vhf.de --- @@ -120,4 +120,4 @@ INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ---------------------------------------------------------------------------- -Copyright (C) 2003 vhf interservice GmbH service@vhf.de \ No newline at end of file +Copyright (C) 2003 vhf interservice GmbH service@vhf.de diff --git a/src/licensedcode/data/licenses/wxwidgets.LICENSE b/src/licensedcode/data/licenses/wxwidgets.LICENSE index 72026b4afb6..5a6186e51b1 100644 --- a/src/licensedcode/data/licenses/wxwidgets.LICENSE +++ b/src/licensedcode/data/licenses/wxwidgets.LICENSE @@ -10,10 +10,10 @@ text_urls: - http://www.wxwidgets.org/about/licence.htm ignorable_copyrights: - Copyright (c) 1997 Julian Smart, Markus Holzem - - copyrighted by the wxWidgets + - copyrighted by the wxWidgets authors ignorable_holders: - Julian Smart, Markus Holzem - - the wxWidgets + - the wxWidgets authors ignorable_emails: - julian@wxwidgets.org --- @@ -238,4 +238,4 @@ library for tweaking knobs) written by James Random Hacker. , 1 April 1990 -Ty Coon, President of Vice \ No newline at end of file +Ty Coon, President of Vice diff --git a/src/licensedcode/data/licenses/x11-swapped.LICENSE b/src/licensedcode/data/licenses/x11-swapped.LICENSE new file mode 100644 index 00000000000..ef1ca57e4a1 --- /dev/null +++ b/src/licensedcode/data/licenses/x11-swapped.LICENSE @@ -0,0 +1,37 @@ +--- +key: x11-swapped +short_name: X11 swapped final paragraphs +name: X11 swapped final paragraphs +category: Permissive +owner: Derick Eddington +notes: | + Added in SPDX license list 3.25 + This was previously the license rule: x11-xconsortium_37.RULE + The no advert paragraph has its position switched with the warranty disclaimer in this variant. + The texts are otherwise essentially the same See https://github.com/achillean/shodan-python/blob/90491308971a7ba6e358d6152d7b02307964c6fe/LICENSE +spdx_license_key: X11-swapped +other_urls: + - https://github.com/fedeinthemix/chez-srfi/blob/master/srfi/LICENSE +--- + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +Except as contained in this notice, the name(s) of the above copyright +holders shall not be used in advertising or otherwise to promote the sale, +use or other dealings in this Software without prior written authorization. + +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. 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. \ No newline at end of file diff --git a/src/licensedcode/data/rules/agpl-3.0-plus_11.RULE b/src/licensedcode/data/rules/agpl-3.0-plus_11.RULE index 92c4ac35c0e..94757c983de 100644 --- a/src/licensedcode/data/rules/agpl-3.0-plus_11.RULE +++ b/src/licensedcode/data/rules/agpl-3.0-plus_11.RULE @@ -5,8 +5,8 @@ ignorable_urls: - http://www.gnu.org/licenses --- -is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. +is free software: you can redistribute it and/or modify it under the terms of the {{GNU Affero General Public License}} as published by the Free Software Foundation, {{either version 3 of the License, or (at your option) any later version.}} 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 Affero General Public License for more details. -You should have received a copy of the GNU Affero General Public License along with . If not, see http://www.gnu.org/licenses/. \ No newline at end of file +You should have received a copy of the GNU Affero General Public License along with . If not, see http://www.gnu.org/licenses/. diff --git a/src/licensedcode/data/rules/agpl-3.0-plus_161.RULE b/src/licensedcode/data/rules/agpl-3.0-plus_161.RULE index 3f04712788b..aaeb1c1cea8 100644 --- a/src/licensedcode/data/rules/agpl-3.0-plus_161.RULE +++ b/src/licensedcode/data/rules/agpl-3.0-plus_161.RULE @@ -7,5 +7,5 @@ referenced_filenames: --- This script is part of GNU Ghostscript and is distributed under -the terms of the GNU Affero General Public License. See the file COPYING -for more information. \ No newline at end of file +the terms of the {{GNU Affero General Public License.}} See the file COPYING +for more information. diff --git a/src/licensedcode/data/rules/agpl-3.0-plus_298.RULE b/src/licensedcode/data/rules/agpl-3.0-plus_298.RULE new file mode 100644 index 00000000000..65ec146f777 --- /dev/null +++ b/src/licensedcode/data/rules/agpl-3.0-plus_298.RULE @@ -0,0 +1,18 @@ +--- +license_expression: agpl-3.0-plus +is_license_notice: yes +ignorable_urls: + - https://www.gnu.org/licenses/ +--- + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU Affero 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 Affero General Public License along +with this program. If not, see . \ No newline at end of file diff --git a/src/licensedcode/data/rules/agpl-3.0-plus_2981.RULE b/src/licensedcode/data/rules/agpl-3.0-plus_2981.RULE new file mode 100644 index 00000000000..c9cb1eeab00 --- /dev/null +++ b/src/licensedcode/data/rules/agpl-3.0-plus_2981.RULE @@ -0,0 +1,796 @@ +--- +license_expression: agpl-3.0-plus +is_license_text: yes +minimum_coverage: 90 +ignorable_copyrights: + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org +ignorable_holders: + - Free Software Foundation, Inc. +ignorable_urls: + - https://fsf.org/ + - https://www.gnu.org/licenses/ +--- + +This program is free software: you can redistribute it and/or modify it under the terms of the {{GNU Affero 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 Affero General Public License for more details. +You should have received a copy of the GNU Affero General Public License along with this program. If not, see . + + + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + Preamble + + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + + The precise terms and conditions for copying, distribution and +modification follow. + + + TERMS AND CONDITIONS + + + 0. Definitions. + + + "This License" refers to version 3 of the GNU Affero General Public License. + + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + + A "covered work" means either the unmodified Program or a work based +on the Program. + + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + + 1. Source Code. + + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + + The Corresponding Source for a work in source code form is that +same work. + + + 2. Basic Permissions. + + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + + 4. Conveying Verbatim Copies. + + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + + 5. Conveying Modified Source Versions. + + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + + 6. Conveying Non-Source Forms. + + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + + 7. Additional Terms. + + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + + 8. Termination. + + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + + 9. Acceptance Not Required for Having Copies. + + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + + 10. Automatic Licensing of Downstream Recipients. + + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + + 11. Patents. + + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + + 12. No Surrender of Others' Freedom. + + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + + 13. Remote Network Interaction; Use with the GNU General Public License. + + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + + 14. Revised Versions of this License. + + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + + 15. Disclaimer of Warranty. + + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + + 16. Limitation of Liability. + + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + + 17. Interpretation of Sections 15 and 16. + + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + + END OF TERMS AND CONDITIONS + + + How to Apply These Terms to Your New Programs + + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + + Copyright (C) + + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero 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 Affero General Public License for more details. + + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + + +Also add information on how to contact you by electronic and paper mail. + + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. \ No newline at end of file diff --git a/src/licensedcode/data/rules/agpl-3.0-plus_299.RULE b/src/licensedcode/data/rules/agpl-3.0-plus_299.RULE new file mode 100644 index 00000000000..a8722f98d3b --- /dev/null +++ b/src/licensedcode/data/rules/agpl-3.0-plus_299.RULE @@ -0,0 +1,18 @@ +--- +license_expression: agpl-3.0-plus +is_license_notice: yes +ignorable_urls: + - http://www.gnu.org/licenses/ +--- + +This program is free software: you can redistribute it and/or modify it under +the terms of the GNU Affero 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 Affero General Public License along +with this program. If not, see . \ No newline at end of file diff --git a/src/licensedcode/data/rules/agpl-3.0-plus_or_commercial-license_3.RULE b/src/licensedcode/data/rules/agpl-3.0-plus_or_commercial-license_3.RULE index 161d4f31dbc..14e58e483f2 100644 --- a/src/licensedcode/data/rules/agpl-3.0-plus_or_commercial-license_3.RULE +++ b/src/licensedcode/data/rules/agpl-3.0-plus_or_commercial-license_3.RULE @@ -4,6 +4,7 @@ is_license_notice: yes relevance: 100 ignorable_urls: - https://www.gnu.org/licenses/ +is_deprecated: yes --- This program is free software: you can redistribute it and/or modify it under diff --git a/src/licensedcode/data/rules/agpl-3.0-plus_or_commercial-license_4.RULE b/src/licensedcode/data/rules/agpl-3.0-plus_or_commercial-license_4.RULE index 5b46b1c5e9d..fa3b3ceeec5 100644 --- a/src/licensedcode/data/rules/agpl-3.0-plus_or_commercial-license_4.RULE +++ b/src/licensedcode/data/rules/agpl-3.0-plus_or_commercial-license_4.RULE @@ -4,6 +4,7 @@ is_license_notice: yes relevance: 100 ignorable_urls: - http://www.gnu.org/licenses/ +is_deprecated: yes --- This program is free software: you can redistribute it and/or modify it under diff --git a/src/licensedcode/data/rules/agpl-3.0-plus_with_erlang-otp-linking-exception_1.RULE b/src/licensedcode/data/rules/agpl-3.0-plus_with_erlang-otp-linking-exception_1.RULE new file mode 100644 index 00000000000..27921d77be7 --- /dev/null +++ b/src/licensedcode/data/rules/agpl-3.0-plus_with_erlang-otp-linking-exception_1.RULE @@ -0,0 +1,36 @@ +--- +license_expression: agpl-3.0-plus WITH erlang-otp-linking-exception +is_license_text: yes +minimum_coverage: 90 +ignorable_urls: + - http://www.erlang.org/ + - http://www.erlang.org/EPLICENSE + - http://www.gnu.org/licenses/ +--- + +%% This program is free software; you can redistribute it and/or modify +%% it under the terms of the GNU Affero 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 Affero General Public License +%% along with this program. If not, see . +%% +%% Additional Permission under GNU AGPL version 3 section 7: +%% +%% If you modify this Program, or any covered work, by linking or +%% combining it with runtime libraries of Erlang/OTP as released by +%% Ericsson on http://www.erlang.org (or a modified version of these +%% libraries), containing parts covered by the terms of the Erlang Public +%% License (http://www.erlang.org/EPLICENSE), the licensors of this +%% Program grant you additional permission to convey the resulting work +%% without the need to license the runtime libraries of Erlang/OTP under +%% the GNU Affero General Public License. Corresponding Source for a +%% non-source form of such a combination shall include the source code +%% for the parts of the runtime libraries of Erlang/OTP used as well as +%% that of the covered work. \ No newline at end of file diff --git a/src/licensedcode/data/rules/agpl-3.0.SPDX.RULE b/src/licensedcode/data/rules/agpl-3.0.SPDX.RULE index f248bc5c85e..61e0a79a650 100644 --- a/src/licensedcode/data/rules/agpl-3.0.SPDX.RULE +++ b/src/licensedcode/data/rules/agpl-3.0.SPDX.RULE @@ -4,7 +4,7 @@ is_license_text: yes minimum_coverage: 10 notes: license text as published by SPDX ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_149.RULE b/src/licensedcode/data/rules/agpl-3.0_149.RULE index 805e4162bd8..341631364f6 100644 --- a/src/licensedcode/data/rules/agpl-3.0_149.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_149.RULE @@ -3,7 +3,7 @@ license_expression: agpl-3.0 is_license_text: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_150.RULE b/src/licensedcode/data/rules/agpl-3.0_150.RULE index 2143dc9fe88..e96e208d98e 100644 --- a/src/licensedcode/data/rules/agpl-3.0_150.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_150.RULE @@ -3,7 +3,7 @@ license_expression: agpl-3.0 is_license_text: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_156.RULE b/src/licensedcode/data/rules/agpl-3.0_156.RULE index 8ba82fc0568..8dcb80852a6 100644 --- a/src/licensedcode/data/rules/agpl-3.0_156.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_156.RULE @@ -4,7 +4,7 @@ is_license_text: yes relevance: 95 notes: truncated license text ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_157.RULE b/src/licensedcode/data/rules/agpl-3.0_157.RULE index 80dbd5bfec1..dbe2062140a 100644 --- a/src/licensedcode/data/rules/agpl-3.0_157.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_157.RULE @@ -4,7 +4,7 @@ is_license_text: yes relevance: 95 notes: truncated text ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_158.RULE b/src/licensedcode/data/rules/agpl-3.0_158.RULE index 4d1c9178b16..602fdcaaac1 100644 --- a/src/licensedcode/data/rules/agpl-3.0_158.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_158.RULE @@ -3,7 +3,7 @@ license_expression: agpl-3.0 is_license_text: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_159.RULE b/src/licensedcode/data/rules/agpl-3.0_159.RULE index b31b8e8b50e..94e41175e6d 100644 --- a/src/licensedcode/data/rules/agpl-3.0_159.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_159.RULE @@ -3,7 +3,7 @@ license_expression: agpl-3.0 is_license_text: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_160.RULE b/src/licensedcode/data/rules/agpl-3.0_160.RULE index 1cea521293c..d506a6f6ad8 100644 --- a/src/licensedcode/data/rules/agpl-3.0_160.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_160.RULE @@ -3,7 +3,7 @@ license_expression: agpl-3.0 is_license_text: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_27.RULE b/src/licensedcode/data/rules/agpl-3.0_27.RULE index d80d97eee50..d01ccde8298 100644 --- a/src/licensedcode/data/rules/agpl-3.0_27.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_27.RULE @@ -2,7 +2,7 @@ license_expression: agpl-3.0 is_license_text: yes ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_279.RULE b/src/licensedcode/data/rules/agpl-3.0_279.RULE index 26194056c3c..7131b07b1fb 100644 --- a/src/licensedcode/data/rules/agpl-3.0_279.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_279.RULE @@ -4,7 +4,7 @@ is_license_text: yes relevance: 100 notes: minor variant with copyright sign ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_335.RULE b/src/licensedcode/data/rules/agpl-3.0_335.RULE index 57540949f12..ab2db3376a6 100644 --- a/src/licensedcode/data/rules/agpl-3.0_335.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_335.RULE @@ -3,7 +3,7 @@ license_expression: agpl-3.0 is_license_text: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_338.RULE b/src/licensedcode/data/rules/agpl-3.0_338.RULE index 107441e10b3..7aa8c254115 100644 --- a/src/licensedcode/data/rules/agpl-3.0_338.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_338.RULE @@ -5,7 +5,7 @@ relevance: 100 minimum_coverage: 99 notes: oodoo agpl ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_351.RULE b/src/licensedcode/data/rules/agpl-3.0_351.RULE index 4a109d6f1ba..c4dd3940101 100644 --- a/src/licensedcode/data/rules/agpl-3.0_351.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_351.RULE @@ -3,7 +3,7 @@ license_expression: agpl-3.0 is_license_text: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_352.RULE b/src/licensedcode/data/rules/agpl-3.0_352.RULE index 10b5aa88fbe..98bb171b987 100644 --- a/src/licensedcode/data/rules/agpl-3.0_352.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_352.RULE @@ -3,7 +3,7 @@ license_expression: agpl-3.0 is_license_text: yes notes: uses an https URL ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_4.RULE b/src/licensedcode/data/rules/agpl-3.0_4.RULE index 190512f51c8..f07d482d83f 100644 --- a/src/licensedcode/data/rules/agpl-3.0_4.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_4.RULE @@ -4,7 +4,7 @@ is_license_text: yes minimum_coverage: 99 notes: oodoo agpl ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/agpl-3.0_408.RULE b/src/licensedcode/data/rules/agpl-3.0_408.RULE new file mode 100644 index 00000000000..d8c22771113 --- /dev/null +++ b/src/licensedcode/data/rules/agpl-3.0_408.RULE @@ -0,0 +1,7 @@ +--- +license_expression: agpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +available under the "AGPLv3" license \ No newline at end of file diff --git a/src/licensedcode/data/rules/agpl-3.0_or_commercial-license_8.RULE b/src/licensedcode/data/rules/agpl-3.0_or_commercial-license_8.RULE new file mode 100644 index 00000000000..4be93b37a70 --- /dev/null +++ b/src/licensedcode/data/rules/agpl-3.0_or_commercial-license_8.RULE @@ -0,0 +1,14 @@ +--- +license_expression: agpl-3.0 OR commercial-license +is_license_notice: yes +referenced_filenames: + - LICENSE.AGPL3 +ignorable_urls: + - http://www.gnu.org/licenses +--- + +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. + +Commercial License Usage Licensees holding valid commercial project licenses may use this file in accordance with the commercial license agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Inc. For licensing terms and conditions and further information contact us at . + +GNU Affero General Public License Usage Alternatively, this file may be used under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation and appearing in the file LICENSE.AGPL3 included in the packaging of this file, or alternatively found in http://www.gnu.org/licenses/. \ No newline at end of file diff --git a/src/licensedcode/data/rules/agpl-3.0_with_agpl-generic-additional-terms_5.RULE b/src/licensedcode/data/rules/agpl-3.0_with_agpl-generic-additional-terms_5.RULE index 993bc6eb41e..841e2c75409 100644 --- a/src/licensedcode/data/rules/agpl-3.0_with_agpl-generic-additional-terms_5.RULE +++ b/src/licensedcode/data/rules/agpl-3.0_with_agpl-generic-additional-terms_5.RULE @@ -3,7 +3,7 @@ license_expression: agpl-3.0 WITH agpl-generic-additional-terms is_license_notice: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 2013 Openlabs + - Copyright (c) 2013 Openlabs http://openlabs.co.in ignorable_holders: - Openlabs ignorable_urls: diff --git a/src/licensedcode/data/rules/apache-1.1_114.RULE b/src/licensedcode/data/rules/apache-1.1_114.RULE index b8271de05f0..28345c0a6a7 100644 --- a/src/licensedcode/data/rules/apache-1.1_114.RULE +++ b/src/licensedcode/data/rules/apache-1.1_114.RULE @@ -10,7 +10,6 @@ ignorable_holders: - Leo Galambos ignorable_authors: - the Egothor Project - - the Egothor Project. Under ignorable_urls: - http://egothor.sf.net/ ignorable_emails: @@ -71,4 +70,4 @@ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file +OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/licensedcode/data/rules/apache-1.1_116.RULE b/src/licensedcode/data/rules/apache-1.1_116.RULE index 6880589c76b..7d13be76794 100644 --- a/src/licensedcode/data/rules/apache-1.1_116.RULE +++ b/src/licensedcode/data/rules/apache-1.1_116.RULE @@ -2,7 +2,7 @@ license_expression: apache-1.1 is_license_notice: yes ignorable_authors: - - the Apache Software Foundation + - the Apache Software Foundation ( http://www.apache.org ) ignorable_urls: - http://www.apache.org/ - http://www.apache.org/licenses/LICENSE-1.1 diff --git a/src/licensedcode/data/rules/apache-2.0_1213.RULE b/src/licensedcode/data/rules/apache-2.0_1213.RULE index b4f27d829d0..013bc4c464f 100644 --- a/src/licensedcode/data/rules/apache-2.0_1213.RULE +++ b/src/licensedcode/data/rules/apache-2.0_1213.RULE @@ -2,7 +2,7 @@ license_expression: apache-2.0 is_license_notice: yes ignorable_authors: - - the Apache Software Foundation + - the Apache Software Foundation ( http://www.apache.org ) ignorable_urls: - http://www.apache.org/ - http://www.apache.org/licenses/ diff --git a/src/licensedcode/data/rules/apache-2.0_1223.RULE b/src/licensedcode/data/rules/apache-2.0_1223.RULE index 79e6c5654b9..8e6f81269c0 100644 --- a/src/licensedcode/data/rules/apache-2.0_1223.RULE +++ b/src/licensedcode/data/rules/apache-2.0_1223.RULE @@ -2,7 +2,7 @@ license_expression: apache-2.0 is_license_notice: yes ignorable_copyrights: - - copyright (c) 2000-2003, BEA Systems, + - copyright (c) 2000-2003, BEA Systems, http://www.bea.com ignorable_holders: - BEA Systems ignorable_urls: diff --git a/src/licensedcode/data/rules/apache-2.0_1297.RULE b/src/licensedcode/data/rules/apache-2.0_1297.RULE index c19cd20ccf6..6e2ea9e3fa1 100644 --- a/src/licensedcode/data/rules/apache-2.0_1297.RULE +++ b/src/licensedcode/data/rules/apache-2.0_1297.RULE @@ -3,6 +3,10 @@ license_expression: apache-2.0 is_license_notice: yes ignorable_urls: - http://www.apache.org/licenses/LICENSE-2.0 +ignorable_copyrights: + - Copyright (c), Oracle and/or its affiliates +ignorable_holders: + - Oracle and/or its affiliates --- The Apache Software License, Version 2.0 @@ -16,4 +20,4 @@ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -Apache License Version 2.0, January 2004 \ No newline at end of file +Apache License Version 2.0, January 2004 diff --git a/src/licensedcode/data/rules/apache-2.0_1359.RULE b/src/licensedcode/data/rules/apache-2.0_1359.RULE new file mode 100644 index 00000000000..35b93f6ad8e --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_1359.RULE @@ -0,0 +1,212 @@ +--- +license_expression: apache-2.0 +is_license_text: yes +relevance: 99 +notes: Damaged Apache license https://github.com/bopopescu/kubepack/blob/00a7dd88be22004e28a4b9df1b1320a6d73cd462/LICENSE#L9 + with some possible mistake replacements leading to rebundleion non-sense +ignorable_urls: + - http://www.apache.org/licenses/ + - http://www.apache.org/licenses/LICENSE-2.0 +--- + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, rebundleion, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, rebundleion, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + rebundleion, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or bundle names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/src/licensedcode/data/rules/apache-2.0_1360.RULE b/src/licensedcode/data/rules/apache-2.0_1360.RULE new file mode 100644 index 00000000000..454a7068889 --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_1360.RULE @@ -0,0 +1,206 @@ +--- +license_expression: apache-2.0 +is_license_text: yes +relevance: 99 +notes: Damaged Apache license text https://github.com/arsham/retry/blob/39b40b5e420c3eda11b3d355ca269c9bfa5ee710/LICENSE#L56 +ignorable_copyrights: + - Copyright 2020 Arsham Shirvani +ignorable_holders: + - Arsham Shirvani +ignorable_urls: + - http://www.apache.org/licenses/ + - http://www.apache.org/licenses/LICENSE-2.0 +ignorable_emails: + - arshamshirvani@gmail.com +--- + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written token sent + to the Licensor or its representatives, including but not limited to + token on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding token that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2020 Arsham Shirvani + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/src/licensedcode/data/rules/apache-2.0_1361.RULE b/src/licensedcode/data/rules/apache-2.0_1361.RULE new file mode 100644 index 00000000000..226af0b237a --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_1361.RULE @@ -0,0 +1,10 @@ +--- +license_expression: apache-2.0 +is_license_notice: yes +relevance: 100 +ignorable_urls: + - http://www.openssl.org/ +--- + +* Parts of this code are based on the OpenSSL implementation of AES: + * http://www.openssl.org \ No newline at end of file diff --git a/src/licensedcode/data/rules/apache-2.0_1362.RULE b/src/licensedcode/data/rules/apache-2.0_1362.RULE new file mode 100644 index 00000000000..8eaeb4a09f3 --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_1362.RULE @@ -0,0 +1,10 @@ +--- +license_expression: apache-2.0 +is_license_tag: yes +is_continuous: yes +relevance: 100 +--- + +{{License: Apache-2 + +License: Apache-2}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/apache-2.0_1363.RULE b/src/licensedcode/data/rules/apache-2.0_1363.RULE new file mode 100644 index 00000000000..57b2414d1ae --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_1363.RULE @@ -0,0 +1,13 @@ +--- +license_expression: apache-2.0 +is_license_notice: yes +referenced_filenames: + - LICENSE.txt +--- + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: [package root]/LICENSE.txt +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and limitations under the License. \ No newline at end of file diff --git a/src/licensedcode/data/rules/apache-2.0_1364.RULE b/src/licensedcode/data/rules/apache-2.0_1364.RULE new file mode 100644 index 00000000000..19593e77f31 --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_1364.RULE @@ -0,0 +1,7 @@ +--- +license_expression: apache-2.0 +is_license_notice: yes +relevance: 100 +--- + +released under the Apache License, version 2.0 (Apache-2.0) \ No newline at end of file diff --git a/src/licensedcode/data/rules/apache-2.0_and_other-permissive_5.RULE b/src/licensedcode/data/rules/apache-2.0_and_other-permissive_5.RULE new file mode 100644 index 00000000000..86c0d4a3b27 --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_and_other-permissive_5.RULE @@ -0,0 +1,15 @@ +--- +license_expression: apache-2.0 AND other-permissive +is_license_notice: yes +referenced_filenames: + - LICENSE.txt +ignorable_urls: + - https://github.com/cython/cython/blob/master/LICENSE.txt +--- + +License + +The original Pyrex program was licensed "free of restrictions" (see below). +Cython itself is licensed under the permissive **Apache License**. + +See `LICENSE.txt `_. \ No newline at end of file diff --git a/src/licensedcode/data/rules/apache-2.0_and_other-permissive_6.RULE b/src/licensedcode/data/rules/apache-2.0_and_other-permissive_6.RULE new file mode 100644 index 00000000000..60ef9306ee0 --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_and_other-permissive_6.RULE @@ -0,0 +1,9 @@ +--- +license_expression: apache-2.0 AND other-permissive +is_license_notice: yes +--- + +License: + +The original Pyrex program was licensed "free of restrictions" (see below). +Cython itself is licensed under the permissive **Apache License**. \ No newline at end of file diff --git a/src/licensedcode/data/rules/apache-2.0_and_other-permissive_7.RULE b/src/licensedcode/data/rules/apache-2.0_and_other-permissive_7.RULE new file mode 100644 index 00000000000..3b513ad3582 --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_and_other-permissive_7.RULE @@ -0,0 +1,7 @@ +--- +license_expression: apache-2.0 AND other-permissive +is_license_notice: yes +--- + +The original Pyrex program was licensed "free of restrictions" (see below). +Cython itself is licensed under the permissive **Apache License**. \ No newline at end of file diff --git a/src/licensedcode/data/rules/apache-2.0_and_proprietary-license_6.RULE b/src/licensedcode/data/rules/apache-2.0_and_proprietary-license_6.RULE new file mode 100644 index 00000000000..6c39ca95c5d --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_and_proprietary-license_6.RULE @@ -0,0 +1,27 @@ +--- +license_expression: apache-2.0 AND proprietary-license +is_license_notice: yes +minimum_coverage: 80 +ignorable_urls: + - http://www.apache.org/licenses/LICENSE-2.0 + - https://github.com/rcbops/opencenter +--- + +OpenCenter is licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. This +version of OpenCenter includes Rackspace trademarks and logos, and in +accordance with Section 6 of the License, the provision of commercial +support services in conjunction with a version of OpenCenter which includes +Rackspace trademarks and logos is prohibited. OpenCenter source code and +details are available at: # https://github.com/rcbops/opencenter or upon +written request. + +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 and a copy, including this +notice, is available in the LICENSE file accompanying this software. + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the # specific language governing permissions and limitations +under the License. \ No newline at end of file diff --git a/src/licensedcode/data/rules/apache-2.0_or_mit_52.RULE b/src/licensedcode/data/rules/apache-2.0_or_mit_52.RULE new file mode 100644 index 00000000000..5d3913266d9 --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_or_mit_52.RULE @@ -0,0 +1,8 @@ +--- +license_expression: apache-2.0 OR mit +is_license_notice: yes +--- + +This component is distributed under the under the {{Apache 2.0 +and MIT}} licenses. The user can choose the license under which they +will be using the software. \ No newline at end of file diff --git a/src/licensedcode/data/rules/apache-2.0_or_mit_53.RULE b/src/licensedcode/data/rules/apache-2.0_or_mit_53.RULE new file mode 100644 index 00000000000..b471ac4894d --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_or_mit_53.RULE @@ -0,0 +1,20 @@ +--- +license_expression: apache-2.0 OR mit +is_license_notice: yes +ignorable_urls: + - http://opensource.org/licenses/MIT + - http://www.apache.org/licenses/LICENSE-2.0 +--- + +@license +.js is dual licensed under both + + 1. The Apache 2.0 License + http://www.apache.org/licenses/LICENSE-2.0 + + and + + 2. The MIT License + http://opensource.org/licenses/MIT + +.js may be distributed under either license. \ No newline at end of file diff --git a/src/licensedcode/data/rules/apache-2.0_or_mit_54.RULE b/src/licensedcode/data/rules/apache-2.0_or_mit_54.RULE new file mode 100644 index 00000000000..d7c099a086c --- /dev/null +++ b/src/licensedcode/data/rules/apache-2.0_or_mit_54.RULE @@ -0,0 +1,20 @@ +--- +license_expression: apache-2.0 OR mit +is_license_notice: yes +ignorable_urls: + - http://opensource.org/licenses/MIT + - http://www.apache.org/licenses/LICENSE-2.0 +--- + +@license + is dual licensed under both + + 1. The Apache 2.0 License + http://www.apache.org/licenses/LICENSE-2.0 + + and + + 2. The MIT License + http://opensource.org/licenses/MIT + + may be distributed under either license. \ No newline at end of file diff --git a/src/licensedcode/data/rules/boost-1.0_88.RULE b/src/licensedcode/data/rules/boost-1.0_88.RULE new file mode 100644 index 00000000000..529c34c51b0 --- /dev/null +++ b/src/licensedcode/data/rules/boost-1.0_88.RULE @@ -0,0 +1,6 @@ +--- +license_expression: boost-1.0 +is_license_notice: yes +--- + +Boost is licensed under the {{"Boost license"}}, which is a short non-copyleft license {{functionally equivalent to the MIT license.}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-2-clause-views_73.RULE b/src/licensedcode/data/rules/bsd-2-clause-views_73.RULE index a38f88ad0d1..07688995568 100644 --- a/src/licensedcode/data/rules/bsd-2-clause-views_73.RULE +++ b/src/licensedcode/data/rules/bsd-2-clause-views_73.RULE @@ -6,4 +6,4 @@ ignorable_urls: - http://github.com/garycourt/uri-js --- -License: http://github.com/garycourt/uri-js \ No newline at end of file +License: {{ http://github.com/garycourt/uri-js }} diff --git a/src/licensedcode/data/rules/bsd-2-clause-views_79.RULE b/src/licensedcode/data/rules/bsd-2-clause-views_79.RULE new file mode 100644 index 00000000000..61a3759ac4a --- /dev/null +++ b/src/licensedcode/data/rules/bsd-2-clause-views_79.RULE @@ -0,0 +1,9 @@ +--- +license_expression: bsd-2-clause-views +is_license_reference: yes +relevance: 100 +ignorable_urls: + - https://github.com/garycourt/uri-js +--- + +License: {{ https://github.com/garycourt/uri-js }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1083.RULE b/src/licensedcode/data/rules/bsd-new_1083.RULE index f04995b0189..fbf43f79493 100644 --- a/src/licensedcode/data/rules/bsd-new_1083.RULE +++ b/src/licensedcode/data/rules/bsd-new_1083.RULE @@ -2,7 +2,8 @@ license_expression: bsd-new is_license_reference: yes is_continuous: yes +relevance: 100 minimum_coverage: 100 --- -BSD 3-clause "New" or "Revised" License \ No newline at end of file +{{BSD 3-clause}} "New" or "Revised" License \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1384.RULE b/src/licensedcode/data/rules/bsd-new_1384.RULE new file mode 100644 index 00000000000..f6467e6d40c --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1384.RULE @@ -0,0 +1,31 @@ +--- +license_expression: bsd-new +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither the name of nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1385.RULE b/src/licensedcode/data/rules/bsd-new_1385.RULE new file mode 100644 index 00000000000..caf7d153161 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1385.RULE @@ -0,0 +1,29 @@ +--- +license_expression: bsd-new +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of ucd nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1386.RULE b/src/licensedcode/data/rules/bsd-new_1386.RULE new file mode 100644 index 00000000000..04220f5e627 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1386.RULE @@ -0,0 +1,13 @@ +--- +license_expression: bsd-new +is_license_notice: yes +referenced_filenames: + - LICENSE +ignorable_urls: + - https://golang.org/LICENSE +--- + +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// See the {{go license}} at https://golang.org/LICENSE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1387.RULE b/src/licensedcode/data/rules/bsd-new_1387.RULE new file mode 100644 index 00000000000..4708fddd18d --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1387.RULE @@ -0,0 +1,9 @@ +--- +license_expression: bsd-new +is_license_notice: yes +ignorable_urls: + - https://golang.org/LICENSE +--- + +This project bundles the following dependencies under the {{Go License}} (https://golang.org/LICENSE). +See bundled license files for details. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1388.RULE b/src/licensedcode/data/rules/bsd-new_1388.RULE new file mode 100644 index 00000000000..c49dee4562c --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1388.RULE @@ -0,0 +1,9 @@ +--- +license_expression: bsd-new +is_license_notice: yes +referenced_filenames: + - LICENSE +--- + +// Use of this source code is governed by a BSD-style +// license that can be found in {{Go LICENSE}} file. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1389.RULE b/src/licensedcode/data/rules/bsd-new_1389.RULE new file mode 100644 index 00000000000..61f93203223 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1389.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new +is_license_reference: yes +relevance: 100 +--- + +The {{Go license}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1390.RULE b/src/licensedcode/data/rules/bsd-new_1390.RULE new file mode 100644 index 00000000000..0893c2fb4a8 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1390.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 100 +--- + +test suite are under the {{Go license}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1391.RULE b/src/licensedcode/data/rules/bsd-new_1391.RULE new file mode 100644 index 00000000000..e81db6a782b --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1391.RULE @@ -0,0 +1,9 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 100 +ignorable_urls: + - https://golang.org/LICENSE +--- + +golang (Google {{Go License}}): https://golang.org/LICENSE \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1392.RULE b/src/licensedcode/data/rules/bsd-new_1392.RULE new file mode 100644 index 00000000000..dfe1ed3a5c9 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1392.RULE @@ -0,0 +1,10 @@ +--- +license_expression: bsd-new +is_license_reference: yes +relevance: 100 +ignorable_urls: + - https://golang.org/LICENSE +--- + +The {{Go license}} can be found here: +// https://golang.org/LICENSE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1393.RULE b/src/licensedcode/data/rules/bsd-new_1393.RULE new file mode 100644 index 00000000000..6be86719604 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1393.RULE @@ -0,0 +1,8 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 100 +--- + +// This file contains code taken from the "go" source tree, governed +// by the {{go license}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1394.RULE b/src/licensedcode/data/rules/bsd-new_1394.RULE new file mode 100644 index 00000000000..4dbfa71e8ea --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1394.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 100 +--- + +Everything in this file is subject to the {{Go license}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1395.RULE b/src/licensedcode/data/rules/bsd-new_1395.RULE new file mode 100644 index 00000000000..c4de8efbce2 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1395.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 100 +--- + +this file is subject to the {{Go license}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1396.RULE b/src/licensedcode/data/rules/bsd-new_1396.RULE new file mode 100644 index 00000000000..07e258848b9 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1396.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 100 +--- + +subject to the {{Go license}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1397.RULE b/src/licensedcode/data/rules/bsd-new_1397.RULE new file mode 100644 index 00000000000..b15d4322fb1 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1397.RULE @@ -0,0 +1,8 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 100 +--- + +License +This driver is released under the {{go license}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1398.RULE b/src/licensedcode/data/rules/bsd-new_1398.RULE new file mode 100644 index 00000000000..0141b64e9d6 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1398.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 100 +--- + +released under the {{go license}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1399.RULE b/src/licensedcode/data/rules/bsd-new_1399.RULE new file mode 100644 index 00000000000..35665fc6233 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1399.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 100 +--- + +under the {{go license}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1400.RULE b/src/licensedcode/data/rules/bsd-new_1400.RULE new file mode 100644 index 00000000000..b0a4017b24c --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1400.RULE @@ -0,0 +1,9 @@ +--- +license_expression: bsd-new +is_license_reference: yes +relevance: 100 +ignorable_urls: + - https://golang.org/LICENSE +--- + +Google {{Go License}}: https://golang.org/LICENSE") \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1401.RULE b/src/licensedcode/data/rules/bsd-new_1401.RULE new file mode 100644 index 00000000000..48c92dcef2a --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1401.RULE @@ -0,0 +1,9 @@ +--- +license_expression: bsd-new +is_license_reference: yes +is_continuous: yes +relevance: 99 +notes: https://github.com/reneoelke/Php53to54/blob/568c351c7e6f66d46267ca90ddd4cc153a1b93c3/LICENCE#L4 +--- + +{{BSD Licence Agreement}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1402.RULE b/src/licensedcode/data/rules/bsd-new_1402.RULE new file mode 100644 index 00000000000..91bbe36667f --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1402.RULE @@ -0,0 +1,9 @@ +--- +license_expression: bsd-new +is_license_reference: yes +is_continuous: yes +relevance: 99 +notes: https://github.com/reneoelke/Php53to54/blob/568c351c7e6f66d46267ca90ddd4cc153a1b93c3/LICENCE#L4 +--- + +{{BSD License Agreement}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1403.RULE b/src/licensedcode/data/rules/bsd-new_1403.RULE new file mode 100644 index 00000000000..752172b6f09 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1403.RULE @@ -0,0 +1,29 @@ +--- +license_expression: bsd-new +is_license_reference: yes +relevance: 99 +referenced_filenames: + - LICENSE +notes: https://github.com/reneoelke/Php53to54/blob/568c351c7e6f66d46267ca90ddd4cc153a1b93c3/LICENCE#L4 +ignorable_urls: + - http://matrix.squiz.net/developer/tools/php_cs/licence +--- + +{{BSD Licence Agreement}} + +This software is available to you under the BSD license, +available in the LICENSE file accompanying this software. +You may obtain a copy of the License at + +http://matrix.squiz.net/developer/tools/php_cs/licence + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1404.RULE b/src/licensedcode/data/rules/bsd-new_1404.RULE new file mode 100644 index 00000000000..5052b7e3e4d --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1404.RULE @@ -0,0 +1,22 @@ +--- +license_expression: bsd-new +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + Neither the name of OWASP nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1405.RULE b/src/licensedcode/data/rules/bsd-new_1405.RULE new file mode 100644 index 00000000000..ed6a3f1f519 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1405.RULE @@ -0,0 +1,31 @@ +--- +license_expression: bsd-new +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +- Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +- Neither the name of the software nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1406.RULE b/src/licensedcode/data/rules/bsd-new_1406.RULE new file mode 100644 index 00000000000..c93beb827ac --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1406.RULE @@ -0,0 +1,31 @@ +--- +license_expression: bsd-new +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1- Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2- Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3- Neither the name of the software nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1407.RULE b/src/licensedcode/data/rules/bsd-new_1407.RULE new file mode 100644 index 00000000000..7ca57130262 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1407.RULE @@ -0,0 +1,29 @@ +--- +license_expression: bsd-new +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +- Neither the name of the software nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1408.RULE b/src/licensedcode/data/rules/bsd-new_1408.RULE new file mode 100644 index 00000000000..a0b2dbbc99f --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1408.RULE @@ -0,0 +1,26 @@ +--- +license_expression: bsd-new +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + Neither my name nor the names of any contributors may be used to endorse + or promote products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL I, THE AUTHOR OF THIS SOFTWARE, BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1409.RULE b/src/licensedcode/data/rules/bsd-new_1409.RULE new file mode 100644 index 00000000000..1b62bb153e0 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1409.RULE @@ -0,0 +1,29 @@ +--- +license_expression: bsd-new +is_license_text: yes +--- + +Redistribution and use of this software in source and binary forms, with or without modification, are +permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above + copyright notice, this list of conditions and the + following disclaimer. + +* Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +* Neither my name nor the names of its contributors may + be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1410.RULE b/src/licensedcode/data/rules/bsd-new_1410.RULE new file mode 100644 index 00000000000..544a61c3775 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1410.RULE @@ -0,0 +1,8 @@ +--- +license_expression: bsd-new +is_license_tag: yes +is_continuous: yes +relevance: 100 +--- + +{{name: BSD 3}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1411.RULE b/src/licensedcode/data/rules/bsd-new_1411.RULE new file mode 100644 index 00000000000..47c454a488a --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1411.RULE @@ -0,0 +1,34 @@ +--- +license_expression: bsd-new +is_license_text: yes +--- + +* $QT_BEGIN_LICENSE:BSD$ * + * You may use this file under the terms of the BSD license as follows: * + * * + * "Redistribution and use in source and binary forms, with or without * + * modification, are permitted provided that the following conditions are * + * met: * + * * Redistributions of source code must retain the above copyright * + * notice, this list of conditions and the following disclaimer. * + * * Redistributions in binary form must reproduce the above copyright * + * notice, this list of conditions and the following disclaimer in * + * the documentation and/or other materials provided with the * + * distribution. * + * * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor * + * the names of its contributors may be used to endorse or promote * + * products derived from this software without specific prior written * + * permission. * + * * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." * + * $QT_END_LICENSE$ * \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1412.RULE b/src/licensedcode/data/rules/bsd-new_1412.RULE new file mode 100644 index 00000000000..e31e094927e --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1412.RULE @@ -0,0 +1,11 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 99 +referenced_filenames: + - LICENSE.WEBKIT +notes: See https://github.com/pulseaudio/pulseaudio/blob/84f5b742e39ba3e375bac9144e0243b7331f4019/src/pulsecore/filter/LICENSE.WEBKIT#L2 +--- + +Use of this source code is {{governed by a BSD-style license that can be +found in the LICENSE.WEBKIT}} file. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1413.RULE b/src/licensedcode/data/rules/bsd-new_1413.RULE new file mode 100644 index 00000000000..2230967c032 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1413.RULE @@ -0,0 +1,29 @@ +--- +license_expression: bsd-new +is_license_text: yes +notes: See https://github.com/pulseaudio/pulseaudio/blob/84f5b742e39ba3e375bac9144e0243b7331f4019/src/pulsecore/filter/LICENSE.WEBKIT#L2 +--- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + Neither the name of Apple Computer, Inc. ("Apple") nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1414.RULE b/src/licensedcode/data/rules/bsd-new_1414.RULE new file mode 100644 index 00000000000..52815ca000f --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1414.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 99 +--- + +It is based on the BSD-licensed implementation \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1415.RULE b/src/licensedcode/data/rules/bsd-new_1415.RULE new file mode 100644 index 00000000000..46f93098c92 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1415.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 99 +--- + +based on the BSD-licensed implementation \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1416.RULE b/src/licensedcode/data/rules/bsd-new_1416.RULE new file mode 100644 index 00000000000..cdabe2278d9 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1416.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 99 +--- + +It is based on the BSD-licensed \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1417.RULE b/src/licensedcode/data/rules/bsd-new_1417.RULE new file mode 100644 index 00000000000..d713e8fdbba --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1417.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 99 +--- + +based on the BSD-licensed \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1418.RULE b/src/licensedcode/data/rules/bsd-new_1418.RULE new file mode 100644 index 00000000000..bf45fd29d05 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1418.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new +is_license_reference: yes +relevance: 100 +--- + +New BSD License (3-clause) \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1419.RULE b/src/licensedcode/data/rules/bsd-new_1419.RULE new file mode 100644 index 00000000000..89a6c0da789 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1419.RULE @@ -0,0 +1,28 @@ +--- +license_expression: bsd-new +is_license_text: yes +--- + +New BSD License (3-clause) + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of , Inc. nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1420.RULE b/src/licensedcode/data/rules/bsd-new_1420.RULE new file mode 100644 index 00000000000..24a041918bd --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1420.RULE @@ -0,0 +1,26 @@ +--- +license_expression: bsd-new +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of , Inc. nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1421.RULE b/src/licensedcode/data/rules/bsd-new_1421.RULE new file mode 100644 index 00000000000..a3b2d4a7711 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1421.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 100 +--- + +This is a BSD-3-Clause license \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_1422.RULE b/src/licensedcode/data/rules/bsd-new_1422.RULE new file mode 100644 index 00000000000..5f6b7eed5a6 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_1422.RULE @@ -0,0 +1,10 @@ +--- +license_expression: bsd-new +is_license_notice: yes +relevance: 99 +referenced_filenames: + - NOTICE.md +--- + +Use of this source code is governed by a BSD-style +license that can be found in the NOTICE.md file. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_541.RULE b/src/licensedcode/data/rules/bsd-new_541.RULE index ab523d63c10..b10caedde73 100644 --- a/src/licensedcode/data/rules/bsd-new_541.RULE +++ b/src/licensedcode/data/rules/bsd-new_541.RULE @@ -2,7 +2,6 @@ license_expression: bsd-new is_license_tag: yes relevance: 100 +is_continuous: yes --- - -License - BSD 3-clause license \ No newline at end of file +{{License BSD 3-clause license}} diff --git a/src/licensedcode/data/rules/bsd-new_878.RULE b/src/licensedcode/data/rules/bsd-new_878.RULE index c969310b7d0..aff143c33dd 100644 --- a/src/licensedcode/data/rules/bsd-new_878.RULE +++ b/src/licensedcode/data/rules/bsd-new_878.RULE @@ -1,7 +1,7 @@ --- license_expression: bsd-new -is_license_reference: yes +is_license_clue: yes relevance: 90 --- -BSD-style \ No newline at end of file +BSD-style diff --git a/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_10.RULE b/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_10.RULE new file mode 100644 index 00000000000..a644fffc7b2 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_10.RULE @@ -0,0 +1,10 @@ +--- +license_expression: bsd-new AND google-patent-license-golang +is_license_notice: yes +relevance: 99 +referenced_filenames: + - LICENSE +notes: Go license also has the patent disclaimer often ignored by downstream re-users +--- + +This code is licensed under the {{same conditions as the original Go code}}. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_11.RULE b/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_11.RULE new file mode 100644 index 00000000000..f634495f20c --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_11.RULE @@ -0,0 +1,8 @@ +--- +license_expression: bsd-new AND google-patent-license-golang +is_license_notice: yes +relevance: 99 +notes: Go license also has the patent disclaimer often ignored by downstream re-users +--- + +licensed under the {{same conditions as the original Go code}}. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_7.RULE b/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_7.RULE new file mode 100644 index 00000000000..beb8207cb81 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_7.RULE @@ -0,0 +1,12 @@ +--- +license_expression: bsd-new AND google-patent-license-golang +is_license_notice: yes +relevance: 99 +referenced_filenames: + - LICENSE +notes: Go license also has the patent disclaimer often ignored by downstream re-users +--- + +# license + +This code is licensed under the {{same conditions as the original Go code}}. See LICENSE file. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_8.RULE b/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_8.RULE new file mode 100644 index 00000000000..77c8a19972c --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_8.RULE @@ -0,0 +1,10 @@ +--- +license_expression: bsd-new AND google-patent-license-golang +is_license_notice: yes +relevance: 99 +referenced_filenames: + - LICENSE +notes: Go license also has the patent disclaimer often ignored by downstream re-users +--- + +This code is licensed under the {{same conditions as the original Go code}}. See LICENSE file. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_9.RULE b/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_9.RULE new file mode 100644 index 00000000000..c36bf13c1f4 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_and_google-patent-license-golang_9.RULE @@ -0,0 +1,10 @@ +--- +license_expression: bsd-new AND google-patent-license-golang +is_license_notice: yes +relevance: 99 +referenced_filenames: + - LICENSE +notes: Go license also has the patent disclaimer often ignored by downstream re-users +--- + +licensed under the {{same conditions as the original Go code}}. See LICENSE file. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_43.RULE b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_43.RULE new file mode 100644 index 00000000000..c03e96260ee --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_43.RULE @@ -0,0 +1,8 @@ +--- +license_expression: bsd-new OR gpl-2.0 +is_license_notice: yes +relevance: 99 +--- + +You may use the project under the terms of either the BSD License or the +GNU General Public License (GPL) Version 2. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_44.RULE b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_44.RULE new file mode 100644 index 00000000000..fa74d1b4342 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_44.RULE @@ -0,0 +1,8 @@ +--- +license_expression: bsd-new OR gpl-2.0 +is_license_notice: yes +relevance: 99 +--- + +* This is part of the Forge project which may be used under the terms of + * either the BSD License or the GNU General Public License (GPL) Version 2. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_45.RULE b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_45.RULE new file mode 100644 index 00000000000..2f9a5700c10 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_45.RULE @@ -0,0 +1,8 @@ +--- +license_expression: bsd-new OR gpl-2.0 +is_license_notice: yes +relevance: 99 +--- + +* This is part of the project which may be used under the terms of + * either the BSD License or the GNU General Public License (GPL) Version 2. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_46.RULE b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_46.RULE new file mode 100644 index 00000000000..28ffd86be29 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_46.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new OR gpl-2.0 +is_license_notice: yes +relevance: 99 +--- + +may be used under the terms of either the BSD License or the GNU General Public License (GPL) Version 2. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_47.RULE b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_47.RULE new file mode 100644 index 00000000000..4aa645b0d01 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_47.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new OR gpl-2.0 +is_license_notice: yes +relevance: 99 +--- + +either the BSD License or the GNU General Public License (GPL) Version 2. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_48.RULE b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_48.RULE new file mode 100644 index 00000000000..0713b2c543c --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_48.RULE @@ -0,0 +1,22 @@ +--- +license_expression: bsd-new OR gpl-2.0 +is_license_notice: yes +relevance: 99 +--- + +You may use the project under the terms of either the BSD License or the +GNU General Public License (GPL) Version 2. + +The BSD License is recommended for most projects. It is simple and easy to +understand and it places almost no restrictions on what you can do with the +Forge project. + + +If the GPL suits your project better you are also free to use under +that license. + + +You don't have to do anything special to choose one license or the other and +you don't have to notify anyone which license you are using. You are free to +use this project in commercial projects as long as the copyright header is +left intact. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_49.RULE b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_49.RULE new file mode 100644 index 00000000000..330f0dec487 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_49.RULE @@ -0,0 +1,8 @@ +--- +license_expression: bsd-new OR gpl-2.0 +is_license_tag: yes +is_continuous: yes +relevance: 100 +--- + +{{license: (BSD-3-Clause OR GPL-2.0)}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_50.RULE b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_50.RULE new file mode 100644 index 00000000000..5b97c3ed841 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_50.RULE @@ -0,0 +1,8 @@ +--- +license_expression: bsd-new OR gpl-2.0 +is_license_tag: yes +is_continuous: yes +relevance: 100 +--- + +{{ (BSD-3-Clause OR GPL-2.0)}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_51.RULE b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_51.RULE new file mode 100644 index 00000000000..91af5f0823f --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_51.RULE @@ -0,0 +1,12 @@ +--- +license_expression: bsd-new OR gpl-2.0 +is_license_notice: yes +relevance: 100 +referenced_filenames: + - License +notes: Seen in libcap in Go +--- + +package is distributed with a "you choose" +License. Specifically: BSD three clause, or GPL2. See the License +file. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_52.RULE b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_52.RULE new file mode 100644 index 00000000000..594f6b8fd2a --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_52.RULE @@ -0,0 +1,11 @@ +--- +license_expression: bsd-new OR gpl-2.0 +is_license_notice: yes +relevance: 100 +referenced_filenames: + - License +notes: Seen in libcap in Go +--- + +package is distributed with a +"you choose" License. Specifically: BSD three clause, or GPL2. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_53.RULE b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_53.RULE new file mode 100644 index 00000000000..056d27aa967 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_53.RULE @@ -0,0 +1,11 @@ +--- +license_expression: bsd-new OR gpl-2.0 +is_license_notice: yes +relevance: 100 +referenced_filenames: + - LICENSE +notes: Seen in libcap in Go +--- + +packages are licensed with a (you choose) BSD +3-clause or GPL2. See LICENSE file for details. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_54.RULE b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_54.RULE new file mode 100644 index 00000000000..dfd4fcde0b2 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_54.RULE @@ -0,0 +1,9 @@ +--- +license_expression: bsd-new OR gpl-2.0 +is_license_notice: yes +relevance: 100 +notes: Seen in libcap in Go +--- + +licensed with a (you choose) {{BSD +3-clause or GPL2.}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_55.RULE b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_55.RULE new file mode 100644 index 00000000000..e445a030d29 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-new_or_gpl-2.0_55.RULE @@ -0,0 +1,9 @@ +--- +license_expression: bsd-new OR gpl-2.0 +is_license_notice: yes +is_continuous: yes +relevance: 100 +notes: Seen in libcap in Go +--- + +{{BSD three clause, or GPL2.}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-original_94.RULE b/src/licensedcode/data/rules/bsd-original_94.RULE new file mode 100644 index 00000000000..331e2229278 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-original_94.RULE @@ -0,0 +1,29 @@ +--- +license_expression: bsd-original +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software. +4. Neither the name of the nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY ''AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY +OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-original_95.RULE b/src/licensedcode/data/rules/bsd-original_95.RULE new file mode 100644 index 00000000000..9c01c92771d --- /dev/null +++ b/src/licensedcode/data/rules/bsd-original_95.RULE @@ -0,0 +1,29 @@ +--- +license_expression: bsd-original +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software. + Neither the name of the nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY ''AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY +OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-original_96.RULE b/src/licensedcode/data/rules/bsd-original_96.RULE new file mode 100644 index 00000000000..f20cdfbdf7a --- /dev/null +++ b/src/licensedcode/data/rules/bsd-original_96.RULE @@ -0,0 +1,13 @@ +--- +license_expression: bsd-original +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software must display the following acknowledgement: +This product includes software developed by . +4. Neither the name of the Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-original_97.RULE b/src/licensedcode/data/rules/bsd-original_97.RULE new file mode 100644 index 00000000000..4878a665082 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-original_97.RULE @@ -0,0 +1,13 @@ +--- +license_expression: bsd-original +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + All advertising materials mentioning features or use of this software must display the following acknowledgement: +This product includes software developed by . + Neither the name of the Software nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-simplified_341.RULE b/src/licensedcode/data/rules/bsd-simplified_341.RULE new file mode 100644 index 00000000000..906cb8e831f --- /dev/null +++ b/src/licensedcode/data/rules/bsd-simplified_341.RULE @@ -0,0 +1,9 @@ +--- +license_expression: bsd-simplified +is_license_notice: yes +relevance: 100 +referenced_filenames: + - LICENSE +--- + +distributed under an [open source license](./LICENSE). A simplified 2-BSD license. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-source-code_29.RULE b/src/licensedcode/data/rules/bsd-source-code_29.RULE new file mode 100644 index 00000000000..7d25dd2924a --- /dev/null +++ b/src/licensedcode/data/rules/bsd-source-code_29.RULE @@ -0,0 +1,27 @@ +--- +license_expression: bsd-source-code +is_license_text: yes +relevance: 99 +minimum_coverage: 95 +notes: minor variants seen in unworkable/bf.c +--- + +Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-source-code_30.RULE b/src/licensedcode/data/rules/bsd-source-code_30.RULE new file mode 100644 index 00000000000..dc691d01114 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-source-code_30.RULE @@ -0,0 +1,24 @@ +--- +license_expression: bsd-source-code +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +* Neither my name nor the names of my contributors may be used to endorse +or promote products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-source-code_31.RULE b/src/licensedcode/data/rules/bsd-source-code_31.RULE new file mode 100644 index 00000000000..d39f322bf1d --- /dev/null +++ b/src/licensedcode/data/rules/bsd-source-code_31.RULE @@ -0,0 +1,24 @@ +--- +license_expression: bsd-source-code +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1 Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +2 Neither my name nor the names of my contributors may be used to endorse +or promote products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-x11_13.RULE b/src/licensedcode/data/rules/bsd-x11_13.RULE new file mode 100644 index 00000000000..3b2a70fa20a --- /dev/null +++ b/src/licensedcode/data/rules/bsd-x11_13.RULE @@ -0,0 +1,32 @@ +--- +license_expression: bsd-x11 +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + Neither my name nor the names of my contributors may be used to + endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsd-x11_14.RULE b/src/licensedcode/data/rules/bsd-x11_14.RULE new file mode 100644 index 00000000000..385b36eb014 --- /dev/null +++ b/src/licensedcode/data/rules/bsd-x11_14.RULE @@ -0,0 +1,26 @@ +--- +license_expression: bsd-x11 +is_license_text: yes +--- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + Neither my name nor the names of any contributors to the + project may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/bsl-1.0_1.RULE b/src/licensedcode/data/rules/bsl-1.0_1.RULE new file mode 100644 index 00000000000..cceb3638254 --- /dev/null +++ b/src/licensedcode/data/rules/bsl-1.0_1.RULE @@ -0,0 +1,14 @@ +--- +license_expression: bsl-1.0 +is_license_notice: yes +referenced_filenames: + - licenses/BSL.txt +--- + +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.txt. +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0, included in the file +// licenses/APL.txt. \ No newline at end of file diff --git a/src/licensedcode/data/rules/c-uda-1.0_8.RULE b/src/licensedcode/data/rules/c-uda-1.0_8.RULE new file mode 100644 index 00000000000..aab5f0ddeba --- /dev/null +++ b/src/licensedcode/data/rules/c-uda-1.0_8.RULE @@ -0,0 +1,8 @@ +--- +license_expression: c-uda-1.0 +is_license_notice: yes +relevance: 100 +notes: https://github.com/microsoft/CodeXGLUE?tab=readme-ov-file#license +--- + +Our datasets follow Computational Use of Data Agreement (C-UDA) License. \ No newline at end of file diff --git a/src/licensedcode/data/rules/cc-by-4.0_116.RULE b/src/licensedcode/data/rules/cc-by-4.0_116.RULE new file mode 100644 index 00000000000..f4c2e95f40e --- /dev/null +++ b/src/licensedcode/data/rules/cc-by-4.0_116.RULE @@ -0,0 +1,12 @@ +--- +license_expression: cc-by-4.0 +is_license_notice: yes +ignorable_urls: + - https://creativecommons.org/licenses/by/4.0/legalcode +--- + +TERMS AND CONDITIONS + +This schema is provided by OASIS, the Copyright Holder, under licence +cc-by 4.0, that can also be found at the URL +https://creativecommons.org/licenses/by/4.0/legalcode \ No newline at end of file diff --git a/src/licensedcode/data/rules/cc-by-4.0_117.RULE b/src/licensedcode/data/rules/cc-by-4.0_117.RULE new file mode 100644 index 00000000000..c21dcb7d3ba --- /dev/null +++ b/src/licensedcode/data/rules/cc-by-4.0_117.RULE @@ -0,0 +1,10 @@ +--- +license_expression: cc-by-4.0 +is_license_notice: yes +ignorable_urls: + - https://creativecommons.org/licenses/by/4.0/legalcode +--- + +under licence +cc-by 4.0, that can also be found at the URL +https://creativecommons.org/licenses/by/4.0/legalcode \ No newline at end of file diff --git a/src/licensedcode/data/rules/cc0-1.0_213.RULE b/src/licensedcode/data/rules/cc0-1.0_213.RULE new file mode 100644 index 00000000000..e999c8fb8c7 --- /dev/null +++ b/src/licensedcode/data/rules/cc0-1.0_213.RULE @@ -0,0 +1,9 @@ +--- +license_expression: cc0-1.0 +is_license_notice: yes +relevance: 100 +ignorable_urls: + - https://creativecommons.org/choose/zero/ +--- + +made available under a [Creative Commons Zero] {{ https://creativecommons.org/choose/zero/ }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/cc0-1.0_214.RULE b/src/licensedcode/data/rules/cc0-1.0_214.RULE new file mode 100644 index 00000000000..0b95156ed70 --- /dev/null +++ b/src/licensedcode/data/rules/cc0-1.0_214.RULE @@ -0,0 +1,9 @@ +--- +license_expression: cc0-1.0 +is_license_notice: yes +relevance: 100 +ignorable_urls: + - https://creativecommons.org/choose/zero/ +--- + +available under a [Creative Commons Zero] {{ https://creativecommons.org/choose/zero/ }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/cc0-1.0_215.RULE b/src/licensedcode/data/rules/cc0-1.0_215.RULE new file mode 100644 index 00000000000..839775cfd23 --- /dev/null +++ b/src/licensedcode/data/rules/cc0-1.0_215.RULE @@ -0,0 +1,9 @@ +--- +license_expression: cc0-1.0 +is_license_reference: yes +relevance: 100 +ignorable_urls: + - https://creativecommons.org/choose/zero/ +--- + +[Creative Commons Zero] {{ https://creativecommons.org/choose/zero/ }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/cc0-1.0_216.RULE b/src/licensedcode/data/rules/cc0-1.0_216.RULE new file mode 100644 index 00000000000..13d9d5c73bb --- /dev/null +++ b/src/licensedcode/data/rules/cc0-1.0_216.RULE @@ -0,0 +1,10 @@ +--- +license_expression: cc0-1.0 +is_license_reference: yes +is_continuous: yes +relevance: 100 +ignorable_urls: + - https://creativecommons.org/choose/zero/ +--- + +{{ https://creativecommons.org/choose/zero/ }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/cc0-1.0_217.RULE b/src/licensedcode/data/rules/cc0-1.0_217.RULE new file mode 100644 index 00000000000..0be316f947c --- /dev/null +++ b/src/licensedcode/data/rules/cc0-1.0_217.RULE @@ -0,0 +1,21 @@ +--- +license_expression: cc0-1.0 +is_license_notice: yes +referenced_filenames: + - LICENSE +ignorable_urls: + - https://creativecommons.org/publicdomain/zero/1.0 +--- + +License ## + +This project is in the worldwide [public domain](LICENSE). + +This project is in the public domain within the United States, and +copyright and related rights in the work worldwide are waived through +the [CC0 1.0 Universal public domain +dedication](https://creativecommons.org/publicdomain/zero/1.0/). + +All contributions to this project will be released under the CC0 +dedication. By submitting a pull request, you are agreeing to comply +with this waiver of copyright interest. \ No newline at end of file diff --git a/src/licensedcode/data/rules/cc0-1.0_218.RULE b/src/licensedcode/data/rules/cc0-1.0_218.RULE new file mode 100644 index 00000000000..a1e83ac04e7 --- /dev/null +++ b/src/licensedcode/data/rules/cc0-1.0_218.RULE @@ -0,0 +1,17 @@ +--- +license_expression: cc0-1.0 +is_license_notice: yes +referenced_filenames: + - LICENSE +ignorable_urls: + - https://creativecommons.org/publicdomain/zero/1.0 +--- + +License ## + +This project is in the worldwide [public domain](LICENSE). + +This project is in the public domain within the United States, and +copyright and related rights in the work worldwide are waived through +the [CC0 1.0 Universal public domain +dedication](https://creativecommons.org/publicdomain/zero/1.0/). \ No newline at end of file diff --git a/src/licensedcode/data/rules/cc0-1.0_or_gpl-1.0-plus_1.RULE b/src/licensedcode/data/rules/cc0-1.0_or_gpl-1.0-plus_1.RULE new file mode 100644 index 00000000000..e428678bb52 --- /dev/null +++ b/src/licensedcode/data/rules/cc0-1.0_or_gpl-1.0-plus_1.RULE @@ -0,0 +1,9 @@ +--- +license_expression: cc0-1.0 OR gpl-1.0-plus +is_license_notice: yes +referenced_filenames: + - license.txt + - Licenses/CC0-1.0.txt +--- + +The following files are released into the public domain and can be distributed under the terms and conditions of the Creative Commons 0 license (See Licenses/CC0-1.0.txt). For any areas that do not legally accept the public domain or CC0 these files can be distributed under the terms and conditions of the GPL (See license.txt): \ No newline at end of file diff --git a/src/licensedcode/data/rules/commercial-license_99.RULE b/src/licensedcode/data/rules/commercial-license_99.RULE new file mode 100644 index 00000000000..a8de96043ce --- /dev/null +++ b/src/licensedcode/data/rules/commercial-license_99.RULE @@ -0,0 +1,9 @@ +--- +license_expression: commercial-license +is_license_notice: yes +relevance: 100 +referenced_filenames: + - ee/LICENSE +--- + +this repository (Commercial License) is licensed under the license defined in "ee/LICENSE". \ No newline at end of file diff --git a/src/licensedcode/data/rules/commercial-license_and_agpl-3.0_1.RULE b/src/licensedcode/data/rules/commercial-license_and_agpl-3.0_1.RULE new file mode 100644 index 00000000000..3cb1f125d4e --- /dev/null +++ b/src/licensedcode/data/rules/commercial-license_and_agpl-3.0_1.RULE @@ -0,0 +1,54 @@ +--- +license_expression: commercial-license AND agpl-3.0 +is_license_notice: yes +minimum_coverage: 90 +ignorable_copyrights: + - Copyright (c) 2020-present Cal.com, Inc +ignorable_holders: + - Cal.com, Inc +ignorable_urls: + - https://cal.com/terms +--- + +The Cal.com Commercial License (the “Commercial License”) +Copyright (c) 2020-present Cal.com, Inc + +With regard to the Cal.com Software: + +This software and associated documentation files (the "Software") may only be +used in production, if you (and any entity that you represent) have agreed to, +and are in compliance with, the Cal.com Subscription Terms available +at https://cal.com/terms, or other agreements governing +the use of the Software, as mutually agreed by you and Cal.com, Inc ("Cal.com"), +and otherwise have a valid Cal.com Enterprise Edition subscription ("Commercial Subscription") +for the correct number of hosts as defined in the "Commercial Terms ("Hosts"). Subject to the foregoing sentence, +you are free to modify this Software and publish patches to the Software. You agree +that Cal.com and/or its licensors (as applicable) retain all right, title and interest in +and to all such modifications and/or patches, and all such modifications and/or +patches may only be used, copied, modified, displayed, distributed, or otherwise +exploited with a valid Commercial Subscription for the correct number of hosts. +Notwithstanding the foregoing, you may copy and modify the Software for development +and testing purposes, without requiring a subscription. You agree that Cal.com and/or +its licensors (as applicable) retain all right, title and interest in and to all such +modifications. You are not granted any other rights beyond what is expressly stated herein. +Subject to the foregoing, it is forbidden to copy, merge, publish, distribute, sublicense, +and/or sell the Software. + +This Commercial License applies only to the part of this Software that is not distributed under +the AGPLv3 license. Any part of this Software distributed under the MIT license or which +is served client-side as an image, font, cascading stylesheet (CSS), file which produces +or is compiled, arranged, augmented, or combined into client-side JavaScript, in whole or +in part, is copyrighted under the AGPLv3 license. The full text of this Commercial License shall +be included in all copies or substantial portions of the Software. + +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. 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. + +For all third party components incorporated into the Cal.com Software, those +components are licensed under the original license provided by the owner of the +applicable component. \ No newline at end of file diff --git a/src/licensedcode/data/rules/cpl-1.0_44.RULE b/src/licensedcode/data/rules/cpl-1.0_44.RULE new file mode 100644 index 00000000000..7d75870006a --- /dev/null +++ b/src/licensedcode/data/rules/cpl-1.0_44.RULE @@ -0,0 +1,8 @@ +--- +license_expression: cpl-1.0 +is_license_reference: yes +relevance: 90 +minimum_coverage: 100 +--- + +(CPL) WSDL4J \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-1.0_12.RULE b/src/licensedcode/data/rules/ecl-1.0_12.RULE new file mode 100644 index 00000000000..66b45e166c8 --- /dev/null +++ b/src/licensedcode/data/rules/ecl-1.0_12.RULE @@ -0,0 +1,58 @@ +--- +license_expression: ecl-1.0 +is_license_notice: yes +relevance: 99 +notes: https://github.com/gitter-badger/javaanpr/blob/dfcac89af94bfc7c81cefe2bb2109d77ab3674d6/LICENCE#L6 +--- + +This Original Work, including software, source code, documents, or +other related items, is being provided by the copyright holder(s) +subject to the terms of the Educational Community License. By +obtaining, using and/or copying this Original Work, you agree that you +have read, understand, and will comply with the following terms and +conditions of the Educational Community License: + +Permission to use, copy, modify, merge, publish, distribute, and +sublicense this Original Work and its documentation, with or without +modification, for any purpose, and without fee or royalty to the +copyright holder(s) is hereby granted, provided that you include the +following on ALL copies of the Original Work or portions thereof, +including modifications or derivatives, that you make: + +The full text of the Educational Community License in a location +viewable to users of the redistributed or derivative work. + +Any pre-existing intellectual property disclaimers, notices, or terms +and conditions. + +Notice of any changes or modifications to the Original Work, +including the date the changes were made. + +Any modifications of the Original Work must be distributed in such a +manner as to avoid any confusion with the Original Work of the +copyright holders. + +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. +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. + +The name and trademarks of copyright holder(s) may NOT be used in +advertising or publicity pertaining to the Original or Derivative Works +without specific, written prior permission. Title to copyright in the +Original Work and any associated documentation will at all times remain +with the copyright holders. + +If you want to alter upon this work, you MUST attribute it in +a) all source files +b) on every place, where is the copyright of derivated work +exactly by the following label : + +---- label begin ---- +This work is a derivate of the is a intellectual +property of . Please visit +for more info about +---- label end ---- \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_20.RULE b/src/licensedcode/data/rules/ecl-2.0_20.RULE new file mode 100644 index 00000000000..5a55a450c08 --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_20.RULE @@ -0,0 +1,12 @@ +--- +license_expression: ecl-2.0 +is_license_notice: yes +ignorable_urls: + - http://opensource.org/licenses/ECL-2.0 +--- + +Licensed under the Educational Community License, Version 2.0 (the +"License"); you may not use this file except in compliance with the +License. You may obtain a copy of the License at + +http://opensource.org/licenses/ECL-2.0 \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_24.RULE b/src/licensedcode/data/rules/ecl-2.0_24.RULE new file mode 100644 index 00000000000..f4c24b75897 --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_24.RULE @@ -0,0 +1,7 @@ +--- +license_expression: ecl-2.0 +is_license_notice: yes +relevance: 100 +--- + +Licensed under the Educational Community License, Version 2.0 \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_25.RULE b/src/licensedcode/data/rules/ecl-2.0_25.RULE new file mode 100644 index 00000000000..ba60e79644a --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_25.RULE @@ -0,0 +1,7 @@ +--- +license_expression: ecl-2.0 +is_license_notice: yes +relevance: 100 +--- + +licensed under the terms of the Educational Community License \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_26.RULE b/src/licensedcode/data/rules/ecl-2.0_26.RULE new file mode 100644 index 00000000000..30cddde4e26 --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_26.RULE @@ -0,0 +1,14 @@ +--- +license_expression: ecl-2.0 +is_license_tag: yes +ignorable_urls: + - http://opensource.org/licenses/ECL-2.0 +--- + + + + Educational Community License, Version 2.0 + http://opensource.org/licenses/ECL-2.0 + repo + + \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_27.RULE b/src/licensedcode/data/rules/ecl-2.0_27.RULE new file mode 100644 index 00000000000..154ec887efd --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_27.RULE @@ -0,0 +1,11 @@ +--- +license_expression: ecl-2.0 +is_license_tag: yes +ignorable_urls: + - http://opensource.org/licenses/ECL-2.0 +--- + + + Educational Community License, Version 2.0 + http://opensource.org/licenses/ECL-2.0 + \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_28.RULE b/src/licensedcode/data/rules/ecl-2.0_28.RULE new file mode 100644 index 00000000000..10b9652d33f --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_28.RULE @@ -0,0 +1,10 @@ +--- +license_expression: ecl-2.0 +is_license_tag: yes +ignorable_urls: + - http://opensource.org/licenses/ECL-2.0 +--- + + + Educational Community License, Version 2.0 + http://opensource.org/licenses/ECL-2.0 \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_29.RULE b/src/licensedcode/data/rules/ecl-2.0_29.RULE new file mode 100644 index 00000000000..0419a79086b --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_29.RULE @@ -0,0 +1,10 @@ +--- +license_expression: ecl-2.0 +is_license_tag: yes +relevance: 100 +ignorable_urls: + - http://opensource.org/licenses/ECL-2.0 +--- + +Educational Community License, Version 2.0 + http://opensource.org/licenses/ECL-2.0 \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_30.RULE b/src/licensedcode/data/rules/ecl-2.0_30.RULE new file mode 100644 index 00000000000..c501fc08af6 --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_30.RULE @@ -0,0 +1,11 @@ +--- +license_expression: ecl-2.0 +is_license_tag: yes +relevance: 100 +ignorable_urls: + - http://opensource.org/licenses/ECL-2.0 +--- + +license +Educational Community License, Version 2.0 +http://opensource.org/licenses/ECL-2.0 \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_31.RULE b/src/licensedcode/data/rules/ecl-2.0_31.RULE new file mode 100644 index 00000000000..77883244fb5 --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_31.RULE @@ -0,0 +1,10 @@ +--- +license_expression: ecl-2.0 +is_license_tag: yes +relevance: 100 +ignorable_urls: + - http://opensource.org/licenses/ECL-2.0 +--- + +Educational Community License, Version 2.0 +http://opensource.org/licenses/ECL-2.0 \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_32.RULE b/src/licensedcode/data/rules/ecl-2.0_32.RULE new file mode 100644 index 00000000000..72fabeb2140 --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_32.RULE @@ -0,0 +1,14 @@ +--- +license_expression: ecl-2.0 +is_license_tag: yes +ignorable_urls: + - http://www.opensource.org/licenses/ecl2.txt +--- + + + + Educational Community License, Version 2.0 + http://www.opensource.org/licenses/ecl2.txt + svn + + \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_33.RULE b/src/licensedcode/data/rules/ecl-2.0_33.RULE new file mode 100644 index 00000000000..80a0233272b --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_33.RULE @@ -0,0 +1,11 @@ +--- +license_expression: ecl-2.0 +is_license_tag: yes +ignorable_urls: + - http://www.opensource.org/licenses/ecl2.txt +--- + + + Educational Community License, Version 2.0 + http://www.opensource.org/licenses/ecl2.txt + svn \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_34.RULE b/src/licensedcode/data/rules/ecl-2.0_34.RULE new file mode 100644 index 00000000000..a370d1505f2 --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_34.RULE @@ -0,0 +1,10 @@ +--- +license_expression: ecl-2.0 +is_license_tag: yes +relevance: 100 +ignorable_urls: + - http://www.opensource.org/licenses/ecl2.txt +--- + +Educational Community License, Version 2.0 + http://www.opensource.org/licenses/ecl2.txt \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_35.RULE b/src/licensedcode/data/rules/ecl-2.0_35.RULE new file mode 100644 index 00000000000..727b1093ffd --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_35.RULE @@ -0,0 +1,11 @@ +--- +license_expression: ecl-2.0 +is_license_tag: yes +relevance: 100 +ignorable_urls: + - http://www.opensource.org/licenses/ecl2.txt +--- + +license + Educational Community License, Version 2.0 + http://www.opensource.org/licenses/ecl2.txt \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_36.RULE b/src/licensedcode/data/rules/ecl-2.0_36.RULE new file mode 100644 index 00000000000..945c421cec2 --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_36.RULE @@ -0,0 +1,10 @@ +--- +license_expression: ecl-2.0 +is_license_tag: yes +relevance: 100 +ignorable_urls: + - http://www.opensource.org/licenses/ecl2.txt +--- + +Educational Community License, Version 2.0 + http://www.opensource.org/licenses/ecl2.txt \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_37.RULE b/src/licensedcode/data/rules/ecl-2.0_37.RULE new file mode 100644 index 00000000000..b048430e10c --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_37.RULE @@ -0,0 +1,7 @@ +--- +license_expression: ecl-2.0 +is_license_tag: yes +relevance: 100 +--- + +LICENSE_NAME= Educational Community License (ECL) 2.0 \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_38.RULE b/src/licensedcode/data/rules/ecl-2.0_38.RULE new file mode 100644 index 00000000000..f02cda47e50 --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_38.RULE @@ -0,0 +1,7 @@ +--- +license_expression: ecl-2.0 +is_license_reference: yes +relevance: 100 +--- + +Educational Community License (ECL) 2.0 \ No newline at end of file diff --git a/src/licensedcode/data/rules/ecl-2.0_or_gpl-3.0_1.RULE b/src/licensedcode/data/rules/ecl-2.0_or_gpl-3.0_1.RULE new file mode 100644 index 00000000000..f690c51d100 --- /dev/null +++ b/src/licensedcode/data/rules/ecl-2.0_or_gpl-3.0_1.RULE @@ -0,0 +1,21 @@ +--- +license_expression: ecl-2.0 OR gpl-3.0 +is_license_notice: yes +ignorable_urls: + - https://opensource.org/license/ecl-2-0/ + - https://www.gnu.org/licenses/gpl-3.0.html +--- + +Dual-licensed under the Educational Community License, Version 2.0 and + the GNU General Public License, Version 3 (the "Licenses"); you may + not use this file except in compliance with the Licenses. You may + obtain a copy of the Licenses at + + https://opensource.org/license/ecl-2-0/ + https://www.gnu.org/licenses/gpl-3.0.html + + Unless required by applicable law or agreed to in writing, + software distributed under the Licenses are distributed on an "AS IS" + BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + or implied. See the Licenses for the specific language governing + permissions and limitations under the Licenses. \ No newline at end of file diff --git a/src/licensedcode/data/rules/epl-2.0_or_apache-2.0_or_gpl-2.0_with_classpath-exception-2.0_or_gpl-2.0_with_openjdk-assembly-exception-1.0_1.RULE b/src/licensedcode/data/rules/epl-2.0_or_apache-2.0_or_gpl-2.0_with_classpath-exception-2.0_or_gpl-2.0_with_openjdk-assembly-exception-1.0_1.RULE new file mode 100644 index 00000000000..76a167e4384 --- /dev/null +++ b/src/licensedcode/data/rules/epl-2.0_or_apache-2.0_or_gpl-2.0_with_classpath-exception-2.0_or_gpl-2.0_with_openjdk-assembly-exception-1.0_1.RULE @@ -0,0 +1,26 @@ +--- +license_expression: epl-2.0 OR apache-2.0 OR gpl-2.0 WITH classpath-exception-2.0 OR gpl-2.0 + WITH openjdk-assembly-exception-1.0 +is_license_notice: yes +ignorable_urls: + - https://openjdk.org/legal/assembly-exception.html + - https://www.apache.org/licenses/LICENSE-2.0 + - https://www.eclipse.org/legal/epl-2.0/ + - https://www.gnu.org/software/classpath/license.html +--- + +This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which accompanies this + * distribution and is available at https://www.eclipse.org/legal/epl-2.0/ + * or the Apache License, Version 2.0 which accompanies this distribution and + * is available at https://www.apache.org/licenses/LICENSE-2.0. + * + * This Source Code may also be made available under the following + * Secondary Licenses when the conditions for such availability set + * forth in the Eclipse Public License, v. 2.0 are satisfied: GNU + * General Public License, version 2 with the GNU Classpath + * Exception [1] and GNU General Public License, version 2 with the + * OpenJDK Assembly Exception [2]. + * + * [1] https://www.gnu.org/software/classpath/license.html + * [2] https://openjdk.org/legal/assembly-exception.html \ No newline at end of file diff --git a/src/licensedcode/data/rules/eupl-1.2_26.RULE b/src/licensedcode/data/rules/eupl-1.2_26.RULE new file mode 100644 index 00000000000..37b7aeb2731 --- /dev/null +++ b/src/licensedcode/data/rules/eupl-1.2_26.RULE @@ -0,0 +1,17 @@ +--- +license_expression: eupl-1.2 +is_license_notice: yes +notes: '"or later" is the standard for EUPL' +ignorable_urls: + - https://joinup.ec.europa.eu/software/page/eupl +--- + +Licensed under the {{EUPL, Version 1.2}} or – as soon they will be approved by the European Commission - subsequent versions of the EUPL (the "Licence"); +You may not use this work except in compliance with the Licence. +You may obtain a copy of the Licence at: + + https://joinup.ec.europa.eu/software/page/eupl + +Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an "AS IS" basis, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the Licence for the specific language governing permissions and limitations under the Licence. \ No newline at end of file diff --git a/src/licensedcode/data/rules/eupl-1.2_30.RULE b/src/licensedcode/data/rules/eupl-1.2_30.RULE new file mode 100644 index 00000000000..2bb0e69bcfe --- /dev/null +++ b/src/licensedcode/data/rules/eupl-1.2_30.RULE @@ -0,0 +1,18 @@ +--- +license_expression: eupl-1.2 +is_license_notice: yes +notes: '"or later" is the standard for EUPL' +ignorable_urls: + - https://joinup.ec.europa.eu/software/page/eupl +--- + +Licensed under the EUPL, Version 1.2 or – as soon they will be approved by the European Commission - subsequent versions of the EUPL (the "Licence") + +You may not use this work except in compliance with the Licence.
+You may obtain a copy of the Licence at:
+ +[https://joinup.ec.europa.eu/software/page/eupl](https://joinup.ec.europa.eu/software/page/eupl) + +Unless required by applicable law or agreed to in writing, software distributed under the Licence is +distributed on an "AS IS" basis,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the Licence for the specific language governing permissions and limitations under the Licence. \ No newline at end of file diff --git a/src/licensedcode/data/rules/eupl-1.2_31.RULE b/src/licensedcode/data/rules/eupl-1.2_31.RULE new file mode 100644 index 00000000000..b79f56544d3 --- /dev/null +++ b/src/licensedcode/data/rules/eupl-1.2_31.RULE @@ -0,0 +1,8 @@ +--- +license_expression: eupl-1.2 +is_license_notice: yes +relevance: 100 +notes: '"or later" is the standard for EUPL' +--- + +Licensed under the EUPL-1.2 or later. \ No newline at end of file diff --git a/src/licensedcode/data/rules/eupl-1.2_32.RULE b/src/licensedcode/data/rules/eupl-1.2_32.RULE new file mode 100644 index 00000000000..3fea737624c --- /dev/null +++ b/src/licensedcode/data/rules/eupl-1.2_32.RULE @@ -0,0 +1,7 @@ +--- +license_expression: eupl-1.2 +is_license_notice: yes +relevance: 100 +--- + +Licensed under the EUPL 1.2. \ No newline at end of file diff --git a/src/licensedcode/data/rules/eupl-1.2_33.RULE b/src/licensedcode/data/rules/eupl-1.2_33.RULE new file mode 100644 index 00000000000..e5b54226fe3 --- /dev/null +++ b/src/licensedcode/data/rules/eupl-1.2_33.RULE @@ -0,0 +1,7 @@ +--- +license_expression: eupl-1.2 +is_license_reference: yes +relevance: 99 +--- + +European Union Public Licence (EUPL) \ No newline at end of file diff --git a/src/licensedcode/data/rules/eupl-1.2_34.RULE b/src/licensedcode/data/rules/eupl-1.2_34.RULE new file mode 100644 index 00000000000..266456cf0ab --- /dev/null +++ b/src/licensedcode/data/rules/eupl-1.2_34.RULE @@ -0,0 +1,11 @@ +--- +license_expression: eupl-1.2 +is_license_tag: yes +relevance: 99 +ignorable_urls: + - https://joinup.ec.europa.eu/software/page/eupl +--- + +name: European Union Public Licence (EUPL) + url: https://joinup.ec.europa.eu/software/page/eupl + comments: European Free/Open Source Software (F/OSS) licence. \ No newline at end of file diff --git a/src/licensedcode/data/rules/eupl-1.2_35.RULE b/src/licensedcode/data/rules/eupl-1.2_35.RULE new file mode 100644 index 00000000000..f83c5c0ce8f --- /dev/null +++ b/src/licensedcode/data/rules/eupl-1.2_35.RULE @@ -0,0 +1,10 @@ +--- +license_expression: eupl-1.2 +is_license_tag: yes +relevance: 99 +ignorable_urls: + - https://joinup.ec.europa.eu/software/page/eupl +--- + +name: European Union Public Licence (EUPL) + url: https://joinup.ec.europa.eu/software/page/eupl \ No newline at end of file diff --git a/src/licensedcode/data/rules/eupl-1.2_36.RULE b/src/licensedcode/data/rules/eupl-1.2_36.RULE new file mode 100644 index 00000000000..b4c1d73ef5f --- /dev/null +++ b/src/licensedcode/data/rules/eupl-1.2_36.RULE @@ -0,0 +1,7 @@ +--- +license_expression: eupl-1.2 +is_license_notice: yes +relevance: 99 +--- + +licensed under the European Union Public License (EUPL) 1.2+. \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_771.RULE b/src/licensedcode/data/rules/false-positive_771.RULE new file mode 100644 index 00000000000..61ba8e4263f --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_771.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: seen in kernel /Documentation/process/license-rules.rst +--- + +The SPDX license identifier in kernel files \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_7711.RULE b/src/licensedcode/data/rules/false-positive_7711.RULE new file mode 100644 index 00000000000..5be8bdf0e83 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_7711.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: not a license +--- + +BSD-style checksum \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_772.RULE b/src/licensedcode/data/rules/false-positive_772.RULE new file mode 100644 index 00000000000..2b3c3114d86 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_772.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: seen in kernel /Documentation/process/license-rules.rst +--- + +The SPDX license identifier is added \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_7721.RULE b/src/licensedcode/data/rules/false-positive_7721.RULE new file mode 100644 index 00000000000..5cdbda7a0b4 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_7721.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: comments about licenses, not a license proper +--- + +Add written offer (required for copyleft licenses, such as the GPL) \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_773.RULE b/src/licensedcode/data/rules/false-positive_773.RULE new file mode 100644 index 00000000000..3db86bb293d --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_773.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: seen in kernel /Documentation/process/license-rules.rst +--- + +(SPDX-License-Identifier) nor \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_7731.RULE b/src/licensedcode/data/rules/false-positive_7731.RULE new file mode 100644 index 00000000000..4a3b4b87fd0 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_7731.RULE @@ -0,0 +1,8 @@ +--- +is_false_positive: yes +notes: comments about licenses, not a license proper +--- + +Please provide all necessary license information for which the license require that this information is provided to the user. This especially +includes the original license text (this is particularly relevant for license +texts that include special information on copyright holders etc., like the BSD 3-clause license text) all relevant copyright notices that correlate with the respective license (including the names of the authors as well as the all additional information that needs to be provided according to the license (e.g. the text of the NOTICE file for Software under the Apache 2.0 License should such a file exist in the software) \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_774.RULE b/src/licensedcode/data/rules/false-positive_774.RULE new file mode 100644 index 00000000000..6e405856400 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_774.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: seen at drivers/block/floppy.c +--- + +* modeled after the freeware MS-DOS program \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_7741.RULE b/src/licensedcode/data/rules/false-positive_7741.RULE new file mode 100644 index 00000000000..b2e1ef6f275 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_7741.RULE @@ -0,0 +1,7 @@ +--- +is_false_positive: yes +notes: comments about licenses, not a license proper +--- + +Please provide all necessary license information for which the license require that this information is provided to the user. This especially includes the original license text (this is particularly relevant for license texts that include special information on copyright holders etc., like the BSD 3-clause license text) +all relevant copyright notices that correlate with the respective license (including the names of the authors as well as the dates)","all additional information that needs to be provided according to the license (e.g. the text of the NOTICE file for Software under the Apache 2.0 License should such a file exist in the software) \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_775.RULE b/src/licensedcode/data/rules/false-positive_775.RULE new file mode 100644 index 00000000000..6287d8d308e --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_775.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: seen at kernel/bpf/syscall.c +--- + +sizeof(license) \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_7751.RULE b/src/licensedcode/data/rules/false-positive_7751.RULE new file mode 100644 index 00000000000..89d31390ccf --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_7751.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: not a license +--- + +if the permission is not granted. \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_776.RULE b/src/licensedcode/data/rules/false-positive_776.RULE new file mode 100644 index 00000000000..71ec2a7146d --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_776.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: seen in kernel menuconfig +--- + +_GNU_SOURCE \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_7761.RULE b/src/licensedcode/data/rules/false-positive_7761.RULE new file mode 100644 index 00000000000..7b22eb39ca5 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_7761.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: not a license +--- + +non-commercial administrative body \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_777.RULE b/src/licensedcode/data/rules/false-positive_777.RULE new file mode 100644 index 00000000000..562590e1c18 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_777.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: seen in kernel /Documentation/process/license-rules.rst +--- + +SPDX-License-Identifier: \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_7771.RULE b/src/licensedcode/data/rules/false-positive_7771.RULE new file mode 100644 index 00000000000..806b5648f51 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_7771.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: not a license +--- + +non-commercial undertaking \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_778.RULE b/src/licensedcode/data/rules/false-positive_778.RULE new file mode 100644 index 00000000000..a9f5070d537 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_778.RULE @@ -0,0 +1,8 @@ +--- +is_false_positive: yes +notes: seen in kernel /Documentation/process/license-rules.rst +--- + +Aside from that, individual files can be provided under a dual license, +e.g. one of the compatible GPL variants and alternatively under a +permissive license like BSD, MIT etc. \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_7781.RULE b/src/licensedcode/data/rules/false-positive_7781.RULE new file mode 100644 index 00000000000..c38ef74d5a6 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_7781.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: not a license +--- + +direct and indirect commercial use referred to \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_779.RULE b/src/licensedcode/data/rules/false-positive_779.RULE new file mode 100644 index 00000000000..b4f0d4de651 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_779.RULE @@ -0,0 +1,14 @@ +--- +is_false_positive: yes +notes: seen in kernel /Documentation/process/license-rules.rst +--- + +Dual Licensing Only + + These licenses should only be used to dual license code with another + license in addition to a preferred license. These licenses are available + from the directory:: + + LICENSES/dual/ + + in the kernel source tree. \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_7791.RULE b/src/licensedcode/data/rules/false-positive_7791.RULE new file mode 100644 index 00000000000..82acbaedaf2 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_7791.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: not a license +--- + +any direct or indirect commercial use of the geographical indication \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_780.RULE b/src/licensedcode/data/rules/false-positive_780.RULE new file mode 100644 index 00000000000..80032703934 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_780.RULE @@ -0,0 +1,13 @@ +--- +is_false_positive: yes +notes: seen in kernel /Documentation/process/license-rules.rst +--- + +SPDX-Licenses: GPL-2.0, GPL-2.0+, GPL-1.0+, LGPL-2.0, LGPL-2.0+, LGPL-2.1, LGPL-2.1+, GPL-2.0-only, GPL-2.0-or-later +Usage-Guide: + This exception is used together with one of the above SPDX-Licenses + to mark user space API (uapi) header files so they can be included + into non GPL compliant user space application code. + To use this exception add it with the keyword WITH to one of the + identifiers in the SPDX-Licenses tag: + SPDX-License-Identifier: WITH Linux-syscall-note \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_7801.RULE b/src/licensedcode/data/rules/false-positive_7801.RULE new file mode 100644 index 00000000000..af19f80c8ac --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_7801.RULE @@ -0,0 +1,8 @@ +--- +is_false_positive: yes +notes: Seen in Azure SDK. Not much of a license at all. +--- + +Notwithstanding any other terms, you may reverse engineer this software to the +extent required to debug changes to any libraries licensed under the GNU Lesser +General Public License. \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_781.RULE b/src/licensedcode/data/rules/false-positive_781.RULE new file mode 100644 index 00000000000..6db25202faa --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_781.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: found in linux/drivers/gpu/drm/amd/include/asic_reg/nbio/ +--- + +UR_SSPL_MSG \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_7811.RULE b/src/licensedcode/data/rules/false-positive_7811.RULE new file mode 100644 index 00000000000..2077fc996cf --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_7811.RULE @@ -0,0 +1,7 @@ +--- +is_false_positive: yes +notes: Seen in Azure SDK. Not much of a license at all. +--- + +Azure SDK for Go uses third-party libraries or other resources that may be +distributed under licenses different than the Azure SDK for Go software. \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_782.RULE b/src/licensedcode/data/rules/false-positive_782.RULE new file mode 100644 index 00000000000..ba3707356d5 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_782.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: found in linux/drivers/pinctrl/samsung/pinctrl-exynos-arm.c +--- + +EINTG("gpl2") \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_7821.RULE b/src/licensedcode/data/rules/false-positive_7821.RULE new file mode 100644 index 00000000000..aacf079b494 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_7821.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: Not a license, just a comment +--- + +The FSF address for GPL license was updated. \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_783.RULE b/src/licensedcode/data/rules/false-positive_783.RULE new file mode 100644 index 00000000000..e49c1fe34cd --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_783.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: found in linux/drivers/pinctrl/samsung/pinctrl-exynos-arm.c +--- + +EINTG("gpl1") \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_7831.RULE b/src/licensedcode/data/rules/false-positive_7831.RULE new file mode 100644 index 00000000000..38f5bc1653d --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_7831.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: A comment about access permissions, not a license +--- + +permission is granted to the anonymous user \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_784.RULE b/src/licensedcode/data/rules/false-positive_784.RULE new file mode 100644 index 00000000000..722689b3cc6 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_784.RULE @@ -0,0 +1,13 @@ +--- +is_false_positive: yes +notes: A list of license patterns in a bouncer YAML file, not a license +--- + +permit: + - BSD.* + - CC0.* + - MIT.* + - Apache.* + - MPL.* + - ISC + - WTFPL \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_785.RULE b/src/licensedcode/data/rules/false-positive_785.RULE new file mode 100644 index 00000000000..92d8510753e --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_785.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: found in linux/include/linux/mfd/rn5t618.h +--- + +GPLED_FUNC \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_7851.RULE b/src/licensedcode/data/rules/false-positive_7851.RULE new file mode 100644 index 00000000000..a528c6cef88 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_7851.RULE @@ -0,0 +1,12 @@ +--- +is_false_positive: yes +notes: A list of license patterns in a bouncer YAML file, not a license +--- + +permit: + - BSD.* + - CC0.* + - MIT.* + - Apache.* + - MPL.* + - ISC \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_786.RULE b/src/licensedcode/data/rules/false-positive_786.RULE new file mode 100644 index 00000000000..e9addb9a211 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_786.RULE @@ -0,0 +1,11 @@ +--- +is_false_positive: yes +notes: A list of license patterns in a bouncer YAML file, not a license +--- + +permit: + - BSD.* + - MIT.* + - Apache.* + - MPL.* + - ISC \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_787.RULE b/src/licensedcode/data/rules/false-positive_787.RULE new file mode 100644 index 00000000000..2deff68f586 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_787.RULE @@ -0,0 +1,10 @@ +--- +is_false_positive: yes +notes: A list of license patterns in a bouncer YAML file, not a license +--- + +permit: + - BSD.* + - MIT.* + - Apache.* + - MPL.* \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_788.RULE b/src/licensedcode/data/rules/false-positive_788.RULE new file mode 100644 index 00000000000..6772a97bd18 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_788.RULE @@ -0,0 +1,11 @@ +--- +is_false_positive: yes +notes: A list of license patterns in a bouncer YAML file, not a license +--- + +permit: + - BSD.* + - MIT.* + - Apache.* + - MPL.* + - CC0-1.0 \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_789.RULE b/src/licensedcode/data/rules/false-positive_789.RULE new file mode 100644 index 00000000000..1a4ed78bbbc --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_789.RULE @@ -0,0 +1,9 @@ +--- +is_false_positive: yes +notes: A list of license patterns in a bouncer YAML file, not a license +--- + +permit: + - BSD.* + - MIT.* + - Apache.* \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_790.RULE b/src/licensedcode/data/rules/false-positive_790.RULE new file mode 100644 index 00000000000..a37b86e3f41 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_790.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: not a license +--- + +License Error \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_791.RULE b/src/licensedcode/data/rules/false-positive_791.RULE new file mode 100644 index 00000000000..a06213f55fb --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_791.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: not a license +--- + +unknown license error \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_792.RULE b/src/licensedcode/data/rules/false-positive_792.RULE new file mode 100644 index 00000000000..666d7b2f861 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_792.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: not a license +--- + +Unknown license type \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_793.RULE b/src/licensedcode/data/rules/false-positive_793.RULE new file mode 100644 index 00000000000..0360401f0dc --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_793.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: not a license +--- + +Licence Error \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_794.RULE b/src/licensedcode/data/rules/false-positive_794.RULE new file mode 100644 index 00000000000..1217bce9c43 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_794.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: not a license +--- + +unknown licence error \ No newline at end of file diff --git a/src/licensedcode/data/rules/false-positive_795.RULE b/src/licensedcode/data/rules/false-positive_795.RULE new file mode 100644 index 00000000000..18a82d51180 --- /dev/null +++ b/src/licensedcode/data/rules/false-positive_795.RULE @@ -0,0 +1,6 @@ +--- +is_false_positive: yes +notes: not a license +--- + +Unknown licence type \ No newline at end of file diff --git a/src/licensedcode/data/rules/fdl-1.3_prep.ai.mit.edu.RULE b/src/licensedcode/data/rules/fdl-1.3_prep.ai.mit.edu.RULE index 9cc18c7e62b..f5e4156fa3e 100644 --- a/src/licensedcode/data/rules/fdl-1.3_prep.ai.mit.edu.RULE +++ b/src/licensedcode/data/rules/fdl-1.3_prep.ai.mit.edu.RULE @@ -2,7 +2,7 @@ license_expression: gfdl-1.3 is_license_text: yes ignorable_copyrights: - - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/fraunhofer-fdk-aac-codec_13.RULE b/src/licensedcode/data/rules/fraunhofer-fdk-aac-codec_13.RULE new file mode 100644 index 00000000000..9db9acb95c8 --- /dev/null +++ b/src/licensedcode/data/rules/fraunhofer-fdk-aac-codec_13.RULE @@ -0,0 +1,105 @@ +--- +license_expression: fraunhofer-fdk-aac-codec +is_license_text: yes +ignorable_copyrights: + - (c) Copyright 1995 - Fraunhofer-Gesellschaft zur Forderung der angewandten Forschung e.V. +ignorable_holders: + - Fraunhofer-Gesellschaft zur Forderung der angewandten Forschung e.V. +ignorable_urls: + - http://www.iis.fraunhofer.de/amm + - http://www.vialicensing.com/ +ignorable_emails: + - amm-info@iis.fraunhofer.de +--- + +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - Fraunhofer-Gesellschaft zur Förderung der angewandten +Forschung e.V. All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software +that implements the MPEG Advanced Audio Coding ("AAC") encoding and decoding +scheme for digital audio. This FDK AAC Codec software is intended to be used on +a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient +general perceptual audio codecs. AAC-ELD is considered the best-performing +full-bandwidth communications codec by independent studies and is widely +deployed. AAC has been standardized by ISO and IEC as part of the MPEG +specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including +those of Fraunhofer) may be obtained through Via Licensing +(www.vialicensing.com) or through the respective patent owners individually for +the purpose of encoding or decoding bit streams in products that are compliant +with the ISO/IEC MPEG audio standards. Please note that most manufacturers of +Android devices already license these patent claims through Via Licensing or +directly from the patent owners, and therefore FDK AAC Codec software may +already be covered under those patent licenses when it is used for those +licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions +with enhanced sound quality, are also available from Fraunhofer. Users are +encouraged to check the Fraunhofer website for additional applications +information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, +are permitted without payment of copyright license fees provided that you +satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of +the FDK AAC Codec or your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation +and/or other materials provided with redistributions of the FDK AAC Codec or +your modifications thereto in binary form. You must make available free of +charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. + +The name of Fraunhofer may not be used to endorse or promote products derived +from this library without prior written permission. + +You may not charge copyright license fees for anyone to use, copy or distribute +the FDK AAC Codec software or your modifications thereto. + +Your modified versions of the FDK AAC Codec must carry prominent notices stating +that you changed the software and the date of any change. For modified versions +of the FDK AAC Codec, the term "Fraunhofer FDK AAC Codec Library for Android" +must be replaced by the term "Third-Party Modified Version of the Fraunhofer FDK +AAC Codec Library for Android." + +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without +limitation the patents of Fraunhofer, ARE GRANTED BY THIS SOFTWARE LICENSE. +Fraunhofer provides no warranty of patent non-infringement with respect to this +software. + +You may use this FDK AAC Codec software or modifications thereto only for +purposes that are authorized by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright +holders and contributors "AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, +including but not limited to the implied warranties of merchantability and +fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, +or consequential damages, including but not limited to procurement of substitute +goods or services; loss of use, data, or profits, or business interruption, +however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of +this software, even if advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de \ No newline at end of file diff --git a/src/licensedcode/data/rules/fraunhofer-fdk-aac-codec_9.RULE b/src/licensedcode/data/rules/fraunhofer-fdk-aac-codec_9.RULE new file mode 100644 index 00000000000..f083670c1d1 --- /dev/null +++ b/src/licensedcode/data/rules/fraunhofer-fdk-aac-codec_9.RULE @@ -0,0 +1,106 @@ +--- +license_expression: fraunhofer-fdk-aac-codec +is_license_text: yes +ignorable_copyrights: + - (c) Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Forderung der angewandten Forschung + e.V. +ignorable_holders: + - Fraunhofer-Gesellschaft zur Forderung der angewandten Forschung e.V. +ignorable_urls: + - http://www.iis.fraunhofer.de/amm + - http://www.vialicensing.com/ +ignorable_emails: + - amm-info@iis.fraunhofer.de +--- + +Software License for The Fraunhofer FDK AAC Codec Library for Android + +© Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten +Forschung e.V. All rights reserved. + + 1. INTRODUCTION +The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") is software +that implements the MPEG Advanced Audio Coding ("AAC") encoding and decoding +scheme for digital audio. This FDK AAC Codec software is intended to be used on +a wide variety of Android devices. + +AAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient +general perceptual audio codecs. AAC-ELD is considered the best-performing +full-bandwidth communications codec by independent studies and is widely +deployed. AAC has been standardized by ISO and IEC as part of the MPEG +specifications. + +Patent licenses for necessary patent claims for the FDK AAC Codec (including +those of Fraunhofer) may be obtained through Via Licensing +(www.vialicensing.com) or through the respective patent owners individually for +the purpose of encoding or decoding bit streams in products that are compliant +with the ISO/IEC MPEG audio standards. Please note that most manufacturers of +Android devices already license these patent claims through Via Licensing or +directly from the patent owners, and therefore FDK AAC Codec software may +already be covered under those patent licenses when it is used for those +licensed purposes only. + +Commercially-licensed AAC software libraries, including floating-point versions +with enhanced sound quality, are also available from Fraunhofer. Users are +encouraged to check the Fraunhofer website for additional applications +information and documentation. + +2. COPYRIGHT LICENSE + +Redistribution and use in source and binary forms, with or without modification, +are permitted without payment of copyright license fees provided that you +satisfy the following conditions: + +You must retain the complete text of this software license in redistributions of +the FDK AAC Codec or your modifications thereto in source code form. + +You must retain the complete text of this software license in the documentation +and/or other materials provided with redistributions of the FDK AAC Codec or +your modifications thereto in binary form. You must make available free of +charge copies of the complete source code of the FDK AAC Codec and your +modifications thereto to recipients of copies in binary form. + +The name of Fraunhofer may not be used to endorse or promote products derived +from this library without prior written permission. + +You may not charge copyright license fees for anyone to use, copy or distribute +the FDK AAC Codec software or your modifications thereto. + +Your modified versions of the FDK AAC Codec must carry prominent notices stating +that you changed the software and the date of any change. For modified versions +of the FDK AAC Codec, the term "Fraunhofer FDK AAC Codec Library for Android" +must be replaced by the term "Third-Party Modified Version of the Fraunhofer FDK +AAC Codec Library for Android." + +3. NO PATENT LICENSE + +NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without +limitation the patents of Fraunhofer, ARE GRANTED BY THIS SOFTWARE LICENSE. +Fraunhofer provides no warranty of patent non-infringement with respect to this +software. + +You may use this FDK AAC Codec software or modifications thereto only for +purposes that are authorized by appropriate patent licenses. + +4. DISCLAIMER + +This FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright +holders and contributors "AS IS" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, +including but not limited to the implied warranties of merchantability and +fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, +or consequential damages, including but not limited to procurement of substitute +goods or services; loss of use, data, or profits, or business interruption, +however caused and on any theory of liability, whether in contract, strict +liability, or tort (including negligence), arising in any way out of the use of +this software, even if advised of the possibility of such damage. + +5. CONTACT INFORMATION + +Fraunhofer Institute for Integrated Circuits IIS +Attention: Audio and Multimedia Departments - FDK AAC LL +Am Wolfsmantel 33 +91058 Erlangen, Germany + +www.iis.fraunhofer.de/amm +amm-info@iis.fraunhofer.de \ No newline at end of file diff --git a/src/licensedcode/data/rules/freeware_bare_word_only.RULE b/src/licensedcode/data/rules/freeware_bare_word_only.RULE index a007e35e8ef..16780c31fc6 100644 --- a/src/licensedcode/data/rules/freeware_bare_word_only.RULE +++ b/src/licensedcode/data/rules/freeware_bare_word_only.RULE @@ -1,7 +1,7 @@ --- license_expression: unknown-license-reference is_license_clue: yes -relevance: 100 +relevance: 60 --- freeware \ No newline at end of file diff --git a/src/licensedcode/data/rules/gcc-exception-3.1_1.RULE b/src/licensedcode/data/rules/gcc-exception-3.1_1.RULE index 07c7d93b774..2b43338103d 100644 --- a/src/licensedcode/data/rules/gcc-exception-3.1_1.RULE +++ b/src/licensedcode/data/rules/gcc-exception-3.1_1.RULE @@ -2,7 +2,7 @@ license_expression: gpl-3.0-plus WITH gcc-exception-3.1 is_license_notice: yes ignorable_copyrights: - - Copyright (c) 2009 Free Software Foundation, Inc. + - Copyright (c) 2009 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/generic-cla_34.RULE b/src/licensedcode/data/rules/generic-cla_34.RULE new file mode 100644 index 00000000000..5e785ddbfb9 --- /dev/null +++ b/src/licensedcode/data/rules/generic-cla_34.RULE @@ -0,0 +1,58 @@ +--- +license_expression: generic-cla +is_license_text: yes +notes: https://raw.githubusercontent.com/caprover/caprover/f9d880e8c3b56adfd0778aed105587c63b599db8/contrib.md +--- + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I +have the right to submit it under the open source license +indicated in the file; or + +(b) The contribution is based upon previous work that, to the best +of my knowledge, is covered under an appropriate open source +license and I have the right under that license to submit that +work with modifications, whether created in whole or in part +by me, under the same open source license (unless I am +permitted to submit under a different license), as indicated +in the file; or + +(c) The contribution was provided directly to me by some other +person who certified (a), (b) or (c) and I have not modified +it. + +(d) I understand and agree that this project and the contribution +are public and that a record of the contribution (including all +personal information I submit with it, including my sign-off) is +maintained indefinitely and may be redistributed consistent with +this project or the open source license(s) involved. + +(e) Grant of Copyright License. Subject to the terms and conditions +of this Agreement, You hereby grant to and to +recipients of software distributed by a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare derivative works of, +publicly display, publicly perform, sublicense, and distribute +Your Contributions and such derivative works. + +(f) Grant of Patent License. Subject to the terms and conditions of +this Agreement, You hereby grant to and to recipients +of software distributed by a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable (except as +stated in this section) patent license to make, have made, use, +offer to sell, sell, import, and otherwise transfer the Work, +where such license applies only to those patent claims licensable +by You that are necessarily infringed by Your Contribution(s) +alone or by combination of Your Contribution(s) with the Work to +which such Contribution(s) were submitted. If any entity institutes +patent litigation against You or any other entity (including a +cross-claim or counterclaim in a lawsuit) alleging that your +Contribution, or the Work to which you have contributed, constitutes +direct or contributory patent infringement, then any patent licenses +granted to that entity under this Agreement for that Contribution or +Work shall terminate as of the date such litigation is filed. + + +(g) You represent that You are legally entitled to grant the above +license on your behalf and on behalf of your employer (if applicable). \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.1-invariants-only_9.RULE b/src/licensedcode/data/rules/gfdl-1.1-invariants-only_9.RULE new file mode 100644 index 00000000000..ee195ef7efa --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.1-invariants-only_9.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gfdl-1.1-invariants-only +is_license_notice: yes +--- + +Permission is granted to copy, distribute +and/or modify this document under the terms of the {{GNU Free Documentation +License, Version 1.1;}} {{with the Invariant Sections being}} LIST THEIR TITLES , +{{with the Front-Cover Texts being}} LIST , and {{with the Back-Cover Texts being}} +LIST . A copy of the license is included in the section entitled "GNU Free +Documentation License". \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.1-invariants-or-later_13.RULE b/src/licensedcode/data/rules/gfdl-1.1-invariants-or-later_13.RULE new file mode 100644 index 00000000000..7bf8a52ae96 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.1-invariants-or-later_13.RULE @@ -0,0 +1,13 @@ +--- +license_expression: gfdl-1.1-invariants-or-later +is_license_notice: yes +relevance: 100 +--- + +Permission is granted to copy, distribute and/or +modify this document under the terms of the {{GNU Free Documentation License, +Version 1.1 or any later version }} published by the Free Software Foundation; +with the {{Invariant Sections being}} +with the {{Front-Cover Texts being }}, +and with the {{Back-Cover Texts being}}. A copy of the +license is included in the section entitled "GNU Free Documentation License". diff --git a/src/licensedcode/data/rules/gfdl-1.1-no-invariants-only_9.RULE b/src/licensedcode/data/rules/gfdl-1.1-no-invariants-only_9.RULE new file mode 100644 index 00000000000..d5c90151d92 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.1-no-invariants-only_9.RULE @@ -0,0 +1,10 @@ +--- +license_expression: gfdl-1.1-no-invariants-only +is_license_notice: yes +--- + +Permission is granted to copy, distribute +and/or modify this document under the terms of the {{GNU Free Documentation +License, Version 1.1}}; {{with no Invariant Sections, no Front-Cover Texts, and +no Back-Cover Texts.}} A copy of the license is included in the section +entitled "GNU Free Documentation License". \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.1-no-invariants-or-later_9.RULE b/src/licensedcode/data/rules/gfdl-1.1-no-invariants-or-later_9.RULE new file mode 100644 index 00000000000..77b42d0a642 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.1-no-invariants-or-later_9.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gfdl-1.1-no-invariants-or-later +is_license_notice: yes +--- + +Permission is granted to copy, distribute +and/or modify this document under the terms of the {{GNU Free Documentation +License, Version 1.1 or any later version }}published by the Free Software +Foundation; {{with no Invariant Sections, no Front-Cover Texts, and +no Back-Cover Texts.}} A copy of the license is included in the section +entitled "GNU Free Documentation License". \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.1-plus_26.RULE b/src/licensedcode/data/rules/gfdl-1.1-plus_26.RULE deleted file mode 100644 index 236ba4550c0..00000000000 --- a/src/licensedcode/data/rules/gfdl-1.1-plus_26.RULE +++ /dev/null @@ -1,13 +0,0 @@ ---- -license_expression: gfdl-1.1-plus -is_license_notice: yes -relevance: 100 ---- - -Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.1 or any later version published by the Free Software Foundation; -with the Invariant Sections being -with the Front-Cover Texts being , -and with the Back-Cover Texts being. A copy of the -license is included in the section entitled "GNU Free Documentation License". \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.2-invariants-only_13.RULE b/src/licensedcode/data/rules/gfdl-1.2-invariants-only_13.RULE new file mode 100644 index 00000000000..532c7f59c17 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.2-invariants-only_13.RULE @@ -0,0 +1,12 @@ +--- +license_expression: gfdl-1.2-invariants-only +is_license_notice: yes +--- + +Permission is granted to copy, distribute and/or +modify this document under the terms of the {{GNU Free Documentation License, +Version 1.2 }} published by the Free Software Foundation; +with {{the Invariant Sections being}} , +with {{the Front-Cover Texts being}} , +and with {{the Back-Cover Texts}} being . A copy of the +license is included in the section entitled "GNU Free Documentation License". \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.2-invariants-only_9.RULE b/src/licensedcode/data/rules/gfdl-1.2-invariants-only_9.RULE new file mode 100644 index 00000000000..3576f9b185f --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.2-invariants-only_9.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gfdl-1.2-invariants-only +is_license_notice: yes +--- + +Permission is granted to copy, distribute +and/or modify this document under the terms of the {{GNU Free Documentation +License, Version 1.2;}} {{with the Invariant Sections being}} LIST THEIR TITLES , +{{with the Front-Cover Texts being}} LIST , and {{with the Back-Cover Texts being}} +LIST . A copy of the license is included in the section entitled "GNU Free +Documentation License". \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.2-invariants-or-later_13.RULE b/src/licensedcode/data/rules/gfdl-1.2-invariants-or-later_13.RULE new file mode 100644 index 00000000000..8b03a306338 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.2-invariants-or-later_13.RULE @@ -0,0 +1,12 @@ +--- +license_expression: gfdl-1.2-invariants-or-later +is_license_notice: yes +--- + +Permission is granted to copy, distribute and/or +modify this document under the terms of the {{GNU Free Documentation License, +Version 1.2 or any later version }} published by the Free Software Foundation; +with {{the Invariant Sections being}} , +with {{the Front-Cover Texts being}} , +and with {{the Back-Cover Texts}} being . A copy of the +license is included in the section entitled "GNU Free Documentation License". \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.2-invariants-or-later_9.RULE b/src/licensedcode/data/rules/gfdl-1.2-invariants-or-later_9.RULE new file mode 100644 index 00000000000..06d088569e0 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.2-invariants-or-later_9.RULE @@ -0,0 +1,12 @@ +--- +license_expression: gfdl-1.2-invariants-or-later +is_license_notice: yes +--- + +Permission is granted to copy, distribute +and/or modify this document under the terms of the {{GNU Free Documentation +License, Version 1.2 or any later version }}published by the Free Software +Foundation; {{with the Invariant Sections being}} LIST THEIR TITLES , +{{with the Front-Cover Texts being}} LIST , and {{with the Back-Cover Texts being}} +LIST . A copy of the license is included in the section entitled "GNU Free +Documentation License". \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.2-no-invariants-only_9.RULE b/src/licensedcode/data/rules/gfdl-1.2-no-invariants-only_9.RULE new file mode 100644 index 00000000000..0617f237188 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.2-no-invariants-only_9.RULE @@ -0,0 +1,10 @@ +--- +license_expression: gfdl-1.2-no-invariants-only +is_license_notice: yes +--- + +Permission is granted to copy, distribute +and/or modify this document under the terms of the {{GNU Free Documentation +License, Version 1.2}}; {{with no Invariant Sections, no Front-Cover Texts, and +no Back-Cover Texts.}} A copy of the license is included in the section +entitled "GNU Free Documentation License". \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_13.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_13.RULE new file mode 100644 index 00000000000..c246c2f05ef --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_13.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{with the Invariant Sections being }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_14.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_14.RULE new file mode 100644 index 00000000000..4ce662d8c88 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_14.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{the Invariant Sections being }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_15.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_15.RULE new file mode 100644 index 00000000000..9d81e65044f --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_15.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{the Invariant Section being }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_16.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_16.RULE new file mode 100644 index 00000000000..9743738eaf0 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_16.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{the Invariant Sections are }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_17.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_17.RULE new file mode 100644 index 00000000000..4b191264462 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_17.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{the Invariant Section is }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_18.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_18.RULE new file mode 100644 index 00000000000..6c4ff11ad1d --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_18.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{with the Front-Cover text being }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_19.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_19.RULE new file mode 100644 index 00000000000..15d21857312 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_19.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{the Front-Cover text being }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_20.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_20.RULE new file mode 100644 index 00000000000..1b228c069c0 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_20.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{with the Front-Cover texts being }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_21.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_21.RULE new file mode 100644 index 00000000000..9556d98bc0f --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_21.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{the Front-Cover texts being }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_22.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_22.RULE new file mode 100644 index 00000000000..2669e28d088 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_22.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{the Front-Cover texts are }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_23.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_23.RULE new file mode 100644 index 00000000000..9ea4ef7d130 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_23.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{the Front-Cover text is }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_24.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_24.RULE new file mode 100644 index 00000000000..ffd3d781f77 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_24.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{with the Back-Cover Text being }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_25.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_25.RULE new file mode 100644 index 00000000000..b6625d706c4 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_25.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{the Back-Cover Text being }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_26.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_26.RULE new file mode 100644 index 00000000000..27738d50d6d --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_26.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{The Back-Cover Text is }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_27.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_27.RULE new file mode 100644 index 00000000000..228e73a4688 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_27.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{with the Back-Cover Texts being }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_28.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_28.RULE new file mode 100644 index 00000000000..626c0350722 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_28.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{the Back-Cover Texts being }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_29.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_29.RULE new file mode 100644 index 00000000000..c624e099913 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_29.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{The Back-Cover Texts is }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_30.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_30.RULE new file mode 100644 index 00000000000..9aed9dd4fd3 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_30.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_notice: yes +--- + +Permission is granted to copy, distribute +and/or modify this document under the terms of the {{GNU Free Documentation +License, Version 1.3;}} {{with the Invariant Sections being}} LIST THEIR TITLES , +{{with the Front-Cover Texts being}} LIST , and {{with the Back-Cover Texts being}} +LIST . A copy of the license is included in the section entitled "GNU Free +Documentation License". \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_31.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_31.RULE new file mode 100644 index 00000000000..cdb7d8f5e9b --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_31.RULE @@ -0,0 +1,12 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_notice: yes +--- + +Permission is granted to copy, distribute and/or +modify this document under the terms of the {{GNU Free Documentation License, +Version 1.3 }} published by the Free Software Foundation; +with {{the Invariant Sections being}} , +with {{the Front-Cover Texts being}} , +and with {{the Back-Cover Texts}} being . A copy of the +license is included in the section entitled "GNU Free Documentation License". \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-only_9.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_9.RULE new file mode 100644 index 00000000000..6e61e06a9dd --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-only_9.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{with the Invariant Section being }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-or-later_13.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-or-later_13.RULE new file mode 100644 index 00000000000..2b322363662 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-or-later_13.RULE @@ -0,0 +1,21 @@ +--- +license_expression: gfdl-1.3-invariants-or-later +is_license_notice: yes +ignorable_urls: + - https://www.gnu.org/licenses/fdl.html +--- + +Permission is granted to copy, distribute and/or modify this document +under the terms of the {{GNU Free Documentation License, Version 1.3 or +any later version}} published by the Free Software Foundation; +@c {{with the Invariant Sections being}} ``GNU General Public License'' and +@c ``GNU Free Documentation License'', +with no Front-Cover texts and {{with the Back-Cover text being}} +``@emph{You have freedom to copy and modify this manual, like GNU +software.}''. + +@c A copy of the license is included in the section entitled ``GNU Free +@c Documentation License''. +A copy of the GNU Free Documentation License is available along with the +software source code as @file{doc/COPYING.DOC}, and also on the web at +@url{https://www.gnu.org/licenses/fdl.html}. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-or-later_14.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-or-later_14.RULE new file mode 100644 index 00000000000..b87f4fe62db --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-or-later_14.RULE @@ -0,0 +1,12 @@ +--- +license_expression: gfdl-1.3-invariants-or-later +is_license_notice: yes +--- + +Permission is granted to copy, distribute +and/or modify this document under the terms of the {{GNU Free Documentation +License, Version 1.3 or any later version }}published by the Free Software +Foundation; {{with the Invariant Sections being}} LIST THEIR TITLES , +{{with the Front-Cover Texts being}} LIST , and {{with the Back-Cover Texts being}} +LIST . A copy of the license is included in the section entitled "GNU Free +Documentation License". \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-or-later_15.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-or-later_15.RULE new file mode 100644 index 00000000000..89dfe393b25 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-or-later_15.RULE @@ -0,0 +1,12 @@ +--- +license_expression: gfdl-1.3-invariants-or-later +is_license_notice: yes +--- + +Permission is granted to copy, distribute and/or +modify this document under the terms of the {{GNU Free Documentation License, +Version 1.3 or any later version }} published by the Free Software Foundation; +with {{the Invariant Sections being}} , +with {{the Front-Cover Texts being}} , +and with {{the Back-Cover Texts}} being . A copy of the +license is included in the section entitled "GNU Free Documentation License". \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-invariants-or-later_9.RULE b/src/licensedcode/data/rules/gfdl-1.3-invariants-or-later_9.RULE new file mode 100644 index 00000000000..b138bd602d3 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-invariants-or-later_9.RULE @@ -0,0 +1,13 @@ +--- +license_expression: gfdl-1.3-invariants-or-later +is_license_notice: yes +--- + +@c Permission is granted to copy, distribute and/or modify this +@c document under the terms of the {{GNU Free Documentation License, +@c Version 1.3 or any later version}} published by the Free Software +@c Foundation; {{with no Invariant Sections, no Front-Cover Texts}}, and +@c {{with the Back-Cover Text being}} ``You have freedom to copy and +@c modify this manual, like GNU software.''. A copy of the license +@c is included in the section entitled ``GNU Free Documentation +@c License''. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_13.RULE b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_13.RULE new file mode 100644 index 00000000000..7460d709f04 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_13.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-no-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{with no Invariant Section }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_14.RULE b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_14.RULE new file mode 100644 index 00000000000..c50d409ac34 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_14.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-no-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{no Invariant Sections }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_15.RULE b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_15.RULE new file mode 100644 index 00000000000..492450fa8d5 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_15.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-no-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{no Invariant Section }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_16.RULE b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_16.RULE new file mode 100644 index 00000000000..20e251b3163 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_16.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-no-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{with no Front-Cover text }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_17.RULE b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_17.RULE new file mode 100644 index 00000000000..ac395ee1b67 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_17.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-no-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{no Front-Cover text }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_18.RULE b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_18.RULE new file mode 100644 index 00000000000..015be175013 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_18.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-no-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{with no Front-Cover texts }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_19.RULE b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_19.RULE new file mode 100644 index 00000000000..9bdb2a3a93a --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_19.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-no-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{no Front-Cover texts }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_20.RULE b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_20.RULE new file mode 100644 index 00000000000..889ad1167f8 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_20.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-no-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{with no Back-Cover Text }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_21.RULE b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_21.RULE new file mode 100644 index 00000000000..cc401b69366 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_21.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-no-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{no Back-Cover Text }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_22.RULE b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_22.RULE new file mode 100644 index 00000000000..c08023e175a --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_22.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-no-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{with no Back-Cover Texts }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_23.RULE b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_23.RULE new file mode 100644 index 00000000000..019cc1a5071 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_23.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-no-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{no Back-Cover Texts }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_9.RULE b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_9.RULE new file mode 100644 index 00000000000..e0e27395632 --- /dev/null +++ b/src/licensedcode/data/rules/gfdl-1.3-no-invariants-only_9.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gfdl-1.3-no-invariants-only +is_license_reference: yes +is_continuous: yes +relevance: 95 +--- + +{{with no Invariant Sections }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gfdl-1.3_10.RULE b/src/licensedcode/data/rules/gfdl-1.3_10.RULE index a531475a99a..c170edb4755 100644 --- a/src/licensedcode/data/rules/gfdl-1.3_10.RULE +++ b/src/licensedcode/data/rules/gfdl-1.3_10.RULE @@ -3,7 +3,7 @@ license_expression: gfdl-1.3 is_license_text: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gfdl-1.3_ft_no_add.RULE b/src/licensedcode/data/rules/gfdl-1.3_ft_no_add.RULE index 8e5efd1f969..e420d22564c 100644 --- a/src/licensedcode/data/rules/gfdl-1.3_ft_no_add.RULE +++ b/src/licensedcode/data/rules/gfdl-1.3_ft_no_add.RULE @@ -2,7 +2,7 @@ license_expression: gfdl-1.3 is_license_text: yes ignorable_copyrights: - - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-1.0-plus_118.RULE b/src/licensedcode/data/rules/gpl-1.0-plus_118.RULE index 41642658e87..396c2d82acd 100644 --- a/src/licensedcode/data/rules/gpl-1.0-plus_118.RULE +++ b/src/licensedcode/data/rules/gpl-1.0-plus_118.RULE @@ -2,12 +2,8 @@ license_expression: gpl-1.0-plus is_license_tag: yes relevance: 100 -ignorable_copyrights: - - copyright GNU GENERAL PUBLIC LICENSE a href http://www.gnu.org/copyleft/gpl -ignorable_holders: - - GNU GENERAL PUBLIC LICENSE ignorable_urls: - http://www.gnu.org/copyleft/gpl --- -copyright: GNU GENERAL PUBLIC LICENSE | | . +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +https://gnu.org/licenses/gpl.html \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_1132.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_1132.RULE new file mode 100644 index 00000000000..e57c32c273c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0-plus_1132.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-2.0-plus +is_license_notice: yes +ignorable_urls: + - https://gnu.org/licenses/gpl.html +--- + +https://gnu.org/licenses/gpl.html +License {{GPLv2+}}: {{GNU GPL version 2 or later}} <%s>. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_1133.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_1133.RULE new file mode 100644 index 00000000000..042eb163380 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0-plus_1133.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-2.0-plus +is_license_notice: yes +ignorable_urls: + - https://gnu.org/licenses/gpl.html +--- + +https://gnu.org/licenses/gpl.html +License {{GPLv2+}}: {{GNU GPL version 2 or later}} +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_1134.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_1134.RULE new file mode 100644 index 00000000000..09226cc665a --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0-plus_1134.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gpl-2.0-plus +is_license_notice: yes +--- + +License {{GPLv2+}}: {{GNU GPL version 2 or later}} <%s>. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_1135.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_1135.RULE new file mode 100644 index 00000000000..5a29be3ad5c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0-plus_1135.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-2.0-plus +is_license_notice: yes +ignorable_urls: + - https://gnu.org/licenses/gpl.html +--- + +License {{GPLv2+}}: {{GNU GPL version 2 or later}} +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +https://gnu.org/licenses/gpl.html \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_1136.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_1136.RULE new file mode 100644 index 00000000000..50cfb6fbe6b --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0-plus_1136.RULE @@ -0,0 +1,10 @@ +--- +license_expression: gpl-2.0-plus +is_license_notice: yes +is_continuous: yes +relevance: 100 +notes: See https://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html +--- + +{{ cipher has been been taken from the +original NTT provided GPL source.}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_1137.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_1137.RULE new file mode 100644 index 00000000000..b7023601e2a --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0-plus_1137.RULE @@ -0,0 +1,19 @@ +--- +license_expression: gpl-2.0-plus +is_license_notice: yes +--- + +This program is free software; you can redistribute it and/or modify +it under the terms of the {{GNU General Public License}} as published by +the Free Software Foundation; {{either version 2 of the License, or +(at your option) any later version.}} + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +The LICENSE.txt file accompanying this software contains +a copy of the GNU General Public License. If it is not found, +write to the Free Software Foundation, Inc., +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_1138.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_1138.RULE new file mode 100644 index 00000000000..063fecb91e4 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0-plus_1138.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0-plus +is_license_notice: yes +relevance: 100 +--- + +licenced under {{GPLv2+}}. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_1139.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_1139.RULE new file mode 100644 index 00000000000..50b13e08a8c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0-plus_1139.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0-plus +is_license_notice: yes +relevance: 100 +--- + +This code is available under the GPL v2 or higher. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_1140.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_1140.RULE new file mode 100644 index 00000000000..37e67a293ba --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0-plus_1140.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0-plus +is_license_notice: yes +relevance: 100 +--- + +available under the GPL v2 or higher. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_1141.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_1141.RULE new file mode 100644 index 00000000000..0ed6ce843ee --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0-plus_1141.RULE @@ -0,0 +1,14 @@ +--- +license_expression: gpl-2.0-plus +is_license_notice: yes +referenced_filenames: + - COPYING +--- + +This program is free software; you can redistribute it and/or modify it under the terms of the {{GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.}} + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. + +See the COPYING file for more information regarding the GNU General Public License. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_1142.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_1142.RULE new file mode 100644 index 00000000000..5f798f8545a --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0-plus_1142.RULE @@ -0,0 +1,10 @@ +--- +license_expression: gpl-2.0-plus +is_license_notice: yes +--- + +This program is free software; you can redistribute it and/or modify it under the terms of the {{GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version}}. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_636.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_636.RULE index 63ee5bd0431..13b738c7f17 100644 --- a/src/licensedcode/data/rules/gpl-2.0-plus_636.RULE +++ b/src/licensedcode/data/rules/gpl-2.0-plus_636.RULE @@ -5,5 +5,5 @@ relevance: 100 --- Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU General Public License, Version 2 any -later version published by the Free Software Foundation. \ No newline at end of file +under the terms of the {{GNU General Public License, Version 2 any +later version}} published by the Free Software Foundation. diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_or_bsd-new_22.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_or_bsd-new_22.RULE new file mode 100644 index 00000000000..9e0e7e536bc --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0-plus_or_bsd-new_22.RULE @@ -0,0 +1,9 @@ +--- +license_expression: gpl-2.0-plus OR bsd-new +is_license_tag: yes +relevance: 99 +minimum_coverage: 100 +notes: seen at linux/include/dt-bindings/reset/amlogic,meson-axg-reset.h +--- + +* SPDX-License-Identifier: (GPL-2.0+ OR BSD) \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_or_lgpl-2.0-plus_14.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_or_lgpl-2.0-plus_14.RULE index 48c3eca2a8d..b883d6baf78 100644 --- a/src/licensedcode/data/rules/gpl-2.0-plus_or_lgpl-2.0-plus_14.RULE +++ b/src/licensedcode/data/rules/gpl-2.0-plus_or_lgpl-2.0-plus_14.RULE @@ -8,4 +8,4 @@ ignorable_urls: --- ### License ### -This plugin is open sourced under GNU GPL 2 or later and GNU LGPL 2 or later. \ No newline at end of file +This plugin is open sourced under {{GNU GPL 2}} {{or later}} and {{GNU LGPL 2}} {{or later}}. diff --git a/src/licensedcode/data/rules/gpl-2.0-plus_with_mif-exception_jjfs2_2.RULE b/src/licensedcode/data/rules/gpl-2.0-plus_with_mif-exception_jjfs2_2.RULE index f1b74d40f03..8e00215b8d8 100644 --- a/src/licensedcode/data/rules/gpl-2.0-plus_with_mif-exception_jjfs2_2.RULE +++ b/src/licensedcode/data/rules/gpl-2.0-plus_with_mif-exception_jjfs2_2.RULE @@ -3,8 +3,6 @@ license_expression: gpl-2.0-plus WITH mif-exception is_license_notice: yes relevance: 99 minimum_coverage: 100 -referenced_filenames: - - LICENCE notes: seen in U-Boot and the kernel. The LICENCE file is a clear gpl + exception notice --- diff --git a/src/licensedcode/data/rules/gpl-2.0_1436.RULE b/src/licensedcode/data/rules/gpl-2.0_1436.RULE new file mode 100644 index 00000000000..6eb6f2e156a --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1436.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +ignorable_urls: + - https://gnu.org/licenses/gpl.html +--- + +https://gnu.org/licenses/gpl.html +License {{GPLv2}}: {{GNU GPL version 2 }} <%s>. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1437.RULE b/src/licensedcode/data/rules/gpl-2.0_1437.RULE new file mode 100644 index 00000000000..0bfc8ffe25e --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1437.RULE @@ -0,0 +1,13 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +--- + +and used with permission. + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the {{GNU General Public License version 2}} as + * published by the Free Software Foundation. See README and COPYING for + * more details. + */ \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_14371.RULE b/src/licensedcode/data/rules/gpl-2.0_14371.RULE new file mode 100644 index 00000000000..06dbc9a721b --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_14371.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +ignorable_urls: + - https://gnu.org/licenses/gpl.html +--- + +https://gnu.org/licenses/gpl.html +License {{GPLv2}}: {{GNU GPL version 2 }} +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1438.RULE b/src/licensedcode/data/rules/gpl-2.0_1438.RULE new file mode 100644 index 00000000000..80708d30f85 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1438.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +--- + +License {{GPLv2}}: {{GNU GPL version 2 }} <%s>. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1439.RULE b/src/licensedcode/data/rules/gpl-2.0_1439.RULE new file mode 100644 index 00000000000..43fcab2c426 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1439.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +ignorable_urls: + - https://gnu.org/licenses/gpl.html +--- + +License {{GPLv2}}: {{GNU GPL version 2 }} +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +https://gnu.org/licenses/gpl.html \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1440.RULE b/src/licensedcode/data/rules/gpl-2.0_1440.RULE new file mode 100644 index 00000000000..c8e48625fde --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1440.RULE @@ -0,0 +1,19 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +--- + +This program is free software; you can redistribute it and/or modify + it under the terms of the {{GNU General Public License version 2}} as published + by the Free Software Foundation. Note that {{permission is not granted + to redistribute this program under the terms of any other version of the + General Public License.}} + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1441.RULE b/src/licensedcode/data/rules/gpl-2.0_1441.RULE new file mode 100644 index 00000000000..795b2f7439b --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1441.RULE @@ -0,0 +1,17 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +--- + +This program is free software; you can redistribute it and/or modify +it under the terms of the {{GNU General Public License version 2}} as +published by the Free Software Foundation. + +Note that permission is NOT granted to redistribute and/or modify +this program {{under the terms of any other version, earlier or +later}}, of the GNU General Public License. + +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 version 2 for more details. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1442.RULE b/src/licensedcode/data/rules/gpl-2.0_1442.RULE new file mode 100644 index 00000000000..513569ccf49 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1442.RULE @@ -0,0 +1,23 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +referenced_filenames: + - COPYING +notes: https://github.com/brouhaha/nonpareil/blob/86a664e7732ff7e5b487da733edc0022b29ae7fe/src/card_reader.c +--- + +is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License version 2 as +published by the Free Software Foundation. Note that I am not +granting permission to redistribute or modify under the +terms of any later version of the General Public License. + + 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 (in the file "COPYING"); if not, write to the +Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, +MA 02111, USA. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1443.RULE b/src/licensedcode/data/rules/gpl-2.0_1443.RULE new file mode 100644 index 00000000000..d439bb449db --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1443.RULE @@ -0,0 +1,22 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +referenced_filenames: + - COPYING +notes: https://github.com/watmough/Calc41C/blob/6b0e9e36d51cc4d45318aca0b832d6c754e0f603/Classes/rom.h#L9 +--- + +is free software; you can redistribute it and/or modify it under the +terms of the GNU General Public License version 2 as published by the Free +Software Foundation. Note that I am not granting permission to redistribute +or modify under the terms of any later version of the General Public +License. + +This program is distributed in the hope that it will be useful (or at least +amusing), 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 (in the file "COPYING"); if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1444.RULE b/src/licensedcode/data/rules/gpl-2.0_1444.RULE new file mode 100644 index 00000000000..fb48b72675c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1444.RULE @@ -0,0 +1,19 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +referenced_filenames: + - LICENSE.GPL +ignorable_urls: + - http://www.gnu.org/copyleft/gpl.html +--- + +This file may be distributed and/or modified under the terms of the +GNU General Public License version 2 as published by the Free Software +Foundation and appearing in the file LICENSE.GPL included in the +packaging of this file. + +This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +See the file LICENSE.GPL that came with this software distribution or +visit http://www.gnu.org/copyleft/gpl.html for GPL licensing information. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1445.RULE b/src/licensedcode/data/rules/gpl-2.0_1445.RULE new file mode 100644 index 00000000000..e957a866c23 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1445.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +referenced_filenames: + - LICENSE.GPL +ignorable_urls: + - http://www.gnu.org/copyleft/gpl.html +--- + +See the file LICENSE.GPL that came with this software distribution or +visit http://www.gnu.org/copyleft/gpl.html for GPL licensing information. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1446.RULE b/src/licensedcode/data/rules/gpl-2.0_1446.RULE new file mode 100644 index 00000000000..ccd0b7e1765 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1446.RULE @@ -0,0 +1,9 @@ +--- +license_expression: gpl-2.0 +is_license_reference: yes +relevance: 100 +ignorable_urls: + - http://www.gnu.org/copyleft/gpl.html +--- + +visit http://www.gnu.org/copyleft/gpl.html for GPL licensing information. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1447.RULE b/src/licensedcode/data/rules/gpl-2.0_1447.RULE new file mode 100644 index 00000000000..2e68f9474ce --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1447.RULE @@ -0,0 +1,10 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +referenced_filenames: + - COPYING +--- + +This file is part of the {{S-Lang}} Library and may be distributed under the +terms of the {{GNU General Public License}}. See the file COPYING for +more information. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1448.RULE b/src/licensedcode/data/rules/gpl-2.0_1448.RULE new file mode 100644 index 00000000000..0be54b65052 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1448.RULE @@ -0,0 +1,17 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +ignorable_urls: + - http://www.gnu.org/licenses/ +--- + +This program is free software; you can redistribute it and/or modify + it under the terms of the GNU {{General Public License version 2.0}}, as + published by the Free Software Foundation. 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 . \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1449.RULE b/src/licensedcode/data/rules/gpl-2.0_1449.RULE new file mode 100644 index 00000000000..3f0e154f5ed --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1449.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPLv2 license \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1450.RULE b/src/licensedcode/data/rules/gpl-2.0_1450.RULE new file mode 100644 index 00000000000..d1a7b7d433c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1450.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPLv2 licence \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1451.RULE b/src/licensedcode/data/rules/gpl-2.0_1451.RULE new file mode 100644 index 00000000000..857d765caa6 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1451.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPLv2 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1452.RULE b/src/licensedcode/data/rules/gpl-2.0_1452.RULE new file mode 100644 index 00000000000..566f664b74c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1452.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL v2 license \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1453.RULE b/src/licensedcode/data/rules/gpl-2.0_1453.RULE new file mode 100644 index 00000000000..119caef4975 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1453.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL v2 licence \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1454.RULE b/src/licensedcode/data/rules/gpl-2.0_1454.RULE new file mode 100644 index 00000000000..841bd4020d2 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1454.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL v2 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1455.RULE b/src/licensedcode/data/rules/gpl-2.0_1455.RULE new file mode 100644 index 00000000000..6b5c6d329c8 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1455.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL v2.0 license \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1456.RULE b/src/licensedcode/data/rules/gpl-2.0_1456.RULE new file mode 100644 index 00000000000..1dcbdb8a7ce --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1456.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL v2.0 licence \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1457.RULE b/src/licensedcode/data/rules/gpl-2.0_1457.RULE new file mode 100644 index 00000000000..597d382a123 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1457.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL v2.0 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1458.RULE b/src/licensedcode/data/rules/gpl-2.0_1458.RULE new file mode 100644 index 00000000000..40b07cf181c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1458.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL 2 license \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1459.RULE b/src/licensedcode/data/rules/gpl-2.0_1459.RULE new file mode 100644 index 00000000000..7e4b73618fa --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1459.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL 2 licence \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1460.RULE b/src/licensedcode/data/rules/gpl-2.0_1460.RULE new file mode 100644 index 00000000000..45ff41ad91f --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1460.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL 2 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1461.RULE b/src/licensedcode/data/rules/gpl-2.0_1461.RULE new file mode 100644 index 00000000000..5db8a988595 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1461.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL2 license \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1462.RULE b/src/licensedcode/data/rules/gpl-2.0_1462.RULE new file mode 100644 index 00000000000..0118a63032c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1462.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL2 licence \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1463.RULE b/src/licensedcode/data/rules/gpl-2.0_1463.RULE new file mode 100644 index 00000000000..858c00a4099 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1463.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL2 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1464.RULE b/src/licensedcode/data/rules/gpl-2.0_1464.RULE new file mode 100644 index 00000000000..986b8f20503 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1464.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +License +This code is distributed under the terms and conditions of the GPL v2 license. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1465.RULE b/src/licensedcode/data/rules/gpl-2.0_1465.RULE new file mode 100644 index 00000000000..4507ea7379e --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1465.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +This code is distributed under the terms and conditions of the GPL v2 license. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1466.RULE b/src/licensedcode/data/rules/gpl-2.0_1466.RULE new file mode 100644 index 00000000000..8cacc0dda30 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1466.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +distributed under the terms and conditions of the GPL v2 license. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_1467.RULE b/src/licensedcode/data/rules/gpl-2.0_1467.RULE new file mode 100644 index 00000000000..2bed5f3c925 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_1467.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 +is_license_notice: yes +relevance: 100 +--- + +distributed under the terms and conditions of the GPL v2 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_872.RULE b/src/licensedcode/data/rules/gpl-2.0_872.RULE index 6e586945bd0..a895c597770 100644 --- a/src/licensedcode/data/rules/gpl-2.0_872.RULE +++ b/src/licensedcode/data/rules/gpl-2.0_872.RULE @@ -3,7 +3,7 @@ license_expression: gpl-2.0 is_license_text: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 1989, 1991 Free Software Foundation, Inc., + - Copyright (c) 1989, 1991 Free Software Foundation, Inc., http://fsf.org - copyrighted by the Free Software Foundation ignorable_holders: - Free Software Foundation, Inc. diff --git a/src/licensedcode/data/rules/gpl-2.0_and_gpl-1.0-plus_and_gpl-2.0-plus_and_lgpl-2.0_and_lgpl-2.0-plus_and_lgpl-2.1_and_lgpl-2.1-plus_1.RULE b/src/licensedcode/data/rules/gpl-2.0_and_gpl-1.0-plus_and_gpl-2.0-plus_and_lgpl-2.0_and_lgpl-2.0-plus_and_lgpl-2.1_and_lgpl-2.1-plus_1.RULE new file mode 100644 index 00000000000..662798c4c0d --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_and_gpl-1.0-plus_and_gpl-2.0-plus_and_lgpl-2.0_and_lgpl-2.0-plus_and_lgpl-2.1_and_lgpl-2.1-plus_1.RULE @@ -0,0 +1,17 @@ +--- +license_expression: gpl-2.0 AND gpl-1.0-plus AND gpl-2.0-plus AND lgpl-2.0 AND lgpl-2.0-plus + AND lgpl-2.1 AND lgpl-2.1-plus +is_license_notice: yes +minimum_coverage: 90 +--- + +The license described in the {{COPYING file applies to the kernel source}} +as a whole, though individual source files can have a different license +which is required to be compatible with the GPL-2.0:: + + GPL-1.0+ : GNU General Public License v1.0 or later + GPL-2.0+ : GNU General Public License v2.0 or later + LGPL-2.0 : GNU Library General Public License v2 only + LGPL-2.0+ : GNU Library General Public License v2 or later + LGPL-2.1 : GNU Lesser General Public License v2.1 only + LGPL-2.1+ : GNU Lesser General Public License v2.1 or later \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_or_bsd-new_31.RULE b/src/licensedcode/data/rules/gpl-2.0_or_bsd-new_31.RULE new file mode 100644 index 00000000000..e36d84488b5 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_or_bsd-new_31.RULE @@ -0,0 +1,15 @@ +--- +license_expression: gpl-2.0 OR bsd-new +is_license_notice: yes +notes: Seen in Linux +--- + +This code is released under both the GPL version 2 and BSD licenses. +Either license may be used. The respective licenses are found at +the end of this file. + +This code was developed by +including portions of which come from the +Developer's Reference Manual and used with permission. +Permission to use +code in the Developer's manual was granted for this driver diff --git a/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_1.RULE b/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_1.RULE new file mode 100644 index 00000000000..c3a6dec127f --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_1.RULE @@ -0,0 +1,42 @@ +--- +license_expression: gpl-2.0 OR cddl-1.1 +is_license_notice: yes +referenced_filenames: + - packager/legal/LICENSE.txt +ignorable_urls: + - http://glassfish.java.net/public/CDDL+GPL_1_1.html +--- + +The contents of this file are subject to the terms of either the GNU + General Public License Version 2 only ("GPL") or the Common Development + and Distribution License("CDDL") (collectively, the "License"). You + may not use this file except in compliance with the License. You can + obtain a copy of the License at + http://glassfish.java.net/public/CDDL+GPL_1_1.html + or packager/legal/LICENSE.txt. See the License for the specific + language governing permissions and limitations under the License. + + When distributing the software, include this License Header Notice in each + file and include the License file at packager/legal/LICENSE.txt. + + GPL Classpath Exception: + Oracle designates this particular file as subject to the "Classpath" + exception as provided by Oracle in the GPL Version 2 section of the License + file that accompanied this code. + + Modifications: + If applicable, add the following below the License Header, with the fields + enclosed by brackets [] replaced by your own identifying information: + "Portions Copyright [year] [name of copyright owner]" + + Contributor(s): + If you wish your version of this file to be governed by only the CDDL or + only the GPL Version 2, indicate your decision by adding "[Contributor] + elects to include this software in this distribution under the [CDDL or GPL + Version 2] license." If you don't indicate a single choice of license, a + recipient has the option to distribute your version of this file under + either the CDDL, the GPL Version 2 or to extend the choice of license to + its licensees as provided above. However, if you add GPL Version 2 code + and therefore, elected the GPL Version 2 license, then the option applies + only if the new code is made subject to such option by the copyright + holder. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_2.RULE b/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_2.RULE new file mode 100644 index 00000000000..9b8bc450977 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_2.RULE @@ -0,0 +1,13 @@ +--- +license_expression: gpl-2.0 OR cddl-1.1 +is_license_tag: yes +ignorable_urls: + - http://glassfish.java.net/public/CDDL+GPL_1_1.html +--- + + + + + Dual license consisting of the CDDL v1.1 and GPL v2 + + http://glassfish.java.net/public/CDDL+GPL_1_1.html \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_3.RULE b/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_3.RULE new file mode 100644 index 00000000000..2c564d6a79c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_3.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-2.0 OR cddl-1.1 +is_license_tag: yes +ignorable_urls: + - http://glassfish.java.net/public/CDDL+GPL_1_1.html +--- + + + + Dual license consisting of the CDDL v1.1 and GPL v2 + http://glassfish.java.net/public/CDDL+GPL_1_1.html \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_4.RULE b/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_4.RULE new file mode 100644 index 00000000000..c3a2832753c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_4.RULE @@ -0,0 +1,10 @@ +--- +license_expression: gpl-2.0 OR cddl-1.1 +is_license_tag: yes +ignorable_urls: + - http://glassfish.java.net/public/CDDL+GPL_1_1.html +--- + + + Dual license consisting of the CDDL v1.1 and GPL v2 + http://glassfish.java.net/public/CDDL+GPL_1_1.html \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_5.RULE b/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_5.RULE new file mode 100644 index 00000000000..82a416621b4 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_or_cddl-1.1_5.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-2.0 OR cddl-1.1 +is_license_notice: yes +relevance: 100 +--- + +Dual license consisting of the CDDL v1.1 and GPL v2 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_or_commercial-license_10.RULE b/src/licensedcode/data/rules/gpl-2.0_or_commercial-license_10.RULE new file mode 100644 index 00000000000..09976088a42 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_or_commercial-license_10.RULE @@ -0,0 +1,9 @@ +--- +license_expression: gpl-2.0 OR commercial-license +is_license_notice: yes +notes: Seen in YAFFS2 +--- + +available under the GPL and via alternative licensing +arrangements with . If you're using as a {{Linux kernel +file system then it will be under the GPL.}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-2.0_templatized.RULE b/src/licensedcode/data/rules/gpl-2.0_templatized.RULE index 1ee10125fbc..0a5bf6fce0d 100644 --- a/src/licensedcode/data/rules/gpl-2.0_templatized.RULE +++ b/src/licensedcode/data/rules/gpl-2.0_templatized.RULE @@ -2,7 +2,7 @@ license_expression: gpl-2.0 is_license_text: yes ignorable_copyrights: - - Copyright (c) 1989, 1991 Free Software Foundation, Inc., + - Copyright (c) 1989, 1991 Free Software Foundation, Inc., http://fsf.org - copyrighted by the Free Software Foundation ignorable_holders: - Free Software Foundation, Inc. diff --git a/src/licensedcode/data/rules/gpl-2.0_with_ecos-exception-2.0_2.RULE b/src/licensedcode/data/rules/gpl-2.0_with_ecos-exception-2.0_2.RULE index 330ac4029d2..4f00135a751 100644 --- a/src/licensedcode/data/rules/gpl-2.0_with_ecos-exception-2.0_2.RULE +++ b/src/licensedcode/data/rules/gpl-2.0_with_ecos-exception-2.0_2.RULE @@ -6,14 +6,14 @@ referenced_filenames: - COPYING.GPL --- -The software in this package is distributed under the GNU General -Public License version 2 (with a special exception described below). +The software in this package is distributed under the {{GNU General +Public License version 2 (with a special exception }} described below). A copy of GNU General Public License (GPL) is included in this distribution, in the file COPYING.GPL. -As a special exception, if other files instantiate templates or use macros +{{As a special exception, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other works to produce a work based on this file, this file does not by itself cause the resulting work to be covered -by the GNU General Public License. \ No newline at end of file +by the GNU General Public License. }} diff --git a/src/licensedcode/data/rules/gpl-2.0_with_linux-syscall-exception-gpl_14.RULE b/src/licensedcode/data/rules/gpl-2.0_with_linux-syscall-exception-gpl_14.RULE new file mode 100644 index 00000000000..29360e719b2 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-2.0_with_linux-syscall-exception-gpl_14.RULE @@ -0,0 +1,10 @@ +--- +license_expression: gpl-2.0 WITH linux-syscall-exception-gpl +is_license_notice: yes +notes: seen in kernel /Documentation/process/license-rules.rst +--- + +The Linux Kernel is provided under the terms of the {{GNU General Public +License version 2 only}} (GPL-2.0), as provided in LICENSES/preferred/GPL-2.0, +with an explicit syscall exception described in +{{LICENSES/exceptions/Linux-syscall-note}}, as described in the COPYING file. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_513.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_513.RULE index 438a5a28132..aa91e60e8dc 100644 --- a/src/licensedcode/data/rules/gpl-3.0-plus_513.RULE +++ b/src/licensedcode/data/rules/gpl-3.0-plus_513.RULE @@ -3,7 +3,7 @@ license_expression: gpl-3.0 is_license_text: yes notes: this is a plain GPL not "or later" ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_592.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_592.RULE new file mode 100644 index 00000000000..a1230294911 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_592.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-3.0-plus +is_license_notice: yes +ignorable_urls: + - https://gnu.org/licenses/gpl.html +--- + +License {{GPLv3+}}: GNU {{GPL version 3 or later}} <%s>. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +https://gnu.org/licenses/gpl.html \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_593.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_593.RULE new file mode 100644 index 00000000000..c4adeceb9f8 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_593.RULE @@ -0,0 +1,15 @@ +--- +license_expression: gpl-3.0-plus +is_license_notice: yes +minimum_coverage: 85 +ignorable_urls: + - http://www.gnu.org/licenses/ +--- + +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 {\field{\*\{HYPERLINK "http://www.gnu.org/licenses/ http://www.gnu.org/licenses/ \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_594.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_594.RULE new file mode 100644 index 00000000000..714f6404234 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_594.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-3.0-plus +is_license_notice: yes +ignorable_urls: + - https://gnu.org/licenses/gpl.html +--- + +https://gnu.org/licenses/gpl.html +License {{GPLv3+}}: {{GNU GPL version 3 or later}} <%s>. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_595.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_595.RULE new file mode 100644 index 00000000000..23d8efe8c24 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_595.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-3.0-plus +is_license_notice: yes +ignorable_urls: + - https://gnu.org/licenses/gpl.html +--- + +https://gnu.org/licenses/gpl.html +License {{GPLv3+}}: {{GNU GPL version 3 or later}} +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_596.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_596.RULE new file mode 100644 index 00000000000..60bfebb4cb2 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_596.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gpl-3.0-plus +is_license_notice: yes +--- + +License {{GPLv3+}}: {{GNU GPL version 3 or later}} <%s>. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_597.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_597.RULE new file mode 100644 index 00000000000..6d3d2afa6f8 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_597.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-3.0-plus +is_license_notice: yes +ignorable_urls: + - https://gnu.org/licenses/gpl.html +--- + +License {{GPLv3+}}: {{GNU GPL version 3 or later}} +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +https://gnu.org/licenses/gpl.html \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_598.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_598.RULE new file mode 100644 index 00000000000..413c8569470 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_598.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gpl-3.0-plus +is_license_notice: yes +referenced_filenames: + - LICENSE +--- + +It is released under the terms of the GNU General Public License, version 3; See LICENSE file for details. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_599.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_599.RULE new file mode 100644 index 00000000000..ab81ed8514e --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_599.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0-plus +is_license_notice: yes +relevance: 100 +--- + +It is released under the terms of the GNU General Public License, version 3 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_600.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_600.RULE new file mode 100644 index 00000000000..0b01ce4c1b7 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_600.RULE @@ -0,0 +1,9 @@ +--- +license_expression: gpl-3.0-plus +is_license_notice: yes +relevance: 100 +referenced_filenames: + - LICENSE +--- + +released under the terms of the GNU General Public License, version 3; See LICENSE file for details. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_601.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_601.RULE new file mode 100644 index 00000000000..c329b54035c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_601.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0-plus +is_license_notice: yes +relevance: 100 +--- + +released under the terms of the GNU General Public License, version 3 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_602.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_602.RULE new file mode 100644 index 00000000000..8dc1859c7ae --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_602.RULE @@ -0,0 +1,9 @@ +--- +license_expression: gpl-3.0-plus +is_license_notice: yes +relevance: 100 +ignorable_urls: + - https://gnu.org/licenses/gpl.html +--- + +License GPLv3+: GNU GPL version 3 or later \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_603.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_603.RULE new file mode 100644 index 00000000000..306aebdf457 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_603.RULE @@ -0,0 +1,9 @@ +--- +license_expression: gpl-3.0-plus +is_license_notice: yes +relevance: 100 +referenced_filenames: + - COPYING +--- + +The project is licensed under GPLv3+, see COPYING for details. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_604.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_604.RULE new file mode 100644 index 00000000000..c978e7004a8 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_604.RULE @@ -0,0 +1,19 @@ +--- +license_expression: gpl-3.0-plus +is_license_notice: yes +ignorable_urls: + - http://www.gnu.org/licenses/ +--- + +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, * + (at your option) any later version * + + This program is distributed in the hope that it will be useful, * + but WITHOUT ANY WARRANTY; without even the implied warranty of * + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + GNU General Public License for more details * + + You should have received a copy of the GNU General Public License * + along with this program; if not, see http://www.gnu.org/licenses/ \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_605.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_605.RULE new file mode 100644 index 00000000000..2d52b218e7c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_605.RULE @@ -0,0 +1,19 @@ +--- +license_expression: gpl-3.0-plus +is_license_notice: yes +ignorable_urls: + - http://www.gnu.org/licenses/ +--- + +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, * + (at your option) any later version * + + This program is distributed in the hope that it will be LICENSE.LGPLv21useful, * + but WITHOUT ANY WARRANTY; without even the implied warranty of * + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + GNU General Public License for more details * + + You should have received a copy of the GNU General Public License * + along with this program; if not, see http://www.gnu.org/licenses/ * \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_with_autoconf-exception-3.0_1.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_with_autoconf-exception-3.0_1.RULE index 8ca15340044..878c7288758 100644 --- a/src/licensedcode/data/rules/gpl-3.0-plus_with_autoconf-exception-3.0_1.RULE +++ b/src/licensedcode/data/rules/gpl-3.0-plus_with_autoconf-exception-3.0_1.RULE @@ -3,7 +3,7 @@ license_expression: gpl-3.0-plus WITH autoconf-exception-3.0 is_license_notice: yes minimum_coverage: 80 ignorable_copyrights: - - Copyright (c) 2009 Free Software Foundation, Inc. + - Copyright (c) 2009 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_with_autoconf-exception-3.0_2.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_with_autoconf-exception-3.0_2.RULE index d2ef6d48fdd..edd1b9d5d41 100644 --- a/src/licensedcode/data/rules/gpl-3.0-plus_with_autoconf-exception-3.0_2.RULE +++ b/src/licensedcode/data/rules/gpl-3.0-plus_with_autoconf-exception-3.0_2.RULE @@ -4,7 +4,7 @@ is_license_notice: yes relevance: 100 minimum_coverage: 80 ignorable_copyrights: - - Copyright (c) 2009 Free Software Foundation, Inc. + - Copyright (c) 2009 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_with_font-exception-gpl_39.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_with_font-exception-gpl_39.RULE new file mode 100644 index 00000000000..98b49e79113 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0-plus_with_font-exception-gpl_39.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0-plus WITH font-exception-gpl +is_license_notice: yes +relevance: 100 +--- + +Licensed under {{GNU GPL version 3 or more with font exception.}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_2.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_2.RULE index 5ae766cd898..cf395f4f243 100644 --- a/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_2.RULE +++ b/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_2.RULE @@ -2,7 +2,7 @@ license_expression: gpl-3.0-plus WITH gcc-exception-3.1 is_license_notice: yes ignorable_copyrights: - - Copyright (c) 2009 Free Software Foundation, Inc. + - Copyright (c) 2009 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_24.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_24.RULE index c1fd1e84ba2..1b7b37b05ea 100644 --- a/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_24.RULE +++ b/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_24.RULE @@ -3,7 +3,7 @@ license_expression: gpl-3.0-plus WITH gcc-exception-3.1 is_license_notice: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 2009 Free Software Foundation, Inc. + - Copyright (c) 2009 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_3.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_3.RULE index b7c1275137f..a3f9992ba34 100644 --- a/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_3.RULE +++ b/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_3.RULE @@ -4,7 +4,7 @@ is_license_notice: yes minimum_coverage: 10 notes: license text as published by SPDX ignorable_copyrights: - - Copyright (c) 2009 Free Software Foundation, Inc. + - Copyright (c) 2009 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_31.RULE b/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_31.RULE index 65ecba5c2e3..5119378b790 100644 --- a/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_31.RULE +++ b/src/licensedcode/data/rules/gpl-3.0-plus_with_gcc-exception-3.1_31.RULE @@ -5,7 +5,7 @@ relevance: 100 minimum_coverage: 10 notes: license text as published by SPDX ignorable_copyrights: - - Copyright (c) 2009 Free Software Foundation, Inc. + - Copyright (c) 2009 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0.SPDX.RULE b/src/licensedcode/data/rules/gpl-3.0.SPDX.RULE index f72d298ce3d..a810d6302e1 100644 --- a/src/licensedcode/data/rules/gpl-3.0.SPDX.RULE +++ b/src/licensedcode/data/rules/gpl-3.0.SPDX.RULE @@ -4,7 +4,7 @@ is_license_text: yes minimum_coverage: 10 notes: license text as published by SPDX ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0_204.RULE b/src/licensedcode/data/rules/gpl-3.0_204.RULE index 8462d0bef58..6f835b8a422 100644 --- a/src/licensedcode/data/rules/gpl-3.0_204.RULE +++ b/src/licensedcode/data/rules/gpl-3.0_204.RULE @@ -2,7 +2,7 @@ license_expression: gpl-3.0 is_license_text: yes ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0_234.RULE b/src/licensedcode/data/rules/gpl-3.0_234.RULE index 4b9ce16af77..5e3e80e7a00 100644 --- a/src/licensedcode/data/rules/gpl-3.0_234.RULE +++ b/src/licensedcode/data/rules/gpl-3.0_234.RULE @@ -3,7 +3,7 @@ license_expression: gpl-3.0 is_license_text: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0_259.RULE b/src/licensedcode/data/rules/gpl-3.0_259.RULE index 37be8f58afa..59f5fef94bd 100644 --- a/src/licensedcode/data/rules/gpl-3.0_259.RULE +++ b/src/licensedcode/data/rules/gpl-3.0_259.RULE @@ -3,7 +3,7 @@ license_expression: gpl-3.0 is_license_text: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0_290.RULE b/src/licensedcode/data/rules/gpl-3.0_290.RULE index 360b833e6b5..bf7f736feab 100644 --- a/src/licensedcode/data/rules/gpl-3.0_290.RULE +++ b/src/licensedcode/data/rules/gpl-3.0_290.RULE @@ -6,5 +6,5 @@ referenced_filenames: - LICENSE --- -LICENSE: This program is free software and may be modified and distributed under the terms of the GNU Public License version 3. -# See the LICENSE file at the top of the source tree. \ No newline at end of file +LICENSE: This program is free software and may be modified and distributed under the terms of the {{GNU Public License version 3.}} +# See the LICENSE file at the top of the source tree. diff --git a/src/licensedcode/data/rules/gpl-3.0_331.RULE b/src/licensedcode/data/rules/gpl-3.0_331.RULE index 28cd0eba536..64a9d85aed9 100644 --- a/src/licensedcode/data/rules/gpl-3.0_331.RULE +++ b/src/licensedcode/data/rules/gpl-3.0_331.RULE @@ -3,7 +3,7 @@ license_expression: gpl-3.0 is_license_text: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0_455.RULE b/src/licensedcode/data/rules/gpl-3.0_455.RULE index 984f0f73bbc..b8a04aca842 100644 --- a/src/licensedcode/data/rules/gpl-3.0_455.RULE +++ b/src/licensedcode/data/rules/gpl-3.0_455.RULE @@ -3,7 +3,7 @@ license_expression: gpl-3.0 is_license_text: yes relevance: 100 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0_466.RULE b/src/licensedcode/data/rules/gpl-3.0_466.RULE index ffe209f3de9..254e1031205 100644 --- a/src/licensedcode/data/rules/gpl-3.0_466.RULE +++ b/src/licensedcode/data/rules/gpl-3.0_466.RULE @@ -5,7 +5,7 @@ relevance: 100 minimum_coverage: 10 notes: license text as published by SPDX ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0_483.RULE b/src/licensedcode/data/rules/gpl-3.0_483.RULE index c390f6adb6c..807afd3fd02 100644 --- a/src/licensedcode/data/rules/gpl-3.0_483.RULE +++ b/src/licensedcode/data/rules/gpl-3.0_483.RULE @@ -3,7 +3,7 @@ license_expression: gpl-3.0 is_license_text: yes notes: skinny GPL 3.0 text cut after END OF TERMS AND CONDITIONS ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0_579.RULE b/src/licensedcode/data/rules/gpl-3.0_579.RULE new file mode 100644 index 00000000000..9200f46ceb6 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_579.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +ignorable_urls: + - https://gnu.org/licenses/gpl.html +--- + +https://gnu.org/licenses/gpl.html +License {{GPLv3}}: {{GNU GPL version 3 }} <%s>. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_580.RULE b/src/licensedcode/data/rules/gpl-3.0_580.RULE new file mode 100644 index 00000000000..369ea5bfb75 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_580.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +ignorable_urls: + - https://gnu.org/licenses/gpl.html +--- + +https://gnu.org/licenses/gpl.html +License {{GPLv3}}: {{GNU GPL version 3 }} +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_581.RULE b/src/licensedcode/data/rules/gpl-3.0_581.RULE new file mode 100644 index 00000000000..bc4daefd53d --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_581.RULE @@ -0,0 +1,8 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +--- + +License {{GPLv3}}: {{GNU GPL version 3 }} <%s>. +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_582.RULE b/src/licensedcode/data/rules/gpl-3.0_582.RULE new file mode 100644 index 00000000000..66b5e269244 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_582.RULE @@ -0,0 +1,11 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +ignorable_urls: + - https://gnu.org/licenses/gpl.html +--- + +License {{GPLv3}}: {{GNU GPL version 3 }} +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. +https://gnu.org/licenses/gpl.html \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_583.RULE b/src/licensedcode/data/rules/gpl-3.0_583.RULE new file mode 100644 index 00000000000..6d396b76922 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_583.RULE @@ -0,0 +1,19 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +--- + +This program is free software; you can redistribute it and/or modify + it under the terms of the {{GNU General Public License version 3}} as published + by the Free Software Foundation. Note that {{permission is not granted + to redistribute this program under the terms of any other version of the + General Public License.}} + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_584.RULE b/src/licensedcode/data/rules/gpl-3.0_584.RULE new file mode 100644 index 00000000000..5e8570ad89b --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_584.RULE @@ -0,0 +1,26 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +referenced_filenames: + - gpl-3.0.txt +ignorable_urls: + - https://www.gnu.org/licenses/ +--- + +This program is free software; you can redistribute it and/or modify +it under the terms of the {{GNU General Public License version 3}} as +published by the Free Software Foundation. + +Note that permission is NOT granted to redistribute and/or modify +this porogram {{under the terms of any other version, earlier or +later}}, of the GNU General Public License. + +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 version 3 for more details. + +You should have received a copy of the GNU General Public License +version 3 along with this program (in the file "gpl-3.0.txt"); if not, +see . +*/ \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_585.RULE b/src/licensedcode/data/rules/gpl-3.0_585.RULE new file mode 100644 index 00000000000..6717ac3075c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_585.RULE @@ -0,0 +1,17 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +--- + +This program is free software; you can redistribute it and/or modify +it under the terms of the {{GNU General Public License version 3}} as +published by the Free Software Foundation. + +Note that permission is NOT granted to redistribute and/or modify +this program {{under the terms of any other version, earlier or +later}}, of the GNU General Public License. + +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 version 3 for more details. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_586.RULE b/src/licensedcode/data/rules/gpl-3.0_586.RULE new file mode 100644 index 00000000000..ab369c7f1ef --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_586.RULE @@ -0,0 +1,200 @@ +--- +license_expression: gpl-3.0 +is_license_text: yes +ignorable_copyrights: + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org +ignorable_holders: + - Free Software Foundation, Inc. +ignorable_urls: + - https://fsf.org/ +--- + +GNU GENERAL PUBLIC LICENSE + +Version 3, 29 June 2007 + +Copyright © 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. +Preamble + +The GNU General Public License is a free, copyleft license for software and other kinds of works. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. + +Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. + +Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. +TERMS AND CONDITIONS +0. Definitions. + +“This License” refers to version 3 of the GNU General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based on the Program. + +To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. +1. Source Code. + +The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. + +A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. +2. Basic Permissions. + +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. +3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. +4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. +5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified it, and giving a relevant date. + b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. + c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. + d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. +6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: + + a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. + b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. + c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. + d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. + e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. +7. Additional Terms. + +“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or + b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or + c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or + d) Limiting the use for publicity purposes of names of licensors or authors of the material; or + e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or + f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. + +All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. +8. Termination. + +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. +9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. +10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. + +An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. +11. Patents. + +A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. +12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. +13. Use with the GNU Affero General Public License. + +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. +14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. +15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_587.RULE b/src/licensedcode/data/rules/gpl-3.0_587.RULE new file mode 100644 index 00000000000..3847233fba0 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_587.RULE @@ -0,0 +1,9 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +is_continuous: yes +relevance: 100 +--- + +{{License +GNU General Public License, version 3}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_588.RULE b/src/licensedcode/data/rules/gpl-3.0_588.RULE new file mode 100644 index 00000000000..b4126e54d2c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_588.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_reference: yes +relevance: 100 +--- + +The terms of the GPL 3.0 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_589.RULE b/src/licensedcode/data/rules/gpl-3.0_589.RULE new file mode 100644 index 00000000000..ee27f0b4ed9 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_589.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +--- + +// Licensed under the {{GNU General Public License Version 3.0}}. Refer to the +// license file accompanying this program for more information. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_590.RULE b/src/licensedcode/data/rules/gpl-3.0_590.RULE new file mode 100644 index 00000000000..a43f88a6511 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_590.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPLv3 license \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_591.RULE b/src/licensedcode/data/rules/gpl-3.0_591.RULE new file mode 100644 index 00000000000..824dace839a --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_591.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPLv3 licence \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_592.RULE b/src/licensedcode/data/rules/gpl-3.0_592.RULE new file mode 100644 index 00000000000..190e402fbcd --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_592.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPLv3 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_593.RULE b/src/licensedcode/data/rules/gpl-3.0_593.RULE new file mode 100644 index 00000000000..2204d396a88 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_593.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL v3 license \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_594.RULE b/src/licensedcode/data/rules/gpl-3.0_594.RULE new file mode 100644 index 00000000000..d9e36d09deb --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_594.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL v3 licence \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_595.RULE b/src/licensedcode/data/rules/gpl-3.0_595.RULE new file mode 100644 index 00000000000..07945988311 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_595.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL v3 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_596.RULE b/src/licensedcode/data/rules/gpl-3.0_596.RULE new file mode 100644 index 00000000000..8925bbc1bf0 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_596.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL v3.0 license \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_597.RULE b/src/licensedcode/data/rules/gpl-3.0_597.RULE new file mode 100644 index 00000000000..b211161d0e4 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_597.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL v3.0 licence \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_598.RULE b/src/licensedcode/data/rules/gpl-3.0_598.RULE new file mode 100644 index 00000000000..d13e6134b67 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_598.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL v3.0 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_599.RULE b/src/licensedcode/data/rules/gpl-3.0_599.RULE new file mode 100644 index 00000000000..84f24f6047b --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_599.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL 3 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_600.RULE b/src/licensedcode/data/rules/gpl-3.0_600.RULE new file mode 100644 index 00000000000..20d0e091847 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_600.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL 3 licence \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_601.RULE b/src/licensedcode/data/rules/gpl-3.0_601.RULE new file mode 100644 index 00000000000..337ea2b7d88 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_601.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL 3 license \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_602.RULE b/src/licensedcode/data/rules/gpl-3.0_602.RULE new file mode 100644 index 00000000000..ab5bc555c57 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_602.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL3 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_603.RULE b/src/licensedcode/data/rules/gpl-3.0_603.RULE new file mode 100644 index 00000000000..c641024acc0 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_603.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL3 licence \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_604.RULE b/src/licensedcode/data/rules/gpl-3.0_604.RULE new file mode 100644 index 00000000000..2f479284bb0 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_604.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the GPL3 license \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_605.RULE b/src/licensedcode/data/rules/gpl-3.0_605.RULE new file mode 100644 index 00000000000..2dc1886040a --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_605.RULE @@ -0,0 +1,9 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +referenced_filenames: + - docs/COPYING +--- + +distributed under the Terms and Conditions of the GPLv3, which can be +found in full-text in docs/COPYING. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_606.RULE b/src/licensedcode/data/rules/gpl-3.0_606.RULE new file mode 100644 index 00000000000..b49064cc479 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_606.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +distributed under the Terms and Conditions of the GPLv3 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_607.RULE b/src/licensedcode/data/rules/gpl-3.0_607.RULE new file mode 100644 index 00000000000..a9b4b38ecde --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_607.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +Released under the terms and conditions of the GPLv3 license \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_608.RULE b/src/licensedcode/data/rules/gpl-3.0_608.RULE new file mode 100644 index 00000000000..9e882d36fa0 --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_608.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_notice: yes +relevance: 100 +--- + +Released under the terms and conditions of the GPLv3 \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_80.RULE b/src/licensedcode/data/rules/gpl-3.0_80.RULE index fe45c13d3ad..a682861a06c 100644 --- a/src/licensedcode/data/rules/gpl-3.0_80.RULE +++ b/src/licensedcode/data/rules/gpl-3.0_80.RULE @@ -2,7 +2,7 @@ license_expression: gpl-3.0 is_license_text: yes ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0_and_lgpl-2.0_1.RULE b/src/licensedcode/data/rules/gpl-3.0_and_lgpl-2.0_1.RULE new file mode 100644 index 00000000000..67d8a12cd0c --- /dev/null +++ b/src/licensedcode/data/rules/gpl-3.0_and_lgpl-2.0_1.RULE @@ -0,0 +1,6 @@ +--- +license_expression: gpl-3.0 AND lgpl-2.0 +is_license_reference: yes +--- + +Copies of the GPL 3.0 and LGPL 2.0 licences are provided at the end of this file. \ No newline at end of file diff --git a/src/licensedcode/data/rules/gpl-3.0_with_autoconf-exception-3.0_1.RULE b/src/licensedcode/data/rules/gpl-3.0_with_autoconf-exception-3.0_1.RULE index 7d326919c61..a01ab17e0f2 100644 --- a/src/licensedcode/data/rules/gpl-3.0_with_autoconf-exception-3.0_1.RULE +++ b/src/licensedcode/data/rules/gpl-3.0_with_autoconf-exception-3.0_1.RULE @@ -4,7 +4,7 @@ is_license_notice: yes minimum_coverage: 10 notes: license text as published by SPDX ignorable_copyrights: - - Copyright (c) 2009 Free Software Foundation, Inc. + - Copyright (c) 2009 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0_with_clojure-exception-to-gpl-3.0_1.RULE b/src/licensedcode/data/rules/gpl-3.0_with_clojure-exception-to-gpl-3.0_1.RULE index 5c2764781df..88b5522b2f1 100644 --- a/src/licensedcode/data/rules/gpl-3.0_with_clojure-exception-to-gpl-3.0_1.RULE +++ b/src/licensedcode/data/rules/gpl-3.0_with_clojure-exception-to-gpl-3.0_1.RULE @@ -3,7 +3,7 @@ license_expression: gpl-3.0 WITH clojure-exception-to-gpl-3.0 is_license_text: yes minimum_coverage: 90 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0_with_font-exception-gpl_6.RULE b/src/licensedcode/data/rules/gpl-3.0_with_font-exception-gpl_6.RULE index 8ed8a4785fa..269229a06ac 100644 --- a/src/licensedcode/data/rules/gpl-3.0_with_font-exception-gpl_6.RULE +++ b/src/licensedcode/data/rules/gpl-3.0_with_font-exception-gpl_6.RULE @@ -3,7 +3,7 @@ license_expression: gpl-3.0 WITH font-exception-gpl is_license_text: yes minimum_coverage: 98 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl-3.0_with_font-exception-gpl_7.RULE b/src/licensedcode/data/rules/gpl-3.0_with_font-exception-gpl_7.RULE index c482d5c82ac..faff7653b19 100644 --- a/src/licensedcode/data/rules/gpl-3.0_with_font-exception-gpl_7.RULE +++ b/src/licensedcode/data/rules/gpl-3.0_with_font-exception-gpl_7.RULE @@ -3,7 +3,7 @@ license_expression: gpl-3.0 WITH font-exception-gpl is_license_text: yes minimum_coverage: 98 ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/gpl3_bare_word_only.RULE b/src/licensedcode/data/rules/gpl3_bare_word_only.RULE index 59fa53a84fa..82c5aa97e50 100644 --- a/src/licensedcode/data/rules/gpl3_bare_word_only.RULE +++ b/src/licensedcode/data/rules/gpl3_bare_word_only.RULE @@ -1,7 +1,7 @@ --- license_expression: gpl-3.0 is_license_reference: yes -relevance: 95 +relevance: 60 --- GPL3 \ No newline at end of file diff --git a/src/licensedcode/data/rules/ietf-trust_1.RULE b/src/licensedcode/data/rules/ietf-trust_1.RULE index a9a956839bb..3f5ea350d0d 100644 --- a/src/licensedcode/data/rules/ietf-trust_1.RULE +++ b/src/licensedcode/data/rules/ietf-trust_1.RULE @@ -8,7 +8,6 @@ ignorable_holders: - IETF Trust - IETF Trust and the persons identified as the document authors ignorable_authors: - - IETF Trust - the IETF Trust ignorable_urls: - http://opensource.org/licenses/bsd-license.php @@ -311,4 +310,4 @@ licensing administrator for the IRTF Document Stream and that these Legal Provis applied to documents submitted and published in the IRTF Document Stream following December 28, 2009. Section 4 of these Legal Provisions shall not apply to documents in the IRTF Document Stream, and all references to Section 4 hereof shall be disregarded with respect -to documents in the IRTF Document Stream. \ No newline at end of file +to documents in the IRTF Document Stream. diff --git a/src/licensedcode/data/rules/isc_113.RULE b/src/licensedcode/data/rules/isc_113.RULE new file mode 100644 index 00000000000..f0e0e3aa8d4 --- /dev/null +++ b/src/licensedcode/data/rules/isc_113.RULE @@ -0,0 +1,17 @@ +--- +license_expression: isc +is_license_text: yes +notes: uses a small variation with and/or +--- + +Permission to use, copy, modify, and/or 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" AND THE AUTHORS DISCLAIM ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/isc_34.RULE b/src/licensedcode/data/rules/isc_34.RULE index c6784db36bd..9c0dde51a05 100644 --- a/src/licensedcode/data/rules/isc_34.RULE +++ b/src/licensedcode/data/rules/isc_34.RULE @@ -4,10 +4,10 @@ is_license_text: yes --- The one -exception is licensed with a slightly different MIT variant: +exception is {{licensed with a slightly different MIT variant}}: The contents of this directory are licensed under the following terms: - +{{ Permission to use, copy, modify, and/or 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. @@ -18,4 +18,5 @@ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +}} diff --git a/src/licensedcode/data/rules/jdom_2.RULE b/src/licensedcode/data/rules/jdom_2.RULE index 08fae20ae7d..586e3b33b06 100644 --- a/src/licensedcode/data/rules/jdom_2.RULE +++ b/src/licensedcode/data/rules/jdom_2.RULE @@ -2,7 +2,7 @@ license_expression: jdom is_license_text: yes ignorable_authors: - - Jason Hunter + - Jason Hunter jhunter AT jdom DOT org and Brett McLaughlin brett AT jdom DOT org - the JDOM Project (http://www.jdom.org/) ignorable_urls: - http://www.jdom.org/ @@ -51,4 +51,4 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the JDOM Project and was originally created by Jason Hunter and Brett McLaughlin . For more -information on the JDOM Project, please see . \ No newline at end of file +information on the JDOM Project, please see . diff --git a/src/licensedcode/data/rules/jdom_3.RULE b/src/licensedcode/data/rules/jdom_3.RULE index 50a1dfe7cd6..6d8510b4432 100644 --- a/src/licensedcode/data/rules/jdom_3.RULE +++ b/src/licensedcode/data/rules/jdom_3.RULE @@ -7,7 +7,7 @@ ignorable_copyrights: ignorable_holders: - Jason Hunter & Brett McLaughlin ignorable_authors: - - Jason Hunter and Brett McLaughlin + - Jason Hunter jhunter AT jdom DOT org and Brett McLaughlin brett AT jdom DOT org - the JDOM Project (http://www.jdom.org/) ignorable_urls: - http://www.jdom.org/ @@ -64,4 +64,4 @@ JdomLicense 1.1.txt individuals on behalf of the JDOM Project and was originally created by Jason Hunter and Brett McLaughlin . For more information on - the JDOM Project, please see . \ No newline at end of file + the JDOM Project, please see . diff --git a/src/licensedcode/data/rules/jetty_4.RULE b/src/licensedcode/data/rules/jetty_4.RULE index 2bf4b23712b..33aca90f9ce 100644 --- a/src/licensedcode/data/rules/jetty_4.RULE +++ b/src/licensedcode/data/rules/jetty_4.RULE @@ -4,9 +4,7 @@ is_license_text: yes ignorable_copyrights: - Copyright (c) Mort Bay Consulting Pty. Ltd. (Australia) and others - copyright Sun Microsystems Inc. - - copyright holders. Definitions 95 Jetty ignorable_holders: - - Definitions Jetty - Mort Bay Consulting Pty. Ltd. (Australia) and others - Sun Microsystems Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/lgpl-2.0-plus_581.RULE b/src/licensedcode/data/rules/lgpl-2.0-plus_581.RULE new file mode 100644 index 00000000000..7f94feb3f24 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.0-plus_581.RULE @@ -0,0 +1,10 @@ +--- +license_expression: lgpl-2.0-plus +is_license_notice: yes +--- + +This program is free software; you can redistribute it and/or modify it under the terms of the {{GNU General Library Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version}}. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. + +You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.0-plus_582.RULE b/src/licensedcode/data/rules/lgpl-2.0-plus_582.RULE new file mode 100644 index 00000000000..4289db65bde --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.0-plus_582.RULE @@ -0,0 +1,7 @@ +--- +license_expression: lgpl-2.0-plus +is_license_notice: yes +--- + +This software is available on the {{LGPL (GNU LIBRARY GENERAL PUBLIC LICENSE)}}, ie. +it is allowed to link the library to commercial programs. \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.0-plus_583.RULE b/src/licensedcode/data/rules/lgpl-2.0-plus_583.RULE new file mode 100644 index 00000000000..316ebefe0b2 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.0-plus_583.RULE @@ -0,0 +1,7 @@ +--- +license_expression: lgpl-2.0-plus +is_license_notice: yes +relevance: 100 +--- + +terms and conditions of the lGPL \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.0-plus_584.RULE b/src/licensedcode/data/rules/lgpl-2.0-plus_584.RULE new file mode 100644 index 00000000000..4d09192a8fb --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.0-plus_584.RULE @@ -0,0 +1,10 @@ +--- +license_expression: lgpl-2.0-plus +is_license_notice: yes +referenced_filenames: + - README + - LICENSE +--- + +This program is distributed under the terms and conditions of the LGPL +See the README and LICENSE files for details \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.0-plus_585.RULE b/src/licensedcode/data/rules/lgpl-2.0-plus_585.RULE new file mode 100644 index 00000000000..f835c33004d --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.0-plus_585.RULE @@ -0,0 +1,9 @@ +--- +license_expression: lgpl-2.0-plus +is_license_notice: yes +referenced_filenames: + - LICENCE +--- + +This file is distributed under the terms and conditions of the LGPL - please +see the file LICENCE in the package root directory. \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.0-plus_586.RULE b/src/licensedcode/data/rules/lgpl-2.0-plus_586.RULE new file mode 100644 index 00000000000..cea764bb304 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.0-plus_586.RULE @@ -0,0 +1,9 @@ +--- +license_expression: lgpl-2.0-plus +is_license_notice: yes +referenced_filenames: + - LICENSE +--- + +This file is distributed under the terms and conditions of the LGPL - please +see the file LICENSE in the package root directory. \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.0-plus_587.RULE b/src/licensedcode/data/rules/lgpl-2.0-plus_587.RULE new file mode 100644 index 00000000000..20126fa0917 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.0-plus_587.RULE @@ -0,0 +1,7 @@ +--- +license_expression: lgpl-2.0-plus +is_license_notice: yes +relevance: 100 +--- + +This file is distributed under the terms and conditions of the LGPL \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1-plus_500.RULE b/src/licensedcode/data/rules/lgpl-2.1-plus_500.RULE new file mode 100644 index 00000000000..45e2dc8b261 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1-plus_500.RULE @@ -0,0 +1,19 @@ +--- +license_expression: lgpl-2.1-plus +is_license_notice: yes +--- + +This program 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 program; if not, write to the Free Software + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor + Boston, MA 02110-1335, USA. \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1-plus_501.RULE b/src/licensedcode/data/rules/lgpl-2.1-plus_501.RULE new file mode 100644 index 00000000000..f4431d5706f --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1-plus_501.RULE @@ -0,0 +1,12 @@ +--- +license_expression: lgpl-2.1-plus +is_license_notice: yes +relevance: 99 +referenced_filenames: + - License.txt +notes: no version with lesser implies 2.1 or later +ignorable_urls: + - http://www.gnu.org/copyleft/lesser.html +--- + +Permission to use, copy, modify, and distribute this software and its documentation under the terms of the {{GNU Lesser General Public License}} (LGPL) is hereby granted. No representations are made about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. See the http://www.gnu.org/copyleft/lesser.html" GNU Lesser General Public License or the License.txt file accompanying this library for more details. \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1-plus_502.RULE b/src/licensedcode/data/rules/lgpl-2.1-plus_502.RULE new file mode 100644 index 00000000000..8a3ca42ebae --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1-plus_502.RULE @@ -0,0 +1,19 @@ +--- +license_expression: lgpl-2.1-plus +is_license_notice: yes +ignorable_urls: + - http://www.gnu.org/licenses/ +--- + +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.}} + + 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 Lesser General Public License + along with ; if not, see . \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1-plus_503.RULE b/src/licensedcode/data/rules/lgpl-2.1-plus_503.RULE new file mode 100644 index 00000000000..a32623d22e2 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1-plus_503.RULE @@ -0,0 +1,19 @@ +--- +license_expression: lgpl-2.1-plus +is_license_notice: yes +ignorable_urls: + - http://www.gnu.org/licenses/ +--- + +This 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 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 Lesser General Public License + along with ; if not, see . \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1-plus_504.RULE b/src/licensedcode/data/rules/lgpl-2.1-plus_504.RULE new file mode 100644 index 00000000000..31d876f6abb --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1-plus_504.RULE @@ -0,0 +1,19 @@ +--- +license_expression: lgpl-2.1-plus +is_license_notice: yes +ignorable_urls: + - http://www.gnu.org/licenses/ +--- + +This file 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 file 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 Lesser General Public License +along with this file. If not, see . \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1-plus_505.RULE b/src/licensedcode/data/rules/lgpl-2.1-plus_505.RULE new file mode 100644 index 00000000000..42ef79e4150 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1-plus_505.RULE @@ -0,0 +1,19 @@ +--- +license_expression: lgpl-2.1-plus +is_license_notice: yes +ignorable_urls: + - https://www.gnu.org/licenses/ +--- + +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.}} + + 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 Lesser General Public License + along with ; if not, see . \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1-plus_506.RULE b/src/licensedcode/data/rules/lgpl-2.1-plus_506.RULE new file mode 100644 index 00000000000..42440be9769 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1-plus_506.RULE @@ -0,0 +1,19 @@ +--- +license_expression: lgpl-2.1-plus +is_license_notice: yes +ignorable_urls: + - https://www.gnu.org/licenses/ +--- + +This 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 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 Lesser General Public License + along with ; if not, see . \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1-plus_507.RULE b/src/licensedcode/data/rules/lgpl-2.1-plus_507.RULE new file mode 100644 index 00000000000..bb051b95161 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1-plus_507.RULE @@ -0,0 +1,19 @@ +--- +license_expression: lgpl-2.1-plus +is_license_notice: yes +ignorable_urls: + - https://www.gnu.org/licenses/ +--- + +This file 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 file 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 Lesser General Public License +along with this file. If not, see . \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1-plus_508.RULE b/src/licensedcode/data/rules/lgpl-2.1-plus_508.RULE new file mode 100644 index 00000000000..b13bf923915 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1-plus_508.RULE @@ -0,0 +1,10 @@ +--- +license_expression: lgpl-2.1-plus +is_license_notice: yes +--- + +This program is free software; you can redistribute it and/or modify it under the terms of the {{GNU General Lesser Public License as published by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1_111.RULE b/src/licensedcode/data/rules/lgpl-2.1_111.RULE index 0d7a7442f1a..b90e377fe4c 100644 --- a/src/licensedcode/data/rules/lgpl-2.1_111.RULE +++ b/src/licensedcode/data/rules/lgpl-2.1_111.RULE @@ -3,8 +3,8 @@ license_expression: lgpl-2.1 is_license_notice: yes relevance: 100 ignorable_authors: - - the U.S. + - the U.S. Government --- Portions of this product were created by the U.S. Government and not subject to -U.S. copyright protections under 17 U.S.C. \ No newline at end of file +U.S. copyright protections under 17 U.S.C. diff --git a/src/licensedcode/data/rules/lgpl-2.1_150.RULE b/src/licensedcode/data/rules/lgpl-2.1_150.RULE index 129ed170e74..2916dc89cc1 100644 --- a/src/licensedcode/data/rules/lgpl-2.1_150.RULE +++ b/src/licensedcode/data/rules/lgpl-2.1_150.RULE @@ -6,4 +6,4 @@ relevance: 100 # This program is free software. # You can distribute/modify this program under the terms of -# the GNU Lesser General Public License version 2.1. \ No newline at end of file +# the {{GNU Lesser General Public License version 2.1.}} diff --git a/src/licensedcode/data/rules/lgpl-2.1_465.RULE b/src/licensedcode/data/rules/lgpl-2.1_465.RULE new file mode 100644 index 00000000000..014017c4d61 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1_465.RULE @@ -0,0 +1,344 @@ +--- +license_expression: lgpl-2.1 +is_license_notice: yes +notes: damaged LGPL https://raw.githubusercontent.com/intel/ad-rss-lib/d8c736b68e7be7e826944a954f4571a0f2023608/LICENSE +ignorable_copyrights: + - copyrighted by the Free Software Foundation +ignorable_holders: + - the Free Software Foundation +--- + +GNU LIBRARY GENERAL PUBLIC LICENSE [Version 2.1] + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +**0.** This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called “this License”). +Each licensee is addressed as “you”. + +A “library” means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + +The “Library”, below, refers to any such software library or work +which has been distributed under these terms. A “work based on the +Library” means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term “modification”.) + +“Source code” for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + +**1.** You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + +You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + +**2.** You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + +*a)** The modified work must itself be a software library. +*b)** You must cause the files modified to carry prominent notices +stating that you changed the files and the date of any change. +*c)** You must cause the whole of the work to be licensed at no +charge to all third parties under the terms of this License. +*d)** If a facility in the modified Library refers to a function or a +table of data to be supplied by an application program that uses +the facility, other than as an argument passed when the facility +is invoked, then you must make a good faith effort to ensure that, +in the event an application does not supply such function or +table, the facility still operates, and performs whatever part of +its purpose remains meaningful. +(For example, a function in a library to compute square roots has +a purpose that is entirely well-defined independent of the +application. Therefore, Subsection 2d requires that any +application-supplied function or table used by this function must +be optional: if the application does not supply it, the square +root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + +**3.** You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + +Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + +**4.** You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + +**5.** A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a “work that uses the Library”. Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + +However, linking a “work that uses the Library” with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a “work that uses the +library”. The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + +When a “work that uses the Library” uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + +**6.** As an exception to the Sections above, you may also combine or +link a “work that uses the Library” with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + +*a)** Accompany the work with the complete corresponding +machine-readable source code for the Library including whatever +changes were used in the work (which must be distributed under +Sections 1 and 2 above); and, if the work is an executable linked +with the Library, with the complete machine-readable “work that +uses the Library”, as object code and/or source code, so that the +user can modify the Library and then relink to produce a modified +executable containing the modified Library. (It is understood +that the user who changes the contents of definitions files in the +Library will not necessarily be able to recompile the application +to use the modified definitions.) +*b)** Use a suitable shared library mechanism for linking with the +Library. A suitable mechanism is one that (1) uses at run time a +copy of the library already present on the user's computer system, +rather than copying library functions into the executable, and (2) +will operate properly with a modified version of the library, if +the user installs one, as long as the modified version is +interface-compatible with the version that the work was made with. +*c)** Accompany the work with a written offer, valid for at +least three years, to give the same user the materials +specified in Subsection 6a, above, for a charge no more +than the cost of performing this distribution. +*d)** If distribution of the work is made by offering access to copy +from a designated place, offer equivalent access to copy the above +specified materials from the same place. +*e)** Verify that the user has already received a copy of these +materials or that you have already sent this user a copy. + +For an executable, the required form of the “work that uses the +Library” must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + +It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + +**7.** You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + +*a)** Accompany the combined library with a copy of the same work +based on the Library, uncombined with any other library +facilities. This must be distributed under the terms of the +Sections above. +*b)** Give prominent notice with the combined library of the fact +that part of it is a work based on the Library, and explaining +where to find the accompanying uncombined form of the same work. + +**8.** You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + +**9.** You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + +**10.** Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + +**11.** If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + +**12.** If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + +**13.** The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +“any later version”, you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + +**14.** If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + +NO WARRANTY + +**15.** BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY “AS IS” WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +**16.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1_466.RULE b/src/licensedcode/data/rules/lgpl-2.1_466.RULE new file mode 100644 index 00000000000..53db47548a1 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1_466.RULE @@ -0,0 +1,7 @@ +--- +license_expression: lgpl-2.1 +is_license_reference: yes +relevance: 100 +--- + +The terms of the {{LGPL 2.1 }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1_467.RULE b/src/licensedcode/data/rules/lgpl-2.1_467.RULE new file mode 100644 index 00000000000..8fb50c295d6 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1_467.RULE @@ -0,0 +1,17 @@ +--- +license_expression: lgpl-2.1 +is_license_notice: yes +ignorable_urls: + - http://www.gnu.org/licenses/ +--- + +This program is free software; you can redistribute it and/or modify + it under the terms of the GNU {{Lesser General Public License version 2.1}}, as + published by the Free Software Foundation. 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 Lesser General Public License + along with this program; if not, see . \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1_or_epl-1.0_4.RULE b/src/licensedcode/data/rules/lgpl-2.1_or_epl-1.0_4.RULE new file mode 100644 index 00000000000..9b735c30c01 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1_or_epl-1.0_4.RULE @@ -0,0 +1,14 @@ +--- +license_expression: lgpl-2.1 OR epl-1.0 +is_license_notice: yes +--- + +source code and binaries are dual-licensed under the EPL v1.0 and the LGPL 2.1, or more formally: + +This program and the accompanying materials are dual-licensed under either the terms of the Eclipse +Public License v1.0 as published by the Eclipse Foundation + + or (per the licensee's choosing) + +under the terms of the GNU Lesser General Public License version 2.1 as published by the Free +Software Foundation. \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1_or_epl-1.0_5.RULE b/src/licensedcode/data/rules/lgpl-2.1_or_epl-1.0_5.RULE new file mode 100644 index 00000000000..d166771e25f --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1_or_epl-1.0_5.RULE @@ -0,0 +1,6 @@ +--- +license_expression: lgpl-2.1 OR epl-1.0 +is_license_notice: yes +--- + +source code and binaries are dual-licensed under the EPL v1.0 and the LGPL 2.1, or more formally: \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-2.1_or_epl-1.0_6.RULE b/src/licensedcode/data/rules/lgpl-2.1_or_epl-1.0_6.RULE new file mode 100644 index 00000000000..2ef0666b43b --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-2.1_or_epl-1.0_6.RULE @@ -0,0 +1,25 @@ +--- +license_expression: lgpl-2.1 OR epl-1.0 +is_license_notice: yes +minimum_coverage: 90 +--- + +The EPL/LGPL dual-license serves several purposes. The LGPL license ensures continuity in terms of +licensing of the logback project. Prior to version 0.9.18, logback was licensed (exclusively) under +the LGPL v2.1. Moreover, since the EPL is deemed incompatible by the Free Software Foundation, the +LGPL will allow various licensees, in particular software distributors who may be already bound by +the terms of the GPL or the LGPL, to distribute our software. + +On the other hand, the EPL license will placate organizations which refuse certain restrictions +imposed by the LGPL. + +Please note that logback-classic is intended to be used behind the SLF4J API, which is licensed +under the MIT license. + +If you wish to make a significant contribution to the logback project, you are invited to file a +Contributor License Agreement. The purpose of this agreement is to formalize the terms of your +contribution and to protect the project in case of litigation. + +Upon request, we may exempt open-source projects from LGPL and EPL's reciprocity clauses so that the +said projects can develop logback extensions under the license of their choice. Exemptions are +granted on a case by case basis. \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-3-plus-linking2.RULE b/src/licensedcode/data/rules/lgpl-3-plus-linking2.RULE index 1ef728452e9..87f313f50ed 100644 --- a/src/licensedcode/data/rules/lgpl-3-plus-linking2.RULE +++ b/src/licensedcode/data/rules/lgpl-3-plus-linking2.RULE @@ -2,7 +2,7 @@ license_expression: lgpl-3.0-plus WITH lgpl-3.0-linking-exception is_license_notice: yes ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/lgpl-3.0-plus_283.RULE b/src/licensedcode/data/rules/lgpl-3.0-plus_283.RULE index 160327723b3..75cc21c807a 100644 --- a/src/licensedcode/data/rules/lgpl-3.0-plus_283.RULE +++ b/src/licensedcode/data/rules/lgpl-3.0-plus_283.RULE @@ -6,9 +6,9 @@ ignorable_urls: --- This file 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 3 of the License, or -(at your option) any later version. +it under the terms of the {{GNU Lesser General Public License}} as published by +the Free Software Foundation, {{either version 3 of the License, or +(at your option) any later version}}. This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,4 +16,4 @@ 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 Lesser General Public License -along with this file. If not, see . \ No newline at end of file +along with this file. If not, see . diff --git a/src/licensedcode/data/rules/lgpl-3.0-plus_2941.RULE b/src/licensedcode/data/rules/lgpl-3.0-plus_2941.RULE new file mode 100644 index 00000000000..47f1b167138 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-3.0-plus_2941.RULE @@ -0,0 +1,19 @@ +--- +license_expression: lgpl-3.0-plus +is_license_notice: yes +ignorable_urls: + - http://www.gnu.org/licenses/ +--- + +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 3.0 of the License, + or (at your option) any later version.}} + + 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 Lesser General Public License + along with ; if not, see . \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-3.0-plus_295.RULE b/src/licensedcode/data/rules/lgpl-3.0-plus_295.RULE new file mode 100644 index 00000000000..9fcb3a69fbb --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-3.0-plus_295.RULE @@ -0,0 +1,19 @@ +--- +license_expression: lgpl-3.0-plus +is_license_notice: yes +ignorable_urls: + - http://www.gnu.org/licenses/ +--- + +This 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 3.0 of the License, + or (at your option) any later version.}} + + This 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 Lesser General Public License + along with ; if not, see . \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-3.0-plus_296.RULE b/src/licensedcode/data/rules/lgpl-3.0-plus_296.RULE new file mode 100644 index 00000000000..795ec00df74 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-3.0-plus_296.RULE @@ -0,0 +1,19 @@ +--- +license_expression: lgpl-3.0-plus +is_license_notice: yes +ignorable_urls: + - https://www.gnu.org/licenses/ +--- + +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 3.0 of the License, + or (at your option) any later version.}} + + 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 Lesser General Public License + along with ; if not, see . \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-3.0-plus_297.RULE b/src/licensedcode/data/rules/lgpl-3.0-plus_297.RULE new file mode 100644 index 00000000000..1a812f5852a --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-3.0-plus_297.RULE @@ -0,0 +1,19 @@ +--- +license_expression: lgpl-3.0-plus +is_license_notice: yes +ignorable_urls: + - https://www.gnu.org/licenses/ +--- + +This 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 3.0 of the License, + or (at your option) any later version.}} + + This 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 Lesser General Public License + along with ; if not, see . \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-3.0-plus_298.RULE b/src/licensedcode/data/rules/lgpl-3.0-plus_298.RULE new file mode 100644 index 00000000000..23a854cbb45 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-3.0-plus_298.RULE @@ -0,0 +1,21 @@ +--- +license_expression: lgpl-3.0-plus +is_license_notice: yes +ignorable_urls: + - http://www.gnu.org/licenses/lgpl.html +--- + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the (LGPL) GNU Lesser 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 Library Lesser General Public License for more details at +# ( http://www.gnu.org/licenses/lgpl.html ). +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-3.0-plus_3.RULE b/src/licensedcode/data/rules/lgpl-3.0-plus_3.RULE index 5c235bc5d31..6f8ba328f5a 100644 --- a/src/licensedcode/data/rules/lgpl-3.0-plus_3.RULE +++ b/src/licensedcode/data/rules/lgpl-3.0-plus_3.RULE @@ -3,7 +3,7 @@ license_expression: lgpl-3.0-plus is_license_notice: yes notes: LGPL text with some weird characters ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/lgpl-3.0-plus_or_apache-2.0_10.RULE b/src/licensedcode/data/rules/lgpl-3.0-plus_or_apache-2.0_10.RULE new file mode 100644 index 00000000000..1e36751d1a8 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-3.0-plus_or_apache-2.0_10.RULE @@ -0,0 +1,15 @@ +--- +license_expression: lgpl-3.0-plus OR apache-2.0 +is_license_tag: yes +ignorable_urls: + - http://www.apache.org/licenses/LICENSE-2.0.txt + - http://www.gnu.org/licenses/lgpl-3.0.html +--- + + + + GNU Lesser General Public License + http://www.gnu.org/licenses/lgpl-3.0.html + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-3.0-plus_or_apache-2.0_11.RULE b/src/licensedcode/data/rules/lgpl-3.0-plus_or_apache-2.0_11.RULE new file mode 100644 index 00000000000..04051fc6626 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-3.0-plus_or_apache-2.0_11.RULE @@ -0,0 +1,14 @@ +--- +license_expression: lgpl-3.0-plus OR apache-2.0 +is_license_tag: yes +ignorable_urls: + - http://www.apache.org/licenses/LICENSE-2.0.txt + - http://www.gnu.org/licenses/lgpl-3.0.html +--- + + + GNU Lesser General Public License + http://www.gnu.org/licenses/lgpl-3.0.html + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-3.0-plus_or_apache-2.0_9.RULE b/src/licensedcode/data/rules/lgpl-3.0-plus_or_apache-2.0_9.RULE new file mode 100644 index 00000000000..1bfe487b957 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-3.0-plus_or_apache-2.0_9.RULE @@ -0,0 +1,15 @@ +--- +license_expression: lgpl-3.0-plus OR apache-2.0 +is_license_notice: yes +referenced_filenames: + - LICENSE.LGPL + - LICENSE.GPL + - LICENSE.APACHE +--- + +is available either under the terms of the LGPL License or the Apache License. You as the user are entitled to choose the terms under which to adopt . + +For details about the LGPL License please refer to LICENSE.LGPL. Please note +that LGPL is just an extension to GPL, located in LICENSE.GPL. + +For details about the Apache License please refer to LICENSE.APACHE \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-3.0.SPDX.RULE b/src/licensedcode/data/rules/lgpl-3.0.SPDX.RULE index 423c75da281..8765b2198cf 100644 --- a/src/licensedcode/data/rules/lgpl-3.0.SPDX.RULE +++ b/src/licensedcode/data/rules/lgpl-3.0.SPDX.RULE @@ -4,7 +4,7 @@ is_license_text: yes minimum_coverage: 10 notes: license text as published by SPDX ignorable_copyrights: - - Copyright r 2007 Free Software Foundation, Inc. + - Copyright r 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - r Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/lgpl-3.0_23.RULE b/src/licensedcode/data/rules/lgpl-3.0_23.RULE index aeb00603bc6..909c617f50c 100644 --- a/src/licensedcode/data/rules/lgpl-3.0_23.RULE +++ b/src/licensedcode/data/rules/lgpl-3.0_23.RULE @@ -2,7 +2,7 @@ license_expression: lgpl-3.0 is_license_text: yes ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/lgpl-3.0_and_gpl-3.0_4.RULE b/src/licensedcode/data/rules/lgpl-3.0_and_gpl-3.0_4.RULE new file mode 100644 index 00000000000..b3049a55454 --- /dev/null +++ b/src/licensedcode/data/rules/lgpl-3.0_and_gpl-3.0_4.RULE @@ -0,0 +1,23 @@ +--- +license_expression: lgpl-3.0 AND gpl-3.0 +is_license_notice: yes +referenced_filenames: + - LICENSE.txt +notes: this is a confusing mix of LGPL and GPL See https://github.com/srazi/Saaghar/blob/a19421ce13769931cf2a53bd690861338905eca8/src/QIrBreadCrumbBar/QIronCommon/qirglobal.h#L23 +ignorable_urls: + - http://www.gnu.org/copyleft/gpl.html +--- + +you can redistribute +sources and libraries of this library and/or modify them under the terms of +the GNU Library General Public License version 3.0 as published by the +Free Software Foundation and appearing in the file LICENSE.txt included in +the packaging of this file. +Please review the following information to ensure the GNU General +Public License version 3.0 requirements will be met: +http://www.gnu.org/copyleft/gpl.html. + +This SDK is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. \ No newline at end of file diff --git a/src/licensedcode/data/rules/lgpl-3.0_prep.ai.mit.edu.RULE b/src/licensedcode/data/rules/lgpl-3.0_prep.ai.mit.edu.RULE index c86ec10276c..b742709c2cf 100644 --- a/src/licensedcode/data/rules/lgpl-3.0_prep.ai.mit.edu.RULE +++ b/src/licensedcode/data/rules/lgpl-3.0_prep.ai.mit.edu.RULE @@ -2,7 +2,7 @@ license_expression: lgpl-3.0 is_license_text: yes ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/lgpl-3.0_qt.RULE b/src/licensedcode/data/rules/lgpl-3.0_qt.RULE index fa145bd8c5d..5ece1ce44d9 100644 --- a/src/licensedcode/data/rules/lgpl-3.0_qt.RULE +++ b/src/licensedcode/data/rules/lgpl-3.0_qt.RULE @@ -2,7 +2,7 @@ license_expression: lgpl-3.0 is_license_text: yes ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org - Copyright (c) 2014 Digia Plc and/or its subsidiary(-ies). Contact http://www.qt-project.org/legal ignorable_holders: - Digia Plc and/or its subsidiary(-ies). Contact diff --git a/src/licensedcode/data/rules/lgpl_bare_single_word.RULE b/src/licensedcode/data/rules/lgpl_bare_single_word.RULE index 7c6859facdb..304e9ed77e6 100644 --- a/src/licensedcode/data/rules/lgpl_bare_single_word.RULE +++ b/src/licensedcode/data/rules/lgpl_bare_single_word.RULE @@ -1,7 +1,7 @@ --- license_expression: lgpl-2.0-plus is_license_reference: yes -relevance: 75 +relevance: 60 --- LGPL \ No newline at end of file diff --git a/src/licensedcode/data/rules/license-clue_gpl-2.0_1.RULE b/src/licensedcode/data/rules/license-clue_gpl-2.0_1.RULE new file mode 100644 index 00000000000..4bd2b96ff64 --- /dev/null +++ b/src/licensedcode/data/rules/license-clue_gpl-2.0_1.RULE @@ -0,0 +1,9 @@ +--- +license_expression: gpl-2.0 +is_license_clue: yes +relevance: 80 +minimum_coverage: 90 +notes: found in linux/net/core/filter.c +--- + +EXPORT_PER_CPU_SYMBOL_GPL \ No newline at end of file diff --git a/src/licensedcode/data/rules/license-clue_unknown-license-reference_4.RULE b/src/licensedcode/data/rules/license-clue_unknown-license-reference_4.RULE new file mode 100644 index 00000000000..bd796ca23dd --- /dev/null +++ b/src/licensedcode/data/rules/license-clue_unknown-license-reference_4.RULE @@ -0,0 +1,7 @@ +--- +license_expression: unknown-license-reference +is_license_clue: yes +relevance: 100 +--- + +(Unknown license) \ No newline at end of file diff --git a/src/licensedcode/data/rules/license-intro_82.RULE b/src/licensedcode/data/rules/license-intro_82.RULE new file mode 100644 index 00000000000..bbd3b2f6959 --- /dev/null +++ b/src/licensedcode/data/rules/license-intro_82.RULE @@ -0,0 +1,6 @@ +--- +license_expression: unknown-license-reference +is_license_intro: yes +--- + +* Some parts copyright and used with permission. \ No newline at end of file diff --git a/src/licensedcode/data/rules/license-intro_821.RULE b/src/licensedcode/data/rules/license-intro_821.RULE new file mode 100644 index 00000000000..acd4b9c11bc --- /dev/null +++ b/src/licensedcode/data/rules/license-intro_821.RULE @@ -0,0 +1,8 @@ +--- +license_expression: isc +is_license_intro: yes +relevance: 99 +--- + +Except as otherwise noted, this project is licensed under the following +(ISC-style) terms: \ No newline at end of file diff --git a/src/licensedcode/data/rules/license-intro_83.RULE b/src/licensedcode/data/rules/license-intro_83.RULE new file mode 100644 index 00000000000..3342dfd4ad3 --- /dev/null +++ b/src/licensedcode/data/rules/license-intro_83.RULE @@ -0,0 +1,7 @@ +--- +license_expression: unknown-license-reference +is_license_intro: yes +--- + +including portions of which come from the +Developer's Reference Manual and used with permission \ No newline at end of file diff --git a/src/licensedcode/data/rules/license-intro_831.RULE b/src/licensedcode/data/rules/license-intro_831.RULE new file mode 100644 index 00000000000..1e1ff52262e --- /dev/null +++ b/src/licensedcode/data/rules/license-intro_831.RULE @@ -0,0 +1,8 @@ +--- +license_expression: lgpl-2.1 +is_license_intro: yes +is_continuous: yes +notes: this is v2.1 as used in https://raw.githubusercontent.com/intel/ad-rss-lib/d8c736b68e7be7e826944a954f4571a0f2023608/LICENSE +--- + +{{This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation – terms below.}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/license-intro_84.RULE b/src/licensedcode/data/rules/license-intro_84.RULE new file mode 100644 index 00000000000..894212c700a --- /dev/null +++ b/src/licensedcode/data/rules/license-intro_84.RULE @@ -0,0 +1,6 @@ +--- +license_expression: unknown-license-reference +is_license_intro: yes +--- + +Permission to use code in the Developer's manual was granted \ No newline at end of file diff --git a/src/licensedcode/data/rules/license-intro_841.RULE b/src/licensedcode/data/rules/license-intro_841.RULE new file mode 100644 index 00000000000..fe42a92c378 --- /dev/null +++ b/src/licensedcode/data/rules/license-intro_841.RULE @@ -0,0 +1,7 @@ +--- +license_expression: gpl-3.0 +is_license_intro: yes +relevance: 100 +--- + +The terms of the {{GPL 3.0 licence}} are herewith provided: \ No newline at end of file diff --git a/src/licensedcode/data/rules/license-intro_85.RULE b/src/licensedcode/data/rules/license-intro_85.RULE new file mode 100644 index 00000000000..bdb2f8544b3 --- /dev/null +++ b/src/licensedcode/data/rules/license-intro_85.RULE @@ -0,0 +1,7 @@ +--- +license_expression: lgpl-2.1 +is_license_intro: yes +relevance: 100 +--- + +The terms of the {{LGPL 2.1 licence}} are herewith provided: \ No newline at end of file diff --git a/src/licensedcode/data/rules/license-intro_86.RULE b/src/licensedcode/data/rules/license-intro_86.RULE new file mode 100644 index 00000000000..a4125101ebf --- /dev/null +++ b/src/licensedcode/data/rules/license-intro_86.RULE @@ -0,0 +1,7 @@ +--- +license_expression: bsd-new +is_license_intro: yes +relevance: 100 +--- + +The {{Go LICENSE}} file is included below: \ No newline at end of file diff --git a/src/licensedcode/data/rules/license-intro_87.RULE b/src/licensedcode/data/rules/license-intro_87.RULE new file mode 100644 index 00000000000..d24a3b22b78 --- /dev/null +++ b/src/licensedcode/data/rules/license-intro_87.RULE @@ -0,0 +1,10 @@ +--- +license_expression: bsd-new +is_license_intro: yes +relevance: 100 +referenced_filenames: + - go.LICENSE +--- + +as such the {{Go license}} can be found in the go.LICENSE file and + is reproduced below: \ No newline at end of file diff --git a/src/licensedcode/data/rules/license-intro_88.RULE b/src/licensedcode/data/rules/license-intro_88.RULE new file mode 100644 index 00000000000..3907bfbc6c6 --- /dev/null +++ b/src/licensedcode/data/rules/license-intro_88.RULE @@ -0,0 +1,7 @@ +--- +license_expression: lgpl-2.0-plus +is_license_intro: yes +relevance: 100 +--- + +An example of the license headers of the LGPL is \ No newline at end of file diff --git a/src/licensedcode/data/rules/minpack_2.RULE b/src/licensedcode/data/rules/minpack_2.RULE index 04eb24fecfc..f9f77d6fd40 100644 --- a/src/licensedcode/data/rules/minpack_2.RULE +++ b/src/licensedcode/data/rules/minpack_2.RULE @@ -6,7 +6,7 @@ ignorable_copyrights: ignorable_holders: - University of Chicago ignorable_authors: - - the University of Chicago + - the University of Chicago, as Operator of Argonne National Laboratory --- * @@ -53,4 +53,4 @@ ignorable_authors: * (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, * EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE * POSSIBILITY OF SUCH LOSS OR DAMAGES. - *
    \ No newline at end of file + *
      diff --git a/src/licensedcode/data/rules/minpack_3.RULE b/src/licensedcode/data/rules/minpack_3.RULE index d9f27006e6f..bccb022b795 100644 --- a/src/licensedcode/data/rules/minpack_3.RULE +++ b/src/licensedcode/data/rules/minpack_3.RULE @@ -2,7 +2,7 @@ license_expression: minpack is_license_text: yes ignorable_authors: - - the University of Chicago + - the University of Chicago, as Operator of Argonne National Laboratory --- * Redistribution and use in source and binary forms, with or without @@ -43,4 +43,4 @@ ignorable_authors: * SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT * (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, * EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE - * POSSIBILITY OF SUCH LOSS OR DAMAGES. \ No newline at end of file + * POSSIBILITY OF SUCH LOSS OR DAMAGES. diff --git a/src/licensedcode/data/rules/mit-addition_2.RULE b/src/licensedcode/data/rules/mit-addition_2.RULE new file mode 100644 index 00000000000..56cb8738da4 --- /dev/null +++ b/src/licensedcode/data/rules/mit-addition_2.RULE @@ -0,0 +1,7 @@ +--- +license_expression: mit-addition +is_license_reference: yes +relevance: 100 +--- + +//See {{"LICENSE" for details (See jsbn.js for LICENSE).}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_1149.RULE b/src/licensedcode/data/rules/mit_1149.RULE index 68e10069a87..413dad2f1fd 100644 --- a/src/licensedcode/data/rules/mit_1149.RULE +++ b/src/licensedcode/data/rules/mit_1149.RULE @@ -1,8 +1,12 @@ --- license_expression: mit is_license_notice: yes +ignorable_copyrights: + - Copyright, Government of Canada +ignorable_holders: + - Government of Canada notes: https://bitbucket.org/cse-assemblyline/alsvc_unpacker/src/master/LICENCE.md --- Unless otherwise noted, computer program source code of Assemblyline (AL) -is covered under Crown Copyright, Government of Canada, and is {{distributed under the MIT License.}} \ No newline at end of file +is covered under Crown Copyright, Government of Canada, and is {{distributed under the MIT License.}} diff --git a/src/licensedcode/data/rules/mit_1341.RULE b/src/licensedcode/data/rules/mit_1341.RULE new file mode 100644 index 00000000000..e437c5d61a4 --- /dev/null +++ b/src/licensedcode/data/rules/mit_1341.RULE @@ -0,0 +1,9 @@ +--- +license_expression: mit +is_license_notice: yes +relevance: 100 +ignorable_urls: + - http://opensource.org/licenses/MIT +--- + +Released under the MIT license http://opensource.org/licenses/MIT \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_1342.RULE b/src/licensedcode/data/rules/mit_1342.RULE new file mode 100644 index 00000000000..a35f959ee8e --- /dev/null +++ b/src/licensedcode/data/rules/mit_1342.RULE @@ -0,0 +1,9 @@ +--- +license_expression: mit +is_license_notice: yes +relevance: 100 +ignorable_urls: + - https://opensource.org/licenses/MIT +--- + +Released under the MIT license https://opensource.org/licenses/MIT \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_1343.RULE b/src/licensedcode/data/rules/mit_1343.RULE new file mode 100644 index 00000000000..212d240c981 --- /dev/null +++ b/src/licensedcode/data/rules/mit_1343.RULE @@ -0,0 +1,8 @@ +--- +license_expression: mit +is_license_notice: yes +relevance: 100 +notes: https://github.com/microsoft/CodeXGLUE?tab=readme-ov-file#license +--- + +Our codes follow MIT License. \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_1344.RULE b/src/licensedcode/data/rules/mit_1344.RULE new file mode 100644 index 00000000000..23a6a7d126a --- /dev/null +++ b/src/licensedcode/data/rules/mit_1344.RULE @@ -0,0 +1,8 @@ +--- +license_expression: mit +is_license_notice: yes +relevance: 100 +--- + +* * Which is MIT licensed: + * The MIT License (MIT) \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_1345.RULE b/src/licensedcode/data/rules/mit_1345.RULE new file mode 100644 index 00000000000..d8a13da782a --- /dev/null +++ b/src/licensedcode/data/rules/mit_1345.RULE @@ -0,0 +1,9 @@ +--- +license_expression: mit +is_license_notice: yes +relevance: 100 +ignorable_urls: + - http://underscorejs.org/LICENSE +--- + +{{Based on Underscore.js}} {{ }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_1346.RULE b/src/licensedcode/data/rules/mit_1346.RULE new file mode 100644 index 00000000000..6093b693cbe --- /dev/null +++ b/src/licensedcode/data/rules/mit_1346.RULE @@ -0,0 +1,7 @@ +--- +license_expression: mit +is_license_notice: yes +relevance: 100 +--- + +Project is licensed under MIT \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_1347.RULE b/src/licensedcode/data/rules/mit_1347.RULE new file mode 100644 index 00000000000..2583a8d8f9e --- /dev/null +++ b/src/licensedcode/data/rules/mit_1347.RULE @@ -0,0 +1,9 @@ +--- +license_expression: mit +is_license_notice: yes +relevance: 100 +referenced_filenames: + - LICENSE.txt +--- + +The MIT license (given in full in LICENSE.txt) applies to all code in this repository \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_1348.RULE b/src/licensedcode/data/rules/mit_1348.RULE new file mode 100644 index 00000000000..24678edaa01 --- /dev/null +++ b/src/licensedcode/data/rules/mit_1348.RULE @@ -0,0 +1,9 @@ +--- +license_expression: mit +is_license_notice: yes +relevance: 100 +referenced_filenames: + - mit.LICENSE +--- + +released under the MIT license located in the root of the repo at /mit.LICENSE \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_1349.RULE b/src/licensedcode/data/rules/mit_1349.RULE new file mode 100644 index 00000000000..30498fba5a8 --- /dev/null +++ b/src/licensedcode/data/rules/mit_1349.RULE @@ -0,0 +1,9 @@ +--- +license_expression: mit +is_license_notice: yes +relevance: 100 +referenced_filenames: + - LICENSE +--- + +is licensed under the [MIT License](./LICENSE) \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_1350.RULE b/src/licensedcode/data/rules/mit_1350.RULE new file mode 100644 index 00000000000..270d704cbcd --- /dev/null +++ b/src/licensedcode/data/rules/mit_1350.RULE @@ -0,0 +1,11 @@ +--- +license_expression: mit +is_license_notice: yes +relevance: 100 +referenced_filenames: + - LICENSE.txt +ignorable_copyrights: + - Copyrighted (c) +--- + +Copyrighted (c) {{distributed under the MIT}} license (see LICENSE.txt) \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_or_apache-2.0_30.RULE b/src/licensedcode/data/rules/mit_or_apache-2.0_30.RULE new file mode 100644 index 00000000000..657656b2039 --- /dev/null +++ b/src/licensedcode/data/rules/mit_or_apache-2.0_30.RULE @@ -0,0 +1,7 @@ +--- +license_expression: mit OR apache-2.0 +is_license_notice: yes +relevance: 100 +--- + +primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0). \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_or_apache-2.0_31.RULE b/src/licensedcode/data/rules/mit_or_apache-2.0_31.RULE new file mode 100644 index 00000000000..a4bf75f492a --- /dev/null +++ b/src/licensedcode/data/rules/mit_or_apache-2.0_31.RULE @@ -0,0 +1,7 @@ +--- +license_expression: mit OR apache-2.0 +is_license_notice: yes +relevance: 100 +--- + +distributed under the terms of both the MIT license and the Apache License (Version 2.0). \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_or_apache-2.0_32.RULE b/src/licensedcode/data/rules/mit_or_apache-2.0_32.RULE new file mode 100644 index 00000000000..74be1223fd7 --- /dev/null +++ b/src/licensedcode/data/rules/mit_or_apache-2.0_32.RULE @@ -0,0 +1,7 @@ +--- +license_expression: mit OR apache-2.0 +is_license_notice: yes +relevance: 100 +--- + +under the terms of both the MIT license and the Apache License (Version 2.0). \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_or_apache-2.0_33.RULE b/src/licensedcode/data/rules/mit_or_apache-2.0_33.RULE new file mode 100644 index 00000000000..2520cdf06c7 --- /dev/null +++ b/src/licensedcode/data/rules/mit_or_apache-2.0_33.RULE @@ -0,0 +1,16 @@ +--- +license_expression: mit OR apache-2.0 +is_license_notice: yes +referenced_filenames: + - LICENSE-APACHE + - LICENSE-MIT + - COPYRIGHT +--- + +# License + + is distributed under the terms of{{ both the MIT license and the +Apache License (Version 2.0).}} + +See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT), and +[COPYRIGHT](COPYRIGHT) for details. \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_or_apache-2.0_34.RULE b/src/licensedcode/data/rules/mit_or_apache-2.0_34.RULE new file mode 100644 index 00000000000..6ab4a5ad914 --- /dev/null +++ b/src/licensedcode/data/rules/mit_or_apache-2.0_34.RULE @@ -0,0 +1,14 @@ +--- +license_expression: mit OR apache-2.0 +is_license_notice: yes +referenced_filenames: + - LICENSE-APACHE + - LICENSE-MIT +--- + +# License + + is distributed under the terms of{{ both the MIT license and the +Apache License (Version 2.0).}} + +See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_or_apache-2.0_35.RULE b/src/licensedcode/data/rules/mit_or_apache-2.0_35.RULE new file mode 100644 index 00000000000..1dfd8804c1c --- /dev/null +++ b/src/licensedcode/data/rules/mit_or_apache-2.0_35.RULE @@ -0,0 +1,14 @@ +--- +license_expression: mit OR apache-2.0 +is_license_notice: yes +referenced_filenames: + - LICENSE-APACHE + - LICENSE-MIT + - COPYRIGHT +--- + +is distributed under the terms of{{ both the MIT license and the +Apache License (Version 2.0).}} + +See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT), and +[COPYRIGHT](COPYRIGHT) for details. \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_or_apache-2.0_36.RULE b/src/licensedcode/data/rules/mit_or_apache-2.0_36.RULE new file mode 100644 index 00000000000..763a2854c79 --- /dev/null +++ b/src/licensedcode/data/rules/mit_or_apache-2.0_36.RULE @@ -0,0 +1,15 @@ +--- +license_expression: mit OR apache-2.0 +is_license_notice: yes +referenced_filenames: + - LICENSE-APACHE + - LICENSE-MIT +ignorable_urls: + - http://opensource.org/licenses/MIT + - http://www.apache.org/licenses/LICENSE-2.0 +--- + +Except as otherwise noted (below and/or in individual files), Rand is +licensed under the Apache License, Version 2.0 or + or the MIT license + or , at your option. \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_or_apache-2.0_37.RULE b/src/licensedcode/data/rules/mit_or_apache-2.0_37.RULE new file mode 100644 index 00000000000..974e2fbd3d7 --- /dev/null +++ b/src/licensedcode/data/rules/mit_or_apache-2.0_37.RULE @@ -0,0 +1,8 @@ +--- +license_expression: mit OR apache-2.0 +is_license_notice: yes +relevance: 99 +--- + +project {{includes code from the Rust project}} +published under these same licenses. \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_or_apache-2.0_38.RULE b/src/licensedcode/data/rules/mit_or_apache-2.0_38.RULE new file mode 100644 index 00000000000..bcc4c31dca2 --- /dev/null +++ b/src/licensedcode/data/rules/mit_or_apache-2.0_38.RULE @@ -0,0 +1,23 @@ +--- +license_expression: mit OR apache-2.0 +is_license_notice: yes +referenced_filenames: + - LICENSE-APACHE + - LICENSE-MIT +ignorable_urls: + - http://opensource.org/licenses/MIT + - http://www.apache.org/licenses/LICENSE-2.0 +--- + +Copyrights in the project are retained by their contributors. No +copyright assignment is required to contribute to the Rand project. + +For full authorship information, see the version control history. + +Except as otherwise noted (below and/or in individual files), Rand is +licensed under the {{Apache License, Version 2.0}} or + {{or the MIT license}} + or , at your option. + +The project includes code from the Rust project +published under these same licenses. \ No newline at end of file diff --git a/src/licensedcode/data/rules/mit_or_gpl-3.0_17.RULE b/src/licensedcode/data/rules/mit_or_gpl-3.0_17.RULE index 3cae3b67f1a..560aa33dc93 100644 --- a/src/licensedcode/data/rules/mit_or_gpl-3.0_17.RULE +++ b/src/licensedcode/data/rules/mit_or_gpl-3.0_17.RULE @@ -6,4 +6,4 @@ referenced_filenames: - COPYING --- -This source code is licensed under both the MIT license (found in the LICENSE file) and the GPLv3 (found in the COPYING file). \ No newline at end of file +This source code is licensed under {{both the MIT license}} (found in the LICENSE file) and the {{GPLv3}} (found in the COPYING file). diff --git a/src/licensedcode/data/rules/mit_or_unlicense_11.RULE b/src/licensedcode/data/rules/mit_or_unlicense_11.RULE new file mode 100644 index 00000000000..50729a9a662 --- /dev/null +++ b/src/licensedcode/data/rules/mit_or_unlicense_11.RULE @@ -0,0 +1,9 @@ +--- +license_expression: mit OR unlicense +is_license_notice: yes +relevance: 100 +ignorable_urls: + - https://unlicense.org/ +--- + +Dual-licensed under MIT or the [UNLICENSE](https://unlicense.org/). \ No newline at end of file diff --git a/src/licensedcode/data/rules/mpeg-iso_2.RULE b/src/licensedcode/data/rules/mpeg-iso_2.RULE index e8714da505d..740f6074b66 100644 --- a/src/licensedcode/data/rules/mpeg-iso_2.RULE +++ b/src/licensedcode/data/rules/mpeg-iso_2.RULE @@ -5,6 +5,10 @@ relevance: 95 minimum_coverage: 95 notes: Seen in https://sourceforge.net/p/opencore-amr/code/ci/master/tree/opencore/NOTICE The site for this code at https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1421 +ignorable_copyrights: + - (c), 3GPP Organizational Partners +ignorable_holders: + - 3GPP Organizational Partners ignorable_urls: - http://www.3gpp.org/ --- @@ -17,4 +21,4 @@ Portions of this file are derived from the following 3GPP standard: (C) , 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC) Permission to distribute, modify and use this file under the standard license -terms listed above has been obtained from the copyright holder. \ No newline at end of file +terms listed above has been obtained from the copyright holder. diff --git a/src/licensedcode/data/rules/ms-rl_16.RULE b/src/licensedcode/data/rules/ms-rl_16.RULE index 4c35d84f8f7..c4d271a6658 100644 --- a/src/licensedcode/data/rules/ms-rl_16.RULE +++ b/src/licensedcode/data/rules/ms-rl_16.RULE @@ -1,10 +1,6 @@ --- license_expression: ms-rl is_license_notice: yes -ignorable_copyrights: - - copyright law. OuterCurve Foundation -ignorable_holders: - - law. OuterCurve Foundation --- The WiX toolset (WiX) is licensed under the Microsoft Reciprocal License (MS-RL). diff --git a/src/licensedcode/data/rules/ms-rndis_1.RULE b/src/licensedcode/data/rules/ms-rndis_1.RULE new file mode 100644 index 00000000000..563c5eaff49 --- /dev/null +++ b/src/licensedcode/data/rules/ms-rndis_1.RULE @@ -0,0 +1,7 @@ +--- +license_expression: ms-rndis +is_license_notice: yes +--- + +* This software was originally developed in conformance with +* {{Microsoft's Remote NDIS Specification License Agreement}}. \ No newline at end of file diff --git a/src/licensedcode/data/rules/msntp_2.RULE b/src/licensedcode/data/rules/msntp_2.RULE index 4b7b3cd2bc4..3823837c62a 100644 --- a/src/licensedcode/data/rules/msntp_2.RULE +++ b/src/licensedcode/data/rules/msntp_2.RULE @@ -1,8 +1,6 @@ --- license_expression: msntp is_license_reference: yes -ignorable_authors: - - the University of retain --- Free use of the software in source and binary forms is permitted, provided that this @@ -16,4 +14,4 @@ without specific prior written permission. The Author and the University of retain the copyright and all other legal rights to the software and make it available non-exclusively. All users must ensure that the software in all its derivations carries a copyright notice -in the form: \ No newline at end of file +in the form: diff --git a/src/licensedcode/data/rules/msntp_3.RULE b/src/licensedcode/data/rules/msntp_3.RULE index 4bb1a93499d..d31e49789ec 100644 --- a/src/licensedcode/data/rules/msntp_3.RULE +++ b/src/licensedcode/data/rules/msntp_3.RULE @@ -5,8 +5,6 @@ ignorable_copyrights: - (c) Copyright University of Cambridge ignorable_holders: - University of Cambridge -ignorable_authors: - - the University of Cambridge --- Free use of the software in source and binary forms is permitted, provided that this @@ -21,4 +19,4 @@ The Author and the University of Cambridge retain the copyright and all other legal rights to the software and make it available non-exclusively. All users must ensure that the software in all its derivations carries a copyright notice in the form: - (c) Copyright University of Cambridge. \ No newline at end of file + (c) Copyright University of Cambridge. diff --git a/src/licensedcode/data/rules/openssl-ssleay_70.RULE b/src/licensedcode/data/rules/openssl-ssleay_70.RULE new file mode 100644 index 00000000000..52aedf1464b --- /dev/null +++ b/src/licensedcode/data/rules/openssl-ssleay_70.RULE @@ -0,0 +1,7 @@ +--- +license_expression: openssl-ssleay +is_license_notice: yes +relevance: 100 +--- + +released under the openSSL license as a part of the Golang Standard Libary \ No newline at end of file diff --git a/src/licensedcode/data/rules/other-copyleft_31.RULE b/src/licensedcode/data/rules/other-copyleft_31.RULE index ed0e0996db7..a917541d1df 100644 --- a/src/licensedcode/data/rules/other-copyleft_31.RULE +++ b/src/licensedcode/data/rules/other-copyleft_31.RULE @@ -4,8 +4,10 @@ is_license_text: yes notes: https://dartcanada.tripod.com/Objets/Old/index.html and https://web.archive.org/web/20000816230254/http://www.dsl.org/copyleft/dsl.txt ignorable_copyrights: - Copyright 1999-2000 Michael Stutz + - copyright the Author ignorable_holders: - Michael Stutz + - the Author ignorable_emails: - stutz@dsl.org --- @@ -189,4 +191,4 @@ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS WORK, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -END OF TERMS AND CONDITIONS \ No newline at end of file +END OF TERMS AND CONDITIONS diff --git a/src/licensedcode/data/rules/other-permissive_454.RULE b/src/licensedcode/data/rules/other-permissive_454.RULE new file mode 100644 index 00000000000..1e50b9f6c9b --- /dev/null +++ b/src/licensedcode/data/rules/other-permissive_454.RULE @@ -0,0 +1,8 @@ +--- +license_expression: other-permissive +is_license_text: yes +--- + +The original Pyrex code as of 2006-04 is licensed under the following +license: "Copyright stuff: Pyrex is free of restrictions. You may use, +redistribute, modify and distribute modified versions." \ No newline at end of file diff --git a/src/licensedcode/data/rules/other-permissive_455.RULE b/src/licensedcode/data/rules/other-permissive_455.RULE new file mode 100644 index 00000000000..74d492fe48d --- /dev/null +++ b/src/licensedcode/data/rules/other-permissive_455.RULE @@ -0,0 +1,9 @@ +--- +license_expression: other-permissive +is_license_text: yes +relevance: 100 +--- + +Copyright stuff: Pyrex is free of restrictions. You +may use, redistribute, modify and distribute modified +versions. \ No newline at end of file diff --git a/src/licensedcode/data/rules/other-permissive_456.RULE b/src/licensedcode/data/rules/other-permissive_456.RULE new file mode 100644 index 00000000000..8d93cfe58a6 --- /dev/null +++ b/src/licensedcode/data/rules/other-permissive_456.RULE @@ -0,0 +1,7 @@ +--- +license_expression: other-permissive +is_license_text: yes +notes: https://vicfieger.com/~font/faq.html +--- + +For free fonts: No license is required, no payment is required. These fonts may be used by anyone for any design or artistic purpose, whether it be personal, commercial, or charitable. \ No newline at end of file diff --git a/src/licensedcode/data/rules/other-permissive_457.RULE b/src/licensedcode/data/rules/other-permissive_457.RULE new file mode 100644 index 00000000000..e5c42572fd0 --- /dev/null +++ b/src/licensedcode/data/rules/other-permissive_457.RULE @@ -0,0 +1,7 @@ +--- +license_expression: other-permissive +is_license_text: yes +notes: https://vicfieger.com/~font/faq.html +--- + +No license is required, no payment is required. These fonts may be used by anyone for any design or artistic purpose, whether it be personal, commercial, or charitable. \ No newline at end of file diff --git a/src/licensedcode/data/rules/other-permissive_tesla_1.RULE b/src/licensedcode/data/rules/other-permissive_tesla_1.RULE index 19a7bcc2701..7952e315a0a 100644 --- a/src/licensedcode/data/rules/other-permissive_tesla_1.RULE +++ b/src/licensedcode/data/rules/other-permissive_tesla_1.RULE @@ -1,10 +1,6 @@ --- license_expression: other-permissive is_license_text: yes -ignorable_copyrights: - - copyright holders, authors, and contributors -ignorable_holders: - - authors, and contributors --- # Tesla Copyfree Open Innovation License (Working Title) @@ -39,4 +35,4 @@ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. 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 -WORK, OR THE USE OF OR OTHER DEALINGS IN THE WORK. \ No newline at end of file +WORK, OR THE USE OF OR OTHER DEALINGS IN THE WORK. diff --git a/src/licensedcode/data/rules/other-permissive_tesla_2.RULE b/src/licensedcode/data/rules/other-permissive_tesla_2.RULE index 59c166c730f..dbcbccca191 100644 --- a/src/licensedcode/data/rules/other-permissive_tesla_2.RULE +++ b/src/licensedcode/data/rules/other-permissive_tesla_2.RULE @@ -1,10 +1,6 @@ --- license_expression: other-permissive is_license_text: yes -ignorable_copyrights: - - copyright holders, authors, and contributors -ignorable_holders: - - authors, and contributors --- # Copyfree Open Innovation License @@ -39,4 +35,4 @@ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. 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 -WORK, OR THE USE OF OR OTHER DEALINGS IN THE WORK. \ No newline at end of file +WORK, OR THE USE OF OR OTHER DEALINGS IN THE WORK. diff --git a/src/licensedcode/data/rules/pcre_13.RULE b/src/licensedcode/data/rules/pcre_13.RULE index c208244de0d..1d95abd845f 100644 --- a/src/licensedcode/data/rules/pcre_13.RULE +++ b/src/licensedcode/data/rules/pcre_13.RULE @@ -9,6 +9,7 @@ ignorable_holders: - the University of Cambridge, England ignorable_authors: - Philip Hazel + - Philip Hazel University of Cambridge Computing Service, Cambridge, England ignorable_urls: - ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ ignorable_emails: diff --git a/src/licensedcode/data/rules/proprietary-license_1019.RULE b/src/licensedcode/data/rules/proprietary-license_1019.RULE new file mode 100644 index 00000000000..458c47612a7 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1019.RULE @@ -0,0 +1,8 @@ +--- +license_expression: proprietary-license +is_license_reference: yes +relevance: 100 +minimum_coverage: 80 +--- + +For exclusive use by and its affiliates only. \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1020.RULE b/src/licensedcode/data/rules/proprietary-license_1020.RULE new file mode 100644 index 00000000000..1bc46db61b0 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1020.RULE @@ -0,0 +1,10 @@ +--- +license_expression: proprietary-license +is_license_text: yes +notes: https://github.com/palmerc/lab/blob/d9c36b84dac060ce8c74251f6c42b121653dd837/classes/masters/csce5650/nakajima/newsim/int_src/go/g29.c#L2 +--- + +Permission granted to Spec to use and direferenced_filenames: +stribute as a computer benchamrk +permission is not granted to use or modify this code for any +purpose other than benchmarking or computer system performance tuning \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1021.RULE b/src/licensedcode/data/rules/proprietary-license_1021.RULE new file mode 100644 index 00000000000..453732a38b0 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1021.RULE @@ -0,0 +1,7 @@ +--- +license_expression: proprietary-license +is_license_notice: yes +notes: https://vicfieger.com/~font/faq.html +--- + +This font may be used for personal uses only. It cannot be used commercially as it contains images of copyrighted characters. \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1022.RULE b/src/licensedcode/data/rules/proprietary-license_1022.RULE new file mode 100644 index 00000000000..a166f2e0f94 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1022.RULE @@ -0,0 +1,7 @@ +--- +license_expression: proprietary-license +is_license_reference: yes +relevance: 100 +--- + +valid {{Sensu Go license}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1023.RULE b/src/licensedcode/data/rules/proprietary-license_1023.RULE new file mode 100644 index 00000000000..4dd37ace7c4 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1023.RULE @@ -0,0 +1,51 @@ +--- +license_expression: proprietary-license +is_license_text: yes +notes: https://chillicream.com/licensing/chillicream-license See also https://github.com/ChilliCream/graphql-platform/issues/6704 +--- + +ChilliCream License 1.0 + +This is the license we use for our proprietary software like Banana Cake Pop. +Acceptance + +By using the software, you agree to all of the terms and conditions below. +Copyright License + +The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below. +Limitations + +You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key. + +You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law. +Patents + +The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company. +Notices + +You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms. + +If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software. +No Other Rights + +These terms do not imply any licenses other than those expressly granted in these terms. +Termination + +If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently. +No Liability + +As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim. +Definitions + +The licensor is the entity offering these terms, and the software is the software the licensor makes available under these terms, including any portion of it. + +you refers to the individual or entity agreeing to these terms. + +your company is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. control means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect. + +your licenses are all the licenses granted to you for the software under these terms. + +use means anything you do with the software requiring one of your licenses. + +trademark means trademarks, service marks, and similar rights. +Last updated on 2024-03-05 by PascalSenn \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1024.RULE b/src/licensedcode/data/rules/proprietary-license_1024.RULE new file mode 100644 index 00000000000..ab1a1fd127e --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1024.RULE @@ -0,0 +1,54 @@ +--- +license_expression: proprietary-license +is_license_text: yes +ignorable_urls: + - http://www.azulsystems.com/license/zulu_third_party_licenses.html +--- + +The copyrights in this software and any visual or audio work distributed with +the software belong to Azul Systems, Inc. and those included in all other notice +files either listed in the readme file or contained in any other included notice +files with this distribution. All rights are reserved. Installation of this +software and any Azul software bundled with or derived from this software is +licensed only in accordance with these terms. + +Provided you have not received the software directly from Azul and have already +agreed to the terms of a separate license agreement, by installing, using or +distributing this software you, on your own behalf and on behalf of your +employer or principal, agree to be bound by these terms. If you do not agree to +any of these terms, you may not use, copy, transmit, distribute nor install this +software. + +The software is developed and owned by Azul and/or any of its affiliates, +subsidiaries or respective suppliers and licensors. The software also includes +certain software components and materials ("Open Source Materials") of third +parties ("Third Party Licensors") licensed under certain licenses ("Open Source +Licenses"). + +Nothing in this Agreement limits your rights under, or grants you rights that +supersede the terms and conditions of any applicable Open Source Licenses. +You must review the Open Source Licenses located at +http://www.azulsystems.com/license/zulu_third_party_licenses.html +to understand your rights under them. In the event that no such third party +license agreements exist, the restrictions contained in this Agreement shall +apply. + +With respect to the Open Source Licenses the following shall apply: + + 1) You hereby acknowledge and agree that you will be licensing any Open Source + Materials directly from the applicable Third Party Licensors including the + right to use such Third Party Materials in connection with the software + + 2) In the event of any inconsistencies or conflicting provisions of the Open + Source Licenses and the provisions of this Agreement, the provisions of the + Open Source Licenses shall prevail. + +THIS SOFTWARE IS PROVIDED BY AZUL "AS-IS" AND WITHOUT EXPRESS OR IMPLIED +WARRANTIES, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL AZUL +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR +CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICE, LOSS OF USE, DATA OR PROFITS; OR BUSINESS INTERRUPTION, +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT, STRICT +LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1026.RULE b/src/licensedcode/data/rules/proprietary-license_1026.RULE new file mode 100644 index 00000000000..e03a101f1dc --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1026.RULE @@ -0,0 +1,9 @@ +--- +license_expression: proprietary-license +is_license_tag: yes +is_continuous: yes +relevance: 100 +minimum_coverage: 100 +--- + +{{license NVIDIA Proprietary}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1029.RULE b/src/licensedcode/data/rules/proprietary-license_1029.RULE new file mode 100644 index 00000000000..53edde1cca8 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1029.RULE @@ -0,0 +1,9 @@ +--- +license_expression: proprietary-license +is_license_reference: yes +is_continuous: yes +relevance: 100 +minimum_coverage: 100 +--- + +{{NVIDIA Proprietary}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1030.RULE b/src/licensedcode/data/rules/proprietary-license_1030.RULE new file mode 100644 index 00000000000..8a7970e2488 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1030.RULE @@ -0,0 +1,44 @@ +--- +license_expression: proprietary-license +is_license_text: yes +notes: https://github.com/CERTCC/SSVC/blob/main/LICENSE +ignorable_emails: + - permission@sei.cmu.edu +--- + +The following statement applies to PDF, markdown, and text documents contained in this repository. +This material is based upon work funded and supported by the Department of Defense +under Contract No. FA8702-15-D-0002 with Carnegie Mellon University for the operation +of the Software Engineering Institute, a federally funded research and development center. + +The view, opinions, and/or findings contained in this material are those of the author(s) +and should not be construed as an official Government position, policy, or decision, unless +designated by other documentation. + +References herein to any specific commercial product, process, or service by trade name, +trade mark, manufacturer, or otherwise, does not necessarily constitute or imply its +endorsement, recommendation, or favoring by Carnegie Mellon University or its +Software Engineering Institute. + +NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING INSTITUTE MATERIAL +IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, +EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF +FITNESS FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE +MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT MAKE ANY WARRANTY OF ANY KIND WITH RESPECT +TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT. + +[DISTRIBUTION STATEMENT A] This material has been approved for public release and unlimited distribution. +Please see Copyright notice for non-US Government use and distribution. + +Internal use: +* Permission to reproduce this material and to prepare derivative works from this material for internal +use is granted, provided the copyright and “No Warranty” statements are included with all reproductions +and derivative works. + +External use: +* This material may be reproduced in its entirety, without modification, and freely distributed in +written or electronic form without requesting formal permission. Permission is required for any +other external and/or commercial use. Requests for permission should be directed to the +Software Engineering Institute at permission@sei.cmu.edu. + +* These restrictions do not apply to U.S. government entities. \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1031.RULE b/src/licensedcode/data/rules/proprietary-license_1031.RULE new file mode 100644 index 00000000000..71446e4cc2f --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1031.RULE @@ -0,0 +1,43 @@ +--- +license_expression: proprietary-license +is_license_text: yes +notes: https://github.com/CERTCC/SSVC/blob/main/LICENSE +ignorable_emails: + - permission@sei.cmu.edu +--- + +This material is based upon work funded and supported by the Department of Defense +under Contract No. FA8702-15-D-0002 with Carnegie Mellon University for the operation +of the Software Engineering Institute, a federally funded research and development center. + +The view, opinions, and/or findings contained in this material are those of the author(s) +and should not be construed as an official Government position, policy, or decision, unless +designated by other documentation. + +References herein to any specific commercial product, process, or service by trade name, +trade mark, manufacturer, or otherwise, does not necessarily constitute or imply its +endorsement, recommendation, or favoring by Carnegie Mellon University or its +Software Engineering Institute. + +NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING INSTITUTE MATERIAL +IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, +EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF +FITNESS FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE +MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT MAKE ANY WARRANTY OF ANY KIND WITH RESPECT +TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT. + +[DISTRIBUTION STATEMENT A] This material has been approved for public release and unlimited distribution. +Please see Copyright notice for non-US Government use and distribution. + +Internal use: +* Permission to reproduce this material and to prepare derivative works from this material for internal +use is granted, provided the copyright and “No Warranty” statements are included with all reproductions +and derivative works. + +External use: +* This material may be reproduced in its entirety, without modification, and freely distributed in +written or electronic form without requesting formal permission. Permission is required for any +other external and/or commercial use. Requests for permission should be directed to the +Software Engineering Institute at permission@sei.cmu.edu. + +* These restrictions do not apply to U.S. government entities. \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1032.RULE b/src/licensedcode/data/rules/proprietary-license_1032.RULE new file mode 100644 index 00000000000..b952711d43c --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1032.RULE @@ -0,0 +1,15 @@ +--- +license_expression: proprietary-license +is_license_notice: yes +--- + +Appendix: +In case of a conflict, the terms of this appendix supersede the general apache license. + +- Unless provided with a written agreement, the paid features of (as a service) cannot be modified. +- Unless provided with a written agreement, no persons are permitted to redistribute another paid version of . +- Furthermore, any modifications of free features of should be distributed as free & opensource software. + +If you have any questions, please feel free to reach out to us. + +For terms and conditions of the software and the service, please see TERMS_AND_CONDITIONS.md \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1033.RULE b/src/licensedcode/data/rules/proprietary-license_1033.RULE new file mode 100644 index 00000000000..14e89ef4a6a --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1033.RULE @@ -0,0 +1,7 @@ +--- +license_expression: proprietary-license +is_license_notice: yes +relevance: 100 +--- + +confidential and proprietary software. \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1040.RULE b/src/licensedcode/data/rules/proprietary-license_1040.RULE new file mode 100644 index 00000000000..0488b3b102f --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1040.RULE @@ -0,0 +1,7 @@ +--- +license_expression: proprietary-license +is_license_notice: yes +relevance: 100 +--- + +Use, reproduction, or distribution without prior authorization is prohibited. \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1041.RULE b/src/licensedcode/data/rules/proprietary-license_1041.RULE new file mode 100644 index 00000000000..c3df1a55c64 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1041.RULE @@ -0,0 +1,7 @@ +--- +license_expression: proprietary-license +is_license_reference: yes +relevance: 100 +--- + +NVIDIA {{end user license agreement}} (EULA) \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1043.RULE b/src/licensedcode/data/rules/proprietary-license_1043.RULE new file mode 100644 index 00000000000..824d4fb0a69 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1043.RULE @@ -0,0 +1,7 @@ +--- +license_expression: proprietary-license +is_license_reference: yes +relevance: 100 +--- + +NVIDIA {{end user license agreement}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1047.RULE b/src/licensedcode/data/rules/proprietary-license_1047.RULE new file mode 100644 index 00000000000..5fb3778ce3a --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1047.RULE @@ -0,0 +1,8 @@ +--- +license_expression: proprietary-license +is_license_reference: yes +is_continuous: yes +relevance: 100 +--- + +{{NVIDIA EULA}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1048.RULE b/src/licensedcode/data/rules/proprietary-license_1048.RULE new file mode 100644 index 00000000000..f7abc7e14ff --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1048.RULE @@ -0,0 +1,7 @@ +--- +license_expression: proprietary-license +is_license_notice: yes +relevance: 100 +--- + +Use of the sound recording {{requires permission}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1049.RULE b/src/licensedcode/data/rules/proprietary-license_1049.RULE new file mode 100644 index 00000000000..227ca9a1dc3 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1049.RULE @@ -0,0 +1,7 @@ +--- +license_expression: proprietary-license +is_license_notice: yes +relevance: 100 +--- + +Use of {{requires permission}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1050.RULE b/src/licensedcode/data/rules/proprietary-license_1050.RULE new file mode 100644 index 00000000000..ce9c7504bd1 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1050.RULE @@ -0,0 +1,7 @@ +--- +license_expression: proprietary-license +is_license_notice: yes +relevance: 100 +--- + +Use {{requires permission}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1051.RULE b/src/licensedcode/data/rules/proprietary-license_1051.RULE new file mode 100644 index 00000000000..0413484ffbe --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1051.RULE @@ -0,0 +1,7 @@ +--- +license_expression: proprietary-license +is_license_notice: yes +relevance: 100 +--- + +Commercial use or distribution is not permitted without prior permission of the copyright holder. \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1052.RULE b/src/licensedcode/data/rules/proprietary-license_1052.RULE new file mode 100644 index 00000000000..f7b79a08ce4 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1052.RULE @@ -0,0 +1,13 @@ +--- +license_expression: proprietary-license +is_license_text: yes +--- + +Please note. +By continuing to read this document, and by storing a copy of the associated software and/or documentation in any form, you acknowledge and agree to the following terms. +1. "associated software", "software", "this software", or "the software" in this agreement, means the files that accompany this license agreement, in whole or in part, in source-code or binary form, whether they be documentation, application code, or any other digital representation of content. This includes files that are created after the initial download of the software, even if such files are not created explicitly by the user of the software. +2. You agree to hold , and any associated names, persons, partys, and/or corperat entities harmless, arising out of or in connection with any claim arising from or relating to use of the software, documents, external librarys, and/or other components used in the creation, distribution, or use of the software. +3. You acknowledge that this software is to be considered extremely pre-release, and therefore, it may contain bugs, defects, and other unforseen problems. This software is not to be run on any production equipment. These problems may damage your systems, networks, and surrounding equipment. Though the creators of the software have done their best to insure that this will not happen, we make no (zero) garuntee that this software will not damage your equipment. +4. This license covers this exact pre-release version of this software, and is not applicable to any other version of this software; a separate license file will accompany each release of the software, and will take affect as soon as the user accesses the license agreement, or any portion of the associated software or documentation. +5. This license does not attempt to make any garuntees or restrictions on the librarys or resources used by this software. All such licenses included with such included librarys or software should remain in affect. This license attempts to insure the well-being of the software's users and developers. +6. You can cancel this agreement at any time by destroying this agreement, all associated files, librarys, and software, and deleting any copys you have access to, that are under your legal control. Using any backup copy, or any other copy of the software, rebinds you to the agreement provided with that version of the software, and affirms your responsibility to following all terms and conditions set forth therein. \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1053.RULE b/src/licensedcode/data/rules/proprietary-license_1053.RULE new file mode 100644 index 00000000000..11cc2fb81c1 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1053.RULE @@ -0,0 +1,13 @@ +--- +license_expression: proprietary-license +is_license_notice: yes +--- + +Linguistic +Data Consortium (LDC) grants permission to copy and use this +software for the purpose of reading "shorten"-compressed speech +data provided by the LDC or others using the NIST SPHERE file +format. + +No portion of this code may be copied or adapted for other uses +without permission \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1054.RULE b/src/licensedcode/data/rules/proprietary-license_1054.RULE new file mode 100644 index 00000000000..9e1b0255d32 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1054.RULE @@ -0,0 +1,25 @@ +--- +license_expression: proprietary-license +is_license_notice: yes +minimum_coverage: 80 +--- + +EVALUATION LICENSE + +This license grants you the right to evaluate technology for free. +This license does not grant you any warranty while using . + +You need a commercial license for commercial usage of or usage of +internally within an organization. Commercial license +grants the rights to use, copy, modify, merge, distribute, sublicense, and +sell copies of the . + +For more details, please contact us via: + +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. +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. \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_1055.RULE b/src/licensedcode/data/rules/proprietary-license_1055.RULE new file mode 100644 index 00000000000..1d56d96a393 --- /dev/null +++ b/src/licensedcode/data/rules/proprietary-license_1055.RULE @@ -0,0 +1,13 @@ +--- +license_expression: proprietary-license +is_license_notice: yes +notes: it is not clear if this is commercially licensed or open source or proprietary +ignorable_authors: + - Red Hat +--- + +The Universal Base Image is designed and engineered to be the base +layer for all of your containerized applications, middleware and utilities. This base +image is freely redistributable, but Red Hat only supports Red Hat technologies through +subscriptions for Red Hat products. This image is maintained by Red Hat and updated +regularly. \ No newline at end of file diff --git a/src/licensedcode/data/rules/proprietary-license_272.RULE b/src/licensedcode/data/rules/proprietary-license_272.RULE index cb3bde24654..9a038527ffe 100644 --- a/src/licensedcode/data/rules/proprietary-license_272.RULE +++ b/src/licensedcode/data/rules/proprietary-license_272.RULE @@ -1,6 +1,6 @@ --- license_expression: proprietary-license -is_license_notice: yes +is_license_clue: yes relevance: 100 --- diff --git a/src/licensedcode/data/rules/proprietary-license_280.RULE b/src/licensedcode/data/rules/proprietary-license_280.RULE index 0cf149d6011..96e36adc65c 100644 --- a/src/licensedcode/data/rules/proprietary-license_280.RULE +++ b/src/licensedcode/data/rules/proprietary-license_280.RULE @@ -4,7 +4,7 @@ is_license_text: yes relevance: 100 minimum_coverage: 70 ignorable_authors: - - the University of Southern California + - the University of Southern California, Information Sciences Institute --- * Permission to use, copy, modify, and distribute this software and its @@ -23,4 +23,4 @@ ignorable_authors: * the suitability of this software for any purpose. THIS SOFTWARE IS * PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. \ No newline at end of file +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/src/licensedcode/data/rules/proprietary-license_336.RULE b/src/licensedcode/data/rules/proprietary-license_336.RULE index 5682d444749..df19ce45412 100644 --- a/src/licensedcode/data/rules/proprietary-license_336.RULE +++ b/src/licensedcode/data/rules/proprietary-license_336.RULE @@ -2,8 +2,12 @@ license_expression: proprietary-license is_license_notice: yes relevance: 100 +ignorable_copyrights: + - Copyright, Government of Canada +ignorable_holders: + - Government of Canada notes: This would may be deserve it's own license. Not clear if this is a license or just a - statement of copyright style as it is most often coming with anothe FOSS license + statement of copyright style as it is most often coming with another FOSS license --- -covered under Crown Copyright, Government of Canada. \ No newline at end of file +covered under Crown Copyright, Government of Canada. diff --git a/src/licensedcode/data/rules/proprietary-license_526.RULE b/src/licensedcode/data/rules/proprietary-license_526.RULE index 6f1fcc91f7d..1e8babda9fa 100644 --- a/src/licensedcode/data/rules/proprietary-license_526.RULE +++ b/src/licensedcode/data/rules/proprietary-license_526.RULE @@ -4,7 +4,7 @@ is_license_text: yes relevance: 100 minimum_coverage: 80 ignorable_copyrights: - - Copyright (c) , Inc. + - Copyright (c), Inc. ignorable_holders: - Inc. --- @@ -167,4 +167,4 @@ jurisdiction of the English courts. Upon termination of this Agreement, the licenses granted hereunder will terminate and Sections 5, 6, 7, 8, 9, 10 and 11 shall survive any termination -of this Agreement. \ No newline at end of file +of this Agreement. diff --git a/src/licensedcode/data/rules/proprietary-license_890.RULE b/src/licensedcode/data/rules/proprietary-license_890.RULE index 9dfdd5a3e09..6ba485bde68 100644 --- a/src/licensedcode/data/rules/proprietary-license_890.RULE +++ b/src/licensedcode/data/rules/proprietary-license_890.RULE @@ -9,7 +9,7 @@ notes: https://github.com/mog-rn/my-portfolio/blob/1476cc90573e346f974293fe1321e BSD 3-Clause License Redistribution and use in source and binary forms, with or without -modification, are not permitted provided that the following condition are met: +modification, are {{not permitted}} provided that the following condition are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. diff --git a/src/licensedcode/data/rules/proprietary-license_94.RULE b/src/licensedcode/data/rules/proprietary-license_94.RULE index 5d6f22f6258..6e79597e492 100644 --- a/src/licensedcode/data/rules/proprietary-license_94.RULE +++ b/src/licensedcode/data/rules/proprietary-license_94.RULE @@ -2,10 +2,6 @@ license_expression: proprietary-license is_license_text: yes relevance: 100 -ignorable_copyrights: - - copyright laws -ignorable_holders: - - laws --- Software License Agreement diff --git a/src/licensedcode/data/rules/proprietary-license_946.RULE b/src/licensedcode/data/rules/proprietary-license_946.RULE index dc72928ee89..105befa8f4e 100644 --- a/src/licensedcode/data/rules/proprietary-license_946.RULE +++ b/src/licensedcode/data/rules/proprietary-license_946.RULE @@ -3,7 +3,7 @@ license_expression: proprietary-license is_license_text: yes notes: first child to immolate does not make it a practical license. See https://github.com/mkdirlove/GHIBLI-WEBSTORE-WEBSITE/blob/a3557d5bacbb0f1df257383ece34aed9fb3ba9a2/LICENSE ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_urls: diff --git a/src/licensedcode/data/rules/public-domain_527.RULE b/src/licensedcode/data/rules/public-domain_527.RULE new file mode 100644 index 00000000000..d89d4482484 --- /dev/null +++ b/src/licensedcode/data/rules/public-domain_527.RULE @@ -0,0 +1,7 @@ +--- +license_expression: public-domain +is_license_notice: yes +relevance: 100 +--- + +This implementation is based on the public domain library \ No newline at end of file diff --git a/src/licensedcode/data/rules/public-domain_528.RULE b/src/licensedcode/data/rules/public-domain_528.RULE new file mode 100644 index 00000000000..2a9295e3f3d --- /dev/null +++ b/src/licensedcode/data/rules/public-domain_528.RULE @@ -0,0 +1,7 @@ +--- +license_expression: public-domain +is_license_notice: yes +relevance: 100 +--- + +based on the public domain library \ No newline at end of file diff --git a/src/licensedcode/data/rules/public-domain_529.RULE b/src/licensedcode/data/rules/public-domain_529.RULE new file mode 100644 index 00000000000..837d30cc884 --- /dev/null +++ b/src/licensedcode/data/rules/public-domain_529.RULE @@ -0,0 +1,7 @@ +--- +license_expression: public-domain +is_license_notice: yes +relevance: 100 +--- + +This implementation is based on the public domain \ No newline at end of file diff --git a/src/licensedcode/data/rules/public-domain_530.RULE b/src/licensedcode/data/rules/public-domain_530.RULE new file mode 100644 index 00000000000..acd76a49491 --- /dev/null +++ b/src/licensedcode/data/rules/public-domain_530.RULE @@ -0,0 +1,7 @@ +--- +license_expression: public-domain +is_license_notice: yes +--- + +All these files have been put into the public domain. + # You can do whatever you want with these files. \ No newline at end of file diff --git a/src/licensedcode/data/rules/public-domain_531.RULE b/src/licensedcode/data/rules/public-domain_531.RULE new file mode 100644 index 00000000000..8638e261c4e --- /dev/null +++ b/src/licensedcode/data/rules/public-domain_531.RULE @@ -0,0 +1,7 @@ +--- +license_expression: public-domain +is_license_notice: yes +--- + +code examples included in the manual go into the {{public +domain}} up to the extent of the applicable law. \ No newline at end of file diff --git a/src/licensedcode/data/rules/public-domain_532.RULE b/src/licensedcode/data/rules/public-domain_532.RULE new file mode 100644 index 00000000000..acc626e0f44 --- /dev/null +++ b/src/licensedcode/data/rules/public-domain_532.RULE @@ -0,0 +1,8 @@ +--- +license_expression: public-domain +is_license_notice: yes +relevance: 100 +--- + +examples included in the manual go into the {{public +domain}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/public-domain_533.RULE b/src/licensedcode/data/rules/public-domain_533.RULE new file mode 100644 index 00000000000..9c8f2657719 --- /dev/null +++ b/src/licensedcode/data/rules/public-domain_533.RULE @@ -0,0 +1,7 @@ +--- +license_expression: public-domain +is_license_notice: yes +--- + +The code examples contained in this manual are released into the +{{public domain}}, up to the extent of the applicable law. \ No newline at end of file diff --git a/src/licensedcode/data/rules/public-domain_534.RULE b/src/licensedcode/data/rules/public-domain_534.RULE new file mode 100644 index 00000000000..0a3f1b20c23 --- /dev/null +++ b/src/licensedcode/data/rules/public-domain_534.RULE @@ -0,0 +1,8 @@ +--- +license_expression: public-domain +is_license_notice: yes +relevance: 100 +--- + +code examples contained in this manual are released into the +{{public domain}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/public-domain_535.RULE b/src/licensedcode/data/rules/public-domain_535.RULE new file mode 100644 index 00000000000..6ef5ee17953 --- /dev/null +++ b/src/licensedcode/data/rules/public-domain_535.RULE @@ -0,0 +1,7 @@ +--- +license_expression: public-domain +is_license_notice: yes +--- + +All the code examples contained in this manual are released into the +public domain, up to the extent of the applicable law. \ No newline at end of file diff --git a/src/licensedcode/data/rules/public-domain_536.RULE b/src/licensedcode/data/rules/public-domain_536.RULE new file mode 100644 index 00000000000..08dba0645a5 --- /dev/null +++ b/src/licensedcode/data/rules/public-domain_536.RULE @@ -0,0 +1,7 @@ +--- +license_expression: public-domain +is_license_notice: yes +--- + +@c The code examples contained in this manual are released into the +@c public domain, up to the extent of the applicable law. \ No newline at end of file diff --git a/src/licensedcode/data/rules/public-domain_bare_words.RULE b/src/licensedcode/data/rules/public-domain_bare_words.RULE index 5d9fb8c1d68..aa90b4812ef 100644 --- a/src/licensedcode/data/rules/public-domain_bare_words.RULE +++ b/src/licensedcode/data/rules/public-domain_bare_words.RULE @@ -1,6 +1,6 @@ --- license_expression: public-domain -is_license_reference: yes +is_license_clue: yes is_continuous: yes relevance: 70 --- diff --git a/src/licensedcode/data/rules/qt-commercial-1.1_or_lgpl-2.1_with_qt-company-exception-lgpl-2.1_or_lgpl-3.0_with_qt-company-exception-lgpl-2.1_1.RULE b/src/licensedcode/data/rules/qt-commercial-1.1_or_lgpl-2.1_with_qt-company-exception-lgpl-2.1_or_lgpl-3.0_with_qt-company-exception-lgpl-2.1_1.RULE new file mode 100644 index 00000000000..8b23568a11b --- /dev/null +++ b/src/licensedcode/data/rules/qt-commercial-1.1_or_lgpl-2.1_with_qt-company-exception-lgpl-2.1_or_lgpl-3.0_with_qt-company-exception-lgpl-2.1_1.RULE @@ -0,0 +1,35 @@ +--- +license_expression: qt-commercial-1.1 OR lgpl-2.1 WITH qt-company-exception-lgpl-2.1 OR lgpl-3.0 + WITH qt-company-exception-lgpl-2.1 +is_license_notice: yes +referenced_filenames: + - LICENSE.LGPLv21 + - LICENSE.LGPLv3 + - LGPL_EXCEPTION.txt +ignorable_urls: + - http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + - http://www.qt.io/contact-us + - http://www.qt.io/terms-conditions + - https://www.gnu.org/licenses/lgpl.html +--- + +Commercial License Usage +Licensees holding valid commercial Qt licenses may use this file in +accordance with the commercial license agreement provided with the +Software or, alternatively, in accordance with the terms contained in +a written agreement between you and The Qt Company. For licensing terms and +conditions see http://www.qt.io/terms-conditions. For further information +use the contact form at http://www.qt.io/contact-us. + +GNU Lesser General Public License Usage +Alternatively, this file may be used under the terms of the GNU Lesser +General Public License version 2.1 or version 3 as published by the Free +Software Foundation and appearing in the file LICENSE.LGPLv21 and +LICENSE.LGPLv3 included in the packaging of this file. Please review the +following information to ensure the GNU Lesser General Public License +requirements will be met: https://www.gnu.org/licenses/lgpl.html and +http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. + +In addition, as a special exception, The Qt Company gives you certain additional +rights. These rights are described in The Qt Company LGPL Exception +version 1.1, included in the file LGPL_EXCEPTION.txt in this package. \ No newline at end of file diff --git a/src/licensedcode/data/rules/ruby_36.RULE b/src/licensedcode/data/rules/ruby_36.RULE new file mode 100644 index 00000000000..5052da2d86c --- /dev/null +++ b/src/licensedcode/data/rules/ruby_36.RULE @@ -0,0 +1,8 @@ +--- +license_expression: ruby +is_license_tag: yes +is_continuous: yes +relevance: 100 +--- + +{{spec.license = "Ruby" }} \ No newline at end of file diff --git a/src/licensedcode/data/rules/ruby_37.RULE b/src/licensedcode/data/rules/ruby_37.RULE new file mode 100644 index 00000000000..5552e416913 --- /dev/null +++ b/src/licensedcode/data/rules/ruby_37.RULE @@ -0,0 +1,8 @@ +--- +license_expression: ruby +is_license_notice: yes +relevance: 100 +--- + +# This program is free software. +# You can distribute and/or modify this program under the {{Ruby}} License. \ No newline at end of file diff --git a/src/licensedcode/data/rules/ruby_38.RULE b/src/licensedcode/data/rules/ruby_38.RULE new file mode 100644 index 00000000000..a45ede5c19e --- /dev/null +++ b/src/licensedcode/data/rules/ruby_38.RULE @@ -0,0 +1,10 @@ +--- +license_expression: ruby +is_license_notice: yes +referenced_filenames: + - ruby/COPYING +--- + +# This program is free software. +# You can distribute and/or modify this program under the {{Ruby}} License. +# For details of Ruby License, see ruby/COPYING. \ No newline at end of file diff --git a/src/licensedcode/data/rules/ruby_39.RULE b/src/licensedcode/data/rules/ruby_39.RULE new file mode 100644 index 00000000000..13370aaa583 --- /dev/null +++ b/src/licensedcode/data/rules/ruby_39.RULE @@ -0,0 +1,7 @@ +--- +license_expression: ruby +is_license_notice: yes +relevance: 100 +--- + +You can distribute and/or modify this program under the Ruby License. \ No newline at end of file diff --git a/src/licensedcode/data/rules/sfl-license.SPDX.RULE b/src/licensedcode/data/rules/sfl-license.SPDX.RULE index 468d57ab33b..ca2b96bca3e 100644 --- a/src/licensedcode/data/rules/sfl-license.SPDX.RULE +++ b/src/licensedcode/data/rules/sfl-license.SPDX.RULE @@ -5,7 +5,7 @@ minimum_coverage: 10 notes: license text as published by SPDX ignorable_copyrights: - Copyright (c) 1991-2000 iMatix Corporation - - Copyright (c) 1991-2000 iMatix Corporation + - Copyright (c) 1991-2000 iMatix Corporation http://www.imatix.com - Parts copyright (c) 1991-2000 iMatix Corporation ignorable_holders: - iMatix Corporation diff --git a/src/licensedcode/data/rules/sgi-freeb-2.0_3.RULE b/src/licensedcode/data/rules/sgi-freeb-2.0_3.RULE index 27942c507e2..97094d2e3ac 100644 --- a/src/licensedcode/data/rules/sgi-freeb-2.0_3.RULE +++ b/src/licensedcode/data/rules/sgi-freeb-2.0_3.RULE @@ -4,7 +4,7 @@ is_license_reference: yes ignorable_copyrights: - Copyright (c) September 18, 2008 Silicon Graphics, Inc. ignorable_holders: - - September 18, Silicon Graphics, Inc. + - September Silicon Graphics, Inc. ignorable_urls: - http://oss.sgi.com/projects/FreeB/ --- @@ -12,4 +12,4 @@ ignorable_urls: SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) September 18, 2008 Silicon Graphics, Inc. All Rights Reserved. * This document is licensed under the SGI Free Software B License Version -* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . \ No newline at end of file +* 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . diff --git a/src/licensedcode/data/rules/unknown-license-reference_414.RULE b/src/licensedcode/data/rules/unknown-license-reference_414.RULE new file mode 100644 index 00000000000..3fffaa15b49 --- /dev/null +++ b/src/licensedcode/data/rules/unknown-license-reference_414.RULE @@ -0,0 +1,9 @@ +--- +license_expression: unknown-license-reference +is_license_reference: yes +relevance: 100 +referenced_filenames: + - LICENSE +--- + +Licensing (LICENSE) \ No newline at end of file diff --git a/src/licensedcode/data/rules/unknown-license-reference_415.RULE b/src/licensedcode/data/rules/unknown-license-reference_415.RULE new file mode 100644 index 00000000000..52d906bd5d1 --- /dev/null +++ b/src/licensedcode/data/rules/unknown-license-reference_415.RULE @@ -0,0 +1,8 @@ +--- +license_expression: unknown-license-reference +is_license_reference: yes +is_continuous: yes +relevance: 100 +--- + +{{Based on code that is Copyright}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/unknown-license-reference_66.RULE b/src/licensedcode/data/rules/unknown-license-reference_66.RULE index 7e31b9babb3..2e4a738b080 100644 --- a/src/licensedcode/data/rules/unknown-license-reference_66.RULE +++ b/src/licensedcode/data/rules/unknown-license-reference_66.RULE @@ -2,6 +2,8 @@ license_expression: unknown-license-reference is_license_reference: yes relevance: 100 +is_deprecated: yes +notes: this is now the ms-rndis_1.RULE --- This software was originally developed in conformance with diff --git a/src/licensedcode/data/rules/unlicense_57.RULE b/src/licensedcode/data/rules/unlicense_57.RULE new file mode 100644 index 00000000000..a7ec8673755 --- /dev/null +++ b/src/licensedcode/data/rules/unlicense_57.RULE @@ -0,0 +1,7 @@ +--- +license_expression: unlicense +is_license_notice: yes +relevance: 100 +--- + +This is released into the public domain using the "Unlicense license" \ No newline at end of file diff --git a/src/licensedcode/data/rules/unlicense_58.RULE b/src/licensedcode/data/rules/unlicense_58.RULE new file mode 100644 index 00000000000..03590290e6d --- /dev/null +++ b/src/licensedcode/data/rules/unlicense_58.RULE @@ -0,0 +1,10 @@ +--- +license_expression: unlicense +is_license_notice: yes +is_continuous: yes +relevance: 100 +ignorable_urls: + - https://unlicense.org/ +--- + +{{Public domain - https://unlicense.org}} \ No newline at end of file diff --git a/src/licensedcode/data/rules/uoi-ncsa_and_other.RULE b/src/licensedcode/data/rules/uoi-ncsa_and_other.RULE index c6e213f82fb..88ed8e9d3cc 100644 --- a/src/licensedcode/data/rules/uoi-ncsa_and_other.RULE +++ b/src/licensedcode/data/rules/uoi-ncsa_and_other.RULE @@ -2,10 +2,6 @@ license_expression: uoi-ncsa AND other-permissive AND other-copyleft is_license_notice: yes minimum_coverage: 95 -ignorable_copyrights: - - Copyright ----- The LLVM project -ignorable_holders: - - The LLVM project ignorable_urls: - http://www.opensource.org/licenses/UoI-NCSA.php - http://www.opensource.org/licenses/mit-license.php @@ -121,4 +117,4 @@ you or your employer own the rights to a patent and would like to contribute code to LLVM that relies on it, we require that the copyright owner sign an agreement that allows any other user of LLVM to freely use your patent. Please contact the `oversight group `_ for more -details. \ No newline at end of file +details. diff --git a/src/licensedcode/data/rules/upl-1.0_27.RULE b/src/licensedcode/data/rules/upl-1.0_27.RULE new file mode 100644 index 00000000000..62e0323169a --- /dev/null +++ b/src/licensedcode/data/rules/upl-1.0_27.RULE @@ -0,0 +1,8 @@ +--- +license_expression: upl-1.0 +is_license_notice: yes +ignorable_urls: + - https://oss.oracle.com/licenses/upl +--- + +Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/. \ No newline at end of file diff --git a/src/licensedcode/data/rules/us-govt-public-domain_10.RULE b/src/licensedcode/data/rules/us-govt-public-domain_10.RULE index 036eb59f80e..51f26c0928e 100644 --- a/src/licensedcode/data/rules/us-govt-public-domain_10.RULE +++ b/src/licensedcode/data/rules/us-govt-public-domain_10.RULE @@ -3,8 +3,8 @@ license_expression: us-govt-public-domain is_license_text: yes relevance: 100 ignorable_authors: - - United States + - United States Government --- The software provided here is released by the Naval Postgraduate School, an agency of the U.S. Department of Navy. The software bears no warranty, either expressed or implied. NPS does not assume legal liability nor responsibility for a User's use of the software or the results of such use. -Please note that within the United States, copyright protection, under Section 105 of the United States Code, Title 17, is not available for any work of the United States Government and/or for any works created by United States Government employees. User acknowledges that this software contains work which was created by NPS government employees and is therefore in the public domain and not subject to copyright. \ No newline at end of file +Please note that within the United States, copyright protection, under Section 105 of the United States Code, Title 17, is not available for any work of the United States Government and/or for any works created by United States Government employees. User acknowledges that this software contains work which was created by NPS government employees and is therefore in the public domain and not subject to copyright. diff --git a/src/licensedcode/data/rules/us-govt-public-domain_11.RULE b/src/licensedcode/data/rules/us-govt-public-domain_11.RULE index 76adf9a4bf3..6c64b1b2c7c 100644 --- a/src/licensedcode/data/rules/us-govt-public-domain_11.RULE +++ b/src/licensedcode/data/rules/us-govt-public-domain_11.RULE @@ -3,7 +3,7 @@ license_expression: us-govt-public-domain is_license_text: yes relevance: 100 ignorable_authors: - - United States + - United States Government --- The software provided here is released by the Naval Postgraduate @@ -20,4 +20,4 @@ acknowledges that this software contains work which was created by NPS government employees and is therefore in the public domain and not subject to copyright. -Released into the public domain on July 28, 2019 by Bruce Allen. \ No newline at end of file +Released into the public domain on July 28, 2019 by Bruce Allen. diff --git a/src/licensedcode/data/rules/us-govt-public-domain_8.RULE b/src/licensedcode/data/rules/us-govt-public-domain_8.RULE index e61f252e3ab..ef24e65c95a 100644 --- a/src/licensedcode/data/rules/us-govt-public-domain_8.RULE +++ b/src/licensedcode/data/rules/us-govt-public-domain_8.RULE @@ -2,6 +2,8 @@ license_expression: us-govt-public-domain is_license_text: yes relevance: 100 +ignorable_authors: + - US Government --- These classes were either developed by a US Government employee @@ -9,4 +11,4 @@ on official time, or they were translated from public domain sources by a US Government employee on official time. Thus they are in the public domain. These programs are distributed in the hope that they will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of \ No newline at end of file +but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/licensedcode/data/rules/w3c-software-19980720_21.RULE b/src/licensedcode/data/rules/w3c-software-19980720_21.RULE index 4dd39a26c5e..99f50e4830e 100644 --- a/src/licensedcode/data/rules/w3c-software-19980720_21.RULE +++ b/src/licensedcode/data/rules/w3c-software-19980720_21.RULE @@ -2,8 +2,8 @@ license_expression: w3c-software-19980720 is_license_text: yes ignorable_copyrights: - - Copyright (c) 1994-2002 http://www.w3.org/> World Wide Web Consortium - - Copyright (c) 2002 http://www.w3.org/> World Wide Web Consortium + - Copyright (c) 1994-2002 World Wide Web Consortium + - Copyright (c) 2002 World Wide Web Consortium ignorable_holders: - World Wide Web Consortium ignorable_urls: @@ -69,4 +69,4 @@ or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.

      - \ No newline at end of file + diff --git a/src/licensedcode/data/rules/w3c-software-19980720_25.RULE b/src/licensedcode/data/rules/w3c-software-19980720_25.RULE new file mode 100644 index 00000000000..c0bfaddf7fb --- /dev/null +++ b/src/licensedcode/data/rules/w3c-software-19980720_25.RULE @@ -0,0 +1,15 @@ +--- +license_expression: w3c-software-19980720 +is_license_tag: yes +notes: https://repo1.maven.org/maven2/com/vaadin/external/flute/flute/1.3.0.gg2/flute-1.3.0.gg2.pom +ignorable_urls: + - http://www.w3.org/Consortium/Legal/copyright-software-19980720 +--- + + +W3C Software Copyright Notice and License +repo + +http://www.w3.org/Consortium/Legal/copyright-software-19980720 + + \ No newline at end of file diff --git a/src/licensedcode/data/rules/w3c-software-19980720_26.RULE b/src/licensedcode/data/rules/w3c-software-19980720_26.RULE new file mode 100644 index 00000000000..f211399fb6e --- /dev/null +++ b/src/licensedcode/data/rules/w3c-software-19980720_26.RULE @@ -0,0 +1,11 @@ +--- +license_expression: w3c-software-19980720 +is_license_tag: yes +notes: https://repo1.maven.org/maven2/com/vaadin/external/flute/flute/1.3.0.gg2/flute-1.3.0.gg2.pom +ignorable_urls: + - http://www.w3.org/Consortium/Legal/copyright-software-19980720 +--- + + +W3C Software Copyright Notice and License + http://www.w3.org/Consortium/Legal/copyright-software-19980720 \ No newline at end of file diff --git a/src/licensedcode/data/rules/w3c-software-19980720_27.RULE b/src/licensedcode/data/rules/w3c-software-19980720_27.RULE new file mode 100644 index 00000000000..7fe7072e0a4 --- /dev/null +++ b/src/licensedcode/data/rules/w3c-software-19980720_27.RULE @@ -0,0 +1,8 @@ +--- +license_expression: w3c-software-19980720 +is_license_reference: yes +relevance: 95 +notes: https://repo1.maven.org/maven2/com/vaadin/external/flute/flute/1.3.0.gg2/flute-1.3.0.gg2.pom +--- + +W3C Software Copyright Notice and License \ No newline at end of file diff --git a/src/licensedcode/data/rules/w3c-software-19980720_6.RULE b/src/licensedcode/data/rules/w3c-software-19980720_6.RULE index 24a63caa93e..14c8e0a9347 100644 --- a/src/licensedcode/data/rules/w3c-software-19980720_6.RULE +++ b/src/licensedcode/data/rules/w3c-software-19980720_6.RULE @@ -2,7 +2,7 @@ license_expression: w3c-software-19980720 is_license_text: yes ignorable_copyrights: - - Copyright (c) http://www.w3.org/> World Wide Web Consortium + - Copyright (c) World Wide Web Consortium ignorable_holders: - World Wide Web Consortium ignorable_urls: @@ -58,4 +58,4 @@ This W3C work (including software, documents, or other related items) is advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright - holders. \ No newline at end of file + holders. diff --git a/src/licensedcode/data/rules/warranty-disclaimer_100.RULE b/src/licensedcode/data/rules/warranty-disclaimer_100.RULE new file mode 100644 index 00000000000..150a013437e --- /dev/null +++ b/src/licensedcode/data/rules/warranty-disclaimer_100.RULE @@ -0,0 +1,7 @@ +--- +license_expression: warranty-disclaimer +is_license_text: yes +--- + +This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/warranty-disclaimer_101.RULE b/src/licensedcode/data/rules/warranty-disclaimer_101.RULE new file mode 100644 index 00000000000..651770f858a --- /dev/null +++ b/src/licensedcode/data/rules/warranty-disclaimer_101.RULE @@ -0,0 +1,6 @@ +--- +license_expression: warranty-disclaimer +is_license_notice: yes +--- + +distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. \ No newline at end of file diff --git a/src/licensedcode/data/rules/warranty-disclaimer_99.RULE b/src/licensedcode/data/rules/warranty-disclaimer_99.RULE new file mode 100644 index 00000000000..25bfc769e6a --- /dev/null +++ b/src/licensedcode/data/rules/warranty-disclaimer_99.RULE @@ -0,0 +1,6 @@ +--- +license_expression: warranty-disclaimer +is_license_text: yes +--- + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/src/licensedcode/data/rules/x11-xconsortium_37.RULE b/src/licensedcode/data/rules/x11-xconsortium_37.RULE index 9ecd47812b5..02554a9bfc6 100644 --- a/src/licensedcode/data/rules/x11-xconsortium_37.RULE +++ b/src/licensedcode/data/rules/x11-xconsortium_37.RULE @@ -1,9 +1,11 @@ --- license_expression: x11-xconsortium is_license_text: yes +is_deprecated: yes relevance: 99 -notes: the no advert paragraph has its position switched with the warranty disclaimer in this - variant. The texts are otherwise essentially the same See https://github.com/achillean/shodan-python/blob/90491308971a7ba6e358d6152d7b02307964c6fe/LICENSE +notes: | + Added in SPDX license list 3.25 + Replaced by license: x11-swapped --- Permission is hereby granted, free of charge, to any person diff --git a/src/licensedcode/detection.py b/src/licensedcode/detection.py index ec99622c25f..7e5bf1dcf8a 100644 --- a/src/licensedcode/detection.py +++ b/src/licensedcode/detection.py @@ -70,6 +70,7 @@ def logger_debug(*args): return logger.debug(' '.join(isinstance(a, str) and a or repr(a) for a in args)) MATCHER_UNDETECTED = '5-undetected' +MATCHER_UNDETECTED_ORDER = 4 # All values of match_coverage less than this value then they are not considered # as perfect detections @@ -641,7 +642,6 @@ def len(self): def coverage(self): return self.match_coverage - @property def matched_text(self, whole_lines=False, highlight=True): return self.text @@ -713,8 +713,8 @@ def to_dict( if rule_details: result["rule_notes"] = self.rule.notes result["referenced_filenames"] = self.rule.referenced_filenames - if include_text and self.matched_text: - result['matched_text'] = self.matched_text + if include_text and self.text: + result['matched_text'] = self.text if license_text_diagnostics and self.matched_text_diagnostics: result['matched_text_diagnostics'] = self.matched_text_diagnostics if rule_details: @@ -1163,6 +1163,31 @@ def is_false_positive(license_matches, package_license=False): if package_license: return False + # FIXME: actually run copyright detection here? + copyright_words = ["copyright", "(c)"] + has_copyrights = all( + True + for license_match in license_matches + if any( + True + for word in copyright_words + if word in license_match.matched_text().lower() + ) + ) + has_full_relevance = all( + True + for license_match in license_matches + if license_match.rule.relevance == 100 + ) + if has_copyrights or has_full_relevance: + return False + + has_low_relevance = all( + True + for license_match in license_matches + if license_match.rule.relevance < 60 + ) + start_line_region = min( license_match.start_line for license_match in license_matches ) @@ -1194,13 +1219,13 @@ def is_false_positive(license_matches, package_license=False): is_single_match = len(license_matches) == 1 - if is_single_match and is_bare_rule: + if is_single_match and is_bare_rule and has_low_relevance: return True if is_gpl and all_match_rule_length_one: return True - if start_line_region > FALSE_POSITIVE_START_LINE_THRESHOLD and any( + if has_low_relevance and start_line_region > FALSE_POSITIVE_START_LINE_THRESHOLD and any( match_rule_length_value <= FALSE_POSITIVE_RULE_LENGTH_THRESHOLD for match_rule_length_value in match_rule_length_values ): @@ -1603,6 +1628,7 @@ def get_undetected_matches(query_string): hispan=hispan, query_run_start=match_start, matcher=MATCHER_UNDETECTED, + matcher_order=MATCHER_UNDETECTED_ORDER, query=query_run.query, ) diff --git a/src/licensedcode/match.py b/src/licensedcode/match.py index 9293f4ca908..6bc0c99f6c6 100644 --- a/src/licensedcode/match.py +++ b/src/licensedcode/match.py @@ -42,8 +42,8 @@ The filter functions are executed in a specific sequence over the list of matches. """ -TRACE = False -TRACE_MERGE = False +TRACE = True +TRACE_MERGE = True TRACE_REFINE = False TRACE_FILTER_FALSE_POSITIVE = False TRACE_FILTER_CONTAINED = False @@ -213,6 +213,15 @@ class LicenseMatch(object): ) ) + matcher_order = attr.ib( + default=0, + metadata=dict( + help='An integer indicating the precedence of a matcher when compared to other matchers ' + 'where the lowest value has the highest precedence. Used to select which of two ' + 'equal matches to keep.' + ) + ) + start_line = attr.ib( default=0, metadata=dict(help='match start line, 1-based') @@ -624,8 +633,10 @@ def combine(self, other): if other.matcher not in self.matcher: newmatcher = ' '.join([self.matcher, other.matcher]) + newmatcher_order = max([self.matcher_order, other.matcher_order]) else: newmatcher = self.matcher + newmatcher_order = self.matcher_order if ( self.discard_reason == DiscardReason.NOT_DISCARDED @@ -655,6 +666,7 @@ def combine(self, other): hispan=Span(self.hispan | other.hispan), query_run_start=min(self.query_run_start, other.query_run_start), matcher=newmatcher, + matcher_order=newmatcher_order, query=self.query, discard_reason=discard_reason, ) @@ -671,6 +683,7 @@ def update(self, other): self.matcher = combined.matcher self.query_run_start = min(self.query_run_start, other.query_run_start) self.matcher = combined.matcher + self.matcher_order = combined.matcher_order self.discard_reason = combined.discard_reason return self @@ -852,7 +865,7 @@ def merge_matches(matches, max_dist=None, trace=TRACE_MERGE): # only merge matches with the same rule: sort then group by rule for the # same rule, sort on start, longer high, longer match, matcher type - sorter = lambda m: (m.rule.identifier, m.qspan.start, -m.hilen(), -m.len(), m.matcher) + sorter = lambda m: (m.rule.identifier, m.qspan.start, -m.hilen(), -m.len(), m.matcher_order) matches.sort(key=sorter) matches_by_rule = [ (rid, list(rule_matches)) @@ -1069,7 +1082,7 @@ def filter_contained_matches( # NOTE: we do not filter matches in place: sorted creates a copy # sort on start, longer high, longer match, matcher type - sorter = lambda m: (m.qspan.start, -m.hilen(), -m.len(), m.matcher) + sorter = lambda m: (m.qspan.start, -m.hilen(), -m.len(), m.matcher_order) matches = sorted(matches, key=sorter) matches_pop = matches.pop @@ -1190,7 +1203,7 @@ def filter_overlapping_matches( # NOTE: we do not filter matches in place: sorted creates a copy # sort on start, longer high, longer match, matcher type - sorter = lambda m: (m.qspan.start, -m.hilen(), -m.len(), m.matcher) + sorter = lambda m: (m.qspan.start, -m.hilen(), -m.len(), m.matcher_order) matches = sorted(matches, key=sorter) matches_pop = matches.pop @@ -2734,6 +2747,12 @@ def _log(_matches, _discarded, msg): matches, discarded_contained = filter_contained_matches(matches) _log(matches, discarded_contained, 'NON CONTAINED') + if trace_basic: + logger_debug(' #####refine_matches: after FILTER matches#', len(matches)) + if trace: + for m in matches: + logger_debug(m) + matches, discarded_overlapping = filter_overlapping_matches(matches) _log(matches, discarded_overlapping, 'NON OVERLAPPING') diff --git a/src/licensedcode/match_aho.py b/src/licensedcode/match_aho.py index 7a46821a31e..160c25a9c2f 100644 --- a/src/licensedcode/match_aho.py +++ b/src/licensedcode/match_aho.py @@ -76,10 +76,19 @@ def add_sequence(automaton, tids, rid, start=0, with_duplicates=False): MATCH_AHO_EXACT = '2-aho' +MATCH_AHO_EXACT_ORDER = 2 MATCH_AHO_FRAG = '5-aho-frag' +MATCH_AHO_FRAG_ORDER = 5 -def exact_match(idx, query_run, automaton, matcher=MATCH_AHO_EXACT, **kwargs): +def exact_match( + idx, + query_run, + automaton, + matcher=MATCH_AHO_EXACT, + matcher_order=MATCH_AHO_EXACT_ORDER, + **kwargs, +): """ Return a list of exact LicenseMatch by matching the `query_run` against the `automaton` and `idx` index. @@ -111,7 +120,15 @@ def exact_match(idx, query_run, automaton, matcher=MATCH_AHO_EXACT, **kwargs): rule = rules_by_rid[rid] match = LicenseMatch( - rule, qspan, ispan, hispan, qbegin, matcher=matcher, query=query) + rule=rule, + qspan=qspan, + ispan=ispan, + hispan=hispan, + query_run_start=qbegin, + matcher=matcher, + matcher_order=matcher_order, + query=query, + ) matches_append(match) if TRACE and matches: logger_debug(' ##exact_AHO: matches found#') @@ -234,8 +251,16 @@ def match_fragments(idx, query_run): qspan = Span(range(qpos, qpos + mlen)) ispan = Span(range(ipos, ipos + mlen)) hispan = Span(p for p in ispan if itokens[p] < len_legalese) - match = LicenseMatch(rule, qspan, ispan, hispan, qbegin, - matcher=MATCH_AHO_FRAG, query=query) + match = LicenseMatch( + rule=rule, + qspan=qspan, + ispan=ispan, + hispan=hispan, + qbegin=qbegin, + matcher=MATCH_AHO_FRAG, + matcher_order=MATCH_AHO_FRAG_ORDER, + query=query, + ) frag_matches.append(match) # Merge matches as usual diff --git a/src/licensedcode/match_hash.py b/src/licensedcode/match_hash.py index e0ed6c8b719..92c77c1468f 100644 --- a/src/licensedcode/match_hash.py +++ b/src/licensedcode/match_hash.py @@ -10,7 +10,6 @@ from array import array from hashlib import sha1 - from licensedcode.match import LicenseMatch from licensedcode.spans import Span @@ -39,6 +38,7 @@ def logger_debug(*args): pass MATCH_HASH = '1-hash' +MATCH_HASH_ORDER = 0 def tokens_hash(tokens): @@ -73,6 +73,15 @@ def hash_match(idx, query_run, **kwargs): qspan = Span(range(query_run.start, query_run.end + 1)) ispan = Span(range(0, rule.length)) hispan = Span(p for p in ispan if itokens[p] < len_legalese) - match = LicenseMatch(rule, qspan, ispan, hispan, query_run.start, matcher=MATCH_HASH, query=query_run.query) + match = LicenseMatch( + rule=rule, + qspan=qspan, + ispan=ispan, + hispan=hispan, + query_run_start=query_run.start, + matcher=MATCH_HASH, + matcher_order=MATCH_HASH_ORDER, + query=query_run.query, + ) matches.append(match) return matches diff --git a/src/licensedcode/match_seq.py b/src/licensedcode/match_seq.py index 26e59e37f02..6e297398021 100644 --- a/src/licensedcode/match_seq.py +++ b/src/licensedcode/match_seq.py @@ -10,11 +10,9 @@ from time import time import sys - from licensedcode.match import LicenseMatch from licensedcode.spans import Span - TRACE = False TRACE2 = False TRACE3 = False @@ -38,17 +36,24 @@ def logger_debug(*args): pass def logger_debug(*args): return prn(' '.join(isinstance(a, str) and a or repr(a) for a in args)) - """ Matching strategy using pair-wise multiple local sequences alignment and diff- like approaches. """ MATCH_SEQ = '3-seq' - - -def match_sequence(idx, rule, query_run, high_postings, start_offset=0, - match_blocks=None, deadline=sys.maxsize): +MATCH_SEQ_ORDER = 3 + + +def match_sequence( + idx, + rule, + query_run, + high_postings, + start_offset=0, + match_blocks=None, + deadline=sys.maxsize, +): """ Return a list of LicenseMatch by matching the `query_run` tokens sequence starting at `start_offset` against the `idx` index for the candidate `rule`. @@ -107,8 +112,15 @@ def match_sequence(idx, rule, query_run, high_postings, start_offset=0, ispan = Span(range(ipos, ipos + mlen)) hispan = Span(p for p in ispan if itokens[p] < len_legalese) match = LicenseMatch( - rule, qspan, ispan, hispan, qbegin, - matcher=MATCH_SEQ, query=query) + rule=rule, + qspan=qspan, + ispan=ispan, + hispan=hispan, + query_run_start=qbegin, + matcher=MATCH_SEQ, + matcher_order=MATCH_SEQ_ORDER, + query=query, + ) matches.append(match) if TRACE2: diff --git a/src/licensedcode/match_spdx_lid.py b/src/licensedcode/match_spdx_lid.py index d5937fb1466..5efe7444d6b 100644 --- a/src/licensedcode/match_spdx_lid.py +++ b/src/licensedcode/match_spdx_lid.py @@ -59,6 +59,7 @@ def logger_debug(*args): return logger.debug(' '.join(isinstance(a, str) and a or repr(a) for a in args)) MATCH_SPDX_ID = '1-spdx-id' +MATCH_SPDX_ID_ORDER = 2 def spdx_id_match(idx, query_run, text, expression_symbols=None): @@ -112,6 +113,7 @@ def spdx_id_match(idx, query_run, text, expression_symbols=None): hispan=hispan, query_run_start=match_start, matcher=MATCH_SPDX_ID, + matcher_order=MATCH_SPDX_ID_ORDER, query=query_run.query, ) return match @@ -136,7 +138,7 @@ def get_spdx_expression(text, expression_symbols=None): expression_symbols = get_spdx_symbols() unknown_symbol = get_unknown_spdx_symbol() - #_prefix, exp_text = prepare_text(text) + # _prefix, exp_text = prepare_text(text) expression = get_expression( text=text, @@ -361,7 +363,7 @@ def clean_text(text): if is_markup_text(text): text = demarkup_text(text) - dangling_markup = ['','

      ','', ''] + dangling_markup = ['', '

      ', '', ''] for markup in dangling_markup: if markup in text: text = text.replace(markup, '') @@ -384,7 +386,7 @@ def clean_text(text): if '">' in text: text_fragments = text.split('">') if text_fragments[1] in text_fragments[0]: - text = text_fragments[0] + text = text_fragments[0] return ' '.join(text.split()) @@ -393,7 +395,6 @@ def clean_text(text): '(spdx(?:\\-|\\s)+licen(?:s|c)e(?:\\-|\\s)+identifier\\s*:?\\s*)', re.IGNORECASE).split - _nuget_split_spdx_lid = re.compile( '(licenses(?:\\.|\\s)+nuget(?:\\.|\\s)+org\\s*:?\\s*)', re.IGNORECASE).split diff --git a/src/licensedcode/match_unknown.py b/src/licensedcode/match_unknown.py index b83a62a01e0..820c9ba2c91 100644 --- a/src/licensedcode/match_unknown.py +++ b/src/licensedcode/match_unknown.py @@ -44,6 +44,7 @@ def logger_debug(*args): pass MATCH_UNKNOWN = '6-unknown' +MATCH_UNKNOWN_ORDER = 6 UNKNOWN_NGRAM_LENGTH = 6 @@ -176,7 +177,7 @@ def get_tokens(_toks): match_len = len(qspan) if TRACE: - #print('match_unknowns: matched_span:', get_tokens(matched_tokens)) + # print('match_unknowns: matched_span:', get_tokens(matched_tokens)) print('match_unknowns: qspan, match_len, matched_span:', qspan, match_len, matched_tokens) # we use the query side to build the ispans @@ -227,6 +228,7 @@ def get_tokens(_toks): hispan=hispan, query_run_start=query_run.start, matcher=MATCH_UNKNOWN, + matcher_order=MATCH_UNKNOWN_ORDER, query=query, ) diff --git a/src/packagedcode/__init__.py b/src/packagedcode/__init__.py index 629a1655de2..6692087aa4d 100644 --- a/src/packagedcode/__init__.py +++ b/src/packagedcode/__init__.py @@ -247,6 +247,12 @@ win_reg.InstalledProgramFromDockerUtilityvmSoftwareHandler, ] +try: + from go_inspector.binary import get_go_binary_handler + APPLICATION_PACKAGE_DATAFILE_HANDLERS.append(get_go_binary_handler()) +except ImportError: + pass + ALL_DATAFILE_HANDLERS = ( APPLICATION_PACKAGE_DATAFILE_HANDLERS + [ p for p in SYSTEM_PACKAGE_DATAFILE_HANDLERS diff --git a/src/packagedcode/models.py b/src/packagedcode/models.py index 26c6b6d0c8c..17eea486d36 100644 --- a/src/packagedcode/models.py +++ b/src/packagedcode/models.py @@ -978,7 +978,10 @@ def get_license_detections_and_expression(self): def get_default_relation_license(datasource_id): from packagedcode import HANDLER_BY_DATASOURCE_ID - handler = HANDLER_BY_DATASOURCE_ID[datasource_id] + handler = HANDLER_BY_DATASOURCE_ID.get(datasource_id, None) + if not handler: + return 'AND' + return handler.default_relation_license @@ -1186,7 +1189,7 @@ def assign_package_to_resources(cls, package, resource, codebase, package_adder= starting ``resource`` in the ``codebase``. This default implementation assigns the package to the whole - ``resource`` tree. Since ``resource`` is a file y default, this means + ``resource`` tree. Since ``resource`` is a file by default, this means that only the datafile ``resource`` is assigned to the ``package`` by default. @@ -1562,6 +1565,8 @@ class Package(PackageData): ) def __attrs_post_init__(self, *args, **kwargs): + if not self.purl: + self.purl = self.set_purl() if not self.package_uid: self.package_uid = build_package_uid(self.purl) @@ -1576,7 +1581,7 @@ def to_package_data(self): return PackageData.from_dict(mapping) @classmethod - def from_package_data(cls, package_data, datafile_path, package_only=False): + def from_package_data(cls, package_data, datafile_path=None, package_only=False): """ Return a Package from a ``package_data`` PackageData object or mapping. Or None. @@ -1591,20 +1596,21 @@ def from_package_data(cls, package_data, datafile_path, package_only=False): elif package_data: raise Exception(f'Invalid type: {package_data!r}', package_data) - package_data_mapping['datafile_paths'] = [datafile_path] package_data_mapping['datasource_ids'] = [dsid] - license_detections = package_data_mapping['license_detections'] - for detection in license_detections: - for license_match in detection['matches']: - if not license_match['from_file']: - license_match['from_file'] = datafile_path + if datafile_path: + package_data_mapping['datafile_paths'] = [datafile_path] + license_detections = package_data_mapping.get('license_detections', []) + for detection in license_detections: + for license_match in detection['matches']: + if not license_match['from_file']: + license_match['from_file'] = datafile_path package = cls.from_dict(package_data_mapping) - + if not package.package_uid: package.package_uid = build_package_uid(package.purl) - + if not package_only: package.populate_license_fields() package.populate_holder_field() diff --git a/src/packagedcode/npm.py b/src/packagedcode/npm.py index 60b37ac789b..5fa2292b34a 100644 --- a/src/packagedcode/npm.py +++ b/src/packagedcode/npm.py @@ -69,6 +69,15 @@ def logger_debug(*args): class BaseNpmHandler(models.DatafileHandler): + lockfile_names = { + 'package-lock.json', + '.package-lock.json', + 'npm-shrinkwrap.json', + 'yarn.lock', + 'shrinkwrap.yaml', + 'pnpm-lock.yaml' + } + @classmethod def assemble(cls, package_data, resource, codebase, package_adder): """ @@ -85,19 +94,11 @@ def assemble(cls, package_data, resource, codebase, package_adder): If there is no package.json, we do not have a package instance. In this case, we yield each of the dependencies in each lock file. """ - lockfile_names = { - 'package-lock.json', - '.package-lock.json', - 'npm-shrinkwrap.json', - 'yarn.lock', - 'shrinkwrap.yaml', - 'pnpm-lock.yaml' - } package_resource = None if resource.name == 'package.json': package_resource = resource - elif resource.name in lockfile_names: + elif resource.name in cls.lockfile_names: if resource.has_parent(): siblings = resource.siblings(codebase) package_resource = [r for r in siblings if r.name == 'package.json'] @@ -117,10 +118,15 @@ def assemble(cls, package_data, resource, codebase, package_adder): pkg_data = package_resource.package_data[0] pkg_data = models.PackageData.from_dict(pkg_data) - workspace_root_path = package_resource.parent(codebase).path + workspace_root = package_resource.parent(codebase) + workspace_root_path = None + if workspace_root: + workspace_root_path = package_resource.parent(codebase).path workspaces = pkg_data.extra_data.get('workspaces') or [] + # Also look for pnpm workspaces - if not workspaces: + pnpm_workspace = None + if not workspaces and workspace_root: pnpm_workspace_path = os.path.join(workspace_root_path, 'pnpm-workspace.yaml') pnpm_workspace = codebase.get_resource(path=pnpm_workspace_path) if pnpm_workspace: @@ -139,7 +145,7 @@ def assemble(cls, package_data, resource, codebase, package_adder): cls.update_workspace_members(workspace_members, codebase) # do we have enough to create a package? - if pkg_data.purl: + if pkg_data.purl and not workspaces: package = models.Package.from_package_data( package_data=pkg_data, datafile_path=package_resource.path, @@ -151,35 +157,130 @@ def assemble(cls, package_data, resource, codebase, package_adder): # Always yield the package resource in all cases and first! yield package - root = package_resource.parent(codebase) - if root: - for npm_res in cls.walk_npm(resource=root, codebase=codebase): + if workspace_root: + for npm_res in cls.walk_npm(resource=workspace_root, codebase=codebase): if package_uid and package_uid not in npm_res.for_packages: package_adder(package_uid, npm_res, codebase) yield npm_res - elif codebase.has_single_resource: - if package_uid and package_uid not in package_resource.for_packages: - package_adder(package_uid, package_resource, codebase) yield package_resource + elif workspaces: + yield from cls.create_packages_from_workspaces( + workspace_members=workspace_members, + workspace_root=workspace_root, + codebase=codebase, + package_adder=package_adder, + pnpm=pnpm_workspace and pkg_data.purl, + ) + + package_uid = None + if pnpm_workspace and pkg_data.purl: + package = models.Package.from_package_data( + package_data=pkg_data, + datafile_path=package_resource.path, + ) + package_uid = package.package_uid + + package.populate_license_fields() + + # Always yield the package resource in all cases and first! + yield package + + if workspace_root: + for npm_res in cls.walk_npm(resource=workspace_root, codebase=codebase): + if package_uid and not npm_res.for_packages: + package_adder(package_uid, npm_res, codebase) + yield npm_res + yield package_resource + else: # we have no package, so deps are not for a specific package uid package_uid = None + yield from cls.yield_npm_dependencies_and_resources( + package_resource=package_resource, + package_data=pkg_data, + package_uid=package_uid, + codebase=codebase, + package_adder=package_adder, + ) + + @classmethod + def yield_npm_dependencies_and_resources(cls, package_resource, package_data, package_uid, codebase, package_adder): + # in all cases yield possible dependencies - yield from yield_dependencies_from_package_data(pkg_data, package_resource.path, package_uid) + yield from yield_dependencies_from_package_data(package_data, package_resource.path, package_uid) # we yield this as we do not want this further processed yield package_resource for lock_file in package_resource.siblings(codebase): - if lock_file.name in lockfile_names: + if lock_file.name in cls.lockfile_names: yield from yield_dependencies_from_package_resource(lock_file, package_uid) if package_uid and package_uid not in lock_file.for_packages: package_adder(package_uid, lock_file, codebase) yield lock_file + @classmethod + def create_packages_from_workspaces( + cls, + workspace_members, + workspace_root, + codebase, + package_adder, + pnpm=False, + ): + + workspace_package_uids = [] + for workspace_member in workspace_members: + if not workspace_member.package_data: + continue + + pkg_data = workspace_member.package_data[0] + pkg_data = models.PackageData.from_dict(pkg_data) + + package = models.Package.from_package_data( + package_data=pkg_data, + datafile_path=workspace_member.path, + ) + package_uid = package.package_uid + workspace_package_uids.append(package_uid) + + package.populate_license_fields() + + # Always yield the package resource in all cases and first! + yield package + + member_root = workspace_member.parent(codebase) + package_adder(package_uid, member_root, codebase) + for npm_res in cls.walk_npm(resource=member_root, codebase=codebase): + if package_uid and package_uid not in npm_res.for_packages: + package_adder(package_uid, npm_res, codebase) + yield npm_res + + yield from cls.yield_npm_dependencies_and_resources( + package_resource=workspace_member, + package_data=pkg_data, + package_uid=package_uid, + codebase=codebase, + package_adder=package_adder, + ) + + # All resources which are not part of a workspace package exclusively + # are a part of all packages (this is skipped if we have a root pnpm + # package) + if pnpm: + return + for npm_res in cls.walk_npm(resource=workspace_root, codebase=codebase): + if npm_res.for_packages: + continue + + for package_uid in workspace_package_uids: + package_adder(package_uid, npm_res, codebase) + + npm_res.save(codebase) + @classmethod def walk_npm(cls, resource, codebase, depth=0): """ @@ -275,6 +376,18 @@ def update_dependencies_by_purl( if '_' in metadata: requirement, _extra = metadata.split('_') + if ':' in requirement and '@' in requirement: + # dependencies with requirements like this are aliases and should be reported + aliased_package, _, constraint = requirement.rpartition('@') + _, _, aliased_package_name = aliased_package.rpartition(':') + sdns, _ , sdname = aliased_package_name.rpartition('/') + dep_purl = PackageURL( + type=cls.default_package_type, + namespace=sdns, + name=sdname + ).to_string() + requirement = constraint + dep_package = models.DependentPackage( purl=dep_purl, scope=scope, @@ -325,7 +438,7 @@ def get_workspace_members(cls, workspaces, codebase, workspace_root_path): workspace_members.append(resource) # Case 3: This is a complex glob pattern, we are doing a full codebase walk - # and glob matching each resource + # and glob matching each resource else: for resource in workspace_root_path: if NpmPackageJsonHandler.is_datafile(resource.location) and fnmatch.fnmatch( @@ -370,7 +483,7 @@ def update_workspace_members(cls, workspace_members, codebase): workspace_package_versions_by_base_purl[base_purl] = version # Update workspace member package information from - # workspace level data + # workspace level data for base_purl, dependency in workspace_dependencies_by_base_purl.items(): extracted_requirement = dependency.get('extracted_requirement') if 'workspace' in extracted_requirement: @@ -912,6 +1025,13 @@ def parse(cls, location, package_only=False): if '"' in ns_name: ns_name = ns_name.replace('"', '') ns, _ , name = ns_name.rpartition('/') + + if ':' in constraint and '@' in constraint: + # dependencies with requirements like this are aliases and should be reported + aliased_package, _, constraint = constraint.rpartition('@') + _, _, aliased_package_name = aliased_package.rpartition(':') + ns, _ , name = aliased_package_name.rpartition('/') + sub_dependencies.append((ns, name, constraint,)) elif line.startswith(' ' * 2): @@ -1013,7 +1133,7 @@ def parse(cls, location, package_only=False): resolved_package=resolved_package_data.to_dict(), ) - if not dep_purl in dependencies_by_purl: + if not dep_purl in dependencies_by_purl: dependencies_by_purl[dep_purl] = dep.to_dict() else: # FIXME: We have duplicate dependencies because of aliases @@ -1077,10 +1197,11 @@ def parse(cls, location, package_only=False): _, name_version = sections elif len(sections) == 3: _, namespace, name_version = sections - + name, version = name_version.split("@") elif major_v == "5" or is_shrinkwrap: if len(sections) == 3: + namespace = None _, name, version = sections elif len(sections) == 4: _, namespace, name, version = sections @@ -1164,7 +1285,7 @@ def parse(cls, location, package_only=False): for key in extra_data_fields: value = data.get(key, None) if value is not None: - extra_data_deps[key] = value + extra_data_deps[key] = value dependency_data = models.DependentPackage( purl=purl, @@ -1662,7 +1783,7 @@ def deps_mapper(deps, package, field_name, is_direct=True): deps_by_name[npm_name] = d for fqname, requirement in deps.items(): - # Handle cases in ``resolutions`` with ``**`` + # Handle cases in ``resolutions`` with ``**`` # "resolutions": { # "**/@typescript-eslint/eslint-plugin": "^4.1.1", if fqname.startswith('**'): @@ -1670,6 +1791,13 @@ def deps_mapper(deps, package, field_name, is_direct=True): ns, name = split_scoped_package_name(fqname) if not name: continue + + if ':' in requirement and '@' in requirement: + # dependencies with requirements like this are aliases and should be reported + aliased_package, _, requirement = requirement.rpartition('@') + _, _, aliased_package_name = aliased_package.rpartition(':') + ns, _ , name = aliased_package_name.rpartition('/') + purl = PackageURL(type='npm', namespace=ns, name=name).to_string() # optionalDependencies override the dependencies with the same name diff --git a/src/packagedcode/pypi.py b/src/packagedcode/pypi.py index dcfe261d946..fec8575372e 100644 --- a/src/packagedcode/pypi.py +++ b/src/packagedcode/pypi.py @@ -18,6 +18,7 @@ import tempfile import zipfile from configparser import ConfigParser +from fnmatch import fnmatchcase from pathlib import Path from typing import NamedTuple @@ -83,6 +84,10 @@ class PythonEggPkgInfoFile(models.DatafileHandler): @classmethod def parse(cls, location, package_only=False): + """ + Parse package data from a PKG-INFO file and other manifests present in + neighboring files as needed when an installed layout is found. + """ yield parse_metadata( location=location, datasource_id=cls.datasource_id, @@ -108,6 +113,10 @@ class PythonEditableInstallationPkgInfoFile(models.DatafileHandler): @classmethod def parse(cls, location, package_only=False): + """ + Parse package data from a PKG-INFO file and other manifests present in + neighboring files as needed when an installed layout is found. + """ yield parse_metadata( location=location, datasource_id=cls.datasource_id, @@ -150,12 +159,11 @@ class BaseExtractedPythonLayout(models.DatafileHandler): def assemble(cls, package_data, resource, codebase, package_adder): # a source distribution can have many manifests datafile_name_patterns = ( - 'Pipfile.lock', - 'Pipfile', - ) + PipRequirementsFileHandler.path_patterns + PyprojectTomlHandler.path_patterns + PipfileHandler.path_patterns + PipfileLockHandler.path_patterns + + PipRequirementsFileHandler.path_patterns + PyprojectTomlHandler.path_patterns + ) - # TODO: we want PKG-INFO first, then (setup.py, setup.cfg), then pyproject.toml for poetry - # then we have the rest of the lock files (pipfile, pipfile.lock, etc.) + is_datafile_pypi = any(fnmatchcase(resource.path, pat) for pat in datafile_name_patterns) package_resource = None if resource.name == 'PKG-INFO': @@ -186,18 +194,21 @@ def assemble(cls, package_data, resource, codebase, package_adder): continue package_resource = child break - elif resource.name in datafile_name_patterns: + + elif is_datafile_pypi: if resource.has_parent(): siblings = resource.siblings(codebase) - package_resource = [r for r in siblings if r.name == 'PKG-INFO'] + package_resources = [r for r in siblings if r.name == 'PKG-INFO'] if package_resource: - package_resource = package_resource[0] + package_resource = package_resources[0] package = None if package_resource: pkg_data = package_resource.package_data[0] pkg_data = models.PackageData.from_dict(pkg_data) if pkg_data.purl: + # We yield only the package and the resource, and not dependencies because + # PKG-INFO also has the dependencies from package = create_package_from_package_data( package_data=pkg_data, datafile_path=package_resource.path @@ -207,11 +218,6 @@ def assemble(cls, package_data, resource, codebase, package_adder): package_adder(package.package_uid, package_resource, codebase) yield package_resource - yield from yield_dependencies_from_package_data( - package_data=pkg_data, - datafile_path=package_resource.path, - package_uid=package.package_uid - ) else: setup_resources = [] if resource.has_parent(): @@ -221,31 +227,50 @@ def assemble(cls, package_data, resource, codebase, package_adder): if r.name in ('setup.py', 'setup.cfg') and r.package_data ] - - setup_package_data = [ - (setup_resource, models.PackageData.from_dict(setup_resource.package_data[0])) - for setup_resource in setup_resources - ] - setup_package_data = sorted(setup_package_data, key=lambda s: bool(s[1].purl), reverse=True) - for setup_resource, setup_pkg_data in setup_package_data: - if setup_pkg_data.purl: - if not package: - package = create_package_from_package_data( + if setup_resources: + setup_package_data = [ + (setup_resource, models.PackageData.from_dict(setup_resource.package_data[0])) + for setup_resource in setup_resources + ] + setup_package_data = sorted(setup_package_data, key=lambda s: bool(s[1].purl), reverse=True) + for setup_resource, setup_pkg_data in setup_package_data: + if setup_pkg_data.purl: + if not package: + package = create_package_from_package_data( + package_data=setup_pkg_data, + datafile_path=setup_resource.path, + ) + yield package + package_resource = setup_resource + else: + package.update(setup_pkg_data, setup_resource.path) + if package: + for setup_resource, setup_pkg_data in setup_package_data: + package_adder(package.package_uid, setup_resource, codebase) + yield setup_resource + + yield from yield_dependencies_from_package_data( package_data=setup_pkg_data, datafile_path=setup_resource.path, + package_uid=package.package_uid ) - yield package - package_resource = setup_resource - else: - package.update(setup_pkg_data, setup_resource.path) - if package: - for setup_resource, setup_pkg_data in setup_package_data: - package_adder(package.package_uid, setup_resource, codebase) - yield setup_resource + else: + package_resource = resource + pkg_data = package_resource.package_data[0] + pkg_data = models.PackageData.from_dict(pkg_data) + if pkg_data.purl: + package = create_package_from_package_data( + package_data=pkg_data, + datafile_path=package_resource.path + ) + yield package + + package_adder(package.package_uid, package_resource, codebase) + yield package_resource yield from yield_dependencies_from_package_data( - package_data=setup_pkg_data, - datafile_path=setup_resource.path, + package_data=pkg_data, + datafile_path=package_resource.path, package_uid=package.package_uid ) @@ -275,12 +300,20 @@ def assemble(cls, package_data, resource, codebase, package_adder): else: package_uid = None + # Yield dependencies from sibling manifests if package_resource: for sibling in package_resource.siblings(codebase): - if sibling and sibling.name in datafile_name_patterns: + if not sibling: + continue + + is_sibling_pypi_manifest = any( + fnmatchcase(sibling.path, pat) + for pat in datafile_name_patterns + ) + if is_sibling_pypi_manifest: yield from yield_dependencies_from_package_resource( resource=sibling, - package_uid=package_uid + package_uid=package_uid, ) if package_uid and package_uid not in sibling.for_packages: @@ -981,6 +1014,10 @@ def parse_metadata(location, datasource_id, package_type, package_only=False): if license_file: extra_data['license_file'] = license_file + # FIXME: We are getting dependencies from other sibling files, this is duplicated + # data at the package_data level, is this necessary? We also have the entire dependency + # relationships here at requires.txt present in ``.egg-info`` should we store these + # nicely? dependencies = get_dist_dependencies(dist) file_references = list(get_file_references(dist)) @@ -1240,6 +1277,8 @@ def parse(cls, location, package_only=False): with open(location) as f: parser.read_file(f) + extra_data = {} + for section in parser.values(): if section.name == 'options': scope_by_sub_section = { @@ -1255,22 +1294,10 @@ def parse(cls, location, package_only=False): reqs = list(get_requirement_from_section(section=section, sub_section=sub_section)) dependent_packages.extend(cls.parse_reqs(reqs, scope)) continue + + # This is not a dependency, merely a required python version python_requires_specifier = section[sub_section] - purl = PackageURL( - type="generic", - name="python", - ) - resolved_purl = get_resolved_purl(purl=purl, specifiers=SpecifierSet(python_requires_specifier)) - dependent_packages.append( - models.DependentPackage( - purl=str(resolved_purl.purl), - scope=scope, - is_runtime=True, - is_optional=False, - is_resolved=resolved_purl.is_resolved, - extracted_requirement=f"python_requires{python_requires_specifier}", - ) - ) + extra_data["python_requires"] = python_requires_specifier if section.name == "options.extras_require": for sub_section in section: diff --git a/src/packagedcode/swift.py b/src/packagedcode/swift.py index 1fd08a00cc1..10d2d917007 100644 --- a/src/packagedcode/swift.py +++ b/src/packagedcode/swift.py @@ -47,7 +47,129 @@ def logger_debug(*args): return logger.debug(" ".join(isinstance(a, str) and a or repr(a) for a in args)) -class SwiftShowDependenciesDepLockHandler(models.DatafileHandler): +class BaseSwiftDatafileHandler(models.DatafileHandler): + @classmethod + def assemble(cls, package_data, resource, codebase, package_adder): + swift_manifest_resource = None + swift_show_dependencies_resource = None + swift_resolved_package_resource = None + processed_package = None + add_datafile_paths = [] + add_datasource_ids = [] + processed_dependencies = [] + + for r in resource.siblings(codebase): + if r.name in ("Package.swift.json", "Package.swift.deplock"): + swift_manifest_resource = r + elif r.name in ("Package.resolved", ".package.resolved"): + swift_resolved_package_resource = r + elif r.name == "swift-show-dependencies.deplock": + swift_show_dependencies_resource = r + + # If only Package.resolved is available then yield all dependency as package. + if ( + not swift_manifest_resource + and not swift_show_dependencies_resource + and resource.name in ("Package.resolved", ".package.resolved") + ): + processed_package = package_data + processed_dependencies = package_data.dependencies + # If no manifest but have dependency graph from `deplock` then use it construct top-level package. + elif ( + not swift_manifest_resource + and resource.name == "swift-show-dependencies.deplock" + ): + processed_package = package_data + processed_dependencies = package_data.dependencies + # If manifest is available then use the manifest to construct top-level package. + elif swift_manifest_resource and resource.name in ( + "Package.swift.json", + "Package.swift.deplock", + ): + processed_dependencies = package_data.dependencies + # Dependencies from `swift-show-dependencies.deplock` supersedes dependencies from other datafiles. + if swift_show_dependencies_resource: + swift_show_dependencies_package_data = models.PackageData.from_dict( + swift_show_dependencies_resource.package_data[0] + ) + processed_dependencies = ( + swift_show_dependencies_package_data.dependencies + ) + # Use dependencies from `Package.resolved` when `swift-show-dependencies.deplock` is not present. + elif swift_resolved_package_resource: + swift_resolved_package_data = ( + swift_resolved_package_resource.package_data + ) + + resolved_dependencies = [] + for package in swift_resolved_package_data: + version = package.get("version") + name = package.get("name") + + purl = PackageURL( + type=cls.default_package_type, name=name, version=version + ) + resolved_dependencies.append( + models.DependentPackage( + purl=purl.to_string(), + scope="dependencies", + is_runtime=True, + is_optional=False, + is_resolved=True, + extracted_requirement=version, + ) + ) + + for dependency in processed_dependencies[:]: + dependency_purl = PackageURL.from_string(dependency.purl) + + if dependency_purl.name == name: + processed_dependencies.remove(dependency) + + processed_dependencies.extend(resolved_dependencies) + + processed_package = package_data + if swift_show_dependencies_resource: + add_datafile_paths.append(swift_show_dependencies_resource.path) + add_datasource_ids.append( + SwiftShowDependenciesDepLockHandler.datasource_id + ) + elif swift_resolved_package_resource: + add_datafile_paths.append(swift_resolved_package_resource.path) + add_datasource_ids.append(SwiftPackageResolvedHandler.datasource_id) + + if processed_package and processed_package.purl: + package = models.Package.from_package_data( + package_data=processed_package, + datafile_path=resource.path, + ) + + package.datafile_paths.extend(add_datafile_paths) + package.datasource_ids.extend(add_datasource_ids) + + package.populate_license_fields() + yield package + + parent = resource.parent(codebase) + cls.assign_package_to_resources( + package=package, + resource=parent, + codebase=codebase, + package_adder=package_adder, + ) + + if processed_dependencies: + yield from models.Dependency.from_dependent_packages( + dependent_packages=processed_dependencies, + datafile_path=resource.path, + datasource_id=processed_package.datasource_id, + package_uid=package.package_uid, + ) + + yield resource + + +class SwiftShowDependenciesDepLockHandler(BaseSwiftDatafileHandler): datasource_id = "swift_package_show_dependencies" path_patterns = ("*/swift-show-dependencies.deplock",) default_package_type = "swift" @@ -86,32 +208,8 @@ def parse(cls, location, package_only=False): yield cls._parse(swift_dependency_relation, package_only) - @classmethod - def assemble( - cls, package_data, resource, codebase, package_adder=models.add_to_package - ): - siblings = resource.siblings(codebase) - swift_manifest_resource = [ - r - for r in siblings - if r.name in ("Package.swift.json", "Package.swift.deplock") - ] - - # Skip the assembly if the Swift manifest is present. - # SwiftManifestJsonHandler's assembly will take care of the - # dependencies from swift-show-dependencies.deplock file. - if swift_manifest_resource: - return [] - - yield from super(SwiftShowDependenciesDepLockHandler, cls).assemble( - package_data=package_data, - resource=resource, - codebase=codebase, - package_adder=package_adder, - ) - -class SwiftManifestJsonHandler(models.DatafileHandler): +class SwiftManifestJsonHandler(BaseSwiftDatafileHandler): datasource_id = "swift_package_manifest_json" path_patterns = ("*/Package.swift.json", "*/Package.swift.deplock") default_package_type = "swift" @@ -149,116 +247,8 @@ def parse(cls, location, package_only=False): yield cls._parse(swift_manifest, package_only) - @classmethod - def assemble( - cls, - package_data, - resource, - codebase, - package_adder=models.add_to_package, - ): - """ - Use the dependencies from `Package.resolved` to create the - top-level package with resolved dependencies. - """ - siblings = resource.siblings(codebase) - processed_dependencies = [] - swift_resolved_package_resource = [ - r for r in siblings if r.name == "Package.resolved" - ] - - swift_show_dependencies_resources = [ - r for r in siblings if r.name == "swift-show-dependencies.deplock" - ] - - if swift_show_dependencies_resources: - swift_show_dependencies_resource = swift_show_dependencies_resources[0] - swift_show_dependencies_package_data = ( - swift_show_dependencies_resource.package_data - ) - - # Dependencies from `swift-show-dependencies.deplock` supersede dependencies from other datafiles. - processed_dependencies = swift_show_dependencies_package_data[0][ - "dependencies" - ] - processed_dependencies = [ - models.DependentPackage.from_dict(i) for i in processed_dependencies - ] - - # Use dependencies from `Package.resolved` when `swift-show-dependencies.deplock` is not present. - else: - dependencies_from_manifest = package_data.dependencies - - if swift_resolved_package_resource: - swift_resolved_package_resource = swift_resolved_package_resource[0] - swift_resolved_package_data = ( - swift_resolved_package_resource.package_data - ) - - for package in swift_resolved_package_data: - version = package.get("version") - name = package.get("name") - - purl = PackageURL( - type=cls.default_package_type, name=name, version=version - ) - processed_dependencies.append( - models.DependentPackage( - purl=purl.to_string(), - scope="dependencies", - is_runtime=True, - is_optional=False, - is_resolved=True, - extracted_requirement=version, - ) - ) - - for dependency in dependencies_from_manifest[:]: - dependency_purl = PackageURL.from_string(dependency.purl) - - if dependency_purl.name == name: - dependencies_from_manifest.remove(dependency) - processed_dependencies.extend(dependencies_from_manifest) - - datafile_path = resource.path - if package_data.purl: - package = models.Package.from_package_data( - package_data=package_data, - datafile_path=datafile_path, - ) - - if swift_show_dependencies_resources: - package.datafile_paths.append(swift_show_dependencies_resource.path) - package.datasource_ids.append( - SwiftShowDependenciesDepLockHandler.datasource_id - ) - elif swift_resolved_package_resource: - package.datafile_paths.append(swift_resolved_package_resource.path) - package.datasource_ids.append(SwiftPackageResolvedHandler.datasource_id) - - package.populate_license_fields() - yield package - - parent = resource.parent(codebase) - cls.assign_package_to_resources( - package=package, - resource=parent, - codebase=codebase, - package_adder=package_adder, - ) - - if processed_dependencies: - yield from models.Dependency.from_dependent_packages( - dependent_packages=processed_dependencies, - datafile_path=datafile_path, - datasource_id=package_data.datasource_id, - package_uid=package.package_uid, - ) - yield resource - - -class SwiftPackageResolvedHandler(models.DatafileHandler): +class SwiftPackageResolvedHandler(BaseSwiftDatafileHandler): datasource_id = "swift_package_resolved" path_patterns = ("*/Package.resolved", "*/.package.resolved") default_package_type = "swift" @@ -282,30 +272,6 @@ def parse(cls, location, package_only=False): if resolved_doc_version == 1: yield from packages_from_resolved_v1(package_resolved) - @classmethod - def assemble( - cls, package_data, resource, codebase, package_adder=models.add_to_package - ): - siblings = resource.siblings(codebase) - swift_manifest_resource = [ - r - for r in siblings - if r.name in ("Package.swift.json", "Package.swift.deplock") - ] - - # Skip the assembly if the ``Package.swift.json`` manifest is present. - # SwiftManifestJsonHandler's assembly will take care of the resolved - # dependencies from Package.resolved file. - if swift_manifest_resource: - return [] - - yield from super(SwiftPackageResolvedHandler, cls).assemble( - package_data=package_data, - resource=resource, - codebase=codebase, - package_adder=package_adder, - ) - def packages_from_resolved_v2_and_v3(package_resolved): pinned = package_resolved.get("pins", []) diff --git a/src/scancode_config.py b/src/scancode_config.py index f6e1a52572c..e9f22a83964 100644 --- a/src/scancode_config.py +++ b/src/scancode_config.py @@ -143,8 +143,9 @@ def _create_dir(location): # on the data format version __output_format_version__ = '3.2.0' -# -spdx_license_list_version = '3.24' +# see https://github.com/spdx/tools-python/issues/820 +# this is actually `3.25.0` +spdx_license_list_version = '3.25' ################################################################################ # USAGE MODE-, INSTALLATION- and IMPORT- and RUN-SPECIFIC DIRECTORIES @@ -210,4 +211,4 @@ def _create_dir(location): scancode_temp_dir = tempfile.mkdtemp(prefix=_prefix, dir=__scancode_temp_base_dir) # Used for tests to regenerate fixtures with regen=True -REGEN_TEST_FIXTURES = os.getenv('SCANCODE_REGEN_TEST_FIXTURES', False) +REGEN_TEST_FIXTURES = SCANCODE_REGEN_TEST_FIXTURES = os.getenv('SCANCODE_REGEN_TEST_FIXTURES', False) diff --git a/src/summarycode/generated.py b/src/summarycode/generated.py index e4937eb719e..2fc913f3dfd 100644 --- a/src/summarycode/generated.py +++ b/src/summarycode/generated.py @@ -203,6 +203,9 @@ def generated_scanner(location, **kwargs): 'generated by:jjtree: do not edit this line', 'generated code (do not edit this line)', + # in some Go projects like buildkit + 'code generated by smithy-go-codegen do not edit', + )) diff --git a/src/textcode/analysis.py b/src/textcode/analysis.py index d86fd6d717f..84bea54c824 100644 --- a/src/textcode/analysis.py +++ b/src/textcode/analysis.py @@ -76,8 +76,7 @@ def numbered_text_lines( return iter([]) if not isinstance(location, str): - # not a path: wrap an iterator on location which should be a sequence - # of lines + # not a path: wrap an iterator on location which should be a sequence of lines if TRACE: logger_debug('numbered_text_lines:', 'location is not a file') return enumerate(iter(location), start_line) diff --git a/src/textcode/markup.py b/src/textcode/markup.py index 05abd25eb4d..6d28ccb3c94 100644 --- a/src/textcode/markup.py +++ b/src/textcode/markup.py @@ -8,19 +8,21 @@ # See https://aboutcode.org for more information about nexB OSS projects. # -from collections import Counter import os import re +from collections import Counter +from functools import partial + from commoncode.text import as_unicode from typecode import get_type """ -Extract text from HTML, XML and related angular markup-like files. +Extract plain text from HTML, XML and related angular markup-like files and texts. """ # Tracing flags -TRACE = False or os.environ.get('SCANCODE_DEBUG_TEXT_ANALYSIS', False) +TRACE = False or os.environ.get("SCANCODE_DEBUG_TEXT_ANALYSIS", False) # Tracing flags @@ -37,11 +39,18 @@ def logger_debug(*args): logger.setLevel(logging.DEBUG) def logger_debug(*args): - return logger.debug(' '.join(isinstance(a, str) and a or repr(a) for a in args)) + return logger.debug(" ".join(isinstance(a, str) and a or repr(a) for a in args)) -bin_dir = os.path.join(os.path.dirname(__file__), 'bin') - -extensions = ('.html', '.htm', '.php', '.phps', '.jsp', '.jspx' , '.xml', '.pom',) +extensions = ( + ".html", + ".htm", + ".php", + ".phps", + ".jsp", + ".jspx", + ".xml", + ".pom", +) def is_markup(location): @@ -61,98 +70,1903 @@ def is_markup(location): if location.endswith(extensions): return True - with open(location, 'rb') as f: + with open(location, "rb") as f: start = as_unicode(f.read(1024)) return is_markup_text(start) def is_markup_text(text): - - if text.startswith('<'): + """ + Return True if ``text`` is likely markup. + """ + if text.startswith("<"): return True # count whitespaces - no_spaces = ''.join(text.split()) + no_spaces = "".join(text.split()) # count opening and closing tags_count - counts = Counter(c for c in no_spaces if c in '<>') + counts = Counter(c for c in no_spaces if c in "<>") - if not all(c in counts for c in '<>'): + if not all(c in counts for c in "<>"): return False if not all(counts.values()): return False - # ~ 5 percent of tag <> markers + # ~ 5 percent of tag <> markers measn we have tags has_tags = sum(counts.values()) / len(no_spaces) > 0.05 # check if we have some significant proportion of tag-like characters - open_close = counts['>'] / counts['<'] + open_close = counts[">"] / counts["<"] # ratio of open to close tags should approach 1: accept a 20% drift - balanced = abs(1 - open_close) < .2 + balanced = abs(1 - open_close) < 0.2 return has_tags and balanced -def demarkup(location): +def is_kept_tag( + token, + markup_markers, + kept_markup, +): + """ + Return True if a tag should be kept, base on its tag name or content. + Always keep debian-style legacy tags and digit-only tags + """ + tlow = token.lower() + if not tlow.startswith(markup_markers): + return True + + tclean = tlow.strip("<>/").strip() + return ( + any(kp in tclean for kp in kept_markup) + or tlow in kept_markup + or starts_or_ends_with_digit(tclean) + or is_debian_tag(tlow) + ) + + +def starts_or_ends_with_digit(s): + """ + Return True if a string ``s`` starts or ends with a digit. Works with empty strings. + + >>> starts_or_ends_with_digit("foo") + False + >>> starts_or_ends_with_digit("") + False + >>> starts_or_ends_with_digit(None) + False + >>> starts_or_ends_with_digit("foo3") + True + >>> starts_or_ends_with_digit("1foo3") + True + >>> starts_or_ends_with_digit("4foo") + True + >>> starts_or_ends_with_digit("3") + True + """ + # first and last character (works even if the string is empty) + return bool(s and (s[:1].isdigit() or s[-1:].isdigit())) + + +def get_demarkuped_text(text, splitter, keeper): + """ + Return text stripped from markup. + Use ``splitter`` callable to split text in tokens. + Use ``keeper`` is a callable to tell if we should keep a tag. + """ + + tokens = splitter(text) + if TRACE: + logger_debug(f"get_demarkuped_text: {text!r}") + logger_debug(f"get_demarkuped_text: tokens: {tokens}") + + demarkuped = [] + demarkuped_append = demarkuped.append + + for token in tokens: + if keeper(token): + if token == ">": + token = "> " + demarkuped_append(token) + else: + demarkuped_append(" ") + + return " ".join("".join(demarkuped).split()) + + +def is_debian_tag(t): + """ + are from legacy Debian copyright files. + >>> is_debian_tag("") + True + >>> is_debian_tag("") + True + """ + return t in ("", "", "") + + +""" +Find start and closing tags or the first white space whichever comes first or entities. +This regex is such that ' '.join(tags.split(a))==a +""" +split_on_tags_and_entities = re.compile( + r"(" + r"" + r"|" + r"\s)?" + r"|" + r"&[^\s&]+;" + r"|" + r"href" + r"|" + r"['\"]?/>" + r"|" + r"/>" + r")", + re.IGNORECASE, +).split + +MARKUP_MARKERS = ( + "<", + ">", + "/>", + '"/>', + "'/>", + "&", + "href", +) + +KEPT_MARKUP = ( + "lic", + "copy", + "auth", + "contr", + # URLs + "www", + "http", + # legal + "leg", + # encoded copyright signs + "@", + "169", + "a9", + # in + "red", + "inc", +) + +KEEPER = partial(is_kept_tag, markup_markers=MARKUP_MARKERS, kept_markup=KEPT_MARKUP) + + +def demarkup_text(text): + """ + Return text lightly stripped from markup used in text preparation. + """ + return get_demarkuped_text(text, splitter=split_on_tags_and_entities, keeper=KEEPER) + + +def demarkup(location, stripper=demarkup_text): """ Return an iterator of unicode text lines for the file at `location` lightly stripping markup if the file is some kind of markup, such as HTML, XML, PHP, etc. The whitespaces are collapsed to one space. + + Use the ``stripper`` callable, one of demarkup_text or strip_markup_text. """ from textcode.analysis import unicode_text_lines for line in unicode_text_lines(location): if TRACE: - logger_debug(f'demarkup: {line} : demarked: {demarkup_text(line)}') - yield demarkup_text(line) - - -get_tags_and_entities = re.compile( - r'(' - r'' - r'|' - r'\s)?' - r'|' - r'&[^\s&]+;' - r'|' - r'href' - r'|' - '[\'"]?\/\>' - r'|' - r'/>' - r')', + logger_debug(f"demarkup: {line} : demarked: {demarkup(line)}") + yield stripper(line) + + +# ## Old style stripper +# this catches tags but not does not remove the text inside tags +remove_tags_legacy = re.compile( + r"<" + r"[(-\-)\?\!\%\/]?" + r"[a-gi-vx-zA-GI-VX-Z][a-zA-Z#\"\=\s\.\;\:\%\&?!,\+\*\-_\/]*" + r"[a-zA-Z0-9#\"\=\s\.\;\:\%\&?!,\+\*\-_\/]+" + r"\/?>", + re.MULTILINE | re.UNICODE, +).sub + + +def strip_markup_text_legacy(text): + """ + Strip markup tags from ``text`` using legacy approach. + """ + return remove_tags_legacy(" ", text).strip() + + +""" +Split text on tags start and end +""" +split_on_tags = re.compile( + r"(" + # a tag + # URL + r"\"\']+>" + r"|\"\']+>" + r"|< */? *[a-z]+[a-z0-9@\-\._\+]* */? *>?" + # emails + r"|mailto:" + r"|>" + r"| " + r")", re.IGNORECASE, ).split -def demarkup_text(text): +def strip_known_markup_from_text(text): """ - Return text lightly stripped from markup. The whitespaces are collapsed to - one space. + Str_ip markup tags from ``text`` using a list of tags """ + return get_demarkuped_text(text, splitter=split_on_tags, keeper=keep_tag) - # keep the opening tag name of certain tags that contains these strings - # note: are from debian copyright files - kept_tags = ( - 'lic', 'copy', 'www', 'http', 'auth', 'contr', 'leg', 'inc', '@', - '', '', '169', 'a9' - ) - # find start and closing tags or the first white space whichever comes first - # or entities. This regex is such that ' '.join(tags.split(a))==a +ALL_TAGS = frozenset( + [ + "", + "", + "", + "", + "a/>", + "/a>", + "a>", + " a>", + " a>", + "", + "", + "", + "abbr/>", + "/abbr>", + "abbr>", + " abbr>", + "", + "", + "", + "acronym/>", + "/acronym>", + "acronym>", + " acronym>", + "", + "", + "", + "address/>", + "/address>", + "address>", + " address>", + "", + "", + "", + "applet/>", + "/applet>", + "applet>", + " applet>", + "", + "", + "", + "area/>", + "/area>", + "area>", + " area>", + "", + "", + "", + "article/>", + "/article>", + "article>", + " article>", + "", + "", + "", + "aside/>", + "/aside>", + "aside>", + " aside>", + "", + "", + "", + "audio/>", + "/audio>", + "audio>", + " audio>", + "", + "", + "", + "b/>", + "/b>", + "b>", + " b>", + "", + "", + "", + "base/>", + "/base>", + "base>", + " base>", + "", + "", + "", + "basefont/>", + "/basefont>", + "basefont>", + " basefont>", + "", + "", + "", + "bdi/>", + "/bdi>", + "bdi>", + " bdi>", + "", + "", + "", + "bdo/>", + "/bdo>", + "bdo>", + " bdo>", + "", + "", + "", + "bgsound/>", + "/bgsound>", + "bgsound>", + " bgsound>", + "", + "", + "", + "big/>", + "/big>", + "big>", + " big>", + "", + "", + "", + "blink/>", + "/blink>", + "blink>", + " blink>", + "", + "", + "", + "blockquote/>", + "/blockquote>", + "blockquote>", + " blockquote>", + "", + "", + "", + "body/>", + "/body>", + "body>", + " body>", + "", + "", + "
      ", + "br/>", + "/br>", + "br>", + " br>", + "", + "", + "", + "button/>", + "/button>", + "button>", + " button>", + "", + "", + "", + "canvas/>", + "/canvas>", + "canvas>", + " canvas>", + "", + "", + "", + "caption/>", + "/caption>", + "caption>", + " caption>", + "", + "", + "", + "center/>", + "/center>", + "center>", + " center>", + "", + "", + "", + "cite/>", + "/cite>", + "cite>", + " cite>", + "", + "", + "", + "code/>", + "/code>", + "code>", + " code>", + "", + "", + "", + "col/>", + "/col>", + "col>", + " col>", + "", + "", + "", + "colgroup/>", + "/colgroup>", + "colgroup>", + " colgroup>", + "", + "", + "", + "command/>", + "/command>", + "command>", + " command>", + "", + "", + "", + "content/>", + "/content>", + "content>", + " content>", + "", + "", + "", + "data/>", + "/data>", + "data>", + " data>", + "", + "", + "", + "datalist/>", + "/datalist>", + "datalist>", + " datalist>", + "", + "", + "", + "dd/>", + "/dd>", + "dd>", + " dd>", + "", + "", + "", + "del/>", + "/del>", + "del>", + " del>", + "", + "", + "", + "details/>", + "/details>", + "details>", + " details>", + "", + "", + "", + "dfn/>", + "/dfn>", + "dfn>", + " dfn>", + "", + "", + "", + "dialog/>", + "/dialog>", + "dialog>", + " dialog>", + "", + "", + "", + "dir/>", + "/dir>", + "dir>", + " dir>", + "", + "", + "", + "div/>", + "/div>", + "div>", + " div>", + "", + "", + "", + "dl/>", + "/dl>", + "dl>", + " dl>", + "", + "", + "", + "dt/>", + "/dt>", + "dt>", + " dt>", + "", + "", + "", + "element/>", + "/element>", + "element>", + " element>", + "", + "", + "", + "em/>", + "/em>", + "em>", + " em>", + "", + "", + "", + "embed/>", + "/embed>", + "embed>", + " embed>", + "", + "", + "", + "fieldset/>", + "/fieldset>", + "fieldset>", + " fieldset>", + "", + "", + "", + "figcaption/>", + "/figcaption>", + "figcaption>", + " figcaption>", + "", + "", + "", + "figure/>", + "/figure>", + "figure>", + " figure>", + "", + "", + "", + "font/>", + "/font>", + "font>", + " font>", + "", + "", + "", + "footer/>", + "/footer>", + "footer>", + " footer>", + "", + "", + "", + "form/>", + "/form>", + "form>", + " form>", + "", + "", + "", + "frame/>", + "/frame>", + "frame>", + " frame>", + "", + "", + "", + "frameset/>", + "/frameset>", + "frameset>", + " frameset>", + "", + "", + "", + "h1/>", + "/h1>", + "h1>", + " h1>", + "", + "", + "", + "h2/>", + "/h2>", + "h2>", + " h2>", + "", + "", + "", + "h3/>", + "/h3>", + "h3>", + " h3>", + "", + "", + "", + "h4/>", + "/h4>", + "h4>", + " h4>", + "", + "", + "", + "h5/>", + "/h5>", + "h5>", + " h5>", + "", + "", + "", + "h6/>", + "/h6>", + "h6>", + " h6>", + "", + "", + "", + "head/>", + "/head>", + "head>", + " head>", + "", + "", + "", + "header/>", + "/header>", + "header>", + " header>", + "", + "", + "", + "hgroup/>", + "/hgroup>", + "hgroup>", + " hgroup>", + "", + "", + "", + "hr/>", + "/hr>", + "hr>", + " hr>", + "", + "", + "", + "html/>", + "/html>", + "html>", + " html>", + "", + "", + "", + "i/>", + "/i>", + "i>", + " i>", + "", + "", + "", + "iframe/>", + "/iframe>", + "iframe>", + " iframe>", + "", + "", + "", + "image/>", + "/image>", + "image>", + " image>", + "", + "", + "", + "img/>", + "/img>", + "img>", + " img>", + "", + "", + "", + "input/>", + "/input>", + "input>", + " input>", + "", + "", + "", + "ins/>", + "/ins>", + "ins>", + " ins>", + "", + "", + "", + "isindex/>", + "/isindex>", + "isindex>", + " isindex>", + "", + "", + "", + "kbd/>", + "/kbd>", + "kbd>", + " kbd>", + "", + "", + "", + "keygen/>", + "/keygen>", + "keygen>", + " keygen>", + "", + "", + "", + "label/>", + "/label>", + "label>", + " label>", + "", + "", + "", + "legend/>", + "/legend>", + "legend>", + " legend>", + "", + "", + "", + "li/>", + "/li>", + "li>", + " li>", + "", + "", + "", + "link/>", + "/link>", + "link>", + " link>", + "", + "", + "", + "listing/>", + "/listing>", + "listing>", + " listing>", + "", + "", + "", + "main/>", + "/main>", + "main>", + " main>", + "", + "", + "", + "map/>", + "/map>", + "map>", + " map>", + "", + "", + "", + "mark/>", + "/mark>", + "mark>", + " mark>", + "", + "", + "", + "marquee/>", + "/marquee>", + "marquee>", + " marquee>", + "", + "", + "", + "mathml/>", + "/mathml>", + "mathml>", + " mathml>", + "", + "", + "", + "menu/>", + "/menu>", + "menu>", + " menu>", + "", + "", + "", + "menuitem/>", + "/menuitem>", + "menuitem>", + " menuitem>", + "", + "", + "", + "meta/>", + "/meta>", + "meta>", + " meta>", + "", + "", + "", + "meter/>", + "/meter>", + "meter>", + " meter>", + "", + "", + "", + "multicol/>", + "/multicol>", + "multicol>", + " multicol>", + "", + "", + "", + "nav/>", + "/nav>", + "nav>", + " nav>", + "", + "", + "", + "nobr/>", + "/nobr>", + "nobr>", + " nobr>", + "", + "", + "", + "noembed/>", + "/noembed>", + "noembed>", + " noembed>", + "", + "", + "", + "noframes/>", + "/noframes>", + "noframes>", + " noframes>", + "", + "", + "", + "noscript/>", + "/noscript>", + "noscript>", + " noscript>", + "", + "", + "", + "object/>", + "/object>", + "object>", + " object>", + "", + "", + "
    ", + "ol/>", + "/ol>", + "ol>", + " ol>", + "", + "", + "", + "optgroup/>", + "/optgroup>", + "optgroup>", + " optgroup>", + "", + "", + "", + "option/>", + "/option>", + "option>", + " option>", + "", + "", + "", + "output/>", + "/output>", + "output>", + " output>", + # "

    ", + "", + "", + "", + "param/>", + "/param>", + "param>", + " param>", + "", + "", + "", + "picture/>", + "/picture>", + "picture>", + " picture>", + "", + "", + "", + "plaintext/>", + "/plaintext>", + "plaintext>", + " plaintext>", + "", + "", + "", + "pre/>", + "/pre>", + "pre>", + " pre>", + "", + "", + "", + "progress/>", + "/progress>", + "progress>", + " progress>", + "", + "", + "", + "q/>", + "/q>", + "q>", + " q>", + "", + "", + "", + "rp/>", + "/rp>", + "rp>", + " rp>", + "", + "", + "", + "rt/>", + "/rt>", + "rt>", + " rt>", + "", + "", + "", + "ruby/>", + "/ruby>", + "ruby>", + " ruby>", + "", + "", + "", + "", + "", + "", + "samp/>", + "/samp>", + "samp>", + " samp>", + "", + "", + "", + "script/>", + "/script>", + "script>", + " script>", + "", + "", + "", + "section/>", + "/section>", + "section>", + " section>", + "", + "", + "", + "select/>", + "/select>", + "select>", + " select>", + "", + "", + "", + "shadow/>", + "/shadow>", + "shadow>", + " shadow>", + "", + "", + "", + "small/>", + "/small>", + "small>", + " small>", + "", + "", + "", + "source/>", + "/source>", + "source>", + " source>", + "", + "", + "", + "spacer/>", + "/spacer>", + "spacer>", + " spacer>", + "", + "", + "", + "span/>", + "/span>", + "span>", + " span>", + "", + "", + "", + "strike/>", + "/strike>", + "strike>", + " strike>", + "", + "", + "", + "strong/>", + "/strong>", + "strong>", + " strong>", + "", + "", + "", + "style/>", + "/style>", + "style>", + " style>", + "", + "", + "", + "sub/>", + "/sub>", + "sub>", + " sub>", + "", + "", + "", + "summary/>", + "/summary>", + "summary>", + " summary>", + "", + "", + "", + "sup/>", + "/sup>", + "sup>", + " sup>", + "", + "", + "", + "svg/>", + "/svg>", + "svg>", + " svg>", + "", + "", + "", + "table/>", + "/table>", + "table>", + " table>", + "", + "", + "", + "tbody/>", + "/tbody>", + "tbody>", + " tbody>", + "", + "", + "", + "td/>", + "/td>", + "td>", + " td>", + "", + "", + "", + "template/>", + "/template>", + "template>", + " template>", + "", + "", + "", + "textarea/>", + "/textarea>", + "textarea>", + " textarea>", + "", + "", + "", + "tfoot/>", + "/tfoot>", + "tfoot>", + " tfoot>", + "", + "", + "", + "th/>", + "/th>", + "th>", + " th>", + "", + "", + "", + "thead/>", + "/thead>", + "thead>", + " thead>", + "", + "", + "", + "time/>", + "/time>", + "time>", + " time>", + "", + "", + "", + "title/>", + "/title>", + "title>", + " title>", + "", + "", + "", + "tr/>", + "/tr>", + "tr>", + " tr>", + "", + "", + "", + "track/>", + "/track>", + "track>", + " track>", + "", + "", + "", + "tt/>", + "/tt>", + "tt>", + " tt>", + "", + "", + "", + "u/>", + "/u>", + "u>", + " u>", + "", + "", + "", + "ul/>", + "/ul>", + "ul>", + " ul>", + "", + "", + "", + "var/>", + "/var>", + "var>", + " var>", + "", + "", + "", + "video/>", + "/video>", + "video>", + " video>", + "", + "", + "", + "wbr/>", + "/wbr>", + "wbr>", + " wbr>", + "", + "", + "", + "xlink/>", + "/xlink>", + "xlink>", + " xlink>", + "", + "", + "", + "xml/>", + "/xml>", + "xml>", + " xml>", + "", + "", + "", + "xml/>", + "/xml>", + "xml>", + " xml>", + "", + "", + "", + "xmlns/>", + "/xmlns>", + "xmlns>", + " xmlns>", + "", + "", + "", + "xmp/>", + "/xmp>", + "xmp>", + " xmp>", + # not XML/HTML + "", + "", + "", + "", + "", + "", + # common XML namespaces + "http://www.w3.org/1998/math/mathml", + "http://www.w3.org/1999/xhtml", + "http://www.w3.org/1999/xlink", + "http://www.w3.org/2000/svg", + "http://www.w3.org/2000/xmlns/", + "http://www.w3.org/xml/1998/namespace", + ] +) - tags_and_ents = get_tags_and_entities(text) - if TRACE: - logger_debug(f'demarkup_text: {text!r}') - logger_debug(f'demarkup_text: tags_and_ents: {tags_and_ents}') - - cleaned = [] - cleaned_append = cleaned.append - for token in tags_and_ents: - tlow = token.lower() - if tlow.startswith(('<', '/>', '"/>', "'/>", '&', 'href',)) and not any(k in tlow for k in kept_tags): - cleaned_append(' ') - else: - cleaned_append(token) - return ''.join(cleaned) + +SKIP_ATTRIBUTES = ( + "href=", + "HREF=", + "class=", + "CLASS=", + "width=", + "@end", + "@group", + "mailto:", + "xmlns=", + "xmlns:", + "xml:", + "lang=", + "": + return False + + return True diff --git a/tests/cluecode/cluecode_test_utils.py b/tests/cluecode/cluecode_test_utils.py index f39eaf1cdad..e3b0b4781bf 100644 --- a/tests/cluecode/cluecode_test_utils.py +++ b/tests/cluecode/cluecode_test_utils.py @@ -8,7 +8,6 @@ # import io -import os from itertools import chain from os import path @@ -20,10 +19,9 @@ from commoncode.testcase import get_test_file_pairs from commoncode.text import python_safe_name -from cluecode.copyrights import detect_copyrights -from cluecode.copyrights import Detection from scancode_config import REGEN_TEST_FIXTURES + """ Data-driven Copyright test utilities. """ @@ -126,57 +124,31 @@ def dump(self, check_exists=False): df.write(self.dumps()) -def load_copyright_tests(test_dir=test_env.test_data_dir, generate_missing=False): - """ - Yield an iterable of CopyrightTest loaded from test data files in `test_dir`. - If `generate_missing` is True, generate missing YAML data files with a default test template. - """ - test_dirs = [ - path.join(test_dir, td) - for td in - ('copyrights', 'ics', 'holders', 'authors', 'years', 'generated') - ] - - if generate_missing: - for td in test_dirs: - create_missing_test_data_files(test_dir=td) - - all_test_files = chain.from_iterable(get_test_file_pairs(td) for td in test_dirs) - - for data_file, test_file in all_test_files: - yield CopyrightTest(data_file, test_file) - - -empty_data_file = """what: +COPYRIGHT_TEST_TEMPLATE ="""what: - copyrights - holders - - holders_summary - authors +copyrights: + - +holders: + - """ - -def create_missing_test_data_files(test_dir): +def load_copyright_tests(test_dir=test_env.test_data_dir, generate_missing=False): """ - Create missing copyright test data files in a `test_dir` directory. - - Each test consist of a pair of files: - - a test file. - - a data file with the same name as a test file and a '.yml' extension added. + Yield an iterable of CopyrightTest loaded from test data files in `test_dir`. """ - for top, _, files in os.walk(test_dir): - for tfile in files: - if tfile.endswith('~'): - continue - file_path = path.abspath(path.join(top, tfile)) + test_dirs = (path.join(test_dir, td) for td in + ('copyrights', 'ics', 'holders', 'authors', 'years', 'generated', 'copyright_fossology')) - if tfile.endswith('.yml'): - data_file_path = file_path - else: - data_file_path = file_path + '.yml' + gen_missing_temp = generate_missing and COPYRIGHT_TEST_TEMPLATE or None + all_test_files = chain.from_iterable( + get_test_file_pairs(td, template_to_generate_missing_yaml=gen_missing_temp) + for td in test_dirs + ) - if not path.exists(data_file_path): - with open(data_file_path, "w") as tfo: - tfo.write(empty_data_file) + for data_file, test_file in all_test_files: + yield CopyrightTest(data_file, test_file) def as_sorted_mapping(counter): @@ -198,11 +170,6 @@ def by_count_value(value_count): return summarized -def get_detections(test_file): - detections = detect_copyrights(test_file) - return Detection.split_values(detections) - - def make_copyright_test_functions( test, index, @@ -214,6 +181,9 @@ def make_copyright_test_functions( name. Create only a single function for multiple tests (e.g. copyrights and holders together). """ + from cluecode.copyrights import detect_copyrights + from cluecode.copyrights import Detection + from summarycode.copyright_tallies import tally_copyrights from summarycode.copyright_tallies import tally_persons diff --git a/tests/cluecode/data/authors/author_russ_c-c.c b/tests/cluecode/data/authors/author_russ_c-c.c index 5bfc10e68af..16cd5300629 100644 --- a/tests/cluecode/data/authors/author_russ_c-c.c +++ b/tests/cluecode/data/authors/author_russ_c-c.c @@ -6,17 +6,4 @@ * Russ Dill 2001-2003 * Rewrited by Vladimir Oleynik (C) 2003 * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ \ No newline at end of file + */ diff --git a/tests/cluecode/data/authors/author_russ_c-c.c.yml b/tests/cluecode/data/authors/author_russ_c-c.c.yml index 5e8be657cf4..0a490b5ec72 100644 --- a/tests/cluecode/data/authors/author_russ_c-c.c.yml +++ b/tests/cluecode/data/authors/author_russ_c-c.c.yml @@ -4,7 +4,8 @@ what: - copyrights - holders copyrights: - - Vladimir Oleynik (c) 2003 + - Russ Dill 2001-2003 Rewrited by Vladimir Oleynik (c) + 2003 holders: - - Vladimir Oleynik + - Russ Dill Rewrited by Vladimir Oleynik notes: these are detected as copyrights, not authors diff --git a/tests/cluecode/data/copyright_fossology/testdata0.yml b/tests/cluecode/data/copyright_fossology/testdata0.yml new file mode 100644 index 00000000000..8cf5731c505 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata0.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1995 Tatu Ylonen , Espoo, Finland + - Copyright (c) 1999,2000 Markus Friedl + - Copyright (c) 1999 Aaron Campbell + - Copyright (c) 1999 Theo de Raadt +holders: + - Tatu Ylonen , Espoo, Finland + - Markus Friedl + - Aaron Campbell + - Theo de Raadt +authors: + - Tatu Ylonen diff --git a/tests/cluecode/data/copyright_fossology/testdata0_raw b/tests/cluecode/data/copyright_fossology/testdata0_raw deleted file mode 100644 index ede93a04988..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata0_raw +++ /dev/null @@ -1,195 +0,0 @@ -.\" $OpenBSD: ssh-agent.1,v 1.37 2003/03/28 10:11:43 jmc Exp $ -.\" -.\" Author: Tatu Ylonen -.\" Copyright (c) 1995 Tatu Ylonen , Espoo, Finland - All rights reserved -.\" -.\" As far as I am concerned, the code I have written for this software -.\" can be used freely for any purpose. Any derived versions of this -.\" software must be clearly marked as such, and if the derived work is -.\" incompatible with the protocol description in the RFC file, it must be -.\" called by a name other than "ssh" or "Secure Shell". -.\" -.\" Copyright (c) 1999,2000 Markus Friedl. All rights reserved. -.\" Copyright (c) 1999 Aaron Campbell. All rights reserved. -.\" Copyright (c) 1999 Theo de Raadt. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -.\" -.Dd September 25, 1999 -.Dt SSH-AGENT 1 -.Os -.Sh NAME -.Nm ssh-agent -.Nd authentication agent -.Sh SYNOPSIS -.Nm ssh-agent -.Op Fl a Ar bind_address -.Op Fl c Li | Fl s -.Op Fl t Ar life -.Op Fl d -.Op Ar command Op Ar args ... -.Nm ssh-agent -.Op Fl c Li | Fl s -.Fl k -.Sh DESCRIPTION -.Nm -is a program to hold private keys used for public key authentication -(RSA, DSA). -The idea is that -.Nm -is started in the beginning of an X-session or a login session, and -all other windows or programs are started as clients to the ssh-agent -program. -Through use of environment variables the agent can be located -and automatically used for authentication when logging in to other -machines using -.Xr ssh 1 . -.Pp -The options are as follows: -.Bl -tag -width Ds -.It Fl a Ar bind_address -Bind the agent to the unix-domain socket -.Ar bind_address . -The default is -.Pa /tmp/ssh-XXXXXXXX/agent. . -.It Fl c -Generate C-shell commands on -.Dv stdout . -This is the default if -.Ev SHELL -looks like it's a csh style of shell. -.It Fl s -Generate Bourne shell commands on -.Dv stdout . -This is the default if -.Ev SHELL -does not look like it's a csh style of shell. -.It Fl k -Kill the current agent (given by the -.Ev SSH_AGENT_PID -environment variable). -.It Fl t Ar life -Set a default value for the maximum lifetime of identities added to the agent. -The lifetime may be specified in seconds or in a time format specified in -.Xr sshd 8 . -A lifetime specified for an identity with -.Xr ssh-add 1 -overrides this value. -Without this option the default maximum lifetime is forever. -.It Fl d -Debug mode. -When this option is specified -.Nm -will not fork. -.El -.Pp -If a commandline is given, this is executed as a subprocess of the agent. -When the command dies, so does the agent. -.Pp -The agent initially does not have any private keys. -Keys are added using -.Xr ssh-add 1 . -When executed without arguments, -.Xr ssh-add 1 -adds the files -.Pa $HOME/.ssh/id_rsa , -.Pa $HOME/.ssh/id_dsa -and -.Pa $HOME/.ssh/identity . -If the identity has a passphrase, -.Xr ssh-add 1 -asks for the passphrase (using a small X11 application if running -under X11, or from the terminal if running without X). -It then sends the identity to the agent. -Several identities can be stored in the -agent; the agent can automatically use any of these identities. -.Ic ssh-add -l -displays the identities currently held by the agent. -.Pp -The idea is that the agent is run in the user's local PC, laptop, or -terminal. -Authentication data need not be stored on any other -machine, and authentication passphrases never go over the network. -However, the connection to the agent is forwarded over SSH -remote logins, and the user can thus use the privileges given by the -identities anywhere in the network in a secure way. -.Pp -There are two main ways to get an agent setup: -Either the agent starts a new subcommand into which some environment -variables are exported, or the agent prints the needed shell commands -(either -.Xr sh 1 -or -.Xr csh 1 -syntax can be generated) which can be evalled in the calling shell. -Later -.Xr ssh 1 -looks at these variables and uses them to establish a connection to the agent. -.Pp -The agent will never send a private key over its request channel. -Instead, operations that require a private key will be performed -by the agent, and the result will be returned to the requester. -This way, private keys are not exposed to clients using the agent. -.Pp -A unix-domain socket is created -and the name of this socket is stored in the -.Ev SSH_AUTH_SOCK -environment -variable. -The socket is made accessible only to the current user. -This method is easily abused by root or another instance of the same -user. -.Pp -The -.Ev SSH_AGENT_PID -environment variable holds the agent's process ID. -.Pp -The agent exits automatically when the command given on the command -line terminates. -.Sh FILES -.Bl -tag -width Ds -.It Pa $HOME/.ssh/identity -Contains the protocol version 1 RSA authentication identity of the user. -.It Pa $HOME/.ssh/id_dsa -Contains the protocol version 2 DSA authentication identity of the user. -.It Pa $HOME/.ssh/id_rsa -Contains the protocol version 2 RSA authentication identity of the user. -.It Pa /tmp/ssh-XXXXXXXX/agent. -Unix-domain sockets used to contain the connection to the -authentication agent. -These sockets should only be readable by the owner. -The sockets should get automatically removed when the agent exits. -.El -.Sh AUTHORS -OpenSSH is a derivative of the original and free -ssh 1.2.12 release by Tatu Ylonen. -Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, -Theo de Raadt and Dug Song -removed many bugs, re-added newer features and -created OpenSSH. -Markus Friedl contributed the support for SSH -protocol versions 1.5 and 2.0. -.Sh SEE ALSO -.Xr ssh 1 , -.Xr ssh-add 1 , -.Xr ssh-keygen 1 , -.Xr sshd 8 diff --git a/tests/cluecode/data/copyright_fossology/testdata1.yml b/tests/cluecode/data/copyright_fossology/testdata1.yml new file mode 100644 index 00000000000..fad4bea8e49 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata1.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008, 2009 Matthew Hall and others +holders: + - Matthew Hall and others diff --git a/tests/cluecode/data/copyright_fossology/testdata10.yml b/tests/cluecode/data/copyright_fossology/testdata10.yml new file mode 100644 index 00000000000..dc7ebec7cae --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata10.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Copyright Microsoft Corporation +holders: + - Microsoft Corporation diff --git a/tests/cluecode/data/copyright_fossology/testdata100.yml b/tests/cluecode/data/copyright_fossology/testdata100.yml new file mode 100644 index 00000000000..a633286b6f5 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata100.yml @@ -0,0 +1,22 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1997 by Eric S. Raymond + - copyrighted by Carl E. Harris, 1993 and 1995 + - copyright by Andrew Tridgell + - Copyright (c) 1996,1997 by George M. Sipe + - Copyright (c) 1997 Doug Muth, Wescosville, Pennsylvania USA +holders: + - Eric S. Raymond + - Carl E. Harris + - Andrew Tridgell + - George M. Sipe + - Doug Muth, Wescosville, Pennsylvania USA +authors: + - Paul Haggart + - Henrique M. Holschuh + - Benjamin Drieu + - Graham Wilson + - Nico Golde and Hector Garcia diff --git a/tests/cluecode/data/copyright_fossology/testdata100_raw b/tests/cluecode/data/copyright_fossology/testdata100_raw deleted file mode 100644 index 7aaf25e2d24..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata100_raw +++ /dev/null @@ -1,77 +0,0 @@ -This package was first debianized by Paul Haggart on -Mon, 18 Nov 1996 16:58:49 -0500. - -The Debian packaging was rebuilt and updated by Henrique M. Holschuh - on Mon, 12 Feb 2001 15:25:18 -0200, based on Paul's previous -work until September 2002. Thanks Paul and Henrique! - -The package was then maintained by Benjamin Drieu -Afterwards it was maintained by Graham Wilson . - -Now it is maintained by Nico Golde -and Héctor Garcia . - -It was downloaded from: http://download.berlios.de/fetchmail/ - -Please check the fetchmail homepage at: http://fetchmail.berlios.de - -The code and docs are patched extensively. All changes from default upstream -behaviour are documented in README.Debian. - -Copyright: - -The code in the fetchmail distribution is Copyright 1997 by Eric S. Raymond. -Portions were also copyrighted by Carl E. Harris, 1993 and 1995. Copyright -retained for the purpose of protecting free software redistribution. - -The support for SMB authentication is copyright by Andrew Tridgell and -is under GPL version 2. Tridge has granted a specific exemption for -his GPL-licensed code to be linked with non-GPL-compliant code in -fetchmail. The relevant files are smb*.[ch] and ntlm.h. - -The code of interface.c is Copyright (c) 1996,1997 by George M. Sipe. - -License: - -The following files are public-domain: acconfig.h, alloca.c, md5c.c, md5.h. - -The following files are MIT license: rfc822.c,idle.c. - -The file contrib/runfetchmail is: -Copyright (c) 1997 Doug Muth, Wescosville, Pennsylvania USA -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -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. 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. - -The following file is under a variant of the InnerNet Version 2 license -(with the advertising clause removed for GPL compatibility) supplied -by its author: ipv6_connect.c. - -The following files are explicitly GPL-licensed: getopt1.c, getopt.c, getopt.h, -contrib/getfetchmail.pl,contrib/mailqueue.pl,contrib/PopDel.py,contrib/poptest, -contrib/fetchmail-mode.el. - -All other code in the distribution incorporates the copy of GPL version 2 -below by reference: - -Specific permission is granted for the GPLed code in this distribition to -be linked to OpenSSL without invoking GPL clause 2(b). - -[See /usr/share/common-licenses/GPL-2 for text of GPL v2] - diff --git a/tests/cluecode/data/copyright_fossology/testdata101.yml b/tests/cluecode/data/copyright_fossology/testdata101.yml new file mode 100644 index 00000000000..0143947404c --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata101.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders + - authors +authors: + - Gerrit Pape + - Felix von Leitner diff --git a/tests/cluecode/data/copyright_fossology/testdata101_raw b/tests/cluecode/data/copyright_fossology/testdata101_raw deleted file mode 100644 index ab6ed2855c7..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata101_raw +++ /dev/null @@ -1,13 +0,0 @@ -This package was debianized by Gerrit Pape on -Mon, 16 Feb 2004. - -It was downloaded from: http://www.fefe.de/fgetty/ - -Upstream Author: Felix von Leitner - -Copyright: - -GPL2 - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in ``/usr/share/common-licenses/GPL''. diff --git a/tests/cluecode/data/copyright_fossology/testdata102.yml b/tests/cluecode/data/copyright_fossology/testdata102.yml new file mode 100644 index 00000000000..ea4d305bcc0 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata102.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1985-1995 Ian F. Darwin + - (c) 1994-2008 Christos Zoulas + - Copyright (c) 1996 Ignatios Souvatzis + - Copyright (c) 2007-2008 Daniel Baumann +holders: + - Ian F. Darwin + - Christos Zoulas + - Ignatios Souvatzis + - Daniel Baumann +authors: + - Christos Zoulas + - Ignatios Souvatzis for the NetBSD project diff --git a/tests/cluecode/data/copyright_fossology/testdata102_raw b/tests/cluecode/data/copyright_fossology/testdata102_raw deleted file mode 100644 index fdb80e0e4b7..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata102_raw +++ /dev/null @@ -1,97 +0,0 @@ -Author: Christos Zoulas -Download: ftp://ftp.astron.com/pub/file/ - -Files: * -Copyright: - (c) 1985-1995 Ian F. Darwin - (c) 1994-2008 Christos Zoulas -License: BSD - This software is not subject to any export provision of the United States - Department of Commerce, and may be exported to any country or planet. - . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - . - 1. Redistributions of source code must retain the above copyright - notice immediately at the beginning of the file, without modification, - this list of conditions, and the following disclaimer. - . - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - -Files: magic/Magdir/os9 -Copyright (c) 1996 Ignatios Souvatzis -License: BSD - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - . - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - . - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - 3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by Ignatios Souvatzis for - the NetBSD project. - . - 4. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Files: debian/* -Copyright (c) 2007-2008 Daniel Baumann -License: BSD - This software is not subject to any export provision of the United States - Department of Commerce, and may be exported to any country or planet. - . - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - . - 1. Redistributions of source code must retain the above copyright - notice immediately at the beginning of the file, without modification, - this list of conditions, and the following disclaimer. - . - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - . - THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. diff --git a/tests/cluecode/data/copyright_fossology/testdata103.yml b/tests/cluecode/data/copyright_fossology/testdata103.yml new file mode 100644 index 00000000000..8d6c63c5655 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata103.yml @@ -0,0 +1,18 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1990, 91, 92, 93, 94, 2000, 2003, 2004, 2005, 2007 Free Software Foundation, + Inc. + - Copyright (c) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, + Inc. +holders: + - Free Software Foundation, Inc. + - Free Software Foundation, Inc. +authors: + - Eric Decker + - James Youngman + - Mike Rendell + - James Woods + - Eric B. Decker Michael Rendell diff --git a/tests/cluecode/data/copyright_fossology/testdata103_raw b/tests/cluecode/data/copyright_fossology/testdata103_raw deleted file mode 100644 index 3ab42815613..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata103_raw +++ /dev/null @@ -1,78 +0,0 @@ -It was downloaded from ftp://ftp.gnu.org/gnu/findutils - -Debian maintainer history: The original package was put together by -Ian Murdock , afterwards Kevin Dalley - took over. 2003-07 Andreas Metzler - followed. - -Upstream Authors: -* GNU find was written by Eric Decker , -with enhancements by David MacKenzie , -Jay Plett , -and Tim Wood . -The idea for -print0 and xargs -0 came from -Dan Bernstein . -Improvements have been made by James Youngman . - -* GNU xargs -was originally written by Mike Rendell, with enhancements by David -MacKenzie. Modifications by James Youngman Dmitry V. Levin - -* GNU locate and its associated utilities were originally -written by James Woods, with enhancements by David MacKenzie, James Youngman -and Bas van Gompel. - -Upstream's AUTHORS lists these major contributors: -Eric B. Decker -Michael Rendell -David J. MacKenzie -Jim Meyering -Tim Wood -Kevin Dalley -Paul Eggert -James Youngman -Jay Plett -Paul Sheer -Dmitry V. Levin -Bas van Gompel -Eric Blake - -Current upstream maintainer is James Youngman . - ----------------------------- - Copyright (c) 1990, 91, 92, 93, 94, 2000, - 2003, 2004, 2005, 2007 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU 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 . ----------------------------- - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - -============================================= -DOCUMENTATION ----------------------------- -Copyright (c) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006, -2007 Free Software Foundation, Inc. - -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.2 or -any later version published by the Free Software Foundation; with no -Invariant Sections, with no Front-Cover Texts, and with no Back-Cover -Texts. A copy of the license is included in the section entitled -``GNU Free Documentation License.'' ----------------------------- - -On Debian GNU/Linux systems, the complete text of the GNU Free Documentation -License, Version 1.2 can be found in `/usr/share/common-licenses/GFDL-1.2'. diff --git a/tests/cluecode/data/copyright_fossology/testdata104.yml b/tests/cluecode/data/copyright_fossology/testdata104.yml new file mode 100644 index 00000000000..85b9f5d5281 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata104.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001,2003 Keith Packard +holders: + - Keith Packard +authors: + - Colin Walters + - Keith Packard diff --git a/tests/cluecode/data/copyright_fossology/testdata104_raw b/tests/cluecode/data/copyright_fossology/testdata104_raw deleted file mode 100644 index b84c2695b31..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata104_raw +++ /dev/null @@ -1,29 +0,0 @@ -This package was debianized by Colin Walters on -Sun, 13 Oct 2002 15:01:50 -0400 - -It was downloaded from http://www.fontconfig.org/ - -Upstream Author: Keith Packard - -Copyright: - -Copyright (c) 2001,2003 Keith Packard - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the name of Keith Packard not be used in -advertising or publicity pertaining to distribution of the software without -specific, written prior permission. Keith Packard makes no -representations about the suitability of this software for any purpose. It -is provided "as is" without express or implied warranty. - -KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/tests/cluecode/data/copyright_fossology/testdata105.yml b/tests/cluecode/data/copyright_fossology/testdata105.yml new file mode 100644 index 00000000000..85b9f5d5281 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata105.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001,2003 Keith Packard +holders: + - Keith Packard +authors: + - Colin Walters + - Keith Packard diff --git a/tests/cluecode/data/copyright_fossology/testdata105_raw b/tests/cluecode/data/copyright_fossology/testdata105_raw deleted file mode 100644 index b58b9544c06..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata105_raw +++ /dev/null @@ -1,28 +0,0 @@ -This package was debianized by Colin Walters on -Sun, 13 Oct 2002 15:01:50 -0400 - -It was downloaded from http://www.fontconfig.org/ - -Upstream Author: Keith Packard - - -Copyright (c) 2001,2003 Keith Packard - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation, and that the name of Keith Packard not be used in -advertising or publicity pertaining to distribution of the software without -specific, written prior permission. Keith Packard makes no -representations about the suitability of this software for any purpose. It -is provided "as is" without express or implied warranty. - -KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/tests/cluecode/data/copyright_fossology/testdata106.yml b/tests/cluecode/data/copyright_fossology/testdata106.yml new file mode 100644 index 00000000000..88437d2f4ee --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata106.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + - copyright Free Software Foundation + - Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com + - Copyright (c) 2000,2001,2002 Free Software Foundation, Inc. +holders: + - Free Software Foundation, Inc. + - Free Software Foundation + - Digital Mars, www.digitalmars.com + - Free Software Foundation, Inc. +authors: + - Walter Bright diff --git a/tests/cluecode/data/copyright_fossology/testdata106_raw b/tests/cluecode/data/copyright_fossology/testdata106_raw deleted file mode 100644 index 71e9113052f..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata106_raw +++ /dev/null @@ -1,668 +0,0 @@ -This is the Debian GNU/Linux prepackaged version of the GNU compiler -collection, containing Ada, C, C++, Fortran 95, Java, Objective-C, -Objective-C++, and Treelang compilers, documentation, and support -libraries. In addition, Debian provides the GNU Pascal compiler in the -same source package. Packaging is done by the Debian GCC Maintainers -, with sources obtained from: - - ftp://gcc.gnu.org/pub/gcc/releases/ (for full releases) - svn://gcc.gnu.org/svn/gcc/ (for prereleases) - http://gnu-pascal.de/alpha/ (for GNU Pascal) - http://dgcc.sourceforge.net/ (for D) - -Changes: See changelog.Debian.gz - -Debian splits the GNU Compiler Collection into packages for each language, -library, and documentation as follows: - -Language Compiler package Library package Documentation ---------------------------------------------------------------------------- -Ada gnat-4.1 libgnat-4.1 gnat-4.1-doc -C gcc-4.1 gcc-4.1-doc -C++ g++-4.1 libstdc++6 libstdc++6-4.1-doc -Fortran 95 gfortran-4.1 libgfortran1 gfortran-4.1-doc -Java gcj-4.1 libgcj7 libgcj-doc -Objective C gobjc-4.1 libobjc1 -Objective C++ gobjc++-4.1 -Pascal gpc-4.1 -D gdc-4.1 -Treelang treelang-4.1 - -For some language run-time libraries, Debian provides source files, -development files, debugging symbols and libraries containing position- -independent code in separate packages: - -Language Sources Development Debugging Position-Independent ---------------------------------------------------------------------------- -C++ libstdc++6-4.1-dbg libstdc++6-4.1-pic -Java libgcj7-src libgcj7-dev libgcj7-dbg - -Additional packages include: - -All languages: -libgcc1, libgcc2, libgcc4 GCC intrinsics (platform-dependent) -libffi4-dev, libffi4 Foreign Function Interface library -gcc-4.1-base Base files common to all compilers -gcc-4.1-soft-float Software floating point (ARM only) -gcc-4.1-source The sources with patches - -Ada: -libgnatvsn-dev, libgnatvsn4.1 GNAT version library -libgnatprj-dev, libgnatprj4.1 GNAT Project Manager library - -C: -cpp-4.1, cpp-4.1-doc GNU C Preprocessor -libmudflap0-dev, libmudflap0 Library for instrumenting pointers -libssp0-dev, libssp0 GCC stack smashing protection library -fixincludes Fix non-ANSI header files -protoize Create/remove ANSI prototypes from C code - -Java: -fastjar Jar creation utility -gij The Java bytecode interpreter and VM -libgcj-common Common files for the Java run-time -libgcj7-awt The Abstract Windowing Toolkit -libgcj7-jar Java ARchive for the Java run-time - -Biarch support: On some 64-bit platforms which can also run 32-bit code, -Debian provides additional packages containing 32-bit versions of some -libraries. These packages have names beginning with 'lib32' instead of -'lib', for example lib32stdc++6. Similarly, on some 32-bit platforms which -can also run 64-bit code, Debian provides additional packages with names -beginning with 'lib64' instead of 'lib'. These packages contain 64-bit -versions of the libraries. (At this time, not all platforms and not all -libraries support biarch.) The license terms for these lib32 or lib64 -packages are identical to the ones for the lib packages. - - -COPYRIGHT STATEMENTS AND LICENSING TERMS - - -GCC is Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -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, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License is in `/usr/share/common-licenses/GPL'. - -The libstdc++-v3 library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, you may use this file as part of a free software - library without restriction. Specifically, if other files instantiate - templates or use macros or inline functions from this file, or you compile - this file and link it with other files to produce an executable, this - file does not by itself cause the resulting executable to be covered by - the GNU General Public License. This exception does not however - invalidate any other reasons why the executable file might be covered by - the GNU General Public License. - -The libgnat-4.1 Ada support library and libgnatvsn are licensed under the -terms of the GNU General Public License, with this special exception: - - As a special exception, if other files instantiate generics from this - unit, or you link this unit with other files to produce an executable, - this unit does not by itself cause the resulting executable to be - covered by the GNU General Public License. This exception does not - however invalidate any other reasons why the executable file might be - covered by the GNU Public License. - -In contrast, libgnatprj is licensed under the terms of the pure GNU -General Public License. - -gpc is copyright Free Software Foundation, and is licensed under the -GNU General Public License which on Debian GNU/Linux systems can be -found as `/usr/share/common-licenses/GPL3'. - -The gpc runtime library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, if you link this file with files compiled - with a GNU compiler to produce an executable, this does not cause - the resulting executable to be covered by the GNU General Public - License. This exception does not however invalidate any other - reasons why the executable file might be covered by the GNU - General Public License. } - -The libgcj library is licensed under the terms of the GNU General -Public License, with a special exception: - - Linking this library statically or dynamically with other modules - is making a combined work based on this library. Thus, the terms - and conditions of the GNU General Public License cover the whole - combination. - - As a special exception, the copyright holders of this library give - you permission to link this library with independent modules to - produce an executable, regardless of the license terms of these - independent modules, and to copy and distribute the resulting - executable under terms of your choice, provided that you also - meet, for each linked independent module, the terms and conditions - of the license of that module. An independent module is a module - which is not derived from or based on this library. If you modify - this library, you may extend this exception to your version of the - library, but you are not obligated to do so. If you do not wish - to do so, delete this exception statement from your version. - -gcc/libgcc2.c (source for libgcc) has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -gcc/unwind-libunwind.c (source for libgcc) has the following addition: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The mudflap library is licensed under the terms of the GNU General -Public License, and has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -The ssp library is licensed under the terms of the GNU General -Public License, with a special exception: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The D frontend is licensend under the terms of the GNU General -Public License, either version 2 of the License, or (at your option) -any later version, which on Debian GNU/Linux systems can be found as -`/usr/share/common-licenses/GPL'. - -The D runtime library (phobos) is licensed under the following terms: - -/* - * Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com - * Written by Walter Bright - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, in both source and binary form, subject to the following - * restrictions: - * - * o The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * o Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * o This notice may not be removed or altered from any source - * distribution. - */ - -By plainly marking modifications, something along the lines of adding to each -file that has been changed a "Modified by Foo Bar" line -underneath the "Written by" line would be adequate. - - -The documentation is licensed under the GNU Free Documentation License -(v1.2), appended at the end of this file. - - -GNU Free Documentation License -****************************** - - Version 1.2, November 2002 - Copyright (c) 2000,2001,2002 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - 0. PREAMBLE - - The purpose of this License is to make a manual, textbook, or other - functional and useful document "free" in the sense of freedom: to - assure everyone the effective freedom to copy and redistribute it, - with or without modifying it, either commercially or - noncommercially. Secondarily, this License preserves for the - author and publisher a way to get credit for their work, while not - being considered responsible for modifications made by others. - - This License is a kind of "copyleft", which means that derivative - works of the document must themselves be free in the same sense. - It complements the GNU General Public License, which is a copyleft - license designed for free software. - - We have designed this License in order to use it for manuals for - free software, because free software needs free documentation: a - free program should come with manuals providing the same freedoms - that the software does. But this License is not limited to - software manuals; it can be used for any textual work, regardless - of subject matter or whether it is published as a printed book. - We recommend this License principally for works whose purpose is - instruction or reference. - - 1. APPLICABILITY AND DEFINITIONS - - This License applies to any manual or other work, in any medium, - that contains a notice placed by the copyright holder saying it - can be distributed under the terms of this License. Such a notice - grants a world-wide, royalty-free license, unlimited in duration, - to use that work under the conditions stated herein. The - "Document", below, refers to any such manual or work. Any member - of the public is a licensee, and is addressed as "you". You - accept the license if you copy, modify or distribute the work in a - way requiring permission under copyright law. - - A "Modified Version" of the Document means any work containing the - Document or a portion of it, either copied verbatim, or with - modifications and/or translated into another language. - - A "Secondary Section" is a named appendix or a front-matter section - of the Document that deals exclusively with the relationship of the - publishers or authors of the Document to the Document's overall - subject (or to related matters) and contains nothing that could - fall directly within that overall subject. (Thus, if the Document - is in part a textbook of mathematics, a Secondary Section may not - explain any mathematics.) The relationship could be a matter of - historical connection with the subject or with related matters, or - of legal, commercial, philosophical, ethical or political position - regarding them. - - The "Invariant Sections" are certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in - the notice that says that the Document is released under this - License. If a section does not fit the above definition of - Secondary then it is not allowed to be designated as Invariant. - The Document may contain zero Invariant Sections. If the Document - does not identify any Invariant Sections then there are none. - - The "Cover Texts" are certain short passages of text that are - listed, as Front-Cover Texts or Back-Cover Texts, in the notice - that says that the Document is released under this License. A - Front-Cover Text may be at most 5 words, and a Back-Cover Text may - be at most 25 words. - - A "Transparent" copy of the Document means a machine-readable copy, - represented in a format whose specification is available to the - general public, that is suitable for revising the document - straightforwardly with generic text editors or (for images - composed of pixels) generic paint programs or (for drawings) some - widely available drawing editor, and that is suitable for input to - text formatters or for automatic translation to a variety of - formats suitable for input to text formatters. A copy made in an - otherwise Transparent file format whose markup, or absence of - markup, has been arranged to thwart or discourage subsequent - modification by readers is not Transparent. An image format is - not Transparent if used for any substantial amount of text. A - copy that is not "Transparent" is called "Opaque". - - Examples of suitable formats for Transparent copies include plain - ASCII without markup, Texinfo input format, LaTeX input format, - SGML or XML using a publicly available DTD, and - standard-conforming simple HTML, PostScript or PDF designed for - human modification. Examples of transparent image formats include - PNG, XCF and JPG. Opaque formats include proprietary formats that - can be read and edited only by proprietary word processors, SGML or - XML for which the DTD and/or processing tools are not generally - available, and the machine-generated HTML, PostScript or PDF - produced by some word processors for output purposes only. - - The "Title Page" means, for a printed book, the title page itself, - plus such following pages as are needed to hold, legibly, the - material this License requires to appear in the title page. For - works in formats which do not have any title page as such, "Title - Page" means the text near the most prominent appearance of the - work's title, preceding the beginning of the body of the text. - - A section "Entitled XYZ" means a named subunit of the Document - whose title either is precisely XYZ or contains XYZ in parentheses - following text that translates XYZ in another language. (Here XYZ - stands for a specific section name mentioned below, such as - "Acknowledgements", "Dedications", "Endorsements", or "History".) - To "Preserve the Title" of such a section when you modify the - Document means that it remains a section "Entitled XYZ" according - to this definition. - - The Document may include Warranty Disclaimers next to the notice - which states that this License applies to the Document. These - Warranty Disclaimers are considered to be included by reference in - this License, but only as regards disclaiming warranties: any other - implication that these Warranty Disclaimers may have is void and - has no effect on the meaning of this License. - - 2. VERBATIM COPYING - - You may copy and distribute the Document in any medium, either - commercially or noncommercially, provided that this License, the - copyright notices, and the license notice saying this License - applies to the Document are reproduced in all copies, and that you - add no other conditions whatsoever to those of this License. You - may not use technical measures to obstruct or control the reading - or further copying of the copies you make or distribute. However, - you may accept compensation in exchange for copies. If you - distribute a large enough number of copies you must also follow - the conditions in section 3. - - You may also lend copies, under the same conditions stated above, - and you may publicly display copies. - - 3. COPYING IN QUANTITY - - If you publish printed copies (or copies in media that commonly - have printed covers) of the Document, numbering more than 100, and - the Document's license notice requires Cover Texts, you must - enclose the copies in covers that carry, clearly and legibly, all - these Cover Texts: Front-Cover Texts on the front cover, and - Back-Cover Texts on the back cover. Both covers must also clearly - and legibly identify you as the publisher of these copies. The - front cover must present the full title with all words of the - title equally prominent and visible. You may add other material - on the covers in addition. Copying with changes limited to the - covers, as long as they preserve the title of the Document and - satisfy these conditions, can be treated as verbatim copying in - other respects. - - If the required texts for either cover are too voluminous to fit - legibly, you should put the first ones listed (as many as fit - reasonably) on the actual cover, and continue the rest onto - adjacent pages. - - If you publish or distribute Opaque copies of the Document - numbering more than 100, you must either include a - machine-readable Transparent copy along with each Opaque copy, or - state in or with each Opaque copy a computer-network location from - which the general network-using public has access to download - using public-standard network protocols a complete Transparent - copy of the Document, free of added material. If you use the - latter option, you must take reasonably prudent steps, when you - begin distribution of Opaque copies in quantity, to ensure that - this Transparent copy will remain thus accessible at the stated - location until at least one year after the last time you - distribute an Opaque copy (directly or through your agents or - retailers) of that edition to the public. - - It is requested, but not required, that you contact the authors of - the Document well before redistributing any large number of - copies, to give them a chance to provide you with an updated - version of the Document. - - 4. MODIFICATIONS - - You may copy and distribute a Modified Version of the Document - under the conditions of sections 2 and 3 above, provided that you - release the Modified Version under precisely this License, with - the Modified Version filling the role of the Document, thus - licensing distribution and modification of the Modified Version to - whoever possesses a copy of it. In addition, you must do these - things in the Modified Version: - - A. Use in the Title Page (and on the covers, if any) a title - distinct from that of the Document, and from those of - previous versions (which should, if there were any, be listed - in the History section of the Document). You may use the - same title as a previous version if the original publisher of - that version gives permission. - - B. List on the Title Page, as authors, one or more persons or - entities responsible for authorship of the modifications in - the Modified Version, together with at least five of the - principal authors of the Document (all of its principal - authors, if it has fewer than five), unless they release you - from this requirement. - - C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. - - D. Preserve all the copyright notices of the Document. - - E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. - - F. Include, immediately after the copyright notices, a license - notice giving the public permission to use the Modified - Version under the terms of this License, in the form shown in - the Addendum below. - - G. Preserve in that license notice the full lists of Invariant - Sections and required Cover Texts given in the Document's - license notice. - - H. Include an unaltered copy of this License. - - I. Preserve the section Entitled "History", Preserve its Title, - and add to it an item stating at least the title, year, new - authors, and publisher of the Modified Version as given on - the Title Page. If there is no section Entitled "History" in - the Document, create one stating the title, year, authors, - and publisher of the Document as given on its Title Page, - then add an item describing the Modified Version as stated in - the previous sentence. - - J. Preserve the network location, if any, given in the Document - for public access to a Transparent copy of the Document, and - likewise the network locations given in the Document for - previous versions it was based on. These may be placed in - the "History" section. You may omit a network location for a - work that was published at least four years before the - Document itself, or if the original publisher of the version - it refers to gives permission. - - K. For any section Entitled "Acknowledgements" or "Dedications", - Preserve the Title of the section, and preserve in the - section all the substance and tone of each of the contributor - acknowledgements and/or dedications given therein. - - L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section - titles. - - M. Delete any section Entitled "Endorsements". Such a section - may not be included in the Modified Version. - - N. Do not retitle any existing section to be Entitled - "Endorsements" or to conflict in title with any Invariant - Section. - - O. Preserve any Warranty Disclaimers. - - If the Modified Version includes new front-matter sections or - appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option - designate some or all of these sections as invariant. To do this, - add their titles to the list of Invariant Sections in the Modified - Version's license notice. These titles must be distinct from any - other section titles. - - You may add a section Entitled "Endorsements", provided it contains - nothing but endorsements of your Modified Version by various - parties--for example, statements of peer review or that the text - has been approved by an organization as the authoritative - definition of a standard. - - You may add a passage of up to five words as a Front-Cover Text, - and a passage of up to 25 words as a Back-Cover Text, to the end - of the list of Cover Texts in the Modified Version. Only one - passage of Front-Cover Text and one of Back-Cover Text may be - added by (or through arrangements made by) any one entity. If the - Document already includes a cover text for the same cover, - previously added by you or by arrangement made by the same entity - you are acting on behalf of, you may not add another; but you may - replace the old one, on explicit permission from the previous - publisher that added the old one. - - The author(s) and publisher(s) of the Document do not by this - License give permission to use their names for publicity for or to - assert or imply endorsement of any Modified Version. - - 5. COMBINING DOCUMENTS - - You may combine the Document with other documents released under - this License, under the terms defined in section 4 above for - modified versions, provided that you include in the combination - all of the Invariant Sections of all of the original documents, - unmodified, and list them all as Invariant Sections of your - combined work in its license notice, and that you preserve all - their Warranty Disclaimers. - - The combined work need only contain one copy of this License, and - multiple identical Invariant Sections may be replaced with a single - copy. If there are multiple Invariant Sections with the same name - but different contents, make the title of each such section unique - by adding at the end of it, in parentheses, the name of the - original author or publisher of that section if known, or else a - unique number. Make the same adjustment to the section titles in - the list of Invariant Sections in the license notice of the - combined work. - - In the combination, you must combine any sections Entitled - "History" in the various original documents, forming one section - Entitled "History"; likewise combine any sections Entitled - "Acknowledgements", and any sections Entitled "Dedications". You - must delete all sections Entitled "Endorsements." - - 6. COLLECTIONS OF DOCUMENTS - - You may make a collection consisting of the Document and other - documents released under this License, and replace the individual - copies of this License in the various documents with a single copy - that is included in the collection, provided that you follow the - rules of this License for verbatim copying of each of the - documents in all other respects. - - You may extract a single document from such a collection, and - distribute it individually under this License, provided you insert - a copy of this License into the extracted document, and follow - this License in all other respects regarding verbatim copying of - that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - - A compilation of the Document or its derivatives with other - separate and independent documents or works, in or on a volume of - a storage or distribution medium, is called an "aggregate" if the - copyright resulting from the compilation is not used to limit the - legal rights of the compilation's users beyond what the individual - works permit. When the Document is included an aggregate, this - License does not apply to the other works in the aggregate which - are not themselves derivative works of the Document. - - If the Cover Text requirement of section 3 is applicable to these - copies of the Document, then if the Document is less than one half - of the entire aggregate, the Document's Cover Texts may be placed - on covers that bracket the Document within the aggregate, or the - electronic equivalent of covers if the Document is in electronic - form. Otherwise they must appear on printed covers that bracket - the whole aggregate. - - 8. TRANSLATION - - Translation is considered a kind of modification, so you may - distribute translations of the Document under the terms of section - 4. Replacing Invariant Sections with translations requires special - permission from their copyright holders, but you may include - translations of some or all Invariant Sections in addition to the - original versions of these Invariant Sections. You may include a - translation of this License, and all the license notices in the - Document, and any Warrany Disclaimers, provided that you also - include the original English version of this License and the - original versions of those notices and disclaimers. In case of a - disagreement between the translation and the original version of - this License or a notice or disclaimer, the original version will - prevail. - - If a section in the Document is Entitled "Acknowledgements", - "Dedications", or "History", the requirement (section 4) to - Preserve its Title (section 1) will typically require changing the - actual title. - - 9. TERMINATION - - You may not copy, modify, sublicense, or distribute the Document - except as expressly provided for under this License. Any other - attempt to copy, modify, sublicense or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - - The Free Software Foundation may publish new, revised versions of - the GNU Free Documentation License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. See - `http://www.gnu.org/copyleft/'. - - Each version of the License is given a distinguishing version - number. If the Document specifies that a particular numbered - version of this License "or any later version" applies to it, you - have the option of following the terms and conditions either of - that specified version or of any later version that has been - published (not as a draft) by the Free Software Foundation. If - the Document does not specify a version number of this License, - you may choose any version ever published (not as a draft) by the - Free Software Foundation. - -ADDENDUM: How to use this License for your documents -==================================================== - - To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and license -notices just after the title page: - - Copyright (c) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 - or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled ``GNU - Free Documentation License''. - - If you have Invariant Sections, Front-Cover Texts and Back-Cover -Texts, replace the "with...Texts." line with this: - - with the Invariant Sections being LIST THEIR TITLES, with - the Front-Cover Texts being LIST, and with the Back-Cover Texts - being LIST. - - If you have Invariant Sections without Cover Texts, or some other -combination of the three, merge those two alternatives to suit the -situation. - - If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, to -permit their use in free software. diff --git a/tests/cluecode/data/copyright_fossology/testdata107.yml b/tests/cluecode/data/copyright_fossology/testdata107.yml new file mode 100644 index 00000000000..b31b1187d41 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata107.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + - copyright Free Software Foundation + - Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com + - Copyright (c) 1996-2003 Red Hat, Inc. +holders: + - Free Software Foundation, Inc. + - Free Software Foundation + - Digital Mars, www.digitalmars.com + - Red Hat, Inc. +authors: + - Walter Bright diff --git a/tests/cluecode/data/copyright_fossology/testdata107_raw b/tests/cluecode/data/copyright_fossology/testdata107_raw deleted file mode 100644 index 72272cdb1a7..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata107_raw +++ /dev/null @@ -1,273 +0,0 @@ -This is the Debian GNU/Linux prepackaged version of the GNU compiler -collection, containing Ada, C, C++, Fortran 95, Java, Objective-C, -Objective-C++, and Treelang compilers, documentation, and support -libraries. In addition, Debian provides the GNU Pascal compiler in the -same source package. Packaging is done by the Debian GCC Maintainers -, with sources obtained from: - - ftp://gcc.gnu.org/pub/gcc/releases/ (for full releases) - svn://gcc.gnu.org/svn/gcc/ (for prereleases) - http://gnu-pascal.de/alpha/ (for GNU Pascal) - http://dgcc.sourceforge.net/ (for D) - -The current gcc-4.3 source package is taken from the SVN trunk. - -Changes: See changelog.Debian.gz - -Debian splits the GNU Compiler Collection into packages for each language, -library, and documentation as follows: - -Language Compiler package Library package Documentation ---------------------------------------------------------------------------- -Ada gnat-4.3 libgnat-4.3 gnat-4.3-doc -C gcc-4.3 gcc-4.3-doc -C++ g++-4.3 libstdc++6 libstdc++6-4.3-doc -D gdc-4.3 -Fortran 95 gfortran-4.3 libgfortran3 gfortran-4.3-doc -Java gcj-4.3 libgcj9 libgcj-doc -Objective C gobjc-4.3 libobjc2 -Objective C++ gobjc++-4.3 -Pascal gpc-4.3 -Treelang treelang-4.3 - -For some language run-time libraries, Debian provides source files, -development files, debugging symbols and libraries containing position- -independent code in separate packages: - -Language Sources Development Debugging Position-Independent ---------------------------------------------------------------------------- -C++ libstdc++6-4.3-dbg libstdc++6-4.3-pic -Java libgcj9-src libgcj9-dev libgcj9-dbg - -Additional packages include: - -All languages: -libgcc1, libgcc2, libgcc4 GCC intrinsics (platform-dependent) -gcc-4.3-base Base files common to all compilers -gcc-4.3-soft-float Software floating point (ARM only) -gcc-4.3-source The sources with patches - -Ada: -libgnatvsn-dev, libgnatvsn4.3 GNAT version library -libgnatprj-dev, libgnatprj4.3 GNAT Project Manager library - -C: -cpp-4.3, cpp-4.3-doc GNU C Preprocessor -libmudflap0-dev, libmudflap0 Library for instrumenting pointers -libssp0-dev, libssp0 GCC stack smashing protection library -fixincludes Fix non-ANSI header files -protoize Create/remove ANSI prototypes from C code - -Java: -gij The Java bytecode interpreter and VM -libgcj-common Common files for the Java run-time -libgcj8-awt The Abstract Windowing Toolkit -libgcj8-jar Java ARchive for the Java run-time - -C, C++ and Fortran 95: -libgomp1-dev, libgomp1 GCC OpenMP (GOMP) support library - -Biarch support: On some 64-bit platforms which can also run 32-bit code, -Debian provides additional packages containing 32-bit versions of some -libraries. These packages have names beginning with 'lib32' instead of -'lib', for example lib32stdc++6. Similarly, on some 32-bit platforms which -can also run 64-bit code, Debian provides additional packages with names -beginning with 'lib64' instead of 'lib'. These packages contain 64-bit -versions of the libraries. (At this time, not all platforms and not all -libraries support biarch.) The license terms for these lib32 or lib64 -packages are identical to the ones for the lib packages. - - -COPYRIGHT STATEMENTS AND LICENSING TERMS - - -GCC is Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -2008 Free Software Foundation, Inc. - -GCC 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, or (at your option) any later -version. - -GCC 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. - -Files that have exception clauses are licensed under the terms of the -GNU General Public License; either version 2, or (at your option) any -later version. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License is in `/usr/share/common-licenses/GPL', version 2 of this -license in `/usr/share/common-licenses/GPL-2'. - -The libstdc++-v3 library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, you may use this file as part of a free software - library without restriction. Specifically, if other files instantiate - templates or use macros or inline functions from this file, or you compile - this file and link it with other files to produce an executable, this - file does not by itself cause the resulting executable to be covered by - the GNU General Public License. This exception does not however - invalidate any other reasons why the executable file might be covered by - the GNU General Public License. - -The libgnat-4.3 Ada support library and libgnatvsn are licensed under the -terms of the GNU General Public License, with this special exception: - - As a special exception, if other files instantiate generics from this - unit, or you link this unit with other files to produce an executable, - this unit does not by itself cause the resulting executable to be - covered by the GNU General Public License. This exception does not - however invalidate any other reasons why the executable file might be - covered by the GNU Public License. - -In contrast, libgnatprj is licensed under the terms of the pure GNU -General Public License. - -gpc is copyright Free Software Foundation, and is licensed under the -GNU General Public License which on Debian GNU/Linux systems can be -found as `/usr/share/common-licenses/GPL'. - -The gpc runtime library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, if you link this file with files compiled - with a GNU compiler to produce an executable, this does not cause - the resulting executable to be covered by the GNU General Public - License. This exception does not however invalidate any other - reasons why the executable file might be covered by the GNU - General Public License. } - -The libgcj library is licensed under the terms of the GNU General -Public License, with a special exception: - - Linking this library statically or dynamically with other modules - is making a combined work based on this library. Thus, the terms - and conditions of the GNU General Public License cover the whole - combination. - - As a special exception, the copyright holders of this library give - you permission to link this library with independent modules to - produce an executable, regardless of the license terms of these - independent modules, and to copy and distribute the resulting - executable under terms of your choice, provided that you also - meet, for each linked independent module, the terms and conditions - of the license of that module. An independent module is a module - which is not derived from or based on this library. If you modify - this library, you may extend this exception to your version of the - library, but you are not obligated to do so. If you do not wish - to do so, delete this exception statement from your version. - -gcc/libgcc2.c (source for libgcc) has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -gcc/unwind-libunwind.c (source for libgcc) has the following addition: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The mudflap library is licensed under the terms of the GNU General -Public License, and has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -The ssp library is licensed under the terms of the GNU General -Public License, with a special exception: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The D frontend is licensend under the terms of the GNU General -Public License, either version 2 of the License, or (at your option) -any later version, which on Debian GNU/Linux systems can be found as -`/usr/share/common-licenses/GPL'. - -The D runtime library (phobos) is licensed under the following terms: - -/* - * Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com - * Written by Walter Bright - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, in both source and binary form, subject to the following - * restrictions: - * - * o The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * o Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * o This notice may not be removed or altered from any source - * distribution. - */ - -The Libgomp library is licensed under the terms of the GNU Lesser -General Public License, with a special exception: - - As a special exception, if you link this library with other files, some - of which are compiled with GCC, to produce an executable, this library - does not by itself cause the resulting executable to be covered by the - GNU General Public License. This exception does not however invalidate - any other reasons why the executable file might be covered by the GNU - General Public License. - -The libffi library is licensed under the following terms: - - libffi - Copyright (c) 1996-2003 Red Hat, Inc. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - ``Software''), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - 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. - IN NO EVENT SHALL CYGNUS SOLUTIONS 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. - - -The documentation is licensed under the GNU Free Documentation License (v1.2). -On Debian GNU/Linux systems, the complete text of this license is in -`/usr/share/common-licenses/GFDL-1.2'. diff --git a/tests/cluecode/data/copyright_fossology/testdata108.yml b/tests/cluecode/data/copyright_fossology/testdata108.yml new file mode 100644 index 00000000000..f9c5616fb6f --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata108.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2000-2005 Bharat Mediratta +holders: + - Bharat Mediratta +authors: + - Michael C. Schultheiss diff --git a/tests/cluecode/data/copyright_fossology/testdata108_raw b/tests/cluecode/data/copyright_fossology/testdata108_raw deleted file mode 100644 index 3c3f9832b3f..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata108_raw +++ /dev/null @@ -1,21 +0,0 @@ -This package was debianized by Michael C. Schultheiss on -Sun, 12 Jun 2005 01:39:52 +0000. - -It was downloaded from http://gallery.sourceforge.net - -Copyright Copyright 2000-2005 Bharat Mediratta - -License: - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the Free -Software Foundation; either version 2 of the License, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -more details. - -On Debian systems, the complete text of the GNU General Public License can -be found in /usr/share/common-licenses/GPL file. diff --git a/tests/cluecode/data/copyright_fossology/testdata109.yml b/tests/cluecode/data/copyright_fossology/testdata109.yml new file mode 100644 index 00000000000..9e625e78fd8 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata109.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1989-2006 Free Software Foundation + - Copyright (c) 1995-1997 Chris Fearnley + - Copyright (c) 1998-2006 James Troup +holders: + - Free Software Foundation + - Chris Fearnley + - James Troup +authors: + - Diane Barlow Close, Arnold D. Robbins, Paul H. Rubin and Richard Stallman + - Chris Fearnley + - Ian Murdock + - James Troup diff --git a/tests/cluecode/data/copyright_fossology/testdata109_raw b/tests/cluecode/data/copyright_fossology/testdata109_raw deleted file mode 100644 index f3bf616eea7..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata109_raw +++ /dev/null @@ -1,31 +0,0 @@ -This is the Debian GNU prepackaged version of Gawk, a pattern -scanning and processing language. Gawk was written by Diane Barlow -Close, Arnold D. Robbins, Paul H. Rubin and Richard Stallman. - -This package was put together by Chris Fearnley (debian.* -files were originally prepared by Ian Murdock ), -from sources obtained from: - -ftp://ftp.gnu.org/pub/gnu/gawk/gawk-3.1.5.tar.gz - -It is currently being maintained by James Troup . - -Gawk is Copyright (c) 1989-2006 Free Software Foundation. -Modifications for Debian GNU Copyright (c) 1995-1997 Chris Fearnley. -Modifications for Debian GNU Copyright (c) 1998-2006 James Troup. - - 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; version 2 dated June, 1991. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian GNU systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/tests/cluecode/data/copyright_fossology/testdata10_raw b/tests/cluecode/data/copyright_fossology/testdata10_raw deleted file mode 100644 index f22123f2708..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata10_raw +++ /dev/null @@ -1,290 +0,0 @@ -// (c) Copyright Microsoft Corporation. -// This source is subject to the Microsoft Public License (Ms-PL). -// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details. -// All other rights reserved. - -using System; -using System.Collections; -using System.ComponentModel; -using System.Diagnostics.CodeAnalysis; -using System.Globalization; - -namespace Microsoft.Silverlight.Testing.Html -{ - ///

    - /// Represents the font properties for text. This class cannot be inherited. - /// - public class FontInfo - { - /// - /// The owning control of this font information. - /// - private HtmlControlBase _owner; - - /// - /// Initializes a FontInfo object. - /// - /// The owning Control reference. - public FontInfo(HtmlControlBase owner) - { - _owner = owner; - } - - /// - /// Set a value on the owning HtmlElement. - /// - /// The CSS property. - /// The value. - private void SetCssValue(CssAttribute property, string val) - { - _owner.SetStyleAttribute(property, val); - } - - /// - /// Gets a CSS value. - /// - /// The property name. - /// Returns the actual value as a string. - private string GetCssValue(CssAttribute property) - { - string val = null; - try - { - string str = _owner.GetStyleAttribute(property); - val = str; - } - catch (ArgumentException) - { - } - return val; - } - - /// - /// Gets or sets a value indicating whether the text is bold. - /// - public bool Bold - { - get - { - return "bold" == GetCssValue(CssAttribute.FontWeight); - } - - set - { - SetCssValue(CssAttribute.FontWeight, value == true ? "bold" : "normal"); - } - } - - /// - /// Gets or sets a value indicating whether the text is italic. - /// - public bool Italic - { - get - { - return "italic" == GetCssValue(CssAttribute.FontStyle); - } - - set - { - SetCssValue(CssAttribute.FontStyle, value == true ? "italic" : "normal"); - } - } - - /// - /// Gets or sets the name of the font. - /// - public string Name - { - get - { - string[] names = Names; - if (names.Length > 0) - { - return names[0]; - } - return String.Empty; - } - set - { - if (value == null) - { - throw new ArgumentNullException("value"); - } - if (value.Length == 0) - { - Names = null; - } - else - { - Names = new string[1] { value }; - } - } - } - - /// - /// Gets or sets the font names. - /// - [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "The type converter must return a string []")] - [TypeConverterAttribute(typeof(FontNamesConverter))] - public string[] Names - { - get - { - FontNamesConverter convert = new FontNamesConverter(); - string fontNames = GetCssValue(CssAttribute.FontFamily); - return String.IsNullOrEmpty(fontNames) ? new string[0] : (string[])convert.ConvertFromString(fontNames); - } - - set - { - FontNamesConverter convert = new FontNamesConverter(); - string singleString = (string)convert.ConvertTo(value, typeof(string)); - SetCssValue(CssAttribute.FontFamily, singleString); - } - } - - // [DefaultValue(typeof(FontUnit), "")] - - /// - /// Gets or sets the font size. - /// - public FontUnit Size - { - get - { - string fs = GetCssValue(CssAttribute.FontSize); - if (!String.IsNullOrEmpty(fs)) - { - FontUnit fontUnit = FontUnit.Parse(fs, CultureInfo.InvariantCulture); - return fontUnit; - } - return FontUnit.Empty; - } - - set - { - if ((value.Type == FontSize.AsUnit) && (value.Unit.Value < 0)) - { - throw new ArgumentOutOfRangeException("value"); - } - - SetCssValue(CssAttribute.FontSize, value.ToString()); - } - } - - // [DefaultValue(false)] - - /// - /// Gets or sets a value indicating whether the text has a line through it. - /// - public bool Strikeout - { - get - { - return "line-through" == GetCssValue(CssAttribute.TextDecoration); - } - - set - { - // one-way setter - if (value) - { - SetCssValue(CssAttribute.TextDecoration, "line-through"); - } - } - } - - /// - /// Gets or sets a value indicating whether the text is underlined. - /// - public bool Underline - { - get - { - return "underline" == GetCssValue(CssAttribute.TextDecoration); - } - - set - { - if (value) - { - SetCssValue(CssAttribute.TextDecoration, "underline"); - } - else - { - SetCssValue(CssAttribute.TextDecoration, "none"); - } - } - } - - /// - /// Copies the font properties of another FontInfo into this instance. - /// - /// Object to copy from. - public void CopyFrom(FontInfo font) - { - if (font != null) - { - Names = font.Names; - Size = font.Size; - Bold = font.Bold; - Italic = font.Italic; - Strikeout = font.Strikeout; - Underline = font.Underline; - } - } - - /// - /// Copies the font properties of another FontInfo into this instance. - /// - /// Object to copy from. - public void CopyFontNamesAndSizeFrom(FontInfo info) - { - if (info != null) - { - Names = info.Names; - Size = info.Size; - } - } - - /// - /// Combines the font properties of another FontInfo with this instance. - /// - /// Object to merge values with. - public void MergeWith(FontInfo font) - { - if (font != null) - { - Names = font.Names; - Size = font.Size; - Bold = font.Bold; - Italic = font.Italic; - Strikeout = font.Strikeout; - Underline = font.Underline; - } - } - - /// - /// The string value of the FontInfo instance. - /// - /// Returns a string. - public override string ToString() - { - string size = this.Size.ToString(); - string s = this.Name; - if (size.Length != 0) - { - if (s.Length != 0) - { - s += ", " + size; - } - else - { - s = size; - } - } - return s; - } - } -} diff --git a/tests/cluecode/data/copyright_fossology/testdata11.yml b/tests/cluecode/data/copyright_fossology/testdata11.yml new file mode 100644 index 00000000000..672dcf936fa --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata11.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005 Samuel Tardieu +holders: + - Samuel Tardieu diff --git a/tests/cluecode/data/copyright_fossology/testdata110.yml b/tests/cluecode/data/copyright_fossology/testdata110.yml new file mode 100644 index 00000000000..88437d2f4ee --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata110.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + - copyright Free Software Foundation + - Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com + - Copyright (c) 2000,2001,2002 Free Software Foundation, Inc. +holders: + - Free Software Foundation, Inc. + - Free Software Foundation + - Digital Mars, www.digitalmars.com + - Free Software Foundation, Inc. +authors: + - Walter Bright diff --git a/tests/cluecode/data/copyright_fossology/testdata110_raw b/tests/cluecode/data/copyright_fossology/testdata110_raw deleted file mode 100644 index c58fda6c7fd..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata110_raw +++ /dev/null @@ -1,668 +0,0 @@ -This is the Debian GNU/Linux prepackaged version of the GNU compiler -collection, containing Ada, C, C++, Fortran 95, Java, Objective-C, -Objective-C++, and Treelang compilers, documentation, and support -libraries. In addition, Debian provides the GNU Pascal compiler in the -same source package. Packaging is done by the Debian GCC Maintainers -, with sources obtained from: - - ftp://gcc.gnu.org/pub/gcc/releases/ (for full releases) - svn://gcc.gnu.org/svn/gcc/ (for prereleases) - http://gnu-pascal.de/alpha/ (for GNU Pascal) - http://dgcc.sourceforge.net/ (for D) - -Changes: See changelog.Debian.gz - -Debian splits the GNU Compiler Collection into packages for each language, -library, and documentation as follows: - -Language Compiler package Library package Documentation ---------------------------------------------------------------------------- -Ada gnat-4.1 libgnat-4.1 gnat-4.1-doc -C gcc-4.1 gcc-4.1-doc -C++ g++-4.1 libstdc++6 libstdc++6-4.1-doc -Fortran 95 gfortran-4.1 libgfortran1 gfortran-4.1-doc -Java gcj-4.1 libgcj7 libgcj-doc -Objective C gobjc-4.1 libobjc1 -Objective C++ gobjc++-4.1 -Pascal gpc-4.1 -D gdc-4.1 -Treelang treelang-4.1 - -For some language run-time libraries, Debian provides source files, -development files, debugging symbols and libraries containing position- -independent code in separate packages: - -Language Sources Development Debugging Position-Independent ---------------------------------------------------------------------------- -C++ libstdc++6-4.1-dbg libstdc++6-4.1-pic -Java libgcj7-src libgcj7-dev libgcj7-dbg - -Additional packages include: - -All languages: -libgcc1, libgcc2, libgcc4 GCC intrinsics (platform-dependent) -libffi4-dev, libffi4 Foreign Function Interface library -gcc-4.1-base Base files common to all compilers -gcc-4.1-soft-float Software floating point (ARM only) -gcc-4.1-source The sources with patches - -Ada: -libgnatvsn-dev, libgnatvsn4.1 GNAT version library -libgnatprj-dev, libgnatprj4.1 GNAT Project Manager library - -C: -cpp-4.1, cpp-4.1-doc GNU C Preprocessor -libmudflap0-dev, libmudflap0 Library for instrumenting pointers -libssp0-dev, libssp0 GCC stack smashing protection library -fixincludes Fix non-ANSI header files -protoize Create/remove ANSI prototypes from C code - -Java: -fastjar Jar creation utility -gij The Java bytecode interpreter and VM -libgcj-common Common files for the Java run-time -libgcj7-awt The Abstract Windowing Toolkit -libgcj7-jar Java ARchive for the Java run-time - -Biarch support: On some 64-bit platforms which can also run 32-bit code, -Debian provides additional packages containing 32-bit versions of some -libraries. These packages have names beginning with 'lib32' instead of -'lib', for example lib32stdc++6. Similarly, on some 32-bit platforms which -can also run 64-bit code, Debian provides additional packages with names -beginning with 'lib64' instead of 'lib'. These packages contain 64-bit -versions of the libraries. (At this time, not all platforms and not all -libraries support biarch.) The license terms for these lib32 or lib64 -packages are identical to the ones for the lib packages. - - -COPYRIGHT STATEMENTS AND LICENSING TERMS - - -GCC is Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -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, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License is in `/usr/share/common-licenses/GPL'. - -The libstdc++-v3 library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, you may use this file as part of a free software - library without restriction. Specifically, if other files instantiate - templates or use macros or inline functions from this file, or you compile - this file and link it with other files to produce an executable, this - file does not by itself cause the resulting executable to be covered by - the GNU General Public License. This exception does not however - invalidate any other reasons why the executable file might be covered by - the GNU General Public License. - -The libgnat-4.1 Ada support library and libgnatvsn are licensed under the -terms of the GNU General Public License, with this special exception: - - As a special exception, if other files instantiate generics from this - unit, or you link this unit with other files to produce an executable, - this unit does not by itself cause the resulting executable to be - covered by the GNU General Public License. This exception does not - however invalidate any other reasons why the executable file might be - covered by the GNU Public License. - -In contrast, libgnatprj is licensed under the terms of the pure GNU -General Public License. - -gpc is copyright Free Software Foundation, and is licensed under the -GNU General Public License which on Debian GNU/Linux systems can be -found as `/usr/share/common-licenses/GPL3'. - -The gpc runtime library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, if you link this file with files compiled - with a GNU compiler to produce an executable, this does not cause - the resulting executable to be covered by the GNU General Public - License. This exception does not however invalidate any other - reasons why the executable file might be covered by the GNU - General Public License. } - -The libgcj library is licensed under the terms of the GNU General -Public License, with a special exception: - - Linking this library statically or dynamically with other modules - is making a combined work based on this library. Thus, the terms - and conditions of the GNU General Public License cover the whole - combination. - - As a special exception, the copyright holders of this library give - you permission to link this library with independent modules to - produce an executable, regardless of the license terms of these - independent modules, and to copy and distribute the resulting - executable under terms of your choice, provided that you also - meet, for each linked independent module, the terms and conditions - of the license of that module. An independent module is a module - which is not derived from or based on this library. If you modify - this library, you may extend this exception to your version of the - library, but you are not obligated to do so. If you do not wish - to do so, delete this exception statement from your version. - -gcc/libgcc2.c (source for libgcc) has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -gcc/unwind-libunwind.c (source for libgcc) has the following addition: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The mudflap library is licensed under the terms of the GNU General -Public License, and has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -The ssp library is licensed under the terms of the GNU General -Public License, with a special exception: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The D frontend is licensend under the terms of the GNU General -Public License, either version 2 of the License, or (at your option) -any later version, which on Debian GNU/Linux systems can be found as -`/usr/share/common-licenses/GPL'. - -The D runtime library (phobos) is licensed under the following terms: - -/* - * Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com - * Written by Walter Bright - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, in both source and binary form, subject to the following - * restrictions: - * - * o The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * o Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * o This notice may not be removed or altered from any source - * distribution. - */ - -By plainly marking modifications, something along the lines of adding to each -file that has been changed a "Modified by Foo Bar" line -underneath the "Written by" line would be adequate. - - -The documentation is licensed under the GNU Free Documentation License -(v1.2), appended at the end of this file. - - -GNU Free Documentation License -****************************** - - Version 1.2, November 2002 - Copyright (c) 2000,2001,2002 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - 0. PREAMBLE - - The purpose of this License is to make a manual, textbook, or other - functional and useful document "free" in the sense of freedom: to - assure everyone the effective freedom to copy and redistribute it, - with or without modifying it, either commercially or - noncommercially. Secondarily, this License preserves for the - author and publisher a way to get credit for their work, while not - being considered responsible for modifications made by others. - - This License is a kind of "copyleft", which means that derivative - works of the document must themselves be free in the same sense. - It complements the GNU General Public License, which is a copyleft - license designed for free software. - - We have designed this License in order to use it for manuals for - free software, because free software needs free documentation: a - free program should come with manuals providing the same freedoms - that the software does. But this License is not limited to - software manuals; it can be used for any textual work, regardless - of subject matter or whether it is published as a printed book. - We recommend this License principally for works whose purpose is - instruction or reference. - - 1. APPLICABILITY AND DEFINITIONS - - This License applies to any manual or other work, in any medium, - that contains a notice placed by the copyright holder saying it - can be distributed under the terms of this License. Such a notice - grants a world-wide, royalty-free license, unlimited in duration, - to use that work under the conditions stated herein. The - "Document", below, refers to any such manual or work. Any member - of the public is a licensee, and is addressed as "you". You - accept the license if you copy, modify or distribute the work in a - way requiring permission under copyright law. - - A "Modified Version" of the Document means any work containing the - Document or a portion of it, either copied verbatim, or with - modifications and/or translated into another language. - - A "Secondary Section" is a named appendix or a front-matter section - of the Document that deals exclusively with the relationship of the - publishers or authors of the Document to the Document's overall - subject (or to related matters) and contains nothing that could - fall directly within that overall subject. (Thus, if the Document - is in part a textbook of mathematics, a Secondary Section may not - explain any mathematics.) The relationship could be a matter of - historical connection with the subject or with related matters, or - of legal, commercial, philosophical, ethical or political position - regarding them. - - The "Invariant Sections" are certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in - the notice that says that the Document is released under this - License. If a section does not fit the above definition of - Secondary then it is not allowed to be designated as Invariant. - The Document may contain zero Invariant Sections. If the Document - does not identify any Invariant Sections then there are none. - - The "Cover Texts" are certain short passages of text that are - listed, as Front-Cover Texts or Back-Cover Texts, in the notice - that says that the Document is released under this License. A - Front-Cover Text may be at most 5 words, and a Back-Cover Text may - be at most 25 words. - - A "Transparent" copy of the Document means a machine-readable copy, - represented in a format whose specification is available to the - general public, that is suitable for revising the document - straightforwardly with generic text editors or (for images - composed of pixels) generic paint programs or (for drawings) some - widely available drawing editor, and that is suitable for input to - text formatters or for automatic translation to a variety of - formats suitable for input to text formatters. A copy made in an - otherwise Transparent file format whose markup, or absence of - markup, has been arranged to thwart or discourage subsequent - modification by readers is not Transparent. An image format is - not Transparent if used for any substantial amount of text. A - copy that is not "Transparent" is called "Opaque". - - Examples of suitable formats for Transparent copies include plain - ASCII without markup, Texinfo input format, LaTeX input format, - SGML or XML using a publicly available DTD, and - standard-conforming simple HTML, PostScript or PDF designed for - human modification. Examples of transparent image formats include - PNG, XCF and JPG. Opaque formats include proprietary formats that - can be read and edited only by proprietary word processors, SGML or - XML for which the DTD and/or processing tools are not generally - available, and the machine-generated HTML, PostScript or PDF - produced by some word processors for output purposes only. - - The "Title Page" means, for a printed book, the title page itself, - plus such following pages as are needed to hold, legibly, the - material this License requires to appear in the title page. For - works in formats which do not have any title page as such, "Title - Page" means the text near the most prominent appearance of the - work's title, preceding the beginning of the body of the text. - - A section "Entitled XYZ" means a named subunit of the Document - whose title either is precisely XYZ or contains XYZ in parentheses - following text that translates XYZ in another language. (Here XYZ - stands for a specific section name mentioned below, such as - "Acknowledgements", "Dedications", "Endorsements", or "History".) - To "Preserve the Title" of such a section when you modify the - Document means that it remains a section "Entitled XYZ" according - to this definition. - - The Document may include Warranty Disclaimers next to the notice - which states that this License applies to the Document. These - Warranty Disclaimers are considered to be included by reference in - this License, but only as regards disclaiming warranties: any other - implication that these Warranty Disclaimers may have is void and - has no effect on the meaning of this License. - - 2. VERBATIM COPYING - - You may copy and distribute the Document in any medium, either - commercially or noncommercially, provided that this License, the - copyright notices, and the license notice saying this License - applies to the Document are reproduced in all copies, and that you - add no other conditions whatsoever to those of this License. You - may not use technical measures to obstruct or control the reading - or further copying of the copies you make or distribute. However, - you may accept compensation in exchange for copies. If you - distribute a large enough number of copies you must also follow - the conditions in section 3. - - You may also lend copies, under the same conditions stated above, - and you may publicly display copies. - - 3. COPYING IN QUANTITY - - If you publish printed copies (or copies in media that commonly - have printed covers) of the Document, numbering more than 100, and - the Document's license notice requires Cover Texts, you must - enclose the copies in covers that carry, clearly and legibly, all - these Cover Texts: Front-Cover Texts on the front cover, and - Back-Cover Texts on the back cover. Both covers must also clearly - and legibly identify you as the publisher of these copies. The - front cover must present the full title with all words of the - title equally prominent and visible. You may add other material - on the covers in addition. Copying with changes limited to the - covers, as long as they preserve the title of the Document and - satisfy these conditions, can be treated as verbatim copying in - other respects. - - If the required texts for either cover are too voluminous to fit - legibly, you should put the first ones listed (as many as fit - reasonably) on the actual cover, and continue the rest onto - adjacent pages. - - If you publish or distribute Opaque copies of the Document - numbering more than 100, you must either include a - machine-readable Transparent copy along with each Opaque copy, or - state in or with each Opaque copy a computer-network location from - which the general network-using public has access to download - using public-standard network protocols a complete Transparent - copy of the Document, free of added material. If you use the - latter option, you must take reasonably prudent steps, when you - begin distribution of Opaque copies in quantity, to ensure that - this Transparent copy will remain thus accessible at the stated - location until at least one year after the last time you - distribute an Opaque copy (directly or through your agents or - retailers) of that edition to the public. - - It is requested, but not required, that you contact the authors of - the Document well before redistributing any large number of - copies, to give them a chance to provide you with an updated - version of the Document. - - 4. MODIFICATIONS - - You may copy and distribute a Modified Version of the Document - under the conditions of sections 2 and 3 above, provided that you - release the Modified Version under precisely this License, with - the Modified Version filling the role of the Document, thus - licensing distribution and modification of the Modified Version to - whoever possesses a copy of it. In addition, you must do these - things in the Modified Version: - - A. Use in the Title Page (and on the covers, if any) a title - distinct from that of the Document, and from those of - previous versions (which should, if there were any, be listed - in the History section of the Document). You may use the - same title as a previous version if the original publisher of - that version gives permission. - - B. List on the Title Page, as authors, one or more persons or - entities responsible for authorship of the modifications in - the Modified Version, together with at least five of the - principal authors of the Document (all of its principal - authors, if it has fewer than five), unless they release you - from this requirement. - - C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. - - D. Preserve all the copyright notices of the Document. - - E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. - - F. Include, immediately after the copyright notices, a license - notice giving the public permission to use the Modified - Version under the terms of this License, in the form shown in - the Addendum below. - - G. Preserve in that license notice the full lists of Invariant - Sections and required Cover Texts given in the Document's - license notice. - - H. Include an unaltered copy of this License. - - I. Preserve the section Entitled "History", Preserve its Title, - and add to it an item stating at least the title, year, new - authors, and publisher of the Modified Version as given on - the Title Page. If there is no section Entitled "History" in - the Document, create one stating the title, year, authors, - and publisher of the Document as given on its Title Page, - then add an item describing the Modified Version as stated in - the previous sentence. - - J. Preserve the network location, if any, given in the Document - for public access to a Transparent copy of the Document, and - likewise the network locations given in the Document for - previous versions it was based on. These may be placed in - the "History" section. You may omit a network location for a - work that was published at least four years before the - Document itself, or if the original publisher of the version - it refers to gives permission. - - K. For any section Entitled "Acknowledgements" or "Dedications", - Preserve the Title of the section, and preserve in the - section all the substance and tone of each of the contributor - acknowledgements and/or dedications given therein. - - L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section - titles. - - M. Delete any section Entitled "Endorsements". Such a section - may not be included in the Modified Version. - - N. Do not retitle any existing section to be Entitled - "Endorsements" or to conflict in title with any Invariant - Section. - - O. Preserve any Warranty Disclaimers. - - If the Modified Version includes new front-matter sections or - appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option - designate some or all of these sections as invariant. To do this, - add their titles to the list of Invariant Sections in the Modified - Version's license notice. These titles must be distinct from any - other section titles. - - You may add a section Entitled "Endorsements", provided it contains - nothing but endorsements of your Modified Version by various - parties--for example, statements of peer review or that the text - has been approved by an organization as the authoritative - definition of a standard. - - You may add a passage of up to five words as a Front-Cover Text, - and a passage of up to 25 words as a Back-Cover Text, to the end - of the list of Cover Texts in the Modified Version. Only one - passage of Front-Cover Text and one of Back-Cover Text may be - added by (or through arrangements made by) any one entity. If the - Document already includes a cover text for the same cover, - previously added by you or by arrangement made by the same entity - you are acting on behalf of, you may not add another; but you may - replace the old one, on explicit permission from the previous - publisher that added the old one. - - The author(s) and publisher(s) of the Document do not by this - License give permission to use their names for publicity for or to - assert or imply endorsement of any Modified Version. - - 5. COMBINING DOCUMENTS - - You may combine the Document with other documents released under - this License, under the terms defined in section 4 above for - modified versions, provided that you include in the combination - all of the Invariant Sections of all of the original documents, - unmodified, and list them all as Invariant Sections of your - combined work in its license notice, and that you preserve all - their Warranty Disclaimers. - - The combined work need only contain one copy of this License, and - multiple identical Invariant Sections may be replaced with a single - copy. If there are multiple Invariant Sections with the same name - but different contents, make the title of each such section unique - by adding at the end of it, in parentheses, the name of the - original author or publisher of that section if known, or else a - unique number. Make the same adjustment to the section titles in - the list of Invariant Sections in the license notice of the - combined work. - - In the combination, you must combine any sections Entitled - "History" in the various original documents, forming one section - Entitled "History"; likewise combine any sections Entitled - "Acknowledgements", and any sections Entitled "Dedications". You - must delete all sections Entitled "Endorsements." - - 6. COLLECTIONS OF DOCUMENTS - - You may make a collection consisting of the Document and other - documents released under this License, and replace the individual - copies of this License in the various documents with a single copy - that is included in the collection, provided that you follow the - rules of this License for verbatim copying of each of the - documents in all other respects. - - You may extract a single document from such a collection, and - distribute it individually under this License, provided you insert - a copy of this License into the extracted document, and follow - this License in all other respects regarding verbatim copying of - that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - - A compilation of the Document or its derivatives with other - separate and independent documents or works, in or on a volume of - a storage or distribution medium, is called an "aggregate" if the - copyright resulting from the compilation is not used to limit the - legal rights of the compilation's users beyond what the individual - works permit. When the Document is included an aggregate, this - License does not apply to the other works in the aggregate which - are not themselves derivative works of the Document. - - If the Cover Text requirement of section 3 is applicable to these - copies of the Document, then if the Document is less than one half - of the entire aggregate, the Document's Cover Texts may be placed - on covers that bracket the Document within the aggregate, or the - electronic equivalent of covers if the Document is in electronic - form. Otherwise they must appear on printed covers that bracket - the whole aggregate. - - 8. TRANSLATION - - Translation is considered a kind of modification, so you may - distribute translations of the Document under the terms of section - 4. Replacing Invariant Sections with translations requires special - permission from their copyright holders, but you may include - translations of some or all Invariant Sections in addition to the - original versions of these Invariant Sections. You may include a - translation of this License, and all the license notices in the - Document, and any Warrany Disclaimers, provided that you also - include the original English version of this License and the - original versions of those notices and disclaimers. In case of a - disagreement between the translation and the original version of - this License or a notice or disclaimer, the original version will - prevail. - - If a section in the Document is Entitled "Acknowledgements", - "Dedications", or "History", the requirement (section 4) to - Preserve its Title (section 1) will typically require changing the - actual title. - - 9. TERMINATION - - You may not copy, modify, sublicense, or distribute the Document - except as expressly provided for under this License. Any other - attempt to copy, modify, sublicense or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - - The Free Software Foundation may publish new, revised versions of - the GNU Free Documentation License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. See - `http://www.gnu.org/copyleft/'. - - Each version of the License is given a distinguishing version - number. If the Document specifies that a particular numbered - version of this License "or any later version" applies to it, you - have the option of following the terms and conditions either of - that specified version or of any later version that has been - published (not as a draft) by the Free Software Foundation. If - the Document does not specify a version number of this License, - you may choose any version ever published (not as a draft) by the - Free Software Foundation. - -ADDENDUM: How to use this License for your documents -==================================================== - - To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and license -notices just after the title page: - - Copyright (c) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 - or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled ``GNU - Free Documentation License''. - - If you have Invariant Sections, Front-Cover Texts and Back-Cover -Texts, replace the "with...Texts." line with this: - - with the Invariant Sections being LIST THEIR TITLES, with - the Front-Cover Texts being LIST, and with the Back-Cover Texts - being LIST. - - If you have Invariant Sections without Cover Texts, or some other -combination of the three, merge those two alternatives to suit the -situation. - - If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, to -permit their use in free software. diff --git a/tests/cluecode/data/copyright_fossology/testdata111.yml b/tests/cluecode/data/copyright_fossology/testdata111.yml new file mode 100644 index 00000000000..88437d2f4ee --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata111.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + - copyright Free Software Foundation + - Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com + - Copyright (c) 2000,2001,2002 Free Software Foundation, Inc. +holders: + - Free Software Foundation, Inc. + - Free Software Foundation + - Digital Mars, www.digitalmars.com + - Free Software Foundation, Inc. +authors: + - Walter Bright diff --git a/tests/cluecode/data/copyright_fossology/testdata111_raw b/tests/cluecode/data/copyright_fossology/testdata111_raw deleted file mode 100644 index c58fda6c7fd..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata111_raw +++ /dev/null @@ -1,668 +0,0 @@ -This is the Debian GNU/Linux prepackaged version of the GNU compiler -collection, containing Ada, C, C++, Fortran 95, Java, Objective-C, -Objective-C++, and Treelang compilers, documentation, and support -libraries. In addition, Debian provides the GNU Pascal compiler in the -same source package. Packaging is done by the Debian GCC Maintainers -, with sources obtained from: - - ftp://gcc.gnu.org/pub/gcc/releases/ (for full releases) - svn://gcc.gnu.org/svn/gcc/ (for prereleases) - http://gnu-pascal.de/alpha/ (for GNU Pascal) - http://dgcc.sourceforge.net/ (for D) - -Changes: See changelog.Debian.gz - -Debian splits the GNU Compiler Collection into packages for each language, -library, and documentation as follows: - -Language Compiler package Library package Documentation ---------------------------------------------------------------------------- -Ada gnat-4.1 libgnat-4.1 gnat-4.1-doc -C gcc-4.1 gcc-4.1-doc -C++ g++-4.1 libstdc++6 libstdc++6-4.1-doc -Fortran 95 gfortran-4.1 libgfortran1 gfortran-4.1-doc -Java gcj-4.1 libgcj7 libgcj-doc -Objective C gobjc-4.1 libobjc1 -Objective C++ gobjc++-4.1 -Pascal gpc-4.1 -D gdc-4.1 -Treelang treelang-4.1 - -For some language run-time libraries, Debian provides source files, -development files, debugging symbols and libraries containing position- -independent code in separate packages: - -Language Sources Development Debugging Position-Independent ---------------------------------------------------------------------------- -C++ libstdc++6-4.1-dbg libstdc++6-4.1-pic -Java libgcj7-src libgcj7-dev libgcj7-dbg - -Additional packages include: - -All languages: -libgcc1, libgcc2, libgcc4 GCC intrinsics (platform-dependent) -libffi4-dev, libffi4 Foreign Function Interface library -gcc-4.1-base Base files common to all compilers -gcc-4.1-soft-float Software floating point (ARM only) -gcc-4.1-source The sources with patches - -Ada: -libgnatvsn-dev, libgnatvsn4.1 GNAT version library -libgnatprj-dev, libgnatprj4.1 GNAT Project Manager library - -C: -cpp-4.1, cpp-4.1-doc GNU C Preprocessor -libmudflap0-dev, libmudflap0 Library for instrumenting pointers -libssp0-dev, libssp0 GCC stack smashing protection library -fixincludes Fix non-ANSI header files -protoize Create/remove ANSI prototypes from C code - -Java: -fastjar Jar creation utility -gij The Java bytecode interpreter and VM -libgcj-common Common files for the Java run-time -libgcj7-awt The Abstract Windowing Toolkit -libgcj7-jar Java ARchive for the Java run-time - -Biarch support: On some 64-bit platforms which can also run 32-bit code, -Debian provides additional packages containing 32-bit versions of some -libraries. These packages have names beginning with 'lib32' instead of -'lib', for example lib32stdc++6. Similarly, on some 32-bit platforms which -can also run 64-bit code, Debian provides additional packages with names -beginning with 'lib64' instead of 'lib'. These packages contain 64-bit -versions of the libraries. (At this time, not all platforms and not all -libraries support biarch.) The license terms for these lib32 or lib64 -packages are identical to the ones for the lib packages. - - -COPYRIGHT STATEMENTS AND LICENSING TERMS - - -GCC is Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -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, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License is in `/usr/share/common-licenses/GPL'. - -The libstdc++-v3 library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, you may use this file as part of a free software - library without restriction. Specifically, if other files instantiate - templates or use macros or inline functions from this file, or you compile - this file and link it with other files to produce an executable, this - file does not by itself cause the resulting executable to be covered by - the GNU General Public License. This exception does not however - invalidate any other reasons why the executable file might be covered by - the GNU General Public License. - -The libgnat-4.1 Ada support library and libgnatvsn are licensed under the -terms of the GNU General Public License, with this special exception: - - As a special exception, if other files instantiate generics from this - unit, or you link this unit with other files to produce an executable, - this unit does not by itself cause the resulting executable to be - covered by the GNU General Public License. This exception does not - however invalidate any other reasons why the executable file might be - covered by the GNU Public License. - -In contrast, libgnatprj is licensed under the terms of the pure GNU -General Public License. - -gpc is copyright Free Software Foundation, and is licensed under the -GNU General Public License which on Debian GNU/Linux systems can be -found as `/usr/share/common-licenses/GPL3'. - -The gpc runtime library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, if you link this file with files compiled - with a GNU compiler to produce an executable, this does not cause - the resulting executable to be covered by the GNU General Public - License. This exception does not however invalidate any other - reasons why the executable file might be covered by the GNU - General Public License. } - -The libgcj library is licensed under the terms of the GNU General -Public License, with a special exception: - - Linking this library statically or dynamically with other modules - is making a combined work based on this library. Thus, the terms - and conditions of the GNU General Public License cover the whole - combination. - - As a special exception, the copyright holders of this library give - you permission to link this library with independent modules to - produce an executable, regardless of the license terms of these - independent modules, and to copy and distribute the resulting - executable under terms of your choice, provided that you also - meet, for each linked independent module, the terms and conditions - of the license of that module. An independent module is a module - which is not derived from or based on this library. If you modify - this library, you may extend this exception to your version of the - library, but you are not obligated to do so. If you do not wish - to do so, delete this exception statement from your version. - -gcc/libgcc2.c (source for libgcc) has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -gcc/unwind-libunwind.c (source for libgcc) has the following addition: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The mudflap library is licensed under the terms of the GNU General -Public License, and has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -The ssp library is licensed under the terms of the GNU General -Public License, with a special exception: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The D frontend is licensend under the terms of the GNU General -Public License, either version 2 of the License, or (at your option) -any later version, which on Debian GNU/Linux systems can be found as -`/usr/share/common-licenses/GPL'. - -The D runtime library (phobos) is licensed under the following terms: - -/* - * Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com - * Written by Walter Bright - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, in both source and binary form, subject to the following - * restrictions: - * - * o The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * o Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * o This notice may not be removed or altered from any source - * distribution. - */ - -By plainly marking modifications, something along the lines of adding to each -file that has been changed a "Modified by Foo Bar" line -underneath the "Written by" line would be adequate. - - -The documentation is licensed under the GNU Free Documentation License -(v1.2), appended at the end of this file. - - -GNU Free Documentation License -****************************** - - Version 1.2, November 2002 - Copyright (c) 2000,2001,2002 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - 0. PREAMBLE - - The purpose of this License is to make a manual, textbook, or other - functional and useful document "free" in the sense of freedom: to - assure everyone the effective freedom to copy and redistribute it, - with or without modifying it, either commercially or - noncommercially. Secondarily, this License preserves for the - author and publisher a way to get credit for their work, while not - being considered responsible for modifications made by others. - - This License is a kind of "copyleft", which means that derivative - works of the document must themselves be free in the same sense. - It complements the GNU General Public License, which is a copyleft - license designed for free software. - - We have designed this License in order to use it for manuals for - free software, because free software needs free documentation: a - free program should come with manuals providing the same freedoms - that the software does. But this License is not limited to - software manuals; it can be used for any textual work, regardless - of subject matter or whether it is published as a printed book. - We recommend this License principally for works whose purpose is - instruction or reference. - - 1. APPLICABILITY AND DEFINITIONS - - This License applies to any manual or other work, in any medium, - that contains a notice placed by the copyright holder saying it - can be distributed under the terms of this License. Such a notice - grants a world-wide, royalty-free license, unlimited in duration, - to use that work under the conditions stated herein. The - "Document", below, refers to any such manual or work. Any member - of the public is a licensee, and is addressed as "you". You - accept the license if you copy, modify or distribute the work in a - way requiring permission under copyright law. - - A "Modified Version" of the Document means any work containing the - Document or a portion of it, either copied verbatim, or with - modifications and/or translated into another language. - - A "Secondary Section" is a named appendix or a front-matter section - of the Document that deals exclusively with the relationship of the - publishers or authors of the Document to the Document's overall - subject (or to related matters) and contains nothing that could - fall directly within that overall subject. (Thus, if the Document - is in part a textbook of mathematics, a Secondary Section may not - explain any mathematics.) The relationship could be a matter of - historical connection with the subject or with related matters, or - of legal, commercial, philosophical, ethical or political position - regarding them. - - The "Invariant Sections" are certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in - the notice that says that the Document is released under this - License. If a section does not fit the above definition of - Secondary then it is not allowed to be designated as Invariant. - The Document may contain zero Invariant Sections. If the Document - does not identify any Invariant Sections then there are none. - - The "Cover Texts" are certain short passages of text that are - listed, as Front-Cover Texts or Back-Cover Texts, in the notice - that says that the Document is released under this License. A - Front-Cover Text may be at most 5 words, and a Back-Cover Text may - be at most 25 words. - - A "Transparent" copy of the Document means a machine-readable copy, - represented in a format whose specification is available to the - general public, that is suitable for revising the document - straightforwardly with generic text editors or (for images - composed of pixels) generic paint programs or (for drawings) some - widely available drawing editor, and that is suitable for input to - text formatters or for automatic translation to a variety of - formats suitable for input to text formatters. A copy made in an - otherwise Transparent file format whose markup, or absence of - markup, has been arranged to thwart or discourage subsequent - modification by readers is not Transparent. An image format is - not Transparent if used for any substantial amount of text. A - copy that is not "Transparent" is called "Opaque". - - Examples of suitable formats for Transparent copies include plain - ASCII without markup, Texinfo input format, LaTeX input format, - SGML or XML using a publicly available DTD, and - standard-conforming simple HTML, PostScript or PDF designed for - human modification. Examples of transparent image formats include - PNG, XCF and JPG. Opaque formats include proprietary formats that - can be read and edited only by proprietary word processors, SGML or - XML for which the DTD and/or processing tools are not generally - available, and the machine-generated HTML, PostScript or PDF - produced by some word processors for output purposes only. - - The "Title Page" means, for a printed book, the title page itself, - plus such following pages as are needed to hold, legibly, the - material this License requires to appear in the title page. For - works in formats which do not have any title page as such, "Title - Page" means the text near the most prominent appearance of the - work's title, preceding the beginning of the body of the text. - - A section "Entitled XYZ" means a named subunit of the Document - whose title either is precisely XYZ or contains XYZ in parentheses - following text that translates XYZ in another language. (Here XYZ - stands for a specific section name mentioned below, such as - "Acknowledgements", "Dedications", "Endorsements", or "History".) - To "Preserve the Title" of such a section when you modify the - Document means that it remains a section "Entitled XYZ" according - to this definition. - - The Document may include Warranty Disclaimers next to the notice - which states that this License applies to the Document. These - Warranty Disclaimers are considered to be included by reference in - this License, but only as regards disclaiming warranties: any other - implication that these Warranty Disclaimers may have is void and - has no effect on the meaning of this License. - - 2. VERBATIM COPYING - - You may copy and distribute the Document in any medium, either - commercially or noncommercially, provided that this License, the - copyright notices, and the license notice saying this License - applies to the Document are reproduced in all copies, and that you - add no other conditions whatsoever to those of this License. You - may not use technical measures to obstruct or control the reading - or further copying of the copies you make or distribute. However, - you may accept compensation in exchange for copies. If you - distribute a large enough number of copies you must also follow - the conditions in section 3. - - You may also lend copies, under the same conditions stated above, - and you may publicly display copies. - - 3. COPYING IN QUANTITY - - If you publish printed copies (or copies in media that commonly - have printed covers) of the Document, numbering more than 100, and - the Document's license notice requires Cover Texts, you must - enclose the copies in covers that carry, clearly and legibly, all - these Cover Texts: Front-Cover Texts on the front cover, and - Back-Cover Texts on the back cover. Both covers must also clearly - and legibly identify you as the publisher of these copies. The - front cover must present the full title with all words of the - title equally prominent and visible. You may add other material - on the covers in addition. Copying with changes limited to the - covers, as long as they preserve the title of the Document and - satisfy these conditions, can be treated as verbatim copying in - other respects. - - If the required texts for either cover are too voluminous to fit - legibly, you should put the first ones listed (as many as fit - reasonably) on the actual cover, and continue the rest onto - adjacent pages. - - If you publish or distribute Opaque copies of the Document - numbering more than 100, you must either include a - machine-readable Transparent copy along with each Opaque copy, or - state in or with each Opaque copy a computer-network location from - which the general network-using public has access to download - using public-standard network protocols a complete Transparent - copy of the Document, free of added material. If you use the - latter option, you must take reasonably prudent steps, when you - begin distribution of Opaque copies in quantity, to ensure that - this Transparent copy will remain thus accessible at the stated - location until at least one year after the last time you - distribute an Opaque copy (directly or through your agents or - retailers) of that edition to the public. - - It is requested, but not required, that you contact the authors of - the Document well before redistributing any large number of - copies, to give them a chance to provide you with an updated - version of the Document. - - 4. MODIFICATIONS - - You may copy and distribute a Modified Version of the Document - under the conditions of sections 2 and 3 above, provided that you - release the Modified Version under precisely this License, with - the Modified Version filling the role of the Document, thus - licensing distribution and modification of the Modified Version to - whoever possesses a copy of it. In addition, you must do these - things in the Modified Version: - - A. Use in the Title Page (and on the covers, if any) a title - distinct from that of the Document, and from those of - previous versions (which should, if there were any, be listed - in the History section of the Document). You may use the - same title as a previous version if the original publisher of - that version gives permission. - - B. List on the Title Page, as authors, one or more persons or - entities responsible for authorship of the modifications in - the Modified Version, together with at least five of the - principal authors of the Document (all of its principal - authors, if it has fewer than five), unless they release you - from this requirement. - - C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. - - D. Preserve all the copyright notices of the Document. - - E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. - - F. Include, immediately after the copyright notices, a license - notice giving the public permission to use the Modified - Version under the terms of this License, in the form shown in - the Addendum below. - - G. Preserve in that license notice the full lists of Invariant - Sections and required Cover Texts given in the Document's - license notice. - - H. Include an unaltered copy of this License. - - I. Preserve the section Entitled "History", Preserve its Title, - and add to it an item stating at least the title, year, new - authors, and publisher of the Modified Version as given on - the Title Page. If there is no section Entitled "History" in - the Document, create one stating the title, year, authors, - and publisher of the Document as given on its Title Page, - then add an item describing the Modified Version as stated in - the previous sentence. - - J. Preserve the network location, if any, given in the Document - for public access to a Transparent copy of the Document, and - likewise the network locations given in the Document for - previous versions it was based on. These may be placed in - the "History" section. You may omit a network location for a - work that was published at least four years before the - Document itself, or if the original publisher of the version - it refers to gives permission. - - K. For any section Entitled "Acknowledgements" or "Dedications", - Preserve the Title of the section, and preserve in the - section all the substance and tone of each of the contributor - acknowledgements and/or dedications given therein. - - L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section - titles. - - M. Delete any section Entitled "Endorsements". Such a section - may not be included in the Modified Version. - - N. Do not retitle any existing section to be Entitled - "Endorsements" or to conflict in title with any Invariant - Section. - - O. Preserve any Warranty Disclaimers. - - If the Modified Version includes new front-matter sections or - appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option - designate some or all of these sections as invariant. To do this, - add their titles to the list of Invariant Sections in the Modified - Version's license notice. These titles must be distinct from any - other section titles. - - You may add a section Entitled "Endorsements", provided it contains - nothing but endorsements of your Modified Version by various - parties--for example, statements of peer review or that the text - has been approved by an organization as the authoritative - definition of a standard. - - You may add a passage of up to five words as a Front-Cover Text, - and a passage of up to 25 words as a Back-Cover Text, to the end - of the list of Cover Texts in the Modified Version. Only one - passage of Front-Cover Text and one of Back-Cover Text may be - added by (or through arrangements made by) any one entity. If the - Document already includes a cover text for the same cover, - previously added by you or by arrangement made by the same entity - you are acting on behalf of, you may not add another; but you may - replace the old one, on explicit permission from the previous - publisher that added the old one. - - The author(s) and publisher(s) of the Document do not by this - License give permission to use their names for publicity for or to - assert or imply endorsement of any Modified Version. - - 5. COMBINING DOCUMENTS - - You may combine the Document with other documents released under - this License, under the terms defined in section 4 above for - modified versions, provided that you include in the combination - all of the Invariant Sections of all of the original documents, - unmodified, and list them all as Invariant Sections of your - combined work in its license notice, and that you preserve all - their Warranty Disclaimers. - - The combined work need only contain one copy of this License, and - multiple identical Invariant Sections may be replaced with a single - copy. If there are multiple Invariant Sections with the same name - but different contents, make the title of each such section unique - by adding at the end of it, in parentheses, the name of the - original author or publisher of that section if known, or else a - unique number. Make the same adjustment to the section titles in - the list of Invariant Sections in the license notice of the - combined work. - - In the combination, you must combine any sections Entitled - "History" in the various original documents, forming one section - Entitled "History"; likewise combine any sections Entitled - "Acknowledgements", and any sections Entitled "Dedications". You - must delete all sections Entitled "Endorsements." - - 6. COLLECTIONS OF DOCUMENTS - - You may make a collection consisting of the Document and other - documents released under this License, and replace the individual - copies of this License in the various documents with a single copy - that is included in the collection, provided that you follow the - rules of this License for verbatim copying of each of the - documents in all other respects. - - You may extract a single document from such a collection, and - distribute it individually under this License, provided you insert - a copy of this License into the extracted document, and follow - this License in all other respects regarding verbatim copying of - that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - - A compilation of the Document or its derivatives with other - separate and independent documents or works, in or on a volume of - a storage or distribution medium, is called an "aggregate" if the - copyright resulting from the compilation is not used to limit the - legal rights of the compilation's users beyond what the individual - works permit. When the Document is included an aggregate, this - License does not apply to the other works in the aggregate which - are not themselves derivative works of the Document. - - If the Cover Text requirement of section 3 is applicable to these - copies of the Document, then if the Document is less than one half - of the entire aggregate, the Document's Cover Texts may be placed - on covers that bracket the Document within the aggregate, or the - electronic equivalent of covers if the Document is in electronic - form. Otherwise they must appear on printed covers that bracket - the whole aggregate. - - 8. TRANSLATION - - Translation is considered a kind of modification, so you may - distribute translations of the Document under the terms of section - 4. Replacing Invariant Sections with translations requires special - permission from their copyright holders, but you may include - translations of some or all Invariant Sections in addition to the - original versions of these Invariant Sections. You may include a - translation of this License, and all the license notices in the - Document, and any Warrany Disclaimers, provided that you also - include the original English version of this License and the - original versions of those notices and disclaimers. In case of a - disagreement between the translation and the original version of - this License or a notice or disclaimer, the original version will - prevail. - - If a section in the Document is Entitled "Acknowledgements", - "Dedications", or "History", the requirement (section 4) to - Preserve its Title (section 1) will typically require changing the - actual title. - - 9. TERMINATION - - You may not copy, modify, sublicense, or distribute the Document - except as expressly provided for under this License. Any other - attempt to copy, modify, sublicense or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - - The Free Software Foundation may publish new, revised versions of - the GNU Free Documentation License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. See - `http://www.gnu.org/copyleft/'. - - Each version of the License is given a distinguishing version - number. If the Document specifies that a particular numbered - version of this License "or any later version" applies to it, you - have the option of following the terms and conditions either of - that specified version or of any later version that has been - published (not as a draft) by the Free Software Foundation. If - the Document does not specify a version number of this License, - you may choose any version ever published (not as a draft) by the - Free Software Foundation. - -ADDENDUM: How to use this License for your documents -==================================================== - - To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and license -notices just after the title page: - - Copyright (c) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 - or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled ``GNU - Free Documentation License''. - - If you have Invariant Sections, Front-Cover Texts and Back-Cover -Texts, replace the "with...Texts." line with this: - - with the Invariant Sections being LIST THEIR TITLES, with - the Front-Cover Texts being LIST, and with the Back-Cover Texts - being LIST. - - If you have Invariant Sections without Cover Texts, or some other -combination of the three, merge those two alternatives to suit the -situation. - - If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, to -permit their use in free software. diff --git a/tests/cluecode/data/copyright_fossology/testdata112.yml b/tests/cluecode/data/copyright_fossology/testdata112.yml new file mode 100644 index 00000000000..b31b1187d41 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata112.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + - copyright Free Software Foundation + - Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com + - Copyright (c) 1996-2003 Red Hat, Inc. +holders: + - Free Software Foundation, Inc. + - Free Software Foundation + - Digital Mars, www.digitalmars.com + - Red Hat, Inc. +authors: + - Walter Bright diff --git a/tests/cluecode/data/copyright_fossology/testdata112_raw b/tests/cluecode/data/copyright_fossology/testdata112_raw deleted file mode 100644 index 4f95492d218..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata112_raw +++ /dev/null @@ -1,273 +0,0 @@ -This is the Debian GNU/Linux prepackaged version of the GNU compiler -collection, containing Ada, C, C++, Fortran 95, Java, Objective-C, -Objective-C++, and Treelang compilers, documentation, and support -libraries. In addition, Debian provides the GNU Pascal compiler in the -same source package. Packaging is done by the Debian GCC Maintainers -, with sources obtained from: - - ftp://gcc.gnu.org/pub/gcc/releases/ (for full releases) - svn://gcc.gnu.org/svn/gcc/ (for prereleases) - http://gnu-pascal.de/alpha/ (for GNU Pascal) - http://dgcc.sourceforge.net/ (for D) - -The current gcc-4.3 source package is taken from the SVN trunk. - -Changes: See changelog.Debian.gz - -Debian splits the GNU Compiler Collection into packages for each language, -library, and documentation as follows: - -Language Compiler package Library package Documentation ---------------------------------------------------------------------------- -Ada gnat-4.3 libgnat-4.3 gnat-4.3-doc -C gcc-4.3 gcc-4.3-doc -C++ g++-4.3 libstdc++6 libstdc++6-4.3-doc -D gdc-4.3 -Fortran 95 gfortran-4.3 libgfortran3 gfortran-4.3-doc -Java gcj-4.3 libgcj9 libgcj-doc -Objective C gobjc-4.3 libobjc2 -Objective C++ gobjc++-4.3 -Pascal gpc-4.3 -Treelang treelang-4.3 - -For some language run-time libraries, Debian provides source files, -development files, debugging symbols and libraries containing position- -independent code in separate packages: - -Language Sources Development Debugging Position-Independent ---------------------------------------------------------------------------- -C++ libstdc++6-4.3-dbg libstdc++6-4.3-pic -Java libgcj9-src libgcj9-dev libgcj9-dbg - -Additional packages include: - -All languages: -libgcc1, libgcc2, libgcc4 GCC intrinsics (platform-dependent) -gcc-4.3-base Base files common to all compilers -gcc-4.3-soft-float Software floating point (ARM only) -gcc-4.3-source The sources with patches - -Ada: -libgnatvsn-dev, libgnatvsn4.3 GNAT version library -libgnatprj-dev, libgnatprj4.3 GNAT Project Manager library - -C: -cpp-4.3, cpp-4.3-doc GNU C Preprocessor -libmudflap0-dev, libmudflap0 Library for instrumenting pointers -libssp0-dev, libssp0 GCC stack smashing protection library -fixincludes Fix non-ANSI header files -protoize Create/remove ANSI prototypes from C code - -Java: -gij The Java bytecode interpreter and VM -libgcj-common Common files for the Java run-time -libgcj8-awt The Abstract Windowing Toolkit -libgcj8-jar Java ARchive for the Java run-time - -C, C++ and Fortran 95: -libgomp1-dev, libgomp1 GCC OpenMP (GOMP) support library - -Biarch support: On some 64-bit platforms which can also run 32-bit code, -Debian provides additional packages containing 32-bit versions of some -libraries. These packages have names beginning with 'lib32' instead of -'lib', for example lib32stdc++6. Similarly, on some 32-bit platforms which -can also run 64-bit code, Debian provides additional packages with names -beginning with 'lib64' instead of 'lib'. These packages contain 64-bit -versions of the libraries. (At this time, not all platforms and not all -libraries support biarch.) The license terms for these lib32 or lib64 -packages are identical to the ones for the lib packages. - - -COPYRIGHT STATEMENTS AND LICENSING TERMS - - -GCC is Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -2008 Free Software Foundation, Inc. - -GCC 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, or (at your option) any later -version. - -GCC 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. - -Files that have exception clauses are licensed under the terms of the -GNU General Public License; either version 2, or (at your option) any -later version. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License is in `/usr/share/common-licenses/GPL', version 2 of this -license in `/usr/share/common-licenses/GPL-2'. - -The libstdc++-v3 library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, you may use this file as part of a free software - library without restriction. Specifically, if other files instantiate - templates or use macros or inline functions from this file, or you compile - this file and link it with other files to produce an executable, this - file does not by itself cause the resulting executable to be covered by - the GNU General Public License. This exception does not however - invalidate any other reasons why the executable file might be covered by - the GNU General Public License. - -The libgnat-4.3 Ada support library and libgnatvsn are licensed under the -terms of the GNU General Public License, with this special exception: - - As a special exception, if other files instantiate generics from this - unit, or you link this unit with other files to produce an executable, - this unit does not by itself cause the resulting executable to be - covered by the GNU General Public License. This exception does not - however invalidate any other reasons why the executable file might be - covered by the GNU Public License. - -In contrast, libgnatprj is licensed under the terms of the pure GNU -General Public License. - -gpc is copyright Free Software Foundation, and is licensed under the -GNU General Public License which on Debian GNU/Linux systems can be -found as `/usr/share/common-licenses/GPL'. - -The gpc runtime library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, if you link this file with files compiled - with a GNU compiler to produce an executable, this does not cause - the resulting executable to be covered by the GNU General Public - License. This exception does not however invalidate any other - reasons why the executable file might be covered by the GNU - General Public License. } - -The libgcj library is licensed under the terms of the GNU General -Public License, with a special exception: - - Linking this library statically or dynamically with other modules - is making a combined work based on this library. Thus, the terms - and conditions of the GNU General Public License cover the whole - combination. - - As a special exception, the copyright holders of this library give - you permission to link this library with independent modules to - produce an executable, regardless of the license terms of these - independent modules, and to copy and distribute the resulting - executable under terms of your choice, provided that you also - meet, for each linked independent module, the terms and conditions - of the license of that module. An independent module is a module - which is not derived from or based on this library. If you modify - this library, you may extend this exception to your version of the - library, but you are not obligated to do so. If you do not wish - to do so, delete this exception statement from your version. - -gcc/libgcc2.c (source for libgcc) has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -gcc/unwind-libunwind.c (source for libgcc) has the following addition: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The mudflap library is licensed under the terms of the GNU General -Public License, and has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -The ssp library is licensed under the terms of the GNU General -Public License, with a special exception: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The D frontend is licensend under the terms of the GNU General -Public License, either version 2 of the License, or (at your option) -any later version, which on Debian GNU/Linux systems can be found as -`/usr/share/common-licenses/GPL'. - -The D runtime library (phobos) is licensed under the following terms: - -/* - * Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com - * Written by Walter Bright - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, in both source and binary form, subject to the following - * restrictions: - * - * o The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * o Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * o This notice may not be removed or altered from any source - * distribution. - */ - -The Libgomp library is licensed under the terms of the GNU Lesser -General Public License, with a special exception: - - As a special exception, if you link this library with other files, some - of which are compiled with GCC, to produce an executable, this library - does not by itself cause the resulting executable to be covered by the - GNU General Public License. This exception does not however invalidate - any other reasons why the executable file might be covered by the GNU - General Public License. - -The libffi library is licensed under the following terms: - - libffi - Copyright (c) 1996-2003 Red Hat, Inc. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - ``Software''), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - 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. - IN NO EVENT SHALL CYGNUS SOLUTIONS 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. - - -The documentation is licensed under the GNU Free Documentation License (v1.2). -On Debian GNU/Linux systems, the complete text of this license is in -`/usr/share/common-licenses/GFDL-1.2'. diff --git a/tests/cluecode/data/copyright_fossology/testdata113.yml b/tests/cluecode/data/copyright_fossology/testdata113.yml new file mode 100644 index 00000000000..b31b1187d41 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata113.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + - copyright Free Software Foundation + - Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com + - Copyright (c) 1996-2003 Red Hat, Inc. +holders: + - Free Software Foundation, Inc. + - Free Software Foundation + - Digital Mars, www.digitalmars.com + - Red Hat, Inc. +authors: + - Walter Bright diff --git a/tests/cluecode/data/copyright_fossology/testdata113_raw b/tests/cluecode/data/copyright_fossology/testdata113_raw deleted file mode 100644 index 72272cdb1a7..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata113_raw +++ /dev/null @@ -1,273 +0,0 @@ -This is the Debian GNU/Linux prepackaged version of the GNU compiler -collection, containing Ada, C, C++, Fortran 95, Java, Objective-C, -Objective-C++, and Treelang compilers, documentation, and support -libraries. In addition, Debian provides the GNU Pascal compiler in the -same source package. Packaging is done by the Debian GCC Maintainers -, with sources obtained from: - - ftp://gcc.gnu.org/pub/gcc/releases/ (for full releases) - svn://gcc.gnu.org/svn/gcc/ (for prereleases) - http://gnu-pascal.de/alpha/ (for GNU Pascal) - http://dgcc.sourceforge.net/ (for D) - -The current gcc-4.3 source package is taken from the SVN trunk. - -Changes: See changelog.Debian.gz - -Debian splits the GNU Compiler Collection into packages for each language, -library, and documentation as follows: - -Language Compiler package Library package Documentation ---------------------------------------------------------------------------- -Ada gnat-4.3 libgnat-4.3 gnat-4.3-doc -C gcc-4.3 gcc-4.3-doc -C++ g++-4.3 libstdc++6 libstdc++6-4.3-doc -D gdc-4.3 -Fortran 95 gfortran-4.3 libgfortran3 gfortran-4.3-doc -Java gcj-4.3 libgcj9 libgcj-doc -Objective C gobjc-4.3 libobjc2 -Objective C++ gobjc++-4.3 -Pascal gpc-4.3 -Treelang treelang-4.3 - -For some language run-time libraries, Debian provides source files, -development files, debugging symbols and libraries containing position- -independent code in separate packages: - -Language Sources Development Debugging Position-Independent ---------------------------------------------------------------------------- -C++ libstdc++6-4.3-dbg libstdc++6-4.3-pic -Java libgcj9-src libgcj9-dev libgcj9-dbg - -Additional packages include: - -All languages: -libgcc1, libgcc2, libgcc4 GCC intrinsics (platform-dependent) -gcc-4.3-base Base files common to all compilers -gcc-4.3-soft-float Software floating point (ARM only) -gcc-4.3-source The sources with patches - -Ada: -libgnatvsn-dev, libgnatvsn4.3 GNAT version library -libgnatprj-dev, libgnatprj4.3 GNAT Project Manager library - -C: -cpp-4.3, cpp-4.3-doc GNU C Preprocessor -libmudflap0-dev, libmudflap0 Library for instrumenting pointers -libssp0-dev, libssp0 GCC stack smashing protection library -fixincludes Fix non-ANSI header files -protoize Create/remove ANSI prototypes from C code - -Java: -gij The Java bytecode interpreter and VM -libgcj-common Common files for the Java run-time -libgcj8-awt The Abstract Windowing Toolkit -libgcj8-jar Java ARchive for the Java run-time - -C, C++ and Fortran 95: -libgomp1-dev, libgomp1 GCC OpenMP (GOMP) support library - -Biarch support: On some 64-bit platforms which can also run 32-bit code, -Debian provides additional packages containing 32-bit versions of some -libraries. These packages have names beginning with 'lib32' instead of -'lib', for example lib32stdc++6. Similarly, on some 32-bit platforms which -can also run 64-bit code, Debian provides additional packages with names -beginning with 'lib64' instead of 'lib'. These packages contain 64-bit -versions of the libraries. (At this time, not all platforms and not all -libraries support biarch.) The license terms for these lib32 or lib64 -packages are identical to the ones for the lib packages. - - -COPYRIGHT STATEMENTS AND LICENSING TERMS - - -GCC is Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -2008 Free Software Foundation, Inc. - -GCC 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, or (at your option) any later -version. - -GCC 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. - -Files that have exception clauses are licensed under the terms of the -GNU General Public License; either version 2, or (at your option) any -later version. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License is in `/usr/share/common-licenses/GPL', version 2 of this -license in `/usr/share/common-licenses/GPL-2'. - -The libstdc++-v3 library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, you may use this file as part of a free software - library without restriction. Specifically, if other files instantiate - templates or use macros or inline functions from this file, or you compile - this file and link it with other files to produce an executable, this - file does not by itself cause the resulting executable to be covered by - the GNU General Public License. This exception does not however - invalidate any other reasons why the executable file might be covered by - the GNU General Public License. - -The libgnat-4.3 Ada support library and libgnatvsn are licensed under the -terms of the GNU General Public License, with this special exception: - - As a special exception, if other files instantiate generics from this - unit, or you link this unit with other files to produce an executable, - this unit does not by itself cause the resulting executable to be - covered by the GNU General Public License. This exception does not - however invalidate any other reasons why the executable file might be - covered by the GNU Public License. - -In contrast, libgnatprj is licensed under the terms of the pure GNU -General Public License. - -gpc is copyright Free Software Foundation, and is licensed under the -GNU General Public License which on Debian GNU/Linux systems can be -found as `/usr/share/common-licenses/GPL'. - -The gpc runtime library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, if you link this file with files compiled - with a GNU compiler to produce an executable, this does not cause - the resulting executable to be covered by the GNU General Public - License. This exception does not however invalidate any other - reasons why the executable file might be covered by the GNU - General Public License. } - -The libgcj library is licensed under the terms of the GNU General -Public License, with a special exception: - - Linking this library statically or dynamically with other modules - is making a combined work based on this library. Thus, the terms - and conditions of the GNU General Public License cover the whole - combination. - - As a special exception, the copyright holders of this library give - you permission to link this library with independent modules to - produce an executable, regardless of the license terms of these - independent modules, and to copy and distribute the resulting - executable under terms of your choice, provided that you also - meet, for each linked independent module, the terms and conditions - of the license of that module. An independent module is a module - which is not derived from or based on this library. If you modify - this library, you may extend this exception to your version of the - library, but you are not obligated to do so. If you do not wish - to do so, delete this exception statement from your version. - -gcc/libgcc2.c (source for libgcc) has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -gcc/unwind-libunwind.c (source for libgcc) has the following addition: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The mudflap library is licensed under the terms of the GNU General -Public License, and has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -The ssp library is licensed under the terms of the GNU General -Public License, with a special exception: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The D frontend is licensend under the terms of the GNU General -Public License, either version 2 of the License, or (at your option) -any later version, which on Debian GNU/Linux systems can be found as -`/usr/share/common-licenses/GPL'. - -The D runtime library (phobos) is licensed under the following terms: - -/* - * Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com - * Written by Walter Bright - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, in both source and binary form, subject to the following - * restrictions: - * - * o The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * o Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * o This notice may not be removed or altered from any source - * distribution. - */ - -The Libgomp library is licensed under the terms of the GNU Lesser -General Public License, with a special exception: - - As a special exception, if you link this library with other files, some - of which are compiled with GCC, to produce an executable, this library - does not by itself cause the resulting executable to be covered by the - GNU General Public License. This exception does not however invalidate - any other reasons why the executable file might be covered by the GNU - General Public License. - -The libffi library is licensed under the following terms: - - libffi - Copyright (c) 1996-2003 Red Hat, Inc. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - ``Software''), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - 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. - IN NO EVENT SHALL CYGNUS SOLUTIONS 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. - - -The documentation is licensed under the GNU Free Documentation License (v1.2). -On Debian GNU/Linux systems, the complete text of this license is in -`/usr/share/common-licenses/GFDL-1.2'. diff --git a/tests/cluecode/data/copyright_fossology/testdata114.yml b/tests/cluecode/data/copyright_fossology/testdata114.yml new file mode 100644 index 00000000000..ff9f369f0ef --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata114.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000, 2001, 2006 Debian + - Copyright (c) 1999 The NetBSD Foundation, Inc. +holders: + - Debian + - The NetBSD Foundation, Inc. +authors: + - the NetBSD Foundation, Inc. and its contributors diff --git a/tests/cluecode/data/copyright_fossology/testdata114_raw b/tests/cluecode/data/copyright_fossology/testdata114_raw deleted file mode 100644 index c64ed949ffc..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata114_raw +++ /dev/null @@ -1,48 +0,0 @@ -gcc-defaults is Copyright (c) 2000, 2001, 2006 Debian. - -These scripts are 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. - -The file classpath.security in the libgcj-common package is part of -GNU Classpath. GNU Classpath 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. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - -The c89 and c99 man pages are taken from netbsd: - -Copyright (c) 1999 The NetBSD Foundation, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the NetBSD - Foundation, Inc. and its contributors. -4. Neither the name of The NetBSD Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/tests/cluecode/data/copyright_fossology/testdata115.yml b/tests/cluecode/data/copyright_fossology/testdata115.yml new file mode 100644 index 00000000000..ff9f369f0ef --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata115.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000, 2001, 2006 Debian + - Copyright (c) 1999 The NetBSD Foundation, Inc. +holders: + - Debian + - The NetBSD Foundation, Inc. +authors: + - the NetBSD Foundation, Inc. and its contributors diff --git a/tests/cluecode/data/copyright_fossology/testdata115_raw b/tests/cluecode/data/copyright_fossology/testdata115_raw deleted file mode 100644 index c64ed949ffc..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata115_raw +++ /dev/null @@ -1,48 +0,0 @@ -gcc-defaults is Copyright (c) 2000, 2001, 2006 Debian. - -These scripts are 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. - -The file classpath.security in the libgcj-common package is part of -GNU Classpath. GNU Classpath 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. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - -The c89 and c99 man pages are taken from netbsd: - -Copyright (c) 1999 The NetBSD Foundation, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the NetBSD - Foundation, Inc. and its contributors. -4. Neither the name of The NetBSD Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/tests/cluecode/data/copyright_fossology/testdata116.yml b/tests/cluecode/data/copyright_fossology/testdata116.yml new file mode 100644 index 00000000000..dacf43fedb4 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata116.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1995-2007 Free Software Foundation, Inc. + - Copyright (c) 1995-2007 Free Software Foundation, Inc. + - Copyright (c) 1995-1998, 2001-2007 Free Software Foundation, Inc. +holders: + - Free Software Foundation, Inc. + - Free Software Foundation, Inc. + - Free Software Foundation, Inc. +authors: + - Ulrich Drepper + - Francois Pinard + - Erick Branderhorst + - Santiago Vila diff --git a/tests/cluecode/data/copyright_fossology/testdata116_raw b/tests/cluecode/data/copyright_fossology/testdata116_raw deleted file mode 100644 index b03b895efac..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata116_raw +++ /dev/null @@ -1,69 +0,0 @@ -This is the Debian prepackaged version of the GNU gettext utilities. -GNU gettext was written by Ulrich Drepper . -emacs po-mode was written by François Pinard . - -This package was first created by Erick Branderhorst , -and is currently maintained by Santiago Vila . - -This release has been built using the sources from: - -ftp://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz - -The changes were fairly minimal, and consisted solely of adding -various debian/* files to the distribution. - - -Copyright and license for the gettext tools: - -Copyright (c) 1995-2007 Free Software Foundation, Inc. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -Copyright and license for the libintl library: - -Copyright (c) 1995-2007 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Library General Public License as published -by the Free Software Foundation; either version 2, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -Copyright and license for gettext documentation: - - Copyright (c) 1995-1998, 2001-2007 Free Software Foundation, Inc. - - This manual is free documentation. It is dually licensed under the -GNU FDL and the GNU GPL. This means that you can redistribute this -manual under either of these two licenses, at your choice. - - This manual is covered by the GNU FDL. Permission is granted to -copy, distribute and/or modify this document under the terms of the GNU -Free Documentation License (FDL), either version 1.2 of the License, or -(at your option) any later version published by the Free Software -Foundation (FSF); with no Invariant Sections, with no Front-Cover Text, -and with no Back-Cover Texts. - - This manual is covered by the GNU GPL. You can redistribute it -and/or modify it under the terms of the GNU General Public License -(GPL), either version 2 of the License, or (at your option) any later -version published by the Free Software Foundation (FSF). - - -On Debian systems, the complete text of the GNU General Public License -can be found in `/usr/share/common-licenses/GPL', the complete text of -the GNU Library General Public License can be found in -`/usr/share/common-licenses/LGPL', and the complete text of the GNU -Free Documentation License can be found in `/usr/share/common-licenses/GFDL' diff --git a/tests/cluecode/data/copyright_fossology/testdata117.yml b/tests/cluecode/data/copyright_fossology/testdata117.yml new file mode 100644 index 00000000000..dacf43fedb4 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata117.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1995-2007 Free Software Foundation, Inc. + - Copyright (c) 1995-2007 Free Software Foundation, Inc. + - Copyright (c) 1995-1998, 2001-2007 Free Software Foundation, Inc. +holders: + - Free Software Foundation, Inc. + - Free Software Foundation, Inc. + - Free Software Foundation, Inc. +authors: + - Ulrich Drepper + - Francois Pinard + - Erick Branderhorst + - Santiago Vila diff --git a/tests/cluecode/data/copyright_fossology/testdata117_raw b/tests/cluecode/data/copyright_fossology/testdata117_raw deleted file mode 100644 index b03b895efac..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata117_raw +++ /dev/null @@ -1,69 +0,0 @@ -This is the Debian prepackaged version of the GNU gettext utilities. -GNU gettext was written by Ulrich Drepper . -emacs po-mode was written by François Pinard . - -This package was first created by Erick Branderhorst , -and is currently maintained by Santiago Vila . - -This release has been built using the sources from: - -ftp://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz - -The changes were fairly minimal, and consisted solely of adding -various debian/* files to the distribution. - - -Copyright and license for the gettext tools: - -Copyright (c) 1995-2007 Free Software Foundation, Inc. - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -Copyright and license for the libintl library: - -Copyright (c) 1995-2007 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify it -under the terms of the GNU Library General Public License as published -by the Free Software Foundation; either version 2, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -Copyright and license for gettext documentation: - - Copyright (c) 1995-1998, 2001-2007 Free Software Foundation, Inc. - - This manual is free documentation. It is dually licensed under the -GNU FDL and the GNU GPL. This means that you can redistribute this -manual under either of these two licenses, at your choice. - - This manual is covered by the GNU FDL. Permission is granted to -copy, distribute and/or modify this document under the terms of the GNU -Free Documentation License (FDL), either version 1.2 of the License, or -(at your option) any later version published by the Free Software -Foundation (FSF); with no Invariant Sections, with no Front-Cover Text, -and with no Back-Cover Texts. - - This manual is covered by the GNU GPL. You can redistribute it -and/or modify it under the terms of the GNU General Public License -(GPL), either version 2 of the License, or (at your option) any later -version published by the Free Software Foundation (FSF). - - -On Debian systems, the complete text of the GNU General Public License -can be found in `/usr/share/common-licenses/GPL', the complete text of -the GNU Library General Public License can be found in -`/usr/share/common-licenses/LGPL', and the complete text of the GNU -Free Documentation License can be found in `/usr/share/common-licenses/GFDL' diff --git a/tests/cluecode/data/copyright_fossology/testdata118.yml b/tests/cluecode/data/copyright_fossology/testdata118.yml new file mode 100644 index 00000000000..86430175b65 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata118.yml @@ -0,0 +1,43 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Artifex Software Inc. + - copyright Adobe Systems Incorporated + - Copyright (c) 1997-2002 Graeme W. Gill + - Copyright (c) 1999-2000 Image Power, Inc. + - Copyright (c) 1999-2000 The University of British Columbia + - Copyright (c) 2001-2003 Michael David Adams + - copyright (c) 1991-1998, Thomas G. Lane + - copyright holder, Aladdin Enterprises of Menlo Park + - copyright by the Free Software Foundation + - copyright by M.I.T. + - Copyright property of CompuServe Incorporated + - Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson + - Copyright (c) 2000-2002 Glenn Randers-Pehrson + - Copyright (c) 1998, 1999 Glenn Randers-Pehrson + - Copyright (c) 1996, 1997 Andreas Dilger + - Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + - Copyright (c) 1995-2005 Jean-loup Gailly and Mark Adler +holders: + - Artifex Software Inc. + - Adobe Systems Incorporated + - Graeme W. Gill + - Image Power, Inc. + - The University of British Columbia + - Michael David Adams + - Thomas G. Lane + - Aladdin Enterprises of Menlo Park + - the Free Software Foundation + - M.I.T. + - CompuServe Incorporated + - Glenn Randers-Pehrson + - Glenn Randers-Pehrson + - Glenn Randers-Pehrson + - Andreas Dilger + - Guy Eric Schalnat, Group 42, Inc. + - Jean-loup Gailly and Mark Adler +authors: + - Masayuki Hatta (mhatta) + - artofcode LLC. http://artofcode.com diff --git a/tests/cluecode/data/copyright_fossology/testdata118_raw b/tests/cluecode/data/copyright_fossology/testdata118_raw deleted file mode 100644 index 9817769665d..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata118_raw +++ /dev/null @@ -1,430 +0,0 @@ -This package was debianized by Masayuki Hatta (mhatta) on -Tue, 23 Mar 2004 19:46:37 +0900. - -It was downloaded from ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/ - -Note: The directory Resource/CMap is stripped from the source tarball, -as its content is not GPL-licensed (only verbatim copying is allowed). -Also, jasper/doc/*.pdf have been removed since their corresponding -sources are not available. - -Upstream Author: artofcode LLC. - -Copyright: - -From LICENSE: - - Copyright (c) Artifex Software Inc., All Rights Reserved. - - The files in the src, lib, toolbin, examples, ijs, doc and man - directories (folders) and any subdirectories (sub-folders) thereof - are part of GPL Ghostscript. - - The files in the Resource directory and any subdirectories thereof - are also part of GPL Ghostscript, with the explicit exception of the - files in the CMap subdirectory. The CMap files are copyright Adobe - Systems Incorporated and covered by a separate license which permits - only verbatim distribution. - - (Non-free CMap files have been removed from the Debian package. - - ed.) - - GPL Ghostscript is free software; you can redistribute it and/or - modify it under the terms of version 2 of the GNU General Public - License as published by the Free Software Foundation. - - GPL Ghostscript 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 so you can know your rights and - responsibilities. It should be in a file named doc/COPYING. If not, - write to the Free Software Foundation, Inc., 51 Franklin Street, - Fifth Floor, Boston, MA 02110-1301, USA. - - --- - - GPL Ghostscript contains an implementation of techniques covered by - US Patents 5,055,942 and 5,917,614, and corresponding international - patents. These patents are licensed for use with GPL Ghostscript - under the following grant: - - Whereas, Raph Levien (hereinafter "Inventor") has obtained patent - protection for related technology (hereinafter "Patented - Technology"), Inventor wishes to aid the the GNU free software - project in achieving its goals, and Inventor also wishes to increase - public awareness of Patented Technology, Inventor hereby grants a - fully paid up, nonexclusive, royalty free license to practice the - patents listed below ("the Patents") if and only if practiced in - conjunction with software distributed under the terms of any version - of the GNU General Public License as published by the Free Software - Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. Inventor reserves all other rights, including without - limitation, licensing for software not distributed under the GNU - General Public License. - - 5055942 Photographic image reproduction device using digital - halftoning to screen images allowing adjustable coarseness - - 5917614 Method and apparatus for error diffusion screening of - images with improved smoothness in highlight and shadow - regions - -On Debian systems, the complete text of the GNU General Public License -Version 2 can be found in `/usr/share/common-licenses/GPL-2'. - -The GPL Ghostscript distribution contains several third party -software, and some of them are governed by different licenses instead -of GNU GPL2. - -For files in the icclib directory: - - ************************************************************************* - Copyright (c) 1997-2002 Graeme W. Gill - - Permission is hereby granted, to use, copy, modify, distribute, and - sell this software and its associated documentation files (the - "Software") for any purpose without fee, provided that: - - 1) The above copyright notices and this permission notice - accompany all source code copies of the Software and - related documentation. and - - 2) If executable code based on the Software only is - distributed, then the accompanying documentation must - aknowledge that "this software is based in part on the work - of Graeme W. Gill". and - - 3) It is accepted that Graeme W. Gill (the "Author") accepts - NO LIABILITY for damages of any kind. The Software is - provided without fee by the Author "AS-IS" and without - warranty of any kind, express, implied or otherwise, - including without limitation, any warranty of - merchantability or fitness for a particular purpose. and - - 4) These conditions apply to any software derived from or - based on the Software, not just to the unmodified library. - and - - 5) Except as contained in this notice, or in the required - acknowledgment, the name of the Author, or the name of any - organization or company affiliated with the Author may not - be used in any advertising or publicity relating to the - Software, without the specific, prior written permission of - the Author. - - ************************************************************************* - -For files in the jasper directory: - - JasPer License Version 2.0 - - Copyright (c) 1999-2000 Image Power, Inc. - Copyright (c) 1999-2000 The University of British Columbia - Copyright (c) 2001-2003 Michael David Adams - - All rights reserved. - - Permission is hereby granted, free of charge, to any person (the - "User") obtaining a copy of this software and associated - documentation files (the "Software"), to deal in the Software - without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to - do so, subject to the following conditions: - - 1. The above copyright notices and this permission notice (which - includes the disclaimer below) shall be included in all copies or - substantial portions of the Software. - - 2. The name of a copyright holder shall not be used to endorse or - promote products derived from the Software without specific prior - written permission. - - THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS - LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT - UNDER THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT - HOLDERS "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 COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY - DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - OF THIS SOFTWARE. NO ASSURANCES ARE PROVIDED BY THE COPYRIGHT - HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE THE PATENT OR OTHER - INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. EACH COPYRIGHT - HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS BROUGHT BY ANY - OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS - OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS GRANTED - HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE - ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE - IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN - MISSION-CRITICAL SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF - NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, - AIR TRAFFIC CONTROL SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR - WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE SOFTWARE OR SYSTEM - COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE PHYSICAL OR - ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES"). THE COPYRIGHT - HOLDERS SPECIFICALLY DISCLAIM ANY EXPRESS OR IMPLIED WARRANTY OF - FITNESS FOR HIGH RISK ACTIVITIES. - - (jasper/doc/*.pdf have been removed since their corresponding - sources are not available - ed.) - -For files in the jbig2dec directory: - - The files in this directory (folder) and any subdirectories - (sub-folders) thereof are part of jbig2dec, with the exception of - certain source files included to support portability which are - marked otherwise in their copyright headers. - - jbig2dec is free software; you can redistribute it and/or modify it - under the terms of version 2 of the GNU General Public License as - published by the Free Software Foundation. - - This software 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 in the file named COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - - In addition, specific permission is given to link jbig2dec to or - compile jbig2dec into AFPL Ghostscript and to distribute same under - the AFPL license. - -For files in the jpeg directory: - - (Quoted from jpeg/README) - - LEGAL ISSUES - ============ - - The authors make NO WARRANTY or representation, either express or - implied, with respect to this software, its quality, accuracy, - merchantability, or fitness for a particular purpose. This software - is provided "AS IS", and you, its user, assume the entire risk as to - its quality and accuracy. - - This software is copyright (c) 1991-1998, Thomas G. Lane. All - Rights Reserved except as specified below. - - Permission is hereby granted to use, copy, modify, and distribute - this software (or portions thereof) for any purpose, without fee, - subject to these conditions: (1) If any part of the source code for - this software is distributed, then this README file must be - included, with this copyright and no-warranty notice unaltered; and - any additions, deletions, or changes to the original files must be - clearly indicated in accompanying documentation. (2) If only - executable code is distributed, then the accompanying documentation - must state that "this software is based in part on the work of the - Independent JPEG Group". (3) Permission for use of this software is - granted only if the user accepts full responsibility for any - undesirable consequences; the authors accept NO LIABILITY for - damages of any kind. - - These conditions apply to any software derived from or based on the - IJG code, not just to the unmodified library. If you use our work, - you ought to acknowledge us. - - Permission is NOT granted for the use of any IJG author's name or - company name in advertising or publicity relating to this software - or products derived from it. This software may be referred to only - as "the Independent JPEG Group's software". - - We specifically permit and encourage the use of this software as the - basis of commercial products, provided that all warranty or - liability claims are assumed by the product vendor. - - ansi2knr.c is included in this distribution by permission of - L. Peter Deutsch, sole proprietor of its copyright holder, Aladdin - Enterprises of Menlo Park, CA. ansi2knr.c is NOT covered by the - above copyright and conditions, but instead by the usual - distribution terms of the Free Software Foundation; principally, - that you must include source code if you redistribute it. (See the - file ansi2knr.c for full details.) However, since ansi2knr.c is not - needed as part of any program generated from the IJG code, this does - not limit you more than the foregoing paragraphs do. - - The Unix configuration script "configure" was produced with GNU - Autoconf. It is copyright by the Free Software Foundation but is - freely distributable. The same holds for its supporting scripts - (config.guess, config.sub, ltconfig, ltmain.sh). Another support - script, install-sh, is copyright by M.I.T. but is also freely - distributable. - - It appears that the arithmetic coding option of the JPEG spec is - covered by patents owned by IBM, AT&T, and Mitsubishi. Hence - arithmetic coding cannot legally be used without obtaining one or - more licenses. For this reason, support for arithmetic coding has - been removed from the free JPEG software. (Since arithmetic coding - provides only a marginal gain over the unpatented Huffman mode, it - is unlikely that very many implementations will support it.) So far - as we are aware, there are no patent restrictions on the remaining - code. - - The IJG distribution formerly included code to read and write GIF - files. To avoid entanglement with the Unisys LZW patent, GIF - reading support has been removed altogether, and the GIF writer has - been simplified to produce "uncompressed GIFs". This technique does - not use the LZW algorithm; the resulting GIF files are larger than - usual, but are readable by all standard GIF decoders. - - We are required to state that - "The Graphics Interchange Format(c) is the Copyright property of - CompuServe Incorporated. GIF(sm) is a Service Mark property of - CompuServe Incorporated." - - (The LZW Patent is now void - ed.) - -For files in the libpng directory: - - This copy of the libpng notices is provided for your convenience. - In case of any discrepancy between this copy and the notices in the - file png.h that is included in the libpng distribution, the latter - shall prevail. - - COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: - - If you modify libpng you may insert additional notices immediately - following this sentence. - - libpng versions 1.2.6, August 15, 2004, through 1.2.18, May 15, - 2007, are Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and - are distributed according to the same disclaimer and license as - libpng-1.2.5 with the following individual added to the list of - Contributing Authors - - Cosmin Truta - - libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, - 2002, are Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are - distributed according to the same disclaimer and license as - libpng-1.0.6 with the following individuals added to the list of - Contributing Authors - - Simon-Pierre Cadieux - Eric S. Raymond - Gilles Vollant - - and with the following additions to the disclaimer: - - There is no warranty against interference with your enjoyment of - the library or against infringement. There is no warranty that - our efforts or the library will fulfill any of your particular - purposes or needs. This library is provided with all faults, and - the entire risk of satisfactory quality, performance, accuracy, - and effort is with the user. - - libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, - are Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are - distributed according to the same disclaimer and license as - libpng-0.96, with the following individuals added to the list of - Contributing Authors: - - Tom Lane - Glenn Randers-Pehrson - Willem van Schaik - - libpng versions 0.89, June 1996, through 0.96, May 1997, are - Copyright (c) 1996, 1997 Andreas Dilger Distributed according to the - same disclaimer and license as libpng-0.88, with the following - individuals added to the list of Contributing Authors: - - John Bowler - Kevin Bracey - Sam Bushell - Magnus Holmgren - Greg Roelofs - Tom Tanner - - libpng versions 0.5, May 1995, through 0.88, January 1996, are - Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - - For the purposes of this copyright and license, "Contributing - Authors" is defined as the following set of individuals: - - Andreas Dilger - Dave Martindale - Guy Eric Schalnat - Paul Schmidt - Tim Wegner - - The PNG Reference Library is supplied "AS IS". The Contributing - Authors and Group 42, Inc. disclaim all warranties, expressed or - implied, including, without limitation, the warranties of - merchantability and of fitness for any purpose. The Contributing - Authors and Group 42, Inc. assume no liability for direct, - indirect, incidental, special, exemplary, or consequential damages, - which may result from the use of the PNG Reference Library, even if - advised of the possibility of such damage. - - Permission is hereby granted to use, copy, modify, and distribute - this source code, or portions hereof, for any purpose, without fee, - subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented. - - 2. Altered versions must be plainly marked as such and must not be - misrepresented as being the original source. - - 3. This Copyright notice may not be removed or altered from any - source or altered source distribution. - - The Contributing Authors and Group 42, Inc. specifically permit, - without fee, and encourage the use of this source code as a - component to supporting the PNG file format in commercial products. - If you use this source code in a product, acknowledgment is not - required but would be appreciated. - - - A "png_get_copyright" function is available, for convenient use in - "about" boxes and the like: - - printf("%s",png_get_copyright(NULL)); - - Also, the PNG logo (in PNG format, of course) is supplied in the - files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). - - Libpng is OSI Certified Open Source Software. OSI Certified Open - Source is a certification mark of the Open Source Initiative. - - Glenn Randers-Pehrson - glennrp at users.sourceforge.net - May 15, 2007 - -For files in the zlib directory: - - Copyright (c) 1995-2005 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - - The data format used by the zlib library is described by RFCs - (Request for Comments) 1950 to 1952 in the files - http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt - (deflate format) and rfc1952.txt (gzip format). diff --git a/tests/cluecode/data/copyright_fossology/testdata119.yml b/tests/cluecode/data/copyright_fossology/testdata119.yml new file mode 100644 index 00000000000..86430175b65 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata119.yml @@ -0,0 +1,43 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Artifex Software Inc. + - copyright Adobe Systems Incorporated + - Copyright (c) 1997-2002 Graeme W. Gill + - Copyright (c) 1999-2000 Image Power, Inc. + - Copyright (c) 1999-2000 The University of British Columbia + - Copyright (c) 2001-2003 Michael David Adams + - copyright (c) 1991-1998, Thomas G. Lane + - copyright holder, Aladdin Enterprises of Menlo Park + - copyright by the Free Software Foundation + - copyright by M.I.T. + - Copyright property of CompuServe Incorporated + - Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson + - Copyright (c) 2000-2002 Glenn Randers-Pehrson + - Copyright (c) 1998, 1999 Glenn Randers-Pehrson + - Copyright (c) 1996, 1997 Andreas Dilger + - Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + - Copyright (c) 1995-2005 Jean-loup Gailly and Mark Adler +holders: + - Artifex Software Inc. + - Adobe Systems Incorporated + - Graeme W. Gill + - Image Power, Inc. + - The University of British Columbia + - Michael David Adams + - Thomas G. Lane + - Aladdin Enterprises of Menlo Park + - the Free Software Foundation + - M.I.T. + - CompuServe Incorporated + - Glenn Randers-Pehrson + - Glenn Randers-Pehrson + - Glenn Randers-Pehrson + - Andreas Dilger + - Guy Eric Schalnat, Group 42, Inc. + - Jean-loup Gailly and Mark Adler +authors: + - Masayuki Hatta (mhatta) + - artofcode LLC. http://artofcode.com diff --git a/tests/cluecode/data/copyright_fossology/testdata119_raw b/tests/cluecode/data/copyright_fossology/testdata119_raw deleted file mode 100644 index 9e082ade3f6..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata119_raw +++ /dev/null @@ -1,430 +0,0 @@ -This package was debianized by Masayuki Hatta (mhatta) on -Tue, 23 Mar 2004 19:46:37 +0900. - -It was downloaded from ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/ - -Note: The directory Resource/CMap is stripped from the source tarball, -as its content is not GPL-licensed (only verbatim copying is allowed). -Also, jasper/doc/*.pdf have been removed since their corresponding -sources are not available. - -Upstream Author: artofcode LLC. - -Copyright: - -From LICENSE: - - Copyright (c) Artifex Software Inc., All Rights Reserved. - - The files in the src, lib, toolbin, examples, ijs, doc and man - directories (folders) and any subdirectories (sub-folders) thereof - are part of GPL Ghostscript. - - The files in the Resource directory and any subdirectories thereof - are also part of GPL Ghostscript, with the explicit exception of the - files in the CMap subdirectory. The CMap files are copyright Adobe - Systems Incorporated and covered by a separate license which permits - only verbatim distribution. - - (Non-free CMap files have been removed from the Debian package. - - ed.) - - GPL Ghostscript is free software; you can redistribute it and/or - modify it under the terms of version 2 of the GNU General Public - License as published by the Free Software Foundation. - - GPL Ghostscript 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 so you can know your rights and - responsibilities. It should be in a file named doc/COPYING. If not, - write to the Free Software Foundation, Inc., 51 Franklin Street, - Fifth Floor, Boston, MA 02110-1301, USA. - - --- - - GPL Ghostscript contains an implementation of techniques covered by - US Patents 5,055,942 and 5,917,614, and corresponding international - patents. These patents are licensed for use with GPL Ghostscript - under the following grant: - - Whereas, Raph Levien (hereinafter "Inventor") has obtained patent - protection for related technology (hereinafter "Patented - Technology"), Inventor wishes to aid the the GNU free software - project in achieving its goals, and Inventor also wishes to increase - public awareness of Patented Technology, Inventor hereby grants a - fully paid up, nonexclusive, royalty free license to practice the - patents listed below ("the Patents") if and only if practiced in - conjunction with software distributed under the terms of any version - of the GNU General Public License as published by the Free Software - Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. Inventor reserves all other rights, including without - limitation, licensing for software not distributed under the GNU - General Public License. - - 5055942 Photographic image reproduction device using digital - halftoning to screen images allowing adjustable coarseness - - 5917614 Method and apparatus for error diffusion screening of - images with improved smoothness in highlight and shadow - regions - -On Debian systems, the complete text of the GNU General Public License -Version 2 can be found in `/usr/share/common-licenses/GPL-2'. - -The GPL Ghostscript distribution contains several third party -software, and some of them are governed by different licenses instead -of GNU GPL2. - -For files in the icclib directory: - - ************************************************************************* - Copyright (c) 1997-2002 Graeme W. Gill - - Permission is hereby granted, to use, copy, modify, distribute, and - sell this software and its associated documentation files (the - "Software") for any purpose without fee, provided that: - - 1) The above copyright notices and this permission notice - accompany all source code copies of the Software and - related documentation. and - - 2) If executable code based on the Software only is - distributed, then the accompanying documentation must - aknowledge that "this software is based in part on the work - of Graeme W. Gill". and - - 3) It is accepted that Graeme W. Gill (the "Author") accepts - NO LIABILITY for damages of any kind. The Software is - provided without fee by the Author "AS-IS" and without - warranty of any kind, express, implied or otherwise, - including without limitation, any warranty of - merchantability or fitness for a particular purpose. and - - 4) These conditions apply to any software derived from or - based on the Software, not just to the unmodified library. - and - - 5) Except as contained in this notice, or in the required - acknowledgment, the name of the Author, or the name of any - organization or company affiliated with the Author may not - be used in any advertising or publicity relating to the - Software, without the specific, prior written permission of - the Author. - - ************************************************************************* - -For files in the jasper directory: - - JasPer License Version 2.0 - - Copyright (c) 1999-2000 Image Power, Inc. - Copyright (c) 1999-2000 The University of British Columbia - Copyright (c) 2001-2003 Michael David Adams - - All rights reserved. - - Permission is hereby granted, free of charge, to any person (the - "User") obtaining a copy of this software and associated - documentation files (the "Software"), to deal in the Software - without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to - do so, subject to the following conditions: - - 1. The above copyright notices and this permission notice (which - includes the disclaimer below) shall be included in all copies or - substantial portions of the Software. - - 2. The name of a copyright holder shall not be used to endorse or - promote products derived from the Software without specific prior - written permission. - - THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS - LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT - UNDER THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT - HOLDERS "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 COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY - DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - OF THIS SOFTWARE. NO ASSURANCES ARE PROVIDED BY THE COPYRIGHT - HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE THE PATENT OR OTHER - INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. EACH COPYRIGHT - HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS BROUGHT BY ANY - OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS - OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS GRANTED - HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE - ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE - IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN - MISSION-CRITICAL SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF - NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, - AIR TRAFFIC CONTROL SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR - WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE SOFTWARE OR SYSTEM - COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE PHYSICAL OR - ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES"). THE COPYRIGHT - HOLDERS SPECIFICALLY DISCLAIM ANY EXPRESS OR IMPLIED WARRANTY OF - FITNESS FOR HIGH RISK ACTIVITIES. - - (jasper/doc/*.pdf have been removed since their corresponding - sources are not available - ed.) - -For files in the jbig2dec directory: - - The files in this directory (folder) and any subdirectories - (sub-folders) thereof are part of jbig2dec, with the exception of - certain source files included to support portability which are - marked otherwise in their copyright headers. - - jbig2dec is free software; you can redistribute it and/or modify it - under the terms of version 2 of the GNU General Public License as - published by the Free Software Foundation. - - This software 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 in the file named COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - - In addition, specific permission is given to link jbig2dec to or - compile jbig2dec into AFPL Ghostscript and to distribute same under - the AFPL license. - -For files in the jpeg directory: - - (Quoted from jpeg/README) - - LEGAL ISSUES - ============ - - The authors make NO WARRANTY or representation, either express or - implied, with respect to this software, its quality, accuracy, - merchantability, or fitness for a particular purpose. This software - is provided "AS IS", and you, its user, assume the entire risk as to - its quality and accuracy. - - This software is copyright (c) 1991-1998, Thomas G. Lane. All - Rights Reserved except as specified below. - - Permission is hereby granted to use, copy, modify, and distribute - this software (or portions thereof) for any purpose, without fee, - subject to these conditions: (1) If any part of the source code for - this software is distributed, then this README file must be - included, with this copyright and no-warranty notice unaltered; and - any additions, deletions, or changes to the original files must be - clearly indicated in accompanying documentation. (2) If only - executable code is distributed, then the accompanying documentation - must state that "this software is based in part on the work of the - Independent JPEG Group". (3) Permission for use of this software is - granted only if the user accepts full responsibility for any - undesirable consequences; the authors accept NO LIABILITY for - damages of any kind. - - These conditions apply to any software derived from or based on the - IJG code, not just to the unmodified library. If you use our work, - you ought to acknowledge us. - - Permission is NOT granted for the use of any IJG author's name or - company name in advertising or publicity relating to this software - or products derived from it. This software may be referred to only - as "the Independent JPEG Group's software". - - We specifically permit and encourage the use of this software as the - basis of commercial products, provided that all warranty or - liability claims are assumed by the product vendor. - - ansi2knr.c is included in this distribution by permission of - L. Peter Deutsch, sole proprietor of its copyright holder, Aladdin - Enterprises of Menlo Park, CA. ansi2knr.c is NOT covered by the - above copyright and conditions, but instead by the usual - distribution terms of the Free Software Foundation; principally, - that you must include source code if you redistribute it. (See the - file ansi2knr.c for full details.) However, since ansi2knr.c is not - needed as part of any program generated from the IJG code, this does - not limit you more than the foregoing paragraphs do. - - The Unix configuration script "configure" was produced with GNU - Autoconf. It is copyright by the Free Software Foundation but is - freely distributable. The same holds for its supporting scripts - (config.guess, config.sub, ltconfig, ltmain.sh). Another support - script, install-sh, is copyright by M.I.T. but is also freely - distributable. - - It appears that the arithmetic coding option of the JPEG spec is - covered by patents owned by IBM, AT&T, and Mitsubishi. Hence - arithmetic coding cannot legally be used without obtaining one or - more licenses. For this reason, support for arithmetic coding has - been removed from the free JPEG software. (Since arithmetic coding - provides only a marginal gain over the unpatented Huffman mode, it - is unlikely that very many implementations will support it.) So far - as we are aware, there are no patent restrictions on the remaining - code. - - The IJG distribution formerly included code to read and write GIF - files. To avoid entanglement with the Unisys LZW patent, GIF - reading support has been removed altogether, and the GIF writer has - been simplified to produce "uncompressed GIFs". This technique does - not use the LZW algorithm; the resulting GIF files are larger than - usual, but are readable by all standard GIF decoders. - - We are required to state that - "The Graphics Interchange Format(c) is the Copyright property of - CompuServe Incorporated. GIF(sm) is a Service Mark property of - CompuServe Incorporated." - - (The LZW Patent is now void - ed.) - -For files in the libpng directory: - - This copy of the libpng notices is provided for your convenience. - In case of any discrepancy between this copy and the notices in the - file png.h that is included in the libpng distribution, the latter - shall prevail. - - COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: - - If you modify libpng you may insert additional notices immediately - following this sentence. - - libpng versions 1.2.6, August 15, 2004, through 1.2.18, May 15, - 2007, are Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and - are distributed according to the same disclaimer and license as - libpng-1.2.5 with the following individual added to the list of - Contributing Authors - - Cosmin Truta - - libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, - 2002, are Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are - distributed according to the same disclaimer and license as - libpng-1.0.6 with the following individuals added to the list of - Contributing Authors - - Simon-Pierre Cadieux - Eric S. Raymond - Gilles Vollant - - and with the following additions to the disclaimer: - - There is no warranty against interference with your enjoyment of - the library or against infringement. There is no warranty that - our efforts or the library will fulfill any of your particular - purposes or needs. This library is provided with all faults, and - the entire risk of satisfactory quality, performance, accuracy, - and effort is with the user. - - libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, - are Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are - distributed according to the same disclaimer and license as - libpng-0.96, with the following individuals added to the list of - Contributing Authors: - - Tom Lane - Glenn Randers-Pehrson - Willem van Schaik - - libpng versions 0.89, June 1996, through 0.96, May 1997, are - Copyright (c) 1996, 1997 Andreas Dilger Distributed according to the - same disclaimer and license as libpng-0.88, with the following - individuals added to the list of Contributing Authors: - - John Bowler - Kevin Bracey - Sam Bushell - Magnus Holmgren - Greg Roelofs - Tom Tanner - - libpng versions 0.5, May 1995, through 0.88, January 1996, are - Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - - For the purposes of this copyright and license, "Contributing - Authors" is defined as the following set of individuals: - - Andreas Dilger - Dave Martindale - Guy Eric Schalnat - Paul Schmidt - Tim Wegner - - The PNG Reference Library is supplied "AS IS". The Contributing - Authors and Group 42, Inc. disclaim all warranties, expressed or - implied, including, without limitation, the warranties of - merchantability and of fitness for any purpose. The Contributing - Authors and Group 42, Inc. assume no liability for direct, - indirect, incidental, special, exemplary, or consequential damages, - which may result from the use of the PNG Reference Library, even if - advised of the possibility of such damage. - - Permission is hereby granted to use, copy, modify, and distribute - this source code, or portions hereof, for any purpose, without fee, - subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented. - - 2. Altered versions must be plainly marked as such and must not be - misrepresented as being the original source. - - 3. This Copyright notice may not be removed or altered from any - source or altered source distribution. - - The Contributing Authors and Group 42, Inc. specifically permit, - without fee, and encourage the use of this source code as a - component to supporting the PNG file format in commercial products. - If you use this source code in a product, acknowledgment is not - required but would be appreciated. - - - A "png_get_copyright" function is available, for convenient use in - "about" boxes and the like: - - printf("%s",png_get_copyright(NULL)); - - Also, the PNG logo (in PNG format, of course) is supplied in the - files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). - - Libpng is OSI Certified Open Source Software. OSI Certified Open - Source is a certification mark of the Open Source Initiative. - - Glenn Randers-Pehrson - glennrp at users.sourceforge.net - May 15, 2007 - -For files in the zlib directory: - - Copyright (c) 1995-2005 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - - The data format used by the zlib library is described by RFCs - (Request for Comments) 1950 to 1952 in the files - http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt - (deflate format) and rfc1952.txt (gzip format). diff --git a/tests/cluecode/data/copyright_fossology/testdata11_raw b/tests/cluecode/data/copyright_fossology/testdata11_raw deleted file mode 100644 index ad5a36f4ff2..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata11_raw +++ /dev/null @@ -1,167 +0,0 @@ -/* - * SH4 emulation - * - * Copyright (c) 2005 Samuel Tardieu - * - * 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 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 _CPU_SH4_H -#define _CPU_SH4_H - -#include "config.h" - -#define TARGET_LONG_BITS 32 -#define TARGET_HAS_ICE 1 - -#define ELF_MACHINE EM_SH - -#include "cpu-defs.h" - -#include "softfloat.h" - -#define TARGET_PAGE_BITS 12 /* 4k XXXXX */ - -#define SR_MD (1 << 30) -#define SR_RB (1 << 29) -#define SR_BL (1 << 28) -#define SR_FD (1 << 15) -#define SR_M (1 << 9) -#define SR_Q (1 << 8) -#define SR_S (1 << 1) -#define SR_T (1 << 0) - -#define FPSCR_FR (1 << 21) -#define FPSCR_SZ (1 << 20) -#define FPSCR_PR (1 << 19) -#define FPSCR_DN (1 << 18) -#define DELAY_SLOT (1 << 0) -#define DELAY_SLOT_CONDITIONAL (1 << 1) -#define DELAY_SLOT_TRUE (1 << 2) -#define DELAY_SLOT_CLEARME (1 << 3) -/* The dynamic value of the DELAY_SLOT_TRUE flag determines whether the jump - * after the delay slot should be taken or not. It is calculated from SR_T. - * - * It is unclear if it is permitted to modify the SR_T flag in a delay slot. - * The use of DELAY_SLOT_TRUE flag makes us accept such SR_T modification. - */ - -/* XXXXX The structure could be made more compact */ -typedef struct tlb_t { - uint8_t asid; /* address space identifier */ - uint32_t vpn; /* virtual page number */ - uint8_t v; /* validity */ - uint32_t ppn; /* physical page number */ - uint8_t sz; /* page size */ - uint32_t size; /* cached page size in bytes */ - uint8_t sh; /* share status */ - uint8_t c; /* cacheability */ - uint8_t pr; /* protection key */ - uint8_t d; /* dirty */ - uint8_t wt; /* write through */ - uint8_t sa; /* space attribute (PCMCIA) */ - uint8_t tc; /* timing control */ -} tlb_t; - -#define UTLB_SIZE 64 -#define ITLB_SIZE 4 - -#define NB_MMU_MODES 2 - -typedef struct CPUSH4State { - uint32_t flags; /* general execution flags */ - uint32_t gregs[24]; /* general registers */ - float32 fregs[32]; /* floating point registers */ - uint32_t sr; /* status register */ - uint32_t ssr; /* saved status register */ - uint32_t spc; /* saved program counter */ - uint32_t gbr; /* global base register */ - uint32_t vbr; /* vector base register */ - uint32_t sgr; /* saved global register 15 */ - uint32_t dbr; /* debug base register */ - uint32_t pc; /* program counter */ - uint32_t delayed_pc; /* target of delayed jump */ - uint32_t mach; /* multiply and accumulate high */ - uint32_t macl; /* multiply and accumulate low */ - uint32_t pr; /* procedure register */ - uint32_t fpscr; /* floating point status/control register */ - uint32_t fpul; /* floating point communication register */ - - /* temporary float registers */ - float32 ft0, ft1; - float64 dt0, dt1; - float_status fp_status; - - /* Those belong to the specific unit (SH7750) but are handled here */ - uint32_t mmucr; /* MMU control register */ - uint32_t pteh; /* page table entry high register */ - uint32_t ptel; /* page table entry low register */ - uint32_t ptea; /* page table entry assistance register */ - uint32_t ttb; /* tranlation table base register */ - uint32_t tea; /* TLB exception address register */ - uint32_t tra; /* TRAPA exception register */ - uint32_t expevt; /* exception event register */ - uint32_t intevt; /* interrupt event register */ - - jmp_buf jmp_env; - int user_mode_only; - int interrupt_request; - int halted; - int exception_index; - CPU_COMMON tlb_t utlb[UTLB_SIZE]; /* unified translation table */ - tlb_t itlb[ITLB_SIZE]; /* instruction translation table */ - void *intc_handle; -} CPUSH4State; - -CPUSH4State *cpu_sh4_init(const char *cpu_model); -int cpu_sh4_exec(CPUSH4State * s); -int cpu_sh4_signal_handler(int host_signum, void *pinfo, - void *puc); - -#include "softfloat.h" - -#define CPUState CPUSH4State -#define cpu_init cpu_sh4_init -#define cpu_exec cpu_sh4_exec -#define cpu_gen_code cpu_sh4_gen_code -#define cpu_signal_handler cpu_sh4_signal_handler - -/* MMU modes definitions */ -#define MMU_MODE0_SUFFIX _kernel -#define MMU_MODE1_SUFFIX _user -#define MMU_USER_IDX 1 -static inline int cpu_mmu_index (CPUState *env) -{ - return (env->sr & SR_MD) == 0 ? 1 : 0; -} - -#include "cpu-all.h" - -/* Memory access type */ -enum { - /* Privilege */ - ACCESS_PRIV = 0x01, - /* Direction */ - ACCESS_WRITE = 0x02, - /* Type of instruction */ - ACCESS_CODE = 0x10, - ACCESS_INT = 0x20 -}; - -/* MMU control register */ -#define MMUCR 0x1F000010 -#define MMUCR_AT (1<<0) -#define MMUCR_SV (1<<8) - -#endif /* _CPU_SH4_H */ diff --git a/tests/cluecode/data/copyright_fossology/testdata12.yml b/tests/cluecode/data/copyright_fossology/testdata12.yml new file mode 100644 index 00000000000..1a35101b98e --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata12.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005 DMTF. +holders: + - DMTF diff --git a/tests/cluecode/data/copyright_fossology/testdata120.yml b/tests/cluecode/data/copyright_fossology/testdata120.yml new file mode 100644 index 00000000000..2100066b05e --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata120.yml @@ -0,0 +1,22 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005-2008, Linus Torvalds and others + - Copyright (c) 1995-1999, Cryptography Research, Inc. + - Copyright (c) 2003-2006, Davide Libenzi, Johannes E. Schindelin + - Copyright (c) 2005, Sebastian Kuzminsky + - (c) 2005-2006, Andres Salomon + - (c) 2005-2008, Gerrit Pape +holders: + - Linus Torvalds and others + - Cryptography Research, Inc. + - Davide Libenzi, Johannes E. Schindelin + - Sebastian Kuzminsky + - Andres Salomon + - Gerrit Pape +authors: + - Sebastian Kuzminsky + - Gerrit Pape + - Andres Salomon diff --git a/tests/cluecode/data/copyright_fossology/testdata120_raw b/tests/cluecode/data/copyright_fossology/testdata120_raw deleted file mode 100644 index 7b5f1896dbf..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata120_raw +++ /dev/null @@ -1,77 +0,0 @@ -Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat -Original-Source: http://www.kernel.org/pub/software/scm/git/ - -Files: * -Copyright (c) 2005-2008, Linus Torvalds and others. -License: GPL-2 - You can redistribute this software and/or modify it under the terms of - the GNU General Public License as published by the Free Software - Foundation; version 2 dated June, 1991. - . - 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. - . - On Debian systems, the complete text of the GNU General Public License - can be found in /usr/share/common-licenses/GPL-2 file. - -Files: mozilla-sha1/* -Copyright (c) 1995-1999, Cryptography Research, Inc. -License: MPL-1.1 | GPL-2+ - The contents of this file are subject to the Mozilla Public - License Version 1.1 (the "License"); you may not use this file - except in compliance with the License. You may obtain a copy of - the License at http://www.mozilla.org/MPL/ - . - Software distributed under the License is distributed on an "AS - IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - implied. See the License for the specific language governing - rights and limitations under the License. - . - Alternatively, the contents of this file may be used under the - terms of the GNU General Public License Version 2 or later (the - "GPL"), in which case the provisions of the GPL are applicable - instead of those above. If you wish to allow use of your - version of this file only under the terms of the GPL and not to - allow others to use your version of this file under the MPL, - indicate your decision by deleting the provisions above and - replace them with the notice and other provisions required by - the GPL. If you do not delete the provisions above, a recipient - may use your version of this file under either the MPL or the - GPL. - . - On Debian systems, the complete text of the GNU General Public License - can be found in /usr/share/common-licenses/GPL-2 file. - -Files: xdiff/* -Copyright (c) 2003-2006, Davide Libenzi, Johannes E. Schindelin -License: LGPL-2.1+ - 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. - . - On Debian systems, the complete text of the GNU Lesser General Public License - can be found in /usr/share/common-licenses/LGPL-2.1. - -Files: debian/* -Copyright (c) 2005, Sebastian Kuzminsky - (c) 2005-2006, Andres Salomon - (c) 2005-2008, Gerrit Pape - -This package was debianized by Sebastian Kuzminsky -on Thu, 5 May 2005 10:27:14 -0600, -and was adopted by Gerrit Pape -on Wed, 16 Nov 2005 19:37:14 +0000. - -The gitweb package was debianized by Andres Salomon -on Fri, 20 May 2005 11:23:12 -0400, -and adopted to be included in this package -on Thu, 27 Jul 2006 21:43:38 +0000. - diff --git a/tests/cluecode/data/copyright_fossology/testdata121.yml b/tests/cluecode/data/copyright_fossology/testdata121.yml new file mode 100644 index 00000000000..2100066b05e --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata121.yml @@ -0,0 +1,22 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005-2008, Linus Torvalds and others + - Copyright (c) 1995-1999, Cryptography Research, Inc. + - Copyright (c) 2003-2006, Davide Libenzi, Johannes E. Schindelin + - Copyright (c) 2005, Sebastian Kuzminsky + - (c) 2005-2006, Andres Salomon + - (c) 2005-2008, Gerrit Pape +holders: + - Linus Torvalds and others + - Cryptography Research, Inc. + - Davide Libenzi, Johannes E. Schindelin + - Sebastian Kuzminsky + - Andres Salomon + - Gerrit Pape +authors: + - Sebastian Kuzminsky + - Gerrit Pape + - Andres Salomon diff --git a/tests/cluecode/data/copyright_fossology/testdata121_raw b/tests/cluecode/data/copyright_fossology/testdata121_raw deleted file mode 100644 index dd2261a5b70..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata121_raw +++ /dev/null @@ -1,77 +0,0 @@ -Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat -Original-Source: http://www.kernel.org/pub/software/scm/git/ - -Files: * -Copyright (c) 2005-2008, Linus Torvalds and others. -License: GPL-2 - You can redistribute this software and/or modify it under the terms of - the GNU General Public License as published by the Free Software - Foundation; version 2 dated June, 1991. - . - 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. - . - On Debian systems, the complete text of the GNU General Public License - can be found in /usr/share/common-licenses/GPL-2 file. - -Files: mozilla-sha1/* -Copyright (c) 1995-1999, Cryptography Research, Inc. -License: MPL-1.1 | GPL-2+ - The contents of this file are subject to the Mozilla Public - License Version 1.1 (the "License"); you may not use this file - except in compliance with the License. You may obtain a copy of - the License at http://www.mozilla.org/MPL/ - . - Software distributed under the License is distributed on an "AS - IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - implied. See the License for the specific language governing - rights and limitations under the License. - . - Alternatively, the contents of this file may be used under the - terms of the GNU General Public License Version 2 or later (the - "GPL"), in which case the provisions of the GPL are applicable - instead of those above. If you wish to allow use of your - version of this file only under the terms of the GPL and not to - allow others to use your version of this file under the MPL, - indicate your decision by deleting the provisions above and - replace them with the notice and other provisions required by - the GPL. If you do not delete the provisions above, a recipient - may use your version of this file under either the MPL or the - GPL. - . - On Debian systems, the complete text of the GNU General Public License - can be found in /usr/share/common-licenses/GPL-2 file. - -Files: xdiff/* -Copyright (c) 2003-2006, Davide Libenzi, Johannes E. Schindelin -License: LGPL-2.1+ - 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. - . - On Debian systems, the complete text of the GNU Lesser General Public License - can be found in /usr/share/common-licenses/LGPL-2.1. - -Files: debian/* -Copyright (c) 2005, Sebastian Kuzminsky - (c) 2005-2006, Andres Salomon - (c) 2005-2008, Gerrit Pape - -This package was debianized by Sebastian Kuzminsky -on Thu, 5 May 2005 10:27:14 -0600, -and was adopted by Gerrit Pape -on Wed, 16 Nov 2005 19:37:14 +0000. - -The gitweb package was debianized by Andres Salomon -on Fri, 20 May 2005 11:23:12 -0400, -and adopted to be included in this package -on Thu, 27 Jul 2006 21:43:38 +0000. - diff --git a/tests/cluecode/data/copyright_fossology/testdata122.yml b/tests/cluecode/data/copyright_fossology/testdata122.yml new file mode 100644 index 00000000000..2100066b05e --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata122.yml @@ -0,0 +1,22 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005-2008, Linus Torvalds and others + - Copyright (c) 1995-1999, Cryptography Research, Inc. + - Copyright (c) 2003-2006, Davide Libenzi, Johannes E. Schindelin + - Copyright (c) 2005, Sebastian Kuzminsky + - (c) 2005-2006, Andres Salomon + - (c) 2005-2008, Gerrit Pape +holders: + - Linus Torvalds and others + - Cryptography Research, Inc. + - Davide Libenzi, Johannes E. Schindelin + - Sebastian Kuzminsky + - Andres Salomon + - Gerrit Pape +authors: + - Sebastian Kuzminsky + - Gerrit Pape + - Andres Salomon diff --git a/tests/cluecode/data/copyright_fossology/testdata122_raw b/tests/cluecode/data/copyright_fossology/testdata122_raw deleted file mode 100644 index dd2261a5b70..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata122_raw +++ /dev/null @@ -1,77 +0,0 @@ -Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat -Original-Source: http://www.kernel.org/pub/software/scm/git/ - -Files: * -Copyright (c) 2005-2008, Linus Torvalds and others. -License: GPL-2 - You can redistribute this software and/or modify it under the terms of - the GNU General Public License as published by the Free Software - Foundation; version 2 dated June, 1991. - . - 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. - . - On Debian systems, the complete text of the GNU General Public License - can be found in /usr/share/common-licenses/GPL-2 file. - -Files: mozilla-sha1/* -Copyright (c) 1995-1999, Cryptography Research, Inc. -License: MPL-1.1 | GPL-2+ - The contents of this file are subject to the Mozilla Public - License Version 1.1 (the "License"); you may not use this file - except in compliance with the License. You may obtain a copy of - the License at http://www.mozilla.org/MPL/ - . - Software distributed under the License is distributed on an "AS - IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - implied. See the License for the specific language governing - rights and limitations under the License. - . - Alternatively, the contents of this file may be used under the - terms of the GNU General Public License Version 2 or later (the - "GPL"), in which case the provisions of the GPL are applicable - instead of those above. If you wish to allow use of your - version of this file only under the terms of the GPL and not to - allow others to use your version of this file under the MPL, - indicate your decision by deleting the provisions above and - replace them with the notice and other provisions required by - the GPL. If you do not delete the provisions above, a recipient - may use your version of this file under either the MPL or the - GPL. - . - On Debian systems, the complete text of the GNU General Public License - can be found in /usr/share/common-licenses/GPL-2 file. - -Files: xdiff/* -Copyright (c) 2003-2006, Davide Libenzi, Johannes E. Schindelin -License: LGPL-2.1+ - 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. - . - On Debian systems, the complete text of the GNU Lesser General Public License - can be found in /usr/share/common-licenses/LGPL-2.1. - -Files: debian/* -Copyright (c) 2005, Sebastian Kuzminsky - (c) 2005-2006, Andres Salomon - (c) 2005-2008, Gerrit Pape - -This package was debianized by Sebastian Kuzminsky -on Thu, 5 May 2005 10:27:14 -0600, -and was adopted by Gerrit Pape -on Wed, 16 Nov 2005 19:37:14 +0000. - -The gitweb package was debianized by Andres Salomon -on Fri, 20 May 2005 11:23:12 -0400, -and adopted to be included in this package -on Thu, 27 Jul 2006 21:43:38 +0000. - diff --git a/tests/cluecode/data/copyright_fossology/testdata123.yml b/tests/cluecode/data/copyright_fossology/testdata123.yml new file mode 100644 index 00000000000..519dc39439c --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata123.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998-2008 Free Software Foundation, Inc. + - Copyright (c) 1998-2006 James Troup +holders: + - Free Software Foundation, Inc. + - James Troup diff --git a/tests/cluecode/data/copyright_fossology/testdata123_raw b/tests/cluecode/data/copyright_fossology/testdata123_raw deleted file mode 100644 index 5b0674a6fd1..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata123_raw +++ /dev/null @@ -1,40 +0,0 @@ -This is Debian GNU's prepackaged version of GnuPG, a free PGP -replacement. - -This package was put together by me, James Troup , -from the sources, which I obtained from -ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.6.tar.gz. The changes were -minimal, namely: - -- adding support for the Debian package maintenance scheme, by adding - various debian/* files. - -Program Copyright (c) 1998-2008 Free Software Foundation, Inc. -Modifications for Debian Copyright (c) 1998-2006 James Troup. - -GnuPG 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. - -GnuPG 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 with -your Debian GNU system, in /usr/share/common-licenses/GPL, or with the -Debian GNU gnupg source package as the file COPYING. If not, see - or write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -In addition, as a special exception, the Free Software Foundation -gives permission to link the code of the keyserver helper tools: -gpgkeys_ldap, gpgkeys_curl and gpgkeys_hkp with the OpenSSL project's -"OpenSSL" library (or with modified versions of it that use the same -license as the "OpenSSL" library), and distribute the linked -executables. You must obey the GNU General Public License in all -respects for all of the code used other than "OpenSSL". If you modify -this file, you may extend this exception to your version of the file, -but you are not obligated to do so. If you do not wish to do so, -delete this exception statement from your version. diff --git a/tests/cluecode/data/copyright_fossology/testdata124.yml b/tests/cluecode/data/copyright_fossology/testdata124.yml new file mode 100644 index 00000000000..519dc39439c --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata124.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998-2008 Free Software Foundation, Inc. + - Copyright (c) 1998-2006 James Troup +holders: + - Free Software Foundation, Inc. + - James Troup diff --git a/tests/cluecode/data/copyright_fossology/testdata124_raw b/tests/cluecode/data/copyright_fossology/testdata124_raw deleted file mode 100644 index 5b0674a6fd1..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata124_raw +++ /dev/null @@ -1,40 +0,0 @@ -This is Debian GNU's prepackaged version of GnuPG, a free PGP -replacement. - -This package was put together by me, James Troup , -from the sources, which I obtained from -ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-1.4.6.tar.gz. The changes were -minimal, namely: - -- adding support for the Debian package maintenance scheme, by adding - various debian/* files. - -Program Copyright (c) 1998-2008 Free Software Foundation, Inc. -Modifications for Debian Copyright (c) 1998-2006 James Troup. - -GnuPG 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. - -GnuPG 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 with -your Debian GNU system, in /usr/share/common-licenses/GPL, or with the -Debian GNU gnupg source package as the file COPYING. If not, see - or write to the Free Software Foundation, -Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -In addition, as a special exception, the Free Software Foundation -gives permission to link the code of the keyserver helper tools: -gpgkeys_ldap, gpgkeys_curl and gpgkeys_hkp with the OpenSSL project's -"OpenSSL" library (or with modified versions of it that use the same -license as the "OpenSSL" library), and distribute the linked -executables. You must obey the GNU General Public License in all -respects for all of the code used other than "OpenSSL". If you modify -this file, you may extend this exception to your version of the file, -but you are not obligated to do so. If you do not wish to do so, -delete this exception statement from your version. diff --git a/tests/cluecode/data/copyright_fossology/testdata125.yml b/tests/cluecode/data/copyright_fossology/testdata125.yml new file mode 100644 index 00000000000..18fadbc8a6e --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata125.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, + Inc. +holders: + - Free Software Foundation, Inc. diff --git a/tests/cluecode/data/copyright_fossology/testdata125_raw b/tests/cluecode/data/copyright_fossology/testdata125_raw deleted file mode 100644 index 1d4d19b88f1..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata125_raw +++ /dev/null @@ -1,33 +0,0 @@ -This is the Debian GNU/Linux prepackaged version of the grep program. -Currently Anibal Monsalve Salazar maintains the -Debian GNU/Linux version of grep. - -Robert van der Meulen and -Ryan M. Golbeck -were the previous maintainers. - -This package was created from the grep sources as found on the GNU -mirrors. grep.texi file was removed since it is not DFSG compliant - -Grep is copyrighted as described below: - - Copyright (c) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2004, - 2005 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA - 02110-1301, USA. - -On a Debian system you can find a copy of this license in -/usr/share/common-licenses/GPL. diff --git a/tests/cluecode/data/copyright_fossology/testdata126.yml b/tests/cluecode/data/copyright_fossology/testdata126.yml new file mode 100644 index 00000000000..4f0454d003f --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata126.yml @@ -0,0 +1,26 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1989-2000 Free Software Foundation, Inc. + - copyrighted by MIT + - Copyright 1991 Massachusetts Institute of Technology + - Copyright (c) 1994-2000, 2001, 2002 Free Software Foundation, Inc. + - Copyright (c) 2000 Free Software Foundation, Inc. + - Copyright (c) 1986 The Regents of the University of California +holders: + - Free Software Foundation, Inc. + - MIT + - Massachusetts Institute of Technology + - Free Software Foundation, Inc. + - Free Software Foundation, Inc. + - The Regents of the University of California +authors: + - James Clark + - Ted Harding and Werner Lemberg + - Fabrizio Polacco + - Colin Watson + - James Clark (jjc@jclark.com) + - Joergen Haegg (jh@axis.se) + - the University of California, Berkeley diff --git a/tests/cluecode/data/copyright_fossology/testdata126_raw b/tests/cluecode/data/copyright_fossology/testdata126_raw deleted file mode 100644 index 807220039ff..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata126_raw +++ /dev/null @@ -1,538 +0,0 @@ -This is the Debian GNU/Linux prepackaged version of the GNU groff -document formatting system. -GNU groff was written by James Clark . -It is now maintained by Ted Harding and -Werner Lemberg . - -This Debian package was previously maintained by Fabrizio Polacco -. -It is now maintained by Colin Watson . - -The original tarball came from : - 4c7a1b478d230696f14743772f31639f groff-1.18.1.tar.gz -and was simply renamed to groff_1.18.1.orig.tar.gz. - -Some patches have been applied to groff outside the debian directory. The -most visible of these is a patch for Japanese support (contributed by -Fumitoshi UKAI and others in the jgroff team), which adds the ascii8 and -nippon devices and a number of font files. This has been discussed on the -upstream mailing list, and the opinion there was that multi-byte language -support would be better implemented using preprocessors and a UTF-8 core. -However, at the time of writing, there are no known problems caused by this -patch, and until a more complete solution is implemented upstream this -provides a useful service to Japanese users of Debian. - -The Debian diff also appends /usr/share/groff/tmac to the default macro path -for compatibility with versions of groff earlier than 1.17 (patch by Colin -Watson). - -========================================================================= - -Copyright (c) 1989-2000 Free Software Foundation, Inc. - Written by James Clark (jjc@jclark.com) - -This file is part of groff. - -groff 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. - -groff 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 groff; see the file COPYING. If not, write to the Free Software -Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 -USA. - -On Debian systems, a copy of the GNU General Public License is available -in /usr/share/common-licenses/GPL as part of the base-files package. - -========================================================================= - -Included in this release are implementations of troff, pic, eqn, tbl, -grn, refer, -man, -mdoc, and -ms macros, and drivers for PostScript, TeX -dvi format, HP LaserJet 4 printers, Canon CAPSL printers, HTML format -(still alpha), and typewriter-like devices. Also included is a modified -version of the Berkeley -me macros, an enhanced version of the X11 -xditview previewer, and an implementation of the -mm macros contributed -by Joergen Haegg (jh@axis.se). - -xditview is copyrighted by MIT under the usual X terms. - -/* - * Copyright 1991 Massachusetts Institute of Technology - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - */ - -========================================================================= - -The groff manual is distributed under the terms of the GNU Free -Documentation License, whose text follows below. However, Debian does not -consider this free when the Front-Cover Texts or Back-Cover Texts options -are used. More recent versions of groff are distributed with a LICENSES file -containing the following text (excerpted): - - The groff program is a free software project. It is licensed under the GNU - General Public License (GNU GPL), version 2 or later. - - The file COPYING in the top directory of the groff source package contains a - copy of the GPL that was downloaded from the GNU web site - http://www.gnu.org/copyleft/gpl.txt at 1 dec 2003. - - All files part of groff are licensed under this version of the GPL (or - licenses which are compatible with the GPL). You are free to choose - version 2 or any subsequent version of the GPL. - -I e-mailed the upstream maintainer to clarify the intent of this. Here is -the relevant part of the reply: - - From: Werner LEMBERG - To: cjwatson@debian.org - Subject: Re: Clarifying the scope of groff/LICENSE - Date: Thu, 18 Nov 2004 00:19:52 +0100 (CET) - - > Since "compatible with the GPL" means to all intents and purposes - > "may be distributed under the terms of the GPL", can I correctly - > assume that groff/LICENSE grants me permission to distribute - > groff/doc/groff.texinfo and groff/doc/pic.ms under the terms of the - > GPL? - - This is the intention, of course. - - > If not, is the FDL thing from yesteryear going to be resolved some - > other way? I just want to make sure that I don't get forced to - > remove the groff manual, since that would really diminish the - > quality of the Debian package IMHO. - - Sigh. I haven't found time to revert the FDL stuff back to GPL. It - basically affects only Bernd Warken and me, and we have both agreed to - return to GPL in case FDL makes problems. - -(Note that this e-mail predates the current wording in LICENSES.) - -It is therefore my understanding that the copyright holders of the groff -documentation intend it to be distributable under the terms of the GPL -version 2 or later, and that there is no reason why this shouldn't extend to -the version in groff 1.18.1 (no material was removed from the documentation -in the process of applying the GPL to it). The FDL text that follows is for -information only. - -Copyright (c) 1994-2000, 2001, 2002 Free Software Foundation, Inc. - - Permission is granted to copy, distribute and/or modify this - document under the terms of the GNU Free Documentation License, - Version 1.1 or any later version published by the Free Software - Foundation; with no Invariant Sections, with the Front-Cover texts - being `A GNU Manual," and with the Back-Cover Texts as in (a) - below. A copy of the license is included in the section entitled - `GNU Free Documentation License." - - (a) The FSF's Back-Cover Text is: `You have freedom to copy and - modify this GNU Manual, like GNU software. Copies published by - the Free Software Foundation raise funds for GNU development." - - - GNU Free Documentation License - Version 1.1, March 2000 - - Copyright (c) 2000 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - -0. PREAMBLE - -The purpose of this License is to make a manual, textbook, or other -written document "free" in the sense of freedom: to assure everyone -the effective freedom to copy and redistribute it, with or without -modifying it, either commercially or noncommercially. Secondarily, -this License preserves for the author and publisher a way to get -credit for their work, while not being considered responsible for -modifications made by others. - -This License is a kind of "copyleft", which means that derivative -works of the document must themselves be free in the same sense. It -complements the GNU General Public License, which is a copyleft -license designed for free software. - -We have designed this License in order to use it for manuals for free -software, because free software needs free documentation: a free -program should come with manuals providing the same freedoms that the -software does. But this License is not limited to software manuals; -it can be used for any textual work, regardless of subject matter or -whether it is published as a printed book. We recommend this License -principally for works whose purpose is instruction or reference. - - -1. APPLICABILITY AND DEFINITIONS - -This License applies to any manual or other work that contains a -notice placed by the copyright holder saying it can be distributed -under the terms of this License. The "Document", below, refers to any -such manual or work. Any member of the public is a licensee, and is -addressed as "you". - -A "Modified Version" of the Document means any work containing the -Document or a portion of it, either copied verbatim, or with -modifications and/or translated into another language. - -A "Secondary Section" is a named appendix or a front-matter section of -the Document that deals exclusively with the relationship of the -publishers or authors of the Document to the Document's overall subject -(or to related matters) and contains nothing that could fall directly -within that overall subject. (For example, if the Document is in part a -textbook of mathematics, a Secondary Section may not explain any -mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, -commercial, philosophical, ethical or political position regarding -them. - -The "Invariant Sections" are certain Secondary Sections whose titles -are designated, as being those of Invariant Sections, in the notice -that says that the Document is released under this License. - -The "Cover Texts" are certain short passages of text that are listed, -as Front-Cover Texts or Back-Cover Texts, in the notice that says that -the Document is released under this License. - -A "Transparent" copy of the Document means a machine-readable copy, -represented in a format whose specification is available to the -general public, whose contents can be viewed and edited directly and -straightforwardly with generic text editors or (for images composed of -pixels) generic paint programs or (for drawings) some widely available -drawing editor, and that is suitable for input to text formatters or -for automatic translation to a variety of formats suitable for input -to text formatters. A copy made in an otherwise Transparent file -format whose markup has been designed to thwart or discourage -subsequent modification by readers is not Transparent. A copy that is -not "Transparent" is called "Opaque". - -Examples of suitable formats for Transparent copies include plain -ASCII without markup, Texinfo input format, LaTeX input format, SGML -or XML using a publicly available DTD, and standard-conforming simple -HTML designed for human modification. Opaque formats include -PostScript, PDF, proprietary formats that can be read and edited only -by proprietary word processors, SGML or XML for which the DTD and/or -processing tools are not generally available, and the -machine-generated HTML produced by some word processors for output -purposes only. - -The "Title Page" means, for a printed book, the title page itself, -plus such following pages as are needed to hold, legibly, the material -this License requires to appear in the title page. For works in -formats which do not have any title page as such, "Title Page" means -the text near the most prominent appearance of the work's title, -preceding the beginning of the body of the text. - - -2. VERBATIM COPYING - -You may copy and distribute the Document in any medium, either -commercially or noncommercially, provided that this License, the -copyright notices, and the license notice saying this License applies -to the Document are reproduced in all copies, and that you add no other -conditions whatsoever to those of this License. You may not use -technical measures to obstruct or control the reading or further -copying of the copies you make or distribute. However, you may accept -compensation in exchange for copies. If you distribute a large enough -number of copies you must also follow the conditions in section 3. - -You may also lend copies, under the same conditions stated above, and -you may publicly display copies. - - -3. COPYING IN QUANTITY - -If you publish printed copies of the Document numbering more than 100, -and the Document's license notice requires Cover Texts, you must enclose -the copies in covers that carry, clearly and legibly, all these Cover -Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on -the back cover. Both covers must also clearly and legibly identify -you as the publisher of these copies. The front cover must present -the full title with all words of the title equally prominent and -visible. You may add other material on the covers in addition. -Copying with changes limited to the covers, as long as they preserve -the title of the Document and satisfy these conditions, can be treated -as verbatim copying in other respects. - -If the required texts for either cover are too voluminous to fit -legibly, you should put the first ones listed (as many as fit -reasonably) on the actual cover, and continue the rest onto adjacent -pages. - -If you publish or distribute Opaque copies of the Document numbering -more than 100, you must either include a machine-readable Transparent -copy along with each Opaque copy, or state in or with each Opaque copy -a publicly-accessible computer-network location containing a complete -Transparent copy of the Document, free of added material, which the -general network-using public has access to download anonymously at no -charge using public-standard network protocols. If you use the latter -option, you must take reasonably prudent steps, when you begin -distribution of Opaque copies in quantity, to ensure that this -Transparent copy will remain thus accessible at the stated location -until at least one year after the last time you distribute an Opaque -copy (directly or through your agents or retailers) of that edition to -the public. - -It is requested, but not required, that you contact the authors of the -Document well before redistributing any large number of copies, to give -them a chance to provide you with an updated version of the Document. - - -4. MODIFICATIONS - -You may copy and distribute a Modified Version of the Document under -the conditions of sections 2 and 3 above, provided that you release -the Modified Version under precisely this License, with the Modified -Version filling the role of the Document, thus licensing distribution -and modification of the Modified Version to whoever possesses a copy -of it. In addition, you must do these things in the Modified Version: - -A. Use in the Title Page (and on the covers, if any) a title distinct - from that of the Document, and from those of previous versions - (which should, if there were any, be listed in the History section - of the Document). You may use the same title as a previous version - if the original publisher of that version gives permission. -B. List on the Title Page, as authors, one or more persons or entities - responsible for authorship of the modifications in the Modified - Version, together with at least five of the principal authors of the - Document (all of its principal authors, if it has less than five). -C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. -D. Preserve all the copyright notices of the Document. -E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. -F. Include, immediately after the copyright notices, a license notice - giving the public permission to use the Modified Version under the - terms of this License, in the form shown in the Addendum below. -G. Preserve in that license notice the full lists of Invariant Sections - and required Cover Texts given in the Document's license notice. -H. Include an unaltered copy of this License. -I. Preserve the section entitled "History", and its title, and add to - it an item stating at least the title, year, new authors, and - publisher of the Modified Version as given on the Title Page. If - there is no section entitled "History" in the Document, create one - stating the title, year, authors, and publisher of the Document as - given on its Title Page, then add an item describing the Modified - Version as stated in the previous sentence. -J. Preserve the network location, if any, given in the Document for - public access to a Transparent copy of the Document, and likewise - the network locations given in the Document for previous versions - it was based on. These may be placed in the "History" section. - You may omit a network location for a work that was published at - least four years before the Document itself, or if the original - publisher of the version it refers to gives permission. -K. In any section entitled "Acknowledgements" or "Dedications", - preserve the section's title, and preserve in the section all the - substance and tone of each of the contributor acknowledgements - and/or dedications given therein. -L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section titles. -M. Delete any section entitled "Endorsements". Such a section - may not be included in the Modified Version. -N. Do not retitle any existing section as "Endorsements" - or to conflict in title with any Invariant Section. - -If the Modified Version includes new front-matter sections or -appendices that qualify as Secondary Sections and contain no material -copied from the Document, you may at your option designate some or all -of these sections as invariant. To do this, add their titles to the -list of Invariant Sections in the Modified Version's license notice. -These titles must be distinct from any other section titles. - -You may add a section entitled "Endorsements", provided it contains -nothing but endorsements of your Modified Version by various -parties--for example, statements of peer review or that the text has -been approved by an organization as the authoritative definition of a -standard. - -You may add a passage of up to five words as a Front-Cover Text, and a -passage of up to 25 words as a Back-Cover Text, to the end of the list -of Cover Texts in the Modified Version. Only one passage of -Front-Cover Text and one of Back-Cover Text may be added by (or -through arrangements made by) any one entity. If the Document already -includes a cover text for the same cover, previously added by you or -by arrangement made by the same entity you are acting on behalf of, -you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. - -The author(s) and publisher(s) of the Document do not by this License -give permission to use their names for publicity for or to assert or -imply endorsement of any Modified Version. - - -5. COMBINING DOCUMENTS - -You may combine the Document with other documents released under this -License, under the terms defined in section 4 above for modified -versions, provided that you include in the combination all of the -Invariant Sections of all of the original documents, unmodified, and -list them all as Invariant Sections of your combined work in its -license notice. - -The combined work need only contain one copy of this License, and -multiple identical Invariant Sections may be replaced with a single -copy. If there are multiple Invariant Sections with the same name but -different contents, make the title of each such section unique by -adding at the end of it, in parentheses, the name of the original -author or publisher of that section if known, or else a unique number. -Make the same adjustment to the section titles in the list of -Invariant Sections in the license notice of the combined work. - -In the combination, you must combine any sections entitled "History" -in the various original documents, forming one section entitled -"History"; likewise combine any sections entitled "Acknowledgements", -and any sections entitled "Dedications". You must delete all sections -entitled "Endorsements." - - -6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents -released under this License, and replace the individual copies of this -License in the various documents with a single copy that is included in -the collection, provided that you follow the rules of this License for -verbatim copying of each of the documents in all other respects. - -You may extract a single document from such a collection, and distribute -it individually under this License, provided you insert a copy of this -License into the extracted document, and follow this License in all -other respects regarding verbatim copying of that document. - - -7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate -and independent documents or works, in or on a volume of a storage or -distribution medium, does not as a whole count as a Modified Version -of the Document, provided no compilation copyright is claimed for the -compilation. Such a compilation is called an "aggregate", and this -License does not apply to the other self-contained works thus compiled -with the Document, on account of their being thus compiled, if they -are not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these -copies of the Document, then if the Document is less than one quarter -of the entire aggregate, the Document's Cover Texts may be placed on -covers that surround only the Document within the aggregate. -Otherwise they must appear on covers around the whole aggregate. - - -8. TRANSLATION - -Translation is considered a kind of modification, so you may -distribute translations of the Document under the terms of section 4. -Replacing Invariant Sections with translations requires special -permission from their copyright holders, but you may include -translations of some or all Invariant Sections in addition to the -original versions of these Invariant Sections. You may include a -translation of this License provided that you also include the -original English version of this License. In case of a disagreement -between the translation and the original English version of this -License, the original English version will prevail. - - -9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except -as expressly provided for under this License. Any other attempt to -copy, modify, sublicense or distribute the Document is void, and will -automatically terminate your rights under this License. However, -parties who have received copies, or rights, from you under this -License will not have their licenses terminated so long as such -parties remain in full compliance. - - -10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions -of the GNU Free Documentation License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. See -http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. -If the Document specifies that a particular numbered version of this -License "or any later version" applies to it, you have the option of -following the terms and conditions either of that specified version or -of any later version that has been published (not as a draft) by the -Free Software Foundation. If the Document does not specify a version -number of this License, you may choose any version ever published (not -as a draft) by the Free Software Foundation. - - -ADDENDUM: How to use this License for your documents - -To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and -license notices just after the title page: - - Copyright (c) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 - or any later version published by the Free Software Foundation; - with the Invariant Sections being LIST THEIR TITLES, with the - Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. - A copy of the license is included in the section entitled "GNU - Free Documentation License". - -If you have no Invariant Sections, write "with no Invariant Sections" -instead of saying which ones are invariant. If you have no -Front-Cover Texts, write "no Front-Cover Texts" instead of -"Front-Cover Texts being LIST"; likewise for Back-Cover Texts. - -If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, -to permit their use in free software. - -========================================================================= - -meintro.me and meref.me are distributed under the following terms: - - Copyright (c) 1986 The Regents of the University of California. - All rights reserved. - - Redistribution and use in source and binary forms are permitted - provided that the above copyright notice and this paragraph are - duplicated in all such forms and that any documentation, - advertising materials, and other materials related to such - distribution and use acknowledge that the software was developed - by the University of California, Berkeley. The name of the - University may not be used to endorse or promote products derived - from this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - -========================================================================= - -pic.ms is distributed under the following terms: - - This document was written for free use and redistribution by - Eric S. Raymond in August 1995. - -(I've contacted the author for clarification.) diff --git a/tests/cluecode/data/copyright_fossology/testdata127.yml b/tests/cluecode/data/copyright_fossology/testdata127.yml new file mode 100644 index 00000000000..792fb7e8e54 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata127.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001- Valek Filippov +holders: + - Valek Filippov +authors: + - Masayuki Hatta (mhatta) + - URW++ Design & Development GmbH Valek Filippov diff --git a/tests/cluecode/data/copyright_fossology/testdata127_raw b/tests/cluecode/data/copyright_fossology/testdata127_raw deleted file mode 100644 index 2272f40b8ac..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata127_raw +++ /dev/null @@ -1,30 +0,0 @@ -This package was debianized by Masayuki Hatta (mhatta) on -Sat, 27 Mar 2004 01:30:05 +0900. - -It was downloaded from: - -http://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/current/ (ghostscript-fonts-std) -ftp://ftp.gnome.ru/fonts/urw/release/ (Valek Filippov's urw-fonts) - -Upstream Authors: URW++ Design & Development GmbH - Valek Filippov et. al. - -Copyright Copyright (c) 2001- Valek Filippov, All Rights Reserved. - - This package 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; version 2 dated June, 1991. - - This package 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 package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301, USA. - -On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - diff --git a/tests/cluecode/data/copyright_fossology/testdata128.yml b/tests/cluecode/data/copyright_fossology/testdata128.yml new file mode 100644 index 00000000000..86430175b65 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata128.yml @@ -0,0 +1,43 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Artifex Software Inc. + - copyright Adobe Systems Incorporated + - Copyright (c) 1997-2002 Graeme W. Gill + - Copyright (c) 1999-2000 Image Power, Inc. + - Copyright (c) 1999-2000 The University of British Columbia + - Copyright (c) 2001-2003 Michael David Adams + - copyright (c) 1991-1998, Thomas G. Lane + - copyright holder, Aladdin Enterprises of Menlo Park + - copyright by the Free Software Foundation + - copyright by M.I.T. + - Copyright property of CompuServe Incorporated + - Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson + - Copyright (c) 2000-2002 Glenn Randers-Pehrson + - Copyright (c) 1998, 1999 Glenn Randers-Pehrson + - Copyright (c) 1996, 1997 Andreas Dilger + - Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + - Copyright (c) 1995-2005 Jean-loup Gailly and Mark Adler +holders: + - Artifex Software Inc. + - Adobe Systems Incorporated + - Graeme W. Gill + - Image Power, Inc. + - The University of British Columbia + - Michael David Adams + - Thomas G. Lane + - Aladdin Enterprises of Menlo Park + - the Free Software Foundation + - M.I.T. + - CompuServe Incorporated + - Glenn Randers-Pehrson + - Glenn Randers-Pehrson + - Glenn Randers-Pehrson + - Andreas Dilger + - Guy Eric Schalnat, Group 42, Inc. + - Jean-loup Gailly and Mark Adler +authors: + - Masayuki Hatta (mhatta) + - artofcode LLC. http://artofcode.com diff --git a/tests/cluecode/data/copyright_fossology/testdata128_raw b/tests/cluecode/data/copyright_fossology/testdata128_raw deleted file mode 100644 index be3b553108c..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata128_raw +++ /dev/null @@ -1,430 +0,0 @@ -This package was debianized by Masayuki Hatta (mhatta) on -Tue, 23 Mar 2004 19:46:37 +0900. - -It was downloaded from ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/ - -Note: The directory Resource/CMap is stripped from the source tarball, -as its content is not GPL-licensed (only verbatim copying is allowed). -Also, jasper/doc/*.pdf have been removed since their corresponding -sources are not available. - -Upstream Author: artofcode LLC. - -Copyright: - -From LICENSE: - - Copyright (c) Artifex Software Inc., All Rights Reserved. - - The files in the src, lib, toolbin, examples, ijs, doc and man - directories (folders) and any subdirectories (sub-folders) thereof - are part of GPL Ghostscript. - - The files in the Resource directory and any subdirectories thereof - are also part of GPL Ghostscript, with the explicit exception of the - files in the CMap subdirectory. The CMap files are copyright Adobe - Systems Incorporated and covered by a separate license which permits - only verbatim distribution. - - (Non-free CMap files have been removed from the Debian package. - - ed.) - - GPL Ghostscript is free software; you can redistribute it and/or - modify it under the terms of version 2 of the GNU General Public - License as published by the Free Software Foundation. - - GPL Ghostscript 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 so you can know your rights and - responsibilities. It should be in a file named doc/COPYING. If not, - write to the Free Software Foundation, Inc., 51 Franklin Street, - Fifth Floor, Boston, MA 02110-1301, USA. - - --- - - GPL Ghostscript contains an implementation of techniques covered by - US Patents 5,055,942 and 5,917,614, and corresponding international - patents. These patents are licensed for use with GPL Ghostscript - under the following grant: - - Whereas, Raph Levien (hereinafter "Inventor") has obtained patent - protection for related technology (hereinafter "Patented - Technology"), Inventor wishes to aid the the GNU free software - project in achieving its goals, and Inventor also wishes to increase - public awareness of Patented Technology, Inventor hereby grants a - fully paid up, nonexclusive, royalty free license to practice the - patents listed below ("the Patents") if and only if practiced in - conjunction with software distributed under the terms of any version - of the GNU General Public License as published by the Free Software - Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. Inventor reserves all other rights, including without - limitation, licensing for software not distributed under the GNU - General Public License. - - 5055942 Photographic image reproduction device using digital - halftoning to screen images allowing adjustable coarseness - - 5917614 Method and apparatus for error diffusion screening of - images with improved smoothness in highlight and shadow - regions - -On Debian systems, the complete text of the GNU General Public License -Version 2 can be found in `/usr/share/common-licenses/GPL-2'. - -The GPL Ghostscript distribution contains several third party -software, and some of them are governed by different licenses instead -of GNU GPL2. - -For files in the icclib directory: - - ************************************************************************* - Copyright (c) 1997-2002 Graeme W. Gill - - Permission is hereby granted, to use, copy, modify, distribute, and - sell this software and its associated documentation files (the - "Software") for any purpose without fee, provided that: - - 1) The above copyright notices and this permission notice - accompany all source code copies of the Software and - related documentation. and - - 2) If executable code based on the Software only is - distributed, then the accompanying documentation must - aknowledge that "this software is based in part on the work - of Graeme W. Gill". and - - 3) It is accepted that Graeme W. Gill (the "Author") accepts - NO LIABILITY for damages of any kind. The Software is - provided without fee by the Author "AS-IS" and without - warranty of any kind, express, implied or otherwise, - including without limitation, any warranty of - merchantability or fitness for a particular purpose. and - - 4) These conditions apply to any software derived from or - based on the Software, not just to the unmodified library. - and - - 5) Except as contained in this notice, or in the required - acknowledgment, the name of the Author, or the name of any - organization or company affiliated with the Author may not - be used in any advertising or publicity relating to the - Software, without the specific, prior written permission of - the Author. - - ************************************************************************* - -For files in the jasper directory: - - JasPer License Version 2.0 - - Copyright (c) 1999-2000 Image Power, Inc. - Copyright (c) 1999-2000 The University of British Columbia - Copyright (c) 2001-2003 Michael David Adams - - All rights reserved. - - Permission is hereby granted, free of charge, to any person (the - "User") obtaining a copy of this software and associated - documentation files (the "Software"), to deal in the Software - without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, and/or sell copies of the - Software, and to permit persons to whom the Software is furnished to - do so, subject to the following conditions: - - 1. The above copyright notices and this permission notice (which - includes the disclaimer below) shall be included in all copies or - substantial portions of the Software. - - 2. The name of a copyright holder shall not be used to endorse or - promote products derived from the Software without specific prior - written permission. - - THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS - LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT - UNDER THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT - HOLDERS "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 COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY - DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, - WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE - OF THIS SOFTWARE. NO ASSURANCES ARE PROVIDED BY THE COPYRIGHT - HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE THE PATENT OR OTHER - INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. EACH COPYRIGHT - HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS BROUGHT BY ANY - OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS - OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS GRANTED - HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE - ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE - IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN - MISSION-CRITICAL SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF - NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, - AIR TRAFFIC CONTROL SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR - WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE SOFTWARE OR SYSTEM - COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE PHYSICAL OR - ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES"). THE COPYRIGHT - HOLDERS SPECIFICALLY DISCLAIM ANY EXPRESS OR IMPLIED WARRANTY OF - FITNESS FOR HIGH RISK ACTIVITIES. - - (jasper/doc/*.pdf have been removed since their corresponding - sources are not available - ed.) - -For files in the jbig2dec directory: - - The files in this directory (folder) and any subdirectories - (sub-folders) thereof are part of jbig2dec, with the exception of - certain source files included to support portability which are - marked otherwise in their copyright headers. - - jbig2dec is free software; you can redistribute it and/or modify it - under the terms of version 2 of the GNU General Public License as - published by the Free Software Foundation. - - This software 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 in the file named COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - - In addition, specific permission is given to link jbig2dec to or - compile jbig2dec into AFPL Ghostscript and to distribute same under - the AFPL license. - -For files in the jpeg directory: - - (Quoted from jpeg/README) - - LEGAL ISSUES - ============ - - The authors make NO WARRANTY or representation, either express or - implied, with respect to this software, its quality, accuracy, - merchantability, or fitness for a particular purpose. This software - is provided "AS IS", and you, its user, assume the entire risk as to - its quality and accuracy. - - This software is copyright (c) 1991-1998, Thomas G. Lane. All - Rights Reserved except as specified below. - - Permission is hereby granted to use, copy, modify, and distribute - this software (or portions thereof) for any purpose, without fee, - subject to these conditions: (1) If any part of the source code for - this software is distributed, then this README file must be - included, with this copyright and no-warranty notice unaltered; and - any additions, deletions, or changes to the original files must be - clearly indicated in accompanying documentation. (2) If only - executable code is distributed, then the accompanying documentation - must state that "this software is based in part on the work of the - Independent JPEG Group". (3) Permission for use of this software is - granted only if the user accepts full responsibility for any - undesirable consequences; the authors accept NO LIABILITY for - damages of any kind. - - These conditions apply to any software derived from or based on the - IJG code, not just to the unmodified library. If you use our work, - you ought to acknowledge us. - - Permission is NOT granted for the use of any IJG author's name or - company name in advertising or publicity relating to this software - or products derived from it. This software may be referred to only - as "the Independent JPEG Group's software". - - We specifically permit and encourage the use of this software as the - basis of commercial products, provided that all warranty or - liability claims are assumed by the product vendor. - - ansi2knr.c is included in this distribution by permission of - L. Peter Deutsch, sole proprietor of its copyright holder, Aladdin - Enterprises of Menlo Park, CA. ansi2knr.c is NOT covered by the - above copyright and conditions, but instead by the usual - distribution terms of the Free Software Foundation; principally, - that you must include source code if you redistribute it. (See the - file ansi2knr.c for full details.) However, since ansi2knr.c is not - needed as part of any program generated from the IJG code, this does - not limit you more than the foregoing paragraphs do. - - The Unix configuration script "configure" was produced with GNU - Autoconf. It is copyright by the Free Software Foundation but is - freely distributable. The same holds for its supporting scripts - (config.guess, config.sub, ltconfig, ltmain.sh). Another support - script, install-sh, is copyright by M.I.T. but is also freely - distributable. - - It appears that the arithmetic coding option of the JPEG spec is - covered by patents owned by IBM, AT&T, and Mitsubishi. Hence - arithmetic coding cannot legally be used without obtaining one or - more licenses. For this reason, support for arithmetic coding has - been removed from the free JPEG software. (Since arithmetic coding - provides only a marginal gain over the unpatented Huffman mode, it - is unlikely that very many implementations will support it.) So far - as we are aware, there are no patent restrictions on the remaining - code. - - The IJG distribution formerly included code to read and write GIF - files. To avoid entanglement with the Unisys LZW patent, GIF - reading support has been removed altogether, and the GIF writer has - been simplified to produce "uncompressed GIFs". This technique does - not use the LZW algorithm; the resulting GIF files are larger than - usual, but are readable by all standard GIF decoders. - - We are required to state that - "The Graphics Interchange Format(c) is the Copyright property of - CompuServe Incorporated. GIF(sm) is a Service Mark property of - CompuServe Incorporated." - - (The LZW Patent is now void - ed.) - -For files in the libpng directory: - - This copy of the libpng notices is provided for your convenience. - In case of any discrepancy between this copy and the notices in the - file png.h that is included in the libpng distribution, the latter - shall prevail. - - COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: - - If you modify libpng you may insert additional notices immediately - following this sentence. - - libpng versions 1.2.6, August 15, 2004, through 1.2.18, May 15, - 2007, are Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and - are distributed according to the same disclaimer and license as - libpng-1.2.5 with the following individual added to the list of - Contributing Authors - - Cosmin Truta - - libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, - 2002, are Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are - distributed according to the same disclaimer and license as - libpng-1.0.6 with the following individuals added to the list of - Contributing Authors - - Simon-Pierre Cadieux - Eric S. Raymond - Gilles Vollant - - and with the following additions to the disclaimer: - - There is no warranty against interference with your enjoyment of - the library or against infringement. There is no warranty that - our efforts or the library will fulfill any of your particular - purposes or needs. This library is provided with all faults, and - the entire risk of satisfactory quality, performance, accuracy, - and effort is with the user. - - libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, - are Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are - distributed according to the same disclaimer and license as - libpng-0.96, with the following individuals added to the list of - Contributing Authors: - - Tom Lane - Glenn Randers-Pehrson - Willem van Schaik - - libpng versions 0.89, June 1996, through 0.96, May 1997, are - Copyright (c) 1996, 1997 Andreas Dilger Distributed according to the - same disclaimer and license as libpng-0.88, with the following - individuals added to the list of Contributing Authors: - - John Bowler - Kevin Bracey - Sam Bushell - Magnus Holmgren - Greg Roelofs - Tom Tanner - - libpng versions 0.5, May 1995, through 0.88, January 1996, are - Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. - - For the purposes of this copyright and license, "Contributing - Authors" is defined as the following set of individuals: - - Andreas Dilger - Dave Martindale - Guy Eric Schalnat - Paul Schmidt - Tim Wegner - - The PNG Reference Library is supplied "AS IS". The Contributing - Authors and Group 42, Inc. disclaim all warranties, expressed or - implied, including, without limitation, the warranties of - merchantability and of fitness for any purpose. The Contributing - Authors and Group 42, Inc. assume no liability for direct, - indirect, incidental, special, exemplary, or consequential damages, - which may result from the use of the PNG Reference Library, even if - advised of the possibility of such damage. - - Permission is hereby granted to use, copy, modify, and distribute - this source code, or portions hereof, for any purpose, without fee, - subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented. - - 2. Altered versions must be plainly marked as such and must not be - misrepresented as being the original source. - - 3. This Copyright notice may not be removed or altered from any - source or altered source distribution. - - The Contributing Authors and Group 42, Inc. specifically permit, - without fee, and encourage the use of this source code as a - component to supporting the PNG file format in commercial products. - If you use this source code in a product, acknowledgment is not - required but would be appreciated. - - - A "png_get_copyright" function is available, for convenient use in - "about" boxes and the like: - - printf("%s",png_get_copyright(NULL)); - - Also, the PNG logo (in PNG format, of course) is supplied in the - files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). - - Libpng is OSI Certified Open Source Software. OSI Certified Open - Source is a certification mark of the Open Source Initiative. - - Glenn Randers-Pehrson - glennrp at users.sourceforge.net - May 15, 2007 - -For files in the zlib directory: - - Copyright (c) 1995-2005 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - - The data format used by the zlib library is described by RFCs - (Request for Comments) 1950 to 1952 in the files - http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt - (deflate format) and rfc1952.txt (gzip format). diff --git a/tests/cluecode/data/copyright_fossology/testdata129.yml b/tests/cluecode/data/copyright_fossology/testdata129.yml new file mode 100644 index 00000000000..c905993121e --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata129.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999, 2001, 2002, 2006, 2007 Free Software Foundation, Inc. + - Copyright (c) 1992-1993 Jean-loup Gailly +holders: + - Free Software Foundation, Inc. + - Jean-loup Gailly +authors: + - Bdale Garbee diff --git a/tests/cluecode/data/copyright_fossology/testdata129_raw b/tests/cluecode/data/copyright_fossology/testdata129_raw deleted file mode 100644 index 56e182df46c..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata129_raw +++ /dev/null @@ -1,24 +0,0 @@ -This package is maintained for Debian by Bdale Garbee , and -was built from the sources found at: - - ftp://ftp.gnu.org/gnu/gzip/ - -Copyright (c) 1999, 2001, 2002, 2006, 2007 Free Software Foundation, Inc. -Copyright (c) 1992-1993 Jean-loup Gailly - - 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, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/tests/cluecode/data/copyright_fossology/testdata12_raw b/tests/cluecode/data/copyright_fossology/testdata12_raw deleted file mode 100644 index 52a07853eaa..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata12_raw +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2005 DMTF. All rights reserved. -// Add UmlPackagePath -// qualifier values to CIM Schema. -// ================================================================== -// CIM_Cluster -// ================================================================== - [Deprecated { "CIM_RedundancySet", "CIM_ComputerSystem" }, - Experimental, Version ( "2.8.1000" ), - UMLPackagePath ( "CIM::System::SystemElements" ), - Description ( - "A class derived from ComputerSystem that \'is made up of\' two " - "or more ComputerSystems which operate together as an atomic, " - "functional whole to increase the performance, resources and/or " - "RAS (Reliability, Availability and Serviceability) of the " - "component ComputerSystems, related to some aspects of these " - "ComputerSystems. \n" - "The use of this class has been deprecated in lieu of using " - "ComputerSystem and RedundancySet to represent the cluster. " - "Members of the cluster are identified using MemberOfCollection " - "to the RedundancySet. The RedundancySet is tied to its virtual " - "system via LogicalIdentity." )] -class CIM_Cluster : CIM_ComputerSystem { - - [Deprecated { "No Value" }, - Description ( - "Interconnect is a free form string that describes the " - "interconnection mechanism for the Cluster." )] - string Interconnect; - - [Deprecated { "CIM_ServiceAccessPoint" }, - Description ( - "InterconnectAddress indicates the address of the Cluster " - "System, which is dependent on the interconnection " - "scheme. If no address is available or applicable, a null " - "string should be used." )] - string InterconnectAddress; - - [Deprecated { "CIM_RedundancySet.TypeOfSet" }, - Description ( - "The cluster types. This specifies whether the cluster is " - "for failover (value=2), performance (3), etc. The values " - "which can be specified are not mutually exclusive. Thus, " - "Types is an array." ), - ValueMap { "0", "1", "2", "3", "4", "5", "6" }, - Values { "Unknown", "Other", "Failover", "Performance", - "Distributed OS", "Node Grouping", "SysPlex" }] - uint16 Types[]; - - [Deprecated { "CIM_RedundancySet.MaxNumberSupported" }, - Description ( - "Indicates the maximum number of nodes that may " - "participate in the Cluster. If unlimited, enter 0." )] - uint32 MaxNumberOfNodes; - - [Deprecated { "CIM_ComputerSystem.EnabledState", - "CIM_ComputerSystem.OperationalStatus" }, - Description ( - "Indicates the state of the Cluster. The cluster can be " - "defined to be on-line (value=2), off-line (3), in a " - "degraded mode of operation (4) or unavailable (5)." ), - ValueMap { "0", "1", "2", "3", "4", "5" }, - Values { "Unknown", "Other", "On-line", "Off-line", - "Degraded", "Unavailable" }] - uint16 ClusterState; - - -}; diff --git a/tests/cluecode/data/copyright_fossology/testdata13.yml b/tests/cluecode/data/copyright_fossology/testdata13.yml new file mode 100644 index 00000000000..196a04664a7 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata13.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2002-2004, Sebastian Stein + - (c) 2002-2004, Sebastian Stein +holders: + - Sebastian Stein + - Sebastian Stein +authors: + - msgstr Pershii diff --git a/tests/cluecode/data/copyright_fossology/testdata130.yml b/tests/cluecode/data/copyright_fossology/testdata130.yml new file mode 100644 index 00000000000..4a518ef0fe3 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata130.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2004-2005 Graham Wilson + - Copyright (c) 1997 Bernd Eckenfels + - Copyright (c) 1997 Peter Tobias + - Copyright (c) 1996 Free Software Foundation, Inc. +holders: + - Graham Wilson + - Bernd Eckenfels + - Peter Tobias + - Free Software Foundation, Inc. +authors: + - Peter Tobias diff --git a/tests/cluecode/data/copyright_fossology/testdata130_raw b/tests/cluecode/data/copyright_fossology/testdata130_raw deleted file mode 100644 index cadfe937f00..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata130_raw +++ /dev/null @@ -1,25 +0,0 @@ -This package was written by Peter Tobias -on Thu, 16 Jan 1997 01:00:34 +0100. - -License: - - Copyright (c) 2004-2005 Graham Wilson - Copyright (c) 1997 Bernd Eckenfels - Copyright (c) 1997 Peter Tobias - Copyright (c) 1996 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; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian systems, the complete text of the GNU General Public License -can be found in /usr/share/common-licenses/GPL file. diff --git a/tests/cluecode/data/copyright_fossology/testdata131.yml b/tests/cluecode/data/copyright_fossology/testdata131.yml new file mode 100644 index 00000000000..0714db4a57e --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata131.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999 GMRS Software GmbH +holders: + - GMRS Software GmbH +authors: + - Adrian Bridgett + - Arno Unkrig (arno.unkrig@gmrs.de) + - GMRS Software GmbH. diff --git a/tests/cluecode/data/copyright_fossology/testdata131_raw b/tests/cluecode/data/copyright_fossology/testdata131_raw deleted file mode 100644 index 337b587a178..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata131_raw +++ /dev/null @@ -1,63 +0,0 @@ -Packaged by Adrian Bridgett from sources obtained -at http://www.gmrs.de/html2text.html. -Update: those sources have now been removed since GMRS no longer support the -program. Martin Bayer now has fixed a bug and -has a new version at http://www.mbayer.de/html2text/ - -Author: Arno Unkrig (arno.unkrig@gmrs.de) - -Copyright: - - Copyright (c) 1999 GMRS Software GmbH - - GMRS Software GmbH, Innsbrucker Ring 159, 81669 Munich, Germany. - http://www.gmrs.de - -Original license: - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by GMRS Software GmbH. - 4. The name of GMRS Software GmbH may not be used to endorse or promote - products derived from this software without specific prior written - permission. - - THIS SOFTWARE IS PROVIDED BY GMRS SOFTWARE GMBH `AS IS'' AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GMRS SOFTWARE GMBH BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - THE POSSIBILITY OF SUCH DAMAGE. - -This Debian package build from sources with GPLv2 or later: - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - -On Debian systems, copy of GPLv2 can be found in -/usr/share/common-licenses/GPL-2 diff --git a/tests/cluecode/data/copyright_fossology/testdata132.yml b/tests/cluecode/data/copyright_fossology/testdata132.yml new file mode 100644 index 00000000000..8047adfaa09 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata132.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999, Anthony Towns +holders: + - Anthony Towns +authors: + - Anthony Towns diff --git a/tests/cluecode/data/copyright_fossology/testdata132_raw b/tests/cluecode/data/copyright_fossology/testdata132_raw deleted file mode 100644 index fd0005f7ae7..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata132_raw +++ /dev/null @@ -1,21 +0,0 @@ -This package was created and debianized by Anthony Towns -. He is also the upstream author of ifupdown. - -Copyright (c) 1999, Anthony Towns. All rights reserved. - - This package 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; version 2 dated June, 1991. - - This package 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 package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, - MA 02110-1301, USA. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in /usr/share/common-licenses/GPL . diff --git a/tests/cluecode/data/copyright_fossology/testdata133.yml b/tests/cluecode/data/copyright_fossology/testdata133.yml new file mode 100644 index 00000000000..4c0c883c652 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata133.yml @@ -0,0 +1,29 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1999-2004 ImageMagick Studio LLC + - copyright Pineapple USA Inc. + - Copyright 1999 E. I. du Pont de Nemours and Company + - Copyright (c) 2002 GraphicsMagick Group + - Copyright (c) 2000-2002, Ghostgum Software Pty Ltd. + - Copyright (c) 2000 Markus Friedl + - Copyright 1999 - 2003 Bob Friesenhahn + - Copyright (c) 1985-1988 by Supoj Sutanthavibul + - Parts Copyright (c) 1989-2000 by Brian V. Smith + - Parts Copyright (c) 1991 by Paul King +holders: + - ImageMagick Studio LLC + - Pineapple USA Inc. + - E. I. du Pont de Nemours and Company + - GraphicsMagick Group + - Ghostgum Software Pty Ltd. + - Markus Friedl + - Bob Friesenhahn + - Supoj Sutanthavibul + - Brian V. Smith + - Paul King +authors: + - Scott K. Ellis scott@debian.org + - John Cristy diff --git a/tests/cluecode/data/copyright_fossology/testdata133_raw b/tests/cluecode/data/copyright_fossology/testdata133_raw deleted file mode 100644 index 04ea8e205a5..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata133_raw +++ /dev/null @@ -1,192 +0,0 @@ -This package was debianized by Scott K. Ellis scott@debian.org on -Fri, 20 Feb 1998 12:50:05 -0500. - -It was downloaded from http://www.imagemagick.org/www/download.html - -note: GPL copyright files should be located at /usr/share/common-licenses - -Copyright: - -This file is part of the ImageMagick software distributed by the ImageMagick Studio LLC. The author and current maintainer of ImageMagick is John Cristy (magick-developers@imagemagick.org). - -Before we get to the text of the license lets just review what the license says in simple terms: - -It allows you to: - - * freely download and use ImageMagick software, in whole or in part, for personal, company internal, or commercial purposes; - * use ImageMagick software in packages or distributions that you create. - -It forbids you to: - - * redistribute any piece of ImageMagick-originated software without proper attribution; - * use any marks owned by ImageMagick Studio LLC in any way that might state or imply that ImageMagick Studio LLC endorses your distribution; - * use any marks owned by ImageMagick Studio LLC in any way that might state or imply that you created the ImageMagick software in question. - -It requires you to: - - * include a copy of the license in any redistribution you may make that includes ImageMagick software; - * provide clear attribution to ImageMagick Studio LLC for any distributions that include ImageMagick software. - -It does not require you to: - - * include the source of the ImageMagick software itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it; - * submit changes that you make to the software back to the ImageMagick Studio LLC (though such feedback is encouraged). - -A few other clarifications include: - * ImageMagick is freely available without charge; - * you may include ImageMagick on a CD-ROM as long as you comply with the terms of the license; - * you can give modified code away for free or sell it under the terms of the ImageMagick license or distribute the result under a different license, but you need to acknowledge the use of the ImageMagick software; - * the license is compatible with the GPL. - -The legally binding and authoritative terms and conditions for use, reproduction, and distribution of ImageMagick follow: - -Copyright 1999-2004 ImageMagick Studio LLC, a non-profit organization dedicated to making software imaging solutions freely available. - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - - a. You must give any other recipients of the Work or Derivative Works a copy of this License; and - - b. You must cause any modified files to carry prominent notices stating that You changed the files; and - - c. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - - d. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. - ----- - -The ImageMagick logo is copyright Pineapple USA Inc. It is freely -distributable, however, modifications to the logo are not permitted. - -Debian does not distribute the original ImageMagick logo in either the -orig.tar.gz or the binary packages because of this. All instances of -it have been deleted, and the code instances replaced with a generic -text logo with the Debian open use logo. - ----- - -The color reduction algorithm found in magick/quantize.c was developed by John Cristy while at duPont. The algorithm is distributed under the following license: - -Copyright 1999 E. I. du Pont de Nemours and Company - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ("ImageMagick"), to deal in ImageMagick without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of ImageMagick, and to permit persons to whom the ImageMagick is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of ImageMagick. - -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. In no event shall E. I. du Pont de Nemours and Company 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 ImageMagick or the use or other dealings in ImageMagick. - -Except as contained in this notice, the name of the E. I. du Pont de Nemours and Company shall not be used in advertising or otherwise to promote the sale, use or other dealings in ImageMagick without prior written authorization from the E. I. du Pont de Nemours and Company. ----- - -In November 2002, the GraphicsMagick Group created GraphicsMagick from ImageMagick Studio's ImageMagick source. ImageMagick adopted some of their improvements to existing programs and scripts, including: - - Unix configure - Installation instructions - Test programs - PerlMagick test scripts - JP2 image coder - Windows configure scripts - Some web page improvements - -The source code is distributed under the following license: - -Copyright (c) 2002 GraphicsMagick Group, an organization dedicated to making software imaging solutions freely available. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ("GraphicsMagick"), to deal in GraphicsMagick without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of GraphicsMagick, and to permit persons to whom GraphicsMagick is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of GraphicsMagick. - -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. In no event shall GraphicsMagick Group 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 GraphicsMagick or the use or other dealings in GraphicsMagick. - -Except as contained in this notice, the name of the GraphicsMagick Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in GraphicsMagick without prior written authorization from the GraphicsMagick Group. - ----- - -ImageMagick incorporated a small portion of code from the gsview package to locate Ghostscript under Windows in magick/nt_base.c. The source code is distributed under the following license: - -Copyright (c) 2000-2002, Ghostgum Software Pty Ltd. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this file ("Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of this Software, and to permit persons to whom this file is furnished to do so, subject to the following conditions: - -This Software is distributed with NO WARRANTY OF ANY KIND. No author or distributor accepts any responsibility for the consequences of using it, or for whether it serves any particular purpose or works at all, unless he or she says so in writing. - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - ----- - -The Base64Decode() and Base64Encode() methods in magick/utility.c is based on source code obtained from OpenSSH. The source code is distributed under the following license: - -Copyright (c) 2000 Markus Friedl. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----- - -ImageMagick includes an optional C++ wrapper, Magick++. Magick++ is distributed under the following license: - -Copyright 1999 - 2003 Bob Friesenhahn - -Permission is hereby granted, free of charge, to any person obtaining a copy of the source files and associated documentation files ("Magick++"), to deal in Magick++ without restriction, including without limitation of the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of Magick++, and to permit persons to whom the Magick++ is furnished to do so, subject to the following conditions: - -This copyright notice shall be included in all copies or substantial portions of Magick++. The copyright to Magick++ is retained by its author and shall not be subsumed or replaced by any other copyright. - -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. In no event shall Bob Friesenhahn 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 Magick++ or the use or other dealings in Magick++. - ----- - -ImageMagick includes patterns in coders/pattern.c which are derived from XFig and is distributed under the following license: - -FIG : Facility for Interactive Generation of figures Copyright (c) 1985-1988 by Supoj Sutanthavibul Parts Copyright (c) 1989-2000 by Brian V. Smith Parts Copyright (c) 1991 by Paul King - -Any party obtaining a copy of these files is granted, free of charge, a full and unrestricted irrevocable, world-wide, paid up, royalty-free, nonexclusive right and license to deal in this software and documentation files (the "Software"), including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons who receive copies from any such party to do so, with the only requirement being that this copyright notice remain intact. - ----- - -ImageMagick makes use of third-party "delegate" libraries to support certain optional features. These libraries bear their own copyrights and licenses, which may be more or less restrictive than the ImageMagick license. For convenience, when ImageMagick is bundled with (or compiled with) "delegate" libraries, a copy of the licenses for these libraries is provided in a "licenses" directory. - - diff --git a/tests/cluecode/data/copyright_fossology/testdata134.yml b/tests/cluecode/data/copyright_fossology/testdata134.yml new file mode 100644 index 00000000000..4fd14bb9718 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata134.yml @@ -0,0 +1,13 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, + 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +holders: + - Free Software Foundation, Inc. +authors: + - Ian Jackson, Erick Branderhorst, Galen Hazelwood, and Josip Rodin. Today + - the Debian TeX Task Force + - Karl Berry diff --git a/tests/cluecode/data/copyright_fossology/testdata134_raw b/tests/cluecode/data/copyright_fossology/testdata134_raw deleted file mode 100644 index 9b2f371dfbb..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata134_raw +++ /dev/null @@ -1,30 +0,0 @@ -This is the Debian package of Texinfo, the GNU documentation system. - -This package was previously maintained by Ian Jackson, Erick -Branderhorst, Galen Hazelwood, and Josip Rodin. Today, it is -maintained by the Debian TeX Task Force . - -The original source can be found at: http://ftp.gnu.org/gnu/texinfo/ - -Upstream maintainer: Karl Berry . - - All programs Copyright (c) 1987, 1992, 1993, 1994, 1995, 1996, 1997, - 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 - Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License v3 can be found in `/usr/share/common-licenses/GPL-3' file. - diff --git a/tests/cluecode/data/copyright_fossology/testdata135.yml b/tests/cluecode/data/copyright_fossology/testdata135.yml new file mode 100644 index 00000000000..21ac71da923 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata135.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1997-2005 Miquel van Smoorenburg and the members pkg-sysvinit + project +holders: + - Miquel van Smoorenburg and the members pkg-sysvinit project diff --git a/tests/cluecode/data/copyright_fossology/testdata135_raw b/tests/cluecode/data/copyright_fossology/testdata135_raw deleted file mode 100644 index 58d644fac56..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata135_raw +++ /dev/null @@ -1,31 +0,0 @@ -This package contains the scripts that are executed at start and -shutdown of Debian systems. - -This package is built from the `sysvinit' source package. Please -consult the copyright file of the sysvinit package for the location of -the upstream sources of the sysvinit package. Debian-specific files -for sysvinit, such as these initscripts, are maintained by the members -of the pkg-sysvinit project at alioth.debian.org. - - http://alioth.debian.org/projects/pkg-sysvinit - -Copyright 1997-2005 Miquel van Smoorenburg and -the members pkg-sysvinit project. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/tests/cluecode/data/copyright_fossology/testdata136.yml b/tests/cluecode/data/copyright_fossology/testdata136.yml new file mode 100644 index 00000000000..97612d3db96 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata136.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000-2003 Free Software Foundation + - Copyright (c) 2000, 2001 Eazel, Inc +holders: + - Free Software Foundation + - Eazel, Inc diff --git a/tests/cluecode/data/copyright_fossology/testdata136_raw b/tests/cluecode/data/copyright_fossology/testdata136_raw deleted file mode 100644 index cc1ed278ba8..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata136_raw +++ /dev/null @@ -1,16 +0,0 @@ -intltool-debian is a derived version of intltool, which is - Copyright (c) 2000-2003 Free Software Foundation. - Copyright (c) 2000, 2001 Eazel, Inc -Intltool maintainers: -Rodney Dawes -Danilo Šegan - -Older intltool maintainers: -Kenneth Christiansen -Darin Adler -Maciej Stachowiak - -This program is released under the terms and conditions of the GNU -General Public License (GPL). On Debian GNU/Linux systems, the complete -text of the GNU General Public License may be found in -`/usr/share/common-licenses/GPL'. diff --git a/tests/cluecode/data/copyright_fossology/testdata137.yml b/tests/cluecode/data/copyright_fossology/testdata137.yml new file mode 100644 index 00000000000..8124fa389d1 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata137.yml @@ -0,0 +1,24 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1996-2001 Alexey Kuznetsov + - Copyright (c) Stephen Hemminger and others + - Copyright (c) 2004 USAGI/WIDE Project + - Copyright (c) J Hadi Salim (hadi@cyberus.ca) + - Copyright (c) 1996 Tom Lees + - Copyright (c) 1998 Christoph Lameter + - Copyright (c) 1998-1999 Roberto Lumbreras + - Copyright (c) 1999-2003 Juan Cespedes + - Copyright (c) 2005- Alexander Wirt +holders: + - Alexey Kuznetsov + - Stephen Hemminger and others + - USAGI/WIDE Project + - J Hadi Salim + - Tom Lees + - Christoph Lameter + - Roberto Lumbreras + - Juan Cespedes + - Alexander Wirt diff --git a/tests/cluecode/data/copyright_fossology/testdata137_raw b/tests/cluecode/data/copyright_fossology/testdata137_raw deleted file mode 100644 index 060271fbc54..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata137_raw +++ /dev/null @@ -1,42 +0,0 @@ -This is the Debian GNU/Linux's prepackaged version of the -Linux Traffic Control engine and related utils, "iproute" - -The source code was obtained from - http://developer.osdl.org/dev/iproute2 -The former upstream was - ftp://ftp.inr.ac.ru/ip-routing/iproute2-2.4.7-now-ss010824.tar.gz - -Copyrights Copyright (c) 1996-2001 Alexey Kuznetsov -Copyright (c) Stephen Hemminger -and others, including, but not limited to - Copyright (c) 2004 USAGI/WIDE Project - Copyright (c) J Hadi Salim (hadi@cyberus.ca) - -Modifications for Debian: - Copyright (c) 1996 Tom Lees - Copyright (c) 1998 Christoph Lameter - Copyright (c) 1998-1999 Roberto Lumbreras - Copyright (c) 1999-2003 Juan Cespedes - Copyright (c) 2005- Alexander Wirt - - -License -------- - -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. - -A copy of the GNU General Public License is available as -`/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution -or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. -You can also obtain it by writing to the Free Software Foundation, -Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, -MA 02110-1301, USA. - diff --git a/tests/cluecode/data/copyright_fossology/testdata138.yml b/tests/cluecode/data/copyright_fossology/testdata138.yml new file mode 100644 index 00000000000..481709f34ba --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata138.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1989 The Regents of the University of California + - copyright Alexey Kuznetsov +holders: + - The Regents of the University of California + - Alexey Kuznetsov +authors: + - Anthony Towns + - Noah Meyerhans + - Alexey Kuznetsov + - Sun Microsystems, Inc. diff --git a/tests/cluecode/data/copyright_fossology/testdata138_raw b/tests/cluecode/data/copyright_fossology/testdata138_raw deleted file mode 100644 index 5be41dc49d5..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata138_raw +++ /dev/null @@ -1,51 +0,0 @@ -This package was debianized by Anthony Towns on -Sat, 5 Aug 2000 19:51:36 +1000. -It has been maintained for Debian by Noah Meyerhans -since 6 Feb 2001. - -It was downloaded from ftp://ftp.inr.ac.ru/ip-routing/ - -Upstream Author: Alexey Kuznetsov - -Copyright: - -Some of the code in this package is: - - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. - -and is distributed under the standard BSD license, available on Debian -systems in /usr/share/common-licenses/BSD. - -Other parts are copyright Alexey Kuznetsov, and are distributed under the -GNU General Public Licenses (version 2 or later), which is available in -/usr/share/common-licesnes/GPL. - -The rdisc program is distributed under the following terms: - - * Rdisc (this program) was developed by Sun Microsystems, Inc. and is - * provided for unrestricted use provided that this legend is included on - * all tape media and as a part of the software program in whole or part. - * Users may copy or modify Rdisc without charge, and they may freely - * distribute it. - * - * RDISC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Rdisc is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY RDISC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - diff --git a/tests/cluecode/data/copyright_fossology/testdata139.yml b/tests/cluecode/data/copyright_fossology/testdata139.yml new file mode 100644 index 00000000000..653da0150cc --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata139.yml @@ -0,0 +1,30 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001, 2002, 2003, 2004 Fernando Perez + - Copyright (c) 2001 Janko Hauser and Nathaniel Gray + - Copyright (c) 2004 W.J. van der Laan + - Copyright (c) 2004-2006 Fernando Perez + - Copyright Gael Varoquaux + - Copyright (c) InQuant GmbH Stefan Eletzhofer + - Copyright (c) 2001 Bill Bumgarner + - Copyright (c) 2001 Python Software Foundation, www.python.org + - Copyright (c) 2005 Jorgen Stenarson + - Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation +holders: + - Fernando Perez + - Janko Hauser and Nathaniel Gray + - W.J. van der Laan + - Fernando Perez + - Gael Varoquaux + - InQuant GmbH Stefan Eletzhofer + - Bill Bumgarner + - Python Software Foundation, www.python.org + - Jorgen Stenarson + - Python Software Foundation +authors: + - Jack Moffitt + - Fernando Perez , Janko Hauser , Nathaniel Gray + diff --git a/tests/cluecode/data/copyright_fossology/testdata139_raw b/tests/cluecode/data/copyright_fossology/testdata139_raw deleted file mode 100644 index 15b024a5d7e..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata139_raw +++ /dev/null @@ -1,238 +0,0 @@ -This package was debianized by Jack Moffitt on -Wed, 12 Mar 2003 20:38:14 -0700. - -It was downloaded from http://ipython.scipy.org/ - -Upstream Authors: Fernando Perez , - Janko Hauser , - Nathaniel Gray - - - -IPython copyright and licensing notes -===================================== - -Unless indicated otherwise, files in this project are covered by a BSD-type -license, included below. - -Individual authors are the holders of the copyright for their code and are -listed in each file. - -Some files (DPyGetOpt.py, for example) may be licensed under different -conditions. Ultimately each file indicates clearly the conditions under which -its author/authors have decided to publish the code. - - -IPython license ---------------- - -IPython is released under a BSD-type license. - -Copyright (c) 2001, 2002, 2003, 2004 Fernando Perez - -Copyright (c) 2001 Janko Hauser and Nathaniel Gray - - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - a. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - b. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - c. Neither the name of the copyright holders nor the names of any - contributors to this software may be used to endorse or promote products - derived from this software without specific prior written permission. - - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - - - -Files with extra copyrights/licenses: -------------------------------------- -Unless indicated otherwise, files covered by a BSD-type license, see above. - -* IPython/Extensions/InterpreterExec.py: - Copyright (c) 2004 W.J. van der Laan - Copyright (c) 2004-2006 Fernando Perez - -* IPython/Extensions/ipy_constants.py: - Copyright Gael Varoquaux - -* IPython/Extensions/ipy_profile_zope.py: - Copyright (c) InQuant GmbH - Stefan Eletzhofer - -* IPython/external/simplegeneric.py: - This is version 0.6 of Philip J. Eby's simplegeneric module - (http://cheeseshop.python.org/pypi/simplegeneric) patched to work - with Python 2.3 (which doesn't support assigning to __name__) - License: PSF or ZPL, full licenses attached below. - -* IPython/DPyGetOpt.py: - Copyright (c) 2001 Bill Bumgarner - License: MIT, see below. - -* IPython/Debugger.py: - Copyright (c) 2001 Python Software Foundation, www.python.org - Taken from Python2.2, License: PSF - see below. - -* IPython/wildcard.py: - Copyright (c) 2005 Jorgen Stenarson - -* IPython/winconsole.py: - This file is placed in the public domain. - - - - -PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 --------------------------------------------- - -1. This LICENSE AGREEMENT is between the Python Software Foundation -("PSF"), and the Individual or Organization ("Licensee") accessing and -otherwise using this software ("Python") in source or binary form and -its associated documentation. - -2. Subject to the terms and conditions of this License Agreement, PSF -hereby grants Licensee a nonexclusive, royalty-free, world-wide -license to reproduce, analyze, test, perform and/or display publicly, -prepare derivative works, distribute, and otherwise use Python -alone or in any derivative version, provided, however, that PSF's -License Agreement and PSF's notice of copyright, i.e., "Copyright (c) -2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation; All Rights -Reserved" are retained in Python alone or in any derivative version -prepared by Licensee. - -3. In the event Licensee prepares a derivative work that is based on -or incorporates Python or any part thereof, and wants to make -the derivative work available to others as provided herein, then -Licensee hereby agrees to include in any such work a brief summary of -the changes made to Python. - -4. PSF is making Python available to Licensee on an "AS IS" -basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT -INFRINGE ANY THIRD PARTY RIGHTS. - -5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON -FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS -A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, -OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. - -6. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -7. Nothing in this License Agreement shall be deemed to create any -relationship of agency, partnership, or joint venture between PSF and -Licensee. This License Agreement does not grant permission to use PSF -trademarks or trade name in a trademark sense to endorse or promote -products or services of Licensee, or any third party. - -8. By copying, installing or otherwise using Python, Licensee -agrees to be bound by the terms and conditions of this License -Agreement. - - - - - -Zope Public License (ZPL) Version 2.1 ------------------------------------------------ - -A copyright notice accompanies this license document that -identifies the copyright holders. - -This license has been certified as open source. It has also -been designated as GPL compatible by the Free Software -Foundation (FSF). - -Redistribution and use in source and binary forms, with or -without modification, are permitted provided that the -following conditions are met: - -1. Redistributions in source code must retain the - accompanying copyright notice, this list of conditions, - and the following disclaimer. - -2. Redistributions in binary form must reproduce the accompanying - copyright notice, this list of conditions, and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - -3. Names of the copyright holders must not be used to - endorse or promote products derived from this software - without prior written permission from the copyright - holders. - -4. The right to distribute this software or to use it for - any purpose does not give you the right to use - Servicemarks (sm) or Trademarks (tm) of the copyright - holders. Use of them is covered by separate agreement - with the copyright holders. - -5. If any files are modified, you must cause the modified - files to carry prominent notices stating that you changed - the files and the date of any change. - -Disclaimer - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' - AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT - NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN - NO EVENT SHALL THE COPYRIGHT HOLDERS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - DAMAGE. - - - - - - -MIT License ------------ - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -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. 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. - diff --git a/tests/cluecode/data/copyright_fossology/testdata13_raw b/tests/cluecode/data/copyright_fossology/testdata13_raw deleted file mode 100644 index a55e0e9d8fa..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata13_raw +++ /dev/null @@ -1,1094 +0,0 @@ -# translation of kbruch.po to Ukrainian -# Translation of kbruch.po to Ukrainian -# -# Ivan Petrouchtchak , 2005. -# Yuri Chornoivan , 2007, 2008, 2009. -msgid "" -msgstr "" -"Project-Id-Version: kbruch\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2009-05-21 11:33+0200\n" -"PO-Revision-Date: 2009-12-31 13:54+0200\n" -"Last-Translator: Yuri Chornoivan \n" -"Language-Team: Ukrainian \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.0\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" -"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" - -#: AppMenuWidget.cpp:115 -msgid "KBruch modes:" -msgstr "Режими KBruch:" - -#: AppMenuWidget.cpp:122 -msgid "Open standard KBruch" -msgstr "Відкрити звичайний KBruch" - -#: AppMenuWidget.cpp:128 -msgid "Freestyle" -msgstr "Вільний стиль" - -#: AppMenuWidget.cpp:137 -msgid "Open learning KBruch" -msgstr "Відкрити навчальний KBruch" - -#: AppMenuWidget.cpp:143 -msgid "Learning" -msgstr "Навчання" - -#: exercisecompare.cpp:99 -msgid ">" -msgstr ">" - -#: exercisecompare.cpp:103 -msgid "Click on this button to select the 'greater than' sign." -msgstr "Натисніть кнопку, щоб вибрати знак «більше»." - -#: exercisecompare.cpp:108 -msgid "<" -msgstr "<" - -#: exercisecompare.cpp:112 -msgid "Click on this button to select the 'less than' sign." -msgstr "Натисніть кнопку, щоб вибрати знак «менше»." - -#: exercisecompare.cpp:117 -msgid "=" -msgstr "=" - -#: exercisecompare.cpp:121 -msgid "Click on this button to select the 'equals' sign." -msgstr "Натисніть кнопку, щоб вибрати знак «дорівнює»." - -#: exercisecompare.cpp:133 exercisecompare.cpp:300 exerciseconvert.cpp:151 -#: exercisefactorize.cpp:181 exercisepercentage.cpp:133 taskview.cpp:170 -msgid "&Skip" -msgstr "Проп&устити" - -#: exercisecompare.cpp:134 exerciseconvert.cpp:152 exercisefactorize.cpp:182 -#: exercisepercentage.cpp:134 -msgid "Click on this button to skip this question." -msgstr "Натисніть цю кнопку, щоб пропустити це питання." - -#: exercisecompare.cpp:149 -msgid "In this exercise you have to compare two given fractions." -msgstr "У цій вправі необхідно порівняти 2 даних дроби." - -#: exercisecompare.cpp:150 -msgid "" -"In this exercise you have to compare two given fractions and choose the " -"correct comparison sign." -msgstr "" -"У цій вправі необхідно порівняти 2 даних дроби вибором правильного знаку " -"порівняння." - -#: exercisecompare.cpp:265 exercisecompare.cpp:266 exercisecompare.cpp:267 -msgid "Click on this button to check your result." -msgstr "Натисніть цю кнопку, щоб перевірити ваш результат." - -#: exercisecompare.cpp:315 exercisecompare.cpp:329 exercisecompare.cpp:343 -msgid "&Next" -msgstr "&Далі" - -#: exerciseconvert.cpp:105 taskview.cpp:124 -msgid "Enter the numerator of your result" -msgstr "Введіть чисельник вашого результату" - -#: exerciseconvert.cpp:123 taskview.cpp:142 -msgid "Enter the denominator of your result" -msgstr "Введіть знаменник вашого результату" - -#: exerciseconvert.cpp:141 exerciseconvert.cpp:191 exerciseconvert.cpp:432 -#: exercisefactorize.cpp:190 exercisefactorize.cpp:296 -#: exercisefactorize.cpp:517 exercisepercentage.cpp:123 -#: exercisepercentage.cpp:177 exercisepercentage.cpp:407 taskview.cpp:160 -#: taskview.cpp:268 taskview.cpp:482 -msgid "&Check" -msgstr "Пе&ревірити" - -#: exerciseconvert.cpp:143 exerciseconvert.cpp:393 exercisefactorize.cpp:191 -#: exercisefactorize.cpp:419 exercisepercentage.cpp:125 -#: exercisepercentage.cpp:370 -msgid "" -"Click on this button to check your result. The button will not work if you " -"have not entered a result yet." -msgstr "" -"Натисніть цю кнопку, щоб перевірити ваш результат. Кнопка не працюватиме, " -"якщо ви ще не ввели результат." - -#: exerciseconvert.cpp:162 -msgid "In this exercise you have to convert a number into a fraction." -msgstr "У цій вправі вам необхідно перетворити число у дріб." - -#: exerciseconvert.cpp:163 -msgid "" -"In this exercise you have to convert a given number into a fraction by " -"entering a numerator and denominator. Do not forget to reduce the result." -msgstr "" -"В цій вправі потрібно перетворити дане число у дріб, вказавши чисельник і " -"знаменник. Не забудьте скоротити результат." - -#: exerciseconvert.cpp:329 exercisefactorize.cpp:365 -#: exercisepercentage.cpp:336 -msgid "Click on this button to get to the next question." -msgstr "Натисніть цю кнопку, щоб перейти до наступного завдання." - -#: exerciseconvert.cpp:376 -msgid "" -"You entered a 0 as the denominator. This means division by zero, which is " -"not allowed. This question will be counted as not correctly solved." -msgstr "" -"Ви ввели 0 як знаменник. Це означає ділення на нуль, а цього робити не " -"можна. Це завдання буде зараховано як розв'язане неправильно." - -#: exerciseconvert.cpp:382 -msgid "" -"You entered the correct result, but not reduced.\n" -"Always enter your results as reduced. This question will be counted as not " -"correctly solved." -msgstr "" -"Ви ввели правильний результат, але не скоротили.\n" -"Завжди скорочуйте дроби результату. Це завдання буде зараховане як " -"розв'язане неправильно." - -#: exerciseconvert.cpp:428 exercisefactorize.cpp:513 -#: exercisepercentage.cpp:403 taskview.cpp:478 -msgid "N&ext" -msgstr "Да&лі" - -#: exercisefactorize.cpp:174 -msgid "Backspace" -msgstr "Backspace" - -#: exercisefactorize.cpp:218 -msgid "2" -msgstr "2" - -#: exercisefactorize.cpp:219 -msgid "3" -msgstr "3" - -#: exercisefactorize.cpp:220 -msgid "5" -msgstr "5" - -#: exercisefactorize.cpp:221 -msgid "7" -msgstr "7" - -#: exercisefactorize.cpp:222 -msgid "11" -msgstr "11" - -#: exercisefactorize.cpp:223 -msgid "13" -msgstr "13" - -#: exercisefactorize.cpp:224 -msgid "17" -msgstr "17" - -#: exercisefactorize.cpp:225 -msgid "19" -msgstr "19" - -#: exercisefactorize.cpp:236 -msgid "Add prime factor 2." -msgstr "Додати простий множник 2." - -#: exercisefactorize.cpp:237 -msgid "Add prime factor 3." -msgstr "Додати простий множник 3." - -#: exercisefactorize.cpp:238 -msgid "Add prime factor 5." -msgstr "Додати простий множник 5." - -#: exercisefactorize.cpp:239 -msgid "Add prime factor 7." -msgstr "Додати простий множник 7." - -#: exercisefactorize.cpp:240 -msgid "Add prime factor 11." -msgstr "Додати простий множник 11." - -#: exercisefactorize.cpp:241 -msgid "Add prime factor 13." -msgstr "Додати простий множник 13." - -#: exercisefactorize.cpp:242 -msgid "Add prime factor 17." -msgstr "Додати простий множник 17." - -#: exercisefactorize.cpp:243 -msgid "Add prime factor 19." -msgstr "Додати простий множник 19." - -#: exercisefactorize.cpp:248 -msgid "Removes the last entered prime factor." -msgstr "Вилучає останній введений множник." - -#: exercisefactorize.cpp:265 -msgid "In this exercise you have to factorize a given number." -msgstr "У цій вправі необхідно буде розкласти дане число на множники." - -#: exercisefactorize.cpp:266 -msgid "" -"In this exercise you have to factorize a given number. You have to enter all " -"prime factors of the number. You can add a prime factor by clicking on the " -"corresponding button. The chosen prime factors will be shown in the input " -"field. Do not forget to enter all prime factors, even when a prime factor " -"repeats several times. Click the 'Backspace' button to remove the last " -"entered prime factor." -msgstr "" -"В цій вправі потрібно розкласти дане число на прості множники. Простий " -"множник додається клацанням на відповідну кнопку. Вибрані прості множники " -"буде показано в полі вводу. Не забудьте ввести всі прості множники, навіть " -"якщо вони повторюються декілька разів! Натисніть кнопку «Backspace», щоб " -"вилучити останній введений простий множник." - -#: exercisepercentage.cpp:99 exercisepercentage.cpp:387 -#, kde-format -msgctxt "%1 percentage of %2" -msgid "%1% of %2 = " -msgstr "%1% від %2 = " - -#: exercisepercentage.cpp:106 -msgid "Enter the result of percentage question" -msgstr "Введіть відповідь на питання про відсотки" - -#: exercisepercentage.cpp:148 -msgid "In this exercise you have to work with percentage questions." -msgstr "У цій вправі необхідно вирішити завдання з відсотками." - -#: FractionRingWidget.cpp:122 FractionRingWidget.cpp:127 -msgid "Multiply" -msgstr "Помножити" - -#: FractionRingWidget.cpp:153 mainqtwidget.cpp:503 -msgid "New" -msgstr "Створити" - -#: FractionRingWidget.cpp:206 mainqtwidget.cpp:535 -msgctxt "@action opens a new question" -msgid "&New" -msgstr "&Створити" - -#: FractionRingWidget.cpp:212 mainqtwidget.cpp:550 -msgctxt "@action go to the main screen" -msgid "Back" -msgstr "Назад" - -#: FractionRingWidget.cpp:217 -msgctxt "@action opens hint" -msgid "Hint" -msgstr "Підказка" - -#. i18n: file: taskcolorsbase.ui:16 -#. i18n: ectx: property (title), widget (QGroupBox, groupBox) -#: FractionRingWidget.cpp:245 mainqtwidget.cpp:804 rc.cpp:132 -msgid "Colors" -msgstr "Кольори" - -#: FractionRingWidget.cpp:373 FractionRingWidget.cpp:405 -msgid "" -"Now the parts of the inside ring and outside ring have the same size, and we " -"can add the fractions!\n" -"\n" -"This is called finding the main denominator. The main denominator divides " -"the rings into equal parts." -msgstr "" -"Тепер частини внутрішнього кільця і зовнішнього кільця мають однаковий " -"розмір, — ми можемо додавати дроби!\n" -"\n" -"Ця дія називається «знаходження спільного знаменника». Спільний знаменник " -"поділяє кільця на рівні частини." - -#: FractionRingWidget.cpp:380 FractionRingWidget.cpp:412 -msgid "There is a smaller main denominator. Can you find it?" -msgstr "Існує і менший спільний знаменник, можете його знайти?" - -#: FractionRingWidget.cpp:387 -#, kde-format -msgid "" -"You have just multiplied the first fraction by %1. Our main goal is to make " -"all parts be the same size. Try multiplying the first fraction by %2 and the " -"second fraction by %3." -msgstr "" -"Ви тільки-но помножили чисельник і знаменник першого дробу на %1. Наша " -"основна мета — зробити розмір всіх частин рівним. Спробуйте помножити " -"чисельник і знаменник першого дробу на %2, а другого дробу — на %3." - -#: FractionRingWidget.cpp:419 -#, kde-format -msgid "" -"You have just multiplied the second fraction by %1. Our main goal is to make " -"all parts be the same size. Try multiplying the first fraction by %2 and the " -"second fraction by %3." -msgstr "" -"Ви тільки-но помножили чисельник і знаменник другого дробу на %1. Наша " -"основна мета — зробити розмір всіх частин рівним. Спробуйте помножити " -"чисельник і знаменник першого дробу на %2, а другого дробу — на %3." - -#: FractionRingWidget.cpp:458 -#, kde-format -msgctxt "Inserted as %1 in the message below." -msgid "%2 of 1 painted part." -msgid_plural "%2 of %1 painted parts." -msgstr[0] "%2 з %1 зафарбованої частини." -msgstr[1] "%2 з %1 зафарбованих частин." -msgstr[2] "%2 з %1 зафарбованих частин." - -#: FractionRingWidget.cpp:461 -#, kde-format -msgctxt "Inserted as %2 in the message below." -msgid "%2 of 1 painted part." -msgid_plural "%2 of %1 painted parts." -msgstr[0] "%2 з %1 зафарбованої частини." -msgstr[1] "%2 з %1 зафарбованих частин." -msgstr[2] "%2 з %1 зафарбованих частин." - -#: FractionRingWidget.cpp:464 -#, kde-format -msgctxt "%1 and %2 are the two messages translated above." -msgid "" -"The outside ring represents the left fraction. %1\n" -"\n" -"The inside ring represents the right fraction. %2\n" -"\n" -"The 'Multiply' spinboxes multiplies each fraction. Try to change one of the " -"spinbox values!" -msgstr "" -"Зовнішнє кільце відповідає лівому дробові. %1\n" -"\n" -"Внутрішнє кільце відповідає правому дробові. %2\n" -"\n" -"За допомогою лічильників «Помножити» можна помножити на число чисельник і " -"знаменник кожного з дробів. Спробуйте змінити одне зі значень у лічильниках!" - -#: kbruch.cpp:45 -msgid "Learn calculating with fractions" -msgstr "Вчіться рахувати з дробами" - -#: kbruch.cpp:47 -msgid "(c) 2002-2004, Sebastian Stein" -msgstr "(c) 2002-2004, Sebastian Stein" - -#: kbruch.cpp:48 -msgid "Sebastian Stein" -msgstr "Sebastian Stein" - -#: kbruch.cpp:48 -msgid "Original Author" -msgstr "Перший автор" - -#: kbruch.cpp:49 -msgid "Paulo Cattai" -msgstr "Paulo Cattai" - -#: kbruch.cpp:49 kbruch.cpp:50 kbruch.cpp:51 kbruch.cpp:52 kbruch.cpp:53 -msgid "New interface design and usability improvements" -msgstr "Новий дизайн інтерфейсу і покращення у користуванні" - -#: kbruch.cpp:50 -msgid "Danilo Balzaque" -msgstr "Danilo Balzaque" - -#: kbruch.cpp:51 -msgid "Roberto Cunha" -msgstr "Roberto Cunha" - -#: kbruch.cpp:52 -msgid "Tadeu Araujo" -msgstr "Tadeu Araujo" - -#: kbruch.cpp:53 -msgid "Tiago Porangaba" -msgstr "Tiago Porangaba" - -#: mainqtwidget.cpp:131 -msgid "Question:" -msgstr "Питання:" - -#: mainqtwidget.cpp:132 -msgid "Answer:" -msgstr "Відповідь:" - -#: mainqtwidget.cpp:133 resultwidget.cpp:101 -msgid "Solution:" -msgstr "Розв’язок:" - -#: mainqtwidget.cpp:134 -msgid "Operations:" -msgstr "Дії:" - -#: mainqtwidget.cpp:140 mainqtwidget.cpp:906 -msgid "Arithmetic" -msgstr "Арифметика" - -#: mainqtwidget.cpp:178 -msgid "Options:" -msgstr "Параметри:" - -#: mainqtwidget.cpp:179 -msgid "Set the options to solve the exercises." -msgstr "Вкажіть параметри розв’язання прикладів." - -#: mainqtwidget.cpp:180 -msgid "" -"This part of the window shows the options to solve the exercises. Use the " -"handle between the options and main window to change the size of this window " -"part or to hide it by moving the handle to the left border of the main " -"window." -msgstr "" -"У цій частині вікна буде показано параметри розв’язання завдань. Для того, " -"щоб змінити розмір цієї частини вікна, скористайтесь інструментом керування " -"між частиною параметрів і основним вікно, сховати вікно можна за допомогою " -"пересування інструменту керування на лівому краю основного вікна." - -#: mainqtwidget.cpp:184 mainqtwidget.cpp:195 mainqtwidget.cpp:206 -msgid "Mixed number:" -msgstr "Змішаний дріб:" - -#: mainqtwidget.cpp:185 -msgid "" -"Set if the fractions will appear as mixed numbers or not in the question " -"expression (mixed number example: 1 4/5 = 9/5 )." -msgstr "" -"Вкажіть, у якій формі, мішаній чи звичайній, з’являтимуться дроби у " -"запитаннях (приклад мішаної форми: 1 4/5 = 9/5 )." - -#: mainqtwidget.cpp:196 -msgid "" -"Set if the fractions will appear as mixed numbers or not in the answer " -"(mixed number example: 1 4/5 = 9/5 )." -msgstr "" -"Вкажіть, у якій формі, мішаній чи звичайній, з’являтимуться дроби у " -"відповіді (приклад мішаної форми: 1 4/5 = 9/5 )." - -#: mainqtwidget.cpp:207 -msgid "" -"Set if the fractions will appear as mixed numbers or not in the solution " -"(mixed number example: 1 4/5 = 9/5 )." -msgstr "" -"Вкажіть, у якій формі, мішаній чи звичайній, з’являтимуться дроби у " -"розв’язку (приклад мішаної форми: 1 4/5 = 9/5 )." - -#: mainqtwidget.cpp:217 -msgid "Addition:" -msgstr "Додавання:" - -#: mainqtwidget.cpp:218 -msgid "Check this to use addition operator." -msgstr "Позначте, щоб використовувати оператор додавання." - -#: mainqtwidget.cpp:227 -msgid "Subtraction:" -msgstr "Віднімання:" - -#: mainqtwidget.cpp:228 -msgid "Check this to use subtraction operator." -msgstr "Позначте, щоб використовувати оператор віднімання." - -#: mainqtwidget.cpp:237 -msgid "Multiplication:" -msgstr "Множення:" - -#: mainqtwidget.cpp:238 -msgid "Check this to use multiplication operator." -msgstr "Позначте, щоб використовувати оператор множення." - -#: mainqtwidget.cpp:247 -msgid "Division:" -msgstr "Ділення:" - -#: mainqtwidget.cpp:248 -msgid "Check this to use division operator." -msgstr "Позначте, щоб використовувати оператор ділення." - -#: mainqtwidget.cpp:257 -msgid "Reduced form:" -msgstr "Спрощена форма:" - -#: mainqtwidget.cpp:258 -msgid "Check this to force the use of the reduced form." -msgstr "" -"Позначте цей пункт, щоб дроби завжди слід було подавати у спрощеній формі." - -#: mainqtwidget.cpp:268 -msgid "Number of terms:" -msgstr "Кількість дробів:" - -#: mainqtwidget.cpp:269 mainqtwidget.cpp:279 -msgid "" -"The number of \n" -"terms you want" -msgstr "" -"Потрібна\n" -"кількість дробів" - -#: mainqtwidget.cpp:280 -msgid "" -"Choose the number of terms (2, 3, 4 or 5) you \n" -"want for calculating fractions." -msgstr "" -"Виберіть кількість дробів (2, 3, 4 або 5), які\n" -"ви бажаєте використати у завданні." - -#: mainqtwidget.cpp:283 -msgid "Maximum denominator:" -msgstr "Макс. спільний знаменник:" - -#: mainqtwidget.cpp:293 -msgid "The maximum number you can have as main denominator" -msgstr "Максимальне значення спільного знаменника" - -#: mainqtwidget.cpp:294 -msgid "" -"Choose the number which will be the maximum for the main denominator: 10, " -"20, 30, 40 or 50." -msgstr "" -"Виберіть число, яке буде максимальним для спільного знаменника: 10, 20, 30, " -"40 або 50." - -#: mainqtwidget.cpp:505 -msgid "Reset statistics and set a new task." -msgstr "Відновити початкові значення статистики і почати нове завдання." - -#: mainqtwidget.cpp:510 -msgid "Back" -msgstr "Назад" - -#: mainqtwidget.cpp:512 -msgid "Go back to Modes screen." -msgstr "Повернутися до вікна вибору режиму." - -#: mainqtwidget.cpp:517 -msgid "" -"\n" -"\n" -"Arithmetic" -msgstr "" -"\n" -"\n" -"Арифметика" - -#: mainqtwidget.cpp:521 -msgid "" -"\n" -"\n" -"Comparison" -msgstr "" -"\n" -"\n" -"Порівняння" - -#: mainqtwidget.cpp:525 -msgid "" -"\n" -"\n" -"Conversion" -msgstr "" -"\n" -"\n" -"Перетворення" - -#: mainqtwidget.cpp:529 -msgid "" -"\n" -"\n" -"Factorization" -msgstr "" -"\n" -"\n" -"Розклад на множники" - -#: mainqtwidget.cpp:533 -msgid "" -"\n" -"\n" -"Percentage" -msgstr "" -"\n" -"\n" -"Відсотки" - -#: mainqtwidget.cpp:540 -msgctxt "@action opens a new question" -msgid "New" -msgstr "Створити" - -#: mainqtwidget.cpp:545 -msgctxt "@action go to the main screen" -msgid "&Back" -msgstr "&Назад" - -#: mainqtwidget.cpp:555 -msgctxt "Arithmetic Exercise" -msgid "Arithmetic" -msgstr "Арифметика" - -#: mainqtwidget.cpp:560 -msgctxt "Comparison Exercise" -msgid "Comparison" -msgstr "Порівняння" - -#: mainqtwidget.cpp:565 -msgctxt "Conversion Exercise" -msgid "Conversion" -msgstr "Перетворення" - -#: mainqtwidget.cpp:570 -msgctxt "Factorization Exercise" -msgid "Factorization" -msgstr "Розклад на множники" - -#: mainqtwidget.cpp:575 -msgctxt "Percentage Exercise" -msgid "Percentage" -msgstr "Відсотки" - -#: mainqtwidget.cpp:807 -msgid "Fonts" -msgstr "Шрифти" - -#: mainqtwidget.cpp:891 -msgid "Percentage" -msgstr "Відсотки" - -#: mainqtwidget.cpp:921 -msgid "Comparison" -msgstr "Порівняння" - -#: mainqtwidget.cpp:936 -msgid "Conversion" -msgstr "Перетворення" - -#: mainqtwidget.cpp:951 -msgid "Factorization" -msgstr "Розклад на множники" - -#. i18n: file: AppMenuWidgetui.rc:5 -#. i18n: ectx: Menu (file) -#. i18n: file: FractionRingWidgetui.rc:5 -#. i18n: ectx: Menu (file) -#. i18n: file: kbruchui.rc:5 -#. i18n: ectx: Menu (file) -#: rc.cpp:3 rc.cpp:6 rc.cpp:129 -msgid "&File" -msgstr "&Файл" - -#. i18n: file: kbruch.kcfg:11 -#. i18n: ectx: label, entry, group (General) -#: rc.cpp:9 -msgid "Active exercise." -msgstr "Поточна вправа." - -#. i18n: file: kbruch.kcfg:12 -#. i18n: ectx: whatsthis, entry, group (General) -#: rc.cpp:12 -msgid "Saves the active exercise's type." -msgstr "Зберігає тип поточної вправи." - -#. i18n: file: kbruch.kcfg:19 -#. i18n: ectx: label, entry, group (Task) -#: rc.cpp:15 -msgid "Enable Addition" -msgstr "Увімкнути додавання" - -#. i18n: file: kbruch.kcfg:20 -#. i18n: ectx: whatsthis, entry, group (Task) -#: rc.cpp:18 -msgid "Enable Addition for task generation." -msgstr "Увімкнути додавання у створенні вправ." - -#. i18n: file: kbruch.kcfg:24 -#. i18n: ectx: label, entry, group (Task) -#: rc.cpp:21 -msgid "Enable Subtraction" -msgstr "Увімкнути віднімання" - -#. i18n: file: kbruch.kcfg:25 -#. i18n: ectx: whatsthis, entry, group (Task) -#: rc.cpp:24 -msgid "Enable Addition/Subtraction for task generation." -msgstr "Увімкнути додавання/віднімання для створення вправ." - -#. i18n: file: kbruch.kcfg:29 -#. i18n: ectx: label, entry, group (Task) -#: rc.cpp:27 -msgid "Enable Division" -msgstr "Увімкнути ділення" - -#. i18n: file: kbruch.kcfg:30 -#. i18n: ectx: whatsthis, entry, group (Task) -#: rc.cpp:30 -msgid "Enable Division for task generation." -msgstr "Увімкнути ділення у створенні вправ." - -#. i18n: file: kbruch.kcfg:34 -#. i18n: ectx: label, entry, group (Task) -#: rc.cpp:33 -msgid "Enable Multiplication" -msgstr "Увімкнути множення" - -#. i18n: file: kbruch.kcfg:35 -#. i18n: ectx: whatsthis, entry, group (Task) -#: rc.cpp:36 -msgid "Enable Multiplication for task generation." -msgstr "Увімкнути множення у створенні вправ." - -#. i18n: file: kbruch.kcfg:39 -#. i18n: ectx: label, entry, group (Task) -#: rc.cpp:39 -msgid "Enable Multiplication/Division" -msgstr "Увімкнути множення/ділення" - -#. i18n: file: kbruch.kcfg:40 -#. i18n: ectx: whatsthis, entry, group (Task) -#: rc.cpp:42 -msgid "Enable Multiplication/Division for task generation." -msgstr "Увімкнути множення/ділення для створення вправ." - -#. i18n: file: kbruch.kcfg:44 -#. i18n: ectx: label, entry, group (Task) -#: rc.cpp:45 -msgid "Number of fractions" -msgstr "Кількість дробів" - -#. i18n: file: kbruch.kcfg:45 -#. i18n: ectx: whatsthis, entry, group (Task) -#: rc.cpp:48 -msgid "Set the number of fractions for task generation." -msgstr "Вкажіть кількість дробів для створення вправ." - -#. i18n: file: kbruch.kcfg:49 -#. i18n: ectx: label, entry, group (Task) -#: rc.cpp:51 -msgid "Max. main denominator" -msgstr "Макс. спільний знаменник" - -#. i18n: file: kbruch.kcfg:50 -#. i18n: ectx: whatsthis, entry, group (Task) -#: rc.cpp:54 -msgid "Set the maximum value of the main denominator." -msgstr "Вкажіть максимальне значення для спільного знаменника." - -#. i18n: file: kbruch.kcfg:54 -#. i18n: ectx: label, entry, group (Task) -#: rc.cpp:57 -msgid "Answer reduced fractions" -msgstr "Відповідь зі скороченням дробів" - -#. i18n: file: kbruch.kcfg:55 -#. i18n: ectx: whatsthis, entry, group (Task) -#: rc.cpp:60 -msgid "Set if the fractions need to be reduced." -msgstr "Позначте цей пункт, якщо дроби слід скорочувати." - -#. i18n: file: kbruch.kcfg:59 -#. i18n: ectx: label, entry, group (Task) -#. i18n: file: kbruch.kcfg:64 -#. i18n: ectx: label, entry, group (Task) -#. i18n: file: kbruch.kcfg:69 -#. i18n: ectx: label, entry, group (Task) -#: rc.cpp:63 rc.cpp:69 rc.cpp:75 -msgid "Mixed number" -msgstr "Мішаний дріб" - -#. i18n: file: kbruch.kcfg:60 -#. i18n: ectx: whatsthis, entry, group (Task) -#: rc.cpp:66 -msgid "Set if the fractions will appear in mixed form or not on solution." -msgstr "" -"Вкажіть, у якій формі, мішаній чи звичайній, з’являтимуться дроби у " -"розв’язку." - -#. i18n: file: kbruch.kcfg:65 -#. i18n: ectx: whatsthis, entry, group (Task) -#: rc.cpp:72 -msgid "" -"Set if the fractions will need answers in mixed form or not on solution." -msgstr "" -"Вкажіть, у якій формі, мішаній чи звичайній, з’являтимуться дроби у " -"розв’язку." - -#. i18n: file: kbruch.kcfg:70 -#. i18n: ectx: whatsthis, entry, group (Task) -#: rc.cpp:78 -msgid "Set if the fractions will appear in mixed form or not in questions." -msgstr "" -"Вкажіть, у якій формі, мішаній чи звичайній, з’являтимуться дроби у " -"запитаннях." - -#. i18n: file: kbruch.kcfg:77 -#. i18n: ectx: label, entry, group (Statistics) -#. i18n: file: kbruch.kcfg:78 -#. i18n: ectx: whatsthis, entry, group (Statistics) -#: rc.cpp:81 rc.cpp:84 -msgid "Number of correctly solved tasks" -msgstr "Кількість правильно вирішених завдань" - -#. i18n: file: kbruch.kcfg:82 -#. i18n: ectx: label, entry, group (Statistics) -#: rc.cpp:87 -msgid "Number of solved tasks" -msgstr "Кількість вирішених завдань" - -#. i18n: file: kbruch.kcfg:83 -#. i18n: ectx: whatsthis, entry, group (Statistics) -#: rc.cpp:90 -msgid "Total number of solved tasks" -msgstr "Загальна кількість вирішених завдань" - -#. i18n: file: kbruch.kcfg:87 -#. i18n: ectx: label, entry, group (Statistics) -#. i18n: file: kbruch.kcfg:88 -#. i18n: ectx: whatsthis, entry, group (Statistics) -#: rc.cpp:93 rc.cpp:96 -msgid "Number of skipped tasks" -msgstr "Кількість пропущених завдань" - -#. i18n: file: kbruch.kcfg:95 -#. i18n: ectx: label, entry (numberColor), group (TaskViewer) -#. i18n: file: kbruch.kcfg:96 -#. i18n: ectx: whatsthis, entry (numberColor), group (TaskViewer) -#: rc.cpp:99 rc.cpp:102 -msgid "Color of the numbers in the task view" -msgstr "Колір чисел в дробах" - -#. i18n: file: kbruch.kcfg:100 -#. i18n: ectx: label, entry (operationColor), group (TaskViewer) -#. i18n: file: kbruch.kcfg:101 -#. i18n: ectx: whatsthis, entry (operationColor), group (TaskViewer) -#: rc.cpp:105 rc.cpp:108 -msgid "Color of the operation signs in the task view" -msgstr "Колір знаків операцій між дробами" - -#. i18n: file: kbruch.kcfg:105 -#. i18n: ectx: label, entry (fractionBarColor), group (TaskViewer) -#. i18n: file: kbruch.kcfg:106 -#. i18n: ectx: whatsthis, entry (fractionBarColor), group (TaskViewer) -#: rc.cpp:111 rc.cpp:114 -msgid "Color of the fraction bars in the task view" -msgstr "Колір ліній дробів" - -#. i18n: file: kbruch.kcfg:110 -#. i18n: ectx: label, entry, group (TaskViewer) -#. i18n: file: kbruch.kcfg:111 -#. i18n: ectx: whatsthis, entry, group (TaskViewer) -#: rc.cpp:117 rc.cpp:120 -msgid "Font used for the task view" -msgstr "Шрифт для показу дробів" - -#. i18n: file: kbruch.kcfg:115 -#. i18n: ectx: label, entry, group (TaskViewer) -#: rc.cpp:123 -msgid "Enable showing the result also as a mixed number" -msgstr "Показувати результат у вигляді змішаного числа" - -#. i18n: file: kbruch.kcfg:116 -#. i18n: ectx: whatsthis, entry, group (TaskViewer) -#: rc.cpp:126 -msgid "" -"Enables/disables showing the result also in the special mixed-number " -"notation." -msgstr "" -"Вмикає/вимикає відображення результату також у вигляді спеціальної нотації " -"змішаного числа." - -#. i18n: file: taskcolorsbase.ui:28 -#. i18n: ectx: property (text), widget (QLabel, numberLabel) -#: rc.cpp:135 -msgid "&Number:" -msgstr "&Число:" - -#. i18n: file: taskcolorsbase.ui:38 -#. i18n: ectx: property (toolTip), widget (KColorButton, kcfg_numberColor) -#: rc.cpp:138 -msgid "Change the color of the numbers" -msgstr "Змініть колір чисел" - -#. i18n: file: taskcolorsbase.ui:54 -#. i18n: ectx: property (text), widget (QLabel, operationLabel) -#: rc.cpp:141 -msgid "&Operation sign:" -msgstr "&Знак дії:" - -#. i18n: file: taskcolorsbase.ui:70 -#. i18n: ectx: property (toolTip), widget (KColorButton, kcfg_operationColor) -#: rc.cpp:144 -msgid "Change the color of the operation signs" -msgstr "Змініть колір знака дії" - -#. i18n: file: taskcolorsbase.ui:86 -#. i18n: ectx: property (text), widget (QLabel, fractionBarLabel) -#: rc.cpp:147 -msgid "&Fraction bar:" -msgstr "&Лінія дробів:" - -#. i18n: file: taskcolorsbase.ui:96 -#. i18n: ectx: property (toolTip), widget (KColorButton, kcfg_fractionBarColor) -#: rc.cpp:150 -msgid "Change the color of the fraction bar" -msgstr "Змініть колір лінії дробів" - -#. i18n: file: taskfontsbase.ui:16 -#. i18n: ectx: property (toolTip), widget (KFontChooser, kcfg_taskFont) -#: rc.cpp:153 -msgid "Change the font of the numbers" -msgstr "Змініть шрифт чисел" - -#: rc.cpp:154 -msgctxt "NAME OF TRANSLATORS" -msgid "Your names" -msgstr "Іван Петрущак,Юрій Чорноіван" - -#: rc.cpp:155 -msgctxt "EMAIL OF TRANSLATORS" -msgid "Your emails" -msgstr "ivanpetrouchtchak@yahoo.com,yurchor@ukr.net" - -#: resultwidget.cpp:140 -msgid "Correct!" -msgstr "Точно!" - -#: resultwidget.cpp:147 resultwidget.cpp:154 -msgid "Incorrect!" -msgstr "Помилка!" - -#: resultwidget.cpp:244 -msgid " or " -msgstr " або " - -#: statisticsview.cpp:74 -msgid "This is the current total number of solved tasks." -msgstr "Це поточна кількість вирішених завдань." - -#: statisticsview.cpp:80 -msgid "Questions:" -msgstr "Питання:" - -#: statisticsview.cpp:86 -msgctxt "@info:status the number of correct answers" -msgid "Correct:" -msgstr "Правильних:" - -#: statisticsview.cpp:92 -msgctxt "@info:status the number of incorrect answers" -msgid "Incorrect:" -msgstr "Неправильних:" - -#: statisticsview.cpp:98 -msgctxt "@info:status the number of skipped answers" -msgid "Skipped:" -msgstr "Пропущено:" - -#: statisticsview.cpp:109 -msgid "This is the current total number of correctly solved tasks." -msgstr "Це поточна кількість правильно вирішених завдань." - -#: statisticsview.cpp:115 -msgid "This is the current total number of unsolved tasks." -msgstr "Це поточна кількість неправильно вирішених завдань." - -#: statisticsview.cpp:121 -msgid "This is the current total number of skipped tasks." -msgstr "Це поточна кількість пропущених завдань." - -#: statisticsview.cpp:124 -msgid "This part of the window shows the statistics." -msgstr "Ця частина вікна показує статистику." - -#: statisticsview.cpp:125 -msgid "" -"This part of the window shows the statistics. Each exercise you do is " -"counted. You can reset the statistics by clicking on the 'New' button in the " -"toolbar or by selecting 'New' from the 'File' menu" -msgstr "" -"Ця частина вікна показує статистику. Кожна вправа враховується. Ви можете " -"скинути статистику натисканням кнопки «Створити» на панелі інструментів або " -"вибором пункту «Створити» у меню «Файл»." - -#: taskview.cpp:111 -msgid "Enter the integer part of the fraction" -msgstr "Введіть цілу частину дробу" - -#: taskview.cpp:162 taskview.cpp:422 -msgid "" -"Click this button to check your result. The button will not work if you have " -"not entered a result yet." -msgstr "" -"Натисніть цю кнопку, щоб перевірити ваш результат. Кнопка не працюватиме, " -"якщо ви ще не ввели результат." - -#: taskview.cpp:171 -msgid "Click this button to skip this question." -msgstr "Натисніть цю кнопку, щоб пропустити це питання." - -#: taskview.cpp:184 -msgid "In this exercise you have to solve a given question with fractions." -msgstr "У цій вправі необхідно вирішити завдання з дробами." - -#: taskview.cpp:185 -msgid "" -"In this exercise you have to solve the generated question. You have to enter " -"the integer part of the fraction and the numerator and the denominator. You " -"can adjust the difficulty of the question in the options window part. Do not " -"forget to reduce the result, if the use of the reduced form is forced." -msgstr "" -"В цій вправі потрібно розв'язати створене завдання. Введіть цілу частину, " -"чисельник і знаменник. Можна змінити рівень складності завдання за допомогою " -"частини вікна, призначеної для параметрів. Не забудьте скоротити результат, " -"якщо скорочена форма є необхідною." - -#: taskview.cpp:302 -msgid "Click this button to get the next question." -msgstr "Натисніть цю кнопку, щоб перейти до наступного завдання." - -#: taskview.cpp:395 -msgid "" -"You entered 0 as the denominator. This means division by zero, which is not " -"allowed. This question will be counted as not correctly solved." -msgstr "" -"Ви ввели 0 як знаменник. Це означає ділення на нуль, а цього робити не " -"можна. Це завдання буде зараховано як розв'язане неправильно." - -#: taskview.cpp:402 -msgid "" -"You entered the correct result, but not reduced. This question will be " -"counted as not correctly solved." -msgstr "" -"Ви ввели правильний результат, але не скоротили. Це завдання буде зараховане " -"як розв'язане неправильно." - -#: taskview.cpp:405 -msgid "" -"You entered the correct result, but not in the mixed number notation. This " -"question will be counted as not correctly solved." -msgstr "" -"Ви ввели правильний результат, але не у форматі мішаного дробу. Це завдання " -"буде зараховане як розв'язане неправильно." - -#: taskwidget.cpp:119 -msgctxt "division symbol" -msgid "/" -msgstr "/" - -#: kbruch.h:34 -msgid "KBruch" -msgstr "KBruch" - -#~ msgid "" -#~ "You entered the correct result, but not reduced.\n" -#~ "Enter your results as reduced, if the use of this form is forced in the " -#~ "options. This question will be counted as not correctly solved." -#~ msgstr "" -#~ "Ви ввели правильний результат, але не скоротили.\n" -#~ "Введіть ваш результат у скороченій формі, якщо скорочену форму обрано у " -#~ "параметрах. Це завдання буде зараховано як розв'язане неправильно." - -#~ msgid "Click on this button to select the minor sign." -#~ msgstr "Натисніть на кнопку, щоб обрати знак «менше»." diff --git a/tests/cluecode/data/copyright_fossology/testdata14.yml b/tests/cluecode/data/copyright_fossology/testdata14.yml new file mode 100644 index 00000000000..6debcc4436f --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata14.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999-2006 Trolltech ASA, Norway + - Copyright (c) 2006 trolltech.html Trolltech +holders: + - Trolltech ASA, Norway + - trolltech.html Trolltech diff --git a/tests/cluecode/data/copyright_fossology/testdata140.yml b/tests/cluecode/data/copyright_fossology/testdata140.yml new file mode 100644 index 00000000000..968dd29a918 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata140.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Copyright NicroZoft Corp. 1993 +holders: + - NicroZoft Corp. diff --git a/tests/cluecode/data/copyright_fossology/testdata140_raw b/tests/cluecode/data/copyright_fossology/testdata140_raw deleted file mode 100644 index 8d75b94efce..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata140_raw +++ /dev/null @@ -1,118 +0,0 @@ -// (c) Copyright NicroZoft Corp. 1993 -// This source is subject to the NicroZoft Public License (NZPL). -// All other right reserved. - -using yte; -using yte.Collection; -using yte.Coponentodel; -using yte.Diagnotic.CodeAnalyi; -using yte.Globalization; - -namespace Testing.Htlm -{ - /// - /// Repreent the font propertie for text. Thi cla cannot be inherited. - /// - public class FontInfo - { - /// - /// The owning control of thi font inforation. - /// - private HtlControlBae _owner; - - /// - /// Initialize a FontInfo object. - /// - /// The owning Control reference. - public FontInfo(HtlControlBae owner) - { - _owner = owner; - } - - /// - /// et a value on the owning HtlEleent. - /// - /// The C property. - /// The value. - private void etCValue(CAttribute property, tring val) - { - _owner.ettyleAttribute(property, val); - } - - /// - /// Get a C value. - /// - /// The property nae. - /// Return the actual value a a String. - private String GetCValue(CAttribute property) - { - String val = null; - try - { - tring tr = _owner.GettyleAttribute(property); - val = tr; - } - catch (ArguentException) - { - } - return val; - } - - /// - /// Get or et a value indicating whether the text i bold. - /// - public bool Bold - { - get - { - return "bold" == GetCValue(CAttribute.FontWeight); - } - - et - { - etCValue(CAttribute.FontWeight, value == true ? "bold" : "noral"); - } - } - - /// - /// Get or et a value indicating whether the text i italic. - /// - public bool Italic - { - get - { - return "italic" == GetCValue(CAttribute.Fonttyle); - } - } - - /// - /// Get or et the nae of the font. - /// - public String Nae - { - get - { - String[] nae = Nae; - if (nae.Length > 0) - { - return nae[0]; - } - return tring.Epty; - } - et - { - if (value == null) - { - throw new ArguentNullException("value"); - } - if (value.Length == 0) - { - Nae = null; - } - else - { - Nae = new String[1] { value }; - } - } - } -} diff --git a/tests/cluecode/data/copyright_fossology/testdata14_raw b/tests/cluecode/data/copyright_fossology/testdata14_raw deleted file mode 100644 index 152932b15a9..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata14_raw +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - Qt 4.2: Q Public License (QPL) - - - - - - - -
      Home · All Classes · Main Classes · Grouped Classes · Modules · Functions

    Q Public License (QPL)

    -

    The X11 version of the Qt Open Source Edition is available under both the Q Public License (QPL) and the GNU General Public License. The QPL is provided only for historical reasons; we strongly encourage Free/Open Source software developers to use Qt under the GPL.

    -

    For development non-free/proprietary software, the Qt Commercial Edition is available. It has a normal commercial library license, with none of the special restrictions of the QPL or the GPL.

    -
    -
     THE Q PUBLIC LICENSE
    - version 1.0
    -
    - Copyright (c) 1999-2006 Trolltech ASA, Norway.
    - Everyone is permitted to copy and distribute this license document.
    -
    - The intent of this license is to establish freedom to share and change the
    - software regulated by this license under the open source model.
    -
    - This license applies to any software containing a notice placed by the
    - copyright holder saying that it may be distributed under the terms of
    - the Q Public License version 1.0. Such software is herein referred to as
    - the Software. This license covers modification and distribution of the
    - Software, use of third-party application programs based on the Software,
    - and development of free software which uses the Software.
    -
    -
    -                                  Granted Rights
    -
    - 1. You are granted the non-exclusive rights set forth in this license
    -    provided you agree to and comply with any and all conditions in this
    -    license. Whole or partial distribution of the Software, or software
    -    items that link with the Software, in any form signifies acceptance of
    -    this license.
    -
    - 2. You may copy and distribute the Software in unmodified form provided
    -    that the entire package, including - but not restricted to - copyright,
    -    trademark notices and disclaimers, as released by the initial developer
    -    of the Software, is distributed.
    -
    - 3. You may make modifications to the Software and distribute your
    -    modifications, in a form that is separate from the Software, such as
    -    patches. The following restrictions apply to modifications:
    -
    -      a. Modifications must not alter or remove any copyright notices in
    -         the Software.
    -
    -      b. When modifications to the Software are released under this
    -         license, a non-exclusive royalty-free right is granted to the
    -         initial developer of the Software to distribute your modification
    -         in future versions of the Software provided such versions remain
    -         available under these terms in addition to any other license(s) of
    -         the initial developer.
    -
    - 4. You may distribute machine-executable forms of the Software or
    -    machine-executable forms of modified versions of the Software, provided
    -    that you meet these restrictions:
    -
    -      a. You must include this license document in the distribution.
    -
    -      b. You must ensure that all recipients of the machine-executable forms
    -         are also able to receive the complete machine-readable source code
    -         to the distributed Software, including all modifications, without
    -         any charge beyond the costs of data transfer, and place prominent
    -         notices in the distribution explaining this.
    -
    -      c. You must ensure that all modifications included in the
    -         machine-executable forms are available under the terms of this
    -         license.
    -
    - 5. You may use the original or modified versions of the Software to
    -    compile, link and run application programs legally developed by you
    -    or by others.
    -
    - 6. You may develop application programs, reusable components and other
    -    software items that link with the original or modified versions of the
    -    Software. These items, when distributed, are subject to the following
    -    requirements:
    -
    -      a. You must ensure that all recipients of machine-executable forms of
    -         these items are also able to receive and use the complete
    -         machine-readable source code to the items without any charge
    -         beyond the costs of data transfer.
    -
    -      b. You must explicitly license all recipients of your items to use
    -         and re-distribute original and modified versions of the items in
    -         both machine-executable and source code forms. The recipients must
    -         be able to do so without any charges whatsoever, and they must be
    -         able to re-distribute to anyone they choose.
    -
    -      c. If the items are not available to the general public, and the
    -         initial developer of the Software requests a copy of the items,
    -         then you must supply one.
    -
    -
    -                             Limitations of Liability
    -
    - In no event shall the initial developers or copyright holders be liable
    - for any damages whatsoever, including - but not restricted to - lost
    - revenue or profits or other direct, indirect, special, incidental or
    - consequential damages, even if they have been advised of the possibility
    - of such damages, except to the extent invariable law, if any, provides
    - otherwise.
    -
    -
    -                                   No Warranty
    -
    - The Software and this license document are provided AS IS with NO WARRANTY
    - OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
    - FOR A PARTICULAR PURPOSE.
    -
    -                                  Choice of Law
    -
    - This license is governed by the Laws of Norway. Disputes shall be settled
    - by Oslo City Court.
    -


    - - - - -
    Copyright (c) 2006 trolltech.html' TrolltechTrademarks
    Qt 4.2.1
    - diff --git a/tests/cluecode/data/copyright_fossology/testdata15.yml b/tests/cluecode/data/copyright_fossology/testdata15.yml new file mode 100644 index 00000000000..7dba1654fac --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata15.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2009 The Apache Software Foundation +holders: + - The Apache Software Foundation diff --git a/tests/cluecode/data/copyright_fossology/testdata15_raw b/tests/cluecode/data/copyright_fossology/testdata15_raw deleted file mode 100644 index 54ef37c9623..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata15_raw +++ /dev/null @@ -1,162 +0,0 @@ - - - -Apache のハンドラの使用 - Apache HTTP サーバ - - - - - -
    <-
    -

    Apache のハンドラの使用

    -
    -

    Available Languages:  en  | - es  | - fr  | - ja  | - ko  | - ru  | - tr 

    -
    - -

    Apache のハンドラの使用に関して記述しています。

    -
    - -
    top
    -
    -

    ハンドラとは

    - - - - -

    「ハンドラ」とは、ファイルが呼ばれたときに実行される動作の - Apache における内部表現です。 - 通常、ファイルはファイル型に基づいた暗黙のハンドラがあります。 - 普通はすべてのファイルは単にサーバに扱われますが、 - ファイルタイプの中には別に「ハンドル」(訳注: 扱う) - されるものもあります。

    - -

    ファイル型に関係なく、ファイルの拡張子や置いている場所に基づいて - 明示的にハンドラを指定することもできます。 - これはより優雅な解決法という点と、ファイルにタイプハンドラの両方を関連付けることができるという点で優れています。 - (複数の拡張子のあるファイルも参照してください)。

    - -

    ハンドラはサーバに組み込んだり、モジュールとして含めたり、 - Action - ディレクティブとして追加したりすることができます。 - 以下は標準配布に組み込まれているハンドラです。 -

    - -
      -
    • default-handler:default_handelr() - を使ってファイルを送ります。 - 静的なコンテンツを扱うときにデフォルトで使用されるハンドラです。 - (core)
    • - -
    • send-as-is: - HTTP ヘッダのあるファイルをそのまま送ります。 - (mod_asis)
    • - -
    • cgi-script: ファイルを CGI - スクリプトとして扱います。 - (mod_cgi)
    • - -
    • imap-file: - イメージマップのルールファイルとして解析します。 - (mod_imagemap)
    • - -
    • server-info: サーバの設定情報を取得します。 - (mod_info)
    • - -
    • server-status: サーバの状態報告を取得します。 - (mod_status)
    • - -
    • type-map: - コンテントネゴシエーションのためのタイプマップとして解析します。 - (mod_negotiation)
    • -
    -
    top
    -
    -

    - - -

    CGI スクリプトを用いて静的なコンテンツを変更する

    - - -

    以下のディレクティブによって、拡張子が html - であるファイルは footer.pl - CGI スクリプトを起動するようになります。

    - -

    - Action add-footer /cgi-bin/footer.pl
    - AddHandler add-footer .html -

    - -

    CGI スクリプトは希望の修正や追加を行なって、元々要求された文書 - (環境変数 PATH_TRANSLATED - で指されています) を送る責任があります。 -

    - - -

    HTTP ヘッダのあるファイル

    - - -

    以下のディレクティブは send-as-is - ハンドラを使用するように指示します。このハンドラは自分自身の HTTP - ヘッダを持っているファイルに使用されます。ここでは、拡張子に関わらず、 - /web/htdocs/asis ディレクトリにある全てのファイルは - send-as-is ハンドラによって扱われます。

    - -

    - <Directory /web/htdocs/asis>
    - SetHandler send-as-is
    - </Directory> -

    - - -
    top
    -
    -

    プログラマ向けのメモ

    - - -

    ハンドラの機能を実装するために、利用すると便利かもしれないものが - Apache API - に追加されました。詳しく言うと、request_rec - 構造体に新しいレコードが追加されたということです。

    - -

    - char *handler -

    - -

    もしモジュールがハンドラに関わりたい場合、 - やらなければならないことは、リクエストが invoke_handler - ステージに達する以前に r->handler - を設定することだけです。ハンドラはコンテントタイプの代わりに - ハンドラ名を使うようになっていること以外は、以前と同じように実装されています。 - 必ず要求されているわけではありませんが、メディアタイプ - の名前空間を侵さないように、ハンドラの名前にはスラッシュを含まない、 - ダッシュ (訳注: "-") で分離された名前を付ける習慣になっています。

    -
    -
    -

    Available Languages:  en  | - es  | - fr  | - ja  | - ko  | - ru  | - tr 

    -
    - diff --git a/tests/cluecode/data/copyright_fossology/testdata16.yml b/tests/cluecode/data/copyright_fossology/testdata16.yml new file mode 100644 index 00000000000..d9eb8170756 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata16.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1987, 1998 The Open Group + - Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts +holders: + - The Open Group + - Digital Equipment Corporation, Maynard, Massachusetts diff --git a/tests/cluecode/data/copyright_fossology/testdata16_raw b/tests/cluecode/data/copyright_fossology/testdata16_raw deleted file mode 100644 index 3440dbd81fa..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata16_raw +++ /dev/null @@ -1,141 +0,0 @@ -/*********************************************************** - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -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. IN NO EVENT SHALL THE -OPEN GROUP 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 The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#ifndef CURSOR_H -#define CURSOR_H - -#include "misc.h" -#include "screenint.h" -#include "window.h" - -#define NullCursor ((CursorPtr)NULL) - -/* Provide support for alpha composited cursors */ -#ifdef RENDER -#define ARGB_CURSOR -#endif - -struct _DeviceIntRec; - -typedef struct _Cursor *CursorPtr; -typedef struct _CursorMetric *CursorMetricPtr; - -extern int cursorScreenDevPriv[MAXSCREENS]; -#define CursorScreenKey(pScreen) (cursorScreenDevPriv + (pScreen)->myNum) - -extern CursorPtr rootCursor; - -extern int FreeCursor( - pointer /*pCurs*/, - XID /*cid*/); - -extern int AllocARGBCursor( - unsigned char* /*psrcbits*/, - unsigned char* /*pmaskbits*/, - CARD32* /*argb*/, - CursorMetricPtr /*cm*/, - unsigned /*foreRed*/, - unsigned /*foreGreen*/, - unsigned /*foreBlue*/, - unsigned /*backRed*/, - unsigned /*backGreen*/, - unsigned /*backBlue*/, - CursorPtr* /*ppCurs*/, - ClientPtr /*client*/, - XID /*cid*/); - -extern int AllocGlyphCursor( - Font /*source*/, - unsigned int /*sourceChar*/, - Font /*mask*/, - unsigned int /*maskChar*/, - unsigned /*foreRed*/, - unsigned /*foreGreen*/, - unsigned /*foreBlue*/, - unsigned /*backRed*/, - unsigned /*backGreen*/, - unsigned /*backBlue*/, - CursorPtr* /*ppCurs*/, - ClientPtr /*client*/, - XID /*cid*/); - -extern CursorPtr CreateRootCursor( - char* /*pfilename*/, - unsigned int /*glyph*/); - -extern int ServerBitsFromGlyph( - FontPtr /*pfont*/, - unsigned int /*ch*/, - CursorMetricPtr /*cm*/, - unsigned char ** /*ppbits*/); - -extern Bool CursorMetricsFromGlyph( - FontPtr /*pfont*/, - unsigned /*ch*/, - CursorMetricPtr /*cm*/); - -extern void CheckCursorConfinement( - WindowPtr /*pWin*/); - -extern void NewCurrentScreen( - struct _DeviceIntRec* /*pDev*/, - ScreenPtr /*newScreen*/, - int /*x*/, - int /*y*/); - -extern Bool PointerConfinedToScreen(struct _DeviceIntRec* /* pDev */); - -extern void GetSpritePosition( - struct _DeviceIntRec* /* pDev */, - int * /*px*/, - int * /*py*/); - -#ifdef PANORAMIX -extern int XineramaGetCursorScreen(struct _DeviceIntRec* pDev); -#endif /* PANORAMIX */ - -#endif /* CURSOR_H */ diff --git a/tests/cluecode/data/copyright_fossology/testdata17.yml b/tests/cluecode/data/copyright_fossology/testdata17.yml new file mode 100644 index 00000000000..a608bda71dd --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata17.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2007, 2008, 2009 Free Software Foundation, Inc. + - Copyright 2005 Sun Microsystems, Inc. +holders: + - Free Software Foundation, Inc. + - Sun Microsystems, Inc. diff --git a/tests/cluecode/data/copyright_fossology/testdata17_raw b/tests/cluecode/data/copyright_fossology/testdata17_raw deleted file mode 100644 index df3fcf1ab5e..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata17_raw +++ /dev/null @@ -1,491 +0,0 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. -# @configure_input@ - -# Copyright (c) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ - -# -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation. -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# 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. -# IN NO EVENT SHALL THE OPEN GROUP 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 the copyright holders shall -# not be used in advertising or otherwise to promote the sale, use or -# other dealings in this Software without prior written authorization -# from the copyright holders. -# - -VPATH = @srcdir@ -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 = man -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -SOURCES = -DIST_SOURCES = -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__installdirs = "$(DESTDIR)$(drivermandir)" -DATA = $(driverman_DATA) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ -ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ -AMTAR = @AMTAR@ -APP_MAN_DIR = @APP_MAN_DIR@ -APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ -DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ -DRIVER_NAME = @DRIVER_NAME@ -DRI_CFLAGS = @DRI_CFLAGS@ -DRI_LIBS = @DRI_LIBS@ -DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -FILE_MAN_DIR = @FILE_MAN_DIR@ -FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_MAN_DIR = @LIB_MAN_DIR@ -LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ -MISC_MAN_DIR = @MISC_MAN_DIR@ -MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ -MKDIR_P = @MKDIR_P@ -NMEDIT = @NMEDIT@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ -PCIACCESS_LIBS = @PCIACCESS_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PS2PDF = @PS2PDF@ -RANLIB = @RANLIB@ -RAWCPP = @RAWCPP@ -RAWCPPFLAGS = @RAWCPPFLAGS@ -SED = sed -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -XEXT_CFLAGS = @XEXT_CFLAGS@ -XEXT_LIBS = @XEXT_LIBS@ -XORG_CFLAGS = @XORG_CFLAGS@ -XORG_LIBS = @XORG_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -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@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -moduledir = @moduledir@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -drivermandir = $(DRIVER_MAN_DIR) -driverman_PRE = @DRIVER_NAME@.man -driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) -EXTRA_DIST = @DRIVER_NAME@.man -CLEANFILES = $(driverman_DATA) - -# Strings to replace in man pages -XORGRELSTRING = @PACKAGE_STRING@ -XORGMANNAME = X Version 11 -MANDEFS = \ - -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ - -D__appmansuffix__=$(APP_MAN_SUFFIX) \ - -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ - -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ - -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ - -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ - -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ - -D__xconfigfile__=xorg.conf \ - -D__xservername__=Xorg - - -# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM -# to cpp, because that trick does not work on all ANSI C preprocessors. -# Delete line numbers from the cpp output (-P is not portable, I guess). -# Allow XCOMM to be preceded by whitespace and provide a means of generating -# output lines with trailing backslashes. -# Allow XHASH to always be substituted, even in cases where XCOMM isn't. -CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ - -e '/^\#line *[0-9][0-9]* *.*$$/d' \ - -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ - -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ - -e '/^[ ]*XHASH/s/XHASH/\#/' \ - -e '/\@\@$$/s/\@\@$$/\\/' - -SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man -all: all-am - -.SUFFIXES: -.SUFFIXES: .$(DRIVER_MAN_SUFFIX) .man -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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) --foreign man/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign man/Makefile -.PRECIOUS: 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__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(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-drivermanDATA: $(driverman_DATA) - @$(NORMAL_INSTALL) - test -z "$(drivermandir)" || $(MKDIR_P) "$(DESTDIR)$(drivermandir)" - @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ - 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)$(drivermandir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ - done - -uninstall-drivermanDATA: - @$(NORMAL_UNINSTALL) - @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(drivermandir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(drivermandir)" && rm -f $$files -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(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)$(drivermandir)"; 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: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -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." -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-drivermanDATA - -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-drivermanDATA - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-drivermanDATA 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 \ - uninstall uninstall-am uninstall-drivermanDATA - - -.man.$(DRIVER_MAN_SUFFIX): - $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ - -# 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: diff --git a/tests/cluecode/data/copyright_fossology/testdata18.yml b/tests/cluecode/data/copyright_fossology/testdata18.yml new file mode 100644 index 00000000000..3d619ffd0ae --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata18.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2002 Tim Jansen + - Copyright (c) 2000, 2001 Const Kaplinsky + - Copyright (c) 2000 Tridia Corporation + - Copyright (c) 1999 AT&T Laboratories Cambridge +holders: + - Tim Jansen + - Const Kaplinsky + - Tridia Corporation + - AT&T Laboratories Cambridge diff --git a/tests/cluecode/data/copyright_fossology/testdata18_raw b/tests/cluecode/data/copyright_fossology/testdata18_raw deleted file mode 100644 index 5510d4de96f..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata18_raw +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2002 Tim Jansen. All Rights Reserved. - * Copyright (c) 2000, 2001 Const Kaplinsky. All Rights Reserved. - * Copyright (c) 2000 Tridia Corporation. All Rights Reserved. - * Copyright (c) 1999 AT&T Laboratories Cambridge. All Rights Reserved. - * - * This is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This software 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 software; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - * USA. - */ - -#ifndef VNCTYPES_H -#define VNCTYPES_H - -#if(defined __cplusplus) -extern "C" -{ -#endif - -#include - - -typedef struct { - int shareDesktop; /* bool */ - int viewOnly; /* bool */ - - const char* encodingsString; - - int useBGR233; /* bool */ - int nColours; - int useSharedColours; /* bool */ - int requestedDepth; - - int rawDelay; - int copyRectDelay; - - int debug; /* bool */ - - int compressLevel; - int qualityLevel; - int dotCursor; /* bool */ - -} AppData; - - -enum InitStatus { - INIT_OK = 0, - INIT_NAME_RESOLUTION_FAILURE = 1, - INIT_PROTOCOL_FAILURE = 2, - INIT_CONNECTION_FAILED = 3, - INIT_AUTHENTICATION_FAILED = 4, - INIT_NO_SERVER = 5, - INIT_SERVER_BLOCKED = 6, - INIT_ABORTED = 7 -}; - - -#if(defined __cplusplus) -} -#endif - -#endif diff --git a/tests/cluecode/data/copyright_fossology/testdata19.yml b/tests/cluecode/data/copyright_fossology/testdata19.yml new file mode 100644 index 00000000000..92b4a47b155 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata19.yml @@ -0,0 +1,22 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001 Karl Garrison + - Copyright (c) 1999-2001 Martin R. + - Copyright (c) 2001 Karl Garrison (karl AT indy.rr.com) +holders: + - Karl Garrison + - Martin R. + - Karl Garrison +authors: + - firstname Karl Garrison + - Martin R. Jones + - Martin R. Jones + - Jean-Claude Dumas + - Jean-Claude surname Dumas + - Masayuki Koba + - Frank Pieczynski + - Bartosz Trudnowski + - Daniel Pfeiffer diff --git a/tests/cluecode/data/copyright_fossology/testdata19_raw b/tests/cluecode/data/copyright_fossology/testdata19_raw deleted file mode 100644 index c8160b6747b..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata19_raw +++ /dev/null @@ -1,62 +0,0 @@ -The AMOR Handbook
    The AMOR Handbook

    The AMOR Handbook

    Karl Garrison

    Revision 2.2 (2003-09-16)

    -AMOR is a small animation which sits on top of your active window. -


    List of Tables

    2.1. Available AMOR Themes
    Chapter 1. Introduction
    Introduction

    Chapter 1. Introduction

    What's AMOR?

    -AMOR is an acronym which stands for Amusing Misuse of Resources. It is -actually an animation which sits on top of your active window. In its default -configuration, AMOR takes the form of a yellow spot which performs many -tricks. AMOR also has many different themes which change the appearance -and behavior of the animation. -

    Note

    Since AMOR works with the KDE window manager KWin, the -application will only work from within KDE. It is possible that AMOR -would work from within another KDE-compliant window manager, but none are -known to work at the time of this writing.



    Would you like to make a comment or contribute an update to this page?
    Send feedback to the KDE Docs Team

    Chapter 2. Configuration
    Configuration

    Chapter 2. Configuration

    Configuring AMOR

    To configure AMOR, click on the animation using your right mouse button. A menu -will appear containing three items: -Options..., -About..., and -Quit. Choose -Options... to configure AMOR -

    General Options
    General Options

    General Options

    The following settings for AMOR can be changed from the Options -dialog:

    Theme

    This determines the appearance and behavior of AMOR. -Themes are described in the next section.

    Offset

    This slider controls where the animation appears in -relation to the top of the active window. The default middle setting will -place the animation right above the window title bar, whereas setting the -slider all the way to the top or bottom will result in the animation -appearing a fair distance above or below the title bar, respectively.

    Tip

    Setting this slider to a lower setting will allow the -animation to be visible even when the active window is maximized.

    Always on top

    Checking this option will cause the animation to always -appear in front of any existing windows on the screen, including the -panel.

    Show random tips

    If checked, the animation will display various -KDE-related tips at random intervals.

    Allow application tips

    Any KDE application can be designed to display helpful -tips via AMOR. If this option is checked, and an appropriate -application is the active window, the animation will display tips for that -application.

    Note

    At the time of this writing, no KDE applications make use of -this functionality.



    Would you like to make a comment or contribute an update to this page?
    Send feedback to the KDE Docs Team

    AMOR Themes
    AMOR Themes

    AMOR Themes

    AMOR comes with many built-in themes, which change the appearance and -behavior of the animation. In addition, it is possible to create new -AMOR themes. The built-in themes for AMOR are described in the table -below

    Table 2.1. Available AMOR Themes

    ThemeDescription

    Multi-talented Spot


    This is the default theme for AMOR, and also the one with -the most “tricks”. This theme was created by Martin R. Jones. The jet-pack, beaming, and fire animations were contributed by -Mark Grant.


    Spooky Ghost


    A ghost theme based-on the KDE -ghostview icon. Spooky Ghost was created by -Martin R. Jones.


    Crazy Eyes


    This theme consists of a moving pair of eyes, and was created -by Jean-Claude Dumas.


    Bonhomme


    A stick-figure animation, created by Jean-Claude Dumas.


    Neko


    Neko is a cat theme by Chris Spiegel. The graphics are -originally from Oneko, which was written by -Masayuki Koba.

    -

    Note

    Oneko is a small application which -features a cat chasing the mouse cursor. The application appears to no -longer be maintained, but the - -source code from the last version is still -available.


    Tux


    This theme features Tux, the Linux® mascot. The actual -graphics come from a Lemmings-style game -called -Pingus. The Tux theme was created by -Frank Pieczynski.


    Little Worm


    A small inchworm theme. Created by Bartosz Trudnowski for -his wife.


    Little Billy


    A static image taken from the game -XBill -.


    BSD Mascot


    A static image of Beastie, the FreeBSD daemon.


    Unanimated Tux


    An unanimated version of the Tux theme.


    Tao


    The Tao theme is an animated Yin Yang symbol. This theme was -created by Daniel Pfeiffer , and was -inspired by his Tai Chi practice.



    Would you like to make a comment or contribute an update to this page?
    Send feedback to the KDE Docs Team



    Would you like to make a comment or contribute an update to this page?
    Send feedback to the KDE Docs Team

    Chapter 3. Credits and License
    Credits and License

    Chapter 3. Credits and License

    AMOR

    Program Copyright (c) 1999-2001 Martin R. Jones -

    Documentation Copyright (c) 2001 Karl Garrison -

    This documentation is licensed under the terms of the GNU Free Documentation -License.

    This program is licensed under the terms of the GNU General Public License.



    Would you like to make a comment or contribute an update to this page?
    Send feedback to the KDE Docs Team



    Would you like to make a comment or contribute an update to this page?
    Send feedback to the KDE Docs Team

    diff --git a/tests/cluecode/data/copyright_fossology/testdata1_raw b/tests/cluecode/data/copyright_fossology/testdata1_raw deleted file mode 100644 index ecb06bc17d3..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata1_raw +++ /dev/null @@ -1,349 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2009 Matthew Hall and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Matthew Hall - initial API and implementation (bug 194734) - * Matthew Hall - bug 262269 - ******************************************************************************/ - -package org.eclipse.core.internal.databinding.property.value; - -import java.lang.reflect.Array; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.ListIterator; - -import org.eclipse.core.databinding.observable.Diffs; -import org.eclipse.core.databinding.observable.IStaleListener; -import org.eclipse.core.databinding.observable.ObservableTracker; -import org.eclipse.core.databinding.observable.StaleEvent; -import org.eclipse.core.databinding.observable.list.AbstractObservableList; -import org.eclipse.core.databinding.observable.list.IListChangeListener; -import org.eclipse.core.databinding.observable.list.IObservableList; -import org.eclipse.core.databinding.observable.list.ListChangeEvent; -import org.eclipse.core.databinding.observable.list.ListDiff; -import org.eclipse.core.databinding.observable.list.ListDiffEntry; -import org.eclipse.core.databinding.property.IProperty; -import org.eclipse.core.databinding.property.IPropertyObservable; -import org.eclipse.core.databinding.property.value.DelegatingValueProperty; - -/** - * @since 1.2 - */ -public class ListDelegatingValueObservableList extends AbstractObservableList - implements IPropertyObservable { - private IObservableList masterList; - private DelegatingValueProperty detailProperty; - private DelegatingCache cache; - - private IListChangeListener masterListener = new IListChangeListener() { - public void handleListChange(ListChangeEvent event) { - if (isDisposed()) - return; - - cache.addAll(masterList); - - // Need both obsolete and new elements to convert diff - ListDiff diff = convertDiff(event.diff); - - cache.retainAll(masterList); - - fireListChange(diff); - } - - private ListDiff convertDiff(ListDiff diff) { - // Convert diff to detail value - ListDiffEntry[] masterEntries = diff.getDifferences(); - ListDiffEntry[] detailEntries = new ListDiffEntry[masterEntries.length]; - for (int i = 0; i < masterEntries.length; i++) { - ListDiffEntry masterDifference = masterEntries[i]; - int index = masterDifference.getPosition(); - boolean addition = masterDifference.isAddition(); - Object masterElement = masterDifference.getElement(); - Object detailValue = cache.get(masterElement); - - detailEntries[i] = Diffs.createListDiffEntry(index, addition, - detailValue); - } - return Diffs.createListDiff(detailEntries); - } - }; - - private IStaleListener staleListener = new IStaleListener() { - public void handleStale(StaleEvent staleEvent) { - fireStale(); - } - }; - - /** - * @param masterList - * @param valueProperty - */ - public ListDelegatingValueObservableList(IObservableList masterList, - DelegatingValueProperty valueProperty) { - super(masterList.getRealm()); - this.masterList = masterList; - this.detailProperty = valueProperty; - this.cache = new DelegatingCache(getRealm(), valueProperty) { - void handleValueChange(Object masterElement, Object oldValue, - Object newValue) { - fireListChange(indicesOf(masterElement), oldValue, newValue); - } - }; - cache.addAll(masterList); - - masterList.addListChangeListener(masterListener); - masterList.addStaleListener(staleListener); - } - - protected int doGetSize() { - getterCalled(); - return masterList.size(); - } - - private void getterCalled() { - ObservableTracker.getterCalled(this); - } - - public Object get(int index) { - getterCalled(); - Object masterElement = masterList.get(index); - return cache.get(masterElement); - } - - public boolean add(Object o) { - throw new UnsupportedOperationException(); - } - - public boolean addAll(Collection c) { - throw new UnsupportedOperationException(); - } - - public boolean addAll(int index, Collection c) { - throw new UnsupportedOperationException(); - } - - public boolean contains(Object o) { - getterCalled(); - return cache.containsValue(o); - } - - public boolean isEmpty() { - getterCalled(); - return masterList.isEmpty(); - } - - public boolean isStale() { - getterCalled(); - return masterList.isStale(); - } - - public Iterator iterator() { - getterCalled(); - return new Iterator() { - Iterator it = masterList.iterator(); - - public boolean hasNext() { - getterCalled(); - return it.hasNext(); - } - - public Object next() { - getterCalled(); - Object masterElement = it.next(); - return cache.get(masterElement); - } - - public void remove() { - throw new UnsupportedOperationException(); - } - }; - } - - public Object move(int oldIndex, int newIndex) { - throw new UnsupportedOperationException(); - } - - public boolean remove(Object o) { - throw new UnsupportedOperationException(); - } - - public boolean removeAll(Collection c) { - throw new UnsupportedOperationException(); - } - - public boolean retainAll(Collection c) { - throw new UnsupportedOperationException(); - } - - public Object[] toArray() { - getterCalled(); - Object[] masterElements = masterList.toArray(); - Object[] result = new Object[masterElements.length]; - for (int i = 0; i < result.length; i++) { - result[i] = cache.get(masterElements[i]); - } - return result; - } - - public Object[] toArray(Object[] a) { - getterCalled(); - Object[] masterElements = masterList.toArray(); - if (a.length < masterElements.length) - a = (Object[]) Array.newInstance(a.getClass().getComponentType(), - masterElements.length); - for (int i = 0; i < masterElements.length; i++) { - a[i] = cache.get(masterElements[i]); - } - return a; - } - - public void add(int index, Object o) { - throw new UnsupportedOperationException(); - } - - public void clear() { - throw new UnsupportedOperationException(); - } - - public ListIterator listIterator() { - return listIterator(0); - } - - public ListIterator listIterator(final int index) { - getterCalled(); - return new ListIterator() { - ListIterator it = masterList.listIterator(index); - Object lastMasterElement; - Object lastElement; - boolean haveIterated = false; - - public void add(Object arg0) { - throw new UnsupportedOperationException(); - } - - public boolean hasNext() { - getterCalled(); - return it.hasNext(); - } - - public boolean hasPrevious() { - getterCalled(); - return it.hasPrevious(); - } - - public Object next() { - getterCalled(); - lastMasterElement = it.next(); - lastElement = cache.get(lastMasterElement); - haveIterated = true; - return lastElement; - } - - public int nextIndex() { - getterCalled(); - return it.nextIndex(); - } - - public Object previous() { - getterCalled(); - lastMasterElement = it.previous(); - lastElement = cache.get(lastMasterElement); - haveIterated = true; - return lastElement; - } - - public int previousIndex() { - getterCalled(); - return it.previousIndex(); - } - - public void remove() { - throw new UnsupportedOperationException(); - } - - public void set(Object o) { - checkRealm(); - if (!haveIterated) - throw new IllegalStateException(); - - cache.put(lastMasterElement, o); - - lastElement = o; - } - }; - } - - private int[] indicesOf(Object masterElement) { - List indices = new ArrayList(); - - for (ListIterator it = masterList.listIterator(); it.hasNext();) { - if (masterElement == it.next()) - indices.add(new Integer(it.previousIndex())); - } - - int[] result = new int[indices.size()]; - for (int i = 0; i < result.length; i++) { - result[i] = ((Integer) indices.get(i)).intValue(); - } - return result; - } - - private void fireListChange(int[] indices, Object oldValue, Object newValue) { - ListDiffEntry[] differences = new ListDiffEntry[indices.length * 2]; - for (int i = 0; i < indices.length; i++) { - int index = indices[i]; - differences[i * 2] = Diffs.createListDiffEntry(index, false, - oldValue); - differences[i * 2 + 1] = Diffs.createListDiffEntry(index, true, - newValue); - } - fireListChange(Diffs.createListDiff(differences)); - } - - public Object remove(int index) { - throw new UnsupportedOperationException(); - } - - public Object set(int index, Object o) { - checkRealm(); - Object masterElement = masterList.get(index); - return cache.put(masterElement, o); - } - - public Object getObserved() { - return masterList; - } - - public IProperty getProperty() { - return detailProperty; - } - - public Object getElementType() { - return detailProperty.getValueType(); - } - - public synchronized void dispose() { - if (masterList != null) { - masterList.removeListChangeListener(masterListener); - masterList.removeStaleListener(staleListener); - masterList = null; - } - - if (cache != null) { - cache.dispose(); - cache = null; - } - - masterListener = null; - detailProperty = null; - - super.dispose(); - } -} diff --git a/tests/cluecode/data/copyright_fossology/testdata2.yml b/tests/cluecode/data/copyright_fossology/testdata2.yml new file mode 100644 index 00000000000..18d58aed19a --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata2.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Andrea Merello 2004 +holders: + - Andrea Merello diff --git a/tests/cluecode/data/copyright_fossology/testdata20.yml b/tests/cluecode/data/copyright_fossology/testdata20.yml new file mode 100644 index 00000000000..4da8ebaa749 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata20.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) + - Copyright (c) 2003 Akihiro MOTOKI +holders: + - Walter Harms + - Akihiro MOTOKI +authors: + - Akihiro MOTOKI diff --git a/tests/cluecode/data/copyright_fossology/testdata20_raw b/tests/cluecode/data/copyright_fossology/testdata20_raw deleted file mode 100644 index f79cbce7e73..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata20_raw +++ /dev/null @@ -1,40 +0,0 @@ -.\" Copyright 2002 Walter Harms (walter.harms@informatik.uni-oldenburg.de) -.\" Distributed under GPL -.\" -.\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI -.\" all rights reserved. -.\" Translated Thu Jul 24 00:47:23 JST 2003 -.\" by Akihiro MOTOKI -.\" -.\"WORD: square root ʿ���� -.\"WORD: branch cut ʬ������ -.\" -.TH CSQRT 3 2008-08-11 "" "Linux Programmer's Manual" -.SH ̾�� -csqrt, csqrtf, csqrtl \- ʣ�ǿ���ʿ���� -.SH �� -.B #include -.sp -.BI "double complex csqrt(double complex " z ");" -.br -.BI "float complex csqrtf(float complex " z ");" -.br -.BI "long double complex csqrtl(long double complex " z ");" -.sp -\fI\-lm\fP �ǥ�󥯤��롣 -.SH ���� -Ϳ����줿ʣ�ǿ���ʿ������׻����롣 -â����ʿ�����Τ����¿�����������ͤ��֤��� -�¼��������ʬ�˱�ä�ʬ������ (branch cut) �����롣 -(�Ĥޤꡢ \fIeps\fP �򾮤������μ¿��Ȥ�����硢 -\fIcsqrt(\-1+eps*I)\fP �� I �˶��դ��Ƥ����� -���� \fIcsqrt(\-1\-eps*I)\fP �� \-I �˶��դ��Ƥ����� -�Ȥ������ȤǤ��롣) -.SH �С������ -�����δؿ��� glibc �С������ 2.1 �ǽ����о줷���� -.SH ��� -C99. -.SH ��Ϣ���� -.BR cabs (3), -.BR cexp (3), -.BR complex (7) diff --git a/tests/cluecode/data/copyright_fossology/testdata21.yml b/tests/cluecode/data/copyright_fossology/testdata21.yml new file mode 100644 index 00000000000..373cd8d9fd9 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata21.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright by many contributors +holders: + - many contributors diff --git a/tests/cluecode/data/copyright_fossology/testdata21_raw b/tests/cluecode/data/copyright_fossology/testdata21_raw deleted file mode 100644 index 6240288a165..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata21_raw +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright by many contributors see http://babel.eclipse.org -DATATOOLS.CORE.UI.PREFERENCES.COLUMN.TAB=Text -DATATOOLS.CORE.UI.DND.COPY=Copiaz\u0103 -FILE_PATH_LABEL_TEXT=&Numele fi\u015fierului: -_UI_TITLE_FILE_CHOOSER=Selectare Fi\u015fiere -_UI_TOOLTIP_DELETE=\u015eterge -SCHEMA_MANAGEMENT_CREATE_INDEX=Index diff --git a/tests/cluecode/data/copyright_fossology/testdata22.yml b/tests/cluecode/data/copyright_fossology/testdata22.yml new file mode 100644 index 00000000000..e7a1643666a --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata22.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Portions created by the Initial Developer are Copyright (c) 1998-1999 the Initial Developer +holders: + - the Initial Developer diff --git a/tests/cluecode/data/copyright_fossology/testdata22_raw b/tests/cluecode/data/copyright_fossology/testdata22_raw deleted file mode 100644 index 345f43185d9..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata22_raw +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - - - -

    Uses of Class org.apache.commons.collections.buffer.TransformedBuffer

    Class org.apache.commons.collections.buffer.TransformedBuffer is not used by any class in this documentation set.


    Copyright © 2001-2008 Apache Software Foundation. All Rights Reserved. diff --git a/tests/cluecode/data/copyright_fossology/testdata28.yml b/tests/cluecode/data/copyright_fossology/testdata28.yml new file mode 100644 index 00000000000..0d05528ac1e --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata28.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2003 MySQL AB +holders: + - MySQL AB diff --git a/tests/cluecode/data/copyright_fossology/testdata28_raw b/tests/cluecode/data/copyright_fossology/testdata28_raw deleted file mode 100644 index 75eaa2f5d71..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata28_raw +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2003 MySQL AB - - 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; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -#ifndef API_REGCONF_HPP -#define API_REGCONF_HPP - -#include - -class ApiRegReq { - /** - * Sender(s) - */ - friend class ClusterMgr; - - /** - * Reciver(s) - */ - friend class Qmgr; - -public: - STATIC_CONST( SignalLength = 2 ); - -private: - Uint32 ref; - Uint32 version; // Version of API node -}; - -/** - * - */ -class ApiRegRef { - /** - * Sender(s) - */ - friend class Qmgr; - - /** - * Reciver(s) - */ - friend class ClusterMgr; - -public: - STATIC_CONST( SignalLength = 3 ); - - enum ErrorCode { - WrongType = 1, - UnsupportedVersion = 2 - }; -private: - Uint32 ref; // Qmgr ref - Uint32 version; // Version of NDB node - Uint32 errorCode; -}; - -/** - * - */ -class ApiRegConf { - /** - * Sender(s) - */ - friend class Qmgr; - - /** - * Reciver(s) - */ - friend class ClusterMgr; - -public: - STATIC_CONST( SignalLength = 4 + NodeState::DataLength ); -private: - - Uint32 qmgrRef; - Uint32 version; // Version of NDB node - Uint32 apiHeartbeatFrequency; - Uint32 minDbVersion; - NodeState nodeState; -}; - -#endif diff --git a/tests/cluecode/data/copyright_fossology/testdata29.yml b/tests/cluecode/data/copyright_fossology/testdata29.yml new file mode 100644 index 00000000000..92f7b28182a --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata29.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2001 Sun Microsystems, Inc. +holders: + - Sun Microsystems, Inc. diff --git a/tests/cluecode/data/copyright_fossology/testdata29_raw b/tests/cluecode/data/copyright_fossology/testdata29_raw deleted file mode 100644 index 8120daba7fd..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata29_raw +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code 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 - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - */ - -package sun.jvm.hotspot.debugger.cdbg.basic; - -import sun.jvm.hotspot.debugger.*; -import sun.jvm.hotspot.debugger.cdbg.*; - -public class BasicIntType extends BasicType implements IntType { - private boolean unsigned; - - public BasicIntType(String name, int size, boolean unsigned) { - this(name, size, unsigned, 0); - } - - protected BasicIntType(String name, int size, boolean unsigned, int cvAttributes) { - super(name, size, cvAttributes); - this.unsigned = unsigned; - } - - public IntType asInt() { return this; } - - public int getIntSize() { return getSize(); } - public boolean isUnsigned() { return unsigned; } - - public void iterateObject(Address a, ObjectVisitor v, FieldIdentifier f) { - v.doInt(f, a.getCIntegerAt(0, getSize(), isUnsigned())); - } - - protected Type createCVVariant(int cvAttributes) { - return new BasicIntType(getName(), getSize(), isUnsigned(), cvAttributes); - } - - public void visit(TypeVisitor v) { - v.doIntType(this); - } -} diff --git a/tests/cluecode/data/copyright_fossology/testdata2_raw b/tests/cluecode/data/copyright_fossology/testdata2_raw deleted file mode 100644 index 52309e5a97d..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata2_raw +++ /dev/null @@ -1,146 +0,0 @@ -/* - This files contains card eeprom (93c46 or 93c56) programming routines, - memory is addressed by 16 bits words. - - This is part of rtl8180 OpenSource driver. - Copyright (c) Andrea Merello 2004 - Released under the terms of GPL (General Public Licence) - - Parts of this driver are based on the GPL part of the - official realtek driver. - - Parts of this driver are based on the rtl8180 driver skeleton - from Patric Schenke & Andres Salomon. - - Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver. - - We want to tanks the Authors of those projects and the Ndiswrapper - project Authors. -*/ - -#include "r8180_93cx6.h" - -static void eprom_cs(struct net_device *dev, short bit) -{ - if(bit) - write_nic_byte(dev, EPROM_CMD, - (1<epromtype==EPROM_93c56){ - addr_str[7]=addr & 1; - addr_str[6]=addr & (1<<1); - addr_str[5]=addr & (1<<2); - addr_str[4]=addr & (1<<3); - addr_str[3]=addr & (1<<4); - addr_str[2]=addr & (1<<5); - addr_str[1]=addr & (1<<6); - addr_str[0]=addr & (1<<7); - addr_len=8; - }else{ - addr_str[5]=addr & 1; - addr_str[4]=addr & (1<<1); - addr_str[3]=addr & (1<<2); - addr_str[2]=addr & (1<<3); - addr_str[1]=addr & (1<<4); - addr_str[0]=addr & (1<<5); - addr_len=6; - } - eprom_cs(dev, 1); - eprom_ck_cycle(dev); - eprom_send_bits_string(dev, read_cmd, 3); - eprom_send_bits_string(dev, addr_str, addr_len); - - //keep chip pin D to low state while reading. - //I'm unsure if it is necessary, but anyway shouldn't hurt - eprom_w(dev, 0); - - for(i=0;i<16;i++){ - //eeprom needs a clk cycle between writing opcode&adr - //and reading data. (eeprom outs a dummy 0) - eprom_ck_cycle(dev); - ret |= (eprom_r(dev)<<(15-i)); - } - - eprom_cs(dev, 0); - eprom_ck_cycle(dev); - - //disable EPROM programming - write_nic_byte(dev, EPROM_CMD, - (EPROM_CMD_NORMAL<Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
    - * Portions Copyright (c) 1994, Regents of the University of California - * - * - * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.153 2008/01/01 19:45:52 momjian Exp $ - * - *------------------------------------------------------------------------- - */ -#include "postgres.h" - -#include -#include -#include -#include - -#include "catalog/pg_type.h" -#include "libpq/pqformat.h" -#include "utils/array.h" -#include "utils/builtins.h" - - -#ifndef M_PI -/* from my RH5.2 gcc math.h file - thomas 2000-04-03 */ -#define M_PI 3.14159265358979323846 -#endif - -/* Visual C++ etc lacks NAN, and won't accept 0.0/0.0. NAN definition from - * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/vclrfNotNumberNANItems.asp - */ -#if defined(WIN32) && !defined(NAN) -static const uint32 nan[2] = {0xffffffff, 0x7fffffff}; - -#define NAN (*(const double *) nan) -#endif - -/* not sure what the following should be, but better to make it over-sufficient */ -#define MAXFLOATWIDTH 64 -#define MAXDOUBLEWIDTH 128 - -/* - * check to see if a float4/8 val has underflowed or overflowed - */ -#define CHECKFLOATVAL(val, inf_is_valid, zero_is_valid) \ -do { \ - if (isinf(val) && !(inf_is_valid)) \ - ereport(ERROR, \ - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), \ - errmsg("value out of range: overflow"))); \ - \ - if ((val) == 0.0 && !(zero_is_valid)) \ - ereport(ERROR, \ - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), \ - errmsg("value out of range: underflow"))); \ -} while(0) - - -/* ========== USER I/O ROUTINES ========== */ - - -/* Configurable GUC parameter */ -int extra_float_digits = 0; /* Added to DBL_DIG or FLT_DIG */ - - -static int float4_cmp_internal(float4 a, float4 b); -static int float8_cmp_internal(float8 a, float8 b); - -#ifndef HAVE_CBRT -static double cbrt(double x); -#endif /* HAVE_CBRT */ - - -/* - * Routines to provide reasonably platform-independent handling of - * infinity and NaN. We assume that isinf() and isnan() are available - * and work per spec. (On some platforms, we have to supply our own; - * see src/port.) However, generating an Infinity or NaN in the first - * place is less well standardized; pre-C99 systems tend not to have C99's - * INFINITY and NAN macros. We centralize our workarounds for this here. - */ - -double -get_float8_infinity(void) -{ -#ifdef INFINITY - /* C99 standard way */ - return (double) INFINITY; -#else - - /* - * On some platforms, HUGE_VAL is an infinity, elsewhere it's just the - * largest normal double. We assume forcing an overflow will get us a - * true infinity. - */ - return (double) (HUGE_VAL * HUGE_VAL); -#endif -} - -float -get_float4_infinity(void) -{ -#ifdef INFINITY - /* C99 standard way */ - return (float) INFINITY; -#else - - /* - * On some platforms, HUGE_VAL is an infinity, elsewhere it's just the - * largest normal double. We assume forcing an overflow will get us a - * true infinity. - */ - return (float) (HUGE_VAL * HUGE_VAL); -#endif -} - -double -get_float8_nan(void) -{ -#ifdef NAN - /* C99 standard way */ - return (double) NAN; -#else - /* Assume we can get a NAN via zero divide */ - return (double) (0.0 / 0.0); -#endif -} - -float -get_float4_nan(void) -{ -#ifdef NAN - /* C99 standard way */ - return (float) NAN; -#else - /* Assume we can get a NAN via zero divide */ - return (float) (0.0 / 0.0); -#endif -} - - -/* - * Returns -1 if 'val' represents negative infinity, 1 if 'val' - * represents (positive) infinity, and 0 otherwise. On some platforms, - * this is equivalent to the isinf() macro, but not everywhere: C99 - * does not specify that isinf() needs to distinguish between positive - * and negative infinity. - */ -int -is_infinite(double val) -{ - int inf = isinf(val); - - if (inf == 0) - return 0; - else if (val > 0) - return 1; - else - return -1; -} - - -/* - * float4in - converts "num" to float - * restricted syntax: - * {} [+|-] {digit} [.{digit}] [] - * where is a space, digit is 0-9, - * is "e" or "E" followed by an integer. - */ -Datum -float4in(PG_FUNCTION_ARGS) -{ - char *num = PG_GETARG_CSTRING(0); - char *orig_num; - double val; - char *endptr; - - /* - * endptr points to the first character _after_ the sequence we recognized - * as a valid floating point number. orig_num points to the original input - * string. - */ - orig_num = num; - - /* - * Check for an empty-string input to begin with, to avoid the vagaries of - * strtod() on different platforms. - */ - if (*num == '\0') - ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for type real: \"%s\"", - orig_num))); - - /* skip leading whitespace */ - while (*num != '\0' && isspace((unsigned char) *num)) - num++; - - errno = 0; - val = strtod(num, &endptr); - - /* did we not see anything that looks like a double? */ - if (endptr == num || errno != 0) - { - /* - * C99 requires that strtod() accept NaN and [-]Infinity, but not all - * platforms support that yet (and some accept them but set ERANGE - * anyway...) Therefore, we check for these inputs ourselves. - */ - if (pg_strncasecmp(num, "NaN", 3) == 0) - { - val = get_float4_nan(); - endptr = num + 3; - } - else if (pg_strncasecmp(num, "Infinity", 8) == 0) - { - val = get_float4_infinity(); - endptr = num + 8; - } - else if (pg_strncasecmp(num, "-Infinity", 9) == 0) - { - val = -get_float4_infinity(); - endptr = num + 9; - } - else if (errno == ERANGE) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("\"%s\" is out of range for type real", - orig_num))); - else - ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for type real: \"%s\"", - orig_num))); - } -#ifdef HAVE_BUGGY_SOLARIS_STRTOD - else - { - /* - * Many versions of Solaris have a bug wherein strtod sets endptr to - * point one byte beyond the end of the string when given "inf" or - * "infinity". - */ - if (endptr != num && endptr[-1] == '\0') - endptr--; - } -#endif /* HAVE_BUGGY_SOLARIS_STRTOD */ - -#ifdef HAVE_BUGGY_IRIX_STRTOD - - /* - * In some IRIX versions, strtod() recognizes only "inf", so if the input - * is "infinity" we have to skip over "inity". Also, it may return - * positive infinity for "-inf". - */ - if (isinf(val)) - { - if (pg_strncasecmp(num, "Infinity", 8) == 0) - { - val = get_float4_infinity(); - endptr = num + 8; - } - else if (pg_strncasecmp(num, "-Infinity", 9) == 0) - { - val = -get_float4_infinity(); - endptr = num + 9; - } - else if (pg_strncasecmp(num, "-inf", 4) == 0) - { - val = -get_float4_infinity(); - endptr = num + 4; - } - } -#endif /* HAVE_BUGGY_IRIX_STRTOD */ - - /* skip trailing whitespace */ - while (*endptr != '\0' && isspace((unsigned char) *endptr)) - endptr++; - - /* if there is any junk left at the end of the string, bail out */ - if (*endptr != '\0') - ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for type real: \"%s\"", - orig_num))); - - /* - * if we get here, we have a legal double, still need to check to see if - * it's a legal float4 - */ - CHECKFLOATVAL((float4) val, isinf(val), val == 0); - - PG_RETURN_FLOAT4((float4) val); -} - -/* - * float4out - converts a float4 number to a string - * using a standard output format - */ -Datum -float4out(PG_FUNCTION_ARGS) -{ - float4 num = PG_GETARG_FLOAT4(0); - char *ascii = (char *) palloc(MAXFLOATWIDTH + 1); - - if (isnan(num)) - PG_RETURN_CSTRING(strcpy(ascii, "NaN")); - - switch (is_infinite(num)) - { - case 1: - strcpy(ascii, "Infinity"); - break; - case -1: - strcpy(ascii, "-Infinity"); - break; - default: - { - int ndig = FLT_DIG + extra_float_digits; - - if (ndig < 1) - ndig = 1; - - sprintf(ascii, "%.*g", ndig, num); - } - } - - PG_RETURN_CSTRING(ascii); -} - -/* - * float4recv - converts external binary format to float4 - */ -Datum -float4recv(PG_FUNCTION_ARGS) -{ - StringInfo buf = (StringInfo) PG_GETARG_POINTER(0); - - PG_RETURN_FLOAT4(pq_getmsgfloat4(buf)); -} - -/* - * float4send - converts float4 to binary format - */ -Datum -float4send(PG_FUNCTION_ARGS) -{ - float4 num = PG_GETARG_FLOAT4(0); - StringInfoData buf; - - pq_begintypsend(&buf); - pq_sendfloat4(&buf, num); - PG_RETURN_BYTEA_P(pq_endtypsend(&buf)); -} - -/* - * float8in - converts "num" to float8 - * restricted syntax: - * {} [+|-] {digit} [.{digit}] [] - * where is a space, digit is 0-9, - * is "e" or "E" followed by an integer. - */ -Datum -float8in(PG_FUNCTION_ARGS) -{ - char *num = PG_GETARG_CSTRING(0); - char *orig_num; - double val; - char *endptr; - - /* - * endptr points to the first character _after_ the sequence we recognized - * as a valid floating point number. orig_num points to the original input - * string. - */ - orig_num = num; - - /* - * Check for an empty-string input to begin with, to avoid the vagaries of - * strtod() on different platforms. - */ - if (*num == '\0') - ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for type double precision: \"%s\"", - orig_num))); - - /* skip leading whitespace */ - while (*num != '\0' && isspace((unsigned char) *num)) - num++; - - errno = 0; - val = strtod(num, &endptr); - - /* did we not see anything that looks like a double? */ - if (endptr == num || errno != 0) - { - /* - * C99 requires that strtod() accept NaN and [-]Infinity, but not all - * platforms support that yet (and some accept them but set ERANGE - * anyway...) Therefore, we check for these inputs ourselves. - */ - if (pg_strncasecmp(num, "NaN", 3) == 0) - { - val = get_float8_nan(); - endptr = num + 3; - } - else if (pg_strncasecmp(num, "Infinity", 8) == 0) - { - val = get_float8_infinity(); - endptr = num + 8; - } - else if (pg_strncasecmp(num, "-Infinity", 9) == 0) - { - val = -get_float8_infinity(); - endptr = num + 9; - } - else if (errno == ERANGE) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("\"%s\" is out of range for type double precision", - orig_num))); - else - ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for type double precision: \"%s\"", - orig_num))); - } -#ifdef HAVE_BUGGY_SOLARIS_STRTOD - else - { - /* - * Many versions of Solaris have a bug wherein strtod sets endptr to - * point one byte beyond the end of the string when given "inf" or - * "infinity". - */ - if (endptr != num && endptr[-1] == '\0') - endptr--; - } -#endif /* HAVE_BUGGY_SOLARIS_STRTOD */ - -#ifdef HAVE_BUGGY_IRIX_STRTOD - - /* - * In some IRIX versions, strtod() recognizes only "inf", so if the input - * is "infinity" we have to skip over "inity". Also, it may return - * positive infinity for "-inf". - */ - if (isinf(val)) - { - if (pg_strncasecmp(num, "Infinity", 8) == 0) - { - val = get_float8_infinity(); - endptr = num + 8; - } - else if (pg_strncasecmp(num, "-Infinity", 9) == 0) - { - val = -get_float8_infinity(); - endptr = num + 9; - } - else if (pg_strncasecmp(num, "-inf", 4) == 0) - { - val = -get_float8_infinity(); - endptr = num + 4; - } - } -#endif /* HAVE_BUGGY_IRIX_STRTOD */ - - /* skip trailing whitespace */ - while (*endptr != '\0' && isspace((unsigned char) *endptr)) - endptr++; - - /* if there is any junk left at the end of the string, bail out */ - if (*endptr != '\0') - ereport(ERROR, - (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for type double precision: \"%s\"", - orig_num))); - - CHECKFLOATVAL(val, true, true); - - PG_RETURN_FLOAT8(val); -} - -/* - * float8out - converts float8 number to a string - * using a standard output format - */ -Datum -float8out(PG_FUNCTION_ARGS) -{ - float8 num = PG_GETARG_FLOAT8(0); - char *ascii = (char *) palloc(MAXDOUBLEWIDTH + 1); - - if (isnan(num)) - PG_RETURN_CSTRING(strcpy(ascii, "NaN")); - - switch (is_infinite(num)) - { - case 1: - strcpy(ascii, "Infinity"); - break; - case -1: - strcpy(ascii, "-Infinity"); - break; - default: - { - int ndig = DBL_DIG + extra_float_digits; - - if (ndig < 1) - ndig = 1; - - sprintf(ascii, "%.*g", ndig, num); - } - } - - PG_RETURN_CSTRING(ascii); -} - -/* - * float8recv - converts external binary format to float8 - */ -Datum -float8recv(PG_FUNCTION_ARGS) -{ - StringInfo buf = (StringInfo) PG_GETARG_POINTER(0); - - PG_RETURN_FLOAT8(pq_getmsgfloat8(buf)); -} - -/* - * float8send - converts float8 to binary format - */ -Datum -float8send(PG_FUNCTION_ARGS) -{ - float8 num = PG_GETARG_FLOAT8(0); - StringInfoData buf; - - pq_begintypsend(&buf); - pq_sendfloat8(&buf, num); - PG_RETURN_BYTEA_P(pq_endtypsend(&buf)); -} - - -/* ========== PUBLIC ROUTINES ========== */ - - -/* - * ====================== - * FLOAT4 BASE OPERATIONS - * ====================== - */ - -/* - * float4abs - returns |arg1| (absolute value) - */ -Datum -float4abs(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - - PG_RETURN_FLOAT4((float4) fabs(arg1)); -} - -/* - * float4um - returns -arg1 (unary minus) - */ -Datum -float4um(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float4 result; - - result = ((arg1 != 0) ? -(arg1) : arg1); - - CHECKFLOATVAL(result, isinf(arg1), true); - PG_RETURN_FLOAT4(result); -} - -Datum -float4up(PG_FUNCTION_ARGS) -{ - float4 arg = PG_GETARG_FLOAT4(0); - - PG_RETURN_FLOAT4(arg); -} - -Datum -float4larger(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - float4 result; - - if (float4_cmp_internal(arg1, arg2) > 0) - result = arg1; - else - result = arg2; - PG_RETURN_FLOAT4(result); -} - -Datum -float4smaller(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - float4 result; - - if (float4_cmp_internal(arg1, arg2) < 0) - result = arg1; - else - result = arg2; - PG_RETURN_FLOAT4(result); -} - -/* - * ====================== - * FLOAT8 BASE OPERATIONS - * ====================== - */ - -/* - * float8abs - returns |arg1| (absolute value) - */ -Datum -float8abs(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - - PG_RETURN_FLOAT8(fabs(arg1)); -} - - -/* - * float8um - returns -arg1 (unary minus) - */ -Datum -float8um(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - result = ((arg1 != 0) ? -(arg1) : arg1); - - CHECKFLOATVAL(result, isinf(arg1), true); - PG_RETURN_FLOAT8(result); -} - -Datum -float8up(PG_FUNCTION_ARGS) -{ - float8 arg = PG_GETARG_FLOAT8(0); - - PG_RETURN_FLOAT8(arg); -} - -Datum -float8larger(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - float8 result; - - if (float8_cmp_internal(arg1, arg2) > 0) - result = arg1; - else - result = arg2; - PG_RETURN_FLOAT8(result); -} - -Datum -float8smaller(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - float8 result; - - if (float8_cmp_internal(arg1, arg2) < 0) - result = arg1; - else - result = arg2; - PG_RETURN_FLOAT8(result); -} - - -/* - * ==================== - * ARITHMETIC OPERATORS - * ==================== - */ - -/* - * float4pl - returns arg1 + arg2 - * float4mi - returns arg1 - arg2 - * float4mul - returns arg1 * arg2 - * float4div - returns arg1 / arg2 - */ -Datum -float4pl(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT4(0); - float8 arg2 = PG_GETARG_FLOAT4(1); - float4 result; - - result = arg1 + arg2; - - /* - * There isn't any way to check for underflow of addition/subtraction - * because numbers near the underflow value have been already been to the - * point where we can't detect the that the two values were originally - * different, e.g. on x86, '1e-45'::float4 == '2e-45'::float4 == - * 1.4013e-45. - */ - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), true); - PG_RETURN_FLOAT4(result); -} - -Datum -float4mi(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - float4 result; - - result = arg1 - arg2; - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), true); - PG_RETURN_FLOAT4(result); -} - -Datum -float4mul(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - float4 result; - - result = arg1 * arg2; - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), - arg1 == 0 || arg2 == 0); - PG_RETURN_FLOAT4(result); -} - -Datum -float4div(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - float4 result; - - if (arg2 == 0.0) - ereport(ERROR, - (errcode(ERRCODE_DIVISION_BY_ZERO), - errmsg("division by zero"))); - - /* Do division in float8, then check for overflow */ - result = arg1 / arg2; - - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), arg1 == 0); - PG_RETURN_FLOAT4(result); -} - -/* - * float8pl - returns arg1 + arg2 - * float8mi - returns arg1 - arg2 - * float8mul - returns arg1 * arg2 - * float8div - returns arg1 / arg2 - */ -Datum -float8pl(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - float8 result; - - result = arg1 + arg2; - - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), true); - PG_RETURN_FLOAT8(result); -} - -Datum -float8mi(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - float8 result; - - result = arg1 - arg2; - - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), true); - PG_RETURN_FLOAT8(result); -} - -Datum -float8mul(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - float8 result; - - result = arg1 * arg2; - - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), - arg1 == 0 || arg2 == 0); - PG_RETURN_FLOAT8(result); -} - -Datum -float8div(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - float8 result; - - if (arg2 == 0.0) - ereport(ERROR, - (errcode(ERRCODE_DIVISION_BY_ZERO), - errmsg("division by zero"))); - - result = arg1 / arg2; - - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), arg1 == 0); - PG_RETURN_FLOAT8(result); -} - - -/* - * ==================== - * COMPARISON OPERATORS - * ==================== - */ - -/* - * float4{eq,ne,lt,le,gt,ge} - float4/float4 comparison operations - */ -static int -float4_cmp_internal(float4 a, float4 b) -{ - /* - * We consider all NANs to be equal and larger than any non-NAN. This is - * somewhat arbitrary; the important thing is to have a consistent sort - * order. - */ - if (isnan(a)) - { - if (isnan(b)) - return 0; /* NAN = NAN */ - else - return 1; /* NAN > non-NAN */ - } - else if (isnan(b)) - { - return -1; /* non-NAN < NAN */ - } - else - { - if (a > b) - return 1; - else if (a < b) - return -1; - else - return 0; - } -} - -Datum -float4eq(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - - PG_RETURN_BOOL(float4_cmp_internal(arg1, arg2) == 0); -} - -Datum -float4ne(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - - PG_RETURN_BOOL(float4_cmp_internal(arg1, arg2) != 0); -} - -Datum -float4lt(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - - PG_RETURN_BOOL(float4_cmp_internal(arg1, arg2) < 0); -} - -Datum -float4le(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - - PG_RETURN_BOOL(float4_cmp_internal(arg1, arg2) <= 0); -} - -Datum -float4gt(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - - PG_RETURN_BOOL(float4_cmp_internal(arg1, arg2) > 0); -} - -Datum -float4ge(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - - PG_RETURN_BOOL(float4_cmp_internal(arg1, arg2) >= 0); -} - -Datum -btfloat4cmp(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - - PG_RETURN_INT32(float4_cmp_internal(arg1, arg2)); -} - -/* - * float8{eq,ne,lt,le,gt,ge} - float8/float8 comparison operations - */ -static int -float8_cmp_internal(float8 a, float8 b) -{ - /* - * We consider all NANs to be equal and larger than any non-NAN. This is - * somewhat arbitrary; the important thing is to have a consistent sort - * order. - */ - if (isnan(a)) - { - if (isnan(b)) - return 0; /* NAN = NAN */ - else - return 1; /* NAN > non-NAN */ - } - else if (isnan(b)) - { - return -1; /* non-NAN < NAN */ - } - else - { - if (a > b) - return 1; - else if (a < b) - return -1; - else - return 0; - } -} - -Datum -float8eq(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) == 0); -} - -Datum -float8ne(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) != 0); -} - -Datum -float8lt(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) < 0); -} - -Datum -float8le(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) <= 0); -} - -Datum -float8gt(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) > 0); -} - -Datum -float8ge(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) >= 0); -} - -Datum -btfloat8cmp(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - - PG_RETURN_INT32(float8_cmp_internal(arg1, arg2)); -} - -Datum -btfloat48cmp(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - - /* widen float4 to float8 and then compare */ - PG_RETURN_INT32(float8_cmp_internal(arg1, arg2)); -} - -Datum -btfloat84cmp(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - - /* widen float4 to float8 and then compare */ - PG_RETURN_INT32(float8_cmp_internal(arg1, arg2)); -} - - -/* - * =================== - * CONVERSION ROUTINES - * =================== - */ - -/* - * ftod - converts a float4 number to a float8 number - */ -Datum -ftod(PG_FUNCTION_ARGS) -{ - float4 num = PG_GETARG_FLOAT4(0); - - PG_RETURN_FLOAT8((float8) num); -} - - -/* - * dtof - converts a float8 number to a float4 number - */ -Datum -dtof(PG_FUNCTION_ARGS) -{ - float8 num = PG_GETARG_FLOAT8(0); - - CHECKFLOATVAL((float4) num, isinf(num), num == 0); - - PG_RETURN_FLOAT4((float4) num); -} - - -/* - * dtoi4 - converts a float8 number to an int4 number - */ -Datum -dtoi4(PG_FUNCTION_ARGS) -{ - float8 num = PG_GETARG_FLOAT8(0); - int32 result; - - /* 'Inf' is handled by INT_MAX */ - if (num < INT_MIN || num > INT_MAX || isnan(num)) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("integer out of range"))); - - result = (int32) rint(num); - PG_RETURN_INT32(result); -} - - -/* - * dtoi2 - converts a float8 number to an int2 number - */ -Datum -dtoi2(PG_FUNCTION_ARGS) -{ - float8 num = PG_GETARG_FLOAT8(0); - - if (num < SHRT_MIN || num > SHRT_MAX || isnan(num)) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("smallint out of range"))); - - PG_RETURN_INT16((int16) rint(num)); -} - - -/* - * i4tod - converts an int4 number to a float8 number - */ -Datum -i4tod(PG_FUNCTION_ARGS) -{ - int32 num = PG_GETARG_INT32(0); - - PG_RETURN_FLOAT8((float8) num); -} - - -/* - * i2tod - converts an int2 number to a float8 number - */ -Datum -i2tod(PG_FUNCTION_ARGS) -{ - int16 num = PG_GETARG_INT16(0); - - PG_RETURN_FLOAT8((float8) num); -} - - -/* - * ftoi4 - converts a float4 number to an int4 number - */ -Datum -ftoi4(PG_FUNCTION_ARGS) -{ - float4 num = PG_GETARG_FLOAT4(0); - - if (num < INT_MIN || num > INT_MAX || isnan(num)) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("integer out of range"))); - - PG_RETURN_INT32((int32) rint(num)); -} - - -/* - * ftoi2 - converts a float4 number to an int2 number - */ -Datum -ftoi2(PG_FUNCTION_ARGS) -{ - float4 num = PG_GETARG_FLOAT4(0); - - if (num < SHRT_MIN || num > SHRT_MAX || isnan(num)) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("smallint out of range"))); - - PG_RETURN_INT16((int16) rint(num)); -} - - -/* - * i4tof - converts an int4 number to a float4 number - */ -Datum -i4tof(PG_FUNCTION_ARGS) -{ - int32 num = PG_GETARG_INT32(0); - - PG_RETURN_FLOAT4((float4) num); -} - - -/* - * i2tof - converts an int2 number to a float4 number - */ -Datum -i2tof(PG_FUNCTION_ARGS) -{ - int16 num = PG_GETARG_INT16(0); - - PG_RETURN_FLOAT4((float4) num); -} - - -/* - * ======================= - * RANDOM FLOAT8 OPERATORS - * ======================= - */ - -/* - * dround - returns ROUND(arg1) - */ -Datum -dround(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - - PG_RETURN_FLOAT8(rint(arg1)); -} - -/* - * dceil - returns the smallest integer greater than or - * equal to the specified float - */ -Datum -dceil(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - - PG_RETURN_FLOAT8(ceil(arg1)); -} - -/* - * dfloor - returns the largest integer lesser than or - * equal to the specified float - */ -Datum -dfloor(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - - PG_RETURN_FLOAT8(floor(arg1)); -} - -/* - * dsign - returns -1 if the argument is less than 0, 0 - * if the argument is equal to 0, and 1 if the - * argument is greater than zero. - */ -Datum -dsign(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - if (arg1 > 0) - result = 1.0; - else if (arg1 < 0) - result = -1.0; - else - result = 0.0; - - PG_RETURN_FLOAT8(result); -} - -/* - * dtrunc - returns truncation-towards-zero of arg1, - * arg1 >= 0 ... the greatest integer less - * than or equal to arg1 - * arg1 < 0 ... the least integer greater - * than or equal to arg1 - */ -Datum -dtrunc(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - if (arg1 >= 0) - result = floor(arg1); - else - result = -floor(-arg1); - - PG_RETURN_FLOAT8(result); -} - - -/* - * dsqrt - returns square root of arg1 - */ -Datum -dsqrt(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - if (arg1 < 0) - ereport(ERROR, - (errcode(ERRCODE_INVALID_ARGUMENT_FOR_POWER_FUNCTION), - errmsg("cannot take square root of a negative number"))); - - result = sqrt(arg1); - - CHECKFLOATVAL(result, isinf(arg1), arg1 == 0); - PG_RETURN_FLOAT8(result); -} - - -/* - * dcbrt - returns cube root of arg1 - */ -Datum -dcbrt(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - result = cbrt(arg1); - CHECKFLOATVAL(result, isinf(arg1), arg1 == 0); - PG_RETURN_FLOAT8(result); -} - - -/* - * dpow - returns pow(arg1,arg2) - */ -Datum -dpow(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - float8 result; - - /* - * The SQL spec requires that we emit a particular SQLSTATE error code for - * certain error conditions. - */ - if ((arg1 == 0 && arg2 < 0) || - (arg1 < 0 && floor(arg2) != arg2)) - ereport(ERROR, - (errcode(ERRCODE_INVALID_ARGUMENT_FOR_POWER_FUNCTION), - errmsg("invalid argument for power function"))); - - /* - * pow() sets errno only on some platforms, depending on whether it - * follows _IEEE_, _POSIX_, _XOPEN_, or _SVID_, so we try to avoid using - * errno. However, some platform/CPU combinations return errno == EDOM - * and result == Nan for negative arg1 and very large arg2 (they must be - * using something different from our floor() test to decide it's - * invalid). Other platforms (HPPA) return errno == ERANGE and a large - * (HUGE_VAL) but finite result to signal overflow. - */ - errno = 0; - result = pow(arg1, arg2); - if (errno == EDOM && isnan(result)) - { - if ((fabs(arg1) > 1 && arg2 >= 0) || (fabs(arg1) < 1 && arg2 < 0)) - /* The sign of Inf is not significant in this case. */ - result = get_float8_infinity(); - else if (fabs(arg1) != 1) - result = 0; - else - result = 1; - } - else if (errno == ERANGE && result != 0 && !isinf(result)) - result = get_float8_infinity(); - - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), arg1 == 0); - PG_RETURN_FLOAT8(result); -} - - -/* - * dexp - returns the exponential function of arg1 - */ -Datum -dexp(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - errno = 0; - result = exp(arg1); - if (errno == ERANGE && result != 0 && !isinf(result)) - result = get_float8_infinity(); - - CHECKFLOATVAL(result, isinf(arg1), false); - PG_RETURN_FLOAT8(result); -} - - -/* - * dlog1 - returns the natural logarithm of arg1 - */ -Datum -dlog1(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - /* - * Emit particular SQLSTATE error codes for ln(). This is required by the - * SQL standard. - */ - if (arg1 == 0.0) - ereport(ERROR, - (errcode(ERRCODE_INVALID_ARGUMENT_FOR_LOG), - errmsg("cannot take logarithm of zero"))); - if (arg1 < 0) - ereport(ERROR, - (errcode(ERRCODE_INVALID_ARGUMENT_FOR_LOG), - errmsg("cannot take logarithm of a negative number"))); - - result = log(arg1); - - CHECKFLOATVAL(result, isinf(arg1), arg1 == 1); - PG_RETURN_FLOAT8(result); -} - - -/* - * dlog10 - returns the base 10 logarithm of arg1 - */ -Datum -dlog10(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - /* - * Emit particular SQLSTATE error codes for log(). The SQL spec doesn't - * define log(), but it does define ln(), so it makes sense to emit the - * same error code for an analogous error condition. - */ - if (arg1 == 0.0) - ereport(ERROR, - (errcode(ERRCODE_INVALID_ARGUMENT_FOR_LOG), - errmsg("cannot take logarithm of zero"))); - if (arg1 < 0) - ereport(ERROR, - (errcode(ERRCODE_INVALID_ARGUMENT_FOR_LOG), - errmsg("cannot take logarithm of a negative number"))); - - result = log10(arg1); - - CHECKFLOATVAL(result, isinf(arg1), arg1 == 1); - PG_RETURN_FLOAT8(result); -} - - -/* - * dacos - returns the arccos of arg1 (radians) - */ -Datum -dacos(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - /* - * We use errno here because the trigonometric functions are cyclic and - * hard to check for underflow. - */ - errno = 0; - result = acos(arg1); - if (errno != 0) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("input is out of range"))); - - CHECKFLOATVAL(result, isinf(arg1), true); - PG_RETURN_FLOAT8(result); -} - - -/* - * dasin - returns the arcsin of arg1 (radians) - */ -Datum -dasin(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - errno = 0; - result = asin(arg1); - if (errno != 0) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("input is out of range"))); - - CHECKFLOATVAL(result, isinf(arg1), true); - PG_RETURN_FLOAT8(result); -} - - -/* - * datan - returns the arctan of arg1 (radians) - */ -Datum -datan(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - errno = 0; - result = atan(arg1); - if (errno != 0) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("input is out of range"))); - - CHECKFLOATVAL(result, isinf(arg1), true); - PG_RETURN_FLOAT8(result); -} - - -/* - * atan2 - returns the arctan2 of arg1 (radians) - */ -Datum -datan2(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - float8 result; - - errno = 0; - result = atan2(arg1, arg2); - if (errno != 0) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("input is out of range"))); - - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), true); - PG_RETURN_FLOAT8(result); -} - - -/* - * dcos - returns the cosine of arg1 (radians) - */ -Datum -dcos(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - errno = 0; - result = cos(arg1); - if (errno != 0) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("input is out of range"))); - - CHECKFLOATVAL(result, isinf(arg1), true); - PG_RETURN_FLOAT8(result); -} - - -/* - * dcot - returns the cotangent of arg1 (radians) - */ -Datum -dcot(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - errno = 0; - result = tan(arg1); - if (errno != 0) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("input is out of range"))); - - result = 1.0 / result; - CHECKFLOATVAL(result, true /* cotan(pi/2) == inf */ , true); - PG_RETURN_FLOAT8(result); -} - - -/* - * dsin - returns the sine of arg1 (radians) - */ -Datum -dsin(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - errno = 0; - result = sin(arg1); - if (errno != 0) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("input is out of range"))); - - CHECKFLOATVAL(result, isinf(arg1), true); - PG_RETURN_FLOAT8(result); -} - - -/* - * dtan - returns the tangent of arg1 (radians) - */ -Datum -dtan(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - errno = 0; - result = tan(arg1); - if (errno != 0) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("input is out of range"))); - - CHECKFLOATVAL(result, true /* tan(pi/2) == Inf */ , true); - PG_RETURN_FLOAT8(result); -} - - -/* - * degrees - returns degrees converted from radians - */ -Datum -degrees(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - result = arg1 * (180.0 / M_PI); - - CHECKFLOATVAL(result, isinf(arg1), arg1 == 0); - PG_RETURN_FLOAT8(result); -} - - -/* - * dpi - returns the constant PI - */ -Datum -dpi(PG_FUNCTION_ARGS) -{ - PG_RETURN_FLOAT8(M_PI); -} - - -/* - * radians - returns radians converted from degrees - */ -Datum -radians(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float8 result; - - result = arg1 * (M_PI / 180.0); - - CHECKFLOATVAL(result, isinf(arg1), arg1 == 0); - PG_RETURN_FLOAT8(result); -} - - -/* - * drandom - returns a random number - */ -Datum -drandom(PG_FUNCTION_ARGS) -{ - float8 result; - - /* result [0.0 - 1.0) */ - result = (double) random() / ((double) MAX_RANDOM_VALUE + 1); - - PG_RETURN_FLOAT8(result); -} - - -/* - * setseed - set seed for the random number generator - */ -Datum -setseed(PG_FUNCTION_ARGS) -{ - float8 seed = PG_GETARG_FLOAT8(0); - int iseed = (int) (seed * MAX_RANDOM_VALUE); - - srandom((unsigned int) iseed); - - PG_RETURN_VOID(); -} - - - -/* - * ========================= - * FLOAT AGGREGATE OPERATORS - * ========================= - * - * float8_accum - accumulate for AVG(), variance aggregates, etc. - * float4_accum - same, but input data is float4 - * float8_avg - produce final result for float AVG() - * float8_var_samp - produce final result for float VAR_SAMP() - * float8_var_pop - produce final result for float VAR_POP() - * float8_stddev_samp - produce final result for float STDDEV_SAMP() - * float8_stddev_pop - produce final result for float STDDEV_POP() - * - * The transition datatype for all these aggregates is a 3-element array - * of float8, holding the values N, sum(X), sum(X*X) in that order. - * - * Note that we represent N as a float to avoid having to build a special - * datatype. Given a reasonable floating-point implementation, there should - * be no accuracy loss unless N exceeds 2 ^ 52 or so (by which time the - * user will have doubtless lost interest anyway...) - */ - -static float8 * -check_float8_array(ArrayType *transarray, const char *caller, int n) -{ - /* - * We expect the input to be an N-element float array; verify that. We - * don't need to use deconstruct_array() since the array data is just - * going to look like a C array of N float8 values. - */ - if (ARR_NDIM(transarray) != 1 || - ARR_DIMS(transarray)[0] != n || - ARR_HASNULL(transarray) || - ARR_ELEMTYPE(transarray) != FLOAT8OID) - elog(ERROR, "%s: expected %d-element float8 array", caller, n); - return (float8 *) ARR_DATA_PTR(transarray); -} - -Datum -float8_accum(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 newval = PG_GETARG_FLOAT8(1); - float8 *transvalues; - float8 N, - sumX, - sumX2; - - transvalues = check_float8_array(transarray, "float8_accum", 3); - N = transvalues[0]; - sumX = transvalues[1]; - sumX2 = transvalues[2]; - - N += 1.0; - sumX += newval; - CHECKFLOATVAL(sumX, isinf(transvalues[1]) || isinf(newval), true); - sumX2 += newval * newval; - CHECKFLOATVAL(sumX2, isinf(transvalues[2]) || isinf(newval), true); - - /* - * If we're invoked by nodeAgg, we can cheat and modify our first - * parameter in-place to reduce palloc overhead. Otherwise we construct a - * new array with the updated transition data and return it. - */ - if (fcinfo->context && IsA(fcinfo->context, AggState)) - { - transvalues[0] = N; - transvalues[1] = sumX; - transvalues[2] = sumX2; - - PG_RETURN_ARRAYTYPE_P(transarray); - } - else - { - Datum transdatums[3]; - ArrayType *result; - - transdatums[0] = Float8GetDatumFast(N); - transdatums[1] = Float8GetDatumFast(sumX); - transdatums[2] = Float8GetDatumFast(sumX2); - - result = construct_array(transdatums, 3, - FLOAT8OID, - sizeof(float8), false /* float8 byval */ , 'd'); - - PG_RETURN_ARRAYTYPE_P(result); - } -} - -Datum -float4_accum(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - - /* do computations as float8 */ - float8 newval = PG_GETARG_FLOAT4(1); - float8 *transvalues; - float8 N, - sumX, - sumX2; - - transvalues = check_float8_array(transarray, "float4_accum", 3); - N = transvalues[0]; - sumX = transvalues[1]; - sumX2 = transvalues[2]; - - N += 1.0; - sumX += newval; - CHECKFLOATVAL(sumX, isinf(transvalues[1]) || isinf(newval), true); - sumX2 += newval * newval; - CHECKFLOATVAL(sumX2, isinf(transvalues[2]) || isinf(newval), true); - - /* - * If we're invoked by nodeAgg, we can cheat and modify our first - * parameter in-place to reduce palloc overhead. Otherwise we construct a - * new array with the updated transition data and return it. - */ - if (fcinfo->context && IsA(fcinfo->context, AggState)) - { - transvalues[0] = N; - transvalues[1] = sumX; - transvalues[2] = sumX2; - - PG_RETURN_ARRAYTYPE_P(transarray); - } - else - { - Datum transdatums[3]; - ArrayType *result; - - transdatums[0] = Float8GetDatumFast(N); - transdatums[1] = Float8GetDatumFast(sumX); - transdatums[2] = Float8GetDatumFast(sumX2); - - result = construct_array(transdatums, 3, - FLOAT8OID, - sizeof(float8), false /* float8 byval */ , 'd'); - - PG_RETURN_ARRAYTYPE_P(result); - } -} - -Datum -float8_avg(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumX; - - transvalues = check_float8_array(transarray, "float8_avg", 3); - N = transvalues[0]; - sumX = transvalues[1]; - /* ignore sumX2 */ - - /* SQL92 defines AVG of no values to be NULL */ - if (N == 0.0) - PG_RETURN_NULL(); - - PG_RETURN_FLOAT8(sumX / N); -} - -Datum -float8_var_pop(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumX, - sumX2, - numerator; - - transvalues = check_float8_array(transarray, "float8_var_pop", 3); - N = transvalues[0]; - sumX = transvalues[1]; - sumX2 = transvalues[2]; - - /* Population variance is undefined when N is 0, so return NULL */ - if (N == 0.0) - PG_RETURN_NULL(); - - numerator = N * sumX2 - sumX * sumX; - CHECKFLOATVAL(numerator, isinf(sumX2) || isinf(sumX), true); - - /* Watch out for roundoff error producing a negative numerator */ - if (numerator <= 0.0) - PG_RETURN_FLOAT8(0.0); - - PG_RETURN_FLOAT8(numerator / (N * N)); -} - -Datum -float8_var_samp(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumX, - sumX2, - numerator; - - transvalues = check_float8_array(transarray, "float8_var_samp", 3); - N = transvalues[0]; - sumX = transvalues[1]; - sumX2 = transvalues[2]; - - /* Sample variance is undefined when N is 0 or 1, so return NULL */ - if (N <= 1.0) - PG_RETURN_NULL(); - - numerator = N * sumX2 - sumX * sumX; - CHECKFLOATVAL(numerator, isinf(sumX2) || isinf(sumX), true); - - /* Watch out for roundoff error producing a negative numerator */ - if (numerator <= 0.0) - PG_RETURN_FLOAT8(0.0); - - PG_RETURN_FLOAT8(numerator / (N * (N - 1.0))); -} - -Datum -float8_stddev_pop(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumX, - sumX2, - numerator; - - transvalues = check_float8_array(transarray, "float8_stddev_pop", 3); - N = transvalues[0]; - sumX = transvalues[1]; - sumX2 = transvalues[2]; - - /* Population stddev is undefined when N is 0, so return NULL */ - if (N == 0.0) - PG_RETURN_NULL(); - - numerator = N * sumX2 - sumX * sumX; - CHECKFLOATVAL(numerator, isinf(sumX2) || isinf(sumX), true); - - /* Watch out for roundoff error producing a negative numerator */ - if (numerator <= 0.0) - PG_RETURN_FLOAT8(0.0); - - PG_RETURN_FLOAT8(sqrt(numerator / (N * N))); -} - -Datum -float8_stddev_samp(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumX, - sumX2, - numerator; - - transvalues = check_float8_array(transarray, "float8_stddev_samp", 3); - N = transvalues[0]; - sumX = transvalues[1]; - sumX2 = transvalues[2]; - - /* Sample stddev is undefined when N is 0 or 1, so return NULL */ - if (N <= 1.0) - PG_RETURN_NULL(); - - numerator = N * sumX2 - sumX * sumX; - CHECKFLOATVAL(numerator, isinf(sumX2) || isinf(sumX), true); - - /* Watch out for roundoff error producing a negative numerator */ - if (numerator <= 0.0) - PG_RETURN_FLOAT8(0.0); - - PG_RETURN_FLOAT8(sqrt(numerator / (N * (N - 1.0)))); -} - -/* - * ========================= - * SQL2003 BINARY AGGREGATES - * ========================= - * - * The transition datatype for all these aggregates is a 6-element array of - * float8, holding the values N, sum(X), sum(X*X), sum(Y), sum(Y*Y), sum(X*Y) - * in that order. Note that Y is the first argument to the aggregates! - * - * It might seem attractive to optimize this by having multiple accumulator - * functions that only calculate the sums actually needed. But on most - * modern machines, a couple of extra floating-point multiplies will be - * insignificant compared to the other per-tuple overhead, so I've chosen - * to minimize code space instead. - */ - -Datum -float8_regr_accum(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 newvalY = PG_GETARG_FLOAT8(1); - float8 newvalX = PG_GETARG_FLOAT8(2); - float8 *transvalues; - float8 N, - sumX, - sumX2, - sumY, - sumY2, - sumXY; - - transvalues = check_float8_array(transarray, "float8_regr_accum", 6); - N = transvalues[0]; - sumX = transvalues[1]; - sumX2 = transvalues[2]; - sumY = transvalues[3]; - sumY2 = transvalues[4]; - sumXY = transvalues[5]; - - N += 1.0; - sumX += newvalX; - CHECKFLOATVAL(sumX, isinf(transvalues[1]) || isinf(newvalX), true); - sumX2 += newvalX * newvalX; - CHECKFLOATVAL(sumX2, isinf(transvalues[2]) || isinf(newvalX), true); - sumY += newvalY; - CHECKFLOATVAL(sumY, isinf(transvalues[3]) || isinf(newvalY), true); - sumY2 += newvalY * newvalY; - CHECKFLOATVAL(sumY2, isinf(transvalues[4]) || isinf(newvalY), true); - sumXY += newvalX * newvalY; - CHECKFLOATVAL(sumXY, isinf(transvalues[5]) || isinf(newvalX) || - isinf(newvalY), true); - - /* - * If we're invoked by nodeAgg, we can cheat and modify our first - * parameter in-place to reduce palloc overhead. Otherwise we construct a - * new array with the updated transition data and return it. - */ - if (fcinfo->context && IsA(fcinfo->context, AggState)) - { - transvalues[0] = N; - transvalues[1] = sumX; - transvalues[2] = sumX2; - transvalues[3] = sumY; - transvalues[4] = sumY2; - transvalues[5] = sumXY; - - PG_RETURN_ARRAYTYPE_P(transarray); - } - else - { - Datum transdatums[6]; - ArrayType *result; - - transdatums[0] = Float8GetDatumFast(N); - transdatums[1] = Float8GetDatumFast(sumX); - transdatums[2] = Float8GetDatumFast(sumX2); - transdatums[3] = Float8GetDatumFast(sumY); - transdatums[4] = Float8GetDatumFast(sumY2); - transdatums[5] = Float8GetDatumFast(sumXY); - - result = construct_array(transdatums, 6, - FLOAT8OID, - sizeof(float8), - false /* float8 byval */ , 'd'); - - PG_RETURN_ARRAYTYPE_P(result); - } -} - -Datum -float8_regr_sxx(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumX, - sumX2, - numerator; - - transvalues = check_float8_array(transarray, "float8_regr_sxx", 6); - N = transvalues[0]; - sumX = transvalues[1]; - sumX2 = transvalues[2]; - - /* if N is 0 we should return NULL */ - if (N < 1.0) - PG_RETURN_NULL(); - - numerator = N * sumX2 - sumX * sumX; - CHECKFLOATVAL(numerator, isinf(sumX2) || isinf(sumX), true); - - /* Watch out for roundoff error producing a negative numerator */ - if (numerator <= 0.0) - PG_RETURN_FLOAT8(0.0); - - PG_RETURN_FLOAT8(numerator / N); -} - -Datum -float8_regr_syy(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumY, - sumY2, - numerator; - - transvalues = check_float8_array(transarray, "float8_regr_syy", 6); - N = transvalues[0]; - sumY = transvalues[3]; - sumY2 = transvalues[4]; - - /* if N is 0 we should return NULL */ - if (N < 1.0) - PG_RETURN_NULL(); - - numerator = N * sumY2 - sumY * sumY; - CHECKFLOATVAL(numerator, isinf(sumY2) || isinf(sumY), true); - - /* Watch out for roundoff error producing a negative numerator */ - if (numerator <= 0.0) - PG_RETURN_FLOAT8(0.0); - - PG_RETURN_FLOAT8(numerator / N); -} - -Datum -float8_regr_sxy(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumX, - sumY, - sumXY, - numerator; - - transvalues = check_float8_array(transarray, "float8_regr_sxy", 6); - N = transvalues[0]; - sumX = transvalues[1]; - sumY = transvalues[3]; - sumXY = transvalues[5]; - - /* if N is 0 we should return NULL */ - if (N < 1.0) - PG_RETURN_NULL(); - - numerator = N * sumXY - sumX * sumY; - CHECKFLOATVAL(numerator, isinf(sumXY) || isinf(sumX) || - isinf(sumY), true); - - /* A negative result is valid here */ - - PG_RETURN_FLOAT8(numerator / N); -} - -Datum -float8_regr_avgx(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumX; - - transvalues = check_float8_array(transarray, "float8_regr_avgx", 6); - N = transvalues[0]; - sumX = transvalues[1]; - - /* if N is 0 we should return NULL */ - if (N < 1.0) - PG_RETURN_NULL(); - - PG_RETURN_FLOAT8(sumX / N); -} - -Datum -float8_regr_avgy(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumY; - - transvalues = check_float8_array(transarray, "float8_regr_avgy", 6); - N = transvalues[0]; - sumY = transvalues[3]; - - /* if N is 0 we should return NULL */ - if (N < 1.0) - PG_RETURN_NULL(); - - PG_RETURN_FLOAT8(sumY / N); -} - -Datum -float8_covar_pop(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumX, - sumY, - sumXY, - numerator; - - transvalues = check_float8_array(transarray, "float8_covar_pop", 6); - N = transvalues[0]; - sumX = transvalues[1]; - sumY = transvalues[3]; - sumXY = transvalues[5]; - - /* if N is 0 we should return NULL */ - if (N < 1.0) - PG_RETURN_NULL(); - - numerator = N * sumXY - sumX * sumY; - CHECKFLOATVAL(numerator, isinf(sumXY) || isinf(sumX) || - isinf(sumY), true); - - PG_RETURN_FLOAT8(numerator / (N * N)); -} - -Datum -float8_covar_samp(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumX, - sumY, - sumXY, - numerator; - - transvalues = check_float8_array(transarray, "float8_covar_samp", 6); - N = transvalues[0]; - sumX = transvalues[1]; - sumY = transvalues[3]; - sumXY = transvalues[5]; - - /* if N is <= 1 we should return NULL */ - if (N < 2.0) - PG_RETURN_NULL(); - - numerator = N * sumXY - sumX * sumY; - CHECKFLOATVAL(numerator, isinf(sumXY) || isinf(sumX) || - isinf(sumY), true); - - PG_RETURN_FLOAT8(numerator / (N * (N - 1.0))); -} - -Datum -float8_corr(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumX, - sumX2, - sumY, - sumY2, - sumXY, - numeratorX, - numeratorY, - numeratorXY; - - transvalues = check_float8_array(transarray, "float8_corr", 6); - N = transvalues[0]; - sumX = transvalues[1]; - sumX2 = transvalues[2]; - sumY = transvalues[3]; - sumY2 = transvalues[4]; - sumXY = transvalues[5]; - - /* if N is 0 we should return NULL */ - if (N < 1.0) - PG_RETURN_NULL(); - - numeratorX = N * sumX2 - sumX * sumX; - CHECKFLOATVAL(numeratorX, isinf(sumX2) || isinf(sumX), true); - numeratorY = N * sumY2 - sumY * sumY; - CHECKFLOATVAL(numeratorY, isinf(sumY2) || isinf(sumY), true); - numeratorXY = N * sumXY - sumX * sumY; - CHECKFLOATVAL(numeratorXY, isinf(sumXY) || isinf(sumX) || - isinf(sumY), true); - if (numeratorX <= 0 || numeratorY <= 0) - PG_RETURN_NULL(); - - PG_RETURN_FLOAT8(numeratorXY / sqrt(numeratorX * numeratorY)); -} - -Datum -float8_regr_r2(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumX, - sumX2, - sumY, - sumY2, - sumXY, - numeratorX, - numeratorY, - numeratorXY; - - transvalues = check_float8_array(transarray, "float8_regr_r2", 6); - N = transvalues[0]; - sumX = transvalues[1]; - sumX2 = transvalues[2]; - sumY = transvalues[3]; - sumY2 = transvalues[4]; - sumXY = transvalues[5]; - - /* if N is 0 we should return NULL */ - if (N < 1.0) - PG_RETURN_NULL(); - - numeratorX = N * sumX2 - sumX * sumX; - CHECKFLOATVAL(numeratorX, isinf(sumX2) || isinf(sumX), true); - numeratorY = N * sumY2 - sumY * sumY; - CHECKFLOATVAL(numeratorY, isinf(sumY2) || isinf(sumY), true); - numeratorXY = N * sumXY - sumX * sumY; - CHECKFLOATVAL(numeratorXY, isinf(sumXY) || isinf(sumX) || - isinf(sumY), true); - if (numeratorX <= 0) - PG_RETURN_NULL(); - /* per spec, horizontal line produces 1.0 */ - if (numeratorY <= 0) - PG_RETURN_FLOAT8(1.0); - - PG_RETURN_FLOAT8((numeratorXY * numeratorXY) / - (numeratorX * numeratorY)); -} - -Datum -float8_regr_slope(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumX, - sumX2, - sumY, - sumXY, - numeratorX, - numeratorXY; - - transvalues = check_float8_array(transarray, "float8_regr_slope", 6); - N = transvalues[0]; - sumX = transvalues[1]; - sumX2 = transvalues[2]; - sumY = transvalues[3]; - sumXY = transvalues[5]; - - /* if N is 0 we should return NULL */ - if (N < 1.0) - PG_RETURN_NULL(); - - numeratorX = N * sumX2 - sumX * sumX; - CHECKFLOATVAL(numeratorX, isinf(sumX2) || isinf(sumX), true); - numeratorXY = N * sumXY - sumX * sumY; - CHECKFLOATVAL(numeratorXY, isinf(sumXY) || isinf(sumX) || - isinf(sumY), true); - if (numeratorX <= 0) - PG_RETURN_NULL(); - - PG_RETURN_FLOAT8(numeratorXY / numeratorX); -} - -Datum -float8_regr_intercept(PG_FUNCTION_ARGS) -{ - ArrayType *transarray = PG_GETARG_ARRAYTYPE_P(0); - float8 *transvalues; - float8 N, - sumX, - sumX2, - sumY, - sumXY, - numeratorX, - numeratorXXY; - - transvalues = check_float8_array(transarray, "float8_regr_intercept", 6); - N = transvalues[0]; - sumX = transvalues[1]; - sumX2 = transvalues[2]; - sumY = transvalues[3]; - sumXY = transvalues[5]; - - /* if N is 0 we should return NULL */ - if (N < 1.0) - PG_RETURN_NULL(); - - numeratorX = N * sumX2 - sumX * sumX; - CHECKFLOATVAL(numeratorX, isinf(sumX2) || isinf(sumX), true); - numeratorXXY = sumY * sumX2 - sumX * sumXY; - CHECKFLOATVAL(numeratorXXY, isinf(sumY) || isinf(sumX2) || - isinf(sumX) || isinf(sumXY), true); - if (numeratorX <= 0) - PG_RETURN_NULL(); - - PG_RETURN_FLOAT8(numeratorXXY / numeratorX); -} - - -/* - * ==================================== - * MIXED-PRECISION ARITHMETIC OPERATORS - * ==================================== - */ - -/* - * float48pl - returns arg1 + arg2 - * float48mi - returns arg1 - arg2 - * float48mul - returns arg1 * arg2 - * float48div - returns arg1 / arg2 - */ -Datum -float48pl(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - float8 result; - - result = arg1 + arg2; - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), true); - PG_RETURN_FLOAT8(result); -} - -Datum -float48mi(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - float8 result; - - result = arg1 - arg2; - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), true); - PG_RETURN_FLOAT8(result); -} - -Datum -float48mul(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - float8 result; - - result = arg1 * arg2; - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), - arg1 == 0 || arg2 == 0); - PG_RETURN_FLOAT8(result); -} - -Datum -float48div(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - float8 result; - - if (arg2 == 0.0) - ereport(ERROR, - (errcode(ERRCODE_DIVISION_BY_ZERO), - errmsg("division by zero"))); - - result = arg1 / arg2; - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), arg1 == 0); - PG_RETURN_FLOAT8(result); -} - -/* - * float84pl - returns arg1 + arg2 - * float84mi - returns arg1 - arg2 - * float84mul - returns arg1 * arg2 - * float84div - returns arg1 / arg2 - */ -Datum -float84pl(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - float8 result; - - result = arg1 + arg2; - - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), true); - PG_RETURN_FLOAT8(result); -} - -Datum -float84mi(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - float8 result; - - result = arg1 - arg2; - - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), true); - PG_RETURN_FLOAT8(result); -} - -Datum -float84mul(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - float8 result; - - result = arg1 * arg2; - - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), - arg1 == 0 || arg2 == 0); - PG_RETURN_FLOAT8(result); -} - -Datum -float84div(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - float8 result; - - if (arg2 == 0.0) - ereport(ERROR, - (errcode(ERRCODE_DIVISION_BY_ZERO), - errmsg("division by zero"))); - - result = arg1 / arg2; - - CHECKFLOATVAL(result, isinf(arg1) || isinf(arg2), arg1 == 0); - PG_RETURN_FLOAT8(result); -} - -/* - * ==================== - * COMPARISON OPERATORS - * ==================== - */ - -/* - * float48{eq,ne,lt,le,gt,ge} - float4/float8 comparison operations - */ -Datum -float48eq(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) == 0); -} - -Datum -float48ne(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) != 0); -} - -Datum -float48lt(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) < 0); -} - -Datum -float48le(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) <= 0); -} - -Datum -float48gt(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) > 0); -} - -Datum -float48ge(PG_FUNCTION_ARGS) -{ - float4 arg1 = PG_GETARG_FLOAT4(0); - float8 arg2 = PG_GETARG_FLOAT8(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) >= 0); -} - -/* - * float84{eq,ne,lt,le,gt,ge} - float8/float4 comparison operations - */ -Datum -float84eq(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) == 0); -} - -Datum -float84ne(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) != 0); -} - -Datum -float84lt(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) < 0); -} - -Datum -float84le(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) <= 0); -} - -Datum -float84gt(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) > 0); -} - -Datum -float84ge(PG_FUNCTION_ARGS) -{ - float8 arg1 = PG_GETARG_FLOAT8(0); - float4 arg2 = PG_GETARG_FLOAT4(1); - - PG_RETURN_BOOL(float8_cmp_internal(arg1, arg2) >= 0); -} - -/* - * Implements the float8 version of the width_bucket() function - * defined by SQL2003. See also width_bucket_numeric(). - * - * 'bound1' and 'bound2' are the lower and upper bounds of the - * histogram's range, respectively. 'count' is the number of buckets - * in the histogram. width_bucket() returns an integer indicating the - * bucket number that 'operand' belongs to in an equiwidth histogram - * with the specified characteristics. An operand smaller than the - * lower bound is assigned to bucket 0. An operand greater than the - * upper bound is assigned to an additional bucket (with number - * count+1). We don't allow "NaN" for any of the float8 inputs, and we - * don't allow either of the histogram bounds to be +/- infinity. - */ -Datum -width_bucket_float8(PG_FUNCTION_ARGS) -{ - float8 operand = PG_GETARG_FLOAT8(0); - float8 bound1 = PG_GETARG_FLOAT8(1); - float8 bound2 = PG_GETARG_FLOAT8(2); - int32 count = PG_GETARG_INT32(3); - int32 result; - - if (count <= 0.0) - ereport(ERROR, - (errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION), - errmsg("count must be greater than zero"))); - - if (isnan(operand) || isnan(bound1) || isnan(bound2)) - ereport(ERROR, - (errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION), - errmsg("operand, lower bound and upper bound cannot be NaN"))); - - /* Note that we allow "operand" to be infinite */ - if (is_infinite(bound1) || is_infinite(bound2)) - ereport(ERROR, - (errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION), - errmsg("lower and upper bounds must be finite"))); - - if (bound1 < bound2) - { - if (operand < bound1) - result = 0; - else if (operand >= bound2) - { - result = count + 1; - /* check for overflow */ - if (result < count) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("integer out of range"))); - } - else - result = ((float8) count * (operand - bound1) / (bound2 - bound1)) + 1; - } - else if (bound1 > bound2) - { - if (operand > bound1) - result = 0; - else if (operand <= bound2) - { - result = count + 1; - /* check for overflow */ - if (result < count) - ereport(ERROR, - (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("integer out of range"))); - } - else - result = ((float8) count * (bound1 - operand) / (bound1 - bound2)) + 1; - } - else - { - ereport(ERROR, - (errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION), - errmsg("lower bound cannot equal upper bound"))); - result = 0; /* keep the compiler quiet */ - } - - PG_RETURN_INT32(result); -} - -/* ========== PRIVATE ROUTINES ========== */ - -#ifndef HAVE_CBRT - -static double -cbrt(double x) -{ - int isneg = (x < 0.0); - double absx = fabs(x); - double tmpres = pow(absx, (double) 1.0 / (double) 3.0); - - /* - * The result is somewhat inaccurate --- not really pow()'s fault, as the - * exponent it's handed contains roundoff error. We can improve the - * accuracy by doing one iteration of Newton's formula. Beware of zero - * input however. - */ - if (tmpres > 0.0) - tmpres -= (tmpres - absx / (tmpres * tmpres)) / (double) 3.0; - - return isneg ? -tmpres : tmpres; -} - -#endif /* !HAVE_CBRT */ diff --git a/tests/cluecode/data/copyright_fossology/testdata31.yml b/tests/cluecode/data/copyright_fossology/testdata31.yml new file mode 100644 index 00000000000..0a4efe9a117 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata31.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) YEAR This_file_is_part_of_KDE +holders: + - This_file_is_part_of_KDE diff --git a/tests/cluecode/data/copyright_fossology/testdata31_raw b/tests/cluecode/data/copyright_fossology/testdata31_raw deleted file mode 100644 index f4e98e0caa1..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata31_raw +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) YEAR This_file_is_part_of_KDE -# This file is distributed under the same license as the PACKAGE package. -# -# Erdal Ronahi , 2008. -msgid "" -msgstr "" -"Project-Id-Version: krunner_nepomuksearchrunner\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2009-06-11 11:16+0200\n" -"PO-Revision-Date: 2008-12-16 06:28+0100\n" -"Last-Translator: Erdal Ronahi \n" -"Language-Team: Kurdish \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 0.2\n" -"Plural-Forms: nplurals=2; plural= n != 1;\n" - -#: nepomuksearchrunner.cpp:70 -msgid "" -"Finds files, documents and other content that matches :q: using the desktop " -"search system." -msgstr "" - -#: queryclientwrapper.cpp:109 -#, kde-format -msgctxt "" -"@action file/resource to be opened from KRunner. %1 is the name and %2 the " -"type" -msgid "Open %1 (%2)" -msgstr "%1 Veke (%2)" diff --git a/tests/cluecode/data/copyright_fossology/testdata32.yml b/tests/cluecode/data/copyright_fossology/testdata32.yml new file mode 100644 index 00000000000..7b43ca479b8 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata32.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2002 Ximian, Inc. +holders: + - Ximian, Inc. +authors: + - Rachel Hestilow diff --git a/tests/cluecode/data/copyright_fossology/testdata32_raw b/tests/cluecode/data/copyright_fossology/testdata32_raw deleted file mode 100644 index ae0776aac04..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata32_raw +++ /dev/null @@ -1,69 +0,0 @@ -/* -*- mode: c; style: linux -*- */ - -/* file-transfer-dialog.h - * Copyright (c) 2002 Ximian, Inc. - * - * Written by Rachel Hestilow - * - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - */ - -#ifndef __FILE_TRANSFER_DIALOG_H__ -#define __FILE_TRANSFER_DIALOG_H__ - -#include - -G_BEGIN_DECLS - -#define FILE_TRANSFER_DIALOG(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, file_transfer_dialog_get_type (), FileTransferDialog) -#define FILE_TRANSFER_DIALOG_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, file_transfer_dialog_get_type (), FileTransferDialogClass) -#define IS_FILE_TRANSFER_DIALOG(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, file_transfer_dialog_get_type ()) - -typedef struct _FileTransferDialog FileTransferDialog; -typedef struct _FileTransferDialogClass FileTransferDialogClass; -typedef struct _FileTransferDialogPrivate FileTransferDialogPrivate; - -typedef enum { - FILE_TRANSFER_DIALOG_DEFAULT = 1 << 0, - FILE_TRANSFER_DIALOG_OVERWRITE = 1 << 1 -} FileTransferDialogOptions; - -struct _FileTransferDialog -{ - GtkDialog dialog; - - FileTransferDialogPrivate *priv; -}; - -struct _FileTransferDialogClass -{ - GtkDialogClass parent_class; -}; - -GType file_transfer_dialog_get_type (void); -GtkWidget* file_transfer_dialog_new (void); -GtkWidget* file_transfer_dialog_new_with_parent (GtkWindow *parent); - -void file_transfer_dialog_copy_async (FileTransferDialog *dlg, - GList *source_files, - GList *target_files, - FileTransferDialogOptions options, - int priority); - - -G_END_DECLS - -#endif /* __FILE_TRANSFER_DIALOG_H__ */ diff --git a/tests/cluecode/data/copyright_fossology/testdata33.yml b/tests/cluecode/data/copyright_fossology/testdata33.yml new file mode 100644 index 00000000000..fc554887af1 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata33.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1999 Adobe Systems Incorporated + - Copyright (c) 1999 Adobe Systems Incorporated +holders: + - Adobe Systems Incorporated + - Adobe Systems Incorporated diff --git a/tests/cluecode/data/copyright_fossology/testdata33_raw b/tests/cluecode/data/copyright_fossology/testdata33_raw deleted file mode 100644 index de07c34bba2..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata33_raw +++ /dev/null @@ -1,2574 +0,0 @@ -StartFontMetrics 4.1 -Comment Copyright 1999 Adobe Systems Incorporated. All Rights Reserved. -Comment Creation Date: Sat Mar 20 13:40:40 1999 -MetricsSets 2 -FontName MunhwaGungSeo-Bold -Weight Bold -FontBBox -125 -257 986 883 -Version 1.000 -Notice Copyright (c) 1999 Adobe Systems Incorporated. All Rights Reserved. -CharacterSet Adobe-Korea1-0 -Characters 2549 -IsBaseFont true -IsCIDFont true -Ascender 883 -Descender -257 -CapHeight 883 -StartDirection 2 -UnderlinePosition -100 -UnderlineThickness 50 -ItalicAngle 0 -IsFixedPitch false -EndDirection -StartCharMetrics 2549 -C -1 ; W0X 1000 ; N 0 ; B 0 0 0 0 ; -C -1 ; W0X 258 ; N 1 ; B 0 0 0 0 ; -C -1 ; W0X 321 ; N 2 ; B 106 -11 215 723 ; -C -1 ; W0X 401 ; N 3 ; B 88 487 313 723 ; -C -1 ; W0X 542 ; N 4 ; B 37 0 508 695 ; -C -1 ; W0X 542 ; N 5 ; B 66 -71 470 739 ; -C -1 ; W0X 809 ; N 6 ; B 36 -12 771 705 ; -C -1 ; W0X 776 ; N 7 ; B 78 -14 738 677 ; -C -1 ; W0X 193 ; N 8 ; B 59 487 134 723 ; -C -1 ; W0X 329 ; N 9 ; B 109 -184 334 767 ; -C -1 ; W0X 329 ; N 10 ; B -5 -184 220 767 ; -C -1 ; W0X 472 ; N 11 ; B 64 355 409 723 ; -C -1 ; W0X 545 ; N 12 ; B 42 23 503 472 ; -C -1 ; W0X 241 ; N 13 ; B 68 -120 177 98 ; -C -1 ; W0X 314 ; N 14 ; B 43 213 270 263 ; -C -1 ; W0X 241 ; N 15 ; B 66 -11 175 102 ; -C -1 ; W0X 316 ; N 16 ; B 5 -12 318 739 ; -C -1 ; W0X 542 ; N 17 ; B 40 -14 502 705 ; -C -1 ; W0X 508 ; N 18 ; B 117 0 398 699 ; -C -1 ; W0X 542 ; N 19 ; B 58 0 481 705 ; -C -1 ; W0X 542 ; N 20 ; B 55 -14 491 705 ; -C -1 ; W0X 542 ; N 21 ; B 48 0 484 702 ; -C -1 ; W0X 542 ; N 22 ; B 64 -14 474 709 ; -C -1 ; W0X 542 ; N 23 ; B 51 -14 494 705 ; -C -1 ; W0X 542 ; N 24 ; B 59 -10 498 692 ; -C -1 ; W0X 542 ; N 25 ; B 46 -14 497 705 ; -C -1 ; W0X 542 ; N 26 ; B 47 -14 491 705 ; -C -1 ; W0X 260 ; N 27 ; B 75 -11 185 491 ; -C -1 ; W0X 260 ; N 28 ; B 77 -120 188 491 ; -C -1 ; W0X 545 ; N 29 ; B 38 34 490 473 ; -C -1 ; W0X 545 ; N 30 ; B 42 144 503 362 ; -C -1 ; W0X 545 ; N 31 ; B 55 34 507 473 ; -C -1 ; W0X 458 ; N 32 ; B 23 -11 423 723 ; -C -1 ; W0X 854 ; N 33 ; B 74 11 782 698 ; -C -1 ; W0X 698 ; N 34 ; B 18 0 679 723 ; -C -1 ; W0X 658 ; N 35 ; B 36 0 615 709 ; -C -1 ; W0X 653 ; N 36 ; B 46 -14 611 723 ; -C -1 ; W0X 717 ; N 37 ; B 35 0 671 709 ; -C -1 ; W0X 602 ; N 38 ; B 35 0 574 709 ; -C -1 ; W0X 556 ; N 39 ; B 34 0 533 709 ; -C -1 ; W0X 702 ; N 40 ; B 47 -14 671 723 ; -C -1 ; W0X 738 ; N 41 ; B 34 0 704 709 ; -C -1 ; W0X 344 ; N 42 ; B 33 0 311 709 ; -C -1 ; W0X 410 ; N 43 ; B -18 -120 375 709 ; -C -1 ; W0X 711 ; N 44 ; B 38 0 691 709 ; -C -1 ; W0X 602 ; N 45 ; B 36 0 576 709 ; -C -1 ; W0X 901 ; N 46 ; B 30 -5 868 709 ; -C -1 ; W0X 718 ; N 47 ; B 31 -9 684 709 ; -C -1 ; W0X 725 ; N 48 ; B 46 -14 679 723 ; -C -1 ; W0X 583 ; N 49 ; B 33 0 546 709 ; -C -1 ; W0X 725 ; N 50 ; B 46 -183 679 723 ; -C -1 ; W0X 667 ; N 51 ; B 36 0 660 709 ; -C -1 ; W0X 546 ; N 52 ; B 35 -14 504 723 ; -C -1 ; W0X 613 ; N 53 ; B 12 0 598 709 ; -C -1 ; W0X 711 ; N 54 ; B 34 -14 679 709 ; -C -1 ; W0X 701 ; N 55 ; B 13 -14 685 709 ; -C -1 ; W0X 956 ; N 56 ; B 12 -14 944 709 ; -C -1 ; W0X 712 ; N 57 ; B 15 0 693 709 ; -C -1 ; W0X 695 ; N 58 ; B 18 0 680 709 ; -C -1 ; W0X 600 ; N 59 ; B 24 0 570 709 ; -C -1 ; W0X 327 ; N 60 ; B 124 -156 296 739 ; -C -1 ; W0X 316 ; N 61 ; B -1 -12 312 739 ; -C -1 ; W0X 327 ; N 62 ; B 31 -156 203 739 ; -C -1 ; W0X 482 ; N 63 ; B 38 348 444 705 ; -C -1 ; W0X 500 ; N 64 ; B 0 -125 500 -75 ; -C -1 ; W0X 353 ; N 65 ; B 31 543 216 705 ; -C -1 ; W0X 478 ; N 66 ; B 35 -12 488 492 ; -C -1 ; W0X 529 ; N 67 ; B 25 -12 514 739 ; -C -1 ; W0X 460 ; N 68 ; B 40 -12 454 492 ; -C -1 ; W0X 529 ; N 69 ; B 38 -12 527 739 ; -C -1 ; W0X 472 ; N 70 ; B 38 -12 457 492 ; -C -1 ; W0X 342 ; N 71 ; B 33 0 422 739 ; -C -1 ; W0X 526 ; N 72 ; B 26 -257 529 492 ; -C -1 ; W0X 537 ; N 73 ; B 30 0 542 739 ; -C -1 ; W0X 288 ; N 74 ; B 36 0 278 682 ; -C -1 ; W0X 287 ; N 75 ; B -125 -257 216 682 ; -C -1 ; W0X 529 ; N 76 ; B 32 0 544 739 ; -C -1 ; W0X 288 ; N 77 ; B 34 0 275 739 ; -C -1 ; W0X 815 ; N 78 ; B 31 0 829 492 ; -C -1 ; W0X 537 ; N 79 ; B 30 0 540 492 ; -C -1 ; W0X 526 ; N 80 ; B 39 -12 510 492 ; -C -1 ; W0X 533 ; N 81 ; B 29 -246 519 492 ; -C -1 ; W0X 529 ; N 82 ; B 38 -246 529 492 ; -C -1 ; W0X 372 ; N 83 ; B 28 0 378 492 ; -C -1 ; W0X 411 ; N 84 ; B 25 -12 398 492 ; -C -1 ; W0X 310 ; N 85 ; B 22 -12 317 621 ; -C -1 ; W0X 535 ; N 86 ; B 25 -12 534 492 ; -C -1 ; W0X 510 ; N 87 ; B 7 -12 520 480 ; -C -1 ; W0X 742 ; N 88 ; B 7 -12 762 480 ; -C -1 ; W0X 516 ; N 89 ; B 11 0 525 480 ; -C -1 ; W0X 516 ; N 90 ; B -7 -257 532 480 ; -C -1 ; W0X 452 ; N 91 ; B 22 0 452 480 ; -C -1 ; W0X 429 ; N 92 ; B 75 -156 389 739 ; -C -1 ; W0X 249 ; N 93 ; B 99 -250 150 750 ; -C -1 ; W0X 429 ; N 94 ; B 41 -156 354 739 ; -C -1 ; W0X 530 ; N 95 ; B 38 197 491 308 ; -C -1 ; W0X 956 ; N 96 ; B 5 -14 948 709 ; -C -1 ; W0X 479 ; N 97 ; B 30 216 449 260 ; -C -1 ; W0X 736 ; N 98 ; B 53 103 683 723 ; -C -1 ; W0X 925 ; N 99 ; B 19 353 865 709 ; -C -1 ; W0X 958 ; N 100 ; B 105 -11 856 102 ; -C -1 ; W0X 1000 ; N 101 ; B 0 0 0 0 ; -C -1 ; W0X 1000 ; N 1086 ; B 135 -75 905 832 ; -C -1 ; W0X 1000 ; N 1087 ; B 161 -75 928 825 ; -C -1 ; W0X 1000 ; N 1088 ; B 167 -57 943 831 ; -C -1 ; W0X 1000 ; N 1089 ; B 178 -97 915 836 ; -C -1 ; W0X 1000 ; N 1090 ; B 183 -97 935 841 ; -C -1 ; W0X 1000 ; N 1091 ; B 163 -96 935 858 ; -C -1 ; W0X 1000 ; N 1092 ; B 181 -91 930 854 ; -C -1 ; W0X 1000 ; N 1093 ; B 178 -87 933 840 ; -C -1 ; W0X 1000 ; N 1094 ; B 175 -97 910 838 ; -C -1 ; W0X 1000 ; N 1095 ; B 165 -88 912 841 ; -C -1 ; W0X 1000 ; N 1096 ; B 163 -34 909 840 ; -C -1 ; W0X 1000 ; N 1097 ; B 77 -84 921 815 ; -C -1 ; W0X 1000 ; N 1098 ; B 188 -96 951 824 ; -C -1 ; W0X 1000 ; N 1099 ; B 161 -75 911 829 ; -C -1 ; W0X 1000 ; N 1100 ; B 172 -84 918 830 ; -C -1 ; W0X 1000 ; N 1101 ; B 190 -76 908 846 ; -C -1 ; W0X 1000 ; N 1102 ; B 183 -73 906 830 ; -C -1 ; W0X 1000 ; N 1103 ; B 171 -105 911 857 ; -C -1 ; W0X 1000 ; N 1104 ; B 197 -81 809 833 ; -C -1 ; W0X 1000 ; N 1105 ; B 204 -99 809 842 ; -C -1 ; W0X 1000 ; N 1106 ; B 214 -85 813 841 ; -C -1 ; W0X 1000 ; N 1107 ; B 247 -85 811 855 ; -C -1 ; W0X 1000 ; N 1108 ; B 254 -100 809 847 ; -C -1 ; W0X 1000 ; N 1109 ; B 254 -100 810 862 ; -C -1 ; W0X 1000 ; N 1110 ; B 231 -85 832 839 ; -C -1 ; W0X 1000 ; N 1111 ; B 172 -82 885 852 ; -C -1 ; W0X 1000 ; N 1112 ; B 211 -99 809 846 ; -C -1 ; W0X 1000 ; N 1113 ; B 149 -69 915 838 ; -C -1 ; W0X 1000 ; N 1114 ; B 184 -116 923 825 ; -C -1 ; W0X 1000 ; N 1115 ; B 178 -76 946 817 ; -C -1 ; W0X 1000 ; N 1116 ; B 188 -104 899 833 ; -C -1 ; W0X 1000 ; N 1117 ; B 172 -61 930 818 ; -C -1 ; W0X 1000 ; N 1118 ; B 182 -69 937 818 ; -C -1 ; W0X 1000 ; N 1119 ; B 198 -66 808 834 ; -C -1 ; W0X 1000 ; N 1120 ; B 190 -74 810 835 ; -C -1 ; W0X 1000 ; N 1121 ; B 205 -107 813 870 ; -C -1 ; W0X 1000 ; N 1122 ; B 171 -81 764 839 ; -C -1 ; W0X 1000 ; N 1123 ; B 190 -84 764 838 ; -C -1 ; W0X 1000 ; N 1124 ; B 191 -49 763 844 ; -C -1 ; W0X 1000 ; N 1125 ; B 193 -92 763 854 ; -C -1 ; W0X 1000 ; N 1126 ; B 194 -94 763 860 ; -C -1 ; W0X 1000 ; N 1127 ; B 193 -100 763 859 ; -C -1 ; W0X 1000 ; N 1128 ; B 193 -104 763 849 ; -C -1 ; W0X 1000 ; N 1129 ; B 208 -100 764 850 ; -C -1 ; W0X 1000 ; N 1130 ; B 188 -87 800 841 ; -C -1 ; W0X 1000 ; N 1131 ; B 147 -73 836 830 ; -C -1 ; W0X 1000 ; N 1132 ; B 219 -94 763 837 ; -C -1 ; W0X 1000 ; N 1133 ; B 190 -86 792 834 ; -C -1 ; W0X 1000 ; N 1134 ; B 209 -104 763 855 ; -C -1 ; W0X 1000 ; N 1135 ; B 210 -101 767 846 ; -C -1 ; W0X 1000 ; N 1136 ; B 216 -105 763 857 ; -C -1 ; W0X 1000 ; N 1137 ; B 197 -76 809 832 ; -C -1 ; W0X 1000 ; N 1138 ; B 216 -91 809 840 ; -C -1 ; W0X 1000 ; N 1139 ; B 252 -96 810 843 ; -C -1 ; W0X 1000 ; N 1140 ; B 250 -100 809 852 ; -C -1 ; W0X 1000 ; N 1141 ; B 249 -100 809 861 ; -C -1 ; W0X 1000 ; N 1142 ; B 247 -84 846 838 ; -C -1 ; W0X 1000 ; N 1143 ; B 212 -68 878 852 ; -C -1 ; W0X 1000 ; N 1144 ; B 224 -97 809 838 ; -C -1 ; W0X 1000 ; N 1145 ; B 169 -91 761 846 ; -C -1 ; W0X 1000 ; N 1146 ; B 198 -87 766 854 ; -C -1 ; W0X 1000 ; N 1147 ; B 203 -91 763 831 ; -C -1 ; W0X 1000 ; N 1148 ; B 198 -70 766 831 ; -C -1 ; W0X 1000 ; N 1149 ; B 208 -92 765 852 ; -C -1 ; W0X 1000 ; N 1150 ; B 198 -104 764 853 ; -C -1 ; W0X 1000 ; N 1151 ; B 197 -97 761 852 ; -C -1 ; W0X 1000 ; N 1152 ; B 197 -112 761 867 ; -C -1 ; W0X 1000 ; N 1153 ; B 197 -77 800 837 ; -C -1 ; W0X 1000 ; N 1154 ; B 153 -73 845 848 ; -C -1 ; W0X 1000 ; N 1155 ; B 192 -87 763 849 ; -C -1 ; W0X 1000 ; N 1156 ; B 205 -99 763 863 ; -C -1 ; W0X 1000 ; N 1157 ; B 127 -74 763 839 ; -C -1 ; W0X 1000 ; N 1158 ; B 220 -61 809 835 ; -C -1 ; W0X 1000 ; N 1159 ; B 229 -112 809 866 ; -C -1 ; W0X 1000 ; N 1160 ; B 234 -88 809 853 ; -C -1 ; W0X 1000 ; N 1161 ; B 204 -96 821 830 ; -C -1 ; W0X 1000 ; N 1162 ; B 122 123 876 684 ; -C -1 ; W0X 1000 ; N 1163 ; B 144 -46 836 783 ; -C -1 ; W0X 1000 ; N 1164 ; B 146 -14 843 783 ; -C -1 ; W0X 1000 ; N 1165 ; B 141 -80 842 795 ; -C -1 ; W0X 1000 ; N 1166 ; B 124 -87 845 823 ; -C -1 ; W0X 1000 ; N 1167 ; B 143 -92 873 818 ; -C -1 ; W0X 1000 ; N 1168 ; B 143 -80 873 818 ; -C -1 ; W0X 1000 ; N 1169 ; B 121 -72 851 822 ; -C -1 ; W0X 1000 ; N 1170 ; B 132 -86 837 809 ; -C -1 ; W0X 1000 ; N 1171 ; B 130 -104 837 823 ; -C -1 ; W0X 1000 ; N 1172 ; B 103 -49 837 814 ; -C -1 ; W0X 1000 ; N 1173 ; B 113 -92 819 787 ; -C -1 ; W0X 1000 ; N 1174 ; B 132 -64 837 823 ; -C -1 ; W0X 1000 ; N 1175 ; B 142 -87 908 820 ; -C -1 ; W0X 1000 ; N 1176 ; B 150 -70 927 825 ; -C -1 ; W0X 1000 ; N 1177 ; B 144 -58 914 834 ; -C -1 ; W0X 1000 ; N 1178 ; B 157 -87 932 851 ; -C -1 ; W0X 1000 ; N 1179 ; B 164 -76 947 845 ; -C -1 ; W0X 1000 ; N 1180 ; B 159 -108 915 862 ; -C -1 ; W0X 1000 ; N 1181 ; B 158 -108 917 866 ; -C -1 ; W0X 1000 ; N 1182 ; B 154 -71 928 855 ; -C -1 ; W0X 1000 ; N 1183 ; B 135 -97 918 850 ; -C -1 ; W0X 1000 ; N 1184 ; B 180 -79 811 843 ; -C -1 ; W0X 1000 ; N 1185 ; B 207 -75 809 835 ; -C -1 ; W0X 1000 ; N 1186 ; B 218 -91 811 855 ; -C -1 ; W0X 1000 ; N 1187 ; B 228 -92 809 867 ; -C -1 ; W0X 1000 ; N 1188 ; B 180 -94 856 853 ; -C -1 ; W0X 1000 ; N 1189 ; B 199 -110 809 838 ; -C -1 ; W0X 1000 ; N 1190 ; B 186 -76 761 839 ; -C -1 ; W0X 1000 ; N 1191 ; B 171 -84 763 858 ; -C -1 ; W0X 1000 ; N 1192 ; B 200 -75 763 831 ; -C -1 ; W0X 1000 ; N 1193 ; B 207 -101 764 855 ; -C -1 ; W0X 1000 ; N 1194 ; B 200 -93 763 852 ; -C -1 ; W0X 1000 ; N 1195 ; B 206 -100 764 857 ; -C -1 ; W0X 1000 ; N 1196 ; B 162 -68 800 822 ; -C -1 ; W0X 1000 ; N 1197 ; B 187 -86 763 846 ; -C -1 ; W0X 1000 ; N 1198 ; B 145 85 909 698 ; -C -1 ; W0X 1000 ; N 1199 ; B 126 -38 842 752 ; -C -1 ; W0X 1000 ; N 1200 ; B 130 -76 791 822 ; -C -1 ; W0X 1000 ; N 1201 ; B 130 -83 791 821 ; -C -1 ; W0X 1000 ; N 1202 ; B 140 -53 843 784 ; -C -1 ; W0X 1000 ; N 1203 ; B 125 -39 755 800 ; -C -1 ; W0X 1000 ; N 1204 ; B 138 -94 756 834 ; -C -1 ; W0X 1000 ; N 1205 ; B 142 -75 769 840 ; -C -1 ; W0X 1000 ; N 1206 ; B 136 -92 764 843 ; -C -1 ; W0X 1000 ; N 1207 ; B 134 -99 773 865 ; -C -1 ; W0X 1000 ; N 1208 ; B 145 -89 769 849 ; -C -1 ; W0X 1000 ; N 1209 ; B 161 -88 796 837 ; -C -1 ; W0X 1000 ; N 1210 ; B 149 -86 789 845 ; -C -1 ; W0X 1000 ; N 1211 ; B 149 -103 792 846 ; -C -1 ; W0X 1000 ; N 1212 ; B 120 -99 758 848 ; -C -1 ; W0X 1000 ; N 1213 ; B 152 -66 835 833 ; -C -1 ; W0X 1000 ; N 1214 ; B 118 -93 764 823 ; -C -1 ; W0X 1000 ; N 1215 ; B 129 -77 826 817 ; -C -1 ; W0X 1000 ; N 1216 ; B 147 -80 764 846 ; -C -1 ; W0X 1000 ; N 1217 ; B 171 -91 763 834 ; -C -1 ; W0X 1000 ; N 1218 ; B 172 -67 763 833 ; -C -1 ; W0X 1000 ; N 1219 ; B 189 -97 763 851 ; -C -1 ; W0X 1000 ; N 1220 ; B 120 -86 828 846 ; -C -1 ; W0X 1000 ; N 1221 ; B 192 -104 763 861 ; -C -1 ; W0X 1000 ; N 1222 ; B 144 -76 808 845 ; -C -1 ; W0X 1000 ; N 1223 ; B 196 -71 854 863 ; -C -1 ; W0X 1000 ; N 1224 ; B 146 -96 763 866 ; -C -1 ; W0X 1000 ; N 1225 ; B 174 -100 763 854 ; -C -1 ; W0X 1000 ; N 1226 ; B 172 -76 763 845 ; -C -1 ; W0X 1000 ; N 1227 ; B 188 -97 763 861 ; -C -1 ; W0X 1000 ; N 1228 ; B 207 -116 765 861 ; -C -1 ; W0X 1000 ; N 1229 ; B 197 -99 759 867 ; -C -1 ; W0X 1000 ; N 1230 ; B 185 -68 815 831 ; -C -1 ; W0X 1000 ; N 1231 ; B 117 -81 783 801 ; -C -1 ; W0X 1000 ; N 1232 ; B 161 -72 793 830 ; -C -1 ; W0X 1000 ; N 1233 ; B 149 -104 788 872 ; -C -1 ; W0X 1000 ; N 1234 ; B 104 120 914 698 ; -C -1 ; W0X 1000 ; N 1235 ; B 109 -74 840 809 ; -C -1 ; W0X 1000 ; N 1236 ; B 146 -32 870 760 ; -C -1 ; W0X 1000 ; N 1237 ; B 156 -67 877 831 ; -C -1 ; W0X 1000 ; N 1238 ; B 147 -94 864 849 ; -C -1 ; W0X 1000 ; N 1239 ; B 137 -82 847 833 ; -C -1 ; W0X 1000 ; N 1240 ; B 152 -65 846 825 ; -C -1 ; W0X 1000 ; N 1241 ; B 125 -80 851 840 ; -C -1 ; W0X 1000 ; N 1242 ; B 135 15 852 816 ; -C -1 ; W0X 1000 ; N 1243 ; B 128 -76 875 818 ; -C -1 ; W0X 1000 ; N 1244 ; B 192 -62 763 818 ; -C -1 ; W0X 1000 ; N 1245 ; B 196 -84 763 843 ; -C -1 ; W0X 1000 ; N 1246 ; B 209 -70 763 841 ; -C -1 ; W0X 1000 ; N 1247 ; B 200 -64 763 834 ; -C -1 ; W0X 1000 ; N 1248 ; B 200 -82 763 846 ; -C -1 ; W0X 1000 ; N 1249 ; B 215 -103 763 846 ; -C -1 ; W0X 1000 ; N 1250 ; B 215 -70 763 851 ; -C -1 ; W0X 1000 ; N 1251 ; B 233 -83 763 834 ; -C -1 ; W0X 1000 ; N 1252 ; B 208 -89 738 842 ; -C -1 ; W0X 1000 ; N 1253 ; B 215 -70 820 827 ; -C -1 ; W0X 1000 ; N 1254 ; B 217 -96 763 843 ; -C -1 ; W0X 1000 ; N 1255 ; B 215 -74 801 838 ; -C -1 ; W0X 1000 ; N 1256 ; B 214 -90 775 839 ; -C -1 ; W0X 1000 ; N 1257 ; B 125 -57 894 817 ; -C -1 ; W0X 1000 ; N 1258 ; B 129 -77 922 837 ; -C -1 ; W0X 1000 ; N 1259 ; B 135 -82 928 860 ; -C -1 ; W0X 1000 ; N 1260 ; B 110 -58 927 814 ; -C -1 ; W0X 1000 ; N 1261 ; B 142 -90 919 820 ; -C -1 ; W0X 1000 ; N 1262 ; B 146 -84 937 837 ; -C -1 ; W0X 1000 ; N 1263 ; B 136 -93 935 853 ; -C -1 ; W0X 1000 ; N 1264 ; B 139 -91 903 858 ; -C -1 ; W0X 1000 ; N 1265 ; B 117 -46 932 825 ; -C -1 ; W0X 1000 ; N 1266 ; B 75 -70 932 815 ; -C -1 ; W0X 1000 ; N 1267 ; B 136 -73 913 829 ; -C -1 ; W0X 1000 ; N 1268 ; B 110 -92 917 854 ; -C -1 ; W0X 1000 ; N 1269 ; B 130 -96 809 856 ; -C -1 ; W0X 1000 ; N 1270 ; B 194 -89 808 849 ; -C -1 ; W0X 1000 ; N 1271 ; B 163 -84 808 845 ; -C -1 ; W0X 1000 ; N 1272 ; B 212 -95 808 850 ; -C -1 ; W0X 1000 ; N 1273 ; B 186 -95 809 847 ; -C -1 ; W0X 1000 ; N 1274 ; B 200 -96 809 862 ; -C -1 ; W0X 1000 ; N 1275 ; B 172 -75 831 843 ; -C -1 ; W0X 1000 ; N 1276 ; B 189 -96 853 853 ; -C -1 ; W0X 1000 ; N 1277 ; B 179 -93 808 857 ; -C -1 ; W0X 1000 ; N 1278 ; B 90 -65 901 843 ; -C -1 ; W0X 1000 ; N 1279 ; B 127 -85 935 816 ; -C -1 ; W0X 1000 ; N 1280 ; B 142 -86 928 838 ; -C -1 ; W0X 1000 ; N 1281 ; B 153 -59 764 827 ; -C -1 ; W0X 1000 ; N 1282 ; B 131 -76 763 838 ; -C -1 ; W0X 1000 ; N 1283 ; B 148 -89 763 842 ; -C -1 ; W0X 1000 ; N 1284 ; B 145 -57 763 824 ; -C -1 ; W0X 1000 ; N 1285 ; B 154 -92 763 854 ; -C -1 ; W0X 1000 ; N 1286 ; B 156 -84 763 837 ; -C -1 ; W0X 1000 ; N 1287 ; B 162 -90 763 852 ; -C -1 ; W0X 1000 ; N 1288 ; B 156 -71 764 856 ; -C -1 ; W0X 1000 ; N 1289 ; B 120 -74 819 838 ; -C -1 ; W0X 1000 ; N 1290 ; B 146 -90 763 848 ; -C -1 ; W0X 1000 ; N 1291 ; B 79 -67 763 835 ; -C -1 ; W0X 1000 ; N 1292 ; B 207 -76 809 846 ; -C -1 ; W0X 1000 ; N 1293 ; B 186 -71 809 837 ; -C -1 ; W0X 1000 ; N 1294 ; B 218 -85 809 823 ; -C -1 ; W0X 1000 ; N 1295 ; B 210 -77 839 826 ; -C -1 ; W0X 1000 ; N 1296 ; B 203 -71 808 853 ; -C -1 ; W0X 1000 ; N 1297 ; B 137 -45 763 834 ; -C -1 ; W0X 1000 ; N 1298 ; B 169 -61 764 810 ; -C -1 ; W0X 1000 ; N 1299 ; B 175 -96 763 833 ; -C -1 ; W0X 1000 ; N 1300 ; B 139 -79 769 853 ; -C -1 ; W0X 1000 ; N 1301 ; B 136 -86 828 851 ; -C -1 ; W0X 1000 ; N 1302 ; B 156 -104 763 863 ; -C -1 ; W0X 1000 ; N 1303 ; B 150 -60 809 820 ; -C -1 ; W0X 1000 ; N 1304 ; B 116 96 886 691 ; -C -1 ; W0X 1000 ; N 1305 ; B 138 -59 866 800 ; -C -1 ; W0X 1000 ; N 1306 ; B 111 -54 862 777 ; -C -1 ; W0X 1000 ; N 1307 ; B 133 -91 879 836 ; -C -1 ; W0X 1000 ; N 1308 ; B 160 -80 860 818 ; -C -1 ; W0X 1000 ; N 1309 ; B 137 -90 874 801 ; -C -1 ; W0X 1000 ; N 1310 ; B 136 -79 823 833 ; -C -1 ; W0X 1000 ; N 1311 ; B 159 -56 861 810 ; -C -1 ; W0X 1000 ; N 1312 ; B 151 -64 857 818 ; -C -1 ; W0X 1000 ; N 1313 ; B 159 -77 852 807 ; -C -1 ; W0X 1000 ; N 1314 ; B 173 -58 868 820 ; -C -1 ; W0X 1000 ; N 1315 ; B 115 -66 893 825 ; -C -1 ; W0X 1000 ; N 1316 ; B 145 -76 928 849 ; -C -1 ; W0X 1000 ; N 1317 ; B 146 -89 913 858 ; -C -1 ; W0X 1000 ; N 1318 ; B 70 -73 937 840 ; -C -1 ; W0X 1000 ; N 1319 ; B 128 -97 918 844 ; -C -1 ; W0X 1000 ; N 1320 ; B 162 -61 809 835 ; -C -1 ; W0X 1000 ; N 1321 ; B 203 -75 809 841 ; -C -1 ; W0X 1000 ; N 1322 ; B 186 -93 809 857 ; -C -1 ; W0X 1000 ; N 1323 ; B 143 -87 763 848 ; -C -1 ; W0X 1000 ; N 1324 ; B 174 -64 763 830 ; -C -1 ; W0X 1000 ; N 1325 ; B 203 -90 763 864 ; -C -1 ; W0X 1000 ; N 1326 ; B 182 -86 763 860 ; -C -1 ; W0X 1000 ; N 1327 ; B 182 -103 763 859 ; -C -1 ; W0X 1000 ; N 1328 ; B 168 -101 764 857 ; -C -1 ; W0X 1000 ; N 1329 ; B 138 57 915 713 ; -C -1 ; W0X 1000 ; N 1330 ; B 127 -70 829 815 ; -C -1 ; W0X 1000 ; N 1331 ; B 145 -55 811 848 ; -C -1 ; W0X 1000 ; N 1332 ; B 111 -68 775 828 ; -C -1 ; W0X 1000 ; N 1333 ; B 134 -109 779 840 ; -C -1 ; W0X 1000 ; N 1334 ; B 127 -98 803 853 ; -C -1 ; W0X 1000 ; N 1335 ; B 129 -99 794 839 ; -C -1 ; W0X 1000 ; N 1336 ; B 152 -95 830 855 ; -C -1 ; W0X 1000 ; N 1337 ; B 174 -60 855 819 ; -C -1 ; W0X 1000 ; N 1338 ; B 153 -83 803 851 ; -C -1 ; W0X 1000 ; N 1339 ; B 159 -82 844 825 ; -C -1 ; W0X 1000 ; N 1340 ; B 140 -74 763 854 ; -C -1 ; W0X 1000 ; N 1341 ; B 223 -92 806 858 ; -C -1 ; W0X 1000 ; N 1342 ; B 130 -93 811 837 ; -C -1 ; W0X 1000 ; N 1343 ; B 160 -103 763 853 ; -C -1 ; W0X 1000 ; N 1344 ; B 158 -72 809 848 ; -C -1 ; W0X 1000 ; N 1345 ; B 169 -104 809 855 ; -C -1 ; W0X 1000 ; N 1346 ; B 180 -94 809 839 ; -C -1 ; W0X 1000 ; N 1347 ; B 195 -94 809 852 ; -C -1 ; W0X 1000 ; N 1348 ; B 207 -87 809 850 ; -C -1 ; W0X 1000 ; N 1349 ; B 195 -99 809 857 ; -C -1 ; W0X 1000 ; N 1350 ; B 130 -70 853 823 ; -C -1 ; W0X 1000 ; N 1351 ; B 146 -85 763 847 ; -C -1 ; W0X 1000 ; N 1352 ; B 148 -76 763 833 ; -C -1 ; W0X 1000 ; N 1353 ; B 205 -85 763 861 ; -C -1 ; W0X 1000 ; N 1354 ; B 197 -79 763 864 ; -C -1 ; W0X 1000 ; N 1355 ; B 215 -89 763 863 ; -C -1 ; W0X 1000 ; N 1356 ; B 179 -51 811 826 ; -C -1 ; W0X 1000 ; N 1357 ; B 138 84 945 674 ; -C -1 ; W0X 1000 ; N 1358 ; B 111 -61 870 813 ; -C -1 ; W0X 1000 ; N 1359 ; B 107 -51 869 800 ; -C -1 ; W0X 1000 ; N 1360 ; B 117 -88 870 832 ; -C -1 ; W0X 1000 ; N 1361 ; B 146 -90 866 831 ; -C -1 ; W0X 1000 ; N 1362 ; B 146 -75 864 828 ; -C -1 ; W0X 1000 ; N 1363 ; B 121 -78 846 827 ; -C -1 ; W0X 1000 ; N 1364 ; B 158 -72 829 814 ; -C -1 ; W0X 1000 ; N 1365 ; B 129 -91 849 824 ; -C -1 ; W0X 1000 ; N 1366 ; B 157 -73 866 805 ; -C -1 ; W0X 1000 ; N 1367 ; B 145 -74 861 811 ; -C -1 ; W0X 1000 ; N 1368 ; B 136 -94 872 840 ; -C -1 ; W0X 1000 ; N 1369 ; B 130 -70 763 849 ; -C -1 ; W0X 1000 ; N 1370 ; B 169 -75 763 832 ; -C -1 ; W0X 1000 ; N 1371 ; B 163 -70 763 837 ; -C -1 ; W0X 1000 ; N 1372 ; B 182 -98 763 834 ; -C -1 ; W0X 1000 ; N 1373 ; B 201 -104 763 828 ; -C -1 ; W0X 1000 ; N 1374 ; B 206 -104 763 839 ; -C -1 ; W0X 1000 ; N 1375 ; B 147 -66 771 826 ; -C -1 ; W0X 1000 ; N 1376 ; B 177 -84 763 840 ; -C -1 ; W0X 1000 ; N 1377 ; B 99 -54 918 834 ; -C -1 ; W0X 1000 ; N 1378 ; B 155 -55 938 831 ; -C -1 ; W0X 1000 ; N 1379 ; B 143 -69 930 844 ; -C -1 ; W0X 1000 ; N 1380 ; B 158 -42 933 818 ; -C -1 ; W0X 1000 ; N 1381 ; B 172 -76 926 830 ; -C -1 ; W0X 1000 ; N 1382 ; B 165 -94 932 839 ; -C -1 ; W0X 1000 ; N 1383 ; B 164 -87 932 843 ; -C -1 ; W0X 1000 ; N 1384 ; B 163 -86 926 829 ; -C -1 ; W0X 1000 ; N 1385 ; B 138 -92 930 835 ; -C -1 ; W0X 1000 ; N 1386 ; B 146 -104 924 847 ; -C -1 ; W0X 1000 ; N 1387 ; B 130 -58 927 827 ; -C -1 ; W0X 1000 ; N 1388 ; B 68 -88 933 809 ; -C -1 ; W0X 1000 ; N 1389 ; B 136 -79 952 838 ; -C -1 ; W0X 1000 ; N 1390 ; B 139 -59 922 823 ; -C -1 ; W0X 1000 ; N 1391 ; B 132 -92 932 846 ; -C -1 ; W0X 1000 ; N 1392 ; B 141 -89 938 839 ; -C -1 ; W0X 1000 ; N 1393 ; B 160 -98 940 840 ; -C -1 ; W0X 1000 ; N 1394 ; B 176 -71 810 832 ; -C -1 ; W0X 1000 ; N 1395 ; B 215 -76 809 829 ; -C -1 ; W0X 1000 ; N 1396 ; B 214 -63 809 832 ; -C -1 ; W0X 1000 ; N 1397 ; B 217 -104 809 844 ; -C -1 ; W0X 1000 ; N 1398 ; B 222 -107 809 837 ; -C -1 ; W0X 1000 ; N 1399 ; B 205 -92 809 866 ; -C -1 ; W0X 1000 ; N 1400 ; B 180 -86 853 857 ; -C -1 ; W0X 1000 ; N 1401 ; B 175 -83 874 845 ; -C -1 ; W0X 1000 ; N 1402 ; B 217 -78 809 844 ; -C -1 ; W0X 1000 ; N 1403 ; B 113 -86 916 828 ; -C -1 ; W0X 1000 ; N 1404 ; B 155 -90 938 826 ; -C -1 ; W0X 1000 ; N 1405 ; B 135 -51 929 808 ; -C -1 ; W0X 1000 ; N 1406 ; B 141 -88 945 844 ; -C -1 ; W0X 1000 ; N 1407 ; B 163 -93 949 830 ; -C -1 ; W0X 1000 ; N 1408 ; B 151 -63 944 836 ; -C -1 ; W0X 1000 ; N 1409 ; B 163 -69 764 824 ; -C -1 ; W0X 1000 ; N 1410 ; B 120 -96 708 841 ; -C -1 ; W0X 1000 ; N 1411 ; B 150 -81 826 840 ; -C -1 ; W0X 1000 ; N 1412 ; B 166 -69 763 816 ; -C -1 ; W0X 1000 ; N 1413 ; B 195 -92 763 857 ; -C -1 ; W0X 1000 ; N 1414 ; B 182 -83 763 832 ; -C -1 ; W0X 1000 ; N 1415 ; B 201 -87 763 845 ; -C -1 ; W0X 1000 ; N 1416 ; B 196 -97 763 851 ; -C -1 ; W0X 1000 ; N 1417 ; B 211 -83 763 855 ; -C -1 ; W0X 1000 ; N 1418 ; B 154 -87 791 829 ; -C -1 ; W0X 1000 ; N 1419 ; B 106 -106 809 855 ; -C -1 ; W0X 1000 ; N 1420 ; B 173 -85 763 853 ; -C -1 ; W0X 1000 ; N 1421 ; B 167 -109 763 861 ; -C -1 ; W0X 1000 ; N 1422 ; B 144 -87 809 847 ; -C -1 ; W0X 1000 ; N 1423 ; B 194 -86 813 851 ; -C -1 ; W0X 1000 ; N 1424 ; B 195 -52 809 823 ; -C -1 ; W0X 1000 ; N 1425 ; B 208 -96 809 852 ; -C -1 ; W0X 1000 ; N 1426 ; B 205 -109 809 852 ; -C -1 ; W0X 1000 ; N 1427 ; B 212 -104 809 860 ; -C -1 ; W0X 1000 ; N 1428 ; B 184 -81 828 834 ; -C -1 ; W0X 1000 ; N 1429 ; B 149 -90 854 845 ; -C -1 ; W0X 1000 ; N 1430 ; B 204 -111 809 855 ; -C -1 ; W0X 1000 ; N 1431 ; B 146 -60 764 832 ; -C -1 ; W0X 1000 ; N 1432 ; B 175 -100 763 840 ; -C -1 ; W0X 1000 ; N 1433 ; B 204 -70 764 816 ; -C -1 ; W0X 1000 ; N 1434 ; B 190 -99 764 858 ; -C -1 ; W0X 1000 ; N 1435 ; B 202 -99 763 838 ; -C -1 ; W0X 1000 ; N 1436 ; B 210 -106 764 863 ; -C -1 ; W0X 1000 ; N 1437 ; B 115 -99 815 844 ; -C -1 ; W0X 1000 ; N 1438 ; B 177 -89 763 840 ; -C -1 ; W0X 1000 ; N 1439 ; B 162 -106 763 846 ; -C -1 ; W0X 1000 ; N 1440 ; B 158 -86 808 847 ; -C -1 ; W0X 1000 ; N 1441 ; B 200 -78 809 844 ; -C -1 ; W0X 1000 ; N 1442 ; B 126 70 891 655 ; -C -1 ; W0X 1000 ; N 1443 ; B 121 -90 844 766 ; -C -1 ; W0X 1000 ; N 1444 ; B 102 -68 850 780 ; -C -1 ; W0X 1000 ; N 1445 ; B 131 -58 838 826 ; -C -1 ; W0X 1000 ; N 1446 ; B 137 -60 857 813 ; -C -1 ; W0X 1000 ; N 1447 ; B 137 -82 854 809 ; -C -1 ; W0X 1000 ; N 1448 ; B 131 -96 848 819 ; -C -1 ; W0X 1000 ; N 1449 ; B 119 -71 866 804 ; -C -1 ; W0X 1000 ; N 1450 ; B 135 -84 865 828 ; -C -1 ; W0X 1000 ; N 1451 ; B 134 -90 859 793 ; -C -1 ; W0X 1000 ; N 1452 ; B 132 -93 861 845 ; -C -1 ; W0X 1000 ; N 1453 ; B 103 -62 915 842 ; -C -1 ; W0X 1000 ; N 1454 ; B 151 -46 918 815 ; -C -1 ; W0X 1000 ; N 1455 ; B 152 -93 908 863 ; -C -1 ; W0X 1000 ; N 1456 ; B 94 -75 905 819 ; -C -1 ; W0X 1000 ; N 1457 ; B 154 -87 764 859 ; -C -1 ; W0X 1000 ; N 1458 ; B 187 -73 763 839 ; -C -1 ; W0X 1000 ; N 1459 ; B 194 -109 763 847 ; -C -1 ; W0X 1000 ; N 1460 ; B 199 -111 763 847 ; -C -1 ; W0X 1000 ; N 1461 ; B 219 -102 763 868 ; -C -1 ; W0X 1000 ; N 1462 ; B 174 -84 786 842 ; -C -1 ; W0X 1000 ; N 1463 ; B 128 75 846 726 ; -C -1 ; W0X 1000 ; N 1464 ; B 88 -85 795 810 ; -C -1 ; W0X 1000 ; N 1465 ; B 113 -64 813 812 ; -C -1 ; W0X 1000 ; N 1466 ; B 161 -99 847 819 ; -C -1 ; W0X 1000 ; N 1467 ; B 157 -91 852 842 ; -C -1 ; W0X 1000 ; N 1468 ; B 136 -64 847 828 ; -C -1 ; W0X 1000 ; N 1469 ; B 159 -70 832 823 ; -C -1 ; W0X 1000 ; N 1470 ; B 140 -37 768 797 ; -C -1 ; W0X 1000 ; N 1471 ; B 165 -76 789 821 ; -C -1 ; W0X 1000 ; N 1472 ; B 154 -62 809 824 ; -C -1 ; W0X 1000 ; N 1473 ; B 150 -79 797 821 ; -C -1 ; W0X 1000 ; N 1474 ; B 183 -98 799 832 ; -C -1 ; W0X 1000 ; N 1475 ; B 168 -92 810 825 ; -C -1 ; W0X 1000 ; N 1476 ; B 156 -95 773 833 ; -C -1 ; W0X 1000 ; N 1477 ; B 141 -50 846 820 ; -C -1 ; W0X 1000 ; N 1478 ; B 160 -86 811 828 ; -C -1 ; W0X 1000 ; N 1479 ; B 202 -79 775 831 ; -C -1 ; W0X 1000 ; N 1480 ; B 156 -73 847 820 ; -C -1 ; W0X 1000 ; N 1481 ; B 186 -106 820 866 ; -C -1 ; W0X 1000 ; N 1482 ; B 166 -81 774 846 ; -C -1 ; W0X 1000 ; N 1483 ; B 192 -82 773 835 ; -C -1 ; W0X 1000 ; N 1484 ; B 200 -103 773 861 ; -C -1 ; W0X 1000 ; N 1485 ; B 200 -97 774 851 ; -C -1 ; W0X 1000 ; N 1486 ; B 213 -107 774 870 ; -C -1 ; W0X 1000 ; N 1487 ; B 132 -84 800 826 ; -C -1 ; W0X 1000 ; N 1488 ; B 166 -67 841 827 ; -C -1 ; W0X 1000 ; N 1489 ; B 154 -93 813 849 ; -C -1 ; W0X 1000 ; N 1490 ; B 130 -102 796 839 ; -C -1 ; W0X 1000 ; N 1491 ; B 117 -101 775 858 ; -C -1 ; W0X 1000 ; N 1492 ; B 159 -90 826 840 ; -C -1 ; W0X 1000 ; N 1493 ; B 120 141 910 729 ; -C -1 ; W0X 1000 ; N 1494 ; B 133 -76 864 809 ; -C -1 ; W0X 1000 ; N 1495 ; B 111 -31 866 757 ; -C -1 ; W0X 1000 ; N 1496 ; B 179 -83 868 803 ; -C -1 ; W0X 1000 ; N 1497 ; B 153 -70 852 812 ; -C -1 ; W0X 1000 ; N 1498 ; B 153 -68 854 812 ; -C -1 ; W0X 1000 ; N 1499 ; B 161 -68 862 797 ; -C -1 ; W0X 1000 ; N 1500 ; B 137 -77 839 808 ; -C -1 ; W0X 1000 ; N 1501 ; B 160 -38 868 793 ; -C -1 ; W0X 1000 ; N 1502 ; B 139 -60 856 812 ; -C -1 ; W0X 1000 ; N 1503 ; B 141 -57 869 818 ; -C -1 ; W0X 1000 ; N 1504 ; B 153 -84 868 812 ; -C -1 ; W0X 1000 ; N 1505 ; B 171 -74 773 834 ; -C -1 ; W0X 1000 ; N 1506 ; B 179 -78 775 832 ; -C -1 ; W0X 1000 ; N 1507 ; B 216 -101 774 856 ; -C -1 ; W0X 1000 ; N 1508 ; B 172 -46 763 809 ; -C -1 ; W0X 1000 ; N 1509 ; B 207 -76 774 849 ; -C -1 ; W0X 1000 ; N 1510 ; B 160 -75 774 829 ; -C -1 ; W0X 1000 ; N 1511 ; B 177 -97 774 839 ; -C -1 ; W0X 1000 ; N 1512 ; B 176 -97 784 831 ; -C -1 ; W0X 1000 ; N 1513 ; B 186 -77 773 853 ; -C -1 ; W0X 1000 ; N 1514 ; B 176 -100 773 856 ; -C -1 ; W0X 1000 ; N 1515 ; B 189 -63 802 847 ; -C -1 ; W0X 1000 ; N 1516 ; B 176 -86 774 832 ; -C -1 ; W0X 1000 ; N 1517 ; B 224 -69 793 846 ; -C -1 ; W0X 1000 ; N 1518 ; B 130 -82 910 824 ; -C -1 ; W0X 1000 ; N 1519 ; B 147 -81 924 839 ; -C -1 ; W0X 1000 ; N 1520 ; B 158 -80 929 845 ; -C -1 ; W0X 1000 ; N 1521 ; B 118 -51 920 827 ; -C -1 ; W0X 1000 ; N 1522 ; B 128 -99 932 831 ; -C -1 ; W0X 1000 ; N 1523 ; B 153 -108 920 854 ; -C -1 ; W0X 1000 ; N 1524 ; B 138 -96 935 838 ; -C -1 ; W0X 1000 ; N 1525 ; B 138 -100 935 838 ; -C -1 ; W0X 1000 ; N 1526 ; B 92 -108 941 846 ; -C -1 ; W0X 1000 ; N 1527 ; B 92 -92 940 846 ; -C -1 ; W0X 1000 ; N 1528 ; B 155 -80 928 842 ; -C -1 ; W0X 1000 ; N 1529 ; B 159 -111 940 840 ; -C -1 ; W0X 1000 ; N 1530 ; B 144 -87 928 830 ; -C -1 ; W0X 1000 ; N 1531 ; B 110 -99 919 835 ; -C -1 ; W0X 1000 ; N 1532 ; B 131 -85 951 846 ; -C -1 ; W0X 1000 ; N 1533 ; B 164 -84 927 841 ; -C -1 ; W0X 1000 ; N 1534 ; B 161 -94 931 835 ; -C -1 ; W0X 1000 ; N 1535 ; B 138 -108 925 853 ; -C -1 ; W0X 1000 ; N 1536 ; B 147 -94 809 840 ; -C -1 ; W0X 1000 ; N 1537 ; B 172 -91 820 830 ; -C -1 ; W0X 1000 ; N 1538 ; B 196 -81 820 832 ; -C -1 ; W0X 1000 ; N 1539 ; B 217 -108 820 861 ; -C -1 ; W0X 1000 ; N 1540 ; B 202 -106 826 848 ; -C -1 ; W0X 1000 ; N 1541 ; B 209 -111 821 867 ; -C -1 ; W0X 1000 ; N 1542 ; B 176 -91 860 856 ; -C -1 ; W0X 1000 ; N 1543 ; B 181 -81 905 830 ; -C -1 ; W0X 1000 ; N 1544 ; B 174 -99 820 854 ; -C -1 ; W0X 1000 ; N 1545 ; B 127 -89 922 849 ; -C -1 ; W0X 1000 ; N 1546 ; B 191 -84 821 840 ; -C -1 ; W0X 1000 ; N 1547 ; B 180 -105 778 845 ; -C -1 ; W0X 1000 ; N 1548 ; B 181 -91 775 860 ; -C -1 ; W0X 1000 ; N 1549 ; B 166 -86 775 829 ; -C -1 ; W0X 1000 ; N 1550 ; B 171 -100 774 825 ; -C -1 ; W0X 1000 ; N 1551 ; B 185 -94 775 842 ; -C -1 ; W0X 1000 ; N 1552 ; B 174 -90 775 840 ; -C -1 ; W0X 1000 ; N 1553 ; B 176 -95 783 840 ; -C -1 ; W0X 1000 ; N 1554 ; B 161 -93 775 845 ; -C -1 ; W0X 1000 ; N 1555 ; B 177 -110 774 851 ; -C -1 ; W0X 1000 ; N 1556 ; B 165 -98 811 842 ; -C -1 ; W0X 1000 ; N 1557 ; B 159 -104 773 848 ; -C -1 ; W0X 1000 ; N 1558 ; B 177 -106 815 846 ; -C -1 ; W0X 1000 ; N 1559 ; B 186 -92 810 836 ; -C -1 ; W0X 1000 ; N 1560 ; B 145 -85 809 842 ; -C -1 ; W0X 1000 ; N 1561 ; B 188 -94 818 862 ; -C -1 ; W0X 1000 ; N 1562 ; B 176 -97 820 833 ; -C -1 ; W0X 1000 ; N 1563 ; B 195 -95 819 855 ; -C -1 ; W0X 1000 ; N 1564 ; B 211 -98 824 842 ; -C -1 ; W0X 1000 ; N 1565 ; B 214 -97 823 858 ; -C -1 ; W0X 1000 ; N 1566 ; B 198 -79 839 837 ; -C -1 ; W0X 1000 ; N 1567 ; B 174 -80 883 840 ; -C -1 ; W0X 1000 ; N 1568 ; B 183 -95 819 857 ; -C -1 ; W0X 1000 ; N 1569 ; B 139 -72 777 853 ; -C -1 ; W0X 1000 ; N 1570 ; B 177 -58 774 830 ; -C -1 ; W0X 1000 ; N 1571 ; B 196 -95 775 854 ; -C -1 ; W0X 1000 ; N 1572 ; B 170 -84 838 825 ; -C -1 ; W0X 1000 ; N 1573 ; B 191 -90 774 845 ; -C -1 ; W0X 1000 ; N 1574 ; B 158 -79 823 845 ; -C -1 ; W0X 1000 ; N 1575 ; B 175 -80 820 840 ; -C -1 ; W0X 1000 ; N 1576 ; B 98 27 886 718 ; -C -1 ; W0X 1000 ; N 1577 ; B 140 -81 835 826 ; -C -1 ; W0X 1000 ; N 1578 ; B 118 -36 861 818 ; -C -1 ; W0X 1000 ; N 1579 ; B 138 -62 800 823 ; -C -1 ; W0X 1000 ; N 1580 ; B 149 -91 820 845 ; -C -1 ; W0X 1000 ; N 1581 ; B 133 -64 830 829 ; -C -1 ; W0X 1000 ; N 1582 ; B 155 -82 826 845 ; -C -1 ; W0X 1000 ; N 1583 ; B 123 -88 803 857 ; -C -1 ; W0X 1000 ; N 1584 ; B 158 -118 847 863 ; -C -1 ; W0X 1000 ; N 1585 ; B 160 -58 870 831 ; -C -1 ; W0X 1000 ; N 1586 ; B 132 -86 857 866 ; -C -1 ; W0X 1000 ; N 1587 ; B 188 -98 880 832 ; -C -1 ; W0X 1000 ; N 1588 ; B 159 -104 846 839 ; -C -1 ; W0X 1000 ; N 1589 ; B 136 -86 892 846 ; -C -1 ; W0X 1000 ; N 1590 ; B 163 -54 950 864 ; -C -1 ; W0X 1000 ; N 1591 ; B 149 -116 917 845 ; -C -1 ; W0X 1000 ; N 1592 ; B 184 -111 822 850 ; -C -1 ; W0X 1000 ; N 1593 ; B 199 -73 886 864 ; -C -1 ; W0X 1000 ; N 1594 ; B 147 -92 763 833 ; -C -1 ; W0X 1000 ; N 1595 ; B 171 -79 763 818 ; -C -1 ; W0X 1000 ; N 1596 ; B 223 -78 774 876 ; -C -1 ; W0X 1000 ; N 1597 ; B 240 -80 774 870 ; -C -1 ; W0X 1000 ; N 1598 ; B 230 -72 774 874 ; -C -1 ; W0X 1000 ; N 1599 ; B 204 -74 800 850 ; -C -1 ; W0X 1000 ; N 1600 ; B 131 -22 885 720 ; -C -1 ; W0X 1000 ; N 1601 ; B 144 -91 816 824 ; -C -1 ; W0X 1000 ; N 1602 ; B 133 -111 769 846 ; -C -1 ; W0X 1000 ; N 1603 ; B 132 -77 757 855 ; -C -1 ; W0X 1000 ; N 1604 ; B 145 -86 764 857 ; -C -1 ; W0X 1000 ; N 1605 ; B 138 -92 742 859 ; -C -1 ; W0X 1000 ; N 1606 ; B 165 -96 763 857 ; -C -1 ; W0X 1000 ; N 1607 ; B 148 -67 824 845 ; -C -1 ; W0X 1000 ; N 1608 ; B 127 -64 737 870 ; -C -1 ; W0X 1000 ; N 1609 ; B 184 -80 774 857 ; -C -1 ; W0X 1000 ; N 1610 ; B 150 -108 835 838 ; -C -1 ; W0X 1000 ; N 1611 ; B 179 -96 820 839 ; -C -1 ; W0X 1000 ; N 1612 ; B 232 -85 820 848 ; -C -1 ; W0X 1000 ; N 1613 ; B 174 -97 774 838 ; -C -1 ; W0X 1000 ; N 1614 ; B 171 -79 774 838 ; -C -1 ; W0X 1000 ; N 1615 ; B 206 -100 774 855 ; -C -1 ; W0X 1000 ; N 1616 ; B 223 -93 775 865 ; -C -1 ; W0X 1000 ; N 1617 ; B 220 -90 799 851 ; -C -1 ; W0X 1000 ; N 1618 ; B 216 -121 774 851 ; -C -1 ; W0X 1000 ; N 1619 ; B 132 -69 769 859 ; -C -1 ; W0X 1000 ; N 1620 ; B 165 -74 803 862 ; -C -1 ; W0X 1000 ; N 1621 ; B 131 -112 762 873 ; -C -1 ; W0X 1000 ; N 1622 ; B 137 -116 758 859 ; -C -1 ; W0X 1000 ; N 1623 ; B 112 -109 754 848 ; -C -1 ; W0X 1000 ; N 1624 ; B 117 35 940 696 ; -C -1 ; W0X 1000 ; N 1625 ; B 118 -91 891 825 ; -C -1 ; W0X 1000 ; N 1626 ; B 110 -53 843 843 ; -C -1 ; W0X 1000 ; N 1627 ; B 120 -72 859 843 ; -C -1 ; W0X 1000 ; N 1628 ; B 149 -81 858 857 ; -C -1 ; W0X 1000 ; N 1629 ; B 108 -88 850 860 ; -C -1 ; W0X 1000 ; N 1630 ; B 76 -90 810 871 ; -C -1 ; W0X 1000 ; N 1631 ; B 128 -104 834 849 ; -C -1 ; W0X 1000 ; N 1632 ; B 160 -80 848 821 ; -C -1 ; W0X 1000 ; N 1633 ; B 127 -96 888 818 ; -C -1 ; W0X 1000 ; N 1634 ; B 230 -61 776 824 ; -C -1 ; W0X 1000 ; N 1635 ; B 162 -85 763 839 ; -C -1 ; W0X 1000 ; N 1636 ; B 191 -80 773 841 ; -C -1 ; W0X 1000 ; N 1637 ; B 189 -96 774 815 ; -C -1 ; W0X 1000 ; N 1638 ; B 205 -72 774 868 ; -C -1 ; W0X 1000 ; N 1639 ; B 175 -85 774 871 ; -C -1 ; W0X 1000 ; N 1640 ; B 208 -80 776 859 ; -C -1 ; W0X 1000 ; N 1641 ; B 202 -114 774 860 ; -C -1 ; W0X 1000 ; N 1642 ; B 208 -68 795 830 ; -C -1 ; W0X 1000 ; N 1643 ; B 157 -81 851 844 ; -C -1 ; W0X 1000 ; N 1644 ; B 191 -79 774 853 ; -C -1 ; W0X 1000 ; N 1645 ; B 201 -81 821 848 ; -C -1 ; W0X 1000 ; N 1646 ; B 61 -90 947 834 ; -C -1 ; W0X 1000 ; N 1647 ; B 80 -67 931 846 ; -C -1 ; W0X 1000 ; N 1648 ; B 88 -53 944 832 ; -C -1 ; W0X 1000 ; N 1649 ; B 117 -84 920 847 ; -C -1 ; W0X 1000 ; N 1650 ; B 83 -99 936 854 ; -C -1 ; W0X 1000 ; N 1651 ; B 99 -98 921 858 ; -C -1 ; W0X 1000 ; N 1652 ; B 76 -83 924 846 ; -C -1 ; W0X 1000 ; N 1653 ; B 100 -89 927 860 ; -C -1 ; W0X 1000 ; N 1654 ; B 100 -90 946 853 ; -C -1 ; W0X 1000 ; N 1655 ; B 97 -95 944 851 ; -C -1 ; W0X 1000 ; N 1656 ; B 82 -92 809 847 ; -C -1 ; W0X 1000 ; N 1657 ; B 147 -87 822 862 ; -C -1 ; W0X 1000 ; N 1658 ; B 127 -94 820 863 ; -C -1 ; W0X 1000 ; N 1659 ; B 151 -109 820 864 ; -C -1 ; W0X 1000 ; N 1660 ; B 169 -107 820 863 ; -C -1 ; W0X 1000 ; N 1661 ; B 151 -104 820 870 ; -C -1 ; W0X 1000 ; N 1662 ; B 144 -91 820 859 ; -C -1 ; W0X 1000 ; N 1663 ; B 138 -91 881 853 ; -C -1 ; W0X 1000 ; N 1664 ; B 161 -81 820 855 ; -C -1 ; W0X 1000 ; N 1665 ; B 74 -72 773 841 ; -C -1 ; W0X 1000 ; N 1666 ; B 118 -86 773 859 ; -C -1 ; W0X 1000 ; N 1667 ; B 107 -78 773 838 ; -C -1 ; W0X 1000 ; N 1668 ; B 132 -115 773 867 ; -C -1 ; W0X 1000 ; N 1669 ; B 110 -94 774 862 ; -C -1 ; W0X 1000 ; N 1670 ; B 143 -75 774 852 ; -C -1 ; W0X 1000 ; N 1671 ; B 146 -101 775 859 ; -C -1 ; W0X 1000 ; N 1672 ; B 137 -87 773 871 ; -C -1 ; W0X 1000 ; N 1673 ; B 116 -69 798 841 ; -C -1 ; W0X 1000 ; N 1674 ; B 153 -72 849 838 ; -C -1 ; W0X 1000 ; N 1675 ; B 152 -82 773 859 ; -C -1 ; W0X 1000 ; N 1676 ; B 198 -91 774 843 ; -C -1 ; W0X 1000 ; N 1677 ; B 105 -87 819 823 ; -C -1 ; W0X 1000 ; N 1678 ; B 153 -74 818 841 ; -C -1 ; W0X 1000 ; N 1679 ; B 155 -74 819 835 ; -C -1 ; W0X 1000 ; N 1680 ; B 204 -100 819 839 ; -C -1 ; W0X 1000 ; N 1681 ; B 173 -92 820 860 ; -C -1 ; W0X 1000 ; N 1682 ; B 159 -107 822 869 ; -C -1 ; W0X 1000 ; N 1683 ; B 161 -89 823 853 ; -C -1 ; W0X 1000 ; N 1684 ; B 157 -93 865 850 ; -C -1 ; W0X 1000 ; N 1685 ; B 176 -99 819 865 ; -C -1 ; W0X 1000 ; N 1686 ; B 113 -74 775 843 ; -C -1 ; W0X 1000 ; N 1687 ; B 137 -73 846 833 ; -C -1 ; W0X 1000 ; N 1688 ; B 139 76 896 731 ; -C -1 ; W0X 1000 ; N 1689 ; B 154 -64 859 816 ; -C -1 ; W0X 1000 ; N 1690 ; B 127 -57 859 817 ; -C -1 ; W0X 1000 ; N 1691 ; B 133 -96 823 832 ; -C -1 ; W0X 1000 ; N 1692 ; B 156 -88 849 816 ; -C -1 ; W0X 1000 ; N 1693 ; B 114 -91 901 846 ; -C -1 ; W0X 1000 ; N 1694 ; B 137 -74 911 859 ; -C -1 ; W0X 1000 ; N 1695 ; B 182 -61 819 857 ; -C -1 ; W0X 1000 ; N 1696 ; B 160 -70 774 851 ; -C -1 ; W0X 1000 ; N 1697 ; B 187 -40 773 853 ; -C -1 ; W0X 1000 ; N 1698 ; B 151 -45 805 814 ; -C -1 ; W0X 1000 ; N 1699 ; B 186 -81 809 830 ; -C -1 ; W0X 1000 ; N 1700 ; B 182 -95 804 795 ; -C -1 ; W0X 1000 ; N 1701 ; B 185 -112 788 839 ; -C -1 ; W0X 1000 ; N 1702 ; B 141 -82 790 851 ; -C -1 ; W0X 1000 ; N 1703 ; B 146 -103 789 823 ; -C -1 ; W0X 1000 ; N 1704 ; B 141 -84 784 841 ; -C -1 ; W0X 1000 ; N 1705 ; B 133 -109 818 839 ; -C -1 ; W0X 1000 ; N 1706 ; B 138 -91 773 834 ; -C -1 ; W0X 1000 ; N 1707 ; B 162 -90 776 832 ; -C -1 ; W0X 1000 ; N 1708 ; B 207 -105 774 863 ; -C -1 ; W0X 1000 ; N 1709 ; B 186 -97 773 849 ; -C -1 ; W0X 1000 ; N 1710 ; B 208 -92 774 848 ; -C -1 ; W0X 1000 ; N 1711 ; B 196 -104 772 857 ; -C -1 ; W0X 1000 ; N 1712 ; B 116 67 900 706 ; -C -1 ; W0X 1000 ; N 1713 ; B 90 -81 848 826 ; -C -1 ; W0X 1000 ; N 1714 ; B 151 -61 874 816 ; -C -1 ; W0X 1000 ; N 1715 ; B 137 -82 854 841 ; -C -1 ; W0X 1000 ; N 1716 ; B 146 -101 852 855 ; -C -1 ; W0X 1000 ; N 1717 ; B 109 -70 811 847 ; -C -1 ; W0X 1000 ; N 1718 ; B 138 -80 816 839 ; -C -1 ; W0X 1000 ; N 1719 ; B 124 -73 846 810 ; -C -1 ; W0X 1000 ; N 1720 ; B 133 -74 775 835 ; -C -1 ; W0X 1000 ; N 1721 ; B 155 -70 774 842 ; -C -1 ; W0X 1000 ; N 1722 ; B 176 -92 773 867 ; -C -1 ; W0X 1000 ; N 1723 ; B 207 -86 774 846 ; -C -1 ; W0X 1000 ; N 1724 ; B 212 -112 775 864 ; -C -1 ; W0X 1000 ; N 1725 ; B 104 -91 774 846 ; -C -1 ; W0X 1000 ; N 1726 ; B 140 -52 775 826 ; -C -1 ; W0X 1000 ; N 1727 ; B 184 -96 774 848 ; -C -1 ; W0X 1000 ; N 1728 ; B 151 -99 773 851 ; -C -1 ; W0X 1000 ; N 1729 ; B 155 -103 775 863 ; -C -1 ; W0X 1000 ; N 1730 ; B 143 -94 795 850 ; -C -1 ; W0X 1000 ; N 1731 ; B 142 -96 771 859 ; -C -1 ; W0X 1000 ; N 1732 ; B 150 -105 919 850 ; -C -1 ; W0X 1000 ; N 1733 ; B 191 -64 942 845 ; -C -1 ; W0X 1000 ; N 1734 ; B 176 -66 930 814 ; -C -1 ; W0X 1000 ; N 1735 ; B 195 -86 941 843 ; -C -1 ; W0X 1000 ; N 1736 ; B 186 -87 903 854 ; -C -1 ; W0X 1000 ; N 1737 ; B 201 -109 931 829 ; -C -1 ; W0X 1000 ; N 1738 ; B 139 -78 933 833 ; -C -1 ; W0X 1000 ; N 1739 ; B 105 -90 911 823 ; -C -1 ; W0X 1000 ; N 1740 ; B 190 -74 907 852 ; -C -1 ; W0X 1000 ; N 1741 ; B 203 -63 902 831 ; -C -1 ; W0X 1000 ; N 1742 ; B 211 -66 899 840 ; -C -1 ; W0X 1000 ; N 1743 ; B 215 -99 921 851 ; -C -1 ; W0X 1000 ; N 1744 ; B 176 -105 811 868 ; -C -1 ; W0X 1000 ; N 1745 ; B 255 -91 823 839 ; -C -1 ; W0X 1000 ; N 1746 ; B 229 -73 821 820 ; -C -1 ; W0X 1000 ; N 1747 ; B 249 -96 821 866 ; -C -1 ; W0X 1000 ; N 1748 ; B 249 -98 820 844 ; -C -1 ; W0X 1000 ; N 1749 ; B 247 -95 819 849 ; -C -1 ; W0X 1000 ; N 1750 ; B 241 -66 830 838 ; -C -1 ; W0X 1000 ; N 1751 ; B 199 -86 860 848 ; -C -1 ; W0X 1000 ; N 1752 ; B 237 -94 821 849 ; -C -1 ; W0X 1000 ; N 1753 ; B 179 -86 921 831 ; -C -1 ; W0X 1000 ; N 1754 ; B 203 -76 933 814 ; -C -1 ; W0X 1000 ; N 1755 ; B 188 -86 962 814 ; -C -1 ; W0X 1000 ; N 1756 ; B 163 -55 967 833 ; -C -1 ; W0X 1000 ; N 1757 ; B 205 -68 944 843 ; -C -1 ; W0X 1000 ; N 1758 ; B 168 -80 763 845 ; -C -1 ; W0X 1000 ; N 1759 ; B 221 -102 773 856 ; -C -1 ; W0X 1000 ; N 1760 ; B 227 -61 774 849 ; -C -1 ; W0X 1000 ; N 1761 ; B 225 -94 773 848 ; -C -1 ; W0X 1000 ; N 1762 ; B 249 -92 773 846 ; -C -1 ; W0X 1000 ; N 1763 ; B 243 -95 773 867 ; -C -1 ; W0X 1000 ; N 1764 ; B 201 -63 802 830 ; -C -1 ; W0X 1000 ; N 1765 ; B 145 -80 838 832 ; -C -1 ; W0X 1000 ; N 1766 ; B 247 -78 776 847 ; -C -1 ; W0X 1000 ; N 1767 ; B 245 -87 775 861 ; -C -1 ; W0X 1000 ; N 1768 ; B 166 -90 811 866 ; -C -1 ; W0X 1000 ; N 1769 ; B 236 -96 819 859 ; -C -1 ; W0X 1000 ; N 1770 ; B 264 -76 820 831 ; -C -1 ; W0X 1000 ; N 1771 ; B 250 -104 820 864 ; -C -1 ; W0X 1000 ; N 1772 ; B 254 -83 820 847 ; -C -1 ; W0X 1000 ; N 1773 ; B 270 -98 818 839 ; -C -1 ; W0X 1000 ; N 1774 ; B 255 -68 856 837 ; -C -1 ; W0X 1000 ; N 1775 ; B 264 -89 819 845 ; -C -1 ; W0X 1000 ; N 1776 ; B 158 -85 764 846 ; -C -1 ; W0X 1000 ; N 1777 ; B 192 -91 763 855 ; -C -1 ; W0X 1000 ; N 1778 ; B 201 -79 763 819 ; -C -1 ; W0X 1000 ; N 1779 ; B 230 -103 773 853 ; -C -1 ; W0X 1000 ; N 1780 ; B 228 -103 775 845 ; -C -1 ; W0X 1000 ; N 1781 ; B 248 -101 776 847 ; -C -1 ; W0X 1000 ; N 1782 ; B 203 -78 813 827 ; -C -1 ; W0X 1000 ; N 1783 ; B 130 -86 851 857 ; -C -1 ; W0X 1000 ; N 1784 ; B 234 -85 776 854 ; -C -1 ; W0X 1000 ; N 1785 ; B 195 -84 820 832 ; -C -1 ; W0X 1000 ; N 1786 ; B 233 -81 819 830 ; -C -1 ; W0X 1000 ; N 1787 ; B 257 -103 823 863 ; -C -1 ; W0X 1000 ; N 1788 ; B 223 -77 816 825 ; -C -1 ; W0X 1000 ; N 1789 ; B 146 49 863 719 ; -C -1 ; W0X 1000 ; N 1790 ; B 145 -79 826 836 ; -C -1 ; W0X 1000 ; N 1791 ; B 139 -39 801 825 ; -C -1 ; W0X 1000 ; N 1792 ; B 108 -96 793 856 ; -C -1 ; W0X 1000 ; N 1793 ; B 115 -97 783 846 ; -C -1 ; W0X 1000 ; N 1794 ; B 162 -105 811 831 ; -C -1 ; W0X 1000 ; N 1795 ; B 156 -82 823 822 ; -C -1 ; W0X 1000 ; N 1796 ; B 114 -91 789 837 ; -C -1 ; W0X 1000 ; N 1797 ; B 162 -62 911 843 ; -C -1 ; W0X 1000 ; N 1798 ; B 194 -61 926 835 ; -C -1 ; W0X 1000 ; N 1799 ; B 187 -94 939 861 ; -C -1 ; W0X 1000 ; N 1800 ; B 172 -80 879 848 ; -C -1 ; W0X 1000 ; N 1801 ; B 217 -76 773 854 ; -C -1 ; W0X 1000 ; N 1802 ; B 236 -79 775 844 ; -C -1 ; W0X 1000 ; N 1803 ; B 245 -109 775 859 ; -C -1 ; W0X 1000 ; N 1804 ; B 265 -91 774 850 ; -C -1 ; W0X 1000 ; N 1805 ; B 236 -102 775 864 ; -C -1 ; W0X 1000 ; N 1806 ; B 210 -69 778 851 ; -C -1 ; W0X 1000 ; N 1807 ; B 257 -86 775 861 ; -C -1 ; W0X 1000 ; N 1808 ; B 139 -29 845 727 ; -C -1 ; W0X 1000 ; N 1809 ; B 146 -98 823 830 ; -C -1 ; W0X 1000 ; N 1810 ; B 167 -95 799 859 ; -C -1 ; W0X 1000 ; N 1811 ; B 166 -109 807 872 ; -C -1 ; W0X 1000 ; N 1812 ; B 145 -80 803 853 ; -C -1 ; W0X 1000 ; N 1813 ; B 162 -105 786 857 ; -C -1 ; W0X 1000 ; N 1814 ; B 123 -74 743 825 ; -C -1 ; W0X 1000 ; N 1815 ; B 131 -105 731 840 ; -C -1 ; W0X 1000 ; N 1816 ; B 157 -95 777 845 ; -C -1 ; W0X 1000 ; N 1817 ; B 154 -109 758 868 ; -C -1 ; W0X 1000 ; N 1818 ; B 142 -107 761 857 ; -C -1 ; W0X 1000 ; N 1819 ; B 153 -108 766 866 ; -C -1 ; W0X 1000 ; N 1820 ; B 109 -81 796 848 ; -C -1 ; W0X 1000 ; N 1821 ; B 158 -92 761 852 ; -C -1 ; W0X 1000 ; N 1822 ; B 210 -80 774 854 ; -C -1 ; W0X 1000 ; N 1823 ; B 165 -70 824 849 ; -C -1 ; W0X 1000 ; N 1824 ; B 172 -96 819 845 ; -C -1 ; W0X 1000 ; N 1825 ; B 182 -99 774 845 ; -C -1 ; W0X 1000 ; N 1826 ; B 182 -97 774 863 ; -C -1 ; W0X 1000 ; N 1827 ; B 183 -99 774 848 ; -C -1 ; W0X 1000 ; N 1828 ; B 206 -106 775 862 ; -C -1 ; W0X 1000 ; N 1829 ; B 204 -99 774 855 ; -C -1 ; W0X 1000 ; N 1830 ; B 185 -111 790 854 ; -C -1 ; W0X 1000 ; N 1831 ; B 203 -97 774 866 ; -C -1 ; W0X 1000 ; N 1832 ; B 149 -85 791 840 ; -C -1 ; W0X 1000 ; N 1833 ; B 155 -95 768 858 ; -C -1 ; W0X 1000 ; N 1834 ; B 146 -92 780 860 ; -C -1 ; W0X 1000 ; N 1835 ; B 148 -114 777 872 ; -C -1 ; W0X 1000 ; N 1836 ; B 127 -99 743 863 ; -C -1 ; W0X 1000 ; N 1837 ; B 149 -104 753 869 ; -C -1 ; W0X 1000 ; N 1838 ; B 126 -87 829 838 ; -C -1 ; W0X 1000 ; N 1839 ; B 148 -100 777 869 ; -C -1 ; W0X 1000 ; N 1840 ; B 117 47 870 717 ; -C -1 ; W0X 1000 ; N 1841 ; B 121 -66 824 846 ; -C -1 ; W0X 1000 ; N 1842 ; B 144 -66 865 806 ; -C -1 ; W0X 1000 ; N 1843 ; B 154 -95 846 853 ; -C -1 ; W0X 1000 ; N 1844 ; B 131 -90 830 857 ; -C -1 ; W0X 1000 ; N 1845 ; B 132 -100 794 850 ; -C -1 ; W0X 1000 ; N 1846 ; B 133 -79 815 830 ; -C -1 ; W0X 1000 ; N 1847 ; B 155 -80 843 840 ; -C -1 ; W0X 1000 ; N 1848 ; B 115 -87 821 840 ; -C -1 ; W0X 1000 ; N 1849 ; B 152 -92 808 859 ; -C -1 ; W0X 1000 ; N 1850 ; B 115 -79 831 839 ; -C -1 ; W0X 1000 ; N 1851 ; B 181 -85 763 841 ; -C -1 ; W0X 1000 ; N 1852 ; B 241 -86 763 856 ; -C -1 ; W0X 1000 ; N 1853 ; B 206 -87 763 833 ; -C -1 ; W0X 1000 ; N 1854 ; B 249 -87 763 849 ; -C -1 ; W0X 1000 ; N 1855 ; B 241 -86 763 846 ; -C -1 ; W0X 1000 ; N 1856 ; B 217 -105 763 871 ; -C -1 ; W0X 1000 ; N 1857 ; B 207 -84 805 849 ; -C -1 ; W0X 1000 ; N 1858 ; B 220 -85 764 845 ; -C -1 ; W0X 1000 ; N 1859 ; B 104 -64 934 838 ; -C -1 ; W0X 1000 ; N 1860 ; B 128 -80 914 848 ; -C -1 ; W0X 1000 ; N 1861 ; B 120 -75 943 830 ; -C -1 ; W0X 1000 ; N 1862 ; B 160 -94 921 845 ; -C -1 ; W0X 1000 ; N 1863 ; B 153 -68 935 844 ; -C -1 ; W0X 1000 ; N 1864 ; B 151 -101 920 848 ; -C -1 ; W0X 1000 ; N 1865 ; B 153 -102 937 857 ; -C -1 ; W0X 1000 ; N 1866 ; B 153 -84 937 845 ; -C -1 ; W0X 1000 ; N 1867 ; B 161 -82 937 834 ; -C -1 ; W0X 1000 ; N 1868 ; B 156 -94 927 844 ; -C -1 ; W0X 1000 ; N 1869 ; B 122 -52 925 837 ; -C -1 ; W0X 1000 ; N 1870 ; B 177 -67 938 833 ; -C -1 ; W0X 1000 ; N 1871 ; B 174 -72 937 827 ; -C -1 ; W0X 1000 ; N 1872 ; B 172 -87 927 858 ; -C -1 ; W0X 1000 ; N 1873 ; B 174 -92 918 853 ; -C -1 ; W0X 1000 ; N 1874 ; B 185 -87 809 849 ; -C -1 ; W0X 1000 ; N 1875 ; B 218 -84 809 836 ; -C -1 ; W0X 1000 ; N 1876 ; B 216 -68 809 837 ; -C -1 ; W0X 1000 ; N 1877 ; B 233 -97 810 847 ; -C -1 ; W0X 1000 ; N 1878 ; B 215 -96 809 864 ; -C -1 ; W0X 1000 ; N 1879 ; B 210 -108 809 865 ; -C -1 ; W0X 1000 ; N 1880 ; B 228 -92 848 828 ; -C -1 ; W0X 1000 ; N 1881 ; B 157 -74 868 841 ; -C -1 ; W0X 1000 ; N 1882 ; B 209 -77 809 840 ; -C -1 ; W0X 1000 ; N 1883 ; B 216 -63 833 840 ; -C -1 ; W0X 1000 ; N 1884 ; B 129 -37 901 825 ; -C -1 ; W0X 1000 ; N 1885 ; B 160 -70 918 831 ; -C -1 ; W0X 1000 ; N 1886 ; B 180 -95 930 855 ; -C -1 ; W0X 1000 ; N 1887 ; B 173 -90 938 825 ; -C -1 ; W0X 1000 ; N 1888 ; B 158 -62 762 855 ; -C -1 ; W0X 1000 ; N 1889 ; B 195 -87 763 844 ; -C -1 ; W0X 1000 ; N 1890 ; B 183 -59 763 836 ; -C -1 ; W0X 1000 ; N 1891 ; B 195 -101 763 850 ; -C -1 ; W0X 1000 ; N 1892 ; B 207 -82 780 856 ; -C -1 ; W0X 1000 ; N 1893 ; B 192 -87 763 848 ; -C -1 ; W0X 1000 ; N 1894 ; B 197 -100 764 861 ; -C -1 ; W0X 1000 ; N 1895 ; B 171 -74 800 849 ; -C -1 ; W0X 1000 ; N 1896 ; B 196 -101 763 847 ; -C -1 ; W0X 1000 ; N 1897 ; B 198 -71 790 834 ; -C -1 ; W0X 1000 ; N 1898 ; B 193 -106 764 868 ; -C -1 ; W0X 1000 ; N 1899 ; B 179 -64 810 816 ; -C -1 ; W0X 1000 ; N 1900 ; B 207 -55 809 853 ; -C -1 ; W0X 1000 ; N 1901 ; B 193 -66 809 828 ; -C -1 ; W0X 1000 ; N 1902 ; B 231 -102 809 856 ; -C -1 ; W0X 1000 ; N 1903 ; B 219 -84 810 860 ; -C -1 ; W0X 1000 ; N 1904 ; B 233 -92 809 835 ; -C -1 ; W0X 1000 ; N 1905 ; B 190 -67 843 836 ; -C -1 ; W0X 1000 ; N 1906 ; B 157 -80 871 843 ; -C -1 ; W0X 1000 ; N 1907 ; B 225 -79 810 838 ; -C -1 ; W0X 1000 ; N 1908 ; B 176 -62 763 826 ; -C -1 ; W0X 1000 ; N 1909 ; B 213 -75 763 832 ; -C -1 ; W0X 1000 ; N 1910 ; B 203 -71 765 833 ; -C -1 ; W0X 1000 ; N 1911 ; B 212 -80 763 839 ; -C -1 ; W0X 1000 ; N 1912 ; B 195 -78 794 831 ; -C -1 ; W0X 1000 ; N 1913 ; B 133 -87 834 832 ; -C -1 ; W0X 1000 ; N 1914 ; B 204 -92 763 842 ; -C -1 ; W0X 1000 ; N 1915 ; B 202 -77 790 837 ; -C -1 ; W0X 1000 ; N 1916 ; B 164 -69 809 840 ; -C -1 ; W0X 1000 ; N 1917 ; B 140 46 880 690 ; -C -1 ; W0X 1000 ; N 1918 ; B 159 -62 843 830 ; -C -1 ; W0X 1000 ; N 1919 ; B 134 -45 819 836 ; -C -1 ; W0X 1000 ; N 1920 ; B 131 -23 812 824 ; -C -1 ; W0X 1000 ; N 1921 ; B 163 -97 808 838 ; -C -1 ; W0X 1000 ; N 1922 ; B 125 -91 811 852 ; -C -1 ; W0X 1000 ; N 1923 ; B 144 -101 802 830 ; -C -1 ; W0X 1000 ; N 1924 ; B 169 -94 836 843 ; -C -1 ; W0X 1000 ; N 1925 ; B 171 -77 837 811 ; -C -1 ; W0X 1000 ; N 1926 ; B 148 -74 805 835 ; -C -1 ; W0X 1000 ; N 1927 ; B 181 -37 897 828 ; -C -1 ; W0X 1000 ; N 1928 ; B 167 -72 929 823 ; -C -1 ; W0X 1000 ; N 1929 ; B 132 -91 928 824 ; -C -1 ; W0X 1000 ; N 1930 ; B 167 -94 909 837 ; -C -1 ; W0X 1000 ; N 1931 ; B 183 -87 763 849 ; -C -1 ; W0X 1000 ; N 1932 ; B 209 -82 763 820 ; -C -1 ; W0X 1000 ; N 1933 ; B 201 -113 763 848 ; -C -1 ; W0X 1000 ; N 1934 ; B 229 -107 763 857 ; -C -1 ; W0X 1000 ; N 1935 ; B 189 -79 782 839 ; -C -1 ; W0X 1000 ; N 1936 ; B 201 -92 763 855 ; -C -1 ; W0X 1000 ; N 1937 ; B 150 34 858 735 ; -C -1 ; W0X 1000 ; N 1938 ; B 154 -60 776 826 ; -C -1 ; W0X 1000 ; N 1939 ; B 171 -94 798 850 ; -C -1 ; W0X 1000 ; N 1940 ; B 182 -96 821 847 ; -C -1 ; W0X 1000 ; N 1941 ; B 173 -84 851 840 ; -C -1 ; W0X 1000 ; N 1942 ; B 191 -47 773 823 ; -C -1 ; W0X 1000 ; N 1943 ; B 191 -62 780 844 ; -C -1 ; W0X 1000 ; N 1944 ; B 162 -94 779 836 ; -C -1 ; W0X 1000 ; N 1945 ; B 208 -75 799 831 ; -C -1 ; W0X 1000 ; N 1946 ; B 146 -86 781 853 ; -C -1 ; W0X 1000 ; N 1947 ; B 178 -102 791 853 ; -C -1 ; W0X 1000 ; N 1948 ; B 193 -96 801 866 ; -C -1 ; W0X 1000 ; N 1949 ; B 179 -92 812 842 ; -C -1 ; W0X 1000 ; N 1950 ; B 175 -94 814 842 ; -C -1 ; W0X 1000 ; N 1951 ; B 182 -95 825 865 ; -C -1 ; W0X 1000 ; N 1952 ; B 167 -65 858 839 ; -C -1 ; W0X 1000 ; N 1953 ; B 162 -87 765 848 ; -C -1 ; W0X 1000 ; N 1954 ; B 180 -98 802 857 ; -C -1 ; W0X 1000 ; N 1955 ; B 178 -102 787 855 ; -C -1 ; W0X 1000 ; N 1956 ; B 164 -80 763 855 ; -C -1 ; W0X 1000 ; N 1957 ; B 201 -66 763 850 ; -C -1 ; W0X 1000 ; N 1958 ; B 227 -83 763 863 ; -C -1 ; W0X 1000 ; N 1959 ; B 214 -101 763 858 ; -C -1 ; W0X 1000 ; N 1960 ; B 187 -75 788 839 ; -C -1 ; W0X 1000 ; N 1961 ; B 156 -72 811 869 ; -C -1 ; W0X 1000 ; N 1962 ; B 180 -64 764 852 ; -C -1 ; W0X 1000 ; N 1963 ; B 169 -86 764 830 ; -C -1 ; W0X 1000 ; N 1964 ; B 176 -109 763 863 ; -C -1 ; W0X 1000 ; N 1965 ; B 151 -62 791 858 ; -C -1 ; W0X 1000 ; N 1966 ; B 145 -85 769 837 ; -C -1 ; W0X 1000 ; N 1967 ; B 150 -118 788 873 ; -C -1 ; W0X 1000 ; N 1968 ; B 124 -123 780 866 ; -C -1 ; W0X 1000 ; N 1969 ; B 157 -88 850 853 ; -C -1 ; W0X 1000 ; N 1970 ; B 112 75 877 717 ; -C -1 ; W0X 1000 ; N 1971 ; B 125 -58 833 808 ; -C -1 ; W0X 1000 ; N 1972 ; B 131 -85 835 849 ; -C -1 ; W0X 1000 ; N 1973 ; B 171 -75 825 834 ; -C -1 ; W0X 1000 ; N 1974 ; B 157 -58 834 823 ; -C -1 ; W0X 1000 ; N 1975 ; B 154 -87 763 816 ; -C -1 ; W0X 1000 ; N 1976 ; B 168 -75 763 845 ; -C -1 ; W0X 1000 ; N 1977 ; B 170 -66 763 828 ; -C -1 ; W0X 1000 ; N 1978 ; B 200 -86 763 853 ; -C -1 ; W0X 1000 ; N 1979 ; B 185 -101 763 854 ; -C -1 ; W0X 1000 ; N 1980 ; B 202 -80 772 842 ; -C -1 ; W0X 1000 ; N 1981 ; B 223 -87 763 828 ; -C -1 ; W0X 1000 ; N 1982 ; B 213 -81 763 863 ; -C -1 ; W0X 1000 ; N 1983 ; B 165 -66 796 848 ; -C -1 ; W0X 1000 ; N 1984 ; B 110 -86 841 851 ; -C -1 ; W0X 1000 ; N 1985 ; B 195 -82 763 839 ; -C -1 ; W0X 1000 ; N 1986 ; B 201 -89 792 841 ; -C -1 ; W0X 1000 ; N 1987 ; B 201 -79 763 827 ; -C -1 ; W0X 1000 ; N 1988 ; B 110 -49 894 836 ; -C -1 ; W0X 1000 ; N 1989 ; B 164 -85 930 833 ; -C -1 ; W0X 1000 ; N 1990 ; B 151 -96 927 844 ; -C -1 ; W0X 1000 ; N 1991 ; B 151 -79 926 833 ; -C -1 ; W0X 1000 ; N 1992 ; B 142 -69 950 816 ; -C -1 ; W0X 1000 ; N 1993 ; B 157 -83 934 835 ; -C -1 ; W0X 1000 ; N 1994 ; B 146 -79 940 850 ; -C -1 ; W0X 1000 ; N 1995 ; B 153 -92 921 864 ; -C -1 ; W0X 1000 ; N 1996 ; B 152 -97 930 847 ; -C -1 ; W0X 1000 ; N 1997 ; B 162 -97 938 846 ; -C -1 ; W0X 1000 ; N 1998 ; B 159 -80 926 837 ; -C -1 ; W0X 1000 ; N 1999 ; B 171 -83 916 830 ; -C -1 ; W0X 1000 ; N 2000 ; B 112 -61 940 841 ; -C -1 ; W0X 1000 ; N 2001 ; B 134 -84 947 841 ; -C -1 ; W0X 1000 ; N 2002 ; B 134 -95 911 859 ; -C -1 ; W0X 1000 ; N 2003 ; B 164 -85 810 838 ; -C -1 ; W0X 1000 ; N 2004 ; B 195 -95 809 851 ; -C -1 ; W0X 1000 ; N 2005 ; B 198 -81 810 837 ; -C -1 ; W0X 1000 ; N 2006 ; B 216 -105 808 849 ; -C -1 ; W0X 1000 ; N 2007 ; B 208 -107 809 841 ; -C -1 ; W0X 1000 ; N 2008 ; B 219 -102 809 846 ; -C -1 ; W0X 1000 ; N 2009 ; B 202 -76 824 855 ; -C -1 ; W0X 1000 ; N 2010 ; B 139 -101 863 861 ; -C -1 ; W0X 1000 ; N 2011 ; B 211 -93 809 848 ; -C -1 ; W0X 1000 ; N 2012 ; B 208 -106 809 857 ; -C -1 ; W0X 1000 ; N 2013 ; B 133 -80 893 831 ; -C -1 ; W0X 1000 ; N 2014 ; B 190 -66 933 829 ; -C -1 ; W0X 1000 ; N 2015 ; B 172 -54 952 788 ; -C -1 ; W0X 1000 ; N 2016 ; B 160 -96 928 846 ; -C -1 ; W0X 1000 ; N 2017 ; B 150 -74 763 844 ; -C -1 ; W0X 1000 ; N 2018 ; B 189 -87 763 848 ; -C -1 ; W0X 1000 ; N 2019 ; B 191 -71 763 814 ; -C -1 ; W0X 1000 ; N 2020 ; B 194 -79 763 849 ; -C -1 ; W0X 1000 ; N 2021 ; B 196 -103 763 855 ; -C -1 ; W0X 1000 ; N 2022 ; B 219 -90 776 852 ; -C -1 ; W0X 1000 ; N 2023 ; B 188 -92 763 851 ; -C -1 ; W0X 1000 ; N 2024 ; B 186 -111 763 863 ; -C -1 ; W0X 1000 ; N 2025 ; B 155 -92 786 837 ; -C -1 ; W0X 1000 ; N 2026 ; B 162 -99 763 862 ; -C -1 ; W0X 1000 ; N 2027 ; B 166 -99 779 852 ; -C -1 ; W0X 1000 ; N 2028 ; B 201 -62 810 824 ; -C -1 ; W0X 1000 ; N 2029 ; B 213 -87 809 853 ; -C -1 ; W0X 1000 ; N 2030 ; B 194 -77 809 838 ; -C -1 ; W0X 1000 ; N 2031 ; B 206 -86 809 858 ; -C -1 ; W0X 1000 ; N 2032 ; B 211 -98 809 860 ; -C -1 ; W0X 1000 ; N 2033 ; B 200 -93 809 858 ; -C -1 ; W0X 1000 ; N 2034 ; B 208 -95 809 860 ; -C -1 ; W0X 1000 ; N 2035 ; B 205 -68 811 830 ; -C -1 ; W0X 1000 ; N 2036 ; B 142 -89 879 848 ; -C -1 ; W0X 1000 ; N 2037 ; B 218 -84 809 838 ; -C -1 ; W0X 1000 ; N 2038 ; B 175 -74 764 835 ; -C -1 ; W0X 1000 ; N 2039 ; B 181 -100 763 853 ; -C -1 ; W0X 1000 ; N 2040 ; B 173 -72 763 828 ; -C -1 ; W0X 1000 ; N 2041 ; B 212 -99 763 835 ; -C -1 ; W0X 1000 ; N 2042 ; B 207 -97 763 865 ; -C -1 ; W0X 1000 ; N 2043 ; B 210 -85 789 846 ; -C -1 ; W0X 1000 ; N 2044 ; B 171 -96 845 851 ; -C -1 ; W0X 1000 ; N 2045 ; B 200 -92 763 834 ; -C -1 ; W0X 1000 ; N 2046 ; B 193 -100 761 856 ; -C -1 ; W0X 1000 ; N 2047 ; B 169 -67 810 838 ; -C -1 ; W0X 1000 ; N 2048 ; B 169 -83 809 841 ; -C -1 ; W0X 1000 ; N 2049 ; B 145 6 868 738 ; -C -1 ; W0X 1000 ; N 2050 ; B 156 -91 860 854 ; -C -1 ; W0X 1000 ; N 2051 ; B 179 -94 853 849 ; -C -1 ; W0X 1000 ; N 2052 ; B 180 -79 868 807 ; -C -1 ; W0X 1000 ; N 2053 ; B 190 -90 817 850 ; -C -1 ; W0X 1000 ; N 2054 ; B 186 -94 825 855 ; -C -1 ; W0X 1000 ; N 2055 ; B 185 -92 827 848 ; -C -1 ; W0X 1000 ; N 2056 ; B 159 -87 843 849 ; -C -1 ; W0X 1000 ; N 2057 ; B 152 -94 810 852 ; -C -1 ; W0X 1000 ; N 2058 ; B 164 -74 890 834 ; -C -1 ; W0X 1000 ; N 2059 ; B 173 -74 930 822 ; -C -1 ; W0X 1000 ; N 2060 ; B 114 -89 943 836 ; -C -1 ; W0X 1000 ; N 2061 ; B 211 -80 809 853 ; -C -1 ; W0X 1000 ; N 2062 ; B 194 -60 882 819 ; -C -1 ; W0X 1000 ; N 2063 ; B 221 -75 764 825 ; -C -1 ; W0X 1000 ; N 2064 ; B 235 -77 764 846 ; -C -1 ; W0X 1000 ; N 2065 ; B 208 -79 763 833 ; -C -1 ; W0X 1000 ; N 2066 ; B 216 -106 763 865 ; -C -1 ; W0X 1000 ; N 2067 ; B 227 -96 763 845 ; -C -1 ; W0X 1000 ; N 2068 ; B 239 -99 764 856 ; -C -1 ; W0X 1000 ; N 2069 ; B 141 22 830 764 ; -C -1 ; W0X 1000 ; N 2070 ; B 174 -94 814 837 ; -C -1 ; W0X 1000 ; N 2071 ; B 177 -57 735 823 ; -C -1 ; W0X 1000 ; N 2072 ; B 149 -99 756 856 ; -C -1 ; W0X 1000 ; N 2073 ; B 172 -75 778 836 ; -C -1 ; W0X 1000 ; N 2074 ; B 153 -84 768 848 ; -C -1 ; W0X 1000 ; N 2075 ; B 166 -119 747 873 ; -C -1 ; W0X 1000 ; N 2076 ; B 133 -94 718 863 ; -C -1 ; W0X 1000 ; N 2077 ; B 143 -91 753 841 ; -C -1 ; W0X 1000 ; N 2078 ; B 169 -88 768 850 ; -C -1 ; W0X 1000 ; N 2079 ; B 167 -103 758 863 ; -C -1 ; W0X 1000 ; N 2080 ; B 179 -66 844 826 ; -C -1 ; W0X 1000 ; N 2081 ; B 134 -70 723 836 ; -C -1 ; W0X 1000 ; N 2082 ; B 177 -112 778 865 ; -C -1 ; W0X 1000 ; N 2083 ; B 158 -79 800 859 ; -C -1 ; W0X 1000 ; N 2084 ; B 197 -100 764 830 ; -C -1 ; W0X 1000 ; N 2085 ; B 204 -102 764 856 ; -C -1 ; W0X 1000 ; N 2086 ; B 159 -79 828 834 ; -C -1 ; W0X 1000 ; N 2087 ; B 159 -97 810 860 ; -C -1 ; W0X 1000 ; N 2088 ; B 146 -84 763 840 ; -C -1 ; W0X 1000 ; N 2089 ; B 180 -107 764 866 ; -C -1 ; W0X 1000 ; N 2090 ; B 180 -100 765 854 ; -C -1 ; W0X 1000 ; N 2091 ; B 204 -108 763 856 ; -C -1 ; W0X 1000 ; N 2092 ; B 175 -111 763 864 ; -C -1 ; W0X 1000 ; N 2093 ; B 164 -105 808 850 ; -C -1 ; W0X 1000 ; N 2094 ; B 145 -97 779 839 ; -C -1 ; W0X 1000 ; N 2095 ; B 171 -103 810 863 ; -C -1 ; W0X 1000 ; N 2096 ; B 178 -109 806 867 ; -C -1 ; W0X 1000 ; N 2097 ; B 136 -109 834 868 ; -C -1 ; W0X 1000 ; N 2098 ; B 148 -105 773 861 ; -C -1 ; W0X 1000 ; N 2099 ; B 75 10 865 725 ; -C -1 ; W0X 1000 ; N 2100 ; B 106 -95 829 828 ; -C -1 ; W0X 1000 ; N 2101 ; B 146 -70 858 810 ; -C -1 ; W0X 1000 ; N 2102 ; B 193 -92 884 864 ; -C -1 ; W0X 1000 ; N 2103 ; B 159 -103 848 839 ; -C -1 ; W0X 1000 ; N 2104 ; B 169 -99 883 856 ; -C -1 ; W0X 1000 ; N 2105 ; B 190 -90 889 851 ; -C -1 ; W0X 1000 ; N 2106 ; B 197 -57 764 814 ; -C -1 ; W0X 1000 ; N 2107 ; B 205 -91 763 824 ; -C -1 ; W0X 1000 ; N 2108 ; B 177 -67 763 825 ; -C -1 ; W0X 1000 ; N 2109 ; B 235 -77 763 834 ; -C -1 ; W0X 1000 ; N 2110 ; B 232 -92 773 842 ; -C -1 ; W0X 1000 ; N 2111 ; B 204 -91 763 856 ; -C -1 ; W0X 1000 ; N 2112 ; B 215 -97 763 841 ; -C -1 ; W0X 1000 ; N 2113 ; B 187 -84 786 811 ; -C -1 ; W0X 1000 ; N 2114 ; B 199 -94 764 845 ; -C -1 ; W0X 1000 ; N 2115 ; B 213 -77 794 829 ; -C -1 ; W0X 1000 ; N 2116 ; B 234 -92 797 835 ; -C -1 ; W0X 1000 ; N 2117 ; B 55 -74 884 844 ; -C -1 ; W0X 1000 ; N 2118 ; B 115 -71 932 829 ; -C -1 ; W0X 1000 ; N 2119 ; B 99 -73 931 790 ; -C -1 ; W0X 1000 ; N 2120 ; B 107 -103 914 856 ; -C -1 ; W0X 1000 ; N 2121 ; B 118 -86 934 832 ; -C -1 ; W0X 1000 ; N 2122 ; B 118 -89 939 841 ; -C -1 ; W0X 1000 ; N 2123 ; B 121 -92 914 864 ; -C -1 ; W0X 1000 ; N 2124 ; B 115 -62 927 816 ; -C -1 ; W0X 1000 ; N 2125 ; B 84 -91 928 805 ; -C -1 ; W0X 1000 ; N 2126 ; B 103 -84 929 841 ; -C -1 ; W0X 1000 ; N 2127 ; B 121 -97 909 849 ; -C -1 ; W0X 1000 ; N 2128 ; B 121 -72 810 832 ; -C -1 ; W0X 1000 ; N 2129 ; B 191 -60 809 812 ; -C -1 ; W0X 1000 ; N 2130 ; B 164 -72 809 829 ; -C -1 ; W0X 1000 ; N 2131 ; B 185 -83 810 833 ; -C -1 ; W0X 1000 ; N 2132 ; B 168 -83 810 841 ; -C -1 ; W0X 1000 ; N 2133 ; B 189 -99 810 846 ; -C -1 ; W0X 1000 ; N 2134 ; B 168 -64 831 837 ; -C -1 ; W0X 1000 ; N 2135 ; B 97 -82 857 826 ; -C -1 ; W0X 1000 ; N 2136 ; B 158 -102 809 850 ; -C -1 ; W0X 1000 ; N 2137 ; B 87 -57 889 833 ; -C -1 ; W0X 1000 ; N 2138 ; B 143 -60 924 818 ; -C -1 ; W0X 1000 ; N 2139 ; B 122 -85 917 825 ; -C -1 ; W0X 1000 ; N 2140 ; B 78 -77 763 845 ; -C -1 ; W0X 1000 ; N 2141 ; B 143 -77 763 843 ; -C -1 ; W0X 1000 ; N 2142 ; B 166 -66 764 818 ; -C -1 ; W0X 1000 ; N 2143 ; B 165 -88 763 845 ; -C -1 ; W0X 1000 ; N 2144 ; B 184 -80 763 839 ; -C -1 ; W0X 1000 ; N 2145 ; B 180 -83 768 836 ; -C -1 ; W0X 1000 ; N 2146 ; B 164 -70 765 845 ; -C -1 ; W0X 1000 ; N 2147 ; B 126 -74 806 823 ; -C -1 ; W0X 1000 ; N 2148 ; B 142 -99 764 853 ; -C -1 ; W0X 1000 ; N 2149 ; B 129 -60 810 834 ; -C -1 ; W0X 1000 ; N 2150 ; B 177 -88 810 846 ; -C -1 ; W0X 1000 ; N 2151 ; B 117 -46 763 825 ; -C -1 ; W0X 1000 ; N 2152 ; B 156 -82 764 818 ; -C -1 ; W0X 1000 ; N 2153 ; B 163 -98 763 854 ; -C -1 ; W0X 1000 ; N 2154 ; B 192 -114 764 845 ; -C -1 ; W0X 1000 ; N 2155 ; B 181 -97 778 836 ; -C -1 ; W0X 1000 ; N 2156 ; B 160 -105 824 855 ; -C -1 ; W0X 1000 ; N 2157 ; B 169 -88 764 836 ; -C -1 ; W0X 1000 ; N 2158 ; B 125 57 866 728 ; -C -1 ; W0X 1000 ; N 2159 ; B 136 -79 827 839 ; -C -1 ; W0X 1000 ; N 2160 ; B 141 -86 855 811 ; -C -1 ; W0X 1000 ; N 2161 ; B 147 -102 820 851 ; -C -1 ; W0X 1000 ; N 2162 ; B 173 -94 833 824 ; -C -1 ; W0X 1000 ; N 2163 ; B 206 -104 849 843 ; -C -1 ; W0X 1000 ; N 2164 ; B 160 -92 826 849 ; -C -1 ; W0X 1000 ; N 2165 ; B 160 -80 764 850 ; -C -1 ; W0X 1000 ; N 2166 ; B 155 7 849 740 ; -C -1 ; W0X 1000 ; N 2167 ; B 183 -88 834 852 ; -C -1 ; W0X 1000 ; N 2168 ; B 164 -64 757 816 ; -C -1 ; W0X 1000 ; N 2169 ; B 154 -90 797 857 ; -C -1 ; W0X 1000 ; N 2170 ; B 157 -90 768 845 ; -C -1 ; W0X 1000 ; N 2171 ; B 159 -112 782 866 ; -C -1 ; W0X 1000 ; N 2172 ; B 140 -90 761 850 ; -C -1 ; W0X 1000 ; N 2173 ; B 165 -70 805 825 ; -C -1 ; W0X 1000 ; N 2174 ; B 139 -91 747 848 ; -C -1 ; W0X 1000 ; N 2175 ; B 144 -111 752 876 ; -C -1 ; W0X 1000 ; N 2176 ; B 150 -112 828 871 ; -C -1 ; W0X 1000 ; N 2177 ; B 151 46 900 749 ; -C -1 ; W0X 1000 ; N 2178 ; B 180 -61 837 808 ; -C -1 ; W0X 1000 ; N 2179 ; B 121 -83 814 857 ; -C -1 ; W0X 1000 ; N 2180 ; B 144 -75 819 833 ; -C -1 ; W0X 1000 ; N 2181 ; B 132 -86 818 846 ; -C -1 ; W0X 1000 ; N 2182 ; B 125 -85 764 855 ; -C -1 ; W0X 1000 ; N 2183 ; B 158 -80 763 841 ; -C -1 ; W0X 1000 ; N 2184 ; B 127 -70 763 834 ; -C -1 ; W0X 1000 ; N 2185 ; B 151 -90 763 860 ; -C -1 ; W0X 1000 ; N 2186 ; B 155 -93 763 842 ; -C -1 ; W0X 1000 ; N 2187 ; B 149 -107 763 862 ; -C -1 ; W0X 1000 ; N 2188 ; B 161 -87 805 838 ; -C -1 ; W0X 1000 ; N 2189 ; B 152 -90 763 850 ; -C -1 ; W0X 1000 ; N 2190 ; B 48 -101 907 845 ; -C -1 ; W0X 1000 ; N 2191 ; B 121 -79 928 837 ; -C -1 ; W0X 1000 ; N 2192 ; B 121 -69 920 834 ; -C -1 ; W0X 1000 ; N 2193 ; B 91 -50 937 807 ; -C -1 ; W0X 1000 ; N 2194 ; B 115 -91 944 807 ; -C -1 ; W0X 1000 ; N 2195 ; B 148 -101 929 813 ; -C -1 ; W0X 1000 ; N 2196 ; B 145 -79 927 832 ; -C -1 ; W0X 1000 ; N 2197 ; B 126 -67 912 837 ; -C -1 ; W0X 1000 ; N 2198 ; B 91 -72 934 847 ; -C -1 ; W0X 1000 ; N 2199 ; B 124 -105 941 818 ; -C -1 ; W0X 1000 ; N 2200 ; B 100 -72 955 802 ; -C -1 ; W0X 1000 ; N 2201 ; B 122 -89 939 803 ; -C -1 ; W0X 1000 ; N 2202 ; B 126 -59 931 824 ; -C -1 ; W0X 1000 ; N 2203 ; B 117 -90 929 837 ; -C -1 ; W0X 1000 ; N 2204 ; B 121 -86 810 831 ; -C -1 ; W0X 1000 ; N 2205 ; B 120 -85 764 855 ; -C -1 ; W0X 1000 ; N 2206 ; B 146 -74 800 826 ; -C -1 ; W0X 1000 ; N 2207 ; B 180 -96 810 852 ; -C -1 ; W0X 1000 ; N 2208 ; B 157 -66 810 831 ; -C -1 ; W0X 1000 ; N 2209 ; B 194 -99 809 844 ; -C -1 ; W0X 1000 ; N 2210 ; B 170 -69 822 829 ; -C -1 ; W0X 1000 ; N 2211 ; B 161 -78 883 834 ; -C -1 ; W0X 1000 ; N 2212 ; B 166 -95 809 834 ; -C -1 ; W0X 1000 ; N 2213 ; B 96 -80 910 825 ; -C -1 ; W0X 1000 ; N 2214 ; B 92 -81 956 820 ; -C -1 ; W0X 1000 ; N 2215 ; B 91 -48 943 824 ; -C -1 ; W0X 1000 ; N 2216 ; B 126 -90 926 843 ; -C -1 ; W0X 1000 ; N 2217 ; B 130 -79 928 835 ; -C -1 ; W0X 1000 ; N 2218 ; B 121 -102 929 843 ; -C -1 ; W0X 1000 ; N 2219 ; B 110 -69 949 815 ; -C -1 ; W0X 1000 ; N 2220 ; B 109 -73 953 844 ; -C -1 ; W0X 1000 ; N 2221 ; B 112 -71 810 831 ; -C -1 ; W0X 1000 ; N 2222 ; B 164 -80 810 825 ; -C -1 ; W0X 1000 ; N 2223 ; B 156 -104 809 854 ; -C -1 ; W0X 1000 ; N 2224 ; B 158 -102 810 861 ; -C -1 ; W0X 1000 ; N 2225 ; B 154 -96 810 859 ; -C -1 ; W0X 1000 ; N 2226 ; B 179 -72 763 822 ; -C -1 ; W0X 1000 ; N 2227 ; B 236 -81 763 821 ; -C -1 ; W0X 1000 ; N 2228 ; B 239 -70 763 831 ; -C -1 ; W0X 1000 ; N 2229 ; B 234 -57 834 831 ; -C -1 ; W0X 1000 ; N 2230 ; B 210 -82 763 786 ; -C -1 ; W0X 1000 ; N 2231 ; B 244 -93 763 834 ; -C -1 ; W0X 1000 ; N 2232 ; B 236 -93 763 841 ; -C -1 ; W0X 1000 ; N 2233 ; B 232 -86 769 847 ; -C -1 ; W0X 1000 ; N 2234 ; B 253 -88 763 833 ; -C -1 ; W0X 1000 ; N 2235 ; B 224 -102 763 840 ; -C -1 ; W0X 1000 ; N 2236 ; B 221 -87 763 848 ; -C -1 ; W0X 1000 ; N 2237 ; B 156 -78 790 820 ; -C -1 ; W0X 1000 ; N 2238 ; B 118 -72 842 842 ; -C -1 ; W0X 1000 ; N 2239 ; B 211 -84 763 847 ; -C -1 ; W0X 1000 ; N 2240 ; B 227 -74 778 836 ; -C -1 ; W0X 1000 ; N 2241 ; B 148 -81 763 843 ; -C -1 ; W0X 1000 ; N 2242 ; B 197 -91 764 834 ; -C -1 ; W0X 1000 ; N 2243 ; B 219 -68 809 834 ; -C -1 ; W0X 1000 ; N 2244 ; B 247 -80 809 843 ; -C -1 ; W0X 1000 ; N 2245 ; B 247 -90 809 837 ; -C -1 ; W0X 1000 ; N 2246 ; B 225 -95 810 846 ; -C -1 ; W0X 1000 ; N 2247 ; B 190 -69 852 826 ; -C -1 ; W0X 1000 ; N 2248 ; B 125 -66 887 841 ; -C -1 ; W0X 1000 ; N 2249 ; B 252 -89 810 847 ; -C -1 ; W0X 1000 ; N 2250 ; B 241 -75 809 826 ; -C -1 ; W0X 1000 ; N 2251 ; B 245 -102 809 859 ; -C -1 ; W0X 1000 ; N 2252 ; B 223 -79 810 846 ; -C -1 ; W0X 1000 ; N 2253 ; B 248 -105 810 866 ; -C -1 ; W0X 1000 ; N 2254 ; B 261 -105 809 855 ; -C -1 ; W0X 1000 ; N 2255 ; B 224 -102 763 862 ; -C -1 ; W0X 1000 ; N 2256 ; B 189 -95 779 845 ; -C -1 ; W0X 1000 ; N 2257 ; B 138 -92 833 837 ; -C -1 ; W0X 1000 ; N 2258 ; B 231 -95 764 844 ; -C -1 ; W0X 1000 ; N 2259 ; B 189 -70 810 826 ; -C -1 ; W0X 1000 ; N 2260 ; B 195 -94 809 850 ; -C -1 ; W0X 1000 ; N 2261 ; B 266 -90 809 850 ; -C -1 ; W0X 1000 ; N 2262 ; B 224 -82 809 848 ; -C -1 ; W0X 1000 ; N 2263 ; B 135 61 904 728 ; -C -1 ; W0X 1000 ; N 2264 ; B 131 -99 863 839 ; -C -1 ; W0X 1000 ; N 2265 ; B 154 -82 886 831 ; -C -1 ; W0X 1000 ; N 2266 ; B 139 -69 879 813 ; -C -1 ; W0X 1000 ; N 2267 ; B 136 -95 846 841 ; -C -1 ; W0X 1000 ; N 2268 ; B 155 -72 871 823 ; -C -1 ; W0X 1000 ; N 2269 ; B 159 -76 847 824 ; -C -1 ; W0X 1000 ; N 2270 ; B 151 -85 862 843 ; -C -1 ; W0X 1000 ; N 2271 ; B 168 -86 889 825 ; -C -1 ; W0X 1000 ; N 2272 ; B 175 -87 908 841 ; -C -1 ; W0X 1000 ; N 2273 ; B 123 -90 858 857 ; -C -1 ; W0X 1000 ; N 2274 ; B 132 -85 905 850 ; -C -1 ; W0X 1000 ; N 2275 ; B 141 -89 929 844 ; -C -1 ; W0X 1000 ; N 2276 ; B 143 -65 906 841 ; -C -1 ; W0X 1000 ; N 2277 ; B 157 -95 905 854 ; -C -1 ; W0X 1000 ; N 2278 ; B 136 -88 930 858 ; -C -1 ; W0X 1000 ; N 2279 ; B 166 -102 808 851 ; -C -1 ; W0X 1000 ; N 2280 ; B 210 -94 810 855 ; -C -1 ; W0X 1000 ; N 2281 ; B 233 -104 811 858 ; -C -1 ; W0X 1000 ; N 2282 ; B 231 -101 810 867 ; -C -1 ; W0X 1000 ; N 2283 ; B 221 -78 826 851 ; -C -1 ; W0X 1000 ; N 2284 ; B 177 -92 863 845 ; -C -1 ; W0X 1000 ; N 2285 ; B 181 -82 765 824 ; -C -1 ; W0X 1000 ; N 2286 ; B 186 -89 764 831 ; -C -1 ; W0X 1000 ; N 2287 ; B 196 -104 764 841 ; -C -1 ; W0X 1000 ; N 2288 ; B 196 -105 764 846 ; -C -1 ; W0X 1000 ; N 2289 ; B 195 -101 763 863 ; -C -1 ; W0X 1000 ; N 2290 ; B 192 -82 825 850 ; -C -1 ; W0X 1000 ; N 2291 ; B 135 19 867 704 ; -C -1 ; W0X 1000 ; N 2292 ; B 127 -95 816 856 ; -C -1 ; W0X 1000 ; N 2293 ; B 101 -80 793 851 ; -C -1 ; W0X 1000 ; N 2294 ; B 126 -107 813 864 ; -C -1 ; W0X 1000 ; N 2295 ; B 154 -94 832 862 ; -C -1 ; W0X 1000 ; N 2296 ; B 157 -112 808 869 ; -C -1 ; W0X 1000 ; N 2297 ; B 144 -86 798 842 ; -C -1 ; W0X 1000 ; N 2298 ; B 140 -87 794 843 ; -C -1 ; W0X 1000 ; N 2299 ; B 155 -15 818 841 ; -C -1 ; W0X 1000 ; N 2300 ; B 131 -72 770 837 ; -C -1 ; W0X 1000 ; N 2301 ; B 138 -77 794 824 ; -C -1 ; W0X 1000 ; N 2302 ; B 145 -80 773 832 ; -C -1 ; W0X 1000 ; N 2303 ; B 141 -95 780 853 ; -C -1 ; W0X 1000 ; N 2304 ; B 126 -87 753 863 ; -C -1 ; W0X 1000 ; N 2305 ; B 135 -95 766 863 ; -C -1 ; W0X 1000 ; N 2306 ; B 167 -72 844 836 ; -C -1 ; W0X 1000 ; N 2307 ; B 145 -96 777 837 ; -C -1 ; W0X 1000 ; N 2308 ; B 175 -90 789 842 ; -C -1 ; W0X 1000 ; N 2309 ; B 133 -108 771 864 ; -C -1 ; W0X 1000 ; N 2310 ; B 121 -96 769 850 ; -C -1 ; W0X 1000 ; N 2311 ; B 163 -79 766 834 ; -C -1 ; W0X 1000 ; N 2312 ; B 145 -60 816 845 ; -C -1 ; W0X 1000 ; N 2313 ; B 175 -70 809 843 ; -C -1 ; W0X 1000 ; N 2314 ; B 202 -82 810 858 ; -C -1 ; W0X 1000 ; N 2315 ; B 168 -63 810 847 ; -C -1 ; W0X 1000 ; N 2316 ; B 185 -99 810 857 ; -C -1 ; W0X 1000 ; N 2317 ; B 189 -111 810 863 ; -C -1 ; W0X 1000 ; N 2318 ; B 208 -94 809 863 ; -C -1 ; W0X 1000 ; N 2319 ; B 145 -99 764 839 ; -C -1 ; W0X 1000 ; N 2320 ; B 205 -74 764 854 ; -C -1 ; W0X 1000 ; N 2321 ; B 195 -74 764 811 ; -C -1 ; W0X 1000 ; N 2322 ; B 206 -109 763 862 ; -C -1 ; W0X 1000 ; N 2323 ; B 210 -103 765 863 ; -C -1 ; W0X 1000 ; N 2324 ; B 207 -103 763 856 ; -C -1 ; W0X 1000 ; N 2325 ; B 192 -85 806 854 ; -C -1 ; W0X 1000 ; N 2326 ; B 203 -74 763 848 ; -C -1 ; W0X 1000 ; N 2327 ; B 111 -86 796 850 ; -C -1 ; W0X 1000 ; N 2328 ; B 120 -87 770 869 ; -C -1 ; W0X 1000 ; N 2329 ; B 129 -116 745 877 ; -C -1 ; W0X 1000 ; N 2330 ; B 123 -112 762 874 ; -C -1 ; W0X 1000 ; N 2331 ; B 100 -105 776 863 ; -C -1 ; W0X 1000 ; N 2332 ; B 96 -113 761 867 ; -C -1 ; W0X 1000 ; N 2333 ; B 124 43 908 670 ; -C -1 ; W0X 1000 ; N 2334 ; B 108 -76 839 821 ; -C -1 ; W0X 1000 ; N 2335 ; B 117 -71 851 786 ; -C -1 ; W0X 1000 ; N 2336 ; B 107 -88 818 842 ; -C -1 ; W0X 1000 ; N 2337 ; B 126 -74 831 853 ; -C -1 ; W0X 1000 ; N 2338 ; B 144 -108 850 854 ; -C -1 ; W0X 1000 ; N 2339 ; B 126 -98 872 856 ; -C -1 ; W0X 1000 ; N 2340 ; B 156 -69 843 823 ; -C -1 ; W0X 1000 ; N 2341 ; B 147 -81 859 849 ; -C -1 ; W0X 1000 ; N 2342 ; B 85 -90 763 830 ; -C -1 ; W0X 1000 ; N 2343 ; B 135 -81 763 831 ; -C -1 ; W0X 1000 ; N 2344 ; B 179 -82 810 821 ; -C -1 ; W0X 1000 ; N 2345 ; B 151 -99 763 834 ; -C -1 ; W0X 1000 ; N 2346 ; B 152 -92 763 863 ; -C -1 ; W0X 1000 ; N 2347 ; B 178 -87 763 846 ; -C -1 ; W0X 1000 ; N 2348 ; B 168 -87 768 837 ; -C -1 ; W0X 1000 ; N 2349 ; B 162 -96 764 854 ; -C -1 ; W0X 1000 ; N 2350 ; B 148 -86 779 820 ; -C -1 ; W0X 1000 ; N 2351 ; B 154 -84 763 836 ; -C -1 ; W0X 1000 ; N 2352 ; B 173 -81 775 829 ; -C -1 ; W0X 1000 ; N 2353 ; B 73 -60 895 830 ; -C -1 ; W0X 1000 ; N 2354 ; B 95 -72 918 843 ; -C -1 ; W0X 1000 ; N 2355 ; B 115 -45 931 834 ; -C -1 ; W0X 1000 ; N 2356 ; B 93 -57 937 814 ; -C -1 ; W0X 1000 ; N 2357 ; B 124 -108 948 846 ; -C -1 ; W0X 1000 ; N 2358 ; B 108 -100 918 837 ; -C -1 ; W0X 1000 ; N 2359 ; B 110 -97 922 853 ; -C -1 ; W0X 1000 ; N 2360 ; B 86 -68 934 840 ; -C -1 ; W0X 1000 ; N 2361 ; B 117 -77 936 838 ; -C -1 ; W0X 1000 ; N 2362 ; B 110 -95 926 854 ; -C -1 ; W0X 1000 ; N 2363 ; B 77 -82 810 863 ; -C -1 ; W0X 1000 ; N 2364 ; B 149 -89 810 853 ; -C -1 ; W0X 1000 ; N 2365 ; B 137 -86 813 830 ; -C -1 ; W0X 1000 ; N 2366 ; B 160 -107 810 860 ; -C -1 ; W0X 1000 ; N 2367 ; B 148 -97 810 853 ; -C -1 ; W0X 1000 ; N 2368 ; B 173 -103 810 843 ; -C -1 ; W0X 1000 ; N 2369 ; B 155 -65 866 844 ; -C -1 ; W0X 1000 ; N 2370 ; B 142 -88 810 848 ; -C -1 ; W0X 1000 ; N 2371 ; B 115 -98 928 813 ; -C -1 ; W0X 1000 ; N 2372 ; B 126 -72 765 850 ; -C -1 ; W0X 1000 ; N 2373 ; B 167 -94 764 817 ; -C -1 ; W0X 1000 ; N 2374 ; B 139 -80 763 827 ; -C -1 ; W0X 1000 ; N 2375 ; B 185 -100 764 845 ; -C -1 ; W0X 1000 ; N 2376 ; B 205 -100 770 836 ; -C -1 ; W0X 1000 ; N 2377 ; B 190 -91 764 832 ; -C -1 ; W0X 1000 ; N 2378 ; B 186 -95 764 851 ; -C -1 ; W0X 1000 ; N 2379 ; B 130 -72 827 839 ; -C -1 ; W0X 1000 ; N 2380 ; B 164 -102 764 858 ; -C -1 ; W0X 1000 ; N 2381 ; B 145 -84 810 837 ; -C -1 ; W0X 1000 ; N 2382 ; B 173 -85 810 823 ; -C -1 ; W0X 1000 ; N 2383 ; B 225 -92 810 856 ; -C -1 ; W0X 1000 ; N 2384 ; B 192 -79 809 824 ; -C -1 ; W0X 1000 ; N 2385 ; B 111 18 882 726 ; -C -1 ; W0X 1000 ; N 2386 ; B 180 -85 857 833 ; -C -1 ; W0X 1000 ; N 2387 ; B 180 -76 887 809 ; -C -1 ; W0X 1000 ; N 2388 ; B 134 -93 899 880 ; -C -1 ; W0X 1000 ; N 2389 ; B 154 -91 858 845 ; -C -1 ; W0X 1000 ; N 2390 ; B 175 -87 862 829 ; -C -1 ; W0X 1000 ; N 2391 ; B 161 -105 880 839 ; -C -1 ; W0X 1000 ; N 2392 ; B 174 -103 855 849 ; -C -1 ; W0X 1000 ; N 2393 ; B 133 -100 859 847 ; -C -1 ; W0X 1000 ; N 2394 ; B 123 -77 888 841 ; -C -1 ; W0X 1000 ; N 2395 ; B 142 -92 923 854 ; -C -1 ; W0X 1000 ; N 2396 ; B 113 -100 912 809 ; -C -1 ; W0X 1000 ; N 2397 ; B 129 -67 902 856 ; -C -1 ; W0X 1000 ; N 2398 ; B 164 -81 808 832 ; -C -1 ; W0X 1000 ; N 2399 ; B 162 -81 849 834 ; -C -1 ; W0X 1000 ; N 2400 ; B 149 -90 764 847 ; -C -1 ; W0X 1000 ; N 2401 ; B 175 -91 764 833 ; -C -1 ; W0X 1000 ; N 2402 ; B 185 -111 764 862 ; -C -1 ; W0X 1000 ; N 2403 ; B 165 -113 764 867 ; -C -1 ; W0X 1000 ; N 2404 ; B 200 -112 764 852 ; -C -1 ; W0X 1000 ; N 2405 ; B 141 47 882 759 ; -C -1 ; W0X 1000 ; N 2406 ; B 192 -31 869 835 ; -C -1 ; W0X 1000 ; N 2407 ; B 143 -90 812 859 ; -C -1 ; W0X 1000 ; N 2408 ; B 143 -83 815 841 ; -C -1 ; W0X 1000 ; N 2409 ; B 139 -104 818 870 ; -C -1 ; W0X 1000 ; N 2410 ; B 164 -109 814 851 ; -C -1 ; W0X 1000 ; N 2411 ; B 112 -101 764 859 ; -C -1 ; W0X 1000 ; N 2412 ; B 137 -65 772 856 ; -C -1 ; W0X 1000 ; N 2413 ; B 174 -82 764 859 ; -C -1 ; W0X 1000 ; N 2414 ; B 123 -84 816 841 ; -C -1 ; W0X 1000 ; N 2415 ; B 185 -82 818 845 ; -C -1 ; W0X 1000 ; N 2416 ; B 165 -90 763 841 ; -C -1 ; W0X 1000 ; N 2417 ; B 185 -87 763 832 ; -C -1 ; W0X 1000 ; N 2418 ; B 143 -110 809 867 ; -C -1 ; W0X 1000 ; N 2419 ; B 146 25 920 693 ; -C -1 ; W0X 1000 ; N 2420 ; B 168 -74 851 823 ; -C -1 ; W0X 1000 ; N 2421 ; B 147 -58 853 801 ; -C -1 ; W0X 1000 ; N 2422 ; B 127 -106 822 858 ; -C -1 ; W0X 1000 ; N 2423 ; B 141 -91 860 841 ; -C -1 ; W0X 1000 ; N 2424 ; B 132 -94 876 854 ; -C -1 ; W0X 1000 ; N 2425 ; B 146 -99 834 827 ; -C -1 ; W0X 1000 ; N 2426 ; B 141 -105 821 839 ; -C -1 ; W0X 1000 ; N 2427 ; B 182 -77 764 838 ; -C -1 ; W0X 1000 ; N 2428 ; B 190 -81 764 822 ; -C -1 ; W0X 1000 ; N 2429 ; B 218 -88 764 853 ; -C -1 ; W0X 1000 ; N 2430 ; B 188 -97 764 854 ; -C -1 ; W0X 1000 ; N 2431 ; B 49 -89 763 848 ; -C -1 ; W0X 1000 ; N 2432 ; B 147 -71 763 839 ; -C -1 ; W0X 1000 ; N 2433 ; B 118 -74 765 822 ; -C -1 ; W0X 1000 ; N 2434 ; B 193 -86 763 837 ; -C -1 ; W0X 1000 ; N 2435 ; B 154 -87 779 843 ; -C -1 ; W0X 1000 ; N 2436 ; B 146 -89 769 850 ; -C -1 ; W0X 1000 ; N 2437 ; B 106 -77 786 827 ; -C -1 ; W0X 1000 ; N 2438 ; B 101 -91 764 846 ; -C -1 ; W0X 1000 ; N 2439 ; B 142 -65 906 825 ; -C -1 ; W0X 1000 ; N 2440 ; B 176 -74 924 850 ; -C -1 ; W0X 1000 ; N 2441 ; B 168 -56 945 812 ; -C -1 ; W0X 1000 ; N 2442 ; B 180 -58 911 852 ; -C -1 ; W0X 1000 ; N 2443 ; B 181 -106 938 857 ; -C -1 ; W0X 1000 ; N 2444 ; B 172 -101 916 853 ; -C -1 ; W0X 1000 ; N 2445 ; B 178 -97 920 857 ; -C -1 ; W0X 1000 ; N 2446 ; B 187 -91 941 850 ; -C -1 ; W0X 1000 ; N 2447 ; B 195 -81 911 845 ; -C -1 ; W0X 1000 ; N 2448 ; B 197 -98 918 826 ; -C -1 ; W0X 1000 ; N 2449 ; B 175 -102 929 856 ; -C -1 ; W0X 1000 ; N 2450 ; B 129 -93 946 818 ; -C -1 ; W0X 1000 ; N 2451 ; B 75 -91 919 841 ; -C -1 ; W0X 1000 ; N 2452 ; B 186 -85 926 830 ; -C -1 ; W0X 1000 ; N 2453 ; B 199 -92 912 837 ; -C -1 ; W0X 1000 ; N 2454 ; B 186 -74 912 844 ; -C -1 ; W0X 1000 ; N 2455 ; B 185 -85 810 846 ; -C -1 ; W0X 1000 ; N 2456 ; B 256 -60 809 853 ; -C -1 ; W0X 1000 ; N 2457 ; B 207 -78 810 838 ; -C -1 ; W0X 1000 ; N 2458 ; B 217 -97 809 866 ; -C -1 ; W0X 1000 ; N 2459 ; B 225 -100 809 858 ; -C -1 ; W0X 1000 ; N 2460 ; B 241 -95 810 862 ; -C -1 ; W0X 1000 ; N 2461 ; B 195 -99 817 834 ; -C -1 ; W0X 1000 ; N 2462 ; B 158 -91 884 849 ; -C -1 ; W0X 1000 ; N 2463 ; B 218 -109 809 852 ; -C -1 ; W0X 1000 ; N 2464 ; B 158 -50 897 814 ; -C -1 ; W0X 1000 ; N 2465 ; B 177 -89 933 844 ; -C -1 ; W0X 1000 ; N 2466 ; B 170 -78 932 821 ; -C -1 ; W0X 1000 ; N 2467 ; B 203 -92 929 836 ; -C -1 ; W0X 1000 ; N 2468 ; B 198 -85 946 840 ; -C -1 ; W0X 1000 ; N 2469 ; B 198 -85 915 838 ; -C -1 ; W0X 1000 ; N 2470 ; B 197 -99 938 851 ; -C -1 ; W0X 1000 ; N 2471 ; B 132 -67 926 836 ; -C -1 ; W0X 1000 ; N 2472 ; B 187 -76 931 837 ; -C -1 ; W0X 1000 ; N 2473 ; B 179 -97 942 856 ; -C -1 ; W0X 1000 ; N 2474 ; B 175 -104 930 845 ; -C -1 ; W0X 1000 ; N 2475 ; B 133 -70 765 845 ; -C -1 ; W0X 1000 ; N 2476 ; B 209 -95 809 834 ; -C -1 ; W0X 1000 ; N 2477 ; B 255 -94 810 855 ; -C -1 ; W0X 1000 ; N 2478 ; B 239 -111 809 854 ; -C -1 ; W0X 1000 ; N 2479 ; B 208 -69 763 820 ; -C -1 ; W0X 1000 ; N 2480 ; B 220 -92 764 852 ; -C -1 ; W0X 1000 ; N 2481 ; B 205 -86 764 834 ; -C -1 ; W0X 1000 ; N 2482 ; B 228 -92 816 839 ; -C -1 ; W0X 1000 ; N 2483 ; B 227 -94 763 852 ; -C -1 ; W0X 1000 ; N 2484 ; B 237 -93 763 854 ; -C -1 ; W0X 1000 ; N 2485 ; B 250 -101 763 873 ; -C -1 ; W0X 1000 ; N 2486 ; B 232 -91 763 842 ; -C -1 ; W0X 1000 ; N 2487 ; B 234 -106 763 867 ; -C -1 ; W0X 1000 ; N 2488 ; B 224 -81 763 855 ; -C -1 ; W0X 1000 ; N 2489 ; B 225 -92 823 858 ; -C -1 ; W0X 1000 ; N 2490 ; B 185 -67 782 827 ; -C -1 ; W0X 1000 ; N 2491 ; B 119 -76 822 829 ; -C -1 ; W0X 1000 ; N 2492 ; B 230 -88 763 846 ; -C -1 ; W0X 1000 ; N 2493 ; B 244 -90 819 797 ; -C -1 ; W0X 1000 ; N 2494 ; B 234 -107 763 854 ; -C -1 ; W0X 1000 ; N 2495 ; B 239 -73 776 838 ; -C -1 ; W0X 1000 ; N 2496 ; B 196 -60 808 820 ; -C -1 ; W0X 1000 ; N 2497 ; B 254 -64 809 823 ; -C -1 ; W0X 1000 ; N 2498 ; B 234 -52 809 800 ; -C -1 ; W0X 1000 ; N 2499 ; B 260 -90 809 854 ; -C -1 ; W0X 1000 ; N 2500 ; B 232 -86 809 844 ; -C -1 ; W0X 1000 ; N 2501 ; B 235 -106 808 842 ; -C -1 ; W0X 1000 ; N 2502 ; B 183 -57 844 846 ; -C -1 ; W0X 1000 ; N 2503 ; B 238 -94 809 830 ; -C -1 ; W0X 1000 ; N 2504 ; B 191 -71 763 836 ; -C -1 ; W0X 1000 ; N 2505 ; B 230 -62 763 829 ; -C -1 ; W0X 1000 ; N 2506 ; B 238 -82 763 831 ; -C -1 ; W0X 1000 ; N 2507 ; B 228 -65 763 807 ; -C -1 ; W0X 1000 ; N 2508 ; B 240 -88 763 839 ; -C -1 ; W0X 1000 ; N 2509 ; B 258 -80 767 837 ; -C -1 ; W0X 1000 ; N 2510 ; B 251 -80 778 848 ; -C -1 ; W0X 1000 ; N 2511 ; B 245 -93 763 847 ; -C -1 ; W0X 1000 ; N 2512 ; B 234 -92 763 843 ; -C -1 ; W0X 1000 ; N 2513 ; B 227 -97 824 857 ; -C -1 ; W0X 1000 ; N 2514 ; B 168 -46 763 856 ; -C -1 ; W0X 1000 ; N 2515 ; B 97 -74 833 831 ; -C -1 ; W0X 1000 ; N 2516 ; B 237 -92 761 856 ; -C -1 ; W0X 1000 ; N 2517 ; B 243 -97 764 854 ; -C -1 ; W0X 1000 ; N 2518 ; B 237 -86 775 861 ; -C -1 ; W0X 1000 ; N 2519 ; B 246 -102 763 862 ; -C -1 ; W0X 1000 ; N 2520 ; B 190 -61 810 819 ; -C -1 ; W0X 1000 ; N 2521 ; B 224 -79 810 816 ; -C -1 ; W0X 1000 ; N 2522 ; B 256 -75 810 853 ; -C -1 ; W0X 1000 ; N 2523 ; B 259 -92 809 850 ; -C -1 ; W0X 1000 ; N 2524 ; B 245 -115 809 859 ; -C -1 ; W0X 1000 ; N 2525 ; B 222 -97 838 846 ; -C -1 ; W0X 1000 ; N 2526 ; B 156 -94 855 841 ; -C -1 ; W0X 1000 ; N 2527 ; B 129 28 904 707 ; -C -1 ; W0X 1000 ; N 2528 ; B 129 -96 849 848 ; -C -1 ; W0X 1000 ; N 2529 ; B 134 -44 841 826 ; -C -1 ; W0X 1000 ; N 2530 ; B 152 -95 824 854 ; -C -1 ; W0X 1000 ; N 2531 ; B 138 -90 812 851 ; -C -1 ; W0X 1000 ; N 2532 ; B 143 -88 819 852 ; -C -1 ; W0X 1000 ; N 2533 ; B 167 -111 830 848 ; -C -1 ; W0X 1000 ; N 2534 ; B 158 -110 838 840 ; -C -1 ; W0X 1000 ; N 2535 ; B 137 -115 835 837 ; -C -1 ; W0X 1000 ; N 2536 ; B 129 -112 793 858 ; -C -1 ; W0X 1000 ; N 2537 ; B 131 -93 840 836 ; -C -1 ; W0X 1000 ; N 2538 ; B 170 -92 827 842 ; -C -1 ; W0X 1000 ; N 2539 ; B 159 -81 832 834 ; -C -1 ; W0X 1000 ; N 2540 ; B 163 -66 897 833 ; -C -1 ; W0X 1000 ; N 2541 ; B 176 -94 911 841 ; -C -1 ; W0X 1000 ; N 2542 ; B 190 -77 937 823 ; -C -1 ; W0X 1000 ; N 2543 ; B 188 -102 911 845 ; -C -1 ; W0X 1000 ; N 2544 ; B 188 -85 917 844 ; -C -1 ; W0X 1000 ; N 2545 ; B 184 -99 900 846 ; -C -1 ; W0X 1000 ; N 2546 ; B 141 -81 916 841 ; -C -1 ; W0X 1000 ; N 2547 ; B 144 -83 933 821 ; -C -1 ; W0X 1000 ; N 2548 ; B 172 -93 931 838 ; -C -1 ; W0X 1000 ; N 2549 ; B 203 -96 810 855 ; -C -1 ; W0X 1000 ; N 2550 ; B 223 -66 809 846 ; -C -1 ; W0X 1000 ; N 2551 ; B 242 -74 809 828 ; -C -1 ; W0X 1000 ; N 2552 ; B 249 -90 809 852 ; -C -1 ; W0X 1000 ; N 2553 ; B 217 -71 820 851 ; -C -1 ; W0X 1000 ; N 2554 ; B 248 -94 809 850 ; -C -1 ; W0X 1000 ; N 2555 ; B 201 -70 764 830 ; -C -1 ; W0X 1000 ; N 2556 ; B 210 -87 763 848 ; -C -1 ; W0X 1000 ; N 2557 ; B 198 -94 765 837 ; -C -1 ; W0X 1000 ; N 2558 ; B 219 -104 765 855 ; -C -1 ; W0X 1000 ; N 2559 ; B 199 -111 763 835 ; -C -1 ; W0X 1000 ; N 2560 ; B 215 -114 767 844 ; -C -1 ; W0X 1000 ; N 2561 ; B 144 -85 801 844 ; -C -1 ; W0X 1000 ; N 2562 ; B 218 -82 763 862 ; -C -1 ; W0X 1000 ; N 2563 ; B 161 41 874 737 ; -C -1 ; W0X 1000 ; N 2564 ; B 163 -86 816 860 ; -C -1 ; W0X 1000 ; N 2565 ; B 150 -65 822 821 ; -C -1 ; W0X 1000 ; N 2566 ; B 168 -112 833 879 ; -C -1 ; W0X 1000 ; N 2567 ; B 160 -95 811 835 ; -C -1 ; W0X 1000 ; N 2568 ; B 171 -105 818 851 ; -C -1 ; W0X 1000 ; N 2569 ; B 184 -81 825 834 ; -C -1 ; W0X 1000 ; N 2570 ; B 161 -111 818 854 ; -C -1 ; W0X 1000 ; N 2571 ; B 135 -59 726 843 ; -C -1 ; W0X 1000 ; N 2572 ; B 131 -72 730 854 ; -C -1 ; W0X 1000 ; N 2573 ; B 174 -67 764 845 ; -C -1 ; W0X 1000 ; N 2574 ; B 137 -95 724 839 ; -C -1 ; W0X 1000 ; N 2575 ; B 120 -92 709 869 ; -C -1 ; W0X 1000 ; N 2576 ; B 143 -91 720 845 ; -C -1 ; W0X 1000 ; N 2577 ; B 154 -111 738 853 ; -C -1 ; W0X 1000 ; N 2578 ; B 120 -93 715 863 ; -C -1 ; W0X 1000 ; N 2579 ; B 141 -91 781 855 ; -C -1 ; W0X 1000 ; N 2580 ; B 150 -107 751 857 ; -C -1 ; W0X 1000 ; N 2581 ; B 190 -90 766 818 ; -C -1 ; W0X 1000 ; N 2582 ; B 213 -84 764 848 ; -C -1 ; W0X 1000 ; N 2583 ; B 206 -74 764 846 ; -C -1 ; W0X 1000 ; N 2584 ; B 247 -93 763 852 ; -C -1 ; W0X 1000 ; N 2585 ; B 210 -100 765 846 ; -C -1 ; W0X 1000 ; N 2586 ; B 243 -89 766 853 ; -C -1 ; W0X 1000 ; N 2587 ; B 124 -90 817 844 ; -C -1 ; W0X 1000 ; N 2588 ; B 204 -109 763 862 ; -C -1 ; W0X 1000 ; N 2589 ; B 179 -94 809 861 ; -C -1 ; W0X 1000 ; N 2590 ; B 188 -99 809 859 ; -C -1 ; W0X 1000 ; N 2591 ; B 214 -73 811 837 ; -C -1 ; W0X 1000 ; N 2592 ; B 217 -92 809 840 ; -C -1 ; W0X 1000 ; N 2593 ; B 243 -87 811 844 ; -C -1 ; W0X 1000 ; N 2594 ; B 237 -111 809 857 ; -C -1 ; W0X 1000 ; N 2595 ; B 191 -107 809 861 ; -C -1 ; W0X 1000 ; N 2596 ; B 177 -87 763 844 ; -C -1 ; W0X 1000 ; N 2597 ; B 247 -95 810 843 ; -C -1 ; W0X 1000 ; N 2598 ; B 187 -102 760 837 ; -C -1 ; W0X 1000 ; N 2599 ; B 232 -103 765 824 ; -C -1 ; W0X 1000 ; N 2600 ; B 223 -97 766 831 ; -C -1 ; W0X 1000 ; N 2601 ; B 224 -99 765 853 ; -C -1 ; W0X 1000 ; N 2602 ; B 182 -72 807 820 ; -C -1 ; W0X 1000 ; N 2603 ; B 203 -97 765 850 ; -C -1 ; W0X 1000 ; N 2604 ; B 170 -82 777 853 ; -C -1 ; W0X 1000 ; N 2605 ; B 148 -106 771 851 ; -C -1 ; W0X 1000 ; N 2606 ; B 133 -105 767 851 ; -C -1 ; W0X 1000 ; N 2607 ; B 135 -103 721 860 ; -C -1 ; W0X 1000 ; N 2608 ; B 139 -113 728 854 ; -C -1 ; W0X 1000 ; N 2609 ; B 125 -115 720 864 ; -C -1 ; W0X 1000 ; N 2610 ; B 124 -99 794 840 ; -C -1 ; W0X 1000 ; N 2611 ; B 123 -112 729 865 ; -C -1 ; W0X 1000 ; N 2612 ; B 141 -111 772 863 ; -C -1 ; W0X 1000 ; N 2613 ; B 146 68 923 681 ; -C -1 ; W0X 1000 ; N 2614 ; B 161 -64 858 812 ; -C -1 ; W0X 1000 ; N 2615 ; B 117 -55 814 809 ; -C -1 ; W0X 1000 ; N 2616 ; B 128 -84 806 842 ; -C -1 ; W0X 1000 ; N 2617 ; B 146 -89 804 844 ; -C -1 ; W0X 1000 ; N 2618 ; B 114 -113 823 852 ; -C -1 ; W0X 1000 ; N 2619 ; B 189 -97 847 854 ; -C -1 ; W0X 1000 ; N 2620 ; B 155 -77 838 833 ; -C -1 ; W0X 1000 ; N 2621 ; B 145 -81 886 849 ; -C -1 ; W0X 1000 ; N 2622 ; B 164 -83 817 849 ; -C -1 ; W0X 1000 ; N 2623 ; B 169 -87 837 845 ; -C -1 ; W0X 1000 ; N 2624 ; B 179 -76 859 848 ; -C -1 ; W0X 1000 ; N 2625 ; B 146 -104 818 866 ; -C -1 ; W0X 1000 ; N 2626 ; B 113 -86 793 851 ; -C -1 ; W0X 1000 ; N 2627 ; B 159 -107 837 867 ; -C -1 ; W0X 1000 ; N 2628 ; B 206 -52 763 820 ; -C -1 ; W0X 1000 ; N 2629 ; B 230 -79 764 827 ; -C -1 ; W0X 1000 ; N 2630 ; B 254 -95 765 844 ; -C -1 ; W0X 1000 ; N 2631 ; B 241 -108 761 846 ; -C -1 ; W0X 1000 ; N 2632 ; B 181 -82 777 826 ; -C -1 ; W0X 1000 ; N 2633 ; B 193 -66 763 823 ; -C -1 ; W0X 1000 ; N 2634 ; B 241 -67 764 840 ; -C -1 ; W0X 1000 ; N 2635 ; B 225 -71 763 832 ; -C -1 ; W0X 1000 ; N 2636 ; B 244 -93 763 846 ; -C -1 ; W0X 1000 ; N 2637 ; B 259 -90 760 846 ; -C -1 ; W0X 1000 ; N 2638 ; B 262 -77 765 840 ; -C -1 ; W0X 1000 ; N 2639 ; B 257 -94 763 833 ; -C -1 ; W0X 1000 ; N 2640 ; B 259 -103 763 838 ; -C -1 ; W0X 1000 ; N 2641 ; B 266 -91 763 841 ; -C -1 ; W0X 1000 ; N 2642 ; B 192 -58 783 817 ; -C -1 ; W0X 1000 ; N 2643 ; B 140 -80 845 830 ; -C -1 ; W0X 1000 ; N 2644 ; B 224 -97 763 845 ; -C -1 ; W0X 1000 ; N 2645 ; B 251 -65 783 821 ; -C -1 ; W0X 1000 ; N 2646 ; B 247 -87 771 827 ; -C -1 ; W0X 1000 ; N 2647 ; B 127 -67 881 825 ; -C -1 ; W0X 1000 ; N 2648 ; B 144 -90 938 811 ; -C -1 ; W0X 1000 ; N 2649 ; B 139 -51 930 825 ; -C -1 ; W0X 1000 ; N 2650 ; B 132 -108 920 833 ; -C -1 ; W0X 1000 ; N 2651 ; B 152 -70 926 844 ; -C -1 ; W0X 1000 ; N 2652 ; B 172 -104 926 837 ; -C -1 ; W0X 1000 ; N 2653 ; B 169 -69 938 824 ; -C -1 ; W0X 1000 ; N 2654 ; B 154 -73 908 832 ; -C -1 ; W0X 1000 ; N 2655 ; B 150 -97 912 835 ; -C -1 ; W0X 1000 ; N 2656 ; B 143 -64 913 822 ; -C -1 ; W0X 1000 ; N 2657 ; B 86 -74 928 845 ; -C -1 ; W0X 1000 ; N 2658 ; B 101 -87 930 843 ; -C -1 ; W0X 1000 ; N 2659 ; B 140 -92 926 825 ; -C -1 ; W0X 1000 ; N 2660 ; B 118 -72 809 854 ; -C -1 ; W0X 1000 ; N 2661 ; B 197 -67 810 837 ; -C -1 ; W0X 1000 ; N 2662 ; B 198 -71 810 822 ; -C -1 ; W0X 1000 ; N 2663 ; B 206 -105 810 856 ; -C -1 ; W0X 1000 ; N 2664 ; B 185 -113 809 848 ; -C -1 ; W0X 1000 ; N 2665 ; B 181 -109 809 862 ; -C -1 ; W0X 1000 ; N 2666 ; B 200 -82 844 830 ; -C -1 ; W0X 1000 ; N 2667 ; B 162 -89 835 840 ; -C -1 ; W0X 1000 ; N 2668 ; B 144 -97 763 833 ; -C -1 ; W0X 1000 ; N 2669 ; B 105 -57 891 824 ; -C -1 ; W0X 1000 ; N 2670 ; B 151 -57 908 834 ; -C -1 ; W0X 1000 ; N 2671 ; B 144 -49 926 827 ; -C -1 ; W0X 1000 ; N 2672 ; B 162 -90 951 850 ; -C -1 ; W0X 1000 ; N 2673 ; B 151 -96 923 862 ; -C -1 ; W0X 1000 ; N 2674 ; B 164 -104 939 838 ; -C -1 ; W0X 1000 ; N 2675 ; B 158 -66 939 820 ; -C -1 ; W0X 1000 ; N 2676 ; B 154 -82 809 837 ; -C -1 ; W0X 1000 ; N 2677 ; B 229 -80 809 830 ; -C -1 ; W0X 1000 ; N 2678 ; B 198 -96 809 835 ; -C -1 ; W0X 1000 ; N 2679 ; B 218 -31 763 837 ; -C -1 ; W0X 1000 ; N 2680 ; B 248 -59 763 823 ; -C -1 ; W0X 1000 ; N 2681 ; B 219 -76 763 837 ; -C -1 ; W0X 1000 ; N 2682 ; B 249 -103 763 840 ; -C -1 ; W0X 1000 ; N 2683 ; B 241 -99 768 833 ; -C -1 ; W0X 1000 ; N 2684 ; B 248 -85 763 854 ; -C -1 ; W0X 1000 ; N 2685 ; B 245 -100 763 839 ; -C -1 ; W0X 1000 ; N 2686 ; B 200 -71 803 818 ; -C -1 ; W0X 1000 ; N 2687 ; B 241 -83 763 826 ; -C -1 ; W0X 1000 ; N 2688 ; B 229 -91 788 853 ; -C -1 ; W0X 1000 ; N 2689 ; B 208 -52 810 817 ; -C -1 ; W0X 1000 ; N 2690 ; B 243 -87 810 842 ; -C -1 ; W0X 1000 ; N 2691 ; B 241 -89 813 818 ; -C -1 ; W0X 1000 ; N 2692 ; B 267 -97 809 858 ; -C -1 ; W0X 1000 ; N 2693 ; B 254 -112 809 861 ; -C -1 ; W0X 1000 ; N 2694 ; B 267 -100 809 865 ; -C -1 ; W0X 1000 ; N 2695 ; B 179 -89 809 832 ; -C -1 ; W0X 1000 ; N 2696 ; B 238 -99 809 855 ; -C -1 ; W0X 1000 ; N 2697 ; B 195 -62 763 836 ; -C -1 ; W0X 1000 ; N 2698 ; B 215 -56 763 849 ; -C -1 ; W0X 1000 ; N 2699 ; B 218 -93 763 859 ; -C -1 ; W0X 1000 ; N 2700 ; B 243 -73 768 852 ; -C -1 ; W0X 1000 ; N 2701 ; B 242 -102 763 846 ; -C -1 ; W0X 1000 ; N 2702 ; B 126 -106 836 841 ; -C -1 ; W0X 1000 ; N 2703 ; B 219 -101 766 850 ; -C -1 ; W0X 1000 ; N 2704 ; B 203 -65 809 825 ; -C -1 ; W0X 1000 ; N 2705 ; B 105 56 880 725 ; -C -1 ; W0X 1000 ; N 2706 ; B 143 -69 820 828 ; -C -1 ; W0X 1000 ; N 2707 ; B 155 -59 836 796 ; -C -1 ; W0X 1000 ; N 2708 ; B 154 -88 821 852 ; -C -1 ; W0X 1000 ; N 2709 ; B 95 -101 819 825 ; -C -1 ; W0X 1000 ; N 2710 ; B 114 -99 810 825 ; -C -1 ; W0X 1000 ; N 2711 ; B 136 -90 808 843 ; -C -1 ; W0X 1000 ; N 2712 ; B 146 -90 835 819 ; -C -1 ; W0X 1000 ; N 2713 ; B 129 -66 781 823 ; -C -1 ; W0X 1000 ; N 2714 ; B 121 -62 776 790 ; -C -1 ; W0X 1000 ; N 2715 ; B 120 -79 788 841 ; -C -1 ; W0X 1000 ; N 2716 ; B 121 -82 792 856 ; -C -1 ; W0X 1000 ; N 2717 ; B 152 -84 911 821 ; -C -1 ; W0X 1000 ; N 2718 ; B 190 -86 934 839 ; -C -1 ; W0X 1000 ; N 2719 ; B 175 -102 905 849 ; -C -1 ; W0X 1000 ; N 2720 ; B 167 -114 931 846 ; -C -1 ; W0X 1000 ; N 2721 ; B 159 -51 937 823 ; -C -1 ; W0X 1000 ; N 2722 ; B 175 -94 922 837 ; -C -1 ; W0X 1000 ; N 2723 ; B 210 -85 810 844 ; -C -1 ; W0X 1000 ; N 2724 ; B 200 -61 877 841 ; -C -1 ; W0X 1000 ; N 2725 ; B 218 -103 809 862 ; -C -1 ; W0X 1000 ; N 2726 ; B 193 -84 763 854 ; -C -1 ; W0X 1000 ; N 2727 ; B 234 -77 763 826 ; -C -1 ; W0X 1000 ; N 2728 ; B 228 -95 763 853 ; -C -1 ; W0X 1000 ; N 2729 ; B 223 -106 763 866 ; -C -1 ; W0X 1000 ; N 2730 ; B 222 -106 763 860 ; -C -1 ; W0X 1000 ; N 2731 ; B 178 -56 765 812 ; -C -1 ; W0X 1000 ; N 2732 ; B 238 -91 763 846 ; -C -1 ; W0X 1000 ; N 2733 ; B 158 18 860 729 ; -C -1 ; W0X 1000 ; N 2734 ; B 145 -82 791 840 ; -C -1 ; W0X 1000 ; N 2735 ; B 177 -78 806 811 ; -C -1 ; W0X 1000 ; N 2736 ; B 123 -93 768 859 ; -C -1 ; W0X 1000 ; N 2737 ; B 146 -39 774 820 ; -C -1 ; W0X 1000 ; N 2738 ; B 148 -96 759 851 ; -C -1 ; W0X 1000 ; N 2739 ; B 159 -70 772 848 ; -C -1 ; W0X 1000 ; N 2740 ; B 111 -105 727 867 ; -C -1 ; W0X 1000 ; N 2741 ; B 129 -105 752 866 ; -C -1 ; W0X 1000 ; N 2742 ; B 148 -88 762 821 ; -C -1 ; W0X 1000 ; N 2743 ; B 146 -84 744 856 ; -C -1 ; W0X 1000 ; N 2744 ; B 145 -101 727 855 ; -C -1 ; W0X 1000 ; N 2745 ; B 149 -79 800 825 ; -C -1 ; W0X 1000 ; N 2746 ; B 147 -87 764 852 ; -C -1 ; W0X 1000 ; N 2747 ; B 186 -60 763 845 ; -C -1 ; W0X 1000 ; N 2748 ; B 127 -104 842 840 ; -C -1 ; W0X 1000 ; N 2749 ; B 183 -92 809 848 ; -C -1 ; W0X 1000 ; N 2750 ; B 172 -75 764 845 ; -C -1 ; W0X 1000 ; N 2751 ; B 191 -97 763 843 ; -C -1 ; W0X 1000 ; N 2752 ; B 199 -70 763 846 ; -C -1 ; W0X 1000 ; N 2753 ; B 197 -108 763 847 ; -C -1 ; W0X 1000 ; N 2754 ; B 207 -116 763 849 ; -C -1 ; W0X 1000 ; N 2755 ; B 221 -112 763 853 ; -C -1 ; W0X 1000 ; N 2756 ; B 199 -83 797 845 ; -C -1 ; W0X 1000 ; N 2757 ; B 149 -69 772 834 ; -C -1 ; W0X 1000 ; N 2758 ; B 150 -79 776 843 ; -C -1 ; W0X 1000 ; N 2759 ; B 134 -113 736 871 ; -C -1 ; W0X 1000 ; N 2760 ; B 123 -116 746 874 ; -C -1 ; W0X 1000 ; N 2761 ; B 151 42 895 711 ; -C -1 ; W0X 1000 ; N 2762 ; B 90 -70 820 834 ; -C -1 ; W0X 1000 ; N 2763 ; B 118 -37 821 832 ; -C -1 ; W0X 1000 ; N 2764 ; B 126 -93 810 853 ; -C -1 ; W0X 1000 ; N 2765 ; B 128 -85 824 837 ; -C -1 ; W0X 1000 ; N 2766 ; B 149 -84 834 869 ; -C -1 ; W0X 1000 ; N 2767 ; B 142 -87 833 839 ; -C -1 ; W0X 1000 ; N 2768 ; B 151 -78 835 835 ; -C -1 ; W0X 1000 ; N 2769 ; B 145 -59 763 817 ; -C -1 ; W0X 1000 ; N 2770 ; B 186 -85 763 827 ; -C -1 ; W0X 1000 ; N 2771 ; B 166 -69 763 820 ; -C -1 ; W0X 1000 ; N 2772 ; B 186 -89 764 836 ; -C -1 ; W0X 1000 ; N 2773 ; B 171 -100 767 841 ; -C -1 ; W0X 1000 ; N 2774 ; B 185 -94 785 849 ; -C -1 ; W0X 1000 ; N 2775 ; B 207 -111 765 850 ; -C -1 ; W0X 1000 ; N 2776 ; B 154 -102 764 869 ; -C -1 ; W0X 1000 ; N 2777 ; B 166 -78 787 818 ; -C -1 ; W0X 1000 ; N 2778 ; B 171 -74 763 853 ; -C -1 ; W0X 1000 ; N 2779 ; B 201 -42 805 857 ; -C -1 ; W0X 1000 ; N 2780 ; B 180 -102 763 855 ; -C -1 ; W0X 1000 ; N 2781 ; B 182 -92 767 844 ; -C -1 ; W0X 1000 ; N 2782 ; B 66 -52 893 834 ; -C -1 ; W0X 1000 ; N 2783 ; B 116 -86 923 828 ; -C -1 ; W0X 1000 ; N 2784 ; B 127 -83 916 801 ; -C -1 ; W0X 1000 ; N 2785 ; B 142 -99 918 826 ; -C -1 ; W0X 1000 ; N 2786 ; B 140 -69 927 840 ; -C -1 ; W0X 1000 ; N 2787 ; B 122 -74 923 845 ; -C -1 ; W0X 1000 ; N 2788 ; B 115 -88 908 819 ; -C -1 ; W0X 1000 ; N 2789 ; B 96 -107 930 858 ; -C -1 ; W0X 1000 ; N 2790 ; B 98 -63 928 835 ; -C -1 ; W0X 1000 ; N 2791 ; B 89 -105 925 839 ; -C -1 ; W0X 1000 ; N 2792 ; B 126 -70 927 846 ; -C -1 ; W0X 1000 ; N 2793 ; B 133 -80 811 829 ; -C -1 ; W0X 1000 ; N 2794 ; B 182 -81 809 846 ; -C -1 ; W0X 1000 ; N 2795 ; B 133 -78 809 817 ; -C -1 ; W0X 1000 ; N 2796 ; B 193 -94 812 857 ; -C -1 ; W0X 1000 ; N 2797 ; B 181 -118 809 864 ; -C -1 ; W0X 1000 ; N 2798 ; B 170 -114 810 860 ; -C -1 ; W0X 1000 ; N 2799 ; B 191 -96 845 833 ; -C -1 ; W0X 1000 ; N 2800 ; B 118 -89 858 840 ; -C -1 ; W0X 1000 ; N 2801 ; B 196 -99 810 840 ; -C -1 ; W0X 1000 ; N 2802 ; B 129 -59 896 824 ; -C -1 ; W0X 1000 ; N 2803 ; B 125 -73 930 802 ; -C -1 ; W0X 1000 ; N 2804 ; B 104 -68 933 829 ; -C -1 ; W0X 1000 ; N 2805 ; B 118 -81 762 843 ; -C -1 ; W0X 1000 ; N 2806 ; B 176 -66 764 838 ; -C -1 ; W0X 1000 ; N 2807 ; B 169 -76 763 830 ; -C -1 ; W0X 1000 ; N 2808 ; B 194 -84 765 847 ; -C -1 ; W0X 1000 ; N 2809 ; B 206 -86 765 842 ; -C -1 ; W0X 1000 ; N 2810 ; B 206 -111 763 856 ; -C -1 ; W0X 1000 ; N 2811 ; B 170 -88 792 826 ; -C -1 ; W0X 1000 ; N 2812 ; B 146 -72 826 841 ; -C -1 ; W0X 1000 ; N 2813 ; B 168 -88 764 841 ; -C -1 ; W0X 1000 ; N 2814 ; B 140 -66 810 819 ; -C -1 ; W0X 1000 ; N 2815 ; B 195 -89 812 847 ; -C -1 ; W0X 1000 ; N 2816 ; B 124 -70 763 840 ; -C -1 ; W0X 1000 ; N 2817 ; B 168 -93 836 836 ; -C -1 ; W0X 1000 ; N 2818 ; B 141 39 919 680 ; -C -1 ; W0X 1000 ; N 2819 ; B 149 -85 880 830 ; -C -1 ; W0X 1000 ; N 2820 ; B 153 -73 844 791 ; -C -1 ; W0X 1000 ; N 2821 ; B 164 -80 809 838 ; -C -1 ; W0X 1000 ; N 2822 ; B 142 -89 834 825 ; -C -1 ; W0X 1000 ; N 2823 ; B 155 -97 838 829 ; -C -1 ; W0X 1000 ; N 2824 ; B 145 -75 849 814 ; -C -1 ; W0X 1000 ; N 2825 ; B 130 -76 830 833 ; -C -1 ; W0X 1000 ; N 2826 ; B 174 -88 878 841 ; -C -1 ; W0X 1000 ; N 2827 ; B 61 -102 908 868 ; -C -1 ; W0X 1000 ; N 2828 ; B 159 -86 911 833 ; -C -1 ; W0X 1000 ; N 2829 ; B 149 -104 927 853 ; -C -1 ; W0X 1000 ; N 2830 ; B 51 -74 911 868 ; -C -1 ; W0X 1000 ; N 2831 ; B 123 -86 809 852 ; -C -1 ; W0X 1000 ; N 2832 ; B 147 -53 849 852 ; -C -1 ; W0X 1000 ; N 2833 ; B 155 -105 763 842 ; -C -1 ; W0X 1000 ; N 2834 ; B 190 -69 765 830 ; -C -1 ; W0X 1000 ; N 2835 ; B 205 -114 765 871 ; -C -1 ; W0X 1000 ; N 2836 ; B 208 -91 763 847 ; -C -1 ; W0X 1000 ; N 2837 ; B 218 -100 765 861 ; -C -1 ; W0X 1000 ; N 2838 ; B 126 -87 816 839 ; -C -1 ; W0X 1000 ; N 2839 ; B 130 -35 766 803 ; -C -1 ; W0X 1000 ; N 2840 ; B 147 -91 813 844 ; -C -1 ; W0X 1000 ; N 2841 ; B 185 -80 827 826 ; -C -1 ; W0X 1000 ; N 2842 ; B 145 -102 810 861 ; -C -1 ; W0X 1000 ; N 2843 ; B 136 -109 795 845 ; -C -1 ; W0X 1000 ; N 2844 ; B 156 -96 796 847 ; -C -1 ; W0X 1000 ; N 2845 ; B 167 -90 801 840 ; -C -1 ; W0X 1000 ; N 2846 ; B 142 -80 765 850 ; -C -1 ; W0X 1000 ; N 2847 ; B 158 -91 830 866 ; -C -1 ; W0X 1000 ; N 2848 ; B 166 -105 764 868 ; -C -1 ; W0X 1000 ; N 2849 ; B 123 -71 765 847 ; -C -1 ; W0X 1000 ; N 2850 ; B 93 -111 803 830 ; -C -1 ; W0X 1000 ; N 2851 ; B 103 60 928 740 ; -C -1 ; W0X 1000 ; N 2852 ; B 122 -99 874 833 ; -C -1 ; W0X 1000 ; N 2853 ; B 130 -86 885 805 ; -C -1 ; W0X 1000 ; N 2854 ; B 98 -65 871 839 ; -C -1 ; W0X 1000 ; N 2855 ; B 27 -86 764 844 ; -C -1 ; W0X 1000 ; N 2856 ; B 88 -82 766 842 ; -C -1 ; W0X 1000 ; N 2857 ; B 91 -77 765 836 ; -C -1 ; W0X 1000 ; N 2858 ; B 132 -100 766 860 ; -C -1 ; W0X 1000 ; N 2859 ; B 125 -112 766 844 ; -C -1 ; W0X 1000 ; N 2860 ; B 121 -100 763 851 ; -C -1 ; W0X 1000 ; N 2861 ; B 135 -84 766 848 ; -C -1 ; W0X 1000 ; N 2862 ; B 123 -81 779 842 ; -C -1 ; W0X 1000 ; N 2863 ; B 153 -104 765 851 ; -C -1 ; W0X 1000 ; N 2864 ; B 115 -72 891 821 ; -C -1 ; W0X 1000 ; N 2865 ; B 157 -72 928 834 ; -C -1 ; W0X 1000 ; N 2866 ; B 147 -56 948 818 ; -C -1 ; W0X 1000 ; N 2867 ; B 161 -101 925 848 ; -C -1 ; W0X 1000 ; N 2868 ; B 153 -93 933 847 ; -C -1 ; W0X 1000 ; N 2869 ; B 150 -99 918 833 ; -C -1 ; W0X 1000 ; N 2870 ; B 140 -105 929 856 ; -C -1 ; W0X 1000 ; N 2871 ; B 142 -67 936 821 ; -C -1 ; W0X 1000 ; N 2872 ; B 85 -83 923 821 ; -C -1 ; W0X 1000 ; N 2873 ; B 122 -97 932 844 ; -C -1 ; W0X 1000 ; N 2874 ; B 171 -70 926 842 ; -C -1 ; W0X 1000 ; N 2875 ; B 176 -66 808 825 ; -C -1 ; W0X 1000 ; N 2876 ; B 188 -86 809 829 ; -C -1 ; W0X 1000 ; N 2877 ; B 231 -77 810 833 ; -C -1 ; W0X 1000 ; N 2878 ; B 202 -107 810 845 ; -C -1 ; W0X 1000 ; N 2879 ; B 210 -98 810 859 ; -C -1 ; W0X 1000 ; N 2880 ; B 232 -95 808 854 ; -C -1 ; W0X 1000 ; N 2881 ; B 205 -79 819 833 ; -C -1 ; W0X 1000 ; N 2882 ; B 161 -76 894 836 ; -C -1 ; W0X 1000 ; N 2883 ; B 224 -87 809 850 ; -C -1 ; W0X 1000 ; N 2884 ; B 102 -91 921 861 ; -C -1 ; W0X 1000 ; N 2885 ; B 140 -59 940 807 ; -C -1 ; W0X 1000 ; N 2886 ; B 148 -104 942 835 ; -C -1 ; W0X 1000 ; N 2887 ; B 175 -94 941 843 ; -C -1 ; W0X 1000 ; N 2888 ; B 171 -96 944 849 ; -C -1 ; W0X 1000 ; N 2889 ; B 179 -92 932 822 ; -C -1 ; W0X 1000 ; N 2890 ; B 218 -57 763 827 ; -C -1 ; W0X 1000 ; N 2891 ; B 242 -75 765 838 ; -C -1 ; W0X 1000 ; N 2892 ; B 254 -85 766 827 ; -C -1 ; W0X 1000 ; N 2893 ; B 257 -98 763 842 ; -C -1 ; W0X 1000 ; N 2894 ; B 250 -100 764 859 ; -C -1 ; W0X 1000 ; N 2895 ; B 262 -93 763 850 ; -C -1 ; W0X 1000 ; N 2896 ; B 178 -84 781 824 ; -C -1 ; W0X 1000 ; N 2897 ; B 130 -92 830 819 ; -C -1 ; W0X 1000 ; N 2898 ; B 246 -101 765 856 ; -C -1 ; W0X 1000 ; N 2899 ; B 243 -69 813 823 ; -C -1 ; W0X 1000 ; N 2900 ; B 255 -86 813 857 ; -C -1 ; W0X 1000 ; N 2901 ; B 253 -84 809 831 ; -C -1 ; W0X 1000 ; N 2902 ; B 264 -106 809 852 ; -C -1 ; W0X 1000 ; N 2903 ; B 249 -100 811 857 ; -C -1 ; W0X 1000 ; N 2904 ; B 271 -99 809 853 ; -C -1 ; W0X 1000 ; N 2905 ; B 207 -93 826 835 ; -C -1 ; W0X 1000 ; N 2906 ; B 292 -96 813 842 ; -C -1 ; W0X 1000 ; N 2907 ; B 221 -89 764 854 ; -C -1 ; W0X 1000 ; N 2908 ; B 242 -87 763 840 ; -C -1 ; W0X 1000 ; N 2909 ; B 139 -99 847 834 ; -C -1 ; W0X 1000 ; N 2910 ; B 219 -85 809 827 ; -C -1 ; W0X 1000 ; N 2911 ; B 238 -82 810 833 ; -C -1 ; W0X 1000 ; N 2912 ; B 237 -100 808 835 ; -C -1 ; W0X 1000 ; N 2913 ; B 141 -29 859 729 ; -C -1 ; W0X 1000 ; N 2914 ; B 137 -86 831 858 ; -C -1 ; W0X 1000 ; N 2915 ; B 180 -72 813 846 ; -C -1 ; W0X 1000 ; N 2916 ; B 179 -104 809 858 ; -C -1 ; W0X 1000 ; N 2917 ; B 164 -107 821 851 ; -C -1 ; W0X 1000 ; N 2918 ; B 147 -115 797 869 ; -C -1 ; W0X 1000 ; N 2919 ; B 150 -74 821 835 ; -C -1 ; W0X 1000 ; N 2920 ; B 146 -107 810 858 ; -C -1 ; W0X 1000 ; N 2921 ; B 178 -94 901 812 ; -C -1 ; W0X 1000 ; N 2922 ; B 185 -53 899 805 ; -C -1 ; W0X 1000 ; N 2923 ; B 192 -108 905 830 ; -C -1 ; W0X 1000 ; N 2924 ; B 196 -99 922 825 ; -C -1 ; W0X 1000 ; N 2925 ; B 240 -92 763 819 ; -C -1 ; W0X 1000 ; N 2926 ; B 216 -76 766 842 ; -C -1 ; W0X 1000 ; N 2927 ; B 231 -104 763 845 ; -C -1 ; W0X 1000 ; N 2928 ; B 220 -123 763 834 ; -C -1 ; W0X 1000 ; N 2929 ; B 235 -126 761 848 ; -C -1 ; W0X 1000 ; N 2930 ; B 158 -85 805 840 ; -C -1 ; W0X 1000 ; N 2931 ; B 238 -106 766 856 ; -C -1 ; W0X 1000 ; N 2932 ; B 191 -55 901 729 ; -C -1 ; W0X 1000 ; N 2933 ; B 152 -104 774 875 ; -C -1 ; W0X 1000 ; N 2934 ; B 127 -81 762 846 ; -C -1 ; W0X 1000 ; N 2935 ; B 122 -101 757 872 ; -C -1 ; W0X 1000 ; N 2936 ; B 144 -94 735 858 ; -C -1 ; W0X 1000 ; N 2937 ; B 135 -100 767 868 ; -C -1 ; W0X 1000 ; N 2938 ; B 147 -100 711 862 ; -C -1 ; W0X 1000 ; N 2939 ; B 144 -97 724 860 ; -C -1 ; W0X 1000 ; N 2940 ; B 143 -83 765 834 ; -C -1 ; W0X 1000 ; N 2941 ; B 137 -101 726 847 ; -C -1 ; W0X 1000 ; N 2942 ; B 212 -95 766 855 ; -C -1 ; W0X 1000 ; N 2943 ; B 147 -99 835 833 ; -C -1 ; W0X 1000 ; N 2944 ; B 211 -60 810 835 ; -C -1 ; W0X 1000 ; N 2945 ; B 230 -83 811 848 ; -C -1 ; W0X 1000 ; N 2946 ; B 182 -76 764 851 ; -C -1 ; W0X 1000 ; N 2947 ; B 232 -75 766 860 ; -C -1 ; W0X 1000 ; N 2948 ; B 220 -106 764 845 ; -C -1 ; W0X 1000 ; N 2949 ; B 228 -122 766 844 ; -C -1 ; W0X 1000 ; N 2950 ; B 204 -106 764 865 ; -C -1 ; W0X 1000 ; N 2951 ; B 156 -96 773 833 ; -C -1 ; W0X 1000 ; N 2952 ; B 216 -96 763 838 ; -C -1 ; W0X 1000 ; N 2953 ; B 130 -89 727 829 ; -C -1 ; W0X 1000 ; N 2954 ; B 125 -105 716 857 ; -C -1 ; W0X 1000 ; N 2955 ; B 137 -119 703 864 ; -C -1 ; W0X 1000 ; N 2956 ; B 138 -110 695 856 ; -C -1 ; W0X 1000 ; N 2957 ; B 157 -109 708 832 ; -C -1 ; W0X 1000 ; N 2958 ; B 138 -27 877 725 ; -C -1 ; W0X 1000 ; N 2959 ; B 154 -101 828 859 ; -C -1 ; W0X 1000 ; N 2960 ; B 180 -90 831 829 ; -C -1 ; W0X 1000 ; N 2961 ; B 155 -100 752 857 ; -C -1 ; W0X 1000 ; N 2962 ; B 162 -96 774 845 ; -C -1 ; W0X 1000 ; N 2963 ; B 148 -113 749 855 ; -C -1 ; W0X 1000 ; N 2964 ; B 141 -84 785 849 ; -C -1 ; W0X 1000 ; N 2965 ; B 158 -92 808 857 ; -C -1 ; W0X 1000 ; N 2966 ; B 160 -65 764 831 ; -C -1 ; W0X 1000 ; N 2967 ; B 196 -77 765 831 ; -C -1 ; W0X 1000 ; N 2968 ; B 189 -76 766 816 ; -C -1 ; W0X 1000 ; N 2969 ; B 200 -96 764 831 ; -C -1 ; W0X 1000 ; N 2970 ; B 186 -107 765 854 ; -C -1 ; W0X 1000 ; N 2971 ; B 188 -100 763 855 ; -C -1 ; W0X 1000 ; N 2972 ; B 206 -105 763 835 ; -C -1 ; W0X 1000 ; N 2973 ; B 205 -103 763 855 ; -C -1 ; W0X 1000 ; N 2974 ; B 147 -72 803 835 ; -C -1 ; W0X 1000 ; N 2975 ; B 197 -88 765 844 ; -C -1 ; W0X 1000 ; N 2976 ; B 128 -62 910 804 ; -C -1 ; W0X 1000 ; N 2977 ; B 194 -77 935 844 ; -C -1 ; W0X 1000 ; N 2978 ; B 189 -44 946 815 ; -C -1 ; W0X 1000 ; N 2979 ; B 212 -87 919 834 ; -C -1 ; W0X 1000 ; N 2980 ; B 203 -99 923 820 ; -C -1 ; W0X 1000 ; N 2981 ; B 189 -78 922 853 ; -C -1 ; W0X 1000 ; N 2982 ; B 132 -60 942 810 ; -C -1 ; W0X 1000 ; N 2983 ; B 181 -80 951 824 ; -C -1 ; W0X 1000 ; N 2984 ; B 215 -89 809 834 ; -C -1 ; W0X 1000 ; N 2985 ; B 258 -75 812 836 ; -C -1 ; W0X 1000 ; N 2986 ; B 212 -83 812 816 ; -C -1 ; W0X 1000 ; N 2987 ; B 254 -94 810 845 ; -C -1 ; W0X 1000 ; N 2988 ; B 232 -104 813 825 ; -C -1 ; W0X 1000 ; N 2989 ; B 257 -88 810 842 ; -C -1 ; W0X 1000 ; N 2990 ; B 188 -84 841 838 ; -C -1 ; W0X 1000 ; N 2991 ; B 183 -86 890 831 ; -C -1 ; W0X 1000 ; N 2992 ; B 240 -94 813 834 ; -C -1 ; W0X 1000 ; N 2993 ; B 169 -55 894 818 ; -C -1 ; W0X 1000 ; N 2994 ; B 184 -70 956 826 ; -C -1 ; W0X 1000 ; N 2995 ; B 199 -79 943 807 ; -C -1 ; W0X 1000 ; N 2996 ; B 208 -80 764 818 ; -C -1 ; W0X 1000 ; N 2997 ; B 215 -71 764 826 ; -C -1 ; W0X 1000 ; N 2998 ; B 227 -73 768 831 ; -C -1 ; W0X 1000 ; N 2999 ; B 237 -94 765 837 ; -C -1 ; W0X 1000 ; N 3000 ; B 235 -104 764 829 ; -C -1 ; W0X 1000 ; N 3001 ; B 226 -89 764 840 ; -C -1 ; W0X 1000 ; N 3002 ; B 230 -92 764 839 ; -C -1 ; W0X 1000 ; N 3003 ; B 169 -85 793 823 ; -C -1 ; W0X 1000 ; N 3004 ; B 125 -72 816 835 ; -C -1 ; W0X 1000 ; N 3005 ; B 234 -88 765 848 ; -C -1 ; W0X 1000 ; N 3006 ; B 220 -77 813 824 ; -C -1 ; W0X 1000 ; N 3007 ; B 255 -76 810 834 ; -C -1 ; W0X 1000 ; N 3008 ; B 229 -77 809 815 ; -C -1 ; W0X 1000 ; N 3009 ; B 242 -98 813 854 ; -C -1 ; W0X 1000 ; N 3010 ; B 236 -95 813 843 ; -C -1 ; W0X 1000 ; N 3011 ; B 242 -96 809 856 ; -C -1 ; W0X 1000 ; N 3012 ; B 213 -65 828 830 ; -C -1 ; W0X 1000 ; N 3013 ; B 243 -79 809 848 ; -C -1 ; W0X 1000 ; N 3014 ; B 197 -72 766 838 ; -C -1 ; W0X 1000 ; N 3015 ; B 224 -84 760 818 ; -C -1 ; W0X 1000 ; N 3016 ; B 227 -99 763 854 ; -C -1 ; W0X 1000 ; N 3017 ; B 241 -96 764 844 ; -C -1 ; W0X 1000 ; N 3018 ; B 229 -99 765 846 ; -C -1 ; W0X 1000 ; N 3019 ; B 185 -89 801 830 ; -C -1 ; W0X 1000 ; N 3020 ; B 152 -70 858 839 ; -C -1 ; W0X 1000 ; N 3021 ; B 228 -95 763 851 ; -C -1 ; W0X 1000 ; N 3022 ; B 189 -64 809 844 ; -C -1 ; W0X 1000 ; N 3023 ; B 143 99 876 705 ; -C -1 ; W0X 1000 ; N 3024 ; B 121 -59 834 820 ; -C -1 ; W0X 1000 ; N 3025 ; B 112 -39 827 764 ; -C -1 ; W0X 1000 ; N 3026 ; B 113 -95 822 839 ; -C -1 ; W0X 1000 ; N 3027 ; B 118 -89 798 811 ; -C -1 ; W0X 1000 ; N 3028 ; B 122 -84 806 828 ; -C -1 ; W0X 1000 ; N 3029 ; B 109 -58 821 782 ; -C -1 ; W0X 1000 ; N 3030 ; B 146 -76 863 808 ; -C -1 ; W0X 1000 ; N 3031 ; B 141 -52 906 827 ; -C -1 ; W0X 1000 ; N 3032 ; B 156 -74 921 835 ; -C -1 ; W0X 1000 ; N 3033 ; B 171 -78 938 816 ; -C -1 ; W0X 1000 ; N 3034 ; B 196 -94 931 832 ; -C -1 ; W0X 1000 ; N 3035 ; B 168 -94 923 834 ; -C -1 ; W0X 1000 ; N 3036 ; B 186 -85 939 829 ; -C -1 ; W0X 1000 ; N 3037 ; B 199 -65 809 848 ; -C -1 ; W0X 1000 ; N 3038 ; B 221 -89 809 858 ; -C -1 ; W0X 1000 ; N 3039 ; B 192 -84 763 838 ; -C -1 ; W0X 1000 ; N 3040 ; B 234 -80 762 835 ; -C -1 ; W0X 1000 ; N 3041 ; B 153 67 870 700 ; -C -1 ; W0X 1000 ; N 3042 ; B 125 -31 758 796 ; -C -1 ; W0X 1000 ; N 3043 ; B 134 -96 779 833 ; -C -1 ; W0X 1000 ; N 3044 ; B 149 -56 781 836 ; -C -1 ; W0X 1000 ; N 3045 ; B 136 -96 755 846 ; -C -1 ; W0X 1000 ; N 3046 ; B 151 -95 797 843 ; -C -1 ; W0X 1000 ; N 3047 ; B 144 -90 766 849 ; -C -1 ; W0X 1000 ; N 3048 ; B 155 -56 833 809 ; -C -1 ; W0X 1000 ; N 3049 ; B 162 -77 799 843 ; -C -1 ; W0X 1000 ; N 3050 ; B 178 -72 764 833 ; -C -1 ; W0X 1000 ; N 3051 ; B 168 -94 763 848 ; -C -1 ; W0X 1000 ; N 3052 ; B 186 -94 763 851 ; -C -1 ; W0X 1000 ; N 3053 ; B 206 -85 763 847 ; -C -1 ; W0X 1000 ; N 3054 ; B 171 -70 811 844 ; -C -1 ; W0X 1000 ; N 3055 ; B 201 -99 809 857 ; -C -1 ; W0X 1000 ; N 3056 ; B 144 -74 761 845 ; -C -1 ; W0X 1000 ; N 3057 ; B 189 -80 765 839 ; -C -1 ; W0X 1000 ; N 3058 ; B 187 -78 763 831 ; -C -1 ; W0X 1000 ; N 3059 ; B 187 -100 763 851 ; -C -1 ; W0X 1000 ; N 3060 ; B 213 -96 765 841 ; -C -1 ; W0X 1000 ; N 3061 ; B 212 -102 764 846 ; -C -1 ; W0X 1000 ; N 3062 ; B 196 -64 787 824 ; -C -1 ; W0X 1000 ; N 3063 ; B 213 -84 764 835 ; -C -1 ; W0X 1000 ; N 3064 ; B 133 -81 754 826 ; -C -1 ; W0X 1000 ; N 3065 ; B 161 -103 786 848 ; -C -1 ; W0X 1000 ; N 3066 ; B 151 -108 783 870 ; -C -1 ; W0X 1000 ; N 3067 ; B 144 -103 784 868 ; -C -1 ; W0X 1000 ; N 3068 ; B 98 119 921 705 ; -C -1 ; W0X 1000 ; N 3069 ; B 132 -50 842 800 ; -C -1 ; W0X 1000 ; N 3070 ; B 121 -42 842 788 ; -C -1 ; W0X 1000 ; N 3071 ; B 118 -95 818 841 ; -C -1 ; W0X 1000 ; N 3072 ; B 125 -60 824 823 ; -C -1 ; W0X 1000 ; N 3073 ; B 170 -82 864 841 ; -C -1 ; W0X 1000 ; N 3074 ; B 158 -71 874 806 ; -C -1 ; W0X 1000 ; N 3075 ; B 194 -57 764 855 ; -C -1 ; W0X 1000 ; N 3076 ; B 230 -65 765 842 ; -C -1 ; W0X 1000 ; N 3077 ; B 211 -75 765 840 ; -C -1 ; W0X 1000 ; N 3078 ; B 245 -96 764 824 ; -C -1 ; W0X 1000 ; N 3079 ; B 247 -89 764 835 ; -C -1 ; W0X 1000 ; N 3080 ; B 233 -92 763 850 ; -C -1 ; W0X 1000 ; N 3081 ; B 210 -43 817 821 ; -C -1 ; W0X 1000 ; N 3082 ; B 242 -87 765 842 ; -C -1 ; W0X 1000 ; N 3083 ; B 157 -81 893 844 ; -C -1 ; W0X 1000 ; N 3084 ; B 191 -82 957 823 ; -C -1 ; W0X 1000 ; N 3085 ; B 189 -75 938 811 ; -C -1 ; W0X 1000 ; N 3086 ; B 193 -91 931 838 ; -C -1 ; W0X 1000 ; N 3087 ; B 180 -96 908 853 ; -C -1 ; W0X 1000 ; N 3088 ; B 197 -97 919 840 ; -C -1 ; W0X 1000 ; N 3089 ; B 192 -95 940 855 ; -C -1 ; W0X 1000 ; N 3090 ; B 157 -84 960 840 ; -C -1 ; W0X 1000 ; N 3091 ; B 105 -66 917 826 ; -C -1 ; W0X 1000 ; N 3092 ; B 218 -86 937 832 ; -C -1 ; W0X 1000 ; N 3093 ; B 169 -85 810 839 ; -C -1 ; W0X 1000 ; N 3094 ; B 247 -80 809 827 ; -C -1 ; W0X 1000 ; N 3095 ; B 240 -75 809 824 ; -C -1 ; W0X 1000 ; N 3096 ; B 244 -97 810 858 ; -C -1 ; W0X 1000 ; N 3097 ; B 251 -88 810 845 ; -C -1 ; W0X 1000 ; N 3098 ; B 241 -89 809 858 ; -C -1 ; W0X 1000 ; N 3099 ; B 188 -76 839 849 ; -C -1 ; W0X 1000 ; N 3100 ; B 209 -80 900 844 ; -C -1 ; W0X 1000 ; N 3101 ; B 244 -94 810 856 ; -C -1 ; W0X 1000 ; N 3102 ; B 161 -69 912 845 ; -C -1 ; W0X 1000 ; N 3103 ; B 184 -88 952 839 ; -C -1 ; W0X 1000 ; N 3104 ; B 204 -67 764 829 ; -C -1 ; W0X 1000 ; N 3105 ; B 201 -84 766 851 ; -C -1 ; W0X 1000 ; N 3106 ; B 220 -71 765 831 ; -C -1 ; W0X 1000 ; N 3107 ; B 211 -84 765 849 ; -C -1 ; W0X 1000 ; N 3108 ; B 232 -70 764 846 ; -C -1 ; W0X 1000 ; N 3109 ; B 235 -100 763 817 ; -C -1 ; W0X 1000 ; N 3110 ; B 236 -95 766 857 ; -C -1 ; W0X 1000 ; N 3111 ; B 173 -92 805 825 ; -C -1 ; W0X 1000 ; N 3112 ; B 201 -81 854 819 ; -C -1 ; W0X 1000 ; N 3113 ; B 227 -94 764 829 ; -C -1 ; W0X 1000 ; N 3114 ; B 199 -85 811 828 ; -C -1 ; W0X 1000 ; N 3115 ; B 243 -86 813 834 ; -C -1 ; W0X 1000 ; N 3116 ; B 228 -70 809 831 ; -C -1 ; W0X 1000 ; N 3117 ; B 250 -89 809 846 ; -C -1 ; W0X 1000 ; N 3118 ; B 227 -113 810 858 ; -C -1 ; W0X 1000 ; N 3119 ; B 219 -107 809 852 ; -C -1 ; W0X 1000 ; N 3120 ; B 221 -101 834 825 ; -C -1 ; W0X 1000 ; N 3121 ; B 221 -89 809 841 ; -C -1 ; W0X 1000 ; N 3122 ; B 183 -66 766 841 ; -C -1 ; W0X 1000 ; N 3123 ; B 225 -58 763 827 ; -C -1 ; W0X 1000 ; N 3124 ; B 154 -73 841 828 ; -C -1 ; W0X 1000 ; N 3125 ; B 184 -77 810 841 ; -C -1 ; W0X 1000 ; N 3126 ; B 220 -67 810 829 ; -C -1 ; W0X 1000 ; N 3127 ; B 158 2 910 722 ; -C -1 ; W0X 1000 ; N 3128 ; B 171 -82 817 840 ; -C -1 ; W0X 1000 ; N 3129 ; B 170 -65 857 812 ; -C -1 ; W0X 1000 ; N 3130 ; B 158 -89 800 846 ; -C -1 ; W0X 1000 ; N 3131 ; B 158 -101 827 858 ; -C -1 ; W0X 1000 ; N 3132 ; B 136 -103 791 868 ; -C -1 ; W0X 1000 ; N 3133 ; B 174 -76 838 833 ; -C -1 ; W0X 1000 ; N 3134 ; B 157 -107 841 852 ; -C -1 ; W0X 1000 ; N 3135 ; B 136 -102 828 854 ; -C -1 ; W0X 1000 ; N 3136 ; B 174 -71 890 834 ; -C -1 ; W0X 1000 ; N 3137 ; B 192 -67 927 822 ; -C -1 ; W0X 1000 ; N 3138 ; B 218 -86 811 866 ; -C -1 ; W0X 1000 ; N 3139 ; B 222 -59 764 847 ; -C -1 ; W0X 1000 ; N 3140 ; B 232 -70 763 845 ; -C -1 ; W0X 1000 ; N 3141 ; B 175 -74 788 838 ; -C -1 ; W0X 1000 ; N 3142 ; B 247 -90 765 843 ; -C -1 ; W0X 1000 ; N 3143 ; B 168 -28 888 741 ; -C -1 ; W0X 1000 ; N 3144 ; B 141 -66 727 811 ; -C -1 ; W0X 1000 ; N 3145 ; B 152 -86 723 851 ; -C -1 ; W0X 1000 ; N 3146 ; B 108 -77 705 833 ; -C -1 ; W0X 1000 ; N 3147 ; B 129 -107 721 858 ; -C -1 ; W0X 1000 ; N 3148 ; B 139 -93 719 847 ; -C -1 ; W0X 1000 ; N 3149 ; B 126 -103 738 867 ; -C -1 ; W0X 1000 ; N 3150 ; B 137 -98 803 855 ; -C -1 ; W0X 1000 ; N 3151 ; B 141 -94 726 851 ; -C -1 ; W0X 1000 ; N 3152 ; B 201 -109 764 867 ; -C -1 ; W0X 1000 ; N 3153 ; B 194 -89 852 861 ; -C -1 ; W0X 1000 ; N 3154 ; B 201 -92 810 869 ; -C -1 ; W0X 1000 ; N 3155 ; B 160 -115 764 878 ; -C -1 ; W0X 1000 ; N 3156 ; B 210 -116 764 876 ; -C -1 ; W0X 1000 ; N 3157 ; B 220 -104 764 851 ; -C -1 ; W0X 1000 ; N 3158 ; B 216 -105 764 856 ; -C -1 ; W0X 1000 ; N 3159 ; B 233 -118 764 874 ; -C -1 ; W0X 1000 ; N 3160 ; B 227 -109 770 866 ; -C -1 ; W0X 1000 ; N 3161 ; B 196 -105 765 855 ; -C -1 ; W0X 1000 ; N 3162 ; B 108 -104 744 870 ; -C -1 ; W0X 1000 ; N 3163 ; B 144 -99 774 863 ; -C -1 ; W0X 1000 ; N 3164 ; B 154 -114 776 875 ; -C -1 ; W0X 1000 ; N 3165 ; B 149 -120 759 867 ; -C -1 ; W0X 1000 ; N 3166 ; B 124 -95 711 852 ; -C -1 ; W0X 1000 ; N 3167 ; B 119 -8 857 745 ; -C -1 ; W0X 1000 ; N 3168 ; B 165 -89 859 828 ; -C -1 ; W0X 1000 ; N 3169 ; B 175 -83 872 836 ; -C -1 ; W0X 1000 ; N 3170 ; B 102 -92 802 842 ; -C -1 ; W0X 1000 ; N 3171 ; B 170 -97 837 855 ; -C -1 ; W0X 1000 ; N 3172 ; B 177 -92 858 847 ; -C -1 ; W0X 1000 ; N 3173 ; B 122 -97 810 851 ; -C -1 ; W0X 1000 ; N 3174 ; B 148 -83 809 836 ; -C -1 ; W0X 1000 ; N 3175 ; B 171 -80 829 822 ; -C -1 ; W0X 1000 ; N 3176 ; B 200 -95 765 853 ; -C -1 ; W0X 1000 ; N 3177 ; B 226 -76 765 841 ; -C -1 ; W0X 1000 ; N 3178 ; B 229 -100 764 856 ; -C -1 ; W0X 1000 ; N 3179 ; B 225 -115 765 867 ; -C -1 ; W0X 1000 ; N 3180 ; B 228 -116 764 866 ; -C -1 ; W0X 1000 ; N 3181 ; B 194 -80 766 849 ; -C -1 ; W0X 1000 ; N 3182 ; B 226 -94 764 854 ; -C -1 ; W0X 1000 ; N 3183 ; B 214 -64 766 817 ; -C -1 ; W0X 1000 ; N 3184 ; B 229 -94 766 858 ; -C -1 ; W0X 1000 ; N 3185 ; B 213 -116 766 864 ; -C -1 ; W0X 1000 ; N 3186 ; B 212 -114 765 856 ; -C -1 ; W0X 1000 ; N 3187 ; B 213 -109 815 867 ; -C -1 ; W0X 1000 ; N 3188 ; B 198 -109 766 859 ; -C -1 ; W0X 1000 ; N 3189 ; B 131 -80 930 837 ; -C -1 ; W0X 1000 ; N 3190 ; B 152 -87 936 854 ; -C -1 ; W0X 1000 ; N 3191 ; B 154 -86 934 852 ; -C -1 ; W0X 1000 ; N 3192 ; B 153 -71 933 839 ; -C -1 ; W0X 1000 ; N 3193 ; B 174 -90 931 859 ; -C -1 ; W0X 1000 ; N 3194 ; B 154 -106 923 862 ; -C -1 ; W0X 1000 ; N 3195 ; B 171 -102 928 849 ; -C -1 ; W0X 1000 ; N 3196 ; B 150 -117 910 860 ; -C -1 ; W0X 1000 ; N 3197 ; B 174 -85 925 856 ; -C -1 ; W0X 1000 ; N 3198 ; B 125 -85 910 858 ; -C -1 ; W0X 1000 ; N 3199 ; B 164 -88 915 849 ; -C -1 ; W0X 1000 ; N 3200 ; B 150 -97 924 853 ; -C -1 ; W0X 1000 ; N 3201 ; B 169 -91 809 855 ; -C -1 ; W0X 1000 ; N 3202 ; B 244 -81 813 843 ; -C -1 ; W0X 1000 ; N 3203 ; B 234 -70 809 819 ; -C -1 ; W0X 1000 ; N 3204 ; B 246 -98 809 863 ; -C -1 ; W0X 1000 ; N 3205 ; B 263 -93 811 842 ; -C -1 ; W0X 1000 ; N 3206 ; B 238 -96 810 855 ; -C -1 ; W0X 1000 ; N 3207 ; B 247 -63 839 815 ; -C -1 ; W0X 1000 ; N 3208 ; B 195 -74 882 843 ; -C -1 ; W0X 1000 ; N 3209 ; B 234 -88 809 847 ; -C -1 ; W0X 1000 ; N 3210 ; B 159 -86 903 841 ; -C -1 ; W0X 1000 ; N 3211 ; B 204 -81 917 840 ; -C -1 ; W0X 1000 ; N 3212 ; B 179 -75 763 842 ; -C -1 ; W0X 1000 ; N 3213 ; B 207 -70 758 836 ; -C -1 ; W0X 1000 ; N 3214 ; B 227 -71 765 823 ; -C -1 ; W0X 1000 ; N 3215 ; B 230 -87 765 844 ; -C -1 ; W0X 1000 ; N 3216 ; B 230 -98 764 852 ; -C -1 ; W0X 1000 ; N 3217 ; B 219 -85 765 848 ; -C -1 ; W0X 1000 ; N 3218 ; B 177 -80 782 831 ; -C -1 ; W0X 1000 ; N 3219 ; B 144 -73 854 830 ; -C -1 ; W0X 1000 ; N 3220 ; B 232 -72 763 836 ; -C -1 ; W0X 1000 ; N 3221 ; B 218 -66 809 844 ; -C -1 ; W0X 1000 ; N 3222 ; B 257 -82 813 834 ; -C -1 ; W0X 1000 ; N 3223 ; B 241 -69 810 824 ; -C -1 ; W0X 1000 ; N 3224 ; B 224 -107 811 870 ; -C -1 ; W0X 1000 ; N 3225 ; B 242 -102 811 859 ; -C -1 ; W0X 1000 ; N 3226 ; B 255 -94 811 849 ; -C -1 ; W0X 1000 ; N 3227 ; B 213 -85 837 833 ; -C -1 ; W0X 1000 ; N 3228 ; B 256 -80 811 833 ; -C -1 ; W0X 1000 ; N 3229 ; B 204 -74 765 841 ; -C -1 ; W0X 1000 ; N 3230 ; B 216 -70 763 816 ; -C -1 ; W0X 1000 ; N 3231 ; B 215 -97 763 865 ; -C -1 ; W0X 1000 ; N 3232 ; B 221 -82 763 847 ; -C -1 ; W0X 1000 ; N 3233 ; B 229 -108 764 841 ; -C -1 ; W0X 1000 ; N 3234 ; B 133 -81 832 837 ; -C -1 ; W0X 1000 ; N 3235 ; B 207 -86 763 851 ; -C -1 ; W0X 1000 ; N 3236 ; B 181 -80 810 845 ; -C -1 ; W0X 1000 ; N 3237 ; B 247 -92 809 851 ; -C -1 ; W0X 1000 ; N 3238 ; B 241 -83 809 861 ; -C -1 ; W0X 1000 ; N 3239 ; B 189 -88 830 856 ; -C -1 ; W0X 1000 ; N 3240 ; B 123 16 873 731 ; -C -1 ; W0X 1000 ; N 3241 ; B 148 -79 837 837 ; -C -1 ; W0X 1000 ; N 3242 ; B 152 -78 846 810 ; -C -1 ; W0X 1000 ; N 3243 ; B 148 -98 785 871 ; -C -1 ; W0X 1000 ; N 3244 ; B 151 -97 821 850 ; -C -1 ; W0X 1000 ; N 3245 ; B 168 -93 817 862 ; -C -1 ; W0X 1000 ; N 3246 ; B 155 -85 852 835 ; -C -1 ; W0X 1000 ; N 3247 ; B 145 -97 817 863 ; -C -1 ; W0X 1000 ; N 3248 ; B 167 -85 897 826 ; -C -1 ; W0X 1000 ; N 3249 ; B 183 -88 932 846 ; -C -1 ; W0X 1000 ; N 3250 ; B 213 -85 764 832 ; -C -1 ; W0X 1000 ; N 3251 ; B 226 -69 764 843 ; -C -1 ; W0X 1000 ; N 3252 ; B 159 -13 872 763 ; -C -1 ; W0X 1000 ; N 3253 ; B 143 -79 799 838 ; -C -1 ; W0X 1000 ; N 3254 ; B 163 -97 764 847 ; -C -1 ; W0X 1000 ; N 3255 ; B 126 -100 762 859 ; -C -1 ; W0X 1000 ; N 3256 ; B 168 -69 806 834 ; -C -1 ; W0X 1000 ; N 3257 ; B 115 -31 713 828 ; -C -1 ; W0X 1000 ; N 3258 ; B 144 -90 740 843 ; -C -1 ; W0X 1000 ; N 3259 ; B 142 -80 731 838 ; -C -1 ; W0X 1000 ; N 3260 ; B 161 -88 737 847 ; -C -1 ; W0X 1000 ; N 3261 ; B 173 -91 754 866 ; -C -1 ; W0X 1000 ; N 3262 ; B 166 -82 779 848 ; -C -1 ; W0X 1000 ; N 3263 ; B 139 -89 733 860 ; -C -1 ; W0X 1000 ; N 3264 ; B 124 -97 728 868 ; -C -1 ; W0X 1000 ; N 3265 ; B 144 -74 793 848 ; -C -1 ; W0X 1000 ; N 3266 ; B 141 -98 753 857 ; -C -1 ; W0X 1000 ; N 3267 ; B 209 -70 764 819 ; -C -1 ; W0X 1000 ; N 3268 ; B 223 -105 764 856 ; -C -1 ; W0X 1000 ; N 3269 ; B 202 -92 764 839 ; -C -1 ; W0X 1000 ; N 3270 ; B 209 -91 765 836 ; -C -1 ; W0X 1000 ; N 3271 ; B 224 -88 766 860 ; -C -1 ; W0X 1000 ; N 3272 ; B 221 -116 765 858 ; -C -1 ; W0X 1000 ; N 3273 ; B 202 -74 794 821 ; -C -1 ; W0X 1000 ; N 3274 ; B 138 -59 759 849 ; -C -1 ; W0X 1000 ; N 3275 ; B 137 -80 733 845 ; -C -1 ; W0X 1000 ; N 3276 ; B 141 -112 732 876 ; -C -1 ; W0X 1000 ; N 3277 ; B 111 -89 726 855 ; -C -1 ; W0X 1000 ; N 3278 ; B 184 -91 796 849 ; -C -1 ; W0X 1000 ; N 3279 ; B 149 -115 741 872 ; -C -1 ; W0X 1000 ; N 3280 ; B 123 10 906 716 ; -C -1 ; W0X 1000 ; N 3281 ; B 158 -58 827 816 ; -C -1 ; W0X 1000 ; N 3282 ; B 144 -111 810 856 ; -C -1 ; W0X 1000 ; N 3283 ; B 157 -91 802 853 ; -C -1 ; W0X 1000 ; N 3284 ; B 173 -90 794 854 ; -C -1 ; W0X 1000 ; N 3285 ; B 160 -76 806 830 ; -C -1 ; W0X 1000 ; N 3286 ; B 173 -91 763 827 ; -C -1 ; W0X 1000 ; N 3287 ; B 218 -75 765 826 ; -C -1 ; W0X 1000 ; N 3288 ; B 211 -93 763 829 ; -C -1 ; W0X 1000 ; N 3289 ; B 235 -96 765 853 ; -C -1 ; W0X 1000 ; N 3290 ; B 240 -70 765 849 ; -C -1 ; W0X 1000 ; N 3291 ; B 243 -101 763 867 ; -C -1 ; W0X 1000 ; N 3292 ; B 193 -70 803 814 ; -C -1 ; W0X 1000 ; N 3293 ; B 220 -85 765 844 ; -C -1 ; W0X 1000 ; N 3294 ; B 161 -86 929 832 ; -C -1 ; W0X 1000 ; N 3295 ; B 182 -116 928 829 ; -C -1 ; W0X 1000 ; N 3296 ; B 172 -83 922 849 ; -C -1 ; W0X 1000 ; N 3297 ; B 209 -85 906 829 ; -C -1 ; W0X 1000 ; N 3298 ; B 185 -95 913 846 ; -C -1 ; W0X 1000 ; N 3299 ; B 218 -81 891 821 ; -C -1 ; W0X 1000 ; N 3300 ; B 189 -109 917 845 ; -C -1 ; W0X 1000 ; N 3301 ; B 151 -86 921 819 ; -C -1 ; W0X 1000 ; N 3302 ; B 189 -102 913 842 ; -C -1 ; W0X 1000 ; N 3303 ; B 215 -82 809 838 ; -C -1 ; W0X 1000 ; N 3304 ; B 253 -80 809 835 ; -C -1 ; W0X 1000 ; N 3305 ; B 251 -71 810 809 ; -C -1 ; W0X 1000 ; N 3306 ; B 246 -104 813 861 ; -C -1 ; W0X 1000 ; N 3307 ; B 243 -108 812 848 ; -C -1 ; W0X 1000 ; N 3308 ; B 282 -104 811 853 ; -C -1 ; W0X 1000 ; N 3309 ; B 228 -99 837 827 ; -C -1 ; W0X 1000 ; N 3310 ; B 164 -73 863 825 ; -C -1 ; W0X 1000 ; N 3311 ; B 255 -97 811 839 ; -C -1 ; W0X 1000 ; N 3312 ; B 187 -49 893 829 ; -C -1 ; W0X 1000 ; N 3313 ; B 214 -80 930 832 ; -C -1 ; W0X 1000 ; N 3314 ; B 199 -75 763 833 ; -C -1 ; W0X 1000 ; N 3315 ; B 246 -85 766 840 ; -C -1 ; W0X 1000 ; N 3316 ; B 225 -93 765 821 ; -C -1 ; W0X 1000 ; N 3317 ; B 249 -103 764 862 ; -C -1 ; W0X 1000 ; N 3318 ; B 245 -86 787 852 ; -C -1 ; W0X 1000 ; N 3319 ; B 254 -91 767 845 ; -C -1 ; W0X 1000 ; N 3320 ; B 253 -106 763 860 ; -C -1 ; W0X 1000 ; N 3321 ; B 197 -75 796 841 ; -C -1 ; W0X 1000 ; N 3322 ; B 244 -90 764 840 ; -C -1 ; W0X 1000 ; N 3323 ; B 240 -71 809 836 ; -C -1 ; W0X 1000 ; N 3324 ; B 243 -77 810 844 ; -C -1 ; W0X 1000 ; N 3325 ; B 251 -86 813 831 ; -C -1 ; W0X 1000 ; N 3326 ; B 262 -100 811 864 ; -C -1 ; W0X 1000 ; N 3327 ; B 270 -100 810 836 ; -C -1 ; W0X 1000 ; N 3328 ; B 275 -99 810 849 ; -C -1 ; W0X 1000 ; N 3329 ; B 231 -78 822 833 ; -C -1 ; W0X 1000 ; N 3330 ; B 284 -92 813 837 ; -C -1 ; W0X 1000 ; N 3331 ; B 233 -56 764 834 ; -C -1 ; W0X 1000 ; N 3332 ; B 262 -84 763 829 ; -C -1 ; W0X 1000 ; N 3333 ; B 253 -59 763 820 ; -C -1 ; W0X 1000 ; N 3334 ; B 248 -105 764 860 ; -C -1 ; W0X 1000 ; N 3335 ; B 228 -94 766 858 ; -C -1 ; W0X 1000 ; N 3336 ; B 237 -115 765 845 ; -C -1 ; W0X 1000 ; N 3337 ; B 192 -72 780 839 ; -C -1 ; W0X 1000 ; N 3338 ; B 161 -80 826 829 ; -C -1 ; W0X 1000 ; N 3339 ; B 257 -85 763 841 ; -C -1 ; W0X 1000 ; N 3340 ; B 238 -70 810 820 ; -C -1 ; W0X 1000 ; N 3341 ; B 241 -82 809 824 ; -C -1 ; W0X 1000 ; N 3342 ; B 262 -96 809 850 ; -C -1 ; W0X 1000 ; N 3343 ; B 267 -93 813 851 ; -C -1 ; W0X 1000 ; N 3344 ; B 173 -9 858 746 ; -C -1 ; W0X 1000 ; N 3345 ; B 163 -96 779 840 ; -C -1 ; W0X 1000 ; N 3346 ; B 151 -84 784 846 ; -C -1 ; W0X 1000 ; N 3347 ; B 214 -93 798 863 ; -C -1 ; W0X 1000 ; N 3348 ; B 176 -107 788 851 ; -C -1 ; W0X 1000 ; N 3349 ; B 179 -103 791 864 ; -C -1 ; W0X 1000 ; N 3350 ; B 152 -101 782 872 ; -C -1 ; W0X 1000 ; N 3351 ; B 184 -87 808 848 ; -C -1 ; W0X 1000 ; N 3352 ; B 172 -104 796 852 ; -C -1 ; W0X 1000 ; N 3353 ; B 193 -110 823 872 ; -C -1 ; W0X 1000 ; N 3354 ; B 194 -84 892 827 ; -C -1 ; W0X 1000 ; N 3355 ; B 193 -96 916 816 ; -C -1 ; W0X 1000 ; N 3356 ; B 196 -82 917 818 ; -C -1 ; W0X 1000 ; N 3357 ; B 236 -100 901 860 ; -C -1 ; W0X 1000 ; N 3358 ; B 162 -81 921 841 ; -C -1 ; W0X 1000 ; N 3359 ; B 213 -101 926 837 ; -C -1 ; W0X 1000 ; N 3360 ; B 235 -96 809 852 ; -C -1 ; W0X 1000 ; N 3361 ; B 265 -111 813 867 ; -C -1 ; W0X 1000 ; N 3362 ; B 275 -87 809 837 ; -C -1 ; W0X 1000 ; N 3363 ; B 211 -85 830 841 ; -C -1 ; W0X 1000 ; N 3364 ; B 288 -94 812 849 ; -C -1 ; W0X 1000 ; N 3365 ; B 251 -74 764 836 ; -C -1 ; W0X 1000 ; N 3366 ; B 249 -96 764 858 ; -C -1 ; W0X 1000 ; N 3367 ; B 270 -83 766 826 ; -C -1 ; W0X 1000 ; N 3368 ; B 268 -104 766 859 ; -C -1 ; W0X 1000 ; N 3369 ; B 239 -108 764 875 ; -C -1 ; W0X 1000 ; N 3370 ; B 177 -83 785 841 ; -C -1 ; W0X 1000 ; N 3371 ; B 255 -99 766 855 ; -C -1 ; W0X 1000 ; N 3372 ; B 151 -10 840 807 ; -C -1 ; W0X 1000 ; N 3373 ; B 205 -77 838 849 ; -C -1 ; W0X 1000 ; N 3374 ; B 211 -99 819 850 ; -C -1 ; W0X 1000 ; N 3375 ; B 187 -109 797 856 ; -C -1 ; W0X 1000 ; N 3376 ; B 220 -104 842 855 ; -C -1 ; W0X 1000 ; N 3377 ; B 165 -101 764 863 ; -C -1 ; W0X 1000 ; N 3378 ; B 175 -105 746 864 ; -C -1 ; W0X 1000 ; N 3379 ; B 126 -74 728 844 ; -C -1 ; W0X 1000 ; N 3380 ; B 153 -99 697 845 ; -C -1 ; W0X 1000 ; N 3381 ; B 157 -102 711 857 ; -C -1 ; W0X 1000 ; N 3382 ; B 172 -99 710 847 ; -C -1 ; W0X 1000 ; N 3383 ; B 160 -97 773 864 ; -C -1 ; W0X 1000 ; N 3384 ; B 153 -92 706 850 ; -C -1 ; W0X 1000 ; N 3385 ; B 230 -92 766 845 ; -C -1 ; W0X 1000 ; N 3386 ; B 242 -86 764 830 ; -C -1 ; W0X 1000 ; N 3387 ; B 261 -106 764 856 ; -C -1 ; W0X 1000 ; N 3388 ; B 273 -99 764 874 ; -C -1 ; W0X 1000 ; N 3389 ; B 259 -91 760 865 ; -C -1 ; W0X 1000 ; N 3390 ; B 255 -79 809 825 ; -C -1 ; W0X 1000 ; N 3391 ; B 262 -96 810 852 ; -C -1 ; W0X 1000 ; N 3392 ; B 250 -84 810 833 ; -C -1 ; W0X 1000 ; N 3393 ; B 281 -110 810 864 ; -C -1 ; W0X 1000 ; N 3394 ; B 239 -97 813 870 ; -C -1 ; W0X 1000 ; N 3395 ; B 230 -80 764 831 ; -C -1 ; W0X 1000 ; N 3396 ; B 238 -102 764 867 ; -C -1 ; W0X 1000 ; N 3397 ; B 236 -92 763 844 ; -C -1 ; W0X 1000 ; N 3398 ; B 245 -101 765 847 ; -C -1 ; W0X 1000 ; N 3399 ; B 247 -108 763 855 ; -C -1 ; W0X 1000 ; N 3400 ; B 248 -102 763 856 ; -C -1 ; W0X 1000 ; N 3401 ; B 191 -92 774 835 ; -C -1 ; W0X 1000 ; N 3402 ; B 260 -86 765 845 ; -C -1 ; W0X 1000 ; N 3403 ; B 165 -92 752 849 ; -C -1 ; W0X 1000 ; N 3404 ; B 146 -90 714 859 ; -C -1 ; W0X 1000 ; N 3405 ; B 160 -89 745 836 ; -C -1 ; W0X 1000 ; N 3406 ; B 177 -99 715 860 ; -C -1 ; W0X 1000 ; N 3407 ; B 185 -104 719 857 ; -C -1 ; W0X 1000 ; N 3408 ; B 156 -84 724 858 ; -C -1 ; W0X 1000 ; N 3409 ; B 158 -100 692 862 ; -C -1 ; W0X 1000 ; N 3410 ; B 117 15 811 721 ; -C -1 ; W0X 1000 ; N 3411 ; B 137 -86 779 826 ; -C -1 ; W0X 1000 ; N 3412 ; B 174 -50 815 852 ; -C -1 ; W0X 1000 ; N 3413 ; B 159 -95 800 858 ; -C -1 ; W0X 1000 ; N 3414 ; B 177 -94 815 865 ; -C -1 ; W0X 1000 ; N 3415 ; B 197 -108 818 851 ; -C -1 ; W0X 1000 ; N 3416 ; B 195 -94 835 871 ; -C -1 ; W0X 1000 ; N 3417 ; B 188 -105 799 857 ; -C -1 ; W0X 1000 ; N 3418 ; B 190 -102 811 858 ; -C -1 ; W0X 1000 ; N 3419 ; B 177 -102 797 842 ; -C -1 ; W0X 1000 ; N 3420 ; B 157 -97 795 853 ; -C -1 ; W0X 1000 ; N 3421 ; B 193 -114 819 871 ; -C -1 ; W0X 1000 ; N 3422 ; B 230 -51 761 836 ; -C -1 ; W0X 1000 ; N 3423 ; B 276 -69 764 844 ; -C -1 ; W0X 1000 ; N 3424 ; B 274 -97 763 856 ; -C -1 ; W0X 1000 ; N 3425 ; B 281 -108 764 857 ; -C -1 ; W0X 1000 ; N 3426 ; B 281 -101 759 857 ; -C -1 ; W0X 1000 ; N 3427 ; B 278 -92 763 848 ; -C -1 ; W0X 1000 ; N 3428 ; B 218 -74 765 826 ; -C -1 ; W0X 1000 ; N 3429 ; B 238 -96 763 851 ; -C -1 ; W0X 1000 ; N 3430 ; B 228 -93 764 838 ; -C -1 ; W0X 1000 ; N 3431 ; B 275 -81 763 838 ; -C -1 ; W0X 1000 ; N 3432 ; B 272 -97 763 832 ; -C -1 ; W0X 1000 ; N 3433 ; B 249 -104 763 848 ; -C -1 ; W0X 1000 ; N 3434 ; B 205 -76 781 828 ; -C -1 ; W0X 1000 ; N 3435 ; B 254 -96 763 849 ; -C -1 ; W0X 500 ; N 8094 ; B 0 0 0 0 ; -C -1 ; W0X 500 ; N 8095 ; B 196 -12 302 475 ; -C -1 ; W0X 500 ; N 8096 ; B 155 272 343 466 ; -C -1 ; W0X 500 ; N 8097 ; B 77 -27 421 530 ; -C -1 ; W0X 500 ; N 8098 ; B 87 -105 412 549 ; -C -1 ; W0X 500 ; N 8099 ; B 67 -12 430 516 ; -C -1 ; W0X 500 ; N 8100 ; B 52 -12 447 451 ; -C -1 ; W0X 500 ; N 8101 ; B 215 272 283 466 ; -C -1 ; W0X 500 ; N 8102 ; B 223 -90 365 516 ; -C -1 ; W0X 500 ; N 8103 ; B 133 -90 275 516 ; -C -1 ; W0X 500 ; N 8104 ; B 96 213 402 504 ; -C -1 ; W0X 500 ; N 8105 ; B 66 37 432 390 ; -C -1 ; W0X 500 ; N 8106 ; B 150 -93 286 101 ; -C -1 ; W0X 500 ; N 8107 ; B 66 193 432 235 ; -C -1 ; W0X 500 ; N 8108 ; B 190 -12 308 90 ; -C -1 ; W0X 500 ; N 8109 ; B 104 -66 394 522 ; -C -1 ; W0X 500 ; N 8110 ; B 88 -12 410 516 ; -C -1 ; W0X 500 ; N 8111 ; B 80 0 419 516 ; -C -1 ; W0X 500 ; N 8112 ; B 58 0 391 516 ; -C -1 ; W0X 500 ; N 8113 ; B 62 -12 387 516 ; -C -1 ; W0X 500 ; N 8114 ; B 65 0 415 516 ; -C -1 ; W0X 500 ; N 8115 ; B 76 -12 413 504 ; -C -1 ; W0X 500 ; N 8116 ; B 92 -12 413 516 ; -C -1 ; W0X 500 ; N 8117 ; B 68 0 401 504 ; -C -1 ; W0X 500 ; N 8118 ; B 85 -12 413 516 ; -C -1 ; W0X 500 ; N 8119 ; B 80 -12 406 516 ; -C -1 ; W0X 500 ; N 8120 ; B 190 -12 308 320 ; -C -1 ; W0X 500 ; N 8121 ; B 150 -93 308 320 ; -C -1 ; W0X 500 ; N 8122 ; B 34 35 431 392 ; -C -1 ; W0X 500 ; N 8123 ; B 66 115 432 312 ; -C -1 ; W0X 500 ; N 8124 ; B 55 35 452 392 ; -C -1 ; W0X 500 ; N 8125 ; B 107 -12 408 475 ; -C -1 ; W0X 500 ; N 8126 ; B 64 -12 442 516 ; -C -1 ; W0X 500 ; N 8127 ; B 2 0 496 466 ; -C -1 ; W0X 500 ; N 8128 ; B 36 0 464 466 ; -C -1 ; W0X 500 ; N 8129 ; B 34 -15 448 481 ; -C -1 ; W0X 500 ; N 8130 ; B 36 0 476 466 ; -C -1 ; W0X 500 ; N 8131 ; B 44 0 457 466 ; -C -1 ; W0X 500 ; N 8132 ; B 44 0 452 466 ; -C -1 ; W0X 500 ; N 8133 ; B 26 -15 477 481 ; -C -1 ; W0X 500 ; N 8134 ; B 27 0 471 466 ; -C -1 ; W0X 500 ; N 8135 ; B 80 0 418 466 ; -C -1 ; W0X 500 ; N 8136 ; B 28 -15 470 466 ; -C -1 ; W0X 500 ; N 8137 ; B 32 0 483 466 ; -C -1 ; W0X 500 ; N 8138 ; B 39 0 460 466 ; -C -1 ; W0X 500 ; N 8139 ; B 3 0 495 466 ; -C -1 ; W0X 500 ; N 8140 ; B 6 -11 492 466 ; -C -1 ; W0X 500 ; N 8141 ; B 36 -15 462 481 ; -C -1 ; W0X 500 ; N 8142 ; B 66 0 463 466 ; -C -1 ; W0X 500 ; N 8143 ; B 36 -115 462 481 ; -C -1 ; W0X 500 ; N 8144 ; B 32 0 488 466 ; -C -1 ; W0X 500 ; N 8145 ; B 60 -17 439 481 ; -C -1 ; W0X 500 ; N 8146 ; B 32 0 467 466 ; -C -1 ; W0X 500 ; N 8147 ; B 14 -15 484 466 ; -C -1 ; W0X 500 ; N 8148 ; B -3 -11 501 466 ; -C -1 ; W0X 500 ; N 8149 ; B -2 -11 500 466 ; -C -1 ; W0X 500 ; N 8150 ; B 19 0 479 466 ; -C -1 ; W0X 500 ; N 8151 ; B 20 0 478 466 ; -C -1 ; W0X 500 ; N 8152 ; B 71 0 427 466 ; -C -1 ; W0X 500 ; N 8153 ; B 223 -90 367 516 ; -C -1 ; W0X 500 ; N 8154 ; B -2 -11 500 466 ; -C -1 ; W0X 500 ; N 8155 ; B 131 -90 275 516 ; -C -1 ; W0X 500 ; N 8156 ; B 103 396 395 543 ; -C -1 ; W0X 500 ; N 8157 ; B 0 -104 498 -62 ; -C -1 ; W0X 500 ; N 8158 ; B 125 413 314 558 ; -C -1 ; W0X 500 ; N 8159 ; B 44 -12 464 366 ; -C -1 ; W0X 500 ; N 8160 ; B 12 -12 477 522 ; -C -1 ; W0X 500 ; N 8161 ; B 55 -12 439 366 ; -C -1 ; W0X 500 ; N 8162 ; B 37 -12 491 522 ; -C -1 ; W0X 500 ; N 8163 ; B 55 -12 455 366 ; -C -1 ; W0X 500 ; N 8164 ; B 95 0 441 522 ; -C -1 ; W0X 500 ; N 8165 ; B 37 -130 470 366 ; -C -1 ; W0X 500 ; N 8166 ; B 15 0 483 522 ; -C -1 ; W0X 500 ; N 8167 ; B 79 0 419 545 ; -C -1 ; W0X 500 ; N 8168 ; B 68 -130 340 545 ; -C -1 ; W0X 500 ; N 8169 ; B 36 0 481 522 ; -C -1 ; W0X 500 ; N 8170 ; B 79 0 419 522 ; -C -1 ; W0X 500 ; N 8171 ; B -4 0 502 366 ; -C -1 ; W0X 500 ; N 8172 ; B 22 0 477 366 ; -C -1 ; W0X 500 ; N 8173 ; B 51 -12 447 366 ; -C -1 ; W0X 500 ; N 8174 ; B 7 -130 461 366 ; -C -1 ; W0X 500 ; N 8175 ; B 37 -130 491 366 ; -C -1 ; W0X 500 ; N 8176 ; B 50 0 464 366 ; -C -1 ; W0X 500 ; N 8177 ; B 66 -12 426 366 ; -C -1 ; W0X 500 ; N 8178 ; B 72 -12 440 466 ; -C -1 ; W0X 500 ; N 8179 ; B 17 -12 466 354 ; -C -1 ; W0X 500 ; N 8180 ; B 8 -8 490 354 ; -C -1 ; W0X 500 ; N 8181 ; B -3 -8 501 354 ; -C -1 ; W0X 500 ; N 8182 ; B 17 0 481 354 ; -C -1 ; W0X 500 ; N 8183 ; B 6 -130 491 354 ; -C -1 ; W0X 500 ; N 8184 ; B 82 0 417 354 ; -C -1 ; W0X 500 ; N 8185 ; B 151 -90 363 516 ; -C -1 ; W0X 500 ; N 8186 ; B 228 -208 271 623 ; -C -1 ; W0X 500 ; N 8187 ; B 135 -90 347 516 ; -C -1 ; W0X 500 ; N 8188 ; B 0 481 498 522 ; -C -1 ; W0X 500 ; N 8189 ; B 87 406 417 503 ; -C -1 ; W0X 500 ; N 8190 ; B 98 -66 400 522 ; -EndCharMetrics -EndFontMetrics diff --git a/tests/cluecode/data/copyright_fossology/testdata34.yml b/tests/cluecode/data/copyright_fossology/testdata34.yml new file mode 100644 index 00000000000..bf76325e529 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata34.yml @@ -0,0 +1,22 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000 Roland Bauerschmidt + - Copyright (c) 1997, 1998, 1999 Guy Maor + - Copyright (c) 1995 Ted Hajek + - portions Copyright (c) 1994 Debian Association, Inc. +holders: + - Roland Bauerschmidt + - Guy Maor + - Ted Hajek + - Debian Association, Inc. +authors: + - Ian Murdock + - Steve Phillips + - the Debian Project + - Guy Maor + - Roland Bauerschmidt + - Roland Bauerschmidt + - Marc Haber diff --git a/tests/cluecode/data/copyright_fossology/testdata34_raw b/tests/cluecode/data/copyright_fossology/testdata34_raw deleted file mode 100644 index a2950ba12c8..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata34_raw +++ /dev/null @@ -1,44 +0,0 @@ -This package was first put together by Ian Murdock - and was maintained by Steve Phillips - from sources written for the Debian Project by Ian -Murdock, Ted Hajek , and Sven Rudolph -. - -Since Nov 27 1996, it was maintained by Guy Maor . He -rewrote most of it. - -Since May 20 2000, it is maintained by Roland Bauerschmidt -. - -Since March 24 2004, it is still maintained by Roland Bauerschmidt -, and co-maintained by Marc Haber - - -deluser is Copyright (c) 2000 Roland Bauerschmidt -and based on the source code of adduser. - -adduser is Copyright (c) 1997, 1998, 1999 Guy Maor -adduser is Copyright (c) 1995 Ted Hajek -with portions Copyright (c) 1994 Debian Association, Inc. - -The examples directory has been contributed by John Zaitseff, and is -GPL V2 as well. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the - Free Software Foundation, Inc., - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - diff --git a/tests/cluecode/data/copyright_fossology/testdata35.yml b/tests/cluecode/data/copyright_fossology/testdata35.yml new file mode 100644 index 00000000000..18c62aaa77d --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata35.yml @@ -0,0 +1,69 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1996-1997 Cisco Systems, Inc. + - Copyright (c) Ian F. Darwin, 1987 + - copyright 1992 by Eric Haines, erich@eye.com + - Copyright (c) 1995, Board of Trustees of the University of Illinois + - Copyright (c) 1994, Jeff Hostetler, Spyglass, Inc. + - Copyright (c) 1993, 1994 by Carnegie Mellon University + - Copyright (c) 1991 Bell Communications Research, Inc. + - (c) Copyright 1993,1994 by Carnegie Mellon University + - Copyright (c) 1991 Bell Communications Research, Inc. + - Copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - Copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - Copyright (c) 2000-2002 The Apache Software Foundation + - copyright RSA Data Security, Inc. + - Copyright (c) 1990-2, RSA Data Security, Inc. + - Copyright 1991 by the Massachusetts Institute of Technology + - Copyright 1991 by the Massachusetts Institute of Technology + - Copyright (c) 1997-2001 University of Cambridge + - copyright by the University of Cambridge, England + - Copyright (c) Zeus Technology Limited 1996 + - Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper + - copyright of Pete Harlow +holders: + - Cisco Systems, Inc. + - Ian F. Darwin + - Eric Haines + - Board of Trustees of the University of Illinois + - Jeff Hostetler, Spyglass, Inc. + - Carnegie Mellon University + - Bell Communications Research, Inc. + - Carnegie Mellon University + - Bell Communications Research, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - The Apache Software Foundation + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - the Massachusetts Institute of Technology + - the Massachusetts Institute of Technology + - University of Cambridge + - the University of Cambridge, England + - Zeus Technology Limited + - Thai Open Source Software Center Ltd and Clark Cooper + - Pete Harlow +authors: + - The Apache Software Foundation + - Ian F. Darwin + - Martin Hamilton (martin@net.lut.ac.uk) + - the Apache Software Foundation (http://www.apache.org/) + - oz@nexus.yorku.ca + - Philip Hazel + - Philip Hazel + - Adam Twiss (adam@zeus.co.uk) diff --git a/tests/cluecode/data/copyright_fossology/testdata35_raw b/tests/cluecode/data/copyright_fossology/testdata35_raw deleted file mode 100644 index 74ee600a2eb..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata35_raw +++ /dev/null @@ -1,505 +0,0 @@ -This package was debianized by Thom May on -Tues, 8 Feb 2005 16:00:00 +0000. - -It was downloaded from http://httpd.apache.org/download.cgi - -Upstream Authors: The Apache Software Foundation - http://httpd.apache.org - -Copyright: - -Licensed to the Apache Software Foundation (ASF) under one or more contributor -license agreements. The ASF licenses this work to You under the Apache License, -Version 2.0 (the "License"); you may not use this work except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -On a Debian system, the license can be found at -/usr/share/common-licenses/Apache-2.0 . - - -APACHE HTTP SERVER SUBCOMPONENTS: - -The Apache HTTP Server includes a number of subcomponents with -separate copyright notices and license terms. Your use of the source -code for the these subcomponents is subject to the terms and -conditions of the following licenses. - -For the mod_mime_magic component: - -/* - * mod_mime_magic: MIME type lookup via file magic numbers - * Copyright (c) 1996-1997 Cisco Systems, Inc. - * - * This software was submitted by Cisco Systems to the Apache Group in July - * 1997. Future revisions and derivatives of this source code must - * acknowledge Cisco Systems as the original contributor of this module. - * All other licensing and usage conditions are those of the Apache Group. - * - * Some of this code is derived from the free version of the file command - * originally posted to comp.sources.unix. Copyright info for that program - * is included below as required. - * --------------------------------------------------------------------------- - * - Copyright (c) Ian F. Darwin, 1987.Written by Ian F. Darwin. - * - * This software is not subject to any license of the American Telephone and - * Telegraph Company or of the Regents of the University of California. - * - * Permission is granted to anyone to use this software for any purpose on any - * computer system, and to alter it and redistribute it freely, subject to - * the following restrictions: - * - * 1. The author is not responsible for the consequences of use of this - * software, no matter how awful, even if they arise from flaws in it. - * - * 2. The origin of this software must not be misrepresented, either by - * explicit claim or by omission. Since few users ever read sources, credits - * must appear in the documentation. - * - * 3. Altered versions must be plainly marked as such, and must not be - * misrepresented as being the original software. Since few users ever read - * sources, credits must appear in the documentation. - * - * 4. This notice may not be removed or altered. - * ------------------------------------------------------------------------- - * - */ - - -For the modules\mappers\mod_imap.c component: - - "macmartinized" polygon code copyright 1992 by Eric Haines, erich@eye.com - -For the server\util_md5.c component: - -/************************************************************************ - * NCSA HTTPd Server - * Software Development Group - * National Center for Supercomputing Applications - * University of Illinois at Urbana-Champaign - * 605 E. Springfield, Champaign, IL 61820 - * httpd@ncsa.uiuc.edu - * - * Copyright (c) 1995, Board of Trustees of the University of Illinois - * - ************************************************************************ - * - * md5.c: NCSA HTTPd code which uses the md5c.c RSA Code - * - * Original Code Copyright (c) 1994, Jeff Hostetler, Spyglass, Inc. - * Portions of Content-MD5 code Copyright (c) 1993, 1994 by Carnegie Mellon - * University (see Copyright below). - * Portions of Content-MD5 code Copyright (c) 1991 Bell Communications - * Research, Inc. (Bellcore) (seeCopyright below). - * Portions extracted from mpack, John G. Myers - jgm+@cmu.edu - * Content-MD5 Code contributed by Martin Hamilton (martin@net.lut.ac.uk) - * - */ - - -/* these portions extracted from mpack, John G. Myers - jgm+@cmu.edu */ -/* (c) Copyright 1993,1994 by Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without - * fee, provided that the above copyright notice appear in all copies - * and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the name of Carnegie - * Mellon University not be used in advertising or publicity - * pertaining to distribution of the software without specific, - * written prior permission. Carnegie Mellon University makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied - * warranty. - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - * Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore) - * - * Permission to use, copy, modify, and distribute this material - * for any purpose and without fee is hereby granted, provided - * that the above copyright notice and this permission notice - * appear in all copies, and that the name of Bellcore not be - * used in advertising or publicity pertaining to this - * material without the specific, prior written permission - * of an authorized representative of Bellcore. BELLCORE - * MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY - * OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", - * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. - */ - -For the srclib\apr\include\apr_md5.h component: -/* - * This is work is derived from material Copyright RSA Data Security, Inc. - * - * The RSA copyright statement and Licence for that original material is - * included below. This is followed by the Apache copyright statement and - * licence for the modifications made to that material. - */ - -/* Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD5 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD5 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. - */ - -For the srclib\apr\passwd\apr_md5.c component: - -/* - * This is work is derived from material Copyright RSA Data Security, Inc. - * - * The RSA copyright statement and Licence for that original material is - * included below. This is followed by the Apache copyright statement and - * licence for the modifications made to that material. - */ - -/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm - */ - -/* Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD5 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD5 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. - */ -/* - * The apr_md5_encode() routine uses much code obtained from the FreeBSD 3.0 - * MD5 crypt() function, which is licenced as follows: - * ---------------------------------------------------------------------------- - * "THE BEER-WARE LICENSE" (Revision 42): - * wrote this file. As long as you retain this notice you - * can do whatever you want with this stuff. If we meet some day, and you think - * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp - * ---------------------------------------------------------------------------- - */ - -For the srclib\apr-util\crypto\apr_md4.c component: - - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - * rights reserved. - * - * License to copy and use this software is granted provided that it - * is identified as the "RSA Data Security, Inc. MD4 Message-Digest - * Algorithm" in all material mentioning or referencing this software - * or this function. - * - * License is also granted to make and use derivative works provided - * that such works are identified as "derived from the RSA Data - * Security, Inc. MD4 Message-Digest Algorithm" in all material - * mentioning or referencing the derived work. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - -For the srclib\apr-util\include\apr_md4.h component: - - * - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - * rights reserved. - * - * License to copy and use this software is granted provided that it - * is identified as the "RSA Data Security, Inc. MD4 Message-Digest - * Algorithm" in all material mentioning or referencing this software - * or this function. - * - * License is also granted to make and use derivative works provided - * that such works are identified as "derived from the RSA Data - * Security, Inc. MD4 Message-Digest Algorithm" in all material - * mentioning or referencing the derived work. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - - -For the srclib\apr-util\test\testdbm.c component: - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * This file came from the SDBM package (written by oz@nexus.yorku.ca). - * That package was under public domain. This file has been ported to - * APR, updated to ANSI C and other, newer idioms, and added to the Apache - * codebase under the above copyright and license. - */ - - -For the srclib\apr-util\test\testmd4.c component: - - * - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (c) 1990-2, RSA Data Security, Inc. Created 1990. All - * rights reserved. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - -For the srclib\apr-util\xml\expat\conftools\install-sh component: - -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# - -For the srclib\pcre\install-sh component: - -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. - -For the pcre component: - -PCRE LICENCE ------------- - -PCRE is a library of functions to support regular expressions whose syntax -and semantics are as close as possible to those of the Perl 5 language. - -Written by: Philip Hazel - -University of Cambridge Computing Service, -Cambridge, England. Phone: +44 1223 334714. - -Copyright (c) 1997-2001 University of Cambridge - -Permission is granted to anyone to use this software for any purpose on any -computer system, and to redistribute it freely, subject to the following -restrictions: - -1. This software 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. - -2. The origin of this software must not be misrepresented, either by - explicit claim or by omission. In practice, this means that if you use - PCRE in software which you distribute to others, commercially or - otherwise, you must put a sentence like this - - Regular expression support is provided by the PCRE library package, - which is open source software, written by Philip Hazel, and copyright - by the University of Cambridge, England. - - somewhere reasonably visible in your documentation and in any relevant - files or online help data or similar. A reference to the ftp site for - the source, that is, to - - ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ - - should also be given in the documentation. - -3. Altered versions must be plainly marked as such, and must not be - misrepresented as being the original software. - -4. If PCRE is embedded in any software that is released under the GNU - General Purpose Licence (GPL), or Lesser General Purpose Licence (LGPL), - then the terms of that licence shall supersede any condition above with - which it is incompatible. - -The documentation for PCRE, supplied in the "doc" directory, is distributed -under the same terms as the software itself. - -End PCRE LICENCE - -Note: The GPL and the LGPL can be found in /usr/share/common-licenses/GPL -and /usr/share/common-licenses/LGPL, respectively. - -For the test\zb.c component: - -/* ZeusBench V1.01 - =============== - -This program is Copyright (c) Zeus Technology Limited 1996. - -This program may be used and copied freely providing this copyright notice -is not removed. - -This software is provided "as is" and any express or implied waranties, -including but not limited to, the implied warranties of merchantability and -fitness for a particular purpose are disclaimed. In no event shall -Zeus Technology Ltd. be liable for any direct, indirect, incidental, special, -exemplary, or consequential damaged (including, but not limited to, -procurement of substitute good or services; loss of use, data, or profits; -or business interruption) however caused and on theory of liability. Whether -in contract, strict liability or tort (including negligence or otherwise) -arising in any way out of the use of this software, even if advised of the -possibility of such damage. - - Written by Adam Twiss (adam@zeus.co.uk). March 1996 - -Thanks to the following people for their input: - Mike Belshe (mbelshe@netscape.com) - Michael Campanella (campanella@stevms.enet.dec.com) - -*/ - -For the expat xml parser component: - -Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd - and Clark Cooper - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -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. -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. - -==================================================================== - -OpenDocument icons: -------------------- - -These icons are copyright of Pete Harlow and licensed under the Apache -license. See -https://bugs.edge.launchpad.net/ubuntu/+source/apache2/+bug/130836 -http://www.catnip.co.uk/opendocument/icons/#apache - diff --git a/tests/cluecode/data/copyright_fossology/testdata36.yml b/tests/cluecode/data/copyright_fossology/testdata36.yml new file mode 100644 index 00000000000..18c62aaa77d --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata36.yml @@ -0,0 +1,69 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1996-1997 Cisco Systems, Inc. + - Copyright (c) Ian F. Darwin, 1987 + - copyright 1992 by Eric Haines, erich@eye.com + - Copyright (c) 1995, Board of Trustees of the University of Illinois + - Copyright (c) 1994, Jeff Hostetler, Spyglass, Inc. + - Copyright (c) 1993, 1994 by Carnegie Mellon University + - Copyright (c) 1991 Bell Communications Research, Inc. + - (c) Copyright 1993,1994 by Carnegie Mellon University + - Copyright (c) 1991 Bell Communications Research, Inc. + - Copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - Copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - Copyright (c) 2000-2002 The Apache Software Foundation + - copyright RSA Data Security, Inc. + - Copyright (c) 1990-2, RSA Data Security, Inc. + - Copyright 1991 by the Massachusetts Institute of Technology + - Copyright 1991 by the Massachusetts Institute of Technology + - Copyright (c) 1997-2001 University of Cambridge + - copyright by the University of Cambridge, England + - Copyright (c) Zeus Technology Limited 1996 + - Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper + - copyright of Pete Harlow +holders: + - Cisco Systems, Inc. + - Ian F. Darwin + - Eric Haines + - Board of Trustees of the University of Illinois + - Jeff Hostetler, Spyglass, Inc. + - Carnegie Mellon University + - Bell Communications Research, Inc. + - Carnegie Mellon University + - Bell Communications Research, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - The Apache Software Foundation + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - the Massachusetts Institute of Technology + - the Massachusetts Institute of Technology + - University of Cambridge + - the University of Cambridge, England + - Zeus Technology Limited + - Thai Open Source Software Center Ltd and Clark Cooper + - Pete Harlow +authors: + - The Apache Software Foundation + - Ian F. Darwin + - Martin Hamilton (martin@net.lut.ac.uk) + - the Apache Software Foundation (http://www.apache.org/) + - oz@nexus.yorku.ca + - Philip Hazel + - Philip Hazel + - Adam Twiss (adam@zeus.co.uk) diff --git a/tests/cluecode/data/copyright_fossology/testdata36_raw b/tests/cluecode/data/copyright_fossology/testdata36_raw deleted file mode 100644 index 7e392b9c019..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata36_raw +++ /dev/null @@ -1,502 +0,0 @@ -This package was debianized by Thom May on -Tues, 8 Feb 2005 16:00:00 +0000. - -It was downloaded from http://httpd.apache.org/download.cgi - -Upstream Authors: The Apache Software Foundation - http://httpd.apache.org - -Copyright: - -Licensed to the Apache Software Foundation (ASF) under one or more contributor -license agreements. The ASF licenses this work to You under the Apache License, -Version 2.0 (the "License"); you may not use this work except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -On a Debian system, the license can be found at -/usr/share/common-licenses/Apache-2.0 . - - -APACHE HTTP SERVER SUBCOMPONENTS: - -The Apache HTTP Server includes a number of subcomponents with -separate copyright notices and license terms. Your use of the source -code for the these subcomponents is subject to the terms and -conditions of the following licenses. - -For the mod_mime_magic component: - -/* - * mod_mime_magic: MIME type lookup via file magic numbers - * Copyright (c) 1996-1997 Cisco Systems, Inc. - * - * This software was submitted by Cisco Systems to the Apache Group in July - * 1997. Future revisions and derivatives of this source code must - * acknowledge Cisco Systems as the original contributor of this module. - * All other licensing and usage conditions are those of the Apache Group. - * - * Some of this code is derived from the free version of the file command - * originally posted to comp.sources.unix. Copyright info for that program - * is included below as required. - * --------------------------------------------------------------------------- - * - Copyright (c) Ian F. Darwin, 1987. Ian F. Darwin. - * - * This software is not subject to any license of the American Telephone and - * Telegraph Company or of the Regents of the University of California. - * - * Permission is granted to anyone to use this software for any purpose on any - * computer system, and to alter it and redistribute it freely, subject to - * the following restrictions: - * - * 1. The author is not responsible for the consequences of use of this - * software, no matter how awful, even if they arise from flaws in it. - * - * 2. The origin of this software must not be misrepresented, either by - * explicit claim or by omission. Since few users ever read sources, credits - * must appear in the documentation. - * - * 3. Altered versions must be plainly marked as such, and must not be - * misrepresented as being the original software. Since few users ever read - * sources, credits must appear in the documentation. - * - * 4. This notice may not be removed or altered. - * ------------------------------------------------------------------------- - * - */ - - -For the modules\mappers\mod_imap.c component: - - "macmartinized" polygon code copyright 1992 by Eric Haines, erich@eye.com - -For the server\util_md5.c component: - -/************************************************************************ - * NCSA HTTPd Server - * Software Development Group - * National Center for Supercomputing Applications - * University of Illinois at Urbana-Champaign - * 605 E. Springfield, Champaign, IL 61820 - * httpd@ncsa.uiuc.edu - * - * Copyright (c) 1995, Board of Trustees of the University of Illinois - * - ************************************************************************ - * - * md5.c: NCSA HTTPd code which uses the md5c.c RSA Code - * - * Original Code Copyright (c) 1994, Jeff Hostetler, Spyglass, Inc. - * Portions of Content-MD5 code Copyright (c) 1993, 1994 by Carnegie Mellon University (see Copyright below). - * Portions of Content-MD5 code Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore) (see Copyright below). - * Portions extracted from mpack, John G. Myers - jgm+@cmu.edu - * Content-MD5 Code Martin Hamilton (martin@net.lut.ac.uk) - * - */ - - -/* these portions extracted from mpack, John G. Myers - jgm+@cmu.edu */ -/* (c) Copyright 1993,1994 by Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without - * fee, provided that the above copyright notice appear in all copies - * and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the name of Carnegie - * Mellon University not be used in advertising or publicity - * pertaining to distribution of the software without specific, - * written prior permission. Carnegie Mellon University makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied - * warranty. - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - * Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore) - * - * Permission to use, copy, modify, and distribute this material - * for any purpose and without fee is hereby granted, provided - * that the above copyright notice and this permission notice - * appear in all copies, and that the name of Bellcore not be - * used in advertising or publicity pertaining to this - * material without the specific, prior written permission - * of an authorized representative of Bellcore. BELLCORE - * MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY - * OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", - * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. - */ - -For the srclib\apr\include\apr_md5.h component: -/* - * This is work is derived from material Copyright RSA Data Security, Inc. - * - * The RSA copyright statement and Licence for that original material is - * included below. This is followed by the Apache copyright statement and - * licence for the modifications made to that material. - */ - -/* Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD5 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD5 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. - */ - -For the srclib\apr\passwd\apr_md5.c component: - -/* - * This is work is derived from material Copyright RSA Data Security, Inc. - * - * The RSA copyright statement and Licence for that original material is - * included below. This is followed by the Apache copyright statement and - * licence for the modifications made to that material. - */ - -/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm - */ - -/* Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD5 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD5 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. - */ -/* - * The apr_md5_encode() routine uses much code obtained from the FreeBSD 3.0 - * MD5 crypt() function, which is licenced as follows: - * ---------------------------------------------------------------------------- - * "THE BEER-WARE LICENSE" (Revision 42): - * wrote this file. As long as you retain this notice you - * can do whatever you want with this stuff. If we meet some day, and you think - * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp - * ---------------------------------------------------------------------------- - */ - -For the srclib\apr-util\crypto\apr_md4.c component: - - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - * rights reserved. - * - * License to copy and use this software is granted provided that it - * is identified as the "RSA Data Security, Inc. MD4 Message-Digest - * Algorithm" in all material mentioning or referencing this software - * or this function. - * - * License is also granted to make and use derivative works provided - * that such works are identified as "derived from the RSA Data - * Security, Inc. MD4 Message-Digest Algorithm" in all material - * mentioning or referencing the derived work. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - -For the srclib\apr-util\include\apr_md4.h component: - - * - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - * rights reserved. - * - * License to copy and use this software is granted provided that it - * is identified as the "RSA Data Security, Inc. MD4 Message-Digest - * Algorithm" in all material mentioning or referencing this software - * or this function. - * - * License is also granted to make and use derivative works provided - * that such works are identified as "derived from the RSA Data - * Security, Inc. MD4 Message-Digest Algorithm" in all material - * mentioning or referencing the derived work. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - - -For the srclib\apr-util\test\testdbm.c component: - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * This file came from the SDBM package (written by oz@nexus.yorku.ca). - * That package was under public domain. This file has been ported to - * APR, updated to ANSI C and other, newer idioms, and added to the Apache - * codebase under the above copyright and license. - */ - - -For the srclib\apr-util\test\testmd4.c component: - - * - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (c) 1990-2, RSA Data Security, Inc. Created 1990. All - * rights reserved. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - -For the srclib\apr-util\xml\expat\conftools\install-sh component: - -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# - -For the srclib\pcre\install-sh component: - -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. - -For the pcre component: - -PCRE LICENCE ------------- - -PCRE is a library of functions to support regular expressions whose syntax -and semantics are as close as possible to those of the Perl 5 language. - -Written by: Philip Hazel - -University of Cambridge Computing Service, -Cambridge, England. Phone: +44 1223 334714. - -Copyright (c) 1997-2001 University of Cambridge - -Permission is granted to anyone to use this software for any purpose on any -computer system, and to redistribute it freely, subject to the following -restrictions: - -1. This software 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. - -2. The origin of this software must not be misrepresented, either by - explicit claim or by omission. In practice, this means that if you use - PCRE in software which you distribute to others, commercially or - otherwise, you must put a sentence like this - - Regular expression support is provided by the PCRE library package, - which is open source software, written by Philip Hazel, and copyright - by the University of Cambridge, England. - - somewhere reasonably visible in your documentation and in any relevant - files or online help data or similar. A reference to the ftp site for - the source, that is, to - - ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ - - should also be given in the documentation. - -3. Altered versions must be plainly marked as such, and must not be - misrepresented as being the original software. - -4. If PCRE is embedded in any software that is released under the GNU - General Purpose Licence (GPL), or Lesser General Purpose Licence (LGPL), - then the terms of that licence shall supersede any condition above with - which it is incompatible. - -The documentation for PCRE, supplied in the "doc" directory, is distributed -under the same terms as the software itself. - -End PCRE LICENCE - -Note: The GPL and the LGPL can be found in /usr/share/common-licenses/GPL -and /usr/share/common-licenses/LGPL, respectively. - -For the test\zb.c component: - -/* ZeusBench V1.01 - =============== - -This program is Copyright (c) Zeus Technology Limited 1996. - -This program may be used and copied freely providing this copyright notice -is not removed. - -This software is provided "as is" and any express or implied waranties, -including but not limited to, the implied warranties of merchantability and -fitness for a particular purpose are disclaimed. In no event shall -Zeus Technology Ltd. be liable for any direct, indirect, incidental, special, -exemplary, or consequential damaged (including, but not limited to, -procurement of substitute good or services; loss of use, data, or profits; -or business interruption) however caused and on theory of liability. Whether -in contract, strict liability or tort (including negligence or otherwise) -arising in any way out of the use of this software, even if advised of the -possibility of such damage. - - Written by Adam Twiss (adam@zeus.co.uk). March 1996 - -Thanks to the following people for their input: - Mike Belshe (mbelshe@netscape.com) - Michael Campanella (campanella@stevms.enet.dec.com) - -*/ - -For the expat xml parser component: - -Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd - and Clark Cooper - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -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. -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. - -==================================================================== - -OpenDocument icons: -------------------- - -These icons are copyright of Pete Harlow and licensed under the Apache -license. See -https://bugs.edge.launchpad.net/ubuntu/+source/apache2/+bug/130836 -http://www.catnip.co.uk/opendocument/icons/#apache diff --git a/tests/cluecode/data/copyright_fossology/testdata37.yml b/tests/cluecode/data/copyright_fossology/testdata37.yml new file mode 100644 index 00000000000..18c62aaa77d --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata37.yml @@ -0,0 +1,69 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1996-1997 Cisco Systems, Inc. + - Copyright (c) Ian F. Darwin, 1987 + - copyright 1992 by Eric Haines, erich@eye.com + - Copyright (c) 1995, Board of Trustees of the University of Illinois + - Copyright (c) 1994, Jeff Hostetler, Spyglass, Inc. + - Copyright (c) 1993, 1994 by Carnegie Mellon University + - Copyright (c) 1991 Bell Communications Research, Inc. + - (c) Copyright 1993,1994 by Carnegie Mellon University + - Copyright (c) 1991 Bell Communications Research, Inc. + - Copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - Copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - Copyright (c) 2000-2002 The Apache Software Foundation + - copyright RSA Data Security, Inc. + - Copyright (c) 1990-2, RSA Data Security, Inc. + - Copyright 1991 by the Massachusetts Institute of Technology + - Copyright 1991 by the Massachusetts Institute of Technology + - Copyright (c) 1997-2001 University of Cambridge + - copyright by the University of Cambridge, England + - Copyright (c) Zeus Technology Limited 1996 + - Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper + - copyright of Pete Harlow +holders: + - Cisco Systems, Inc. + - Ian F. Darwin + - Eric Haines + - Board of Trustees of the University of Illinois + - Jeff Hostetler, Spyglass, Inc. + - Carnegie Mellon University + - Bell Communications Research, Inc. + - Carnegie Mellon University + - Bell Communications Research, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - The Apache Software Foundation + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - the Massachusetts Institute of Technology + - the Massachusetts Institute of Technology + - University of Cambridge + - the University of Cambridge, England + - Zeus Technology Limited + - Thai Open Source Software Center Ltd and Clark Cooper + - Pete Harlow +authors: + - The Apache Software Foundation + - Ian F. Darwin + - Martin Hamilton (martin@net.lut.ac.uk) + - the Apache Software Foundation (http://www.apache.org/) + - oz@nexus.yorku.ca + - Philip Hazel + - Philip Hazel + - Adam Twiss (adam@zeus.co.uk) diff --git a/tests/cluecode/data/copyright_fossology/testdata37_raw b/tests/cluecode/data/copyright_fossology/testdata37_raw deleted file mode 100644 index 53d4378b59d..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata37_raw +++ /dev/null @@ -1,505 +0,0 @@ -This package was debianized by Thom May on -Tues, 8 Feb 2005 16:00:00 +0000. - -It was downloaded from http://httpd.apache.org/download.cgi - -Upstream Authors: The Apache Software Foundation - http://httpd.apache.org - -Copyright: - -Licensed to the Apache Software Foundation (ASF) under one or more contributor -license agreements. The ASF licenses this work to You under the Apache License, -Version 2.0 (the "License"); you may not use this work except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -On a Debian system, the license can be found at -/usr/share/common-licenses/Apache-2.0 . - - -APACHE HTTP SERVER SUBCOMPONENTS: - -The Apache HTTP Server includes a number of subcomponents with -separate copyright notices and license terms. Your use of the source -code for the these subcomponents is subject to the terms and -conditions of the following licenses. - -For the mod_mime_magic component: - -/* - * mod_mime_magic: MIME type lookup via file magic numbers - * Copyright (c) 1996-1997 Cisco Systems, Inc. - * - * This software was submitted by Cisco Systems to the Apache Group in July - * 1997. Future revisions and derivatives of this source code must - * acknowledge Cisco Systems as the original contributor of this module. - * All other licensing and usage conditions are those of the Apache Group. - * - * Some of this code is derived from the free version of the file command - * originally posted to comp.sources.unix. Copyright info for that program - * is included below as required. - * --------------------------------------------------------------------------- - * - Copyright (c) Ian F. Darwin, 1987. Written by Ian F. Darwin. - * - * This software is not subject to any license of the American Telephone and - * Telegraph Company or of the Regents of the University of California. - * - * Permission is granted to anyone to use this software for any purpose on any - * computer system, and to alter it and redistribute it freely, subject to - * the following restrictions: - * - * 1. The author is not responsible for the consequences of use of this - * software, no matter how awful, even if they arise from flaws in it. - * - * 2. The origin of this software must not be misrepresented, either by - * explicit claim or by omission. Since few users ever read sources, credits - * must appear in the documentation. - * - * 3. Altered versions must be plainly marked as such, and must not be - * misrepresented as being the original software. Since few users ever read - * sources, credits must appear in the documentation. - * - * 4. This notice may not be removed or altered. - * ------------------------------------------------------------------------- - * - */ - - -For the modules\mappers\mod_imap.c component: - - "macmartinized" polygon code copyright 1992 by Eric Haines, erich@eye.com - -For the server\util_md5.c component: - -/************************************************************************ - * NCSA HTTPd Server - * Software Development Group - * National Center for Supercomputing Applications - * University of Illinois at Urbana-Champaign - * 605 E. Springfield, Champaign, IL 61820 - * httpd@ncsa.uiuc.edu - * - * Copyright (c) 1995, Board of Trustees of the University of Illinois - * - ************************************************************************ - * - * md5.c: NCSA HTTPd code which uses the md5c.c RSA Code - * - * Original Code Copyright (c) 1994, Jeff Hostetler, Spyglass, Inc. - * Portions of Content-MD5 code Copyright (c) 1993, 1994 by Carnegie Mellon - * University (see Copyright below). - * Portions of Content-MD5 code Copyright (c) 1991 Bell Communications - * Research, Inc. (Bellcore) (see Copyright below). - * Portions extracted from mpack, John G. Myers - jgm+@cmu.edu - * Content-MD5 Code contributed by Martin Hamilton (martin@net.lut.ac.uk) - * - */ - - -/* these portions extracted from mpack, John G. Myers - jgm+@cmu.edu */ -/* (c) Copyright 1993,1994 by Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without - * fee, provided that the above copyright notice appear in all copies - * and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the name of Carnegie - * Mellon University not be used in advertising or publicity - * pertaining to distribution of the software without specific, - * written prior permission. Carnegie Mellon University makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied - * warranty. - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - * Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore) - * - * Permission to use, copy, modify, and distribute this material - * for any purpose and without fee is hereby granted, provided - * that the above copyright notice and this permission notice - * appear in all copies, and that the name of Bellcore not be - * used in advertising or publicity pertaining to this - * material without the specific, prior written permission - * of an authorized representative of Bellcore. BELLCORE - * MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY - * OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", - * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. - */ - -For the srclib\apr\include\apr_md5.h component: -/* - * This is work is derived from material Copyright RSA Data Security, Inc. - * - * The RSA copyright statement and Licence for that original material is - * included below. This is followed by the Apache copyright statement and - * licence for the modifications made to that material. - */ - -/* Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD5 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD5 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. - */ - -For the srclib\apr\passwd\apr_md5.c component: - -/* - * This is work is derived from material Copyright RSA Data Security, Inc. - * - * The RSA copyright statement and Licence for that original material is - * included below. This is followed by the Apache copyright statement and - * licence for the modifications made to that material. - */ - -/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm - */ - -/* Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD5 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD5 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. - */ -/* - * The apr_md5_encode() routine uses much code obtained from the FreeBSD 3.0 - * MD5 crypt() function, which is licenced as follows: - * ---------------------------------------------------------------------------- - * "THE BEER-WARE LICENSE" (Revision 42): - * wrote this file. As long as you retain this notice you - * can do whatever you want with this stuff. If we meet some day, and you think - * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp - * ---------------------------------------------------------------------------- - */ - -For the srclib\apr-util\crypto\apr_md4.c component: - - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - * rights reserved. - * - * License to copy and use this software is granted provided that it - * is identified as the "RSA Data Security, Inc. MD4 Message-Digest - * Algorithm" in all material mentioning or referencing this software - * or this function. - * - * License is also granted to make and use derivative works provided - * that such works are identified as "derived from the RSA Data - * Security, Inc. MD4 Message-Digest Algorithm" in all material - * mentioning or referencing the derived work. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - -For the srclib\apr-util\include\apr_md4.h component: - - * - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - * rights reserved. - * - * License to copy and use this software is granted provided that it - * is identified as the "RSA Data Security, Inc. MD4 Message-Digest - * Algorithm" in all material mentioning or referencing this software - * or this function. - * - * License is also granted to make and use derivative works provided - * that such works are identified as "derived from the RSA Data - * Security, Inc. MD4 Message-Digest Algorithm" in all material - * mentioning or referencing the derived work. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - - -For the srclib\apr-util\test\testdbm.c component: - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * This file came from the SDBM package (written by oz@nexus.yorku.ca). - * That package was under public domain. This file has been ported to - * APR, updated to ANSI C and other, newer idioms, and added to the Apache - * codebase under the above copyright and license. - */ - - -For the srclib\apr-util\test\testmd4.c component: - - * - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (c) 1990-2, RSA Data Security, Inc. Created 1990. All - * rights reserved. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - -For the srclib\apr-util\xml\expat\conftools\install-sh component: - -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# - -For the srclib\pcre\install-sh component: - -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. - -For the pcre component: - -PCRE LICENCE ------------- - -PCRE is a library of functions to support regular expressions whose syntax -and semantics are as close as possible to those of the Perl 5 language. - -Written by: Philip Hazel - -University of Cambridge Computing Service, -Cambridge, England. Phone: +44 1223 334714. - -Copyright (c) 1997-2001 University of Cambridge - -Permission is granted to anyone to use this software for any purpose on any -computer system, and to redistribute it freely, subject to the following -restrictions: - -1. This software 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. - -2. The origin of this software must not be misrepresented, either by - explicit claim or by omission. In practice, this means that if you use - PCRE in software which you distribute to others, commercially or - otherwise, you must put a sentence like this - - Regular expression support is provided by the PCRE library package, - which is open source software, written by Philip Hazel, and copyright - by the University of Cambridge, England. - - somewhere reasonably visible in your documentation and in any relevant - files or online help data or similar. A reference to the ftp site for - the source, that is, to - - ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ - - should also be given in the documentation. - -3. Altered versions must be plainly marked as such, and must not be - misrepresented as being the original software. - -4. If PCRE is embedded in any software that is released under the GNU - General Purpose Licence (GPL), or Lesser General Purpose Licence (LGPL), - then the terms of that licence shall supersede any condition above with - which it is incompatible. - -The documentation for PCRE, supplied in the "doc" directory, is distributed -under the same terms as the software itself. - -End PCRE LICENCE - -Note: The GPL and the LGPL can be found in /usr/share/common-licenses/GPL -and /usr/share/common-licenses/LGPL, respectively. - -For the test\zb.c component: - -/* ZeusBench V1.01 - =============== - -This program is Copyright (c) Zeus Technology Limited 1996. - -This program may be used and copied freely providing this copyright notice -is not removed. - -This software is provided "as is" and any express or implied waranties, -including but not limited to, the implied warranties of merchantability and -fitness for a particular purpose are disclaimed. In no event shall -Zeus Technology Ltd. be liable for any direct, indirect, incidental, special, -exemplary, or consequential damaged (including, but not limited to, -procurement of substitute good or services; loss of use, data, or profits; -or business interruption) however caused and on theory of liability. Whether -in contract, strict liability or tort (including negligence or otherwise) -arising in any way out of the use of this software, even if advised of the -possibility of such damage. - - Written by Adam Twiss (adam@zeus.co.uk). March 1996 - -Thanks to the following people for their input: - Mike Belshe (mbelshe@netscape.com) - Michael Campanella (campanella@stevms.enet.dec.com) - -*/ - -For the expat xml parser component: - -Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd - and Clark Cooper - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -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. -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. - -==================================================================== - -OpenDocument icons: -------------------- - -These icons are copyright of Pete Harlow and licensed under the Apache -license. See -https://bugs.edge.launchpad.net/ubuntu/+source/apache2/+bug/130836 -http://www.catnip.co.uk/opendocument/icons/#apache - diff --git a/tests/cluecode/data/copyright_fossology/testdata38.yml b/tests/cluecode/data/copyright_fossology/testdata38.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata38.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyright_fossology/testdata39.yml b/tests/cluecode/data/copyright_fossology/testdata39.yml new file mode 100644 index 00000000000..18c62aaa77d --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata39.yml @@ -0,0 +1,69 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1996-1997 Cisco Systems, Inc. + - Copyright (c) Ian F. Darwin, 1987 + - copyright 1992 by Eric Haines, erich@eye.com + - Copyright (c) 1995, Board of Trustees of the University of Illinois + - Copyright (c) 1994, Jeff Hostetler, Spyglass, Inc. + - Copyright (c) 1993, 1994 by Carnegie Mellon University + - Copyright (c) 1991 Bell Communications Research, Inc. + - (c) Copyright 1993,1994 by Carnegie Mellon University + - Copyright (c) 1991 Bell Communications Research, Inc. + - Copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - Copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - copyright RSA Data Security, Inc. + - Copyright (c) 1991-2, RSA Data Security, Inc. + - Copyright (c) 2000-2002 The Apache Software Foundation + - copyright RSA Data Security, Inc. + - Copyright (c) 1990-2, RSA Data Security, Inc. + - Copyright 1991 by the Massachusetts Institute of Technology + - Copyright 1991 by the Massachusetts Institute of Technology + - Copyright (c) 1997-2001 University of Cambridge + - copyright by the University of Cambridge, England + - Copyright (c) Zeus Technology Limited 1996 + - Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper + - copyright of Pete Harlow +holders: + - Cisco Systems, Inc. + - Ian F. Darwin + - Eric Haines + - Board of Trustees of the University of Illinois + - Jeff Hostetler, Spyglass, Inc. + - Carnegie Mellon University + - Bell Communications Research, Inc. + - Carnegie Mellon University + - Bell Communications Research, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - The Apache Software Foundation + - RSA Data Security, Inc. + - RSA Data Security, Inc. + - the Massachusetts Institute of Technology + - the Massachusetts Institute of Technology + - University of Cambridge + - the University of Cambridge, England + - Zeus Technology Limited + - Thai Open Source Software Center Ltd and Clark Cooper + - Pete Harlow +authors: + - The Apache Software Foundation + - Ian F. Darwin + - Martin Hamilton (martin@net.lut.ac.uk) + - the Apache Software Foundation (http://www.apache.org/) + - oz@nexus.yorku.ca + - Philip Hazel + - Philip Hazel + - Adam Twiss (adam@zeus.co.uk) diff --git a/tests/cluecode/data/copyright_fossology/testdata39_raw b/tests/cluecode/data/copyright_fossology/testdata39_raw deleted file mode 100644 index 44275c388ae..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata39_raw +++ /dev/null @@ -1,505 +0,0 @@ -This package was debianized by Thom May on -Tues, 8 Feb 2005 16:00:00 +0000. - -It was downloaded from http://httpd.apache.org/download.cgi - -Upstream Authors: The Apache Software Foundation - http://httpd.apache.org - -Copyright: - -Licensed to the Apache Software Foundation (ASF) under one or more contributor -license agreements. The ASF licenses this work to You under the Apache License, -Version 2.0 (the "License"); you may not use this work except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -On a Debian system, the license can be found at -/usr/share/common-licenses/Apache-2.0 . - - -APACHE HTTP SERVER SUBCOMPONENTS: - -The Apache HTTP Server includes a number of subcomponents with -separate copyright notices and license terms. Your use of the source -code for the these subcomponents is subject to the terms and -conditions of the following licenses. - -For the mod_mime_magic component: - -/* - * mod_mime_magic: MIME type lookup via file magic numbers - * Copyright (c) 1996-1997 Cisco Systems, Inc. - * - * This software was submitted by Cisco Systems to the Apache Group in July - * 1997. Future revisions and derivatives of this source code must - * acknowledge Cisco Systems as the original contributor of this module. - * All other licensing and usage conditions are those of the Apache Group. - * - * Some of this code is derived from the free version of the file command - * originally posted to comp.sources.unix. Copyright info for that program - * is included below as required. - * --------------------------------------------------------------------------- - * - Copyright (c) Ian F. Darwin, 1987. Written by Ian F. Darwin. - * - * This software is not subject to any license of the American Telephone and - * Telegraph Company or of the Regents of the University of California. - * - * Permission is granted to anyone to use this software for any purpose on any - * computer system, and to alter it and redistribute it freely, subject to - * the following restrictions: - * - * 1. The author is not responsible for the consequences of use of this - * software, no matter how awful, even if they arise from flaws in it. - * - * 2. The origin of this software must not be misrepresented, either by - * explicit claim or by omission. Since few users ever read sources, credits - * must appear in the documentation. - * - * 3. Altered versions must be plainly marked as such, and must not be - * misrepresented as being the original software. Since few users ever read - * sources, credits must appear in the documentation. - * - * 4. This notice may not be removed or altered. - * ------------------------------------------------------------------------- - * - */ - - -For the modules\mappers\mod_imap.c component: - - "macmartinized" polygon code copyright 1992 by Eric Haines, erich@eye.com - -For the server\util_md5.c component: - -/************************************************************************ - * NCSA HTTPd Server - * Software Development Group - * National Center for Supercomputing Applications - * University of Illinois at Urbana-Champaign - * 605 E. Springfield, Champaign, IL 61820 - * httpd@ncsa.uiuc.edu - * - * Copyright (c) 1995, Board of Trustees of the University of Illinois - * - ************************************************************************ - * - * md5.c: NCSA HTTPd code which uses the md5c.c RSA Code - * - * Original Code Copyright (c) 1994, Jeff Hostetler, Spyglass, Inc. - * Portions of Content-MD5 code Copyright (c) 1993, 1994 by Carnegie Mellon - * University (see Copyright below). - * Portions of Content-MD5 code Copyright (c) 1991 Bell Communications - * Research, Inc. (Bellcore) (see Copyright below). - * Portions extracted from mpack, John G. Myers - jgm+@cmu.edu - * Content-MD5 Code contributed by Martin Hamilton (martin@net.lut.ac.uk) - * - */ - - -/* these portions extracted from mpack, John G. Myers - jgm+@cmu.edu */ -/* (c) Copyright 1993,1994 by Carnegie Mellon University - * All Rights Reserved. - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without - * fee, provided that the above copyright notice appear in all copies - * and that both that copyright notice and this permission notice - * appear in supporting documentation, and that the name of Carnegie - * Mellon University not be used in advertising or publicity - * pertaining to distribution of the software without specific, - * written prior permission. Carnegie Mellon University makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied - * warranty. - * - * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - -/* - * Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore) - * - * Permission to use, copy, modify, and distribute this material - * for any purpose and without fee is hereby granted, provided - * that the above copyright notice and this permission notice - * appear in all copies, and that the name of Bellcore not be - * used in advertising or publicity pertaining to this - * material without the specific, prior written permission - * of an authorized representative of Bellcore. BELLCORE - * MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY - * OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", - * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. - */ - -For the srclib\apr\include\apr_md5.h component: -/* - * This is work is derived from material Copyright RSA Data Security, Inc. - * - * The RSA copyright statement and Licence for that original material is - * included below. This is followed by the Apache copyright statement and - * licence for the modifications made to that material. - */ - -/* Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD5 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD5 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. - */ - -For the srclib\apr\passwd\apr_md5.c component: - -/* - * This is work is derived from material Copyright RSA Data Security, Inc. - * - * The RSA copyright statement and Licence for that original material is - * included below. This is followed by the Apache copyright statement and - * licence for the modifications made to that material. - */ - -/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm - */ - -/* Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD5 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD5 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. - */ -/* - * The apr_md5_encode() routine uses much code obtained from the FreeBSD 3.0 - * MD5 crypt() function, which is licenced as follows: - * ---------------------------------------------------------------------------- - * "THE BEER-WARE LICENSE" (Revision 42): - * wrote this file. As long as you retain this notice you - * can do whatever you want with this stuff. If we meet some day, and you think - * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp - * ---------------------------------------------------------------------------- - */ - -For the srclib\apr-util\crypto\apr_md4.c component: - - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - * rights reserved. - * - * License to copy and use this software is granted provided that it - * is identified as the "RSA Data Security, Inc. MD4 Message-Digest - * Algorithm" in all material mentioning or referencing this software - * or this function. - * - * License is also granted to make and use derivative works provided - * that such works are identified as "derived from the RSA Data - * Security, Inc. MD4 Message-Digest Algorithm" in all material - * mentioning or referencing the derived work. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - -For the srclib\apr-util\include\apr_md4.h component: - - * - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (c) 1991-2, RSA Data Security, Inc. Created 1991. All - * rights reserved. - * - * License to copy and use this software is granted provided that it - * is identified as the "RSA Data Security, Inc. MD4 Message-Digest - * Algorithm" in all material mentioning or referencing this software - * or this function. - * - * License is also granted to make and use derivative works provided - * that such works are identified as "derived from the RSA Data - * Security, Inc. MD4 Message-Digest Algorithm" in all material - * mentioning or referencing the derived work. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - - -For the srclib\apr-util\test\testdbm.c component: - -/* ==================================================================== - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * This file came from the SDBM package (written by oz@nexus.yorku.ca). - * That package was under public domain. This file has been ported to - * APR, updated to ANSI C and other, newer idioms, and added to the Apache - * codebase under the above copyright and license. - */ - - -For the srclib\apr-util\test\testmd4.c component: - - * - * This is derived from material copyright RSA Data Security, Inc. - * Their notice is reproduced below in its entirety. - * - * Copyright (c) 1990-2, RSA Data Security, Inc. Created 1990. All - * rights reserved. - * - * RSA Data Security, Inc. makes no representations concerning either - * the merchantability of this software or the suitability of this - * software for any particular purpose. It is provided "as is" - * without express or implied warranty of any kind. - * - * These notices must be retained in any copies of any part of this - * documentation and/or software. - */ - -For the srclib\apr-util\xml\expat\conftools\install-sh component: - -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# - -For the srclib\pcre\install-sh component: - -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. - -For the pcre component: - -PCRE LICENCE ------------- - -PCRE is a library of functions to support regular expressions whose syntax -and semantics are as close as possible to those of the Perl 5 language. - -Written by: Philip Hazel - -University of Cambridge Computing Service, -Cambridge, England. Phone: +44 1223 334714. - -Copyright (c) 1997-2001 University of Cambridge - -Permission is granted to anyone to use this software for any purpose on any -computer system, and to redistribute it freely, subject to the following -restrictions: - -1. This software 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. - -2. The origin of this software must not be misrepresented, either by - explicit claim or by omission. In practice, this means that if you use - PCRE in software which you distribute to others, commercially or - otherwise, you must put a sentence like this - - Regular expression support is provided by the PCRE library package, - which is open source software, written by Philip Hazel, and copyright - by the University of Cambridge, England. - - somewhere reasonably visible in your documentation and in any relevant - files or online help data or similar. A reference to the ftp site for - the source, that is, to - - ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ - - should also be given in the documentation. - -3. Altered versions must be plainly marked as such, and must not be - misrepresented as being the original software. - -4. If PCRE is embedded in any software that is released under the GNU - General Purpose Licence (GPL), or Lesser General Purpose Licence (LGPL), - then the terms of that licence shall supersede any condition above with - which it is incompatible. - -The documentation for PCRE, supplied in the "doc" directory, is distributed -under the same terms as the software itself. - -End PCRE LICENCE - -Note: The GPL and the LGPL can be found in /usr/share/common-licenses/GPL -and /usr/share/common-licenses/LGPL, respectively. - -For the test\zb.c component: - -/* ZeusBench V1.01 - =============== - -This program is Copyright (c) Zeus Technology Limited 1996. - -This program may be used and copied freely providing this copyright notice -is not removed. - -This software is provided "as is" and any express or implied waranties, -including but not limited to, the implied warranties of merchantability and -fitness for a particular purpose are disclaimed. In no event shall -Zeus Technology Ltd. be liable for any direct, indirect, incidental, special, -exemplary, or consequential damaged (including, but not limited to, -procurement of substitute good or services; loss of use, data, or profits; -or business interruption) however caused and on theory of liability. Whether -in contract, strict liability or tort (including negligence or otherwise) -arising in any way out of the use of this software, even if advised of the -possibility of such damage. - - Written by Adam Twiss (adam@zeus.co.uk). March 1996 - -Thanks to the following people for their input: - Mike Belshe (mbelshe@netscape.com) - Michael Campanella (campanella@stevms.enet.dec.com) - -*/ - -For the expat xml parser component: - -Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd - and Clark Cooper - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -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. -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. - -==================================================================== - -OpenDocument icons: -------------------- - -These icons are copyright of Pete Harlow and licensed under the Apache -license. See -https://bugs.edge.launchpad.net/ubuntu/+source/apache2/+bug/130836 -http://www.catnip.co.uk/opendocument/icons/#apache - diff --git a/tests/cluecode/data/copyright_fossology/testdata3_raw b/tests/cluecode/data/copyright_fossology/testdata3_raw deleted file mode 100644 index 814cc908ba3..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata3_raw +++ /dev/null @@ -1,86 +0,0 @@ -/* - * linux/arch/arm/boot/compressed/head-clps7500.S - * - * Copyright (c) 1999, 2000, 2001 Nexus Electronics Ltd - */ - - - /* There are three different ways the kernel can be - booted on a 7500 system: from Angel (loaded in RAM), from - 16-bit ROM or from 32-bit Flash. Luckily, a single kernel - image does for them all. */ - /* This branch is taken if the CPU memory width matches the - actual device in use. The default at power on is 16 bits - so we must be prepared for a mismatch. */ - .section ".start", "ax" -2: - b 1f - .word 0xffff - .word 0xb632 @ mov r11, #0x03200000 - .word 0xe3a0 - .word 0x0000 @ mov r0, #0 - .word 0xe3a0 - .word 0x0080 @ strb r0, [r11, #0x80] - .word 0xe5cb - .word 0xf000 @ mov pc, #0 - .word 0xe3a0 -1: - adr r1, 2b - teq r1, #0 - bne .Langel - /* This is a direct-from-ROM boot. Copy the kernel into - RAM and run it there. */ - mov r0, #0x30 - mcr p15, 0, r0, c1, c0, 0 - mov r0, #0x13 - msr cpsr_cxsf, r0 - mov r12, #0x03000000 @ point to LEDs - orr r12, r12, #0x00020000 - orr r12, r12, #0xba00 - mov r0, #0x5500 - str r0, [r12] - mov r0, #0x10000000 - orr r0, r0, #0x8000 - mov r4, r0 - ldr r2, =_end -2: - ldr r3, [r1], #4 - str r3, [r0], #4 - teq r0, r2 - bne 2b - mov r0, #0xff00 - str r0, [r12] -1: - mov r12, #0x03000000 @ point to LEDs - orr r12, r12, #0x00020000 - orr r12, r12, #0xba00 - mov r0, #0xfe00 - str r0, [r12] - - adr lr, 1f - mov r0, #0 - mov r1, #14 /* MACH_TYPE_CLPS7500 */ - mov pc, lr -.Langel: -#ifdef CONFIG_ANGELBOOT - /* Call Angel to switch into SVC mode. */ - mov r0, #0x17 - swi 0x123456 -#endif - /* Ensure all interrupts are off and MMU disabled */ - mrs r0, cpsr - orr r0, r0, #0xc0 - msr cpsr_cxsf, r0 - - adr lr, 1b - orr lr, lr, #0x10000000 - mov r0, #0x30 @ MMU off - mcr p15, 0, r0, c1, c0, 0 - mov r0, r0 - mov pc, lr - - .ltorg - -1: -/* And the rest */ -#include "head.S" diff --git a/tests/cluecode/data/copyright_fossology/testdata4.yml b/tests/cluecode/data/copyright_fossology/testdata4.yml new file mode 100644 index 00000000000..10d1fac5ec5 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata4.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1990-1999 Info-ZIP. +holders: + - Info-ZIP diff --git a/tests/cluecode/data/copyright_fossology/testdata40.yml b/tests/cluecode/data/copyright_fossology/testdata40.yml new file mode 100644 index 00000000000..7567688edd2 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata40.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999, 2000, 2001 Adel I. Mirzazhanov +holders: + - Adel I. Mirzazhanov +authors: + - Marc Haber + - Adel I. Mirzazhanov diff --git a/tests/cluecode/data/copyright_fossology/testdata40_raw b/tests/cluecode/data/copyright_fossology/testdata40_raw deleted file mode 100644 index c5b7cd72fd9..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata40_raw +++ /dev/null @@ -1,37 +0,0 @@ -This package was debianized by Marc Haber on -Fri, 1 Jun 2001 15:13:54 +0000. - -It was downloaded from http://www.adel.nursat.kz/apg/ - -Upstream Author: Adel I. Mirzazhanov - -Copyright: - -Copyright (c) 1999, 2000, 2001 -Adel I. Mirzazhanov. All rights reserved - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - 3. The name of the author may not be used to endorse or promote - products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tests/cluecode/data/copyright_fossology/testdata41.yml b/tests/cluecode/data/copyright_fossology/testdata41.yml new file mode 100644 index 00000000000..126c0ab818e --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata41.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyright 1997, 1998, 1999 Jason Gunthorpe and others +holders: + - Jason Gunthorpe and others +authors: + - APT Development Team diff --git a/tests/cluecode/data/copyright_fossology/testdata41_raw b/tests/cluecode/data/copyright_fossology/testdata41_raw deleted file mode 100644 index 23e55c98e28..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata41_raw +++ /dev/null @@ -1,23 +0,0 @@ -Apt is copyright 1997, 1998, 1999 Jason Gunthorpe and others. -Apt is currently developed by APT Development Team . - -License: GPLv2+ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -See /usr/share/common-licenses/GPL-2, or - for the terms of the latest version -of the GNU General Public License. - diff --git a/tests/cluecode/data/copyright_fossology/testdata42.yml b/tests/cluecode/data/copyright_fossology/testdata42.yml new file mode 100644 index 00000000000..cfd18495a40 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata42.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1999-2005 Daniel Burrows +holders: + - Daniel Burrows diff --git a/tests/cluecode/data/copyright_fossology/testdata42_raw b/tests/cluecode/data/copyright_fossology/testdata42_raw deleted file mode 100644 index 4c22f556ca0..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata42_raw +++ /dev/null @@ -1,6 +0,0 @@ -Copyright 1999-2005 Daniel Burrows - -The upstream web site for aptitude is -http://people.debian.org/~dburrows/aptitude . - -License: GPL (/usr/share/common-licenses/GPL) diff --git a/tests/cluecode/data/copyright_fossology/testdata43.yml b/tests/cluecode/data/copyright_fossology/testdata43.yml new file mode 100644 index 00000000000..126c0ab818e --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata43.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyright 1997, 1998, 1999 Jason Gunthorpe and others +holders: + - Jason Gunthorpe and others +authors: + - APT Development Team diff --git a/tests/cluecode/data/copyright_fossology/testdata43_raw b/tests/cluecode/data/copyright_fossology/testdata43_raw deleted file mode 100644 index 23e55c98e28..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata43_raw +++ /dev/null @@ -1,23 +0,0 @@ -Apt is copyright 1997, 1998, 1999 Jason Gunthorpe and others. -Apt is currently developed by APT Development Team . - -License: GPLv2+ - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -See /usr/share/common-licenses/GPL-2, or - for the terms of the latest version -of the GNU General Public License. - diff --git a/tests/cluecode/data/copyright_fossology/testdata44.yml b/tests/cluecode/data/copyright_fossology/testdata44.yml new file mode 100644 index 00000000000..80923b2c93c --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata44.yml @@ -0,0 +1,13 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyrighted by the Free Software Foundation, Inc. + - Copyright (c) 1995-2008 Software in the Public Interest +holders: + - the Free Software Foundation, Inc. + - Software in the Public Interest +authors: + - Ian Murdock and Bruce Perens + - Bruce Perens diff --git a/tests/cluecode/data/copyright_fossology/testdata44_raw b/tests/cluecode/data/copyright_fossology/testdata44_raw deleted file mode 100644 index 03e12c3f8f7..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata44_raw +++ /dev/null @@ -1,25 +0,0 @@ -This is the Debian GNU/Linux prepackaged version of the Debian Base System -Miscellaneous files. These files were written by Ian Murdock - and Bruce Perens . - -This package was first put together by Bruce Perens , -from his own sources. - -The GNU Public Licenses in /usr/share/common-licenses were taken from -ftp.gnu.org and are copyrighted by the Free Software Foundation, Inc. - - -Copyright (c) 1995-2008 Software in the Public Interest. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/tests/cluecode/data/copyright_fossology/testdata45.yml b/tests/cluecode/data/copyright_fossology/testdata45.yml new file mode 100644 index 00000000000..9135dd89bd9 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata45.yml @@ -0,0 +1,18 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1999-2002 Wichert Akkerman + - Copyright 2002, 2003, 2004 Colin Watson + - Copyright 2001, 2002 Joey Hess + - Copyright 2002, 2003, 2004, 2005, 2007 Colin Watson + - Copyright 2007 David Mandelberg +holders: + - Wichert Akkerman + - Colin Watson + - Joey Hess + - Colin Watson + - David Mandelberg +authors: + - Ian Murdock and Bruce Perens diff --git a/tests/cluecode/data/copyright_fossology/testdata45_raw b/tests/cluecode/data/copyright_fossology/testdata45_raw deleted file mode 100644 index 670b4628b8a..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata45_raw +++ /dev/null @@ -1,23 +0,0 @@ -Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=179 -Upstream-Name: base-passwd -Upstream-Maintainer: Colin Watson - -Files: update-passwd.c, man/* -Copyright Copyright 1999-2002 Wichert Akkerman - Copyright 2002, 2003, 2004 Colin Watson -License: GPL-2 - -Files: passwd.master, group.master -License: PD -X-Notes: Originally written by Ian Murdock and - Bruce Perens . - -Files: doc/* -Copyright Copyright 2001, 2002 Joey Hess -Copyright 2002, 2003, 2004, 2005, 2007 Colin Watson -Copyright 2007 David Mandelberg -License: GPL-2 - -License-Terms: GPL-2 - On Debian and Debian-based systems, a copy of the GNU General Public - License version 2 is available in /usr/share/common-licenses/GPL-2. diff --git a/tests/cluecode/data/copyright_fossology/testdata46.yml b/tests/cluecode/data/copyright_fossology/testdata46.yml new file mode 100644 index 00000000000..76689d89e0b --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata46.yml @@ -0,0 +1,53 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1989-2006 Free Software Foundation, Inc. + - Copyright FSF + - Copyright 1995-2005 by Chester Ramey + - Copyright (c) 1988-2005 Free Software Foundation, Inc. + - Copyright (c) 1993-1994 O'Reilly and Associates, Inc. + - Copyright (c) 1998, 1999, 2001 Gary V. Vaughan + - Copyright (c) 1991 Simon J. Gerraty + - Kaz Kylheku Copyright 1999 + - Copyright (c) Chris Robertson + - copyright chris ulrich + - Copyright (c) 1994 Winning Strategies, Inc. + - Copyright (c) 1989, 1993 The Regents of the University of California + - Copyright (c) 1988-2004 Free Software Foundation, Inc. + - Copyright (c) 1988-2005 Free Software Foundation, Inc. + - Copyright (c) 1988-2005 Free Software Foundation, Inc. + - Copyright (c) 1988-2002 Free Software Foundation, Inc. + - Copyright (c) 1983, 1990, 1993 The Regents of the University of California + - Portions Copyright (c) 1993 by Digital Equipment Corporation + - Copyright (c) 1988 Free Software Foundation, Inc. + - Copyright (c) 1999, 2002 Aladdin Enterprises +holders: + - Free Software Foundation, Inc. + - FSF + - Chester Ramey + - Free Software Foundation, Inc. + - O'Reilly and Associates, Inc. + - Gary V. Vaughan + - Simon J. Gerraty + - Kaz Kylheku + - Chris Robertson + - chris ulrich + - Winning Strategies, Inc. + - The Regents of the University of California + - Free Software Foundation, Inc. + - Free Software Foundation, Inc. + - Free Software Foundation, Inc. + - Free Software Foundation, Inc. + - The Regents of the University of California + - Digital Equipment Corporation + - Free Software Foundation, Inc. + - Aladdin Enterprises +authors: + - Matthias Klose + - Winning Strategies, Inc. + - the University of California, Berkeley and its contributors + - the University of California, Berkeley and its contributors + - Richard Verhoeven + - chet@po.cwru.edu diff --git a/tests/cluecode/data/copyright_fossology/testdata46_raw b/tests/cluecode/data/copyright_fossology/testdata46_raw deleted file mode 100644 index 22fd3331380..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata46_raw +++ /dev/null @@ -1,435 +0,0 @@ -This is Debian GNU/Linux's prepackaged version of the FSF's GNU Bash, -the Bourne Again SHell. - -This package was put together by Matthias Klose , from -the following sources: - - bash: ftp.gnu.org:/pub/gnu/bash/bash-3.2.tar.gz - bashdb: http://bashdb.sf.net/ - -Bash homepage: http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html - -Copyright (c) 1989-2006 Free Software Foundation, Inc. - -Bash 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. - -Bash 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 with -your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with -the Debian GNU/Linux bash source package as the file COPYING. If not, -write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -Boston, MA 02110-1301, USA. - -The Free Software Foundation has exempted Bash from the requirement of -Paragraph 2c of the General Public License. This is to say, there is -no requirement for Bash to print a notice when it is started -interactively in the usual way. We made this exception because users -and standards expect shells not to print such messages. This -exception applies to any program that serves as a shell and that is -based primarily on Bash as opposed to other GNU software. - - -bashdb 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. - -Files with other copyright statement than: Copyright FSF, License GPL ---------------------------------------------------------------------- - -doc/FAQ ("the Bash FAQ") - - This document is Copyright 1995-2005 by Chester Ramey. - - Permission is hereby granted, without written agreement and - without license or royalty fees, to use, copy, and distribute - this document for any purpose, provided that the above copyright - notice appears in all copies of this document and that the - contents of this document remain unaltered. - - -doc/bashref.texi ("Bash Reference Manual"): - - Copyright (c) 1988-2005 Free Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of - this manual provided the copyright notice and this permission notice - are preserved on all copies. - - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 or - any later version published by the Free Software Foundation; with no - Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' - and with the Back-Cover Texts as in (a) below. A copy of the license is - included in the section entitled ``GNU Free Documentation License.'' - - (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify - this GNU Manual, like GNU software. Copies published by the Free - Software Foundation raise funds for GNU development.'' - - -examples/bashdb/bashdb (Bash shell debugger) - - # Adapted from an idea in O'Reilly's `Learning the Korn Shell' - # Copyright (c) 1993-1994 O'Reilly and Associates, Inc. - # Copyright (c) 1998, 1999, 2001 Gary V. Vaughan > - - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License [...] - - -examples/functions/pathfuncs (add dir to path) - - # @(#)Copyright (c) 1991 Simon J. Gerraty - # - # This file is provided in the hope that it will - # be of use. There is absolutely NO WARRANTY. - # Permission to copy, redistribute or otherwise - # use this file is hereby granted provided that - # the above copyright notice and this notice are - # left intact. - - -examples/functions/recurse (Recursive Directory Traverser) - - # Author: Kaz Kylheku - # Copyright 1999 - - -examples/scripts/bcsh.sh (Bourne shell cshell-emulator) - - # "Copyright (c) Chris Robertson, December 1985" - # - # This software may be used for any purpose provided the original - # copyright notice and this notice are affixed thereto. No warranties of - # any kind whatsoever are provided with this software, and it is hereby - # understood that the author is not liable for any damagages arising - # from the use of this software. - - -examples/scripts/websrv.sh (WWW server in sh) - - #copyright chris ulrich; This software may be used or modified - #in any way so long as this notice remains intact. - - -examples/loadables/getconf.c (POSIX.2 getconf utility) - - /* - * ORIGINAL COPYRIGHT STATEMENT: - * - * Copyright (c) 1994 Winning Strategies, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Winning Strategies, Inc. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - - /* - * POSIX.2 getconf utility - * - * Originally Written by: - * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc. - * - * Heavily modified for inclusion in bash by - * Chet Ramey - */ - - -examples/loadables/cut.c: - - /* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Adam S. Moskowitz of Menlo Consulting and Marciano Pitargue. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - - -lib/readline/doc/rlman.texi (part of the GNU Readline Library manual) - - Copyright (c) 1988-2004 Free Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of - this manual provided the copyright notice and this permission notice - are preserved on all copies. - - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 or - any later version published by the Free Software Foundation; with no - Invariant Sections, with the Front-Cover texts being ``A GNU Manual,'' - and with the Back-Cover Texts as in (a) below. A copy of the license is - included in the section entitled ``GNU Free Documentation License.'' - - (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify - this GNU Manual, like GNU software. Copies published by the Free - Software Foundation raise funds for GNU development.'' - - -lib/readline/doc/rltech.texi (part of the GNU Readline Library manual) - - Copyright (c) 1988-2005 Free Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of - this manual provided the copyright notice and this permission notice - pare preserved on all copies. - - Permission is granted to process this file through TeX and print the - results, provided the printed document carries copying permission - notice identical to this one except for the removal of this paragraph - (this paragraph not being relevant to the printed manual). - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided that the entire - resulting derived work is distributed under the terms of a permission - notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions, - except that this permission notice may be stated in a translation approved - by the Foundation. - - -lib/readline/doc/rluser.texi (part of the GNU Readline Library manual) - - Copyright (c) 1988-2005 Free Software Foundation, Inc. - - Authored by Brian Fox and Chet Ramey. - - Permission is granted to process this file through Tex and print the - results, provided the printed document carries copying permission notice - identical to this one except for the removal of this paragraph (this - paragraph not being relevant to the printed manual). - - Permission is granted to make and distribute verbatim copies of this manual - provided the copyright notice and this permission notice are preserved on - all copies. - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided also that the - GNU Copyright statement is available to the distributee, and provided that - the entire resulting derived work is distributed under the terms of a - permission notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions. - - -readline/doc/{history,hstech,hsuser}.texi (GNU History Library Manual) - - Copyright (c) 1988-2002 Free Software Foundation, Inc. - Authored by Brian Fox and Chet Ramey. - - Permission is granted to make and distribute verbatim copies of this manual - provided the copyright notice and this permission notice are preserved on - all copies. - - Permission is granted to process this file through Tex and print the - results, provided the printed document carries copying permission notice - identical to this one except for the removal of this paragraph (this - paragraph not being relevant to the printed manual). - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided also that the - GNU Copyright statement is available to the distributee, and provided that - the entire resulting derived work is distributed under the terms of a - permission notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions. - - -lib/sh/inet_aton.c: - - * Copyright (c) 1983, 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - - * Portions Copyright (c) 1993 by Digital Equipment Corporation. - * - * 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, and that - * the name of Digital Equipment Corporation not be used in advertising or - * publicity pertaining to distribution of the document or software without - * specific, written prior permission. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT - * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - - -lib/termcap/grot/termcap.info (GNU termcap library manual) - - Copyright (c) 1988 Free Software Foundation, Inc. - - Permission is granted to make and distribute verbatim copies of - this manual provided the copyright notice and this permission notice - are preserved on all copies. - - Permission is granted to process this file through TeX and print the - results, provided the printed document carries copying permission - notice identical to this one except for the removal of this paragraph - (this paragraph not being relevant to the printed manual). - - Permission is granted to copy and distribute modified versions of this - manual under the conditions for verbatim copying, provided that the entire - resulting derived work is distributed under the terms of a permission - notice identical to this one. - - Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions, - except that this permission notice may be stated in a translation approved - by the Foundation. - - -support/man2html.c - - * This program was written by Richard Verhoeven (NL:5482ZX35) - * at the Eindhoven University of Technology. Email: rcb5@win.tue.nl - * - * Permission is granted to distribute, modify and use this program as long - * as this comment is not removed or changed. - * - * THIS IS A MODIFIED VERSION. IT WAS MODIFIED BY chet@po.cwru.edu FOR - * USE BY BASH. - -debian/md5.[ch] - -/* - Copyright (c) 1999, 2002 Aladdin Enterprises. All rights reserved. - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - L. Peter Deutsch - ghost@aladdin.com - - */ -/* $Id: md5.h 43594 2006-04-03 16:27:50Z matthias.klose $ */ -/* - Independent implementation of MD5 (RFC 1321). - - This code implements the MD5 Algorithm defined in RFC 1321, whose - text is available at - http://www.ietf.org/rfc/rfc1321.txt - The code is derived from the text of the RFC, including the test suite - (section A.5) but excluding the rest of Appendix A. It does not include - any code or documentation that is identified in the RFC as being - copyrighted. - - The original and principal author of md5.h is L. Peter Deutsch - . Other authors are noted in the change history - that follows (in reverse chronological order): - - 2002-04-13 lpd Removed support for non-ANSI compilers; removed - references to Ghostscript; clarified derivation from RFC 1321; - now handles byte order either statically or dynamically. - 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. - 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); - added conditionalization for C++ compilation from Martin - Purschke . - 1999-05-03 lpd Original version. - */ diff --git a/tests/cluecode/data/copyright_fossology/testdata47.yml b/tests/cluecode/data/copyright_fossology/testdata47.yml new file mode 100644 index 00000000000..2970a0e6a5f --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata47.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1996-2001 Internet Software Consortium +holders: + - Internet Software Consortium +authors: + - Bdale Garbee + - Internet Software Consortium diff --git a/tests/cluecode/data/copyright_fossology/testdata47_raw b/tests/cluecode/data/copyright_fossology/testdata47_raw deleted file mode 100644 index e3c0b111e28..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata47_raw +++ /dev/null @@ -1,27 +0,0 @@ -This package was debianized by Bdale Garbee on -Tue, 12 Dec 2000 02:42:56 -0700. - -It was downloaded from http://www.isc.org/products/BIND/ and can be fetched -from git with: - git clone git://git.debian.org/users/lamont/bind9.git -ISC releases can be cloned from git with: - git clone git://git.debian.org/users/lamont/bind9-isc.git - -Upstream Author: Internet Software Consortium - -Copyright: - -Copyright (c) 1996-2001 Internet Software Consortium. - -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" AND INTERNET SOFTWARE CONSORTIUM -DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL -INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING -FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tests/cluecode/data/copyright_fossology/testdata48.yml b/tests/cluecode/data/copyright_fossology/testdata48.yml new file mode 100644 index 00000000000..2970a0e6a5f --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata48.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1996-2001 Internet Software Consortium +holders: + - Internet Software Consortium +authors: + - Bdale Garbee + - Internet Software Consortium diff --git a/tests/cluecode/data/copyright_fossology/testdata48_raw b/tests/cluecode/data/copyright_fossology/testdata48_raw deleted file mode 100644 index e3c0b111e28..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata48_raw +++ /dev/null @@ -1,27 +0,0 @@ -This package was debianized by Bdale Garbee on -Tue, 12 Dec 2000 02:42:56 -0700. - -It was downloaded from http://www.isc.org/products/BIND/ and can be fetched -from git with: - git clone git://git.debian.org/users/lamont/bind9.git -ISC releases can be cloned from git with: - git clone git://git.debian.org/users/lamont/bind9-isc.git - -Upstream Author: Internet Software Consortium - -Copyright: - -Copyright (c) 1996-2001 Internet Software Consortium. - -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" AND INTERNET SOFTWARE CONSORTIUM -DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL -INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING -FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tests/cluecode/data/copyright_fossology/testdata49.yml b/tests/cluecode/data/copyright_fossology/testdata49.yml new file mode 100644 index 00000000000..2970a0e6a5f --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata49.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1996-2001 Internet Software Consortium +holders: + - Internet Software Consortium +authors: + - Bdale Garbee + - Internet Software Consortium diff --git a/tests/cluecode/data/copyright_fossology/testdata49_raw b/tests/cluecode/data/copyright_fossology/testdata49_raw deleted file mode 100644 index e3c0b111e28..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata49_raw +++ /dev/null @@ -1,27 +0,0 @@ -This package was debianized by Bdale Garbee on -Tue, 12 Dec 2000 02:42:56 -0700. - -It was downloaded from http://www.isc.org/products/BIND/ and can be fetched -from git with: - git clone git://git.debian.org/users/lamont/bind9.git -ISC releases can be cloned from git with: - git clone git://git.debian.org/users/lamont/bind9-isc.git - -Upstream Author: Internet Software Consortium - -Copyright: - -Copyright (c) 1996-2001 Internet Software Consortium. - -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" AND INTERNET SOFTWARE CONSORTIUM -DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL -INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING -FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tests/cluecode/data/copyright_fossology/testdata4_raw b/tests/cluecode/data/copyright_fossology/testdata4_raw deleted file mode 100644 index 24f4d4ce3a8..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata4_raw +++ /dev/null @@ -1,54 +0,0 @@ -/* - Copyright (c) 1990-1999 Info-ZIP. All rights reserved. - - See the accompanying file LICENSE, version 1999-Oct-05 or later - (the contents of which are also included in zip.h) for terms of use. - If, for some reason, both of these files are missing, the Info-ZIP license - also may be found at: ftp://ftp.cdrom.com/pub/infozip/license.html -*/ -#ifndef __amiga_amiga_h -#define __amiga_amiga_h - -/* amiga.h - * - * Globular definitions that affect all of AmigaDom. - * - * Originally included in unzip.h, extracted for simplicity and eeze of - * maintenance by John Bush. - * - * This version is for use with Zip. It is not globally included, but used - * only by functions in amiga/amigazip.c. Much material that was needed for - * UnZip is absent here. - * - */ - -#include /* O_BINARY for open() w/o CR/LF translation */ -#include "amiga/z-stat.h" /* substitute for and */ -#define direct dirent - -#ifndef MODERN -# define MODERN -#endif - -#ifdef AZTEC_C /* Manx Aztec C, 5.0 or newer only */ -# include -# include /* do inline dos.library calls */ -# define O_BINARY 0 -#endif /* AZTEC_C */ - - -#ifdef __SASC -# include -# include -# define disk_not_mounted 0 -# if ( (!defined(O_BINARY)) && defined(O_RAW)) -# define O_BINARY O_RAW -# endif -#endif /* SASC */ - - -/* Funkshine Prough Toe Taipes */ - -LONG FileDate (char *, time_t[]); - -#endif /* __amiga_amiga_h */ diff --git a/tests/cluecode/data/copyright_fossology/testdata5.yml b/tests/cluecode/data/copyright_fossology/testdata5.yml new file mode 100644 index 00000000000..a545a395bef --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata5.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Copyright 2000 +authors: + - Antoine P. Petitet diff --git a/tests/cluecode/data/copyright_fossology/testdata50.yml b/tests/cluecode/data/copyright_fossology/testdata50.yml new file mode 100644 index 00000000000..8cf30cf8038 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata50.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, + 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + - Copyright (c) Free Software Foundation, Inc. + - Copyright (c) 2000 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org +holders: + - Free Software Foundation, Inc. + - Free Software Foundation, Inc. + - Free Software Foundation, Inc. + - Free Software Foundation, Inc. +authors: + - Christopher C. Chimelis diff --git a/tests/cluecode/data/copyright_fossology/testdata50_raw b/tests/cluecode/data/copyright_fossology/testdata50_raw deleted file mode 100644 index 46d6a9d9570..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata50_raw +++ /dev/null @@ -1,1095 +0,0 @@ -This is the Debian GNU/Linux prepackaged version of the GNU assembler, -linker, and binary utilities. - -This package was put together by me, James Troup , -from sources, which I obtained from: - - ftp://ftp.gnu.org/pub/gnu/binutils/ - -and: - - cvs://:pserver:anoncvs@sources.redhat.com:/cvs/src - -It was previously maintained by Christopher C. Chimelis - -GNU Binutils is Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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; version 2 dated June, 1991. - -GPL-3 UPDATE - [ files in CVS are currently converted to GPL-3 ] - - 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. -END GPL-3 UPDATE - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL' -and `/usr/share/common-licenses/LGPL'. - -The binutils manuals and associated documentation are also Copyright -(c) Free Software Foundation, Inc. They are distributed under the GNU -Free Documentation License Version 1.1 or any later version published -by the Free Software Foundation; with no Invariant Sections, with no -Front-Cover Texts, and with no Back-Cover Texts. A copy of the license -is shown below: - -GNU Free Documentation License -****************************** - - Version 1.1, March 2000 - Copyright (c) 2000 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - 0. PREAMBLE - - The purpose of this License is to make a manual, textbook, or other - written document "free" in the sense of freedom: to assure everyone - the effective freedom to copy and redistribute it, with or without - modifying it, either commercially or noncommercially. Secondarily, - this License preserves for the author and publisher a way to get - credit for their work, while not being considered responsible for - modifications made by others. - - This License is a kind of "copyleft", which means that derivative - works of the document must themselves be free in the same sense. - It complements the GNU General Public License, which is a copyleft - license designed for free software. - - We have designed this License in order to use it for manuals for - free software, because free software needs free documentation: a - free program should come with manuals providing the same freedoms - that the software does. But this License is not limited to - software manuals; it can be used for any textual work, regardless - of subject matter or whether it is published as a printed book. - We recommend this License principally for works whose purpose is - instruction or reference. - - - 1. APPLICABILITY AND DEFINITIONS - - This License applies to any manual or other work that contains a - notice placed by the copyright holder saying it can be distributed - under the terms of this License. The "Document", below, refers to - any such manual or work. Any member of the public is a licensee, - and is addressed as "you." - - A "Modified Version" of the Document means any work containing the - Document or a portion of it, either copied verbatim, or with - modifications and/or translated into another language. - - A "Secondary Section" is a named appendix or a front-matter - section of the Document that deals exclusively with the - relationship of the publishers or authors of the Document to the - Document's overall subject (or to related matters) and contains - nothing that could fall directly within that overall subject. - (For example, if the Document is in part a textbook of - mathematics, a Secondary Section may not explain any mathematics.) - The relationship could be a matter of historical connection with - the subject or with related matters, or of legal, commercial, - philosophical, ethical or political position regarding them. - - The "Invariant Sections" are certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in - the notice that says that the Document is released under this - License. - - The "Cover Texts" are certain short passages of text that are - listed, as Front-Cover Texts or Back-Cover Texts, in the notice - that says that the Document is released under this License. - - A "Transparent" copy of the Document means a machine-readable copy, - represented in a format whose specification is available to the - general public, whose contents can be viewed and edited directly - and straightforwardly with generic text editors or (for images - composed of pixels) generic paint programs or (for drawings) some - widely available drawing editor, and that is suitable for input to - text formatters or for automatic translation to a variety of - formats suitable for input to text formatters. A copy made in an - otherwise Transparent file format whose markup has been designed - to thwart or discourage subsequent modification by readers is not - Transparent. A copy that is not "Transparent" is called "Opaque." - - Examples of suitable formats for Transparent copies include plain - ASCII without markup, Texinfo input format, LaTeX input format, - SGML or XML using a publicly available DTD, and - standard-conforming simple HTML designed for human modification. - Opaque formats include PostScript, PDF, proprietary formats that - can be read and edited only by proprietary word processors, SGML - or XML for which the DTD and/or processing tools are not generally - available, and the machine-generated HTML produced by some word - processors for output purposes only. - - The "Title Page" means, for a printed book, the title page itself, - plus such following pages as are needed to hold, legibly, the - material this License requires to appear in the title page. For - works in formats which do not have any title page as such, "Title - Page" means the text near the most prominent appearance of the - work's title, preceding the beginning of the body of the text. - - 2. VERBATIM COPYING - - You may copy and distribute the Document in any medium, either - commercially or noncommercially, provided that this License, the - copyright notices, and the license notice saying this License - applies to the Document are reproduced in all copies, and that you - add no other conditions whatsoever to those of this License. You - may not use technical measures to obstruct or control the reading - or further copying of the copies you make or distribute. However, - you may accept compensation in exchange for copies. If you - distribute a large enough number of copies you must also follow - the conditions in section 3. - - You may also lend copies, under the same conditions stated above, - and you may publicly display copies. - - 3. COPYING IN QUANTITY - - If you publish printed copies of the Document numbering more than - 100, and the Document's license notice requires Cover Texts, you - must enclose the copies in covers that carry, clearly and legibly, - all these Cover Texts: Front-Cover Texts on the front cover, and - Back-Cover Texts on the back cover. Both covers must also clearly - and legibly identify you as the publisher of these copies. The - front cover must present the full title with all words of the - title equally prominent and visible. You may add other material - on the covers in addition. Copying with changes limited to the - covers, as long as they preserve the title of the Document and - satisfy these conditions, can be treated as verbatim copying in - other respects. - - If the required texts for either cover are too voluminous to fit - legibly, you should put the first ones listed (as many as fit - reasonably) on the actual cover, and continue the rest onto - adjacent pages. - - If you publish or distribute Opaque copies of the Document - numbering more than 100, you must either include a - machine-readable Transparent copy along with each Opaque copy, or - state in or with each Opaque copy a publicly-accessible - computer-network location containing a complete Transparent copy - of the Document, free of added material, which the general - network-using public has access to download anonymously at no - charge using public-standard network protocols. If you use the - latter option, you must take reasonably prudent steps, when you - begin distribution of Opaque copies in quantity, to ensure that - this Transparent copy will remain thus accessible at the stated - location until at least one year after the last time you - distribute an Opaque copy (directly or through your agents or - retailers) of that edition to the public. - - It is requested, but not required, that you contact the authors of - the Document well before redistributing any large number of - copies, to give them a chance to provide you with an updated - version of the Document. - - 4. MODIFICATIONS - - You may copy and distribute a Modified Version of the Document - under the conditions of sections 2 and 3 above, provided that you - release the Modified Version under precisely this License, with - the Modified Version filling the role of the Document, thus - licensing distribution and modification of the Modified Version to - whoever possesses a copy of it. In addition, you must do these - things in the Modified Version: - - A. Use in the Title Page (and on the covers, if any) a title - distinct from that of the Document, and from those of previous - versions (which should, if there were any, be listed in the - History section of the Document). You may use the same title - as a previous version if the original publisher of that version - gives permission. - B. List on the Title Page, as authors, one or more persons or - entities responsible for authorship of the modifications in the - Modified Version, together with at least five of the principal - authors of the Document (all of its principal authors, if it - has less than five). - C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. - D. Preserve all the copyright notices of the Document. - E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. - F. Include, immediately after the copyright notices, a license - notice giving the public permission to use the Modified Version - under the terms of this License, in the form shown in the - Addendum below. - G. Preserve in that license notice the full lists of Invariant - Sections and required Cover Texts given in the Document's - license notice. - H. Include an unaltered copy of this License. - I. Preserve the section entitled "History", and its title, and add - to it an item stating at least the title, year, new authors, and - publisher of the Modified Version as given on the Title Page. - If there is no section entitled "History" in the Document, - create one stating the title, year, authors, and publisher of - the Document as given on its Title Page, then add an item - describing the Modified Version as stated in the previous - sentence. - J. Preserve the network location, if any, given in the Document for - public access to a Transparent copy of the Document, and - likewise the network locations given in the Document for - previous versions it was based on. These may be placed in the - "History" section. You may omit a network location for a work - that was published at least four years before the Document - itself, or if the original publisher of the version it refers - to gives permission. - K. In any section entitled "Acknowledgements" or "Dedications", - preserve the section's title, and preserve in the section all the - substance and tone of each of the contributor acknowledgements - and/or dedications given therein. - L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section titles. - M. Delete any section entitled "Endorsements." Such a section - may not be included in the Modified Version. - N. Do not retitle any existing section as "Endorsements" or to - conflict in title with any Invariant Section. - - If the Modified Version includes new front-matter sections or - appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option - designate some or all of these sections as invariant. To do this, - add their titles to the list of Invariant Sections in the Modified - Version's license notice. These titles must be distinct from any - other section titles. - - You may add a section entitled "Endorsements", provided it contains - nothing but endorsements of your Modified Version by various - parties-for example, statements of peer review or that the text has - been approved by an organization as the authoritative definition - of a standard. - - You may add a passage of up to five words as a Front-Cover Text, - and a passage of up to 25 words as a Back-Cover Text, to the end - of the list of Cover Texts in the Modified Version. Only one - passage of Front-Cover Text and one of Back-Cover Text may be - added by (or through arrangements made by) any one entity. If the - Document already includes a cover text for the same cover, - previously added by you or by arrangement made by the same entity - you are acting on behalf of, you may not add another; but you may - replace the old one, on explicit permission from the previous - publisher that added the old one. - - The author(s) and publisher(s) of the Document do not by this - License give permission to use their names for publicity for or to - assert or imply endorsement of any Modified Version. - - 5. COMBINING DOCUMENTS - - You may combine the Document with other documents released under - this License, under the terms defined in section 4 above for - modified versions, provided that you include in the combination - all of the Invariant Sections of all of the original documents, - unmodified, and list them all as Invariant Sections of your - combined work in its license notice. - - The combined work need only contain one copy of this License, and - multiple identical Invariant Sections may be replaced with a single - copy. If there are multiple Invariant Sections with the same name - but different contents, make the title of each such section unique - by adding at the end of it, in parentheses, the name of the - original author or publisher of that section if known, or else a - unique number. Make the same adjustment to the section titles in - the list of Invariant Sections in the license notice of the - combined work. - - In the combination, you must combine any sections entitled - "History" in the various original documents, forming one section - entitled "History"; likewise combine any sections entitled - "Acknowledgements", and any sections entitled "Dedications." You - must delete all sections entitled "Endorsements." - - 6. COLLECTIONS OF DOCUMENTS - - You may make a collection consisting of the Document and other - documents released under this License, and replace the individual - copies of this License in the various documents with a single copy - that is included in the collection, provided that you follow the - rules of this License for verbatim copying of each of the - documents in all other respects. - - You may extract a single document from such a collection, and - distribute it individually under this License, provided you insert - a copy of this License into the extracted document, and follow - this License in all other respects regarding verbatim copying of - that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - - A compilation of the Document or its derivatives with other - separate and independent documents or works, in or on a volume of - a storage or distribution medium, does not as a whole count as a - Modified Version of the Document, provided no compilation - copyright is claimed for the compilation. Such a compilation is - called an "aggregate", and this License does not apply to the - other self-contained works thus compiled with the Document, on - account of their being thus compiled, if they are not themselves - derivative works of the Document. - - If the Cover Text requirement of section 3 is applicable to these - copies of the Document, then if the Document is less than one - quarter of the entire aggregate, the Document's Cover Texts may be - placed on covers that surround only the Document within the - aggregate. Otherwise they must appear on covers around the whole - aggregate. - - 8. TRANSLATION - - Translation is considered a kind of modification, so you may - distribute translations of the Document under the terms of section - 4. Replacing Invariant Sections with translations requires special - permission from their copyright holders, but you may include - translations of some or all Invariant Sections in addition to the - original versions of these Invariant Sections. You may include a - translation of this License provided that you also include the - original English version of this License. In case of a - disagreement between the translation and the original English - version of this License, the original English version will prevail. - - 9. TERMINATION - - You may not copy, modify, sublicense, or distribute the Document - except as expressly provided for under this License. Any other - attempt to copy, modify, sublicense or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - - The Free Software Foundation may publish new, revised versions of - the GNU Free Documentation License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. See - http://www.gnu.org/copyleft/. - - Each version of the License is given a distinguishing version - number. If the Document specifies that a particular numbered - version of this License "or any later version" applies to it, you - have the option of following the terms and conditions either of - that specified version or of any later version that has been - published (not as a draft) by the Free Software Foundation. If - the Document does not specify a version number of this License, - you may choose any version ever published (not as a draft) by the - Free Software Foundation. - - -ADDENDUM: How to use this License for your documents -==================================================== - -To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and license -notices just after the title page: - - Copyright (c) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.1 - or any later version published by the Free Software Foundation; - with the Invariant Sections being LIST THEIR TITLES, with the - Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. - A copy of the license is included in the section entitled "GNU - Free Documentation License." - - If you have no Invariant Sections, write "with no Invariant Sections" -instead of saying which ones are invariant. If you have no Front-Cover -Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being -LIST"; likewise for Back-Cover Texts. - - If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, to -permit their use in free software. - - - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (c) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (c) - - 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 . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (c) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/tests/cluecode/data/copyright_fossology/testdata51.yml b/tests/cluecode/data/copyright_fossology/testdata51.yml new file mode 100644 index 00000000000..fa7f51fd778 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata51.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2008, Arnaud Cornet and loic Gomez +holders: + - Arnaud Cornet and loic Gomez +authors: + - Arnaud Cornet + - Arnaud Cornet and loic Gomez diff --git a/tests/cluecode/data/copyright_fossology/testdata51_raw b/tests/cluecode/data/copyright_fossology/testdata51_raw deleted file mode 100644 index 6f47869f65d..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata51_raw +++ /dev/null @@ -1,29 +0,0 @@ -This package was debianized by Arnaud Cornet on -Sun, 09 Oct 2005 14:18:48 +0200 - -It was downloaded from http://bip.t1r.net/ - -Upstream Author: Arnaud Cornet and loic Gomez - -Copyright 2008, Arnaud Cornet and loic Gomez : - - This package 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; version 2 dated June, 1991. - - This package 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 package; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. - -Specific permission is granted for the GPLed code in this distribition to -be linked to OpenSSL without invoking GPL clause 2(b). - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - diff --git a/tests/cluecode/data/copyright_fossology/testdata52.yml b/tests/cluecode/data/copyright_fossology/testdata52.yml new file mode 100644 index 00000000000..52e26d034b5 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata52.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1980, 1993 The Regents of the University of California +holders: + - The Regents of the University of California +authors: + - Loic Prylli + - Robert Luberda diff --git a/tests/cluecode/data/copyright_fossology/testdata52_raw b/tests/cluecode/data/copyright_fossology/testdata52_raw deleted file mode 100644 index 0c815068875..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata52_raw +++ /dev/null @@ -1,14 +0,0 @@ -This package was debianized by Loic Prylli on -Mon, 23 Dec 1996 00:13:13 +0100. -The package is currently maintained by Robert Luberda - -It is now based on OpenBSD in directory src/usr.bin/mail on a lot of major -ftp sites. -See the README.Debian (and changelog.Debian) for the complicated history -of the Debian package. - -Copyright (c) 1980, 1993 The Regents of the University of California. - -This software is licensed under the BSD License. -On Debian systems, the complete text of the BSD License can be found -in `/usr/share/common-licenses/BSD'. diff --git a/tests/cluecode/data/copyright_fossology/testdata53.yml b/tests/cluecode/data/copyright_fossology/testdata53.yml new file mode 100644 index 00000000000..79d3547442c --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata53.yml @@ -0,0 +1,13 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) The Regents of the University of California +holders: + - The Regents of the University of California +authors: + - Austin Donnelly + - Ian Murdock + - Charles Briscoe-Smith + - Graham Wilson diff --git a/tests/cluecode/data/copyright_fossology/testdata53_raw b/tests/cluecode/data/copyright_fossology/testdata53_raw deleted file mode 100644 index d59cc280612..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata53_raw +++ /dev/null @@ -1,51 +0,0 @@ -This is a collection of programs from 4.4BSD-Lite that have not (yet) -need re-written by FSF as GNU. It was constructed for inclusion in -Debian Linux. As programs found here become available from GNU sources, -they will be replaced. - -This package was originally put together by Austin Donnelly -, but is heavily based on bsdutils, originally put -together by Ian Murdock . Please report any -problems or suggested additions or changes to Austin Donnelly. - -Then the package has been maintained by Charles Briscoe-Smith -. I gathered data for the 1999-2001 calendar files -from various sources on the Internet, and I'd also like to thank Oliver -Elphick, Julian Gilbey, Daniel Martin and Jaldhar H. Vyas for providing -much useful data on the various religous calendars. I have edited the -files they provided to fit calendar's requirements, so any errors should -be attributed to me. - -After cpbs@debian.org, Marco d'Itri maintained it for -almost two years, before Tollef Fog Heen took over. -The package is now maintained by Graham Wilson . - -This package may be redistributed under the terms of the UCB BSD -license: - -Copyright (c) The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. diff --git a/tests/cluecode/data/copyright_fossology/testdata54.yml b/tests/cluecode/data/copyright_fossology/testdata54.yml new file mode 100644 index 00000000000..a7148491ea9 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata54.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders + - authors +authors: + - Guy Maor + - Sean Shaleh Perry , and Adrian Bunk diff --git a/tests/cluecode/data/copyright_fossology/testdata54_raw b/tests/cluecode/data/copyright_fossology/testdata54_raw deleted file mode 100644 index 625dfc7956e..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata54_raw +++ /dev/null @@ -1,41 +0,0 @@ -This is the Debian GNU/Linux prepackaged version of util-linux. - -This package was put together by Guy Maor and later -maintained by Sean 'Shaleh' Perry , and Adrian Bunk -. - -The current maintainer is LaMont Jones . -See also: git://git.debian.org/~lamont/util-linux.git - -It was downloaded from: - ftp://ftp.us.kernel.org/pub/linux/utils/util-linux-ng/ - -Upstream maintainers include: - Maintainer: Karel Zak - Past Maintainer: Adrian Bunk - Past Maintainer: Andries Brouwer - See also /usr/share/doc/util-linux/AUTHORS - -Copyright: - - A variety of people and entities, as befits the nature of the package. - See the individual sources for exact copyright holder information. - -License: - - The project doesn't use same license for all code. There is code with: - - * GPLv2+ (GNU General Public License version 2, or any later version) - - * GPLv2 (GNU General Public License version 2) - - * BSD with advertising - - * Public Domain - - Please, check source code for more details. A license is usually at the start - of each source file. - - Anything lacking an explicit license may be redistributed under the terms - of the GNU GPL Version 2 or later found on Debian systems in the file - /usr/share/common-licenses/GPL diff --git a/tests/cluecode/data/copyright_fossology/testdata55.yml b/tests/cluecode/data/copyright_fossology/testdata55.yml new file mode 100644 index 00000000000..850c8165235 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata55.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2003-2005 Scott James Remnant + - Copyright (c) 2003 Colin Walters + - Copyright (c) 1999-2002 Antti-Juhani Kaijanaho +holders: + - Scott James Remnant + - Colin Walters + - Antti-Juhani Kaijanaho diff --git a/tests/cluecode/data/copyright_fossology/testdata55_raw b/tests/cluecode/data/copyright_fossology/testdata55_raw deleted file mode 100644 index e98fae1b8c8..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata55_raw +++ /dev/null @@ -1,22 +0,0 @@ -This package contains an informational list of Build-Essential Debian -packages. - -Copyright (c) 2003-2005 Scott James Remnant -Copyright (c) 2003 Colin Walters -Copyright (c) 1999-2002 Antti-Juhani Kaijanaho - - -License: - -The files in this package are free software; you can redistribute them -and/or modify them 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. - -The files in this package are distributed in the hope that they 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. - -On Debian GNU/Linux systems, the complete text of the GNU General Public -License can be found in `/usr/share/common-licenses/GPL'. diff --git a/tests/cluecode/data/copyright_fossology/testdata56.yml b/tests/cluecode/data/copyright_fossology/testdata56.yml new file mode 100644 index 00000000000..8e21f1fcdb6 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata56.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999, 2000, 2001, 2002 Philippe Troin + - Copyright (c) 2004-2007 Anibal Monsalve Salazar + - copyright (c) 1996-2007 Julian R Seward +holders: + - Philippe Troin + - Anibal Monsalve Salazar + - Julian R Seward +authors: + - Philippe Troin + - Anibal Monsalve Salazar + - Julian Seward diff --git a/tests/cluecode/data/copyright_fossology/testdata56_raw b/tests/cluecode/data/copyright_fossology/testdata56_raw deleted file mode 100644 index a6c252898ca..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata56_raw +++ /dev/null @@ -1,60 +0,0 @@ -This package (bzip2) was created by Philippe Troin . -It is currently mantained by Anibal Monsalve Salazar . -This package is Copyright (c) 1999, 2000, 2001, 2002 Philippe Troin - and Copyright (c) 2004-2007 Anibal Monsalve Salazar. -It is licensed under the GNU General Public License which can be -found in /usr/share/common-licenses/GPL. - -It was downloaded from - http://www.bzip.org/downloads.html - -For more information about bzip2, please visit: - http://www.bzip.org/ - -Author: - Julian Seward - -Copyright (from LICENSE) - - --------------------------------------------------------------------------- - -This program, "bzip2", the associated library "libbzip2", and all -documentation, are copyright (c) 1996-2007 Julian R Seward. All -rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - -3. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - -4. The name of the author may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Julian Seward, jseward@bzip.org -bzip2/libbzip2 version 1.0.5 of 10 December 2007 - --------------------------------------------------------------------------- diff --git a/tests/cluecode/data/copyright_fossology/testdata57.yml b/tests/cluecode/data/copyright_fossology/testdata57.yml new file mode 100644 index 00000000000..317851a5298 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata57.yml @@ -0,0 +1,18 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2004, 2005, 2006, 2007 by Canonical Ltd +holders: + - Canonical Ltd +authors: + - Norbert Tretkowski + - Jeff Bailey + - Rob Weir + - Andres Salomon + - Lars Wirzenius + - Adeodato Simo + - Wouter van Heyst + - Jelmer Vernooij + - the pkg-bazaar team diff --git a/tests/cluecode/data/copyright_fossology/testdata57_raw b/tests/cluecode/data/copyright_fossology/testdata57_raw deleted file mode 100644 index d10ab3f6937..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata57_raw +++ /dev/null @@ -1,48 +0,0 @@ -Debianized by Norbert Tretkowski 2005-04-16 -New co-maintainer Jeff Bailey 2005-09-05 -New co-maintainer Rob Weir 2005-09-15 -New co-maintainer Andres Salomon 2006-01-24 -New co-maintainer Lars Wirzenius 2006-04-13 -New co-maintainer Adeodato Simó 2006-07-24 -New co-maintainer Wouter van Heyst 2007-01-17 -New co-maintainer Jelmer Vernooij 2008-05-02 - -Maintained by the pkg-bazaar team on alioth since May 2007 - -It was downloaded from: - - - -And the project homepage is: - - - -Upstream authors (among others): - - | Martin Pool - | Robert Collins - | Aaron Bentley - | John Arbash Meinel - -Copyright and license terms: - - - The sources of Bazaar are: - - | Copyright (c) 2004, 2005, 2006, 2007 by Canonical Ltd - - | This program is free software; you can redistribute it and/or modify - | it under the terms of the GNU General Public License as published by - | the Free Software Foundation; either version 2 of the License, or - | (at your option) any later version. - | - | This program is distributed in the hope that it will be useful, - | but WITHOUT ANY WARRANTY; without even the implied warranty of - | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - | GNU General Public License for more details. - | - | You should have received a copy of the GNU General Public License - | along with this program; if not, write to the Free Software - | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - - On Debian systems, the full text of the GNU General Public License is available - in /usr/share/common-licenses/GPL-2. diff --git a/tests/cluecode/data/copyright_fossology/testdata58.yml b/tests/cluecode/data/copyright_fossology/testdata58.yml new file mode 100644 index 00000000000..c691696f762 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata58.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001-2003 Fumitoshi UKAI + - Copyright (c) 1994-2000 Netscape Communications Corporation +holders: + - Fumitoshi UKAI + - Netscape Communications Corporation +authors: + - Fumitoshi UKAI diff --git a/tests/cluecode/data/copyright_fossology/testdata58_raw b/tests/cluecode/data/copyright_fossology/testdata58_raw deleted file mode 100644 index cd7f1a88144..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata58_raw +++ /dev/null @@ -1,43 +0,0 @@ -This is ca-certificates, written and maintained by Fumitoshi UKAI -on Mon, 7 Jan 2002 21:16:51 +0900. - -The original source can always be found at: - ftp://ftp.debian.org/dists/unstable/main/source/ - http://alioth.debian.org/projects/ca-certs/ - -Copyright (c) 2001-2003 Fumitoshi UKAI - -CA certificates from Mozilla as follows: -# The contents of this file are subject to the Mozilla Public -# License Version 1.1 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS -# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# The Original Code is the Netscape security libraries. -# -# The Initial Developer of the Original Code is Netscape -# Communications Corporation. Portions created by Netscape are -# Copyright (c) 1994-2000 Netscape Communications Corporation. All -# Rights Reserved. -# -# Contributor(s): -# -# Alternatively, the contents of this file may be used under the -# terms of the GNU General Public License Version 2 or later (the -# "GPL"), in which case the provisions of the GPL are applicable -# instead of those above. If you wish to allow use of your -# version of this file only under the terms of the GPL and not to -# allow others to use your version of this file under the MPL, -# indicate your decision by deleting the provisions above and -# replace them with the notice and other provisions required by -# the GPL. If you do not delete the provisions above, a recipient -# may use your version of this file under either the MPL or the -# GPL. - -On Debian GNU/Linux systems, the complete text of the GNU General Public -License can be found in '/usr/share/common-licenses/GPL' diff --git a/tests/cluecode/data/copyright_fossology/testdata59.yml b/tests/cluecode/data/copyright_fossology/testdata59.yml new file mode 100644 index 00000000000..c2884c709e1 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata59.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +authors: + - Colin Walters + - Colin Walters, Chris Cheney, Jonas Smedegaard, Jeff Bailey, Stefan Gybas, Robert Millan, + Marc Dequenes, Peter Eisentraut diff --git a/tests/cluecode/data/copyright_fossology/testdata59_raw b/tests/cluecode/data/copyright_fossology/testdata59_raw deleted file mode 100644 index 173b9afb3f5..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata59_raw +++ /dev/null @@ -1,20 +0,0 @@ -This package was debianized by Colin Walters on -Wed, 27 Nov 2002 13:23:06 -0500 - -Authors: Colin Walters, Chris Cheney, Jonas Smedegaard, Jeff Bailey, - Stefan Gybas, Robert Millan, Marc Dequènes, Peter Eisentraut - -Copyright : - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - -On Debian systems, the complete text of the GNU General Public License -can be found in the file /usr/share/common-licenses/GPL. diff --git a/tests/cluecode/data/copyright_fossology/testdata5_raw b/tests/cluecode/data/copyright_fossology/testdata5_raw deleted file mode 100644 index 168770b9482..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata5_raw +++ /dev/null @@ -1,120 +0,0 @@ -/* --------------------------------------------------------------------- - * - * -- Automatically Tuned Linear Algebra Software (ATLAS) - * (c) Copyright 2000 All Rights Reserved - * - * -- ATLAS routine -- Version 3.2 -- December 25, 2000 - * - * Author : Antoine P. Petitet - * Originally developed at the University of Tennessee, - * Innovative Computing Laboratory, Knoxville TN, 37996-1301, USA. - * - * --------------------------------------------------------------------- - * - * -- Copyright notice and Licensing terms: - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions, and the following disclaimer in - * the documentation and/or other materials provided with the distri- - * bution. - * 3. The name of the University, the ATLAS group, or the names of its - * contributors may not be used to endorse or promote products deri- - * ved from this software without specific written permission. - * - * -- Disclaimer: - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- - * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED - * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEO- - * RY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (IN- - * CLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * --------------------------------------------------------------------- - */ -/* - * Include files - */ -#include "atlas_refmisc.h" -#include "atlas_reflvl3.h" -#include "atlas_reflevel3.h" - -void ATL_zrefhemmRU -( - const int M, - const int N, - const double * ALPHA, - const double * A, - const int LDA, - const double * B, - const int LDB, - const double * BETA, - double * C, - const int LDC -) -{ -/* - * Purpose - * ======= - * - * ATL_zrefhemmRU( ... ) - * - * <=> - * - * ATL_zrefhemm( AtlasRight, AtlasUpper, ... ) - * - * See ATL_zrefhemm for details. - * - * --------------------------------------------------------------------- - */ -/* - * .. Local Variables .. - */ - register double t0_i, t0_r; - int i, iaj, iajk, iakj, ibij, ibik, icij, j, - jaj, jbj, jbk, jcj, k, lda2 = ( LDA << 1 ), - ldb2 = ( LDB << 1 ), ldc2 = ( LDC << 1 ); -/* .. - * .. Executable Statements .. - * - */ - for( j = 0, iaj = 0, jaj = 0, jbj = 0, jcj = 0; - j < N; j++, iaj += 2, jaj += lda2, jbj += ldb2, jcj += ldc2 ) - { - i = ( j << 1 ) + jaj; - Mset( ALPHA[0] * A[i], ALPHA[1] * A[i], t0_r, t0_i ); - for( i = 0, ibij = jbj, icij = jcj; i < M; i++, ibij += 2, icij += 2 ) - { - Mzelscal( BETA[0], BETA[1], C[icij], C[icij+1] ); - Mmla( t0_r, t0_i, B[ibij], B[ibij+1], C[icij], C[icij+1] ); - } - for( k = 0, iakj = jaj, jbk = 0; k < j; k++, iakj += 2, jbk += ldb2 ) - { - Mmul( ALPHA[0], ALPHA[1], A[iakj], A[iakj+1], t0_r, t0_i ); - for( i = 0, ibik = jbk, icij = jcj; - i < M; i++, ibik += 2, icij += 2 ) - { Mmla( t0_r, t0_i, B[ibik], B[ibik+1], C[icij], C[icij+1] ); } - } - for( k = j+1, iajk = iaj+(j+1)*lda2, jbk = (j+1)*ldb2; - k < N; k++, iajk += lda2, jbk += ldb2 ) - { - Mmul( ALPHA[0], ALPHA[1], A[iajk], -A[iajk+1], t0_r, t0_i ); - for( i = 0, ibik = jbk, icij = jcj; i < M; i++, ibik += 2, icij += 2 ) - { Mmla( t0_r, t0_i, B[ibik], B[ibik+1], C[icij], C[icij+1] ); } - } - } -/* - * End of ATL_zrefhemmRU - */ -} diff --git a/tests/cluecode/data/copyright_fossology/testdata6.yml b/tests/cluecode/data/copyright_fossology/testdata6.yml new file mode 100644 index 00000000000..5fffce69188 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata6.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998-2000 Sean Vyain, svyain@mail.tds.net + - Copyright (c) 2001-2002 Lawrence Widman, kdat@cardiothink.com +holders: + - Sean Vyain + - Lawrence Widman diff --git a/tests/cluecode/data/copyright_fossology/testdata60.yml b/tests/cluecode/data/copyright_fossology/testdata60.yml new file mode 100644 index 00000000000..25f3115ce93 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata60.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2003-2008 Bastian Blank +holders: + - Bastian Blank diff --git a/tests/cluecode/data/copyright_fossology/testdata60_raw b/tests/cluecode/data/copyright_fossology/testdata60_raw deleted file mode 100644 index a7f4b404675..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata60_raw +++ /dev/null @@ -1,22 +0,0 @@ -Copyright - - 2003-2008 Bastian Blank - -License: - - This package 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; version 2 dated June, 1991. - - This package 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 package; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - diff --git a/tests/cluecode/data/copyright_fossology/testdata61.yml b/tests/cluecode/data/copyright_fossology/testdata61.yml new file mode 100644 index 00000000000..9a23ff93623 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata61.yml @@ -0,0 +1,47 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + - Copyright (c) 1990, 1993, 1994 The Regents of the University of California + - Copyright (c) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + - Copyright (c) 1989, 1993 The Regents of the University of California + - Copyright (c) 1999-2006 Free Software Foundation, Inc. + - Copyright (c) 1997, 1998, 1999 Colin Plumb + - Copyright (c) 2005, 2006 Free Software Foundation, Inc. + - Copyright (c) 1996-1999 by Internet Software Consortium + - Copyright (c) 2004, 2006, 2007 Free Software Foundation, Inc. + - Copyright (c) 1997-2007 Free Software Foundation, Inc. + - Copyright (c) 1984 David M. Ihnat + - Copyright (c) 1996-2007 Free Software Foundation, Inc. + - Copyright (c) 1994, 1995, 1997, 1998, 1999, 2000 H. Peter Anvin + - Copyright (c) 1997-2005 Free Software Foundation, Inc. + - Copyright (c) 1984 David M. Ihnat + - Copyright (c) 1999-2007 Free Software Foundation, Inc. + - Copyright (c) 1997, 1998, 1999 Colin Plumb + - Copyright 1994-1996, 2000-2008 Free Software Foundation, Inc. + - Copyright (c) 1984-2008 Free Software Foundation, Inc. +holders: + - Free Software Foundation, Inc. + - The Regents of the University of California + - Free Software Foundation, Inc. + - The Regents of the University of California + - Free Software Foundation, Inc. + - Colin Plumb + - Free Software Foundation, Inc. + - Internet Software Consortium + - Free Software Foundation, Inc. + - Free Software Foundation, Inc. + - David M. Ihnat + - Free Software Foundation, Inc. + - H. Peter Anvin + - Free Software Foundation, Inc. + - David M. Ihnat + - Free Software Foundation, Inc. + - Colin Plumb + - Free Software Foundation, Inc. + - Free Software Foundation, Inc. +authors: + - Michael Stone + - Michael Stone diff --git a/tests/cluecode/data/copyright_fossology/testdata61_raw b/tests/cluecode/data/copyright_fossology/testdata61_raw deleted file mode 100644 index cdbeee5af9a..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata61_raw +++ /dev/null @@ -1,299 +0,0 @@ -This is the Debian GNU/Linux packaged version of the GNU core -utilities. - -This package is maintained by Michael Stone and -built from sources obtained from: - ftp://ftp.gnu.org/gnu/coreutils/coreutils-6.10.tar.gz - -This debian package was first put together by Michael Stone -, from coreutils 4.5.1. - -Changes: - * added Debian GNU/Linux package maintenance system files - * at times, bug fixes awaiting inclusion in the upstream source - - -Authors -======= - -See the file AUTHORS. - - -Copyright Holders and License -============================= - -lib/fts.c ---------- - - Copyright (c) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/*- - * Copyright (c) 1990, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - - -lib/fts_.h ----------- - - Copyright (c) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - - -lib/rand-isaac.[ch] -------------------- - - Copyright (c) 1999-2006 Free Software Foundation, Inc. - Copyright (c) 1997, 1998, 1999 Colin Plumb. - - 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 . - - -lib/inet_ntop.c ---------------- - - Copyright (c) 2005, 2006 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* - * Copyright (c) 1996-1999 by Internet Software Consortium. - * - * 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" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS - * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE - * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS - * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. - */ - - -m4/autobuild.m4 ---------------- -dnl Copyright (c) 2004, 2006, 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 Simon Josefsson - - -src/cut.c ---------- - - Copyright (c) 1997-2007 Free Software Foundation, Inc. - Copyright (c) 1984 David M. Ihnat - - 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 . */ - - -src/dircolors.c ---------------- - - Copyright (c) 1996-2007 Free Software Foundation, Inc. - Copyright (c) 1994, 1995, 1997, 1998, 1999, 2000 H. Peter Anvin - - 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 . */ - - -src/paste.c ------------ - - Copyright (c) 1997-2005 Free Software Foundation, Inc. - Copyright (c) 1984 David M. Ihnat - - 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 . */ - - -src/shred.c ------------ - - Copyright (c) 1999-2007 Free Software Foundation, Inc. - Copyright (c) 1997, 1998, 1999 Colin Plumb. - - 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 . - - -doc/coreutils.texi (The GNU Coreutils Manual) ---------------------------------------------- - -Copyright @copyright{} 1994-1996, 2000-2008 Free Software Foundation, Inc. - -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.2 or -any later version published by the Free Software Foundation; with no -Invariant Sections, with no Front-Cover Texts, and with no Back-Cover -Texts. A copy of the license is included in the section entitled ``GNU -Free Documentation License''. - - -all other files ---------------- - -Copyright (c) 1984-2008 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL-3'. diff --git a/tests/cluecode/data/copyright_fossology/testdata62.yml b/tests/cluecode/data/copyright_fossology/testdata62.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata62.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyright_fossology/testdata62_raw b/tests/cluecode/data/copyright_fossology/testdata62_raw deleted file mode 100644 index a32c3fea56d..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata62_raw +++ /dev/null @@ -1,26 +0,0 @@ -This package was debianized by Stefan Hornburg (Racke) on -Fri Oct 29 10:59:13 2004 CEST. - -It was downloaded from: -ftp://courier.sourceforge.net/pub/courier/courier/ - -Upstream Author: - -Sam Varshavchik -Double Precision, Inc. -PO Box 668 -Greenwood Lake, NY 10925 - -Copyright: - -This software is released under the GPL, version 3. -Additionally, compiling, linking, and/or using the OpenSSL toolkit in -conjunction with this software is allowed. - -A copy of the GNU General Public License is available as -/usr/share/common-licenses/GPL-3 in the Debian GNU/Linux distribution or on the -World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can also -obtain it by writing to the Free Software Foundation, Inc., 51 Franklin St, -Fifth Floor, Boston, MA 02110-1301, USA. - - diff --git a/tests/cluecode/data/copyright_fossology/testdata63.yml b/tests/cluecode/data/copyright_fossology/testdata63.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata63.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyright_fossology/testdata63_raw b/tests/cluecode/data/copyright_fossology/testdata63_raw deleted file mode 100644 index a32c3fea56d..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata63_raw +++ /dev/null @@ -1,26 +0,0 @@ -This package was debianized by Stefan Hornburg (Racke) on -Fri Oct 29 10:59:13 2004 CEST. - -It was downloaded from: -ftp://courier.sourceforge.net/pub/courier/courier/ - -Upstream Author: - -Sam Varshavchik -Double Precision, Inc. -PO Box 668 -Greenwood Lake, NY 10925 - -Copyright: - -This software is released under the GPL, version 3. -Additionally, compiling, linking, and/or using the OpenSSL toolkit in -conjunction with this software is allowed. - -A copy of the GNU General Public License is available as -/usr/share/common-licenses/GPL-3 in the Debian GNU/Linux distribution or on the -World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can also -obtain it by writing to the Free Software Foundation, Inc., 51 Franklin St, -Fifth Floor, Boston, MA 02110-1301, USA. - - diff --git a/tests/cluecode/data/copyright_fossology/testdata64.yml b/tests/cluecode/data/copyright_fossology/testdata64.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata64.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyright_fossology/testdata64_raw b/tests/cluecode/data/copyright_fossology/testdata64_raw deleted file mode 100644 index a32c3fea56d..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata64_raw +++ /dev/null @@ -1,26 +0,0 @@ -This package was debianized by Stefan Hornburg (Racke) on -Fri Oct 29 10:59:13 2004 CEST. - -It was downloaded from: -ftp://courier.sourceforge.net/pub/courier/courier/ - -Upstream Author: - -Sam Varshavchik -Double Precision, Inc. -PO Box 668 -Greenwood Lake, NY 10925 - -Copyright: - -This software is released under the GPL, version 3. -Additionally, compiling, linking, and/or using the OpenSSL toolkit in -conjunction with this software is allowed. - -A copy of the GNU General Public License is available as -/usr/share/common-licenses/GPL-3 in the Debian GNU/Linux distribution or on the -World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can also -obtain it by writing to the Free Software Foundation, Inc., 51 Franklin St, -Fifth Floor, Boston, MA 02110-1301, USA. - - diff --git a/tests/cluecode/data/copyright_fossology/testdata65.yml b/tests/cluecode/data/copyright_fossology/testdata65.yml new file mode 100644 index 00000000000..0246b4b4126 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata65.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1998 - 2008 Double Precision, Inc. +holders: + - Double Precision, Inc. +authors: + - Dennis Schoen diff --git a/tests/cluecode/data/copyright_fossology/testdata65_raw b/tests/cluecode/data/copyright_fossology/testdata65_raw deleted file mode 100644 index 64667897f07..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata65_raw +++ /dev/null @@ -1,27 +0,0 @@ -This package was debianized by Dennis Schoen on -Sat, 7 Oct 2000 14:04:43 +0200. - -It was downloaded from: -ftp://courier.sourceforge.net/pub/courier/courier/ - -Upstream Author: - -Sam Varshavchik -Double Precision, Inc. -PO Box 668 -Greenwood Lake, NY 10925 - -Copyright: - -Copyright 1998 - 2008 Double Precision, Inc. - -This software is released under the GPL, version 3. -Additionally, compiling, linking, and/or using the OpenSSL toolkit in -conjunction with this software is allowed. - -A copy of the GNU General Public License is available as -/usr/share/common-licenses/GPL-3 in the Debian GNU/Linux distribution or on the -World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can also -obtain it by writing to the Free Software Foundation, Inc., 51 Franklin St, -Fifth Floor, Boston, MA 02110-1301, USA. - diff --git a/tests/cluecode/data/copyright_fossology/testdata66.yml b/tests/cluecode/data/copyright_fossology/testdata66.yml new file mode 100644 index 00000000000..0246b4b4126 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata66.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1998 - 2008 Double Precision, Inc. +holders: + - Double Precision, Inc. +authors: + - Dennis Schoen diff --git a/tests/cluecode/data/copyright_fossology/testdata66_raw b/tests/cluecode/data/copyright_fossology/testdata66_raw deleted file mode 100644 index 64667897f07..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata66_raw +++ /dev/null @@ -1,27 +0,0 @@ -This package was debianized by Dennis Schoen on -Sat, 7 Oct 2000 14:04:43 +0200. - -It was downloaded from: -ftp://courier.sourceforge.net/pub/courier/courier/ - -Upstream Author: - -Sam Varshavchik -Double Precision, Inc. -PO Box 668 -Greenwood Lake, NY 10925 - -Copyright: - -Copyright 1998 - 2008 Double Precision, Inc. - -This software is released under the GPL, version 3. -Additionally, compiling, linking, and/or using the OpenSSL toolkit in -conjunction with this software is allowed. - -A copy of the GNU General Public License is available as -/usr/share/common-licenses/GPL-3 in the Debian GNU/Linux distribution or on the -World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can also -obtain it by writing to the Free Software Foundation, Inc., 51 Franklin St, -Fifth Floor, Boston, MA 02110-1301, USA. - diff --git a/tests/cluecode/data/copyright_fossology/testdata67.yml b/tests/cluecode/data/copyright_fossology/testdata67.yml new file mode 100644 index 00000000000..0246b4b4126 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata67.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1998 - 2008 Double Precision, Inc. +holders: + - Double Precision, Inc. +authors: + - Dennis Schoen diff --git a/tests/cluecode/data/copyright_fossology/testdata67_raw b/tests/cluecode/data/copyright_fossology/testdata67_raw deleted file mode 100644 index 64667897f07..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata67_raw +++ /dev/null @@ -1,27 +0,0 @@ -This package was debianized by Dennis Schoen on -Sat, 7 Oct 2000 14:04:43 +0200. - -It was downloaded from: -ftp://courier.sourceforge.net/pub/courier/courier/ - -Upstream Author: - -Sam Varshavchik -Double Precision, Inc. -PO Box 668 -Greenwood Lake, NY 10925 - -Copyright: - -Copyright 1998 - 2008 Double Precision, Inc. - -This software is released under the GPL, version 3. -Additionally, compiling, linking, and/or using the OpenSSL toolkit in -conjunction with this software is allowed. - -A copy of the GNU General Public License is available as -/usr/share/common-licenses/GPL-3 in the Debian GNU/Linux distribution or on the -World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can also -obtain it by writing to the Free Software Foundation, Inc., 51 Franklin St, -Fifth Floor, Boston, MA 02110-1301, USA. - diff --git a/tests/cluecode/data/copyright_fossology/testdata68.yml b/tests/cluecode/data/copyright_fossology/testdata68.yml new file mode 100644 index 00000000000..0246b4b4126 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata68.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1998 - 2008 Double Precision, Inc. +holders: + - Double Precision, Inc. +authors: + - Dennis Schoen diff --git a/tests/cluecode/data/copyright_fossology/testdata68_raw b/tests/cluecode/data/copyright_fossology/testdata68_raw deleted file mode 100644 index 64667897f07..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata68_raw +++ /dev/null @@ -1,27 +0,0 @@ -This package was debianized by Dennis Schoen on -Sat, 7 Oct 2000 14:04:43 +0200. - -It was downloaded from: -ftp://courier.sourceforge.net/pub/courier/courier/ - -Upstream Author: - -Sam Varshavchik -Double Precision, Inc. -PO Box 668 -Greenwood Lake, NY 10925 - -Copyright: - -Copyright 1998 - 2008 Double Precision, Inc. - -This software is released under the GPL, version 3. -Additionally, compiling, linking, and/or using the OpenSSL toolkit in -conjunction with this software is allowed. - -A copy of the GNU General Public License is available as -/usr/share/common-licenses/GPL-3 in the Debian GNU/Linux distribution or on the -World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can also -obtain it by writing to the Free Software Foundation, Inc., 51 Franklin St, -Fifth Floor, Boston, MA 02110-1301, USA. - diff --git a/tests/cluecode/data/copyright_fossology/testdata69.yml b/tests/cluecode/data/copyright_fossology/testdata69.yml new file mode 100644 index 00000000000..5d2b9501da3 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata69.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1990, 1991, 1992, 2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, + Inc. +holders: + - Free Software Foundation, Inc. +authors: + - Clint Adams diff --git a/tests/cluecode/data/copyright_fossology/testdata69_raw b/tests/cluecode/data/copyright_fossology/testdata69_raw deleted file mode 100644 index f7843fca9a2..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata69_raw +++ /dev/null @@ -1,16 +0,0 @@ -This is the Debian GNU/Linux prepackaged version of GNU cpio -(including mt). - -This package was put together by Clint Adams , -from sources obtained from ftp://ftp.gnu.org:/gnu/cpio - -GNU cpio is Copyright (c) 1990, 1991, 1992, 2001, 2003, 2004, 2005, -2006, 2007 Free Software Foundation, Inc. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -The text of the GPL can be found on Debian systems in -/usr/share/common-licenses/GPL . diff --git a/tests/cluecode/data/copyright_fossology/testdata6_raw b/tests/cluecode/data/copyright_fossology/testdata6_raw deleted file mode 100644 index 9590250ad69..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata6_raw +++ /dev/null @@ -1,137 +0,0 @@ -// KDat - a tar-based DAT archiver -// Copyright (c) 1998-2000 Sean Vyain, svyain@mail.tds.net -// Copyright (c) 2001-2002 Lawrence Widman, kdat@cardiothink.com -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -#include -#include -#include - -#include "ImageCache.h" - -ImageCache::ImageCache() -{ - KIconLoader *l = KGlobal::iconLoader(); - /* 2002-01-24 FP */ - // _archive = new QPixmap(l->iconPath("package", KIconLoader::Toolbar)); - _archive = new QPixmap(l->iconPath("tar", KIconLoader::Small)); - /* 2002-01-24 FP */ - _backup = new QPixmap(l->iconPath("kdat_backup", KIconLoader::Toolbar)); - _file = new QPixmap(l->iconPath("mime_empty", KIconLoader::Small)); - _folderClosed = new QPixmap(l->iconPath("folder_blue", KIconLoader::Small)); - _folderOpen = new QPixmap(l->iconPath("folder_blue_open", KIconLoader::Small)); - _restore = new QPixmap(l->iconPath("kdat_restore", KIconLoader::Toolbar)); - _selectAll = new QPixmap(l->iconPath("kdat_select_all", KIconLoader::Toolbar)); - _selectNone = new QPixmap(l->iconPath("kdat_select_none", KIconLoader::Toolbar)); - _selectSome = new QPixmap(l->iconPath("kdat_select_some", KIconLoader::Toolbar)); - // 2002-01-28 FP - // _tape = new QPixmap(l->iconPath("kdat_archive", KIconLoader::Toolbar)); - _tape = new QPixmap(l->iconPath("kdat", KIconLoader::Small)); - // 2002-01-28 FP - _tapeMounted = new QPixmap(l->iconPath("kdat_mounted", KIconLoader::Toolbar)); - _tapeUnmounted = new QPixmap(l->iconPath("kdat_unmounted", KIconLoader::Toolbar)); - _verify = new QPixmap(l->iconPath("kdat_verify", KIconLoader::Toolbar)); -} - -ImageCache::~ImageCache() -{ - delete _archive; - delete _backup; - delete _file; - delete _folderClosed; - delete _folderOpen; - delete _restore; - delete _tape; - delete _tapeMounted; - delete _tapeUnmounted; - delete _verify; -} - -ImageCache* ImageCache::_instance = 0; - -ImageCache* ImageCache::instance() -{ - if ( _instance == 0 ) { - _instance = new ImageCache(); - } - - return _instance; -} - -const QPixmap* ImageCache::getArchive() -{ - return _archive; -} - -const QPixmap* ImageCache::getBackup() -{ - return _backup; -} - -const QPixmap* ImageCache::getFile() -{ - return _file; -} - -const QPixmap* ImageCache::getFolderClosed() -{ - return _folderClosed; -} - -const QPixmap* ImageCache::getFolderOpen() -{ - return _folderOpen; -} - -const QPixmap* ImageCache::getRestore() -{ - return _restore; -} - -const QPixmap* ImageCache::getSelectAll() -{ - return _selectAll; -} - -const QPixmap* ImageCache::getSelectNone() -{ - return _selectNone; -} - -const QPixmap* ImageCache::getSelectSome() -{ - return _selectSome; -} - -const QPixmap* ImageCache::getTape() -{ - return _tape; -} - -const QPixmap* ImageCache::getTapeMounted() -{ - return _tapeMounted; -} - -const QPixmap* ImageCache::getTapeUnmounted() -{ - return _tapeUnmounted; -} - -const QPixmap* ImageCache::getVerify() -{ - return _verify; -} diff --git a/tests/cluecode/data/copyright_fossology/testdata7.yml b/tests/cluecode/data/copyright_fossology/testdata7.yml new file mode 100644 index 00000000000..c5029692da0 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata7.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999-2000 Harri Porten (porten@kde.org) + - Copyright (c) 2003, 2006, 2007, 2008, 2009 Apple Inc. + - Copyright (c) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca) + - Copyright (c) 2007 Maks Orlovich +holders: + - Harri Porten + - Apple Inc. + - Cameron Zwarich + - Maks Orlovich diff --git a/tests/cluecode/data/copyright_fossology/testdata70.yml b/tests/cluecode/data/copyright_fossology/testdata70.yml new file mode 100644 index 00000000000..88437d2f4ee --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata70.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + - copyright Free Software Foundation + - Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com + - Copyright (c) 2000,2001,2002 Free Software Foundation, Inc. +holders: + - Free Software Foundation, Inc. + - Free Software Foundation + - Digital Mars, www.digitalmars.com + - Free Software Foundation, Inc. +authors: + - Walter Bright diff --git a/tests/cluecode/data/copyright_fossology/testdata70_raw b/tests/cluecode/data/copyright_fossology/testdata70_raw deleted file mode 100644 index 3b892ab581a..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata70_raw +++ /dev/null @@ -1,668 +0,0 @@ -This is the Debian GNU/Linux prepackaged version of the GNU compiler -collection, containing Ada, C, C++, Fortran 95, Java, Objective-C, -Objective-C++, and Treelang compilers, documentation, and support -libraries. In addition, Debian provides the GNU Pascal compiler in the -same source package. Packaging is done by the Debian GCC Maintainers -, with sources obtained from: - - ftp://gcc.gnu.org/pub/gcc/releases/ (for full releases) - svn://gcc.gnu.org/svn/gcc/ (for prereleases) - http://gnu-pascal.de/alpha/ (for GNU Pascal) - http://dgcc.sourceforge.net/ (for D) - -Changes: See changelog.Debian.gz - -Debian splits the GNU Compiler Collection into packages for each language, -library, and documentation as follows: - -Language Compiler package Library package Documentation ---------------------------------------------------------------------------- -Ada gnat-4.1 libgnat-4.1 gnat-4.1-doc -C gcc-4.1 gcc-4.1-doc -C++ g++-4.1 libstdc++6 libstdc++6-4.1-doc -Fortran 95 gfortran-4.1 libgfortran1 gfortran-4.1-doc -Java gcj-4.1 libgcj7 libgcj-doc -Objective C gobjc-4.1 libobjc1 -Objective C++ gobjc++-4.1 -Pascal gpc-4.1 -D gdc-4.1 -Treelang treelang-4.1 - -For some language run-time libraries, Debian provides source files, -development files, debugging symbols and libraries containing position- -independent code in separate packages: - -Language Sources Development Debugging Position-Independent ---------------------------------------------------------------------------- -C++ libstdc++6-4.1-dbg libstdc++6-4.1-pic -Java libgcj7-src libgcj7-dev libgcj7-dbg - -Additional packages include: - -All languages: -libgcc1, libgcc2, libgcc4 GCC intrinsics (platform-dependent) -libffi4-dev, libffi4 Foreign Function Interface library -gcc-4.1-base Base files common to all compilers -gcc-4.1-soft-float Software floating point (ARM only) -gcc-4.1-source The sources with patches - -Ada: -libgnatvsn-dev, libgnatvsn4.1 GNAT version library -libgnatprj-dev, libgnatprj4.1 GNAT Project Manager library - -C: -cpp-4.1, cpp-4.1-doc GNU C Preprocessor -libmudflap0-dev, libmudflap0 Library for instrumenting pointers -libssp0-dev, libssp0 GCC stack smashing protection library -fixincludes Fix non-ANSI header files -protoize Create/remove ANSI prototypes from C code - -Java: -fastjar Jar creation utility -gij The Java bytecode interpreter and VM -libgcj-common Common files for the Java run-time -libgcj7-awt The Abstract Windowing Toolkit -libgcj7-jar Java ARchive for the Java run-time - -Biarch support: On some 64-bit platforms which can also run 32-bit code, -Debian provides additional packages containing 32-bit versions of some -libraries. These packages have names beginning with 'lib32' instead of -'lib', for example lib32stdc++6. Similarly, on some 32-bit platforms which -can also run 64-bit code, Debian provides additional packages with names -beginning with 'lib64' instead of 'lib'. These packages contain 64-bit -versions of the libraries. (At this time, not all platforms and not all -libraries support biarch.) The license terms for these lib32 or lib64 -packages are identical to the ones for the lib packages. - - -COPYRIGHT STATEMENTS AND LICENSING TERMS - - -GCC is Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -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, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License is in `/usr/share/common-licenses/GPL'. - -The libstdc++-v3 library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, you may use this file as part of a free software - library without restriction. Specifically, if other files instantiate - templates or use macros or inline functions from this file, or you compile - this file and link it with other files to produce an executable, this - file does not by itself cause the resulting executable to be covered by - the GNU General Public License. This exception does not however - invalidate any other reasons why the executable file might be covered by - the GNU General Public License. - -The libgnat-4.1 Ada support library and libgnatvsn are licensed under the -terms of the GNU General Public License, with this special exception: - - As a special exception, if other files instantiate generics from this - unit, or you link this unit with other files to produce an executable, - this unit does not by itself cause the resulting executable to be - covered by the GNU General Public License. This exception does not - however invalidate any other reasons why the executable file might be - covered by the GNU Public License. - -In contrast, libgnatprj is licensed under the terms of the pure GNU -General Public License. - -gpc is copyright Free Software Foundation, and is licensed under the -GNU General Public License which on Debian GNU/Linux systems can be -found as `/usr/share/common-licenses/GPL3'. - -The gpc runtime library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, if you link this file with files compiled - with a GNU compiler to produce an executable, this does not cause - the resulting executable to be covered by the GNU General Public - License. This exception does not however invalidate any other - reasons why the executable file might be covered by the GNU - General Public License. } - -The libgcj library is licensed under the terms of the GNU General -Public License, with a special exception: - - Linking this library statically or dynamically with other modules - is making a combined work based on this library. Thus, the terms - and conditions of the GNU General Public License cover the whole - combination. - - As a special exception, the copyright holders of this library give - you permission to link this library with independent modules to - produce an executable, regardless of the license terms of these - independent modules, and to copy and distribute the resulting - executable under terms of your choice, provided that you also - meet, for each linked independent module, the terms and conditions - of the license of that module. An independent module is a module - which is not derived from or based on this library. If you modify - this library, you may extend this exception to your version of the - library, but you are not obligated to do so. If you do not wish - to do so, delete this exception statement from your version. - -gcc/libgcc2.c (source for libgcc) has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -gcc/unwind-libunwind.c (source for libgcc) has the following addition: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The mudflap library is licensed under the terms of the GNU General -Public License, and has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -The ssp library is licensed under the terms of the GNU General -Public License, with a special exception: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The D frontend is licensend under the terms of the GNU General -Public License, either version 2 of the License, or (at your option) -any later version, which on Debian GNU/Linux systems can be found as -`/usr/share/common-licenses/GPL'. - -The D runtime library (phobos) is licensed under the following terms: - -/* - * Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com - * Written by Walter Bright - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, in both source and binary form, subject to the following - * restrictions: - * - * o The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * o Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * o This notice may not be removed or altered from any source - * distribution. - */ - -By plainly marking modifications, something along the lines of adding to each -file that has been changed a "Modified by Foo Bar" line -underneath the "Written by" line would be adequate. - - -The documentation is licensed under the GNU Free Documentation License -(v1.2), appended at the end of this file. - - -GNU Free Documentation License -****************************** - - Version 1.2, November 2002 - Copyright (c) 2000,2001,2002 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - 0. PREAMBLE - - The purpose of this License is to make a manual, textbook, or other - functional and useful document "free" in the sense of freedom: to - assure everyone the effective freedom to copy and redistribute it, - with or without modifying it, either commercially or - noncommercially. Secondarily, this License preserves for the - author and publisher a way to get credit for their work, while not - being considered responsible for modifications made by others. - - This License is a kind of "copyleft", which means that derivative - works of the document must themselves be free in the same sense. - It complements the GNU General Public License, which is a copyleft - license designed for free software. - - We have designed this License in order to use it for manuals for - free software, because free software needs free documentation: a - free program should come with manuals providing the same freedoms - that the software does. But this License is not limited to - software manuals; it can be used for any textual work, regardless - of subject matter or whether it is published as a printed book. - We recommend this License principally for works whose purpose is - instruction or reference. - - 1. APPLICABILITY AND DEFINITIONS - - This License applies to any manual or other work, in any medium, - that contains a notice placed by the copyright holder saying it - can be distributed under the terms of this License. Such a notice - grants a world-wide, royalty-free license, unlimited in duration, - to use that work under the conditions stated herein. The - "Document", below, refers to any such manual or work. Any member - of the public is a licensee, and is addressed as "you". You - accept the license if you copy, modify or distribute the work in a - way requiring permission under copyright law. - - A "Modified Version" of the Document means any work containing the - Document or a portion of it, either copied verbatim, or with - modifications and/or translated into another language. - - A "Secondary Section" is a named appendix or a front-matter section - of the Document that deals exclusively with the relationship of the - publishers or authors of the Document to the Document's overall - subject (or to related matters) and contains nothing that could - fall directly within that overall subject. (Thus, if the Document - is in part a textbook of mathematics, a Secondary Section may not - explain any mathematics.) The relationship could be a matter of - historical connection with the subject or with related matters, or - of legal, commercial, philosophical, ethical or political position - regarding them. - - The "Invariant Sections" are certain Secondary Sections whose - titles are designated, as being those of Invariant Sections, in - the notice that says that the Document is released under this - License. If a section does not fit the above definition of - Secondary then it is not allowed to be designated as Invariant. - The Document may contain zero Invariant Sections. If the Document - does not identify any Invariant Sections then there are none. - - The "Cover Texts" are certain short passages of text that are - listed, as Front-Cover Texts or Back-Cover Texts, in the notice - that says that the Document is released under this License. A - Front-Cover Text may be at most 5 words, and a Back-Cover Text may - be at most 25 words. - - A "Transparent" copy of the Document means a machine-readable copy, - represented in a format whose specification is available to the - general public, that is suitable for revising the document - straightforwardly with generic text editors or (for images - composed of pixels) generic paint programs or (for drawings) some - widely available drawing editor, and that is suitable for input to - text formatters or for automatic translation to a variety of - formats suitable for input to text formatters. A copy made in an - otherwise Transparent file format whose markup, or absence of - markup, has been arranged to thwart or discourage subsequent - modification by readers is not Transparent. An image format is - not Transparent if used for any substantial amount of text. A - copy that is not "Transparent" is called "Opaque". - - Examples of suitable formats for Transparent copies include plain - ASCII without markup, Texinfo input format, LaTeX input format, - SGML or XML using a publicly available DTD, and - standard-conforming simple HTML, PostScript or PDF designed for - human modification. Examples of transparent image formats include - PNG, XCF and JPG. Opaque formats include proprietary formats that - can be read and edited only by proprietary word processors, SGML or - XML for which the DTD and/or processing tools are not generally - available, and the machine-generated HTML, PostScript or PDF - produced by some word processors for output purposes only. - - The "Title Page" means, for a printed book, the title page itself, - plus such following pages as are needed to hold, legibly, the - material this License requires to appear in the title page. For - works in formats which do not have any title page as such, "Title - Page" means the text near the most prominent appearance of the - work's title, preceding the beginning of the body of the text. - - A section "Entitled XYZ" means a named subunit of the Document - whose title either is precisely XYZ or contains XYZ in parentheses - following text that translates XYZ in another language. (Here XYZ - stands for a specific section name mentioned below, such as - "Acknowledgements", "Dedications", "Endorsements", or "History".) - To "Preserve the Title" of such a section when you modify the - Document means that it remains a section "Entitled XYZ" according - to this definition. - - The Document may include Warranty Disclaimers next to the notice - which states that this License applies to the Document. These - Warranty Disclaimers are considered to be included by reference in - this License, but only as regards disclaiming warranties: any other - implication that these Warranty Disclaimers may have is void and - has no effect on the meaning of this License. - - 2. VERBATIM COPYING - - You may copy and distribute the Document in any medium, either - commercially or noncommercially, provided that this License, the - copyright notices, and the license notice saying this License - applies to the Document are reproduced in all copies, and that you - add no other conditions whatsoever to those of this License. You - may not use technical measures to obstruct or control the reading - or further copying of the copies you make or distribute. However, - you may accept compensation in exchange for copies. If you - distribute a large enough number of copies you must also follow - the conditions in section 3. - - You may also lend copies, under the same conditions stated above, - and you may publicly display copies. - - 3. COPYING IN QUANTITY - - If you publish printed copies (or copies in media that commonly - have printed covers) of the Document, numbering more than 100, and - the Document's license notice requires Cover Texts, you must - enclose the copies in covers that carry, clearly and legibly, all - these Cover Texts: Front-Cover Texts on the front cover, and - Back-Cover Texts on the back cover. Both covers must also clearly - and legibly identify you as the publisher of these copies. The - front cover must present the full title with all words of the - title equally prominent and visible. You may add other material - on the covers in addition. Copying with changes limited to the - covers, as long as they preserve the title of the Document and - satisfy these conditions, can be treated as verbatim copying in - other respects. - - If the required texts for either cover are too voluminous to fit - legibly, you should put the first ones listed (as many as fit - reasonably) on the actual cover, and continue the rest onto - adjacent pages. - - If you publish or distribute Opaque copies of the Document - numbering more than 100, you must either include a - machine-readable Transparent copy along with each Opaque copy, or - state in or with each Opaque copy a computer-network location from - which the general network-using public has access to download - using public-standard network protocols a complete Transparent - copy of the Document, free of added material. If you use the - latter option, you must take reasonably prudent steps, when you - begin distribution of Opaque copies in quantity, to ensure that - this Transparent copy will remain thus accessible at the stated - location until at least one year after the last time you - distribute an Opaque copy (directly or through your agents or - retailers) of that edition to the public. - - It is requested, but not required, that you contact the authors of - the Document well before redistributing any large number of - copies, to give them a chance to provide you with an updated - version of the Document. - - 4. MODIFICATIONS - - You may copy and distribute a Modified Version of the Document - under the conditions of sections 2 and 3 above, provided that you - release the Modified Version under precisely this License, with - the Modified Version filling the role of the Document, thus - licensing distribution and modification of the Modified Version to - whoever possesses a copy of it. In addition, you must do these - things in the Modified Version: - - A. Use in the Title Page (and on the covers, if any) a title - distinct from that of the Document, and from those of - previous versions (which should, if there were any, be listed - in the History section of the Document). You may use the - same title as a previous version if the original publisher of - that version gives permission. - - B. List on the Title Page, as authors, one or more persons or - entities responsible for authorship of the modifications in - the Modified Version, together with at least five of the - principal authors of the Document (all of its principal - authors, if it has fewer than five), unless they release you - from this requirement. - - C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. - - D. Preserve all the copyright notices of the Document. - - E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. - - F. Include, immediately after the copyright notices, a license - notice giving the public permission to use the Modified - Version under the terms of this License, in the form shown in - the Addendum below. - - G. Preserve in that license notice the full lists of Invariant - Sections and required Cover Texts given in the Document's - license notice. - - H. Include an unaltered copy of this License. - - I. Preserve the section Entitled "History", Preserve its Title, - and add to it an item stating at least the title, year, new - authors, and publisher of the Modified Version as given on - the Title Page. If there is no section Entitled "History" in - the Document, create one stating the title, year, authors, - and publisher of the Document as given on its Title Page, - then add an item describing the Modified Version as stated in - the previous sentence. - - J. Preserve the network location, if any, given in the Document - for public access to a Transparent copy of the Document, and - likewise the network locations given in the Document for - previous versions it was based on. These may be placed in - the "History" section. You may omit a network location for a - work that was published at least four years before the - Document itself, or if the original publisher of the version - it refers to gives permission. - - K. For any section Entitled "Acknowledgements" or "Dedications", - Preserve the Title of the section, and preserve in the - section all the substance and tone of each of the contributor - acknowledgements and/or dedications given therein. - - L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section - titles. - - M. Delete any section Entitled "Endorsements". Such a section - may not be included in the Modified Version. - - N. Do not retitle any existing section to be Entitled - "Endorsements" or to conflict in title with any Invariant - Section. - - O. Preserve any Warranty Disclaimers. - - If the Modified Version includes new front-matter sections or - appendices that qualify as Secondary Sections and contain no - material copied from the Document, you may at your option - designate some or all of these sections as invariant. To do this, - add their titles to the list of Invariant Sections in the Modified - Version's license notice. These titles must be distinct from any - other section titles. - - You may add a section Entitled "Endorsements", provided it contains - nothing but endorsements of your Modified Version by various - parties--for example, statements of peer review or that the text - has been approved by an organization as the authoritative - definition of a standard. - - You may add a passage of up to five words as a Front-Cover Text, - and a passage of up to 25 words as a Back-Cover Text, to the end - of the list of Cover Texts in the Modified Version. Only one - passage of Front-Cover Text and one of Back-Cover Text may be - added by (or through arrangements made by) any one entity. If the - Document already includes a cover text for the same cover, - previously added by you or by arrangement made by the same entity - you are acting on behalf of, you may not add another; but you may - replace the old one, on explicit permission from the previous - publisher that added the old one. - - The author(s) and publisher(s) of the Document do not by this - License give permission to use their names for publicity for or to - assert or imply endorsement of any Modified Version. - - 5. COMBINING DOCUMENTS - - You may combine the Document with other documents released under - this License, under the terms defined in section 4 above for - modified versions, provided that you include in the combination - all of the Invariant Sections of all of the original documents, - unmodified, and list them all as Invariant Sections of your - combined work in its license notice, and that you preserve all - their Warranty Disclaimers. - - The combined work need only contain one copy of this License, and - multiple identical Invariant Sections may be replaced with a single - copy. If there are multiple Invariant Sections with the same name - but different contents, make the title of each such section unique - by adding at the end of it, in parentheses, the name of the - original author or publisher of that section if known, or else a - unique number. Make the same adjustment to the section titles in - the list of Invariant Sections in the license notice of the - combined work. - - In the combination, you must combine any sections Entitled - "History" in the various original documents, forming one section - Entitled "History"; likewise combine any sections Entitled - "Acknowledgements", and any sections Entitled "Dedications". You - must delete all sections Entitled "Endorsements." - - 6. COLLECTIONS OF DOCUMENTS - - You may make a collection consisting of the Document and other - documents released under this License, and replace the individual - copies of this License in the various documents with a single copy - that is included in the collection, provided that you follow the - rules of this License for verbatim copying of each of the - documents in all other respects. - - You may extract a single document from such a collection, and - distribute it individually under this License, provided you insert - a copy of this License into the extracted document, and follow - this License in all other respects regarding verbatim copying of - that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - - A compilation of the Document or its derivatives with other - separate and independent documents or works, in or on a volume of - a storage or distribution medium, is called an "aggregate" if the - copyright resulting from the compilation is not used to limit the - legal rights of the compilation's users beyond what the individual - works permit. When the Document is included an aggregate, this - License does not apply to the other works in the aggregate which - are not themselves derivative works of the Document. - - If the Cover Text requirement of section 3 is applicable to these - copies of the Document, then if the Document is less than one half - of the entire aggregate, the Document's Cover Texts may be placed - on covers that bracket the Document within the aggregate, or the - electronic equivalent of covers if the Document is in electronic - form. Otherwise they must appear on printed covers that bracket - the whole aggregate. - - 8. TRANSLATION - - Translation is considered a kind of modification, so you may - distribute translations of the Document under the terms of section - 4. Replacing Invariant Sections with translations requires special - permission from their copyright holders, but you may include - translations of some or all Invariant Sections in addition to the - original versions of these Invariant Sections. You may include a - translation of this License, and all the license notices in the - Document, and any Warrany Disclaimers, provided that you also - include the original English version of this License and the - original versions of those notices and disclaimers. In case of a - disagreement between the translation and the original version of - this License or a notice or disclaimer, the original version will - prevail. - - If a section in the Document is Entitled "Acknowledgements", - "Dedications", or "History", the requirement (section 4) to - Preserve its Title (section 1) will typically require changing the - actual title. - - 9. TERMINATION - - You may not copy, modify, sublicense, or distribute the Document - except as expressly provided for under this License. Any other - attempt to copy, modify, sublicense or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - - The Free Software Foundation may publish new, revised versions of - the GNU Free Documentation License from time to time. Such new - versions will be similar in spirit to the present version, but may - differ in detail to address new problems or concerns. See - `http://www.gnu.org/copyleft/'. - - Each version of the License is given a distinguishing version - number. If the Document specifies that a particular numbered - version of this License "or any later version" applies to it, you - have the option of following the terms and conditions either of - that specified version or of any later version that has been - published (not as a draft) by the Free Software Foundation. If - the Document does not specify a version number of this License, - you may choose any version ever published (not as a draft) by the - Free Software Foundation. - -ADDENDUM: How to use this License for your documents -==================================================== - - To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and license -notices just after the title page: - - Copyright (c) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 - or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled ``GNU - Free Documentation License''. - - If you have Invariant Sections, Front-Cover Texts and Back-Cover -Texts, replace the "with...Texts." line with this: - - with the Invariant Sections being LIST THEIR TITLES, with - the Front-Cover Texts being LIST, and with the Back-Cover Texts - being LIST. - - If you have Invariant Sections without Cover Texts, or some other -combination of the three, merge those two alternatives to suit the -situation. - - If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, to -permit their use in free software. diff --git a/tests/cluecode/data/copyright_fossology/testdata71.yml b/tests/cluecode/data/copyright_fossology/testdata71.yml new file mode 100644 index 00000000000..b31b1187d41 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata71.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + - copyright Free Software Foundation + - Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com + - Copyright (c) 1996-2003 Red Hat, Inc. +holders: + - Free Software Foundation, Inc. + - Free Software Foundation + - Digital Mars, www.digitalmars.com + - Red Hat, Inc. +authors: + - Walter Bright diff --git a/tests/cluecode/data/copyright_fossology/testdata71_raw b/tests/cluecode/data/copyright_fossology/testdata71_raw deleted file mode 100644 index 8ff87a826bd..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata71_raw +++ /dev/null @@ -1,273 +0,0 @@ -This is the Debian GNU/Linux prepackaged version of the GNU compiler -collection, containing Ada, C, C++, Fortran 95, Java, Objective-C, -Objective-C++, and Treelang compilers, documentation, and support -libraries. In addition, Debian provides the GNU Pascal compiler in the -same source package. Packaging is done by the Debian GCC Maintainers -, with sources obtained from: - - ftp://gcc.gnu.org/pub/gcc/releases/ (for full releases) - svn://gcc.gnu.org/svn/gcc/ (for prereleases) - http://gnu-pascal.de/alpha/ (for GNU Pascal) - http://dgcc.sourceforge.net/ (for D) - -The current gcc-4.3 source package is taken from the SVN trunk. - -Changes: See changelog.Debian.gz - -Debian splits the GNU Compiler Collection into packages for each language, -library, and documentation as follows: - -Language Compiler package Library package Documentation ---------------------------------------------------------------------------- -Ada gnat-4.3 libgnat-4.3 gnat-4.3-doc -C gcc-4.3 gcc-4.3-doc -C++ g++-4.3 libstdc++6 libstdc++6-4.3-doc -D gdc-4.3 -Fortran 95 gfortran-4.3 libgfortran3 gfortran-4.3-doc -Java gcj-4.3 libgcj9 libgcj-doc -Objective C gobjc-4.3 libobjc2 -Objective C++ gobjc++-4.3 -Pascal gpc-4.3 -Treelang treelang-4.3 - -For some language run-time libraries, Debian provides source files, -development files, debugging symbols and libraries containing position- -independent code in separate packages: - -Language Sources Development Debugging Position-Independent ---------------------------------------------------------------------------- -C++ libstdc++6-4.3-dbg libstdc++6-4.3-pic -Java libgcj9-src libgcj9-dev libgcj9-dbg - -Additional packages include: - -All languages: -libgcc1, libgcc2, libgcc4 GCC intrinsics (platform-dependent) -gcc-4.3-base Base files common to all compilers -gcc-4.3-soft-float Software floating point (ARM only) -gcc-4.3-source The sources with patches - -Ada: -libgnatvsn-dev, libgnatvsn4.3 GNAT version library -libgnatprj-dev, libgnatprj4.3 GNAT Project Manager library - -C: -cpp-4.3, cpp-4.3-doc GNU C Preprocessor -libmudflap0-dev, libmudflap0 Library for instrumenting pointers -libssp0-dev, libssp0 GCC stack smashing protection library -fixincludes Fix non-ANSI header files -protoize Create/remove ANSI prototypes from C code - -Java: -gij The Java bytecode interpreter and VM -libgcj-common Common files for the Java run-time -libgcj8-awt The Abstract Windowing Toolkit -libgcj8-jar Java ARchive for the Java run-time - -C, C++ and Fortran 95: -libgomp1-dev, libgomp1 GCC OpenMP (GOMP) support library - -Biarch support: On some 64-bit platforms which can also run 32-bit code, -Debian provides additional packages containing 32-bit versions of some -libraries. These packages have names beginning with 'lib32' instead of -'lib', for example lib32stdc++6. Similarly, on some 32-bit platforms which -can also run 64-bit code, Debian provides additional packages with names -beginning with 'lib64' instead of 'lib'. These packages contain 64-bit -versions of the libraries. (At this time, not all platforms and not all -libraries support biarch.) The license terms for these lib32 or lib64 -packages are identical to the ones for the lib packages. - - -COPYRIGHT STATEMENTS AND LICENSING TERMS - - -GCC is Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, -1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -2008 Free Software Foundation, Inc. - -GCC 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, or (at your option) any later -version. - -GCC 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. - -Files that have exception clauses are licensed under the terms of the -GNU General Public License; either version 2, or (at your option) any -later version. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License is in `/usr/share/common-licenses/GPL', version 2 of this -license in `/usr/share/common-licenses/GPL-2'. - -The libstdc++-v3 library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, you may use this file as part of a free software - library without restriction. Specifically, if other files instantiate - templates or use macros or inline functions from this file, or you compile - this file and link it with other files to produce an executable, this - file does not by itself cause the resulting executable to be covered by - the GNU General Public License. This exception does not however - invalidate any other reasons why the executable file might be covered by - the GNU General Public License. - -The libgnat-4.3 Ada support library and libgnatvsn are licensed under the -terms of the GNU General Public License, with this special exception: - - As a special exception, if other files instantiate generics from this - unit, or you link this unit with other files to produce an executable, - this unit does not by itself cause the resulting executable to be - covered by the GNU General Public License. This exception does not - however invalidate any other reasons why the executable file might be - covered by the GNU Public License. - -In contrast, libgnatprj is licensed under the terms of the pure GNU -General Public License. - -gpc is copyright Free Software Foundation, and is licensed under the -GNU General Public License which on Debian GNU/Linux systems can be -found as `/usr/share/common-licenses/GPL'. - -The gpc runtime library is licensed under the terms of the GNU General -Public License, with this special exception: - - As a special exception, if you link this file with files compiled - with a GNU compiler to produce an executable, this does not cause - the resulting executable to be covered by the GNU General Public - License. This exception does not however invalidate any other - reasons why the executable file might be covered by the GNU - General Public License. } - -The libgcj library is licensed under the terms of the GNU General -Public License, with a special exception: - - Linking this library statically or dynamically with other modules - is making a combined work based on this library. Thus, the terms - and conditions of the GNU General Public License cover the whole - combination. - - As a special exception, the copyright holders of this library give - you permission to link this library with independent modules to - produce an executable, regardless of the license terms of these - independent modules, and to copy and distribute the resulting - executable under terms of your choice, provided that you also - meet, for each linked independent module, the terms and conditions - of the license of that module. An independent module is a module - which is not derived from or based on this library. If you modify - this library, you may extend this exception to your version of the - library, but you are not obligated to do so. If you do not wish - to do so, delete this exception statement from your version. - -gcc/libgcc2.c (source for libgcc) has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -gcc/unwind-libunwind.c (source for libgcc) has the following addition: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The mudflap library is licensed under the terms of the GNU General -Public License, and has the following addition: - - In addition to the permissions in the GNU General Public License, - the Free Software Foundation gives you unlimited permission to - link the compiled version of this file into combinations with - other programs, and to distribute those combinations without any - restriction coming from the use of this file. (The General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into a combine executable.) - -The ssp library is licensed under the terms of the GNU General -Public License, with a special exception: - - As a special exception, if you link this library with other files, - some of which are compiled with GCC, to produce an executable, - this library does not by itself cause the resulting executable to - be covered by the GNU General Public License. This exception does - not however invalidate any other reasons why the executable file - might be covered by the GNU General Public License. - -The D frontend is licensend under the terms of the GNU General -Public License, either version 2 of the License, or (at your option) -any later version, which on Debian GNU/Linux systems can be found as -`/usr/share/common-licenses/GPL'. - -The D runtime library (phobos) is licensed under the following terms: - -/* - * Copyright (c) 2004-2005 by Digital Mars, www.digitalmars.com - * Written by Walter Bright - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, in both source and binary form, subject to the following - * restrictions: - * - * o The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * o Altered source versions must be plainly marked as such, and must not - * be misrepresented as being the original software. - * o This notice may not be removed or altered from any source - * distribution. - */ - -The Libgomp library is licensed under the terms of the GNU Lesser -General Public License, with a special exception: - - As a special exception, if you link this library with other files, some - of which are compiled with GCC, to produce an executable, this library - does not by itself cause the resulting executable to be covered by the - GNU General Public License. This exception does not however invalidate - any other reasons why the executable file might be covered by the GNU - General Public License. - -The libffi library is licensed under the following terms: - - libffi - Copyright (c) 1996-2003 Red Hat, Inc. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - ``Software''), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - 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. - IN NO EVENT SHALL CYGNUS SOLUTIONS 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. - - -The documentation is licensed under the GNU Free Documentation License (v1.2). -On Debian GNU/Linux systems, the complete text of this license is in -`/usr/share/common-licenses/GFDL-1.2'. diff --git a/tests/cluecode/data/copyright_fossology/testdata72.yml b/tests/cluecode/data/copyright_fossology/testdata72.yml new file mode 100644 index 00000000000..ff9f369f0ef --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata72.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000, 2001, 2006 Debian + - Copyright (c) 1999 The NetBSD Foundation, Inc. +holders: + - Debian + - The NetBSD Foundation, Inc. +authors: + - the NetBSD Foundation, Inc. and its contributors diff --git a/tests/cluecode/data/copyright_fossology/testdata72_raw b/tests/cluecode/data/copyright_fossology/testdata72_raw deleted file mode 100644 index c64ed949ffc..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata72_raw +++ /dev/null @@ -1,48 +0,0 @@ -gcc-defaults is Copyright (c) 2000, 2001, 2006 Debian. - -These scripts are 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. - -The file classpath.security in the libgcj-common package is part of -GNU Classpath. GNU Classpath 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. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. - -The c89 and c99 man pages are taken from netbsd: - -Copyright (c) 1999 The NetBSD Foundation, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the NetBSD - Foundation, Inc. and its contributors. -4. Neither the name of The NetBSD Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/tests/cluecode/data/copyright_fossology/testdata73.yml b/tests/cluecode/data/copyright_fossology/testdata73.yml new file mode 100644 index 00000000000..bd4cdba5846 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata73.yml @@ -0,0 +1,21 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1988,1990,1993,1994 by Paul Vixie + - Copyright 1994 Ian Jackson + - Copyright (c) 1994 Ian Jackson + - Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Steve Greenland + - Copyright 2001 Sean M. Burke + - Copyright 2006 Javier Fernandez-Sanguino +holders: + - Paul Vixie + - Ian Jackson + - Ian Jackson + - Steve Greenland + - Sean M. Burke + - Javier Fernandez-Sanguino +authors: + - Sean M. Burke + - Javier Fernandez-Sanguino diff --git a/tests/cluecode/data/copyright_fossology/testdata73_raw b/tests/cluecode/data/copyright_fossology/testdata73_raw deleted file mode 100644 index 509b7622389..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata73_raw +++ /dev/null @@ -1,62 +0,0 @@ -Copyright 1988,1990,1993,1994 by Paul Vixie; -All rights reserved - -Distribute freely, except: don't remove my name from the source or -documentation (don't take credit for my work), mark your changes (don't -get me blamed for your possible bugs), don't alter or remove this -notice. May be sold if buildable source is provided to buyer. No -warranty of any kind, express or implied, is included with this -software; use at your own risk, responsibility for damages (if any) to -anyone resulting from the use of this software rests entirely with the -user. - - -The original source for this package may be obtained from -ftp://ftp.vix.com/pub/vixie/cron-3.0. - -Code and regex in database.c/valid_name() from Clint Adams, relicensed -to cron license above from e-mail: - - Date: Sat, 27 Sep 2003 12:20:49 -0400 - From: Clint Adams - To: Steve Greenland - - > So, I think I'm going to do the same wimp-out thing: add a switch, - > and lift the code from run-parts to implement it. Oh, crap, it's G P L, - > and vixie cron isn't. Clint, would you be willing to relicense - > your - > "valid_names()" function under the following: - > - > [ommitted, same as above] - - I could have sworn that I replied to this back in May. I'm willing to - relicense it under the cron license, though I still think a shared - library is the way to go. - - - - -Modifications for Debian GNU/Linux Copyright 1994 Ian Jackson; -Copyright (c) 1994 Ian Jackson -Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Steve Greenland - -This package includes in the examples directory the crontab2english script -written by Sean M. Burke. This script is Copyright 2001 Sean M. Burke -and is distributed with the following licensing terms: - -This library is free software; you can redistribute it and/or modify it under -the same terms as Perl itself. In Debian GNU/Linux you can find Perl's Artistic -license at /usr/share/common-licenses/Artistic - -This package includes in the examples directory the stats-cron script -written by Javier Fernandez-Sanguino. This script is Copyright 2006 -Javier Fernandez-Sanguino and is distributed with the following licensing -terms: - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. - -In Debian GNU/Linux you can find a copy of the above licenses at -/usr/share/common-licenses. diff --git a/tests/cluecode/data/copyright_fossology/testdata74.yml b/tests/cluecode/data/copyright_fossology/testdata74.yml new file mode 100644 index 00000000000..a20c5eaef71 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata74.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1996 - 2002, Daniel Stenberg, +holders: + - Daniel Stenberg +authors: + - Domenico Andreoli + - Daniel Stenberg diff --git a/tests/cluecode/data/copyright_fossology/testdata74_raw b/tests/cluecode/data/copyright_fossology/testdata74_raw deleted file mode 100644 index 01782a84d7f..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata74_raw +++ /dev/null @@ -1,30 +0,0 @@ -This package was debianized by Domenico Andreoli on -Fri, 17 Nov 2000 16:10:37 +0100 - -It was downloaded from http://curl.haxx.se - -Upstream Authors: Daniel Stenberg - -Copyright: - - COPYRIGHT AND PERMISSION NOTICE - - Copyright (c) 1996 - 2002, 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. diff --git a/tests/cluecode/data/copyright_fossology/testdata75.yml b/tests/cluecode/data/copyright_fossology/testdata75.yml new file mode 100644 index 00000000000..1adb6164c73 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata75.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1989-1994 The Regents of the University of California + - Copyright (c) 1997 Christos Zoulas + - Copyright (c) 1997-2005 Herbert Xu + - Copyright (c) 1992 Free Software Foundation, Inc. +holders: + - The Regents of the University of California + - Christos Zoulas + - Herbert Xu + - Free Software Foundation, Inc. +authors: + - Mark W. Eichin eichin@kitten.gen.ma.us + - Gerrit Pape diff --git a/tests/cluecode/data/copyright_fossology/testdata75_raw b/tests/cluecode/data/copyright_fossology/testdata75_raw deleted file mode 100644 index 24420014fb0..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata75_raw +++ /dev/null @@ -1,46 +0,0 @@ -This package was debianized by Mark W. Eichin eichin@kitten.gen.ma.us on -Mon, 24 Feb 1997 16:00:16 -0500. - -This package was re-ported from NetBSD and debianized by -Herbert Xu herbert@debian.org on Thu, 19 Jun 1997 19:29:16 +1000. - -This package was adopted by Gerrit Pape on -Fri, 28 May 2004 18:38:18 +0000. - -It was downloaded from http://gondor.apana.org.au/~herbert/dash/files/ - -Copyright: - -Copyright (c) 1989-1994 - The Regents of the University of California. All rights reserved. -Copyright (c) 1997 Christos Zoulas. All rights reserved. -Copyright (c) 1997-2005 - Herbert Xu All rights reserved. - -This code is derived from software contributed to Berkeley by Kenneth Almquist. - -Please refer to /usr/share/common-licenses/BSD for details. - -mksignames.c: - -This file is not directly linked with dash. However, its output is. - -Copyright (c) 1992 Free Software Foundation, Inc. - -This file is part of GNU Bash, the Bourne Again SHell. - -Bash 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. - -Bash 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 with -your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with the -Debian GNU/Linux hello source package as the file COPYING. If not, -write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, -Boston, MA 02111 USA. diff --git a/tests/cluecode/data/copyright_fossology/testdata76.yml b/tests/cluecode/data/copyright_fossology/testdata76.yml new file mode 100644 index 00000000000..e3db51d357c --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata76.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1990,2007 Oracle + - Copyright (c) 1990, 1993, 1994, 1995 The Regents of the University of California + - Copyright (c) 1995, 1996 The President and Fellows of Harvard University +holders: + - Oracle + - The Regents of the University of California + - The President and Fellows of Harvard University +authors: + - Clint Adams diff --git a/tests/cluecode/data/copyright_fossology/testdata76_raw b/tests/cluecode/data/copyright_fossology/testdata76_raw deleted file mode 100644 index db458f3655f..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata76_raw +++ /dev/null @@ -1,108 +0,0 @@ -This package was debianized by Clint Adams on -Wed, 25 Jul 2007 20:37:51 +0700 - -It was downloaded from -http://www.oracle.com/technology/software/products/berkeley-db/db/index.html - -Copyright: - -/*- - * $Id: LICENSE,v 12.7 2007/05/17 15:14:46 bostic Exp $ - */ - -The following is the license that applies to this copy of the Berkeley DB -software. For a license to use the Berkeley DB software under conditions -other than those described here, or to purchase support for this software, -please contact Oracle at berkeleydb-info_us@oracle.com. - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -/* - * Copyright (c) 1990,2007 Oracle. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Redistributions in any form must be accompanied by information on - * how to obtain complete source code for the DB software and any - * accompanying software that uses the DB software. The source code - * must either be included in the distribution or be available for no - * more than the cost of distribution plus a nominal fee, and must be - * freely redistributable under reasonable conditions. For an - * executable file, complete source code means the source code for all - * modules it contains. It does not include source code for modules or - * files that typically accompany the major components of the operating - * system on which the executable file runs. - * - * THIS SOFTWARE IS PROVIDED BY ORACLE ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR - * NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL ORACLE BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN - * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -/* - * Copyright (c) 1990, 1993, 1994, 1995 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -/* - * Copyright (c) 1995, 1996 - * The President and Fellows of Harvard University. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY HARVARD AND ITS CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL HARVARD OR ITS CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ diff --git a/tests/cluecode/data/copyright_fossology/testdata77.yml b/tests/cluecode/data/copyright_fossology/testdata77.yml new file mode 100644 index 00000000000..35587ee8368 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata77.yml @@ -0,0 +1,13 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyright (c) 2005 sean finney + - copyright (c) 2000-2004 Ola Lundqvist +holders: + - sean finney + - Ola Lundqvist +authors: + - sean finney + - sean finney diff --git a/tests/cluecode/data/copyright_fossology/testdata77_raw b/tests/cluecode/data/copyright_fossology/testdata77_raw deleted file mode 100644 index 7a629ebf0be..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata77_raw +++ /dev/null @@ -1,21 +0,0 @@ -This package was debianized by sean finney on -Mon, 11 Oct 2004 20:31:10 -0400. - -It was downloaded from somewhere in the ether - -Copyright: - -Upstream Author: sean finney - -License: - -copyright (c) 2005 sean finney - -all documentation is covered under the Academic Free License, v2.1 - -much of the internal mysql and pgsql code (contained in internal/mysql and -internal/pgsql, respectively) is originally derived from wwwconfig-common and -copyright (c) 2000-2004 Ola Lundqvist. - -all software (original and derived) is covered under the GPL: -(see /usr/share/common-licenses/GPL on your debian system) diff --git a/tests/cluecode/data/copyright_fossology/testdata78.yml b/tests/cluecode/data/copyright_fossology/testdata78.yml new file mode 100644 index 00000000000..9c8dc0cf1ca --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata78.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999-2006 Joey Hess + - Copyright by Randolph Chung +holders: + - Joey Hess + - Randolph Chung diff --git a/tests/cluecode/data/copyright_fossology/testdata78_raw b/tests/cluecode/data/copyright_fossology/testdata78_raw deleted file mode 100644 index cf0d3d392e8..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata78_raw +++ /dev/null @@ -1,37 +0,0 @@ -Debconf is Copyright (c) 1999-2006 Joey Hess - -Portions also Copyright by: - Randolph Chung (PassThrough frontend) - Eric Gillespie (GNOME frontend) - Peter Rockai (KDE frontend) - Matthew Palmer (LDAP dbdriver) - Moshe Zadka (Python binding) - Sylvain Ferriol (enhanced debconf-show) - Tomohiro KUBOTA (multibyte character - support) - Petter Reinholdtsen (set-selections and - get-selections) - Sylvain Ferriol (test suite) - Colin Watson (progress bar support, - apt-progress) - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHORS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. diff --git a/tests/cluecode/data/copyright_fossology/testdata79.yml b/tests/cluecode/data/copyright_fossology/testdata79.yml new file mode 100644 index 00000000000..c68423d94d4 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata79.yml @@ -0,0 +1,28 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999-2006 Joey Hess + - Copyright by Randolph Chung + - Copyright Eric Gillespie + - Copyright Peter Rockai + - Copyright Matthew Palmer + - Copyright Moshe Zadka + - Copyright Sylvain Ferriol + - Copyright Tomohiro KUBOTA + - Copyright Petter Reinholdtsen + - Copyright Sylvain Ferriol + - Copyright Colin Watson +holders: + - Joey Hess + - Randolph Chung + - Eric Gillespie + - Peter Rockai + - Matthew Palmer + - Moshe Zadka + - Sylvain Ferriol + - Tomohiro KUBOTA + - Petter Reinholdtsen + - Sylvain Ferriol + - Colin Watson diff --git a/tests/cluecode/data/copyright_fossology/testdata79_raw b/tests/cluecode/data/copyright_fossology/testdata79_raw deleted file mode 100644 index 0ffdaed3d6e..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata79_raw +++ /dev/null @@ -1,46 +0,0 @@ -Debconf is Copyright (c) 1999-2006 Joey Hess . - -Portions also Copyright by - Randolph Chung (PassThrough frontend) -Copyright - Eric Gillespie (GNOME frontend) -Copyright - Peter Rockai (KDE frontend) -Copyright - Matthew Palmer (LDAP dbdriver) -Copyright - Moshe Zadka (Python binding) -Copyright - Sylvain Ferriol (enhanced debconf-show) -Copyright - Tomohiro KUBOTA (multibyte character - support) -Copyright - Petter Reinholdtsen (set-selections and - get-selections) -Copyright - Sylvain Ferriol (test suite) -Copyright - Colin Watson (progress bar support, - apt-progress) - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY AUTHORS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. diff --git a/tests/cluecode/data/copyright_fossology/testdata7_raw b/tests/cluecode/data/copyright_fossology/testdata7_raw deleted file mode 100644 index 7d259728557..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata7_raw +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 1999-2000 Harri Porten (porten@kde.org) - * Copyright (c) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. - * Copyright (c) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca) - * Copyright (c) 2007 Maks Orlovich - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 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 - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#ifndef JSGlobalObjectFunctions_h -#define JSGlobalObjectFunctions_h - -#include "JSImmediate.h" // temporary until JSValue* becomes a class we can forward-declare - -namespace JSC { - - class ArgList; - class ExecState; - class JSObject; - - // FIXME: These functions should really be in JSGlobalObject.cpp, but putting them there - // is a 0.5% reduction. - - JSValuePtr globalFuncEval(ExecState*, JSObject*, JSValuePtr, const ArgList&); - JSValuePtr globalFuncParseInt(ExecState*, JSObject*, JSValuePtr, const ArgList&); - JSValuePtr globalFuncParseFloat(ExecState*, JSObject*, JSValuePtr, const ArgList&); - JSValuePtr globalFuncIsNaN(ExecState*, JSObject*, JSValuePtr, const ArgList&); - JSValuePtr globalFuncIsFinite(ExecState*, JSObject*, JSValuePtr, const ArgList&); - JSValuePtr globalFuncDecodeURI(ExecState*, JSObject*, JSValuePtr, const ArgList&); - JSValuePtr globalFuncDecodeURIComponent(ExecState*, JSObject*, JSValuePtr, const ArgList&); - JSValuePtr globalFuncEncodeURI(ExecState*, JSObject*, JSValuePtr, const ArgList&); - JSValuePtr globalFuncEncodeURIComponent(ExecState*, JSObject*, JSValuePtr, const ArgList&); - JSValuePtr globalFuncEscape(ExecState*, JSObject*, JSValuePtr, const ArgList&); - JSValuePtr globalFuncUnescape(ExecState*, JSObject*, JSValuePtr, const ArgList&); -#ifndef NDEBUG - JSValuePtr globalFuncJSCPrint(ExecState*, JSObject*, JSValuePtr, const ArgList&); -#endif - - static const double mantissaOverflowLowerBound = 9007199254740992.0; - double parseIntOverflow(const char*, int length, int radix); - -} // namespace JSC - -#endif // JSGlobalObjectFunctions_h diff --git a/tests/cluecode/data/copyright_fossology/testdata8.yml b/tests/cluecode/data/copyright_fossology/testdata8.yml new file mode 100644 index 00000000000..cacc92b1ec2 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata8.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006 Tim Beaulen + - Copyright (c) 2006-2007 Matthias Kretz +holders: + - Tim Beaulen + - Matthias Kretz diff --git a/tests/cluecode/data/copyright_fossology/testdata80.yml b/tests/cluecode/data/copyright_fossology/testdata80.yml new file mode 100644 index 00000000000..5a11e01983e --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata80.yml @@ -0,0 +1,28 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1997-2008 Joey Hess + - Copyright 1997-2008 Joey Hess + - Copyright Brendan O'Dea + - Copyright Josselin Mouette + - Copyright Adam Di Carlo + - Copyright Ross Burton + - Copyright Andrew Stribblehill + - Copyright Jon Middleton + - Copyright Marco d'Itri + - Copyright Steve Robbins + - Copyright Charles Briscoe-Smith +holders: + - Joey Hess + - Joey Hess + - Brendan O'Dea + - Josselin Mouette + - Adam Di Carlo + - Ross Burton + - Andrew Stribblehill + - Jon Middleton + - Marco d'Itri + - Steve Robbins + - Charles Briscoe-Smith diff --git a/tests/cluecode/data/copyright_fossology/testdata80_raw b/tests/cluecode/data/copyright_fossology/testdata80_raw deleted file mode 100644 index 9cf9c8a22e9..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata80_raw +++ /dev/null @@ -1,52 +0,0 @@ -Files: * -Copyright 1997-2008 Joey Hess -License: GPL-2+ - The full text of the GPL is distributed as in - /usr/share/common-licenses/GPL-2 on Debian systems. - -Files: examples/*, autoscripts/* -Copyright 1997-2008 Joey Hess -Licence: other - These files are in are in the public domain. - . - Pedants who belive I cannot legally say that code I have written is in - the public domain may consider them instead to be licensed as follows: - . - Redistribution and use in source and binary forms, with or without - modification, are permitted under any circumstances. No warranty. - -Files: dh_perl -Copyright Brendan O'Dea -License: GPL-2+ - -Files: dh_python -Copyright Josselin Mouette -License: GPL-2+ - -Files: dh_installcatalogs -Copyright Adam Di Carlo -License: GPL-2+ - -Files: dh_scrollkeeper -Copyright Ross Burton -License: GPL-2+ - -Files: dh_usrlocal -Copyright Andrew Stribblehill -License: GPL-2+ - -Files: dh_installlogcheck -Copyright Jon Middleton -License: GPL-2+ - -Files: dh_installudev -Copyright Marco d'Itri -License: GPL-2+ - -Files: dh_lintian -Copyright Steve Robbins -License: GPL-2+ - -Files: dh_md5sums -Copyright Charles Briscoe-Smith -License: GPL-2+ diff --git a/tests/cluecode/data/copyright_fossology/testdata81.yml b/tests/cluecode/data/copyright_fossology/testdata81.yml new file mode 100644 index 00000000000..43e7d7d4206 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata81.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006 Michael Vogt +holders: + - Michael Vogt +authors: + - Michael Vogt + - James Troup diff --git a/tests/cluecode/data/copyright_fossology/testdata81_raw b/tests/cluecode/data/copyright_fossology/testdata81_raw deleted file mode 100644 index 62c3f756680..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata81_raw +++ /dev/null @@ -1,27 +0,0 @@ -This is Debian GNU's GnuPG keyrings of archive keys. - -This package was originally put together by Michael Vogt - - -The keys in the keyrings don't fall under any copyright. Everything -else in the package is covered by the GNU GPL. - -Debian support files Copyright (c) 2006 Michael Vogt -based on the debian-keyring package maintained by James Troup - -Debian support files for debian-archive-keyring are free software; you -can redistribute them and/or modify them 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. - -Debian support files for debian-archive-keyring are distributed in the -hope that they 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 with -your Debian system, in /usr/share/common-licenses/GPL, or with the -Debian GNU debian-archive-keyring source package as the file COPYING. -If not, write to the Free Software Foundation, Inc., 51 Franklin Street, -Fifth Floor, Boston, MA 02110-1301 USA. - diff --git a/tests/cluecode/data/copyright_fossology/testdata82.yml b/tests/cluecode/data/copyright_fossology/testdata82.yml new file mode 100644 index 00000000000..7f443605ab4 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata82.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006 Michael Vogt +holders: + - Michael Vogt +authors: + - Michael Vogt + - Alexander Wirt + - James Troup diff --git a/tests/cluecode/data/copyright_fossology/testdata82_raw b/tests/cluecode/data/copyright_fossology/testdata82_raw deleted file mode 100644 index ba4cedbae35..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata82_raw +++ /dev/null @@ -1,28 +0,0 @@ -This is Debian GNU's GnuPG keyrings of archive keys. - -This package was originally put together by Michael Vogt - and has been adapted to backports.org by -Alexander Wirt . - -The keys in the keyrings don't fall under any copyright. Everything -else in the package is covered by the GNU GPL. - -Debian support files Copyright (c) 2006 Michael Vogt -based on the debian-keyring package maintained by James Troup - -Debian support files for debian-archive-keyring are free software; you -can redistribute them and/or modify them 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. - -Debian support files for debian-archive-keyring are distributed in the -hope that they 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 with -your Debian system, in /usr/share/common-licenses/GPL, or with the -Debian GNU debian-archive-keyring source package as the file COPYING. -If not, write to the Free Software Foundation, Inc., 51 Franklin Street, -Fifth Floor, Boston, MA 02110-1301 USA. - diff --git a/tests/cluecode/data/copyright_fossology/testdata83.yml b/tests/cluecode/data/copyright_fossology/testdata83.yml new file mode 100644 index 00000000000..eea43d8f3a6 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata83.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1997 Kenneth Stailey + - Copyright (c) 1988 Landon Curt Noll & Ronald S. Karr + - Copyright (c) 1992 Ronald S. Karr + - Copyright (c) 1988 Landon Curt Noll & Ronald S. Karr +holders: + - Kenneth Stailey + - Landon Curt Noll & Ronald S. Karr + - Ronald S. Karr + - Landon Curt Noll & Ronald S. Karr +authors: + - Clint Adams diff --git a/tests/cluecode/data/copyright_fossology/testdata83_raw b/tests/cluecode/data/copyright_fossology/testdata83_raw deleted file mode 100644 index 3c4ebf96255..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata83_raw +++ /dev/null @@ -1,164 +0,0 @@ -This is the Debian GNU/Linux package debianutils. - -It is an original Debian package. Programs in it were maintained by -Guy Maor , and are now maintained by Clint Adams -. - -All its programs except readlink, savelog, and which may be -redistributed under the terms of the GNU GPL, Version 2 or later, -found on Debian systems in the file /usr/share/common-licenses/GPL. - -which is in the public domain. - -readlink is Copyright (c) 1997 Kenneth Stailey, and may also be -distributed under the terms of the BSD copyright. - -savelog may be redistributed under the following terms: (The rest of -this file consists of savelog's distribution terms.) - -#ident "@(#)smail:RELEASE-3_2:COPYING,v 1.2 1996/06/14 18:59:10 woods Exp" - - SMAIL GENERAL PUBLIC LICENSE - (Clarified 11 Feb 1988) - - Copyright (c) 1988 Landon Curt Noll & Ronald S. Karr - Copyright (c) 1992 Ronald S. Karr - Copyleft (GNU) 1988 Landon Curt Noll & Ronald S. Karr - - Everyone is permitted to copy and distribute verbatim copies - of this license, but changing it is not allowed. You can also - use this wording to make the terms for other programs. - - The license agreements of most software companies keep you at the -mercy of those companies. By contrast, our general public license is -intended to give everyone the right to share SMAIL. To make sure that -you get the rights we want you to have, we need to make restrictions -that forbid anyone to deny you these rights or to ask you to surrender -the rights. Hence this license agreement. - - Specifically, we want to make sure that you have the right to give -away copies of SMAIL, that you receive source code or else can get it -if you want it, that you can change SMAIL or use pieces of it in new -free programs, and that you know you can do these things. - - To make sure that everyone has such rights, we have to forbid you to -deprive anyone else of these rights. For example, if you distribute -copies of SMAIL, you must give the recipients all the rights that you -have. You must make sure that they, too, receive or can get the -source code. And you must tell them their rights. - - Also, for our own protection, we must make certain that everyone -finds out that there is no warranty for SMAIL. If SMAIL is modified by -someone else and passed on, we want its recipients to know that what -they have is not what we distributed, so that any problems introduced -by others will not reflect on our reputation. - - Therefore we (Landon Curt Noll and Ronald S. Karr) make the following -terms which say what you must do to be allowed to distribute or change -SMAIL. - - - COPYING POLICIES - - 1. You may copy and distribute verbatim copies of SMAIL source code -as you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy a valid copyright notice "Copyright -(c) 1988 Landon Curt Noll & Ronald S. Karr" (or with whatever year is -appropriate); keep intact the notices on all files that refer to this -License Agreement and to the absence of any warranty; and give any -other recipients of the SMAIL program a copy of this License -Agreement along with the program. You may charge a distribution fee -for the physical act of transferring a copy. - - 2. You may modify your copy or copies of SMAIL or any portion of it, -and copy and distribute such modifications under the terms of -Paragraph 1 above, provided that you also do the following: - - a) cause the modified files to carry prominent notices stating - that you changed the files and the date of any change; and - - b) cause the whole of any work that you distribute or publish, - that in whole or in part contains or is a derivative of SMAIL or - any part thereof, to be licensed at no charge to all third - parties on terms identical to those contained in this License - Agreement (except that you may choose to grant more extensive - warranty protection to some or all third parties, at your option). - - c) You may charge a distribution fee for the physical act of - transferring a copy, and you may at your option offer warranty - protection in exchange for a fee. - -Mere aggregation of another unrelated program with this program (or its -derivative) on a volume of a storage or distribution medium does not bring -the other program under the scope of these terms. - - 3. You may copy and distribute SMAIL (or a portion or derivative of it, -under Paragraph 2) in object code or executable form under the terms of -Paragraphs 1 and 2 above provided that you also do one of the following: - - a) accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of - Paragraphs 1 and 2 above; or, - - b) accompany it with a written offer, valid for at least three - years, to give any third party free (except for a nominal - shipping charge) a complete machine-readable copy of the - corresponding source code, to be distributed under the terms of - Paragraphs 1 and 2 above; or, - - c) accompany it with the information you received as to where the - corresponding source code may be obtained. (This alternative is - allowed only for non-commercial distribution and only if you - received the program in object code or executable form alone.) - -For an executable file, complete source code means all the source code for -all modules it contains; but, as a special exception, it need not include -source code for modules which are standard libraries that accompany the -operating system on which the executable file runs. - - 4. You may not copy, sublicense, distribute or transfer SMAIL -except as expressly provided under this License Agreement. Any attempt -otherwise to copy, sublicense, distribute or transfer SMAIL is void and -your rights to use the program under this License agreement shall be -automatically terminated. However, parties who have received computer -software programs from you with this License Agreement will not have -their licenses terminated so long as such parties remain in full compliance. - - 5. If you wish to incorporate parts of SMAIL into other free -programs whose distribution conditions are different, write to Landon -Curt Noll & Ronald S. Karr via the Free Software Foundation at 51 -Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. We have not yet -worked out a simple rule that can be stated here, but we will often -permit this. We will be guided by the two goals of preserving the -free status of all derivatives of our free software and of promoting -the sharing and reuse of software. - -Your comments and suggestions about our licensing policies and our -software are welcome! This contract was based on the contract made by -the Free Software Foundation. Please contact the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, -USA, or call (617) 542-5942 for details on copylefted material in -general. - - NO WARRANTY - - BECAUSE SMAIL IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY NO -WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING, LANDON CURT NOLL & RONALD S. KARR AND/OR -OTHER PARTIES PROVIDE SMAIL "AS IS" WITHOUT WARRANTY OF ANY KIND, -EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF SMAIL IS WITH -YOU. SHOULD SMAIL PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL -NECESSARY SERVICING, REPAIR OR CORRECTION. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL LANDON CURT NOLL & -RONALD S. KARR AND/OR ANY OTHER PARTY WHO MAY MODIFY AND REDISTRIBUTE -SMAIL AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE -(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED -INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE -PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) SMAIL, EVEN IF YOU HAVE -BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY -ANY OTHER PARTY. diff --git a/tests/cluecode/data/copyright_fossology/testdata84.yml b/tests/cluecode/data/copyright_fossology/testdata84.yml new file mode 100644 index 00000000000..52419029c88 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata84.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders + - authors +authors: + - Yasuhiro Take + - Yasuhiro Take diff --git a/tests/cluecode/data/copyright_fossology/testdata84_raw b/tests/cluecode/data/copyright_fossology/testdata84_raw deleted file mode 100644 index d1772647506..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata84_raw +++ /dev/null @@ -1,13 +0,0 @@ -This package was debianized by Yasuhiro Take on -Sat, 2 Dec 2000 00:14:21 +0900. - -Debian Native Package. - -Upstream Author: Yasuhiro Take - -License: - -Defoma is free software. You can freely use, copy, modify and redistribute -under the terms of the GNU General Public License, Version 2. -Debian systems would have copy of GNU GPL placed at: - /usr/share/common-licenses/GPL diff --git a/tests/cluecode/data/copyright_fossology/testdata85.yml b/tests/cluecode/data/copyright_fossology/testdata85.yml new file mode 100644 index 00000000000..dfe6ef82cf6 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata85.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyright (c) 1997 Klee Dienes +holders: + - Klee Dienes +authors: + - Christoph Lameter + - Julian Gilbey diff --git a/tests/cluecode/data/copyright_fossology/testdata85_raw b/tests/cluecode/data/copyright_fossology/testdata85_raw deleted file mode 100644 index 8a76fde0883..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata85_raw +++ /dev/null @@ -1,44 +0,0 @@ -The current development version can be downloaded from the SVN -repository at - - svn://svn.debian.org/devscripts/trunk - -or browsed online from http://svn.debian.org/ - -This is a package written originally by Christoph Lameter - and extensively modified by Julian Gilbey -. - -Many of the scripts were originally written by other people. Please -see the individual files (scripts and manpages) for more information. - -Most of the Devscripts::* Perl modules are from the deprecated -dpkg-perl package, copyright (c) 1997 Klee Dienes - -With the exceptions listed below, the whole package is copyright under -the GPL, version 2 or later. - -- annotate-output, debdiff and nmudiff are released under version 2 - (only) of the GPL. - -- diff2patches is released under version 3 or later of the GPL - -- deb-reversion is under the Artistic License version 2.0. - -- The Perl module DB_File::Lock used by bts is copyright under the same - terms as Perl, that is: - - This program is free software; you can redistribute it and/or modify - it under the terms of either: - - a) the GNU General Public License as published by the Free Software - Foundation; either version 1, or (at your option) any later - version, or - - b) the "Artistic License" which comes with Perl. - -- whodepends, wnpp-alert and wnpp-check are in the public domain - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL' and -the Artistic License in `/usr/share/common-licenses/Artistic'. diff --git a/tests/cluecode/data/copyright_fossology/testdata86.yml b/tests/cluecode/data/copyright_fossology/testdata86.yml new file mode 100644 index 00000000000..551d027e520 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata86.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2004-2007 by Internet Systems Consortium, Inc. 'ISC 1995-2003 by Internet Software + Consortium + - (c) 2008, Andrew Pollock +holders: + - Internet Systems Consortium, Inc. 'ISC by Internet Software Consortium + - Andrew Pollock +authors: + - Andrew Pollock + - Internet Systems Consortium diff --git a/tests/cluecode/data/copyright_fossology/testdata86_raw b/tests/cluecode/data/copyright_fossology/testdata86_raw deleted file mode 100644 index eb34c6d3996..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata86_raw +++ /dev/null @@ -1,33 +0,0 @@ -This package was debianized by Andrew Pollock on -Sun, 02 Mar 2008 21:18:00 -0800. - -It was downloaded from http://ftp.isc.org/isc/dhcp/ - -Upstream Author: Internet Systems Consortium (ISC) - -Copyright 2004-2007 by Internet Systems Consortium, Inc. ("ISC") - 1995-2003 by Internet Software Consortium - -License: - -# -# 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" AND ISC DISCLAIMS ALL WARRANTIES -# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# -# Internet Systems Consortium, Inc. -# 950 Charter Street -# Redwood City, CA 94063 -# -# http://www.isc.org/ - -The Debian packaging is (c) 2008, Andrew Pollock and -is licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff --git a/tests/cluecode/data/copyright_fossology/testdata87.yml b/tests/cluecode/data/copyright_fossology/testdata87.yml new file mode 100644 index 00000000000..551d027e520 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata87.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2004-2007 by Internet Systems Consortium, Inc. 'ISC 1995-2003 by Internet Software + Consortium + - (c) 2008, Andrew Pollock +holders: + - Internet Systems Consortium, Inc. 'ISC by Internet Software Consortium + - Andrew Pollock +authors: + - Andrew Pollock + - Internet Systems Consortium diff --git a/tests/cluecode/data/copyright_fossology/testdata87_raw b/tests/cluecode/data/copyright_fossology/testdata87_raw deleted file mode 100644 index 5addfce6e31..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata87_raw +++ /dev/null @@ -1,33 +0,0 @@ -This package was debianized by Andrew Pollock on -Sun, 02 Mar 2008 21:18:00 -0800. - -It was downloaded from http://ftp.isc.org/isc/dhcp/ - -Upstream Author: Internet Systems Consortium (ISC) - -Copyright 2004-2007 by Internet Systems Consortium, Inc. 'ISC - 1995-2003 by Internet Software Consortium - -License: - -# -# 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" AND ISC DISCLAIMS ALL WARRANTIES -# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -# -# Internet Systems Consortium, Inc. -# 950 Charter Street -# Redwood City, CA 94063 -# -# http://www.isc.org/ - -The Debian packaging is (c) 2008, Andrew Pollock and -is licensed under the GPL, see `/usr/share/common-licenses/GPL'. diff --git a/tests/cluecode/data/copyright_fossology/testdata88.yml b/tests/cluecode/data/copyright_fossology/testdata88.yml new file mode 100644 index 00000000000..0644d1e4ffa --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata88.yml @@ -0,0 +1,13 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2002 Free Software Foundation, Inc. +holders: + - Free Software Foundation, Inc. +authors: + - Mike Haertel, David Hayes, Richard Stallman, Len Tower, and Paul Eggert. Wayne Davison + - Randy Smith. GNU + - Thomas Lord. GNU + - Torbjorn Granlund and David MacKenzie diff --git a/tests/cluecode/data/copyright_fossology/testdata88_raw b/tests/cluecode/data/copyright_fossology/testdata88_raw deleted file mode 100644 index a62eab7ee2f..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata88_raw +++ /dev/null @@ -1,33 +0,0 @@ -This is the Debian prepackaged version of the GNU diffutils package. -GNU `diff' was written by Mike Haertel, David Hayes, Richard Stallman, -Len Tower, and Paul Eggert. Wayne Davison designed and implemented -the unified output format. GNU `diff3' was written by Randy Smith. -GNU `sdiff' was written by Thomas Lord. GNU `cmp' was written by -Torbjorn Granlund and David MacKenzie. - -The source for this release was obtained from - -ftp://ftp.gnu.org/gnu/diffutils/diffutils-2.8.1.tar.gz - -The Debian .orig.tar.gz is a repackaged version of the above, with -the following changes: - -* The doc directory, which contains the manual, has been removed. -* The files `Makefile.in', `configure.ac' and `configure' have been modified - minimally so that the tarball may be used without any of the auto* tools - (as it also happens for the unmodified tarball). - -Copyright (c) 2002 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU 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. - -On Debian systems, the complete text of the GNU General Public License -may be found in `/usr/share/common-licenses/GPL'. diff --git a/tests/cluecode/data/copyright_fossology/testdata89.yml b/tests/cluecode/data/copyright_fossology/testdata89.yml new file mode 100644 index 00000000000..df281f93eb0 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata89.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1994-2001,2002 by Thomas E. Dickey +holders: + - Thomas E. Dickey +authors: + - Thomas E. Dickey diff --git a/tests/cluecode/data/copyright_fossology/testdata89_raw b/tests/cluecode/data/copyright_fossology/testdata89_raw deleted file mode 100644 index 2eecf90cf15..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata89_raw +++ /dev/null @@ -1,28 +0,0 @@ -This is Debian's prepackaged version of the diffstat utility, which was -written by Thomas E. Dickey . It was -downloaded from: - - ftp://invisible-island.net/diffstat/ - -Copyright: - -/****************************************************************************** - * Copyright 1994-2001,2002 by Thomas E. Dickey * - * All Rights Reserved. * - * * - * Permission to use, copy, modify, and distribute this software and its * - * documentation for any purpose and without fee is hereby granted, provided * - * that the above copyright notice appear in all copies and that both that * - * copyright notice and this permission notice appear in supporting * - * documentation, and that the name of the above listed copyright holder(s) * - * not be used in advertising or publicity pertaining to distribution of the * - * software without specific, written prior permission. * - * * - * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD * - * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * - * FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE * - * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR * - * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - ******************************************************************************/ diff --git a/tests/cluecode/data/copyright_fossology/testdata8_raw b/tests/cluecode/data/copyright_fossology/testdata8_raw deleted file mode 100644 index 2c075b20b48..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata8_raw +++ /dev/null @@ -1,699 +0,0 @@ -/* This file is part of the KDE project - Copyright (c) 2006 Tim Beaulen - Copyright (c) 2006-2007 Matthias Kretz - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. - -*/ - -#include "backend.h" -#include -#include -#include "mediaobject.h" -#include "effect.h" -#include "events.h" -#include "audiooutput.h" -#include "audiodataoutput.h" -#include "nullsink.h" -#include "visualization.h" -#include "volumefadereffect.h" -#include "videodataoutput.h" -#include "videowidget.h" -#include "wirecall.h" -#include "xinethread.h" -#include "keepreference.h" -#include "sinknode.h" -#include "sourcenode.h" -#include "config-xine-widget.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -Q_EXPORT_PLUGIN2(phonon_xine, Phonon::Xine::Backend) - -static Phonon::Xine::Backend *s_instance = 0; - -namespace Phonon -{ -namespace Xine -{ - -Backend *Backend::instance() -{ - Q_ASSERT(s_instance); - return s_instance; -} - -Backend::Backend(QObject *parent, const QVariantList &) - : QObject(parent), - m_inShutdown(false), - m_debugMessages(!qgetenv("PHONON_XINE_DEBUG").isEmpty()), - m_thread(0) -{ - // Initialise PulseAudio support - PulseSupport *pulse = PulseSupport::getInstance(); - pulse->enable(); - connect(pulse, SIGNAL(objectDescriptionChanged(ObjectDescriptionType)), SLOT(emitObjectDescriptionChanged(ObjectDescriptionType))); - - Q_ASSERT(s_instance == 0); - s_instance = this; - - m_xine.create(); - m_freeEngines << m_xine; - - setProperty("identifier", QLatin1String("phonon_xine")); - setProperty("backendName", QLatin1String("Xine")); - setProperty("backendComment", tr("Phonon Xine Backend")); - setProperty("backendVersion", QLatin1String("0.1")); - setProperty("backendIcon", QLatin1String("phonon-xine")); - setProperty("backendWebsite", QLatin1String("http://multimedia.kde.org/")); - - QSettings cg("kde.org", "Phonon-Xine"); - m_deinterlaceDVD = cg.value("Settings/deinterlaceDVD", true).toBool(); - m_deinterlaceVCD = cg.value("Settings/deinterlaceVCD", false).toBool(); - m_deinterlaceFile = cg.value("Settings/deinterlaceFile", false).toBool(); - m_deinterlaceMethod = cg.value("Settings/deinterlaceMethod", 0).toInt(); - - signalTimer.setSingleShot(true); - connect(&signalTimer, SIGNAL(timeout()), SLOT(emitAudioOutputDeviceChange())); - QDBusConnection::sessionBus().registerObject("/internal/PhononXine", this, QDBusConnection::ExportScriptableSlots); - - debug() << Q_FUNC_INFO << "Using Xine version " << xine_get_version_string(); -} - -Backend::~Backend() -{ - m_inShutdown = true; - - if (!m_cleanupObjects.isEmpty()) { - Q_ASSERT(m_thread); - QCoreApplication::postEvent(m_thread, new Event(Event::Cleanup)); - while (!m_cleanupObjects.isEmpty()) { - XineThread::msleep(200); // static QThread::msleep, but that one is protected and XineThread is our friend - } - } - - if (m_thread) { - m_thread->quit(); - m_thread->wait(); - delete m_thread; - } - - s_instance = 0; - PulseSupport::shutdown(); -} - -XineEngine Backend::xineEngineForStream() -{ - XineEngine e; - if (s_instance->m_freeEngines.isEmpty()) { - e.create(); - } else { - e = s_instance->m_freeEngines.takeLast(); - } - s_instance->m_usedEngines << e; - return e; -} - -void Backend::returnXineEngine(const XineEngine &e) -{ - s_instance->m_usedEngines.removeAll(e); - s_instance->m_freeEngines << e; - if (s_instance->m_freeEngines.size() > 5) { - s_instance->m_freeEngines.takeLast(); - s_instance->m_freeEngines.takeLast(); - s_instance->m_freeEngines.takeLast(); - } -} - -QObject *Backend::createObject(BackendInterface::Class c, QObject *parent, const QList &args) -{ - switch (c) { - case MediaObjectClass: - return new MediaObject(parent); - case VolumeFaderEffectClass: - return new VolumeFaderEffect(parent); - case AudioOutputClass: - return new AudioOutput(parent); - case AudioDataOutputClass: - return new AudioDataOutput(parent); - case VisualizationClass: - return new Visualization(parent); - case VideoDataOutputClass: - return 0; - case Phonon::Experimental::BackendInterface::VideoDataOutputClass: - return new VideoDataOutput(parent); - case EffectClass: - { - Q_ASSERT(args.size() == 1); - debug() << Q_FUNC_INFO << "creating Effect(" << args[0]; - Effect *e = new Effect(args[0].toInt(), parent); - if (e->isValid()) { - return e; - } - delete e; - return 0; - } - case VideoWidgetClass: - { -#ifdef XINEWIDGET_FOUND - VideoWidget *vw = new VideoWidget(qobject_cast(parent)); - if (vw->isValid()) { - return vw; - } - delete vw; -#endif - return 0; - } - } - return 0; -} - -QStringList Backend::availableMimeTypes() const -{ - if (m_supportedMimeTypes.isEmpty()) - { - char *mimeTypes_c = xine_get_mime_types(m_xine); - QString mimeTypes(mimeTypes_c); - free(mimeTypes_c); - QStringList lstMimeTypes = mimeTypes.split(";", QString::SkipEmptyParts); - foreach (const QString &mimeType, lstMimeTypes) { - m_supportedMimeTypes << mimeType.left(mimeType.indexOf(':')).trimmed(); - } - if (m_supportedMimeTypes.contains("application/ogg")) { - m_supportedMimeTypes << QLatin1String("audio/x-vorbis+ogg") << QLatin1String("application/ogg"); - } - } - - return m_supportedMimeTypes; -} - -QList Backend::objectDescriptionIndexes(ObjectDescriptionType type) const -{ - QList list; - switch(type) - { - case Phonon::AudioOutputDeviceType: - return Backend::audioOutputIndexes(); - case Phonon::AudioCaptureDeviceType: - break; -/* - case Phonon::VideoOutputDeviceType: - { - const char *const *outputPlugins = xine_list_video_output_plugins(m_xine); - for (int i = 0; outputPlugins[i]; ++i) - list << 40000 + i; - break; - } - case Phonon::VideoCaptureDeviceType: - list << 30000 << 30001; - break; - case Phonon::VisualizationType: - break; - case Phonon::AudioCodecType: - break; - case Phonon::VideoCodecType: - break; - case Phonon::ContainerFormatType: - break; - */ - case Phonon::EffectType: - { - const char *const *postPlugins = xine_list_post_plugins_typed(m_xine, XINE_POST_TYPE_AUDIO_FILTER); - for (int i = 0; postPlugins[i]; ++i) - list << 0x7F000000 + i; - /*const char *const *postVPlugins = xine_list_post_plugins_typed(m_xine, XINE_POST_TYPE_VIDEO_FILTER); - for (int i = 0; postVPlugins[i]; ++i) { - list << 0x7E000000 + i; - } */ - } - case Phonon::AudioChannelType: - case Phonon::SubtitleType: - { - ObjectDescriptionHash hash = Backend::objectDescriptions(); - ObjectDescriptionHash::iterator it = hash.find(type); - if(it != hash.end()) - list = it.value().keys(); - } - break; - } - return list; -} - -QHash Backend::objectDescriptionProperties(ObjectDescriptionType type, int index) const -{ - //debug() << Q_FUNC_INFO << type << index; - QHash ret; - switch (type) { - case Phonon::AudioOutputDeviceType: - ret = Backend::audioOutputProperties(index); - break; - case Phonon::AudioCaptureDeviceType: - break; - /* - case Phonon::VideoOutputDeviceType: - { - const char *const *outputPlugins = xine_list_video_output_plugins(m_xine); - for (int i = 0; outputPlugins[i]; ++i) { - if (40000 + i == index) { - ret.insert("name", QLatin1String(outputPlugins[i])); - ret.insert("description", ""); - // description should be the result of the following call, but it crashes. - // It looks like libxine initializes the plugin even when we just want the description... - //QLatin1String(xine_get_video_driver_plugin_description(m_xine, outputPlugins[i]))); - break; - } - } - } - break; - case Phonon::VideoCaptureDeviceType: - switch (index) { - case 30000: - ret.insert("name", "USB Webcam"); - ret.insert("description", "first description"); - break; - case 30001: - ret.insert("name", "DV"); - ret.insert("description", "second description"); - break; - } - break; - case Phonon::VisualizationType: - break; - case Phonon::AudioCodecType: - break; - case Phonon::VideoCodecType: - break; - case Phonon::ContainerFormatType: - break; - */ - case Phonon::EffectType: - { - const char *const *postPlugins = xine_list_post_plugins_typed(m_xine, XINE_POST_TYPE_AUDIO_FILTER); - for (int i = 0; postPlugins[i]; ++i) { - if (0x7F000000 + i == index) { - ret.insert("name", QLatin1String(postPlugins[i])); - ret.insert("description", QLatin1String(xine_get_post_plugin_description(m_xine, postPlugins[i]))); - break; - } - } - /*const char *const *postVPlugins = xine_list_post_plugins_typed(m_xine, XINE_POST_TYPE_VIDEO_FILTER); - for (int i = 0; postVPlugins[i]; ++i) { - if (0x7E000000 + i == index) { - ret.insert("name", QLatin1String(postPlugins[i])); - break; - } - } */ - } - case Phonon::AudioChannelType: - case Phonon::SubtitleType: - { - ObjectDescriptionHash descriptionHash = Backend::objectDescriptions(); - ObjectDescriptionHash::iterator descIt = descriptionHash.find(type); - if(descIt != descriptionHash.end()) - { - ChannelIndexHash indexHash = descIt.value(); - ChannelIndexHash::iterator indexIt = indexHash.find(index); - if(indexIt != indexHash.end()) - { - ret = indexIt.value(); - } - } - } - break; - } - return ret; -} - -bool Backend::startConnectionChange(QSet nodes) -{ - Q_UNUSED(nodes); - // there's nothing we can do but hope the connection changes won't take too long so that buffers - // would underrun. But we should be pretty safe the way xine works by not doing anything here. - m_disconnections.clear(); - return true; -} - -bool Backend::connectNodes(QObject *_source, QObject *_sink) -{ - debug() << Q_FUNC_INFO << _source << "->" << _sink; - SourceNode *source = qobject_cast(_source); - SinkNode *sink = qobject_cast(_sink); - if (!source || !sink) { - return false; - } - debug() << Q_FUNC_INFO << source->threadSafeObject().data() << "->" << sink->threadSafeObject().data(); - // what streams to connect - i.e. all both nodes support - const MediaStreamTypes types = source->outputMediaStreamTypes() & sink->inputMediaStreamTypes(); - if (sink->source() != 0 || source->sinks().contains(sink)) { - return false; - } - NullSink *nullSink = 0; - foreach (SinkNode *otherSinks, source->sinks()) { - if (otherSinks->inputMediaStreamTypes() & types) { - if (nullSink) { - qWarning() << "phonon-xine does not support splitting of audio or video streams into multiple outputs. The sink node is already connected to" << otherSinks->threadSafeObject().data(); - return false; - } else { - nullSink = dynamic_cast(otherSinks); - if (!nullSink) { - qWarning() << "phonon-xine does not support splitting of audio or video streams into multiple outputs. The sink node is already connected to" << otherSinks->threadSafeObject().data(); - return false; - } - } - } - } - if (nullSink) { - m_disconnections << WireCall(source, nullSink); - source->removeSink(nullSink); - nullSink->unsetSource(source); - } - source->addSink(sink); - sink->setSource(source); - return true; -} - -bool Backend::disconnectNodes(QObject *_source, QObject *_sink) -{ - debug() << Q_FUNC_INFO << _source << "XX" << _sink; - SourceNode *source = qobject_cast(_source); - SinkNode *sink = qobject_cast(_sink); - if (!source || !sink) { - return false; - } - debug() << Q_FUNC_INFO << source->threadSafeObject().data() << "XX" << sink->threadSafeObject().data(); - const MediaStreamTypes types = source->outputMediaStreamTypes() & sink->inputMediaStreamTypes(); - if (!source->sinks().contains(sink) || sink->source() != source) { - return false; - } - m_disconnections << WireCall(source, sink); - source->removeSink(sink); - sink->unsetSource(source); - return true; -} - -bool Backend::endConnectionChange(QSet nodes) -{ - QList wireCallsUnordered; - QList wireCalls; - QList > allXtObjects; - KeepReference<> *keep = new KeepReference<>(); - - // first we need to find all vertices of the subgraphs formed by the given nodes that are - // source nodes but don't have a sink node connected and connect them to the NullSink, otherwise - // disconnections won't work - QSet nullSinks; - foreach (QObject *q, nodes) { - SourceNode *source = qobject_cast(q); - if (source && source->sinks().isEmpty()) { - SinkNode *sink = qobject_cast(q); - if (!sink || (sink && sink->source())) { - NullSink *nullsink = new NullSink(q); - source->addSink(nullsink); - nullsink->setSource(source); - nullSinks << nullsink; - } - } - } - nodes += nullSinks; - - // Now that we know (by looking at the subgraph of nodes formed by the given nodes) what has to - // be rewired we go over the nodes in order (from sink to source) and rewire them (all called - // from the xine thread). - foreach (QObject *q, nodes) { - SourceNode *source = qobject_cast(q); - if (source) { - //keep->addObject(source->threadSafeObject()); - allXtObjects.append(QExplicitlySharedDataPointer(source->threadSafeObject().data())); - foreach (SinkNode *sink, source->sinks()) { - WireCall w(source, sink); - if (wireCallsUnordered.contains(w)) { - Q_ASSERT(!wireCalls.contains(w)); - wireCalls << w; - } else { - wireCallsUnordered << w; - } - } - } - SinkNode *sink = qobject_cast(q); - if (sink) { - keep->addObject(sink->threadSafeObject().data()); - allXtObjects.append(QExplicitlySharedDataPointer(sink->threadSafeObject().data())); - if (sink->source()) { - WireCall w(sink->source(), sink); - if (wireCallsUnordered.contains(w)) { - Q_ASSERT(!wireCalls.contains(w)); - wireCalls << w; - } else { - wireCallsUnordered << w; - } - } - sink->findXineEngine(); - } else if (!source) { - debug() << Q_FUNC_INFO << q << "is neither a source nor a sink"; - } - ConnectNotificationInterface *connectNotify = qobject_cast(q); - if (connectNotify) { - // the object wants to know when the graph has changed - connectNotify->graphChanged(); - } - } - if (!wireCalls.isEmpty()) { - qSort(wireCalls); - // we want to be safe and make sure that the execution of a WireCall has all objects still - // alive that were used in this connection change - QList::Iterator it = wireCalls.begin(); - const QList::Iterator end = wireCalls.end(); - for (; it != end; ++it) { - it->addReferenceTo(allXtObjects); - } - } - QCoreApplication::postEvent(XineThread::instance(), new RewireEvent(wireCalls, m_disconnections)); - m_disconnections.clear(); - keep->ready(); - return true; -} - -void Backend::emitAudioOutputDeviceChange() -{ - debug() << Q_FUNC_INFO; - emitObjectDescriptionChanged(AudioOutputDeviceType); -} - -void Backend::emitObjectDescriptionChanged(ObjectDescriptionType type) -{ - emit objectDescriptionChanged(type); -} - -bool Backend::deinterlaceDVD() -{ - return s_instance->m_deinterlaceDVD; -} - -bool Backend::deinterlaceVCD() -{ - return s_instance->m_deinterlaceVCD; -} - -bool Backend::deinterlaceFile() -{ - return s_instance->m_deinterlaceFile; -} - -int Backend::deinterlaceMethod() -{ - return s_instance->m_deinterlaceMethod; -} - -void Backend::setObjectDescriptionProperities(ObjectDescriptionType type, int index, const QHash& properities) -{ - s_instance->m_objectDescriptions[type][index] = properities; -} - -QList Backend::audioOutputIndexes() -{ - instance()->checkAudioOutputs(); - const Backend *const that = instance(); - debug() << Q_FUNC_INFO << that << that->m_audioOutputInfos.size(); - QList list; - for (int i = 0; i < that->m_audioOutputInfos.size(); ++i) { - list << that->m_audioOutputInfos[i].index; - } - return list; -} - -QHash Backend::audioOutputProperties(int audioDevice) -{ - QHash ret; - if (audioDevice < 10000) { - return ret; - } - instance()->checkAudioOutputs(); - const Backend *const that = instance(); - - for (int i = 0; i < that->m_audioOutputInfos.size(); ++i) { - if (that->m_audioOutputInfos[i].index == audioDevice) { - ret.insert("name", that->m_audioOutputInfos[i].name); - ret.insert("description", that->m_audioOutputInfos[i].description); - - const QString iconName = that->m_audioOutputInfos[i].icon; - if (!iconName.isEmpty()) - ret.insert("icon", iconName); - else - ret.insert("icon", QLatin1String("audio-card")); - ret.insert("available", that->m_audioOutputInfos[i].available); - - ret.insert("initialPreference", that->m_audioOutputInfos[i].initialPreference); - ret.insert("isAdvanced", that->m_audioOutputInfos[i].isAdvanced); - if (that->m_audioOutputInfos[i].isHardware) { - ret.insert("isHardwareDevice", true); - } - - return ret; - } - } - ret.insert("name", QString()); - ret.insert("description", QString()); - ret.insert("available", false); - ret.insert("initialPreference", 0); - ret.insert("isAdvanced", false); - return ret; -} - -QByteArray Backend::audioDriverFor(int audioDevice) -{ - instance()->checkAudioOutputs(); - const Backend *const that = instance(); - for (int i = 0; i < that->m_audioOutputInfos.size(); ++i) { - if (that->m_audioOutputInfos[i].index == audioDevice) { - return that->m_audioOutputInfos[i].driver; - } - } - return QByteArray(); -} - -void Backend::addAudioOutput(int index, int initialPreference, const QString &name, const QString &description, - const QString &icon, const QByteArray &driver, bool isAdvanced, bool isHardware) -{ - AudioOutputInfo info(index, initialPreference, name, description, icon, driver); - info.isAdvanced = isAdvanced; - info.isHardware = isHardware; - const int listIndex = m_audioOutputInfos.indexOf(info); - if (listIndex == -1) { - info.available = true; - m_audioOutputInfos << info; - } else { - AudioOutputInfo &infoInList = m_audioOutputInfos[listIndex]; - if (infoInList.icon != icon || infoInList.initialPreference != initialPreference) { - infoInList.icon = icon; - infoInList.initialPreference = initialPreference; - } - infoInList.available = true; - } -} - -void Backend::checkAudioOutputs() -{ - if (m_audioOutputInfos.isEmpty()) { - debug() << Q_FUNC_INFO << "isEmpty"; - int nextIndex = 10000; - - // This will list the audio drivers, not the actual devices. - const char *const *outputPlugins = xine_list_audio_output_plugins(m_xine); - - PulseSupport *pulse = PulseSupport::getInstance(); - if (pulse->isActive()) { - for (int i = 0; outputPlugins[i]; ++i) { - if (0 == strcmp(outputPlugins[i], "pulseaudio")) { - // We've detected the pulseaudio output plugin. We're done. - return; - } - } - - // We cannot find the output plugin, so let the support class know. - pulse->enable(false); - } - - for (int i = 0; outputPlugins[i]; ++i) { - debug() << Q_FUNC_INFO << "outputPlugin: " << outputPlugins[i]; - if (0 == strcmp(outputPlugins[i], "alsa")) { - // we just list "default" for fallback when the platform plugin fails to list - // devices - addAudioOutput(nextIndex++, 12, tr("ALSA default output"), - tr("

    The Platform Plugin failed. This is a fallback to use the " - "first ALSA device available.

    ", "This string is only shown " - "when the KDE runtime is broken. The technical term 'Platform Plugin' " - "might help users to find a solution, so it might make sense to leave " - "that term untranslated."), - /*icon name */"audio-card", outputPlugins[i], false, true); - } else if (0 == strcmp(outputPlugins[i], "oss")) { - // we just list /dev/dsp for fallback when the platform plugin fails to list - // devices - addAudioOutput(nextIndex++, 11, tr("OSS default output"), - tr("

    The Platform Plugin failed. This is a fallback to use the " - "first OSS device available.

    ", "This string is only shown " - "when the KDE runtime is broken. The technical term 'Platform Plugin' " - "might help users to find a solution, so it might make sense to leave " - "that term untranslated."), - /*icon name */"audio-card", outputPlugins[i], false, true); - } else if (0 == strcmp(outputPlugins[i], "none") - || 0 == strcmp(outputPlugins[i], "file")) { - // ignore these drivers (hardware devices are listed by the KDE platform plugin) - } else if (0 == strcmp(outputPlugins[i], "jack")) { - addAudioOutput(nextIndex++, 9, tr("Jack Audio Connection Kit"), - tr("

    JACK is a low-latency audio server. It can connect a number " - "of different applications to an audio device, as well as allowing " - "them to share audio between themselves.

    " - "

    JACK was designed from the ground up for professional audio " - "work, and its design focuses on two key areas: synchronous " - "execution of all clients, and low latency operation.

    "), - /*icon name */"audio-backend-jack", outputPlugins[i]); - } else if (0 == strcmp(outputPlugins[i], "arts")) { - addAudioOutput(nextIndex++, -100, tr("aRts"), - tr("

    aRts is the old sound server and media framework that was used " - "in KDE2 and KDE3. Its use is discouraged.

    "), - /*icon name */"audio-backend-arts", outputPlugins[i]); - } else if (0 == strcmp(outputPlugins[i], "pulseaudio")) { - // Ignore this. We deal with it as a special case above. - } else if (0 == strcmp(outputPlugins[i], "esd")) { - addAudioOutput(nextIndex++, 8, tr("Esound (ESD)"), - xine_get_audio_driver_plugin_description(m_xine, outputPlugins[i]), - /*icon name */"audio-backend-esd", outputPlugins[i]); - } else { - addAudioOutput(nextIndex++, -20, outputPlugins[i], - xine_get_audio_driver_plugin_description(m_xine, outputPlugins[i]), - /*icon name */outputPlugins[i], outputPlugins[i]); - } - } - - qSort(m_audioOutputInfos); - - // now m_audioOutputInfos holds all devices this computer has ever seen - foreach (const AudioOutputInfo &info, m_audioOutputInfos) { - debug() << Q_FUNC_INFO << info.index << info.name << info.driver; - } - } -} - -}} - -#include "backend.moc" diff --git a/tests/cluecode/data/copyright_fossology/testdata9.yml b/tests/cluecode/data/copyright_fossology/testdata9.yml new file mode 100644 index 00000000000..13a0f7718a1 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata9.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1998,1999 Heiko Eissfeldt + - Copyright 1998,1999 Heiko Eissfeldt + - Copyright (c) by Heiko Eissfeldt +holders: + - Heiko Eissfeldt + - Heiko Eissfeldt + - Heiko Eissfeldt diff --git a/tests/cluecode/data/copyright_fossology/testdata90.yml b/tests/cluecode/data/copyright_fossology/testdata90.yml new file mode 100644 index 00000000000..a8703d75c5a --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata90.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2002 Leon Bottou and Yann Le Cun + - Copyright (c) 2001 AT&T + - Copyright (c) 1999-2001 LizardTech, Inc. +holders: + - Leon Bottou and Yann Le Cun + - AT&T + - LizardTech, Inc. +authors: + - Barak Pearlmutter + - David Kreil diff --git a/tests/cluecode/data/copyright_fossology/testdata90_raw b/tests/cluecode/data/copyright_fossology/testdata90_raw deleted file mode 100644 index 3a30eee1fe9..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata90_raw +++ /dev/null @@ -1,121 +0,0 @@ -This package was debianized by Barak Pearlmutter on -Wed, 29 May 2002 15:43:15 -0600. - -It was downloaded from http://djvu.sourceforge.net/ - http://heanet.dl.sourceforge.net/sourceforge/djvu/djvulibre-3.5.14.tar.gz - cvs -d :ext:bpearlmutter@cvs.sourceforge.net:/cvsroot/djvu co djvulibre-3.5 - -Upstream Authors: - - DjVuLibre Credits, from http://djvu.sourceforge.net/credits.html - - Concept: Yann LeCun, Leon Bottou. - Compression Science: Leon Bottou, Paul Howard, Yann LeCun, - Yoshua Bengio, Patrick Haffner, Pascal Vincent, Steven Pigeon. - Software Architecture: Leon Bottou, Bill C Riemers, Yann LeCun, - Joseph M Orost. - Codec Libraries, File Format Design: Leon Bottou, Patrick Haffner, - Andrew Erofeev, Bill C Riemers, Pascal Vincent, Yann LeCun. - Plugins, Viewers: Leon Bottou, Andrew Erofeev, Ming Chen, - Bill C Riemers, Liang Chen, Praveen Guduru. - Command Line Programs: Leon Bottou, Bill C Riemers, Mike Houser. - Internationalization Fred Crary, Bill C Riemers. - Website Development: Jeffery Triggs, Yann LeCun - - It gives me particular pleasure to thank Leon Bottou and Yann LeCun - for their heroic yet successful efforts to get LizardTech to handle - the patent situation in a way that addresses the concerns of the free - software community regarding the distribution and use of djvulibre. - -The script tools/any2djvu.sh was downloaded from - URL: http://www.inference.phy.cam.ac.uk/mackay/any2djvu.sh - Author: David Kreil - Released (via statement in email) under the GNU GPL v2. - -Copyright: - - This package 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; version 2 dated June, 1991. - - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License version 2 can be found in -`/usr/share/common-licenses/GPL-2'. - -As of upstream VERSION 3.5.19, the "GPL v2" has been broadened to -"GPL v2 or any later version". - -The following appears in the file COPYRIGHT at the top level of the -upstream source code. - - DjVuLibre-3.5 - Copyright (c) 2002 Leon Bottou and Yann Le Cun. - Copyright (c) 2001 AT&T - - This software is subject to, and may be distributed under, the - GNU General Public License, either Version 2 of the license, - or (at your option) any later version. The license should have - accompanied the software or you may obtain a copy of the license - from the Free Software Foundation at http://www.fsf.org . - - 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. - - DjVuLibre-3.5 is derived from the DjVu(r) Reference Library from - Lizardtech Software. Lizardtech Software has authorized us to - replace the original DjVu(r) Reference Library notice by the following - text (see doc/lizard2002.djvu and doc/lizardtech2007.djvu): - - ------------------------------------------------------------------ - | DjVu (r) Reference Library (v. 3.5) - | Copyright (c) 1999-2001 LizardTech, Inc. All Rights Reserved. - | The DjVu Reference Library is protected by U.S. Pat. No. - | 6,058,214 and patents pending. - | - | This software is subject to, and may be distributed under, the - | GNU General Public License, either Version 2 of the license, - | or (at your option) any later version. The license should have - | accompanied the software or you may obtain a copy of the license - | from the Free Software Foundation at http://www.fsf.org . - | - | The computer code originally released by LizardTech under this - | license and unmodified by other parties is deemed "the LIZARDTECH - | ORIGINAL CODE." Subject to any third party intellectual property - | claims, LizardTech grants recipient a worldwide, royalty-free, - | non-exclusive license to make, use, sell, or otherwise dispose of - | the LIZARDTECH ORIGINAL CODE or of programs derived from the - | LIZARDTECH ORIGINAL CODE in compliance with the terms of the GNU - | General Public License. This grant only confers the right to - | infringe patent claims underlying the LIZARDTECH ORIGINAL CODE to - | the extent such infringement is reasonably necessary to enable - | recipient to make, have made, practice, sell, or otherwise dispose - | of the LIZARDTECH ORIGINAL CODE (or portions thereof) and not to - | any greater extent that may be necessary to utilize further - | modifications or combinations. - | - | The LIZARDTECH ORIGINAL CODE is provided "AS IS" WITHOUT WARRANTY - | OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - | TO ANY WARRANTY OF NON-INFRINGEMENT, OR ANY IMPLIED WARRANTY OF - | MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - +------------------------------------------------------------------ - - Directory gui/nsdejavu/npsdk contains files extracted from - the Mozilla project. These files are available under the - Mozilla Public License version 1.1 with permission to - redistribute under either the GNU General Public License - version 2 or the GNU Library General Public License version 2.1. - This files are used for the compilation of "nsdejavu.so" - which is a bridge between web browsers and the djview3 or djview4 - programs. - diff --git a/tests/cluecode/data/copyright_fossology/testdata91.yml b/tests/cluecode/data/copyright_fossology/testdata91.yml new file mode 100644 index 00000000000..42e1b8f3d20 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata91.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders + - authors +authors: + - Petter Reinholdtsen + - Alan Cox and Jean Delvare diff --git a/tests/cluecode/data/copyright_fossology/testdata91_raw b/tests/cluecode/data/copyright_fossology/testdata91_raw deleted file mode 100644 index 21849f3d2ec..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata91_raw +++ /dev/null @@ -1,17 +0,0 @@ -This package was debianized by Petter Reinholdtsen on -Sun, 9 Nov 2003 09:54:14 +0100. - -It was downloaded from . - -Upstream Authors: Alan Cox and - Jean Delvare . - -Copyright: - -These programs are 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. - -On Debian GNU/Linux systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/tests/cluecode/data/copyright_fossology/testdata92.yml b/tests/cluecode/data/copyright_fossology/testdata92.yml new file mode 100644 index 00000000000..2970a0e6a5f --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata92.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1996-2001 Internet Software Consortium +holders: + - Internet Software Consortium +authors: + - Bdale Garbee + - Internet Software Consortium diff --git a/tests/cluecode/data/copyright_fossology/testdata92_raw b/tests/cluecode/data/copyright_fossology/testdata92_raw deleted file mode 100644 index e59971d17ba..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata92_raw +++ /dev/null @@ -1,27 +0,0 @@ -This package was debianized by Bdale Garbee on -Tue, 12 Dec 2000 02:42:56 -0700. - -It was downloaded from http://www.isc.org/products/BIND/ and can be fetched -from git with: - git clone git://git.debian.org/users/lamont/bind9.git -ISC releases can be cloned from git with: - git clone git://git.debian.org/users/lamont/bind9-isc.git - -Upstream Author: Internet Software Consortium - -Copyright: - -Copyright (c) 1996-2001 Internet Software Consortium. - -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" AND INTERNET SOFTWARE CONSORTIUM -DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL -INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING -FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/tests/cluecode/data/copyright_fossology/testdata93.yml b/tests/cluecode/data/copyright_fossology/testdata93.yml new file mode 100644 index 00000000000..7c3be9eabd4 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata93.yml @@ -0,0 +1,33 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999-2007 Norman Walsh + - Copyright (c) 2003 Jiri Kosek + - Copyright (c) 2004-2007 Steve Ball + - Copyright (c) 2005-2007 The DocBook Project + - Copyright (c) 2005 Michal Molhanec + - Copyright (c) 2000 Bob Clary + - Copyright (c) 2001 The Netscape Corporation + - Copyright (c) 2003 The Netscape Corporation + - Copyright (c) 1997 Michael Bostock (Netscape Communications) + - Copyright (c) 2001 Bob Clary (Netscape Communications) + - Copyright (c) 2001 Seth Dillingham (Macrobyte Resources) + - Copyright (c) 2002 Mark Filanowicz (Amdahl IT Services) +holders: + - Norman Walsh + - Jiri Kosek + - Steve Ball + - The DocBook Project + - Michal Molhanec + - Bob Clary + - The Netscape Corporation + - The Netscape Corporation + - Michael Bostock (Netscape Communications) + - Bob Clary (Netscape Communications) + - Seth Dillingham (Macrobyte Resources) + - Mark Filanowicz (Amdahl IT Services) +authors: + - Daniel Leidert + - Mark Johnson diff --git a/tests/cluecode/data/copyright_fossology/testdata93_raw b/tests/cluecode/data/copyright_fossology/testdata93_raw deleted file mode 100644 index c7087355f09..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata93_raw +++ /dev/null @@ -1,601 +0,0 @@ -This package, split of docbook-xsl, was debianized by Daniel Leidert -. But docbook-xsl was debianized by Mark Johnson - on Mon, 11 Oct 2004 18:37:39 -0400. - -It was downloaded from the Sourceforge.net download servers: - - http://downloads.sourceforge.net/docbook/ - -Copyright: - - Copyright (c) 1999-2007 Norman Walsh. - Copyright (c) 2003 Jiri Kosek. - Copyright (c) 2004-2007 Steve Ball. - Copyright (c) 2005-2007 The DocBook Project. - - Several files in the - /usr/share/xml/docbook/stylesheet/nwalsh/highlighting directory are - copyright: - - delphi-hl.xml, ini-hl.xml, java-hl.xml, m2-hl.xml, myxml-hl.xml, - php-hl.xml: - Copyright (c) 2005 Michal Molhanec. - - Several JavaScript files in the - /usr/share/xml/docbook/stylesheet/nwalsh/slides/browser directory are - copyright: - - xbLibrary.js: - Copyright (c) 2000 Bob Clary. - ua.js, xbDebug.js, xbDOM.js, xbStyle.js, xbStyle-css.js, xbStyle-nn4.js, - xbStyle-not-supported.js: - Copyright (c) 2001 The Netscape Corporation. - CTOCWidget.js: - Copyright (c) 2003 The Netscape Corporation. - xbCollapsibleLists.js: - Copyright (c) 1997 Michael Bostock (Netscape Communications). - Copyright (c) 2001 Bob Clary (Netscape Communications). - Copyright (c) 2001 Seth Dillingham (Macrobyte Resources). - Copyright (c) 2002 Mark Filanowicz (Amdahl IT Services). - -Upstream Author: - - Norman Walsh and other docbook developers at - the Sourceforge DocBook Open Repository. As you can see above, code was - also derived from other sources. - -License and warranty for most parts of the package: MIT/X Consortium License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - Except as contained in this notice, the names of individuals credited with - contribution to this software shall not be used in advertising or otherwise - to promote the sale, use or other dealings in this Software without prior - written authorization from the individuals in question. - - Any stylesheet derived from this Software that is publicly distributed - will be identified with a different name and the version strings in any - derived Software will be changed so that no possibility of confusion between - the derived package and this Software will exist. - - 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. IN NO EVENT SHALL - NORMAN WALSH OR ANY OTHER CONTRIBUTOR 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. - -License and warranty for delphi-hl.xml, ini-hl.xml, java-hl.xml, m2-hl.xml, - myxml-hl.xml, php-hl.xml: - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product - documentation would be appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. - - THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED WARRANTY. - IN NO EVENT WILL THE AUTHORS BE HELD LIABLE FOR ANY DAMAGE ARISING FROM THE - USE OF THIS SOFTWARE. - -License and warranty for slides.js: All-Permissive - - You are free to use, modify and distribute this software without limitation. - - THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT A WARRANTY OF ANY KIND. - -License and warranty for xbCollapsibleLists.js: All-Permissive - - Netscape grants you a royalty free license to use, modify or - distribute this software provided that this copyright notice - appears on all copies. - - THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT A WARRANTY OF ANY KIND. - -License and warranty for CTOCWidget.js, ua.js, xbDebug.js, xbDOM.js, - xbLibrary.js, xbStyle.js, xbStyle-css.js, xbStyle-nn4.js, - xbStyle-not-supported.js: MPL 1.1 - - The contents of this file are subject to the Mozilla Public License Version - 1.1 (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" basis, - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - for the specific language governing rights and limitations under the - License. - - -============================================================================== - -The Mozilla Public License (MPL) Version 1.1 follows: - - MOZILLA PUBLIC LICENSE - Version 1.1 - - --------------- - - 1. Definitions. - - 1.0.1. "Commercial Use" means distribution or otherwise making the - Covered Code available to a third party. - - 1.1. "Contributor" means each entity that creates or contributes to - the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Code, prior Modifications used by a Contributor, and the Modifications - made by that particular Contributor. - - 1.3. "Covered Code" means the Original Code or Modifications or the - combination of the Original Code and Modifications, in each case - including portions thereof. - - 1.4. "Electronic Distribution Mechanism" means a mechanism generally - accepted in the software development community for the electronic - transfer of data. - - 1.5. "Executable" means Covered Code in any form other than Source - Code. - - 1.6. "Initial Developer" means the individual or entity identified - as the Initial Developer in the Source Code notice required by Exhibit - A. - - 1.7. "Larger Work" means a work which combines Covered Code or - portions thereof with code not governed by the terms of this License. - - 1.8. "License" means this document. - - 1.8.1. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means any addition to or deletion from the - substance or structure of either the Original Code or any previous - Modifications. When Covered Code is released as a series of files, a - Modification is: - A. Any addition to or deletion from the contents of a file - containing Original Code or previous Modifications. - - B. Any new file that contains any part of the Original Code or - previous Modifications. - - 1.10. "Original Code" means Source Code of computer software code - which is described in the Source Code notice required by Exhibit A as - Original Code, and which, at the time of its release under this - License is not already Covered Code governed by this License. - - 1.10.1. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.11. "Source Code" means the preferred form of the Covered Code for - making modifications to it, including all modules it contains, plus - any associated interface definition files, scripts used to control - compilation and installation of an Executable, or source code - differential comparisons against either the Original Code or another - well known, available Covered Code of the Contributor's choice. The - Source Code can be in a compressed or archival form, provided the - appropriate decompression or de-archiving software is widely available - for no charge. - - 1.12. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, this - License or a future version of this License issued under Section 6.1. - For legal entities, "You" includes any entity which controls, is - controlled by, or is under common control with You. For purposes of - this definition, "control" means (a) the power, direct or indirect, - to cause the direction or management of such entity, whether by - contract or otherwise, or (b) ownership of more than fifty percent - (50%) of the outstanding shares or beneficial ownership of such - entity. - - 2. Source Code License. - - 2.1. The Initial Developer Grant. - The Initial Developer hereby grants You a world-wide, royalty-free, - non-exclusive license, subject to third party intellectual property - claims: - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Code (or portions thereof) with or without Modifications, and/or - as part of a Larger Work; and - - (b) under Patents Claims infringed by the making, using or - selling of Original Code, to make, have made, use, practice, - sell, and offer for sale, and/or otherwise dispose of the - Original Code (or portions thereof). - - (c) the licenses granted in this Section 2.1(a) and (b) are - effective on the date Initial Developer first distributes - Original Code under the terms of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: 1) for code that You delete from the Original Code; 2) - separate from the Original Code; or 3) for infringements caused - by: i) the modification of the Original Code or ii) the - combination of the Original Code with other software or devices. - - 2.2. Contributor Grant. - Subject to third party intellectual property claims, each Contributor - hereby grants You a world-wide, royalty-free, non-exclusive license - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor, to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof) either on an - unmodified basis, with other Modifications, as Covered Code - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or - selling of Modifications made by that Contributor either alone - and/or in combination with its Contributor Version (or portions - of such combination), to make, use, sell, offer for sale, have - made, and/or otherwise dispose of: 1) Modifications made by that - Contributor (or portions thereof); and 2) the combination of - Modifications made by that Contributor with its Contributor - Version (or portions of such combination). - - (c) the licenses granted in Sections 2.2(a) and 2.2(b) are - effective on the date Contributor first makes Commercial Use of - the Covered Code. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: 1) for any code that Contributor has deleted from the - Contributor Version; 2) separate from the Contributor Version; - 3) for infringements caused by: i) third party modifications of - Contributor Version or ii) the combination of Modifications made - by that Contributor with other software (except as part of the - Contributor Version) or other devices; or 4) under Patent Claims - infringed by Covered Code in the absence of Modifications made by - that Contributor. - - 3. Distribution Obligations. - - 3.1. Application of License. - The Modifications which You create or to which You contribute are - governed by the terms of this License, including without limitation - Section 2.2. The Source Code version of Covered Code may be - distributed only under the terms of this License or a future version - of this License released under Section 6.1, and You must include a - copy of this License with every copy of the Source Code You - distribute. You may not offer or impose any terms on any Source Code - version that alters or restricts the applicable version of this - License or the recipients' rights hereunder. However, You may include - an additional document offering the additional rights described in - Section 3.5. - - 3.2. Availability of Source Code. - Any Modification which You create or to which You contribute must be - made available in Source Code form under the terms of this License - either on the same media as an Executable version or via an accepted - Electronic Distribution Mechanism to anyone to whom you made an - Executable version available; and if made available via Electronic - Distribution Mechanism, must remain available for at least twelve (12) - months after the date it initially became available, or at least six - (6) months after a subsequent version of that particular Modification - has been made available to such recipients. You are responsible for - ensuring that the Source Code version remains available even if the - Electronic Distribution Mechanism is maintained by a third party. - - 3.3. Description of Modifications. - You must cause all Covered Code to which You contribute to contain a - file documenting the changes You made to create that Covered Code and - the date of any change. You must include a prominent statement that - the Modification is derived, directly or indirectly, from Original - Code provided by the Initial Developer and including the name of the - Initial Developer in (a) the Source Code, and (b) in any notice in an - Executable version or related documentation in which You describe the - origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters - (a) Third Party Claims. - If Contributor has knowledge that a license under a third party's - intellectual property rights is required to exercise the rights - granted by such Contributor under Sections 2.1 or 2.2, - Contributor must include a text file with the Source Code - distribution titled "LEGAL" which describes the claim and the - party making the claim in sufficient detail that a recipient will - know whom to contact. If Contributor obtains such knowledge after - the Modification is made available as described in Section 3.2, - Contributor shall promptly modify the LEGAL file in all copies - Contributor makes available thereafter and shall take other steps - (such as notifying appropriate mailing lists or newsgroups) - reasonably calculated to inform those who received the Covered - Code that new knowledge has been obtained. - - (b) Contributor APIs. - If Contributor's Modifications include an application programming - interface and Contributor has knowledge of patent licenses which - are reasonably necessary to implement that API, Contributor must - also include this information in the LEGAL file. - - (c) Representations. - Contributor represents that, except as disclosed pursuant to - Section 3.4(a) above, Contributor believes that Contributor's - Modifications are Contributor's original creation(s) and/or - Contributor has sufficient rights to grant the rights conveyed by - this License. - - 3.5. Required Notices. - You must duplicate the notice in Exhibit A in each file of the Source - Code. If it is not possible to put such notice in a particular Source - Code file due to its structure, then You must include such notice in a - location (such as a relevant directory) where a user would be likely - to look for such a notice. If You created one or more Modification(s) - You may add your name as a Contributor to the notice described in - Exhibit A. You must also duplicate this License in any documentation - for the Source Code where You describe recipients' rights or ownership - rights relating to Covered Code. You may choose to offer, and to - charge a fee for, warranty, support, indemnity or liability - obligations to one or more recipients of Covered Code. However, You - may do so only on Your own behalf, and not on behalf of the Initial - Developer or any Contributor. You must make it absolutely clear than - any such warranty, support, indemnity or liability obligation is - offered by You alone, and You hereby agree to indemnify the Initial - Developer and every Contributor for any liability incurred by the - Initial Developer or such Contributor as a result of warranty, - support, indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - You may distribute Covered Code in Executable form only if the - requirements of Section 3.1-3.5 have been met for that Covered Code, - and if You include a notice stating that the Source Code version of - the Covered Code is available under the terms of this License, - including a description of how and where You have fulfilled the - obligations of Section 3.2. The notice must be conspicuously included - in any notice in an Executable version, related documentation or - collateral in which You describe recipients' rights relating to the - Covered Code. You may distribute the Executable version of Covered - Code or ownership rights under a license of Your choice, which may - contain terms different from this License, provided that You are in - compliance with the terms of this License and that the license for the - Executable version does not attempt to limit or alter the recipient's - rights in the Source Code version from the rights set forth in this - License. If You distribute the Executable version under a different - license You must make it absolutely clear that any terms which differ - from this License are offered by You alone, not by the Initial - Developer or any Contributor. You hereby agree to indemnify the - Initial Developer and every Contributor for any liability incurred by - the Initial Developer or such Contributor as a result of any such - terms You offer. - - 3.7. Larger Works. - You may create a Larger Work by combining Covered Code with other code - not governed by the terms of this License and distribute the Larger - Work as a single product. In such a case, You must make sure the - requirements of this License are fulfilled for the Covered Code. - - 4. Inability to Comply Due to Statute or Regulation. - - If it is impossible for You to comply with any of the terms of this - License with respect to some or all of the Covered Code due to - statute, judicial order, or regulation then You must: (a) comply with - the terms of this License to the maximum extent possible; and (b) - describe the limitations and the code they affect. Such description - must be included in the LEGAL file described in Section 3.4 and must - be included with all distributions of the Source Code. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - - 5. Application of this License. - - This License applies to code to which the Initial Developer has - attached the notice in Exhibit A and to related Covered Code. - - 6. Versions of the License. - - 6.1. New Versions. - Netscape Communications Corporation ("Netscape") may publish revised - and/or new versions of the License from time to time. Each version - will be given a distinguishing version number. - - 6.2. Effect of New Versions. - Once Covered Code has been published under a particular version of the - License, You may always continue to use it under the terms of that - version. You may also choose to use such Covered Code under the terms - of any subsequent version of the License published by Netscape. No one - other than Netscape has the right to modify the terms applicable to - Covered Code created under this License. - - 6.3. Derivative Works. - If You create or use a modified version of this License (which you may - only do in order to apply it to code which is not already Covered Code - governed by this License), You must (a) rename Your license so that - the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", - "MPL", "NPL" or any confusingly similar phrase do not appear in your - license (except to note that your license differs from this License) - and (b) otherwise make it clear that Your version of the license - contains terms which differ from the Mozilla Public License and - Netscape Public License. (Filling in the name of the Initial - Developer, Original Code or Contributor in the notice described in - Exhibit A shall not of themselves be deemed to be modifications of - this License.) - - 7. DISCLAIMER OF WARRANTY. - - COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, - WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF - DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. - THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE - IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, - YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE - COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER - OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF - ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 8. TERMINATION. - - 8.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to cure - such breach within 30 days of becoming aware of the breach. All - sublicenses to the Covered Code which are properly granted shall - survive any termination of this License. Provisions which, by their - nature, must remain in effect beyond the termination of this License - shall survive. - - 8.2. If You initiate litigation by asserting a patent infringement - claim (excluding declatory judgment actions) against Initial Developer - or a Contributor (the Initial Developer or Contributor against whom - You file such action is referred to as "Participant") alleging that: - - (a) such Participant's Contributor Version directly or indirectly - infringes any patent, then any and all rights granted by such - Participant to You under Sections 2.1 and/or 2.2 of this License - shall, upon 60 days notice from Participant terminate prospectively, - unless if within 60 days after receipt of notice You either: (i) - agree in writing to pay Participant a mutually agreeable reasonable - royalty for Your past and future use of Modifications made by such - Participant, or (ii) withdraw Your litigation claim with respect to - the Contributor Version against such Participant. If within 60 days - of notice, a reasonable royalty and payment arrangement are not - mutually agreed upon in writing by the parties or the litigation claim - is not withdrawn, the rights granted by Participant to You under - Sections 2.1 and/or 2.2 automatically terminate at the expiration of - the 60 day notice period specified above. - - (b) any software, hardware, or device, other than such Participant's - Contributor Version, directly or indirectly infringes any patent, then - any rights granted to You by such Participant under Sections 2.1(b) - and 2.2(b) are revoked effective as of the date You first made, used, - sold, distributed, or had made, Modifications made by that - Participant. - - 8.3. If You assert a patent infringement claim against Participant - alleging that such Participant's Contributor Version directly or - indirectly infringes any patent where such claim is resolved (such as - by license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 8.4. In the event of termination under Sections 8.1 or 8.2 above, - all end user license agreements (excluding distributors and resellers) - which have been validly granted by You or any distributor hereunder - prior to termination shall survive termination. - - 9. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL - DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, - OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR - ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY - CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, - WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER - COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN - INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF - LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY - RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW - PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE - EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO - THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - - 10. U.S. GOVERNMENT END USERS. - - The Covered Code is a "commercial item," as that term is defined in - 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" and "commercial computer software documentation," as such - terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 - C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), - all U.S. Government End Users acquire Covered Code with only those - rights set forth herein. - - 11. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - California law provisions (except to the extent applicable law, if - any, provides otherwise), excluding its conflict-of-law provisions. - With respect to disputes in which at least one party is a citizen of, - or an entity chartered or registered to do business in the United - States of America, any litigation relating to this License shall be - subject to the jurisdiction of the Federal Courts of the Northern - District of California, with venue lying in Santa Clara County, - California, with the losing party responsible for costs, including - without limitation, court costs and reasonable attorneys' fees and - expenses. The application of the United Nations Convention on - Contracts for the International Sale of Goods is expressly excluded. - Any law or regulation which provides that the language of a contract - shall be construed against the drafter shall not apply to this - License. - - 12. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. - - 13. MULTIPLE-LICENSED CODE. - - Initial Developer may designate portions of the Covered Code as - "Multiple-Licensed". "Multiple-Licensed" means that the Initial - Developer permits you to utilize portions of the Covered Code under - Your choice of the NPL or the alternative licenses, if any, specified - by the Initial Developer in the file described in Exhibit A. - - EXHIBIT A -Mozilla Public License. - - ``The contents of this file are subject to the Mozilla Public License - Version 1.1 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - License for the specific language governing rights and limitations - under the License. - - The Original Code is ______________________________________. - - The Initial Developer of the Original Code is ________________________. - Portions created by ______________________ are Copyright (c) ______ - _______________________. All Rights Reserved. - - Contributor(s): ______________________________________. - - Alternatively, the contents of this file may be used under the terms - of the _____ license (the "[___] License"), in which case the - provisions of [______] License are applicable instead of those - above. If you wish to allow use of your version of this file only - under the terms of the [____] License and not to allow others to use - your version of this file under the MPL, indicate your decision by - deleting the provisions above and replace them with the notice and - other provisions required by the [___] License. If you do not delete - the provisions above, a recipient may use your version of this file - under either the MPL or the [___] License." - - [NOTE: The text of this Exhibit A may differ slightly from the text of - the notices in the Source Code files of the Original Code. You should - use the text of this Exhibit A rather than the text found in the - Original Code Source Code for Your Modifications.] - diff --git a/tests/cluecode/data/copyright_fossology/testdata94.yml b/tests/cluecode/data/copyright_fossology/testdata94.yml new file mode 100644 index 00000000000..0b61779611c --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata94.yml @@ -0,0 +1,66 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006-2008 Frank Lichtenheld + - Copyright (c) 2006-2008 Guillem Jover + - Copyright (c) 2007-2008 Raphael Hertzog + - Copyright (c) 2007 Colin Watson + - Copyright (c) 2004-2005 Scott James Remnant + - Copyright (c) 2004-2005 Canonical Ltd. + - Copyright (c) 1999-2002 Wichert Akkerman + - Copyright (c) 1999-2001 Marcus Brinkmann + - Copyright (c) 2001,2007 Joey Hess + - Copyright (c) 1994-1999 Ian Jackson + - Copyright (c) 1999 Richard Kettlewell + - Copyright (c) 1999 Ben Collins + - Copyright (c) 1999 Roderick Shertler + - Copyright (c) 1996-1998 Miquel van Smoorenburg + - Copyright (c) 1997-1998 Juho Vuori + - Copyright (c) 1997-1998 Charles Briscoe-Smith + - Copyright (c) 1998 Nils Rennebarth + - Copyright (c) 1998 Juan Cespedes + - Copyright (c) 1998 Jim Van Zandt + - Copyright (c) 1998 Koichi Sekido + - Copyright (c) 1995-1996 Erick Branderhorst + - Copyright (c) 1996 Kim-Minh Kaplan + - Copyright (c) 1996 Klee Dienes + - Copyright (c) 1996 Michael Shields + - Copyright (c) 1995 Bruce Perens + - Copyright (c) 1994 Carl Streeter + - Copyright (c) 1994 Matt Welsh + - Copyright (c) 1994 Ian Murdock + - Copyright (c) 1984-2002 Free Software Foundation, Inc. +holders: + - Frank Lichtenheld + - Guillem Jover + - Raphael Hertzog + - Colin Watson + - Scott James Remnant + - Canonical Ltd. + - Wichert Akkerman + - Marcus Brinkmann + - Joey Hess + - Ian Jackson + - Richard Kettlewell + - Ben Collins + - Roderick Shertler + - Miquel van Smoorenburg + - Juho Vuori + - Charles Briscoe-Smith + - Nils Rennebarth + - Juan Cespedes + - Jim Van Zandt + - Koichi Sekido + - Erick Branderhorst + - Kim-Minh Kaplan + - Klee Dienes + - Michael Shields + - Bruce Perens + - Carl Streeter + - Matt Welsh + - Ian Murdock + - Free Software Foundation, Inc. +authors: + - Colin Plumb diff --git a/tests/cluecode/data/copyright_fossology/testdata94_raw b/tests/cluecode/data/copyright_fossology/testdata94_raw deleted file mode 100644 index e10ffe43b2f..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata94_raw +++ /dev/null @@ -1,53 +0,0 @@ -This is Debian's package maintenance system. - -Copyright (c) 2006-2008 Frank Lichtenheld -Copyright (c) 2006-2008 Guillem Jover -Copyright (c) 2007-2008 Raphael Hertzog -Copyright (c) 2007 Colin Watson -Copyright (c) 2004-2005 Scott James Remnant -Copyright (c) 2004-2005 Canonical Ltd. -Copyright (c) 1999-2002 Wichert Akkerman -Copyright (c) 1999-2001 Marcus Brinkmann -Copyright (c) 2001,2007 Joey Hess -Copyright (c) 1994-1999 Ian Jackson -Copyright (c) 1999 Richard Kettlewell -Copyright (c) 1999 Ben Collins -Copyright (c) 1999 Roderick Shertler -Copyright (c) 1996-1998 Miquel van Smoorenburg -Copyright (c) 1997-1998 Juho Vuori -Copyright (c) 1997-1998 Charles Briscoe-Smith -Copyright (c) 1998 Nils Rennebarth -Copyright (c) 1998 Juan Cespedes -Copyright (c) 1998 Jim Van Zandt -Copyright (c) 1998 Koichi Sekido -Copyright (c) 1995-1996 Erick Branderhorst -Copyright (c) 1996 Kim-Minh Kaplan -Copyright (c) 1996 Klee Dienes -Copyright (c) 1996 Michael Shields -Copyright (c) 1995 Bruce Perens -Copyright (c) 1994 Carl Streeter -Copyright (c) 1994 Matt Welsh -Copyright (c) 1994 Ian Murdock - -Includes public domain MD5 code: - lib/md5.c and lib/md5.h originally written by Colin Plumb, - -Includes code from ‘getopt’ and ‘gettext’: - Copyright (c) 1984-2002 Free Software Foundation, Inc. - - -Licence: - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -On Debian GNU/Linux systems, the complete text of the GNU General Public -License can be found in ‘/usr/share/common-licenses/GPL’ or in the dpkg -source as the file ‘COPYING’ diff --git a/tests/cluecode/data/copyright_fossology/testdata95.yml b/tests/cluecode/data/copyright_fossology/testdata95.yml new file mode 100644 index 00000000000..0b61779611c --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata95.yml @@ -0,0 +1,66 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006-2008 Frank Lichtenheld + - Copyright (c) 2006-2008 Guillem Jover + - Copyright (c) 2007-2008 Raphael Hertzog + - Copyright (c) 2007 Colin Watson + - Copyright (c) 2004-2005 Scott James Remnant + - Copyright (c) 2004-2005 Canonical Ltd. + - Copyright (c) 1999-2002 Wichert Akkerman + - Copyright (c) 1999-2001 Marcus Brinkmann + - Copyright (c) 2001,2007 Joey Hess + - Copyright (c) 1994-1999 Ian Jackson + - Copyright (c) 1999 Richard Kettlewell + - Copyright (c) 1999 Ben Collins + - Copyright (c) 1999 Roderick Shertler + - Copyright (c) 1996-1998 Miquel van Smoorenburg + - Copyright (c) 1997-1998 Juho Vuori + - Copyright (c) 1997-1998 Charles Briscoe-Smith + - Copyright (c) 1998 Nils Rennebarth + - Copyright (c) 1998 Juan Cespedes + - Copyright (c) 1998 Jim Van Zandt + - Copyright (c) 1998 Koichi Sekido + - Copyright (c) 1995-1996 Erick Branderhorst + - Copyright (c) 1996 Kim-Minh Kaplan + - Copyright (c) 1996 Klee Dienes + - Copyright (c) 1996 Michael Shields + - Copyright (c) 1995 Bruce Perens + - Copyright (c) 1994 Carl Streeter + - Copyright (c) 1994 Matt Welsh + - Copyright (c) 1994 Ian Murdock + - Copyright (c) 1984-2002 Free Software Foundation, Inc. +holders: + - Frank Lichtenheld + - Guillem Jover + - Raphael Hertzog + - Colin Watson + - Scott James Remnant + - Canonical Ltd. + - Wichert Akkerman + - Marcus Brinkmann + - Joey Hess + - Ian Jackson + - Richard Kettlewell + - Ben Collins + - Roderick Shertler + - Miquel van Smoorenburg + - Juho Vuori + - Charles Briscoe-Smith + - Nils Rennebarth + - Juan Cespedes + - Jim Van Zandt + - Koichi Sekido + - Erick Branderhorst + - Kim-Minh Kaplan + - Klee Dienes + - Michael Shields + - Bruce Perens + - Carl Streeter + - Matt Welsh + - Ian Murdock + - Free Software Foundation, Inc. +authors: + - Colin Plumb diff --git a/tests/cluecode/data/copyright_fossology/testdata95_raw b/tests/cluecode/data/copyright_fossology/testdata95_raw deleted file mode 100644 index e10ffe43b2f..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata95_raw +++ /dev/null @@ -1,53 +0,0 @@ -This is Debian's package maintenance system. - -Copyright (c) 2006-2008 Frank Lichtenheld -Copyright (c) 2006-2008 Guillem Jover -Copyright (c) 2007-2008 Raphael Hertzog -Copyright (c) 2007 Colin Watson -Copyright (c) 2004-2005 Scott James Remnant -Copyright (c) 2004-2005 Canonical Ltd. -Copyright (c) 1999-2002 Wichert Akkerman -Copyright (c) 1999-2001 Marcus Brinkmann -Copyright (c) 2001,2007 Joey Hess -Copyright (c) 1994-1999 Ian Jackson -Copyright (c) 1999 Richard Kettlewell -Copyright (c) 1999 Ben Collins -Copyright (c) 1999 Roderick Shertler -Copyright (c) 1996-1998 Miquel van Smoorenburg -Copyright (c) 1997-1998 Juho Vuori -Copyright (c) 1997-1998 Charles Briscoe-Smith -Copyright (c) 1998 Nils Rennebarth -Copyright (c) 1998 Juan Cespedes -Copyright (c) 1998 Jim Van Zandt -Copyright (c) 1998 Koichi Sekido -Copyright (c) 1995-1996 Erick Branderhorst -Copyright (c) 1996 Kim-Minh Kaplan -Copyright (c) 1996 Klee Dienes -Copyright (c) 1996 Michael Shields -Copyright (c) 1995 Bruce Perens -Copyright (c) 1994 Carl Streeter -Copyright (c) 1994 Matt Welsh -Copyright (c) 1994 Ian Murdock - -Includes public domain MD5 code: - lib/md5.c and lib/md5.h originally written by Colin Plumb, - -Includes code from ‘getopt’ and ‘gettext’: - Copyright (c) 1984-2002 Free Software Foundation, Inc. - - -Licence: - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -On Debian GNU/Linux systems, the complete text of the GNU General Public -License can be found in ‘/usr/share/common-licenses/GPL’ or in the dpkg -source as the file ‘COPYING’ diff --git a/tests/cluecode/data/copyright_fossology/testdata96.yml b/tests/cluecode/data/copyright_fossology/testdata96.yml new file mode 100644 index 00000000000..0b61779611c --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata96.yml @@ -0,0 +1,66 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006-2008 Frank Lichtenheld + - Copyright (c) 2006-2008 Guillem Jover + - Copyright (c) 2007-2008 Raphael Hertzog + - Copyright (c) 2007 Colin Watson + - Copyright (c) 2004-2005 Scott James Remnant + - Copyright (c) 2004-2005 Canonical Ltd. + - Copyright (c) 1999-2002 Wichert Akkerman + - Copyright (c) 1999-2001 Marcus Brinkmann + - Copyright (c) 2001,2007 Joey Hess + - Copyright (c) 1994-1999 Ian Jackson + - Copyright (c) 1999 Richard Kettlewell + - Copyright (c) 1999 Ben Collins + - Copyright (c) 1999 Roderick Shertler + - Copyright (c) 1996-1998 Miquel van Smoorenburg + - Copyright (c) 1997-1998 Juho Vuori + - Copyright (c) 1997-1998 Charles Briscoe-Smith + - Copyright (c) 1998 Nils Rennebarth + - Copyright (c) 1998 Juan Cespedes + - Copyright (c) 1998 Jim Van Zandt + - Copyright (c) 1998 Koichi Sekido + - Copyright (c) 1995-1996 Erick Branderhorst + - Copyright (c) 1996 Kim-Minh Kaplan + - Copyright (c) 1996 Klee Dienes + - Copyright (c) 1996 Michael Shields + - Copyright (c) 1995 Bruce Perens + - Copyright (c) 1994 Carl Streeter + - Copyright (c) 1994 Matt Welsh + - Copyright (c) 1994 Ian Murdock + - Copyright (c) 1984-2002 Free Software Foundation, Inc. +holders: + - Frank Lichtenheld + - Guillem Jover + - Raphael Hertzog + - Colin Watson + - Scott James Remnant + - Canonical Ltd. + - Wichert Akkerman + - Marcus Brinkmann + - Joey Hess + - Ian Jackson + - Richard Kettlewell + - Ben Collins + - Roderick Shertler + - Miquel van Smoorenburg + - Juho Vuori + - Charles Briscoe-Smith + - Nils Rennebarth + - Juan Cespedes + - Jim Van Zandt + - Koichi Sekido + - Erick Branderhorst + - Kim-Minh Kaplan + - Klee Dienes + - Michael Shields + - Bruce Perens + - Carl Streeter + - Matt Welsh + - Ian Murdock + - Free Software Foundation, Inc. +authors: + - Colin Plumb diff --git a/tests/cluecode/data/copyright_fossology/testdata96_raw b/tests/cluecode/data/copyright_fossology/testdata96_raw deleted file mode 100644 index e10ffe43b2f..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata96_raw +++ /dev/null @@ -1,53 +0,0 @@ -This is Debian's package maintenance system. - -Copyright (c) 2006-2008 Frank Lichtenheld -Copyright (c) 2006-2008 Guillem Jover -Copyright (c) 2007-2008 Raphael Hertzog -Copyright (c) 2007 Colin Watson -Copyright (c) 2004-2005 Scott James Remnant -Copyright (c) 2004-2005 Canonical Ltd. -Copyright (c) 1999-2002 Wichert Akkerman -Copyright (c) 1999-2001 Marcus Brinkmann -Copyright (c) 2001,2007 Joey Hess -Copyright (c) 1994-1999 Ian Jackson -Copyright (c) 1999 Richard Kettlewell -Copyright (c) 1999 Ben Collins -Copyright (c) 1999 Roderick Shertler -Copyright (c) 1996-1998 Miquel van Smoorenburg -Copyright (c) 1997-1998 Juho Vuori -Copyright (c) 1997-1998 Charles Briscoe-Smith -Copyright (c) 1998 Nils Rennebarth -Copyright (c) 1998 Juan Cespedes -Copyright (c) 1998 Jim Van Zandt -Copyright (c) 1998 Koichi Sekido -Copyright (c) 1995-1996 Erick Branderhorst -Copyright (c) 1996 Kim-Minh Kaplan -Copyright (c) 1996 Klee Dienes -Copyright (c) 1996 Michael Shields -Copyright (c) 1995 Bruce Perens -Copyright (c) 1994 Carl Streeter -Copyright (c) 1994 Matt Welsh -Copyright (c) 1994 Ian Murdock - -Includes public domain MD5 code: - lib/md5.c and lib/md5.h originally written by Colin Plumb, - -Includes code from ‘getopt’ and ‘gettext’: - Copyright (c) 1984-2002 Free Software Foundation, Inc. - - -Licence: - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -On Debian GNU/Linux systems, the complete text of the GNU General Public -License can be found in ‘/usr/share/common-licenses/GPL’ or in the dpkg -source as the file ‘COPYING’ diff --git a/tests/cluecode/data/copyright_fossology/testdata97.yml b/tests/cluecode/data/copyright_fossology/testdata97.yml new file mode 100644 index 00000000000..f77443a6c6a --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata97.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1993, 1994 Andrew Moore, Talke Studio + - Copyright (c) 2006, 2007 Antonio Diaz Diaz + - Copyright (c) 1997-2007 James Troup + - Copyright (c) 1993, 2006, 2007 Free Software Foundation, Inc. +holders: + - Andrew Moore, Talke Studio + - Antonio Diaz Diaz + - James Troup + - Free Software Foundation, Inc. +authors: + - Matt Kraai diff --git a/tests/cluecode/data/copyright_fossology/testdata97_raw b/tests/cluecode/data/copyright_fossology/testdata97_raw deleted file mode 100644 index 9caac476c8c..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata97_raw +++ /dev/null @@ -1,50 +0,0 @@ -This is Debian GNU's prepackaged version of the FSF's GNU ed -utility. The classic unix line editor, ed is a line-oriented text -editor. It is used to create, display, modify and otherwise -manipulate text files. - -This package was put together by me, James Troup , -from the GNU sources, which I obtained from: - - ftp://ftp.gnu.org/pub/gnu/ed/ed-0.7.tar.bz2 - -The changes were small: - -o adding support for the Debian package maintenance scheme, by adding - various debian/* files. -o buf.c (open_sbuf): use tmpfile() and not mktemp(). -o glbl.c (exec_global), io.c (read_stream, get_stream_line), main.c - (main, exec_command, get_matching_node_addr, strip_escapes), re.c - (get_compiled_pattern), sub.c (extract_subst_template, - substitute_matching_text): parentheses to quiet -Wall. -o ed.1: various fixes by Matt Kraai - -Program Copyright (c) 1993, 1994 Andrew Moore, Talke Studio. - Copyright (c) 2006, 2007 Antonio Diaz Diaz. -Modifications for Debian Copyright (c) 1997-2007 James Troup. - -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 with -your Debian GNU system, in /usr/share/common-licenses/GPL-3, or with -the Debian GNU ed source package as the file COPYING. If not, see -. - -Manual (ed.info) Copyright (c) 1993, 2006, 2007 Free Software Foundation, Inc. - -Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.2 or -any later version published by the Free Software Foundation; with no -Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - -You should have received a copy of the GNU Free Documentation License -with your Debian GNU system, in /usr/share/common-licenses/GFDL-1.2. -If not, see . diff --git a/tests/cluecode/data/copyright_fossology/testdata98.yml b/tests/cluecode/data/copyright_fossology/testdata98.yml new file mode 100644 index 00000000000..99943acc952 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata98.yml @@ -0,0 +1,32 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2003-2004, The ELinks Project + - Copyright (c) 2002-2003, Laurent Monin + - Copyright (c) 2001-2004, Petr Baudis + - Copyright (c) 2000-2001, Kungliga Tekniska Hogskolan + - Copyright (c) 1999-2002, Mikulas Patocka + - Copyright (c) 1996-2000, Michael R. Elkins + - Copyright (c) 1995-2002, Jean-loup Gailly + - Copyright (c) 1995-1997, 2000-2001, Free Software Foundation, Inc. + - Copyright (c) 1995-1999, Cryptography Research, Inc. + - Copyright (c) 1995, Patrick Powell + - Copyright (c) 1999-2007, Peter Gervai + - Copyright (c) 2007-2008, Y Giridhar Appaji Nag +holders: + - The ELinks Project + - Laurent Monin + - Petr Baudis + - Kungliga Tekniska Hogskolan + - Mikulas Patocka + - Michael R. Elkins + - Jean-loup Gailly + - Free Software Foundation, Inc. + - Cryptography Research, Inc. + - Patrick Powell + - Peter Gervai + - Y Giridhar Appaji Nag +authors: + - Peter Gervai diff --git a/tests/cluecode/data/copyright_fossology/testdata98_raw b/tests/cluecode/data/copyright_fossology/testdata98_raw deleted file mode 100644 index 7119fd9e602..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata98_raw +++ /dev/null @@ -1,59 +0,0 @@ -This package was debianized by Peter Gervai on -Mon, 29 Nov 1999 12:16:46 +0100. - -It was downloaded from http://elinks.or.cz/ - -Upstream Authors: - - Jonas Fonseca - José Luis González González - Peter Wang - Petr Baudis - Mikulas Patocka - Miciah Dashiel Butler Masters - Witold Filipczyk - Sergei Borushevsky - Laurent Monin - Karsten Schölzel - Kalle Olavi Niemitalo - Fabio Bonelli - Cliff Cunnington - And may others (See AUTHORS file for complete list) - -Copyright - - Copyright (c) 2003-2004, The ELinks Project - Copyright (c) 2002-2003, Laurent Monin - Copyright (c) 2001-2004, Petr Baudis - Copyright (c) 2000-2001, Kungliga Tekniska Hogskolan - Copyright (c) 1999-2002, Mikulas Patocka - Copyright (c) 1996-2000, Michael R. Elkins - Copyright (c) 1995-2002, Jean-loup Gailly - Copyright (c) 1995-1997, 2000-2001, Free Software Foundation, Inc. - Copyright (c) 1995-1999, Cryptography Research, Inc. - Copyright (c) 1995, Patrick Powell - -License: - - 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; unless explicitly stated otherwise - elsewhere (in the AUTHORS file), only version 2 of the License (not - version 3.x etc.) is the valid version of the GNU General Public - License for ELinks. - - 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 - with the Debian GNU/Linux distribution in the file - /usr/share/common-licenses/GPL-2; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -The Debian packaging is -Copyright (c) 1999-2007, Peter Gervai -Copyright (c) 2007-2008, Y Giridhar Appaji Nag and -is licensed under the GNU GPL, either version 2 of the License, or (at -your option) any later version; see `/usr/share/common-licenses/GPL-2'. diff --git a/tests/cluecode/data/copyright_fossology/testdata99.yml b/tests/cluecode/data/copyright_fossology/testdata99.yml new file mode 100644 index 00000000000..99943acc952 --- /dev/null +++ b/tests/cluecode/data/copyright_fossology/testdata99.yml @@ -0,0 +1,32 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2003-2004, The ELinks Project + - Copyright (c) 2002-2003, Laurent Monin + - Copyright (c) 2001-2004, Petr Baudis + - Copyright (c) 2000-2001, Kungliga Tekniska Hogskolan + - Copyright (c) 1999-2002, Mikulas Patocka + - Copyright (c) 1996-2000, Michael R. Elkins + - Copyright (c) 1995-2002, Jean-loup Gailly + - Copyright (c) 1995-1997, 2000-2001, Free Software Foundation, Inc. + - Copyright (c) 1995-1999, Cryptography Research, Inc. + - Copyright (c) 1995, Patrick Powell + - Copyright (c) 1999-2007, Peter Gervai + - Copyright (c) 2007-2008, Y Giridhar Appaji Nag +holders: + - The ELinks Project + - Laurent Monin + - Petr Baudis + - Kungliga Tekniska Hogskolan + - Mikulas Patocka + - Michael R. Elkins + - Jean-loup Gailly + - Free Software Foundation, Inc. + - Cryptography Research, Inc. + - Patrick Powell + - Peter Gervai + - Y Giridhar Appaji Nag +authors: + - Peter Gervai diff --git a/tests/cluecode/data/copyright_fossology/testdata99_raw b/tests/cluecode/data/copyright_fossology/testdata99_raw deleted file mode 100644 index 7119fd9e602..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata99_raw +++ /dev/null @@ -1,59 +0,0 @@ -This package was debianized by Peter Gervai on -Mon, 29 Nov 1999 12:16:46 +0100. - -It was downloaded from http://elinks.or.cz/ - -Upstream Authors: - - Jonas Fonseca - José Luis González González - Peter Wang - Petr Baudis - Mikulas Patocka - Miciah Dashiel Butler Masters - Witold Filipczyk - Sergei Borushevsky - Laurent Monin - Karsten Schölzel - Kalle Olavi Niemitalo - Fabio Bonelli - Cliff Cunnington - And may others (See AUTHORS file for complete list) - -Copyright - - Copyright (c) 2003-2004, The ELinks Project - Copyright (c) 2002-2003, Laurent Monin - Copyright (c) 2001-2004, Petr Baudis - Copyright (c) 2000-2001, Kungliga Tekniska Hogskolan - Copyright (c) 1999-2002, Mikulas Patocka - Copyright (c) 1996-2000, Michael R. Elkins - Copyright (c) 1995-2002, Jean-loup Gailly - Copyright (c) 1995-1997, 2000-2001, Free Software Foundation, Inc. - Copyright (c) 1995-1999, Cryptography Research, Inc. - Copyright (c) 1995, Patrick Powell - -License: - - 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; unless explicitly stated otherwise - elsewhere (in the AUTHORS file), only version 2 of the License (not - version 3.x etc.) is the valid version of the GNU General Public - License for ELinks. - - 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 - with the Debian GNU/Linux distribution in the file - /usr/share/common-licenses/GPL-2; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - -The Debian packaging is -Copyright (c) 1999-2007, Peter Gervai -Copyright (c) 2007-2008, Y Giridhar Appaji Nag and -is licensed under the GNU GPL, either version 2 of the License, or (at -your option) any later version; see `/usr/share/common-licenses/GPL-2'. diff --git a/tests/cluecode/data/copyright_fossology/testdata9_raw b/tests/cluecode/data/copyright_fossology/testdata9_raw deleted file mode 100644 index eee25b14a8c..00000000000 --- a/tests/cluecode/data/copyright_fossology/testdata9_raw +++ /dev/null @@ -1,188 +0,0 @@ -/* @(#)aiff.c 1.5 01/10/27 Copyright 1998,1999 Heiko Eissfeldt */ -#ifndef lint -static char sccsid[] = -"@(#)aiff.c 1.5 01/10/27 Copyright 1998,1999 Heiko Eissfeldt"; - -#endif -/*** - * CopyPolicy: GNU Public License 2 applies - * Copyright (c) by Heiko Eissfeldt - * - * - * --------------------------------------------------------------------- - * definitions for aiff pcm output - * --------------------------------------------------------------------- - */ - -#include "config.h" -#include -#include -#include -#include -#include -#include "mytype.h" -#include "byteorder.h" -#include "sndfile.h" - -typedef UINT4 FOURCC; /* a four character code */ -typedef struct CHUNKHDR { - FOURCC ckid; /* chunk ID */ - UINT4 dwSize; /* chunk size */ -} CHUNKHDR; - -#define mmioFOURCC(ch0, ch1, ch2, ch3) \ - ((UINT4)(unsigned char)(ch3) | ((UINT4)(unsigned char)(ch2) << 8) | \ - ((UINT4)(unsigned char)(ch1) << 16) | ((UINT4)(unsigned char)(ch0) << 24)) - -#define FOURCC_FORM mmioFOURCC ('F', 'O', 'R', 'M') -#define FOURCC_AIFF mmioFOURCC ('A', 'I', 'F', 'F') -#define FOURCC_COMM mmioFOURCC ('C', 'O', 'M', 'M') -#define FOURCC_SSND mmioFOURCC ('S', 'S', 'N', 'D') - -typedef struct AIFFHDR { - CHUNKHDR formChk; - FOURCC formType; - - CHUNKHDR commChk; /* Common chunk */ - /* from now on, alignment prevents us from using the original types :-(( */ - unsigned char numChannels[2]; /* Audio Channels */ - unsigned char numSampleFrames[4]; /* # of samples */ - unsigned char samplesize[2]; /* bits per sample */ - unsigned char sample_rate[10]; /* sample rate in extended float */ - - unsigned char ssndChkid[4]; /* Sound data chunk */ - unsigned char dwSize[4]; /* size of chunk */ - unsigned char offset[4]; /* start of 1st sample */ - unsigned char blocksize[4]; /* aligned sound data block size */ -} AIFFHDR; - -static AIFFHDR AiffHdr; - -/* format the sample rate into an - bigendian 10-byte IEEE-754 floating point number - */ -static int Format_samplerate __PR((unsigned long rate, unsigned char the_rate[10])); - -static int Format_samplerate(rate, the_rate) - unsigned long rate; - unsigned char the_rate[10]; -{ - int i; - - /* normalize rate */ - for (i = 0; (rate & 0xffff) != 0; rate <<= 1, i++) { - if ((rate & 0x8000) != 0) { - break; - } - } - - /* set exponent and sign */ - the_rate[1] = 14-i; - the_rate[0] = 0x40; /* LSB = sign */ - - /* 16-bit part of mantisse for sample rate */ - the_rate[3] = rate & 0xff; - the_rate[2] = (rate >> 8) & 0xff; - - /* initialize lower digits of mantisse */ - the_rate[4] = the_rate[5] = the_rate[6] = - the_rate[7] = the_rate[8] = the_rate[9] = 0; - - return 0; -} - -static int InitSound __PR(( int audio, long channels, unsigned long rate, long nBitsPerSample, unsigned long expected_bytes )); - -static int InitSound ( audio, channels, rate, nBitsPerSample, expected_bytes) - int audio; - long channels; - unsigned long rate; - long nBitsPerSample; - unsigned long expected_bytes; -{ - UINT4 tmp; - - fillbytes(&AiffHdr, sizeof(AiffHdr), '\0'); - AiffHdr.formChk.ckid = cpu_to_be32(FOURCC_FORM); - AiffHdr.formChk.dwSize= cpu_to_be32(expected_bytes + - offset_of(AIFFHDR,blocksize)+sizeof(AiffHdr.blocksize) - - offsetof(AIFFHDR,formType)); - AiffHdr.formType = cpu_to_be32(FOURCC_AIFF); - - AiffHdr.commChk.ckid = cpu_to_be32(FOURCC_COMM); - AiffHdr.commChk.dwSize= cpu_to_be32(offset_of(AIFFHDR,ssndChkid) - - offset_of(AIFFHDR,numChannels)); - - AiffHdr.numChannels[1]= channels; - tmp = cpu_to_be32(expected_bytes/(channels * (nBitsPerSample/8))); - AiffHdr.numSampleFrames[0] = tmp >> 24; - AiffHdr.numSampleFrames[1] = tmp >> 16; - AiffHdr.numSampleFrames[2] = tmp >> 8; - AiffHdr.numSampleFrames[3] = tmp >> 0; - AiffHdr.samplesize[1] = nBitsPerSample; - Format_samplerate(rate, AiffHdr.sample_rate); - - memcpy(AiffHdr.ssndChkid, "SSND", 4); - tmp = cpu_to_be32(expected_bytes + offset_of(AIFFHDR,blocksize)+sizeof(AiffHdr.blocksize) - offset_of(AIFFHDR, offset)); - AiffHdr.dwSize[0] = tmp >> 24; - AiffHdr.dwSize[1] = tmp >> 16; - AiffHdr.dwSize[2] = tmp >> 8; - AiffHdr.dwSize[3] = tmp >> 0; - - return write (audio, &AiffHdr, sizeof (AiffHdr)); -} - -static int ExitSound __PR(( int audio, unsigned long nBytesDone )); - -static int ExitSound ( audio, nBytesDone ) - int audio; - unsigned long nBytesDone; -{ - UINT4 tmp; - - AiffHdr.formChk.dwSize= cpu_to_be32(nBytesDone + sizeof(AIFFHDR) - - offsetof(AIFFHDR,commChk)); - tmp = cpu_to_be32(nBytesDone/( - AiffHdr.numChannels[1] * AiffHdr.samplesize[1]/ULONG_C(8))); - AiffHdr.numSampleFrames[0] = tmp >> 24; - AiffHdr.numSampleFrames[1] = tmp >> 16; - AiffHdr.numSampleFrames[2] = tmp >> 8; - AiffHdr.numSampleFrames[3] = tmp >> 0; - - /* If an odd number of bytes has been written, - extend the chunk with one dummy byte. This is a requirement for AIFF. */ - if ((nBytesDone & 1) && (lseek(audio, 1L, SEEK_CUR) == -1)) { - return 0; - } - - /* goto beginning */ - if (lseek(audio, 0L, SEEK_SET) == -1) { - return 0; - } - return write (audio, &AiffHdr, sizeof (AiffHdr)); -} - -static unsigned long GetHdrSize __PR(( void )); - -static unsigned long GetHdrSize( ) -{ - return sizeof( AiffHdr ); -} - -static unsigned long InSizeToOutSize __PR(( unsigned long BytesToDo )); - -static unsigned long InSizeToOutSize ( BytesToDo ) - unsigned long BytesToDo; -{ - return BytesToDo; -} - -struct soundfile aiffsound = -{ - InitSound, /* init header method */ - ExitSound, /* exit header method */ - GetHdrSize, /* report header size method */ - (int (*) __PR(( int audio, unsigned char *buf, unsigned long BytesToDo ))) write, /* get sound samples out */ - InSizeToOutSize, /* compressed? output file size */ - 1 /* needs big endian samples */ -}; diff --git a/tests/cluecode/data/copyrights/ChangeLog.other.yml b/tests/cluecode/data/copyrights/ChangeLog.other.yml index da26f73b5dd..7172e21d60d 100644 --- a/tests/cluecode/data/copyrights/ChangeLog.other.yml +++ b/tests/cluecode/data/copyrights/ChangeLog.other.yml @@ -2,3 +2,10 @@ what: - copyrights - holders - holders_summary +copyrights: + - copyright 2008-01-26 11:46 vruppert +holders: + - vruppert +holders_summary: + - value: vruppert + count: 1 diff --git a/tests/cluecode/data/copyrights/abiword_common.copyright.yml b/tests/cluecode/data/copyrights/abiword_common.copyright.yml index ca7817719b3..24b9a7dfbb3 100644 --- a/tests/cluecode/data/copyrights/abiword_common.copyright.yml +++ b/tests/cluecode/data/copyrights/abiword_common.copyright.yml @@ -8,12 +8,12 @@ copyrights: - Copyright (c) 2009 Patrik Fimml holders: - AbiSource, Inc. & Co. - - Masayuki Hatta (mhatta) + - Masayuki Hatta - Patrik Fimml holders_summary: - value: AbiSource, Inc. & Co. count: 1 - - value: Masayuki Hatta (mhatta) + - value: Masayuki Hatta count: 1 - value: Patrik Fimml count: 1 diff --git a/tests/cluecode/data/copyrights/adaptive_v1_0-Adaptive v.0 b/tests/cluecode/data/copyrights/adaptive_v1_0-Adaptive_v.0 similarity index 100% rename from tests/cluecode/data/copyrights/adaptive_v1_0-Adaptive v.0 rename to tests/cluecode/data/copyrights/adaptive_v1_0-Adaptive_v.0 diff --git a/tests/cluecode/data/copyrights/adaptive_v1_0-Adaptive v.0.yml b/tests/cluecode/data/copyrights/adaptive_v1_0-Adaptive_v.0.yml similarity index 100% rename from tests/cluecode/data/copyrights/adaptive_v1_0-Adaptive v.0.yml rename to tests/cluecode/data/copyrights/adaptive_v1_0-Adaptive_v.0.yml diff --git a/tests/cluecode/data/copyrights/afferogplv3-AfferoGPLv.yml b/tests/cluecode/data/copyrights/afferogplv3-AfferoGPLv.yml index 969dd701e0c..7796a83acf7 100644 --- a/tests/cluecode/data/copyrights/afferogplv3-AfferoGPLv.yml +++ b/tests/cluecode/data/copyrights/afferogplv3-AfferoGPLv.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org holders: - Free Software Foundation, Inc. holders_summary: diff --git a/tests/cluecode/data/copyrights/aladdin_free_public_license-Aladdin Free Public License b/tests/cluecode/data/copyrights/aladdin_free_public_license-Aladdin_Free_Public_License similarity index 100% rename from tests/cluecode/data/copyrights/aladdin_free_public_license-Aladdin Free Public License rename to tests/cluecode/data/copyrights/aladdin_free_public_license-Aladdin_Free_Public_License diff --git a/tests/cluecode/data/copyrights/aladdin_free_public_license-Aladdin Free Public License.yml b/tests/cluecode/data/copyrights/aladdin_free_public_license-Aladdin_Free_Public_License.yml similarity index 100% rename from tests/cluecode/data/copyrights/aladdin_free_public_license-Aladdin Free Public License.yml rename to tests/cluecode/data/copyrights/aladdin_free_public_license-Aladdin_Free_Public_License.yml diff --git a/tests/cluecode/data/copyrights/apple_public_source_license_v1_0-Apple Public Source License v.0 b/tests/cluecode/data/copyrights/apple_public_source_license_v1_0-Apple_Public_Source_License_v.0 similarity index 100% rename from tests/cluecode/data/copyrights/apple_public_source_license_v1_0-Apple Public Source License v.0 rename to tests/cluecode/data/copyrights/apple_public_source_license_v1_0-Apple_Public_Source_License_v.0 diff --git a/tests/cluecode/data/copyrights/apple_public_source_license_v1_0-Apple Public Source License v.0.yml b/tests/cluecode/data/copyrights/apple_public_source_license_v1_0-Apple_Public_Source_License_v.0.yml similarity index 100% rename from tests/cluecode/data/copyrights/apple_public_source_license_v1_0-Apple Public Source License v.0.yml rename to tests/cluecode/data/copyrights/apple_public_source_license_v1_0-Apple_Public_Source_License_v.0.yml diff --git a/tests/cluecode/data/copyrights/apple_public_source_license_v1_1-Apple Public Source License v.1 b/tests/cluecode/data/copyrights/apple_public_source_license_v1_1-Apple_Public_Source_License_v.1 similarity index 100% rename from tests/cluecode/data/copyrights/apple_public_source_license_v1_1-Apple Public Source License v.1 rename to tests/cluecode/data/copyrights/apple_public_source_license_v1_1-Apple_Public_Source_License_v.1 diff --git a/tests/cluecode/data/copyrights/apple_public_source_license_v1_1-Apple Public Source License v.1.yml b/tests/cluecode/data/copyrights/apple_public_source_license_v1_1-Apple_Public_Source_License_v.1.yml similarity index 100% rename from tests/cluecode/data/copyrights/apple_public_source_license_v1_1-Apple Public Source License v.1.yml rename to tests/cluecode/data/copyrights/apple_public_source_license_v1_1-Apple_Public_Source_License_v.1.yml diff --git a/tests/cluecode/data/copyrights/apple_public_source_license_v1_2-Apple Public Source License v.2 b/tests/cluecode/data/copyrights/apple_public_source_license_v1_2-Apple_Public_Source_License_v.2 similarity index 100% rename from tests/cluecode/data/copyrights/apple_public_source_license_v1_2-Apple Public Source License v.2 rename to tests/cluecode/data/copyrights/apple_public_source_license_v1_2-Apple_Public_Source_License_v.2 diff --git a/tests/cluecode/data/copyrights/apple_public_source_license_v1_2-Apple Public Source License v.2.yml b/tests/cluecode/data/copyrights/apple_public_source_license_v1_2-Apple_Public_Source_License_v.2.yml similarity index 100% rename from tests/cluecode/data/copyrights/apple_public_source_license_v1_2-Apple Public Source License v.2.yml rename to tests/cluecode/data/copyrights/apple_public_source_license_v1_2-Apple_Public_Source_License_v.2.yml diff --git a/tests/cluecode/data/copyrights/artistic_v1_0-Artistic v.0 b/tests/cluecode/data/copyrights/artistic_v1_0-Artistic_v.0 similarity index 100% rename from tests/cluecode/data/copyrights/artistic_v1_0-Artistic v.0 rename to tests/cluecode/data/copyrights/artistic_v1_0-Artistic_v.0 diff --git a/tests/cluecode/data/copyrights/artistic_v1_0-Artistic v.0.yml b/tests/cluecode/data/copyrights/artistic_v1_0-Artistic_v.0.yml similarity index 100% rename from tests/cluecode/data/copyrights/artistic_v1_0-Artistic v.0.yml rename to tests/cluecode/data/copyrights/artistic_v1_0-Artistic_v.0.yml diff --git a/tests/cluecode/data/copyrights/artistic_v1_0_short-Artistic v_ short.0 short b/tests/cluecode/data/copyrights/artistic_v1_0_short-Artistic_v__short.0_short similarity index 100% rename from tests/cluecode/data/copyrights/artistic_v1_0_short-Artistic v_ short.0 short rename to tests/cluecode/data/copyrights/artistic_v1_0_short-Artistic_v__short.0_short diff --git a/tests/cluecode/data/copyrights/artistic_v1_0_short-Artistic v_ short.0 short.yml b/tests/cluecode/data/copyrights/artistic_v1_0_short-Artistic_v__short.0_short.yml similarity index 100% rename from tests/cluecode/data/copyrights/artistic_v1_0_short-Artistic v_ short.0 short.yml rename to tests/cluecode/data/copyrights/artistic_v1_0_short-Artistic_v__short.0_short.yml diff --git a/tests/cluecode/data/copyrights/artistic_v2_0beta4-Artistic v_beta.0beta4 b/tests/cluecode/data/copyrights/artistic_v2_0beta4-Artistic_v_beta.0beta4 similarity index 100% rename from tests/cluecode/data/copyrights/artistic_v2_0beta4-Artistic v_beta.0beta4 rename to tests/cluecode/data/copyrights/artistic_v2_0beta4-Artistic_v_beta.0beta4 diff --git a/tests/cluecode/data/copyrights/artistic_v2_0beta4-Artistic v_beta.0beta4.yml b/tests/cluecode/data/copyrights/artistic_v2_0beta4-Artistic_v_beta.0beta4.yml similarity index 100% rename from tests/cluecode/data/copyrights/artistic_v2_0beta4-Artistic v_beta.0beta4.yml rename to tests/cluecode/data/copyrights/artistic_v2_0beta4-Artistic_v_beta.0beta4.yml diff --git a/tests/cluecode/data/copyrights/copytest/mixed_years_and_names.txt.yml b/tests/cluecode/data/copyrights/copytest/mixed_years_and_names.txt.yml index 34934510355..43c09f6c9ef 100644 --- a/tests/cluecode/data/copyrights/copytest/mixed_years_and_names.txt.yml +++ b/tests/cluecode/data/copyrights/copytest/mixed_years_and_names.txt.yml @@ -6,9 +6,9 @@ what: copyrights: - Copyright (c) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann holders: - - Nigel McNie, - Benny Baumann + - Nigel McNie, Benny Baumann authors: - Nigel McNie, Benny Baumann holders_summary: - - value: Nigel McNie, - Benny Baumann + - value: Nigel McNie, Benny Baumann count: 1 diff --git a/tests/cluecode/data/copyrights/copytest/mixed_years_no_auth.txt.yml b/tests/cluecode/data/copyrights/copytest/mixed_years_no_auth.txt.yml index 7842d8891a0..d2299d7dda0 100644 --- a/tests/cluecode/data/copyrights/copytest/mixed_years_no_auth.txt.yml +++ b/tests/cluecode/data/copyrights/copytest/mixed_years_no_auth.txt.yml @@ -5,7 +5,7 @@ what: copyrights: - Copyright (c) 2004 - 2007 Nigel McNie, 2007 - 2008 Benny Baumann holders: - - Nigel McNie, - Benny Baumann + - Nigel McNie, Benny Baumann holders_summary: - - value: Nigel McNie, - Benny Baumann + - value: Nigel McNie, Benny Baumann count: 1 diff --git a/tests/cluecode/data/copyrights/copytest/with_format_code.txt.yml b/tests/cluecode/data/copyrights/copytest/with_format_code.txt.yml index a31044bbc2c..a0952a325be 100644 --- a/tests/cluecode/data/copyrights/copytest/with_format_code.txt.yml +++ b/tests/cluecode/data/copyrights/copytest/with_format_code.txt.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) Free Software Foundation, Inc. , 2006 + - Copyright (c) Free Software Foundation, Inc., 2006 holders: - Free Software Foundation, Inc. holders_summary: diff --git a/tests/cluecode/data/copyrights/dual_mpl_gpl-Dual MPL GPL b/tests/cluecode/data/copyrights/dual_mpl_gpl-Dual_MPL_GPL similarity index 100% rename from tests/cluecode/data/copyrights/dual_mpl_gpl-Dual MPL GPL rename to tests/cluecode/data/copyrights/dual_mpl_gpl-Dual_MPL_GPL diff --git a/tests/cluecode/data/copyrights/dual_mpl_gpl-Dual MPL GPL.yml b/tests/cluecode/data/copyrights/dual_mpl_gpl-Dual_MPL_GPL.yml similarity index 100% rename from tests/cluecode/data/copyrights/dual_mpl_gpl-Dual MPL GPL.yml rename to tests/cluecode/data/copyrights/dual_mpl_gpl-Dual_MPL_GPL.yml diff --git a/tests/cluecode/data/copyrights/finnish.c.yml b/tests/cluecode/data/copyrights/finnish.c.yml index d8b659eacfb..d0fa55f44a8 100644 --- a/tests/cluecode/data/copyrights/finnish.c.yml +++ b/tests/cluecode/data/copyrights/finnish.c.yml @@ -3,9 +3,9 @@ what: - holders - holders_summary copyrights: - - (c) 2018 Nordea Bank Abp, Satamaradankatu 5, FI-00020 NORDEA, Helsinki + - (c) 2018 Nordea Bank Abp, Satamaradankatu holders: - - Nordea Bank Abp, Satamaradankatu 5, FI-00020 NORDEA, Helsinki + - Nordea Bank Abp, Satamaradankatu holders_summary: - - value: Nordea Bank Abp, Satamaradankatu 5, FI-00020 NORDEA, Helsinki + - value: Nordea Bank Abp, Satamaradankatu count: 1 diff --git a/tests/cluecode/data/copyrights/gfdlv1_3-GFDLv.3.yml b/tests/cluecode/data/copyrights/gfdlv1_3-GFDLv.3.yml index a7326d5a635..f87599a874e 100644 --- a/tests/cluecode/data/copyrights/gfdlv1_3-GFDLv.3.yml +++ b/tests/cluecode/data/copyrights/gfdlv1_3-GFDLv.3.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + - Copyright (c) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. http://fsf.org holders: - Free Software Foundation, Inc. holders_summary: diff --git a/tests/cluecode/data/copyrights/gpl_v3-GPL_v.yml b/tests/cluecode/data/copyrights/gpl_v3-GPL_v.yml index 969dd701e0c..7796a83acf7 100644 --- a/tests/cluecode/data/copyrights/gpl_v3-GPL_v.yml +++ b/tests/cluecode/data/copyrights/gpl_v3-GPL_v.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org holders: - Free Software Foundation, Inc. holders_summary: diff --git a/tests/cluecode/data/copyrights/html_incorrect-detail_9_html.html.yml b/tests/cluecode/data/copyrights/html_incorrect-detail_9_html.html.yml index 1515ee9e0ae..9b7193b2f7f 100644 --- a/tests/cluecode/data/copyrights/html_incorrect-detail_9_html.html.yml +++ b/tests/cluecode/data/copyrights/html_incorrect-detail_9_html.html.yml @@ -2,5 +2,4 @@ what: - copyrights copyrights: - (c) Oss http://s.pudn.com/upload_log.asp?e - - (c) 2004-2009 http://www.pudn.com/ color red' pudn.com -notes: this is a corner and rare case that's not perfectfor now. +notes: this is a corner and rare case that's not perfect for now. diff --git a/tests/cluecode/data/copyrights/imatix-iMatix.yml b/tests/cluecode/data/copyrights/imatix-iMatix.yml index d30b4d4ebb2..74e15d079af 100644 --- a/tests/cluecode/data/copyrights/imatix-iMatix.yml +++ b/tests/cluecode/data/copyrights/imatix-iMatix.yml @@ -5,7 +5,7 @@ what: copyrights: - Copyright 1991-2000 iMatix Corporation - Copyright 1991-2000 iMatix Corporation - - Copyright 1991-2000 iMatix Corporation + - Copyright 1991-2000 iMatix Corporation http://www.imatix.com - Parts copyright (c) 1991-2000 iMatix Corporation - Copyright 1996-2000 iMatix Corporation holders: diff --git a/tests/cluecode/data/copyrights/lgpl_v3-LGPL_v.yml b/tests/cluecode/data/copyrights/lgpl_v3-LGPL_v.yml index 969dd701e0c..7796a83acf7 100644 --- a/tests/cluecode/data/copyrights/lgpl_v3-LGPL_v.yml +++ b/tests/cluecode/data/copyrights/lgpl_v3-LGPL_v.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org holders: - Free Software Foundation, Inc. holders_summary: diff --git a/tests/cluecode/data/copyrights/libkeyutils1-libkeyutils.label.yml b/tests/cluecode/data/copyrights/libkeyutils1-libkeyutils.label.yml index c560e14dc8f..cabf09da7b6 100644 --- a/tests/cluecode/data/copyrights/libkeyutils1-libkeyutils.label.yml +++ b/tests/cluecode/data/copyrights/libkeyutils1-libkeyutils.label.yml @@ -3,8 +3,8 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2005 Red Hat - - Copyright (c) 2005 Red Hat + - Copyright (c) 2005 Red Hat http://www.redhat.com + - Copyright (c) 2005 Red Hat http://www.redhat.com - Copyright (c) 2006-2009 Daniel Baumann holders: - Red Hat diff --git a/tests/cluecode/data/copyrights/math.c.yml b/tests/cluecode/data/copyrights/math.c.yml index f574844cd5b..bb0ec0b7c1a 100644 --- a/tests/cluecode/data/copyrights/math.c.yml +++ b/tests/cluecode/data/copyrights/math.c.yml @@ -12,16 +12,16 @@ holders: - The Regents of the University of California - Herbert Xu - Aaron Lehmann - - Paul Mundt - - Vladimir Oleynik + - Paul Mundt + - Vladimir Oleynik holders_summary: - value: Aaron Lehmann count: 1 - value: Herbert Xu count: 1 - - value: Paul Mundt + - value: Paul Mundt count: 1 - value: The Regents of the University of California count: 1 - - value: Vladimir Oleynik + - value: Vladimir Oleynik count: 1 diff --git a/tests/cluecode/data/copyrights/misco/no-copyright_usgo.txt.yml b/tests/cluecode/data/copyrights/misco/no-copyright_usgo.txt.yml index bf026eb90fc..6f4bb25e603 100644 --- a/tests/cluecode/data/copyrights/misco/no-copyright_usgo.txt.yml +++ b/tests/cluecode/data/copyrights/misco/no-copyright_usgo.txt.yml @@ -2,3 +2,7 @@ what: - copyrights - authors - holders +copyrights: + - copyright United States Government +holders: + - United States Government diff --git a/tests/cluecode/data/copyrights/misco2/community.txt.yml b/tests/cluecode/data/copyrights/misco2/community.txt.yml index 8f206d8a841..f3e508134de 100644 --- a/tests/cluecode/data/copyrights/misco2/community.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/community.txt.yml @@ -3,4 +3,4 @@ what: - holders - authors authors: - - a community of developers + - community of developers diff --git a/tests/cluecode/data/copyrights/misco2/copyrighted-by-colon.txt.yml b/tests/cluecode/data/copyrights/misco2/copyrighted-by-colon.txt.yml index 594db8ece38..971e15be15a 100644 --- a/tests/cluecode/data/copyrights/misco2/copyrighted-by-colon.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/copyrighted-by-colon.txt.yml @@ -4,7 +4,7 @@ what: - holders_summary - authors copyrights: - - Copyright 2003 Sun Microsystems, Inc. + - Copyright (c) 2003 Sun Microsystems, Inc. holders: - Sun Microsystems, Inc. holders_summary: diff --git a/tests/cluecode/data/copyrights/misco2/copyrighted-complex.txt.yml b/tests/cluecode/data/copyrights/misco2/copyrighted-complex.txt.yml index 13191e53638..e2032d719b3 100644 --- a/tests/cluecode/data/copyrights/misco2/copyrighted-complex.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/copyrighted-complex.txt.yml @@ -4,9 +4,9 @@ what: - holders_summary - authors copyrights: - - copyrighted by http://www.dre.vanderbilt.edu/~schmidt/ Douglas C. Schmidt and his http://www.cs.wustl.edu/~schmidt/ACE-members.html' - research group at http://www.wustl.edu/ Washington University, http://www.uci.edu' University - of California, Irvine, and http://www.vanderbilt.edu' Vanderbilt University, Copyright (c) + - copyrighted by http://www.dre.vanderbilt.edu/~schmidt/ Douglas C. Schmidt and his http://www.cs.wustl.edu/~schmidt/ACE-members.html + research group at http://www.wustl.edu/ Washington University, http://www.uci.edu University + of California, Irvine, and http://www.vanderbilt.edu Vanderbilt University, Copyright (c) 1993-2009 holders: - Douglas C. Schmidt and his research group at Washington University, University of California, diff --git a/tests/cluecode/data/copyrights/misco2/font-awesome.txt.yml b/tests/cluecode/data/copyrights/misco2/font-awesome.txt.yml index c2d2040b3b1..1e432dd9a5c 100644 --- a/tests/cluecode/data/copyrights/misco2/font-awesome.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/font-awesome.txt.yml @@ -4,6 +4,19 @@ what: - holders_summary - authors copyrights: + - Copyright fa-copyright 2020 by the authors - Copyright 2022, LLC + - Copyright glyphicon-copyright-mark http://www.dalegroup.net + - Copyright glyphicon-copyright-mark 1998 - 2014 Rubix holders: + - fa-copyright by the authors - LLC + - glyphicon-copyright-mark + - glyphicon-copyright-mark Rubix +holders_summary: + - value: fa-copyright by the authors + count: 1 + - value: glyphicon-copyright-mark + count: 1 + - value: glyphicon-copyright-mark Rubix + count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/fu.txt.yml b/tests/cluecode/data/copyrights/misco2/fu.txt.yml index 2ed84bb2584..7b41ea92b5b 100644 --- a/tests/cluecode/data/copyrights/misco2/fu.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/fu.txt.yml @@ -4,8 +4,8 @@ what: - holders_summary - authors copyrights: - - Copyright (c) 2021-Present Anthony Fu - - Copyright (c) 2021-Present Matias Capeletto + - Copyright (c) 2021-Present Anthony Fu https://github.com/antfu + - Copyright (c) 2021-Present Matias Capeletto https://github.com/patak-dev holders: - Anthony Fu - Matias Capeletto diff --git a/tests/cluecode/data/copyrights/misco2/html_allright.txt.yml b/tests/cluecode/data/copyrights/misco2/html_allright.txt.yml index 5f1ac6de1a8..3b0a556e962 100644 --- a/tests/cluecode/data/copyrights/misco2/html_allright.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/html_allright.txt.yml @@ -4,4 +4,9 @@ what: - holders_summary - authors copyrights: - - Copyright (c) 2003-2022, a + - Copyright (c) 2003-2022, CKSource Holding sp. z o.o. +holders: + - CKSource Holding sp. z o.o. +holders_summary: + - value: CKSource Holding sp. z o.o. + count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/initial-dev.txt.yml b/tests/cluecode/data/copyrights/misco2/initial-dev.txt.yml index 4e51d367749..d2d767fb096 100644 --- a/tests/cluecode/data/copyrights/misco2/initial-dev.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/initial-dev.txt.yml @@ -3,4 +3,3 @@ what: - holders - holders_summary - authors - diff --git a/tests/cluecode/data/copyrights/misco2/its-authors.txt.yml b/tests/cluecode/data/copyrights/misco2/its-authors.txt.yml index 42392c2268b..72741dc978d 100644 --- a/tests/cluecode/data/copyrights/misco2/its-authors.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/its-authors.txt.yml @@ -10,4 +10,3 @@ holders: holders_summary: - value: its authors count: 1 - diff --git a/tests/cluecode/data/copyrights/misco2/jan-17.txt.yml b/tests/cluecode/data/copyrights/misco2/jan-17.txt.yml index cf329986c01..bda1cb57a55 100644 --- a/tests/cluecode/data/copyrights/misco2/jan-17.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/jan-17.txt.yml @@ -4,4 +4,4 @@ what: - holders_summary - authors authors: - - Bela Ban Jan 17 + - Bela Ban Jan diff --git a/tests/cluecode/data/copyrights/misco2/mmiv.txt.yml b/tests/cluecode/data/copyrights/misco2/mmiv.txt.yml index ff77167cf2d..915b0e157b8 100644 --- a/tests/cluecode/data/copyrights/misco2/mmiv.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/mmiv.txt.yml @@ -4,7 +4,7 @@ what: - holders_summary - authors copyrights: - - Copyright (c) MMIV-MMV Anselm R. Garbe + - Copyright (c) MMIV-MMV Anselm R. Garbe garbeam at gmail dot com holders: - MMIV-MMV Anselm R. Garbe holders_summary: diff --git a/tests/cluecode/data/copyrights/misco2/nick.txt.yml b/tests/cluecode/data/copyrights/misco2/nick.txt.yml index 51c96126686..f2ace8d1fe5 100644 --- a/tests/cluecode/data/copyrights/misco2/nick.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/nick.txt.yml @@ -6,7 +6,7 @@ what: copyrights: - Copyright (c) 2005, 2006 Nick Galbreath - nickg at modp dot com holders: - - Nick Galbreath - nickg at modp dot com + - Nick Galbreath holders_summary: - - value: Nick Galbreath - nickg at modp dot com + - value: Nick Galbreath count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/package-author.json.yml b/tests/cluecode/data/copyrights/misco2/package-author.json.yml index 3ba46e73c1d..3d66d3552f3 100644 --- a/tests/cluecode/data/copyrights/misco2/package-author.json.yml +++ b/tests/cluecode/data/copyrights/misco2/package-author.json.yml @@ -4,4 +4,4 @@ what: - holders_summary - authors authors: - - Chen Fengyuan + - Chen Fengyuan url' https://chenfengyuan.com diff --git a/tests/cluecode/data/copyrights/misco2/portion-copyright.txt.yml b/tests/cluecode/data/copyrights/misco2/portion-copyright.txt.yml index 1522e84b4ed..8ec9d803d17 100644 --- a/tests/cluecode/data/copyrights/misco2/portion-copyright.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/portion-copyright.txt.yml @@ -6,7 +6,7 @@ what: copyrights: - copyrighted by Carl E. Harris, 1993 and 1995 holders: - - Carl E. Harris, + - Carl E. Harris holders_summary: - - value: Carl E. Harris, + - value: Carl E. Harris count: 1 diff --git a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-025.txt.yml b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-025.txt.yml index 81873c68ea5..8b1698590d9 100644 --- a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-025.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-025.txt.yml @@ -4,4 +4,3 @@ what: - authors copyrights: - Copyright (c) 2007 - diff --git a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-036.txt.yml b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-036.txt.yml index ea35bac808b..2ea760bd306 100644 --- a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-036.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-036.txt.yml @@ -3,6 +3,6 @@ what: - holders - authors copyrights: - - Copyright http://www.w3.org/Consortium/Legal/ipr-notice-20000612 Copyright + - copyright http://www.w3.org/Consortium/Legal/ipr-notice-20000612 holders: - http://www.w3.org/Consortium/Legal/ipr-notice-20000612 diff --git a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-082.txt.yml b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-082.txt.yml index bf2c0a4467d..2b4ea2d4553 100644 --- a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-082.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-082.txt.yml @@ -3,6 +3,6 @@ what: - holders - authors copyrights: - - Copyright (c) 2009-2015 Typesafe Inc. + - Copyright (c) 2009-2015 Typesafe Inc. http://www.typesafe.com holders: - Typesafe Inc. diff --git a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-100.txt.yml b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-100.txt.yml index aaa51ec2f79..9f1297f29b5 100644 --- a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-100.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-100.txt.yml @@ -3,6 +3,6 @@ what: - holders - authors copyrights: - - Copyright (c) 2011 hij1nx + - Copyright (c) 2011 hij1nx http://www.twitter.com/hij1nx holders: - hij1nx diff --git a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-117.txt.yml b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-117.txt.yml index 5790ce64620..9cc7f1d3320 100644 --- a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-117.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-117.txt.yml @@ -3,6 +3,6 @@ what: - holders - authors copyrights: - - Copyright (c) 2012-2013 Jared Hanson + - Copyright (c) 2012-2013 Jared Hanson http://jaredhanson.net holders: - Jared Hanson diff --git a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-125.txt.yml b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-125.txt.yml index 65ff4aec405..522f9cdda34 100644 --- a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-125.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-125.txt.yml @@ -3,6 +3,6 @@ what: - holders - authors copyrights: - - Copyright (c) 2013 Jared Hanson < http://jaredhanson.net/ (http://jaredhanson.net/)> + - Copyright (c) 2013 Jared Hanson http://jaredhanson.net/ (http://jaredhanson.net/) holders: - Jared Hanson diff --git a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-156.txt.yml b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-156.txt.yml index b9d66bcce81..9187a8b3672 100644 --- a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-156.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-156.txt.yml @@ -3,6 +3,6 @@ what: - holders - authors copyrights: - - Copyright (c) 2014 Jon Schlinkert + - Copyright (c) 2014 Jon Schlinkert https://github.com/jonschlinkert holders: - Jon Schlinkert diff --git a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-198.txt.yml b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-198.txt.yml index 22eb42f2c2a..345eb066d3d 100644 --- a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-198.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-198.txt.yml @@ -3,6 +3,6 @@ what: - holders - authors copyrights: - - Copyright 2012-2013 The Dojo Foundation + - Copyright 2012-2013 The Dojo Foundation http://dojofoundation.org holders: - The Dojo Foundation diff --git a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-199.txt.yml b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-199.txt.yml index d204e295fe1..18c654d69ed 100644 --- a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-199.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-199.txt.yml @@ -3,6 +3,6 @@ what: - holders - authors copyrights: - - Copyright 2012-2014 The Dojo Foundation + - Copyright 2012-2014 The Dojo Foundation http://dojofoundation.org holders: - The Dojo Foundation diff --git a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-218.txt.yml b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-218.txt.yml index 7c1b845ceac..e692fda28b1 100644 --- a/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-218.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/regexhq/regexhq-218.txt.yml @@ -3,4 +3,4 @@ what: - holders - authors copyrights: - - Copyright (c) 2003-2014 + - (c) 2003-2014 diff --git a/tests/cluecode/data/copyrights/misco2/sp.txt.yml b/tests/cluecode/data/copyrights/misco2/sp.txt.yml index 592b6adfe4c..df880b5a54a 100644 --- a/tests/cluecode/data/copyrights/misco2/sp.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/sp.txt.yml @@ -4,7 +4,7 @@ what: - holders_summary - authors copyrights: - - Copyright (c) 2020 Contributors to the project Clay + - Copyright (c) 2020 Contributors to the project Clay https://github.com/liferay/clay/graphs/contributors holders: - Contributors to the project Clay holders_summary: diff --git a/tests/cluecode/data/copyrights/misco2/spdx-text.txt.yml b/tests/cluecode/data/copyrights/misco2/spdx-text.txt.yml index 2ef8a647598..29d49bae4d5 100644 --- a/tests/cluecode/data/copyrights/misco2/spdx-text.txt.yml +++ b/tests/cluecode/data/copyrights/misco2/spdx-text.txt.yml @@ -4,10 +4,10 @@ what: - holders_summary - authors copyrights: - - Copyright (c) 2020 Liferay, Inc. - - Copyright (c) 2020 Contributors to the project Clay - - Copyright (c) 2019 Twitter, Inc. - - Copyright (c) 2019 The Bootstrap Authors + - Copyright (c) 2020 Liferay, Inc. https://liferay.com + - Copyright (c) 2020 Contributors to the project Clay https://github.com/liferay/clay/graphs/contributors + - Copyright (c) 2019 Twitter, Inc. https://twitter.com + - Copyright (c) 2019 The Bootstrap Authors https://getbootstrap.com holders: - Liferay, Inc. - Contributors to the project Clay diff --git a/tests/cluecode/data/copyrights/misco3/apache-mit-copyright.txt.yml b/tests/cluecode/data/copyrights/misco3/apache-mit-copyright.txt.yml index 72741dc978d..d2d767fb096 100644 --- a/tests/cluecode/data/copyrights/misco3/apache-mit-copyright.txt.yml +++ b/tests/cluecode/data/copyrights/misco3/apache-mit-copyright.txt.yml @@ -3,10 +3,3 @@ what: - holders - holders_summary - authors -copyrights: - - copyright its authors -holders: - - its authors -holders_summary: - - value: its authors - count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/complex-multiline-copyright.txt.yml b/tests/cluecode/data/copyrights/misco3/complex-multiline-copyright.txt.yml index bfb633e3723..ba78ab9dd85 100644 --- a/tests/cluecode/data/copyrights/misco3/complex-multiline-copyright.txt.yml +++ b/tests/cluecode/data/copyrights/misco3/complex-multiline-copyright.txt.yml @@ -4,15 +4,11 @@ what: - holders_summary - authors copyrights: - - Copyright (c) 2016-2020 Alexey Svetliakov , snerks - , Krzysztof Cebula , Vitaliy Polyanskiy - , James Lismore , Stack Builders - , Esteban Ibarra , Dominic Lee - , Dave Vedder , Alec Flett + - Copyright (c) 2016-2020 Alexey Svetliakov https://github.com/asvetliakov , snerks https://github.com/snerks, + Krzysztof Cebula https://github.com/Havret, Vitaliy Polyanskiy https://github.com/alreadyExisted + , James Lismore https://github.com/jlismore holders: - - Alexey Svetliakov , snerks , Krzysztof Cebula , Vitaliy Polyanskiy , James Lismore , Stack - Builders , Esteban Ibarra , Dominic Lee , Dave Vedder , Alec Flett + - Alexey Svetliakov , snerks Krzysztof Cebula Vitaliy Polyanskiy , James Lismore holders_summary: - - value: Alexey Svetliakov , snerks , Krzysztof Cebula , Vitaliy Polyanskiy , James Lismore - , Stack Builders , Esteban Ibarra , Dominic Lee , Dave Vedder , Alec Flett + - value: Alexey Svetliakov , snerks Krzysztof Cebula Vitaliy Polyanskiy , James Lismore count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE.txt.yml b/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE.txt.yml index 53d35a45ac5..5b909aed302 100644 --- a/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE.txt.yml +++ b/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE.txt.yml @@ -5,13 +5,14 @@ what: - authors copyrights: - Copyright (c) 2015-2020 Formidable Labs - - Copyright (c) 2016-2020 Alexey Svetliakov , snerks - , Krzysztof Cebula https://github.com + - Copyright (c) 2016-2020 Alexey Svetliakov https://github.com/asvetliakov , snerks https://github.com/snerks, + Krzysztof Cebula https://github.com Havret, Vitaliy Polyanskiy https://github.com/alreadyExisted, + James Lismore https://github.com/jlismore holders: - Formidable Labs - - Alexey Svetliakov , snerks , Krzysztof Cebula + - Alexey Svetliakov , snerks Krzysztof Cebula Havret, Vitaliy Polyanskiy James Lismore holders_summary: - - value: Alexey Svetliakov , snerks , Krzysztof Cebula + - value: Alexey Svetliakov , snerks Krzysztof Cebula Havret, Vitaliy Polyanskiy James Lismore count: 1 - value: Formidable Labs count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE2.txt.yml b/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE2.txt.yml index 481ca22b771..f2f52d3c235 100644 --- a/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE2.txt.yml +++ b/tests/cluecode/data/copyrights/misco3/intractable-copyright-in-LICENSE2.txt.yml @@ -5,18 +5,14 @@ what: - authors copyrights: - Copyright (c) 2015-2020 Formidable Labs - - Copyright (c) 2016-2020 Alexey Svetliakov , snerks - , Krzysztof Cebula , Vitaliy Polyanskiy - , James Lismore , Stack Builders - , Esteban Ibarra , Dominic Lee - , Dave Vedder , Alec Flett + - Copyright (c) 2016-2020 Alexey Svetliakov https://github.com/asvetliakov , snerks https://github.com/snerks, + Krzysztof Cebula https://github.com/Havret , Vitaliy Polyanskiy https://github.com/alreadyExisted, + James Lismore https://github.com/jlismore holders: - Formidable Labs - - Alexey Svetliakov , snerks , Krzysztof Cebula , Vitaliy Polyanskiy , James Lismore , Stack - Builders , Esteban Ibarra , Dominic Lee , Dave Vedder , Alec Flett + - Alexey Svetliakov , snerks Krzysztof Cebula , Vitaliy Polyanskiy James Lismore holders_summary: - - value: Alexey Svetliakov , snerks , Krzysztof Cebula , Vitaliy Polyanskiy , James Lismore - , Stack Builders , Esteban Ibarra , Dominic Lee , Dave Vedder , Alec Flett + - value: Alexey Svetliakov , snerks Krzysztof Cebula , Vitaliy Polyanskiy James Lismore count: 1 - value: Formidable Labs count: 1 diff --git a/tests/cluecode/data/copyrights/misco3/not-real-copyrights.yml b/tests/cluecode/data/copyrights/misco3/not-real-copyrights.yml index d2d767fb096..ddd387622ac 100644 --- a/tests/cluecode/data/copyrights/misco3/not-real-copyrights.yml +++ b/tests/cluecode/data/copyrights/misco3/not-real-copyrights.yml @@ -3,3 +3,12 @@ what: - holders - holders_summary - authors +copyrights: + - Copyright YEAR United States Government + - Copyright YEAR United States Government +holders: + - United States Government + - United States Government +holders_summary: + - value: United States Government + count: 2 diff --git a/tests/cluecode/data/copyrights/misco4/as-operator.txt b/tests/cluecode/data/copyrights/misco4/as-operator.txt new file mode 100644 index 00000000000..35405b03057 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/as-operator.txt @@ -0,0 +1,3 @@ +developed by the + University of Chicago, as Operator of Argonne National + Laboratory diff --git a/tests/cluecode/data/copyrights/misco4/as-operator.txt.yml b/tests/cluecode/data/copyrights/misco4/as-operator.txt.yml new file mode 100644 index 00000000000..99d10e09585 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/as-operator.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - the University of Chicago, as Operator of Argonne National Laboratory diff --git a/tests/cluecode/data/copyrights/misco4/as-represented.txt b/tests/cluecode/data/copyrights/misco4/as-represented.txt new file mode 100644 index 00000000000..ef4f1299ca2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/as-represented.txt @@ -0,0 +1,2 @@ +Copyright: (c) 2000 United States Government as represented by the + * Secretary of the Navy. All rights reserved. diff --git a/tests/cluecode/data/copyrights/misco4/as-represented.txt.yml b/tests/cluecode/data/copyrights/misco4/as-represented.txt.yml new file mode 100644 index 00000000000..ac916d9803b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/as-represented.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000 United States Government as represented by the Secretary of the Navy +holders: + - United States Government as represented by the Secretary of the Navy diff --git a/tests/cluecode/data/copyrights/misco4/authorship-not-author.txt b/tests/cluecode/data/copyrights/misco4/authorship-not-author.txt new file mode 100644 index 00000000000..0030f9a3209 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/authorship-not-author.txt @@ -0,0 +1 @@ +authorship IETF Trust Legal Provisions Relating to diff --git a/tests/cluecode/data/copyrights/misco4/authorship-not-author.txt.yml b/tests/cluecode/data/copyrights/misco4/authorship-not-author.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/authorship-not-author.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/by-ncsa.txt b/tests/cluecode/data/copyrights/misco4/by-ncsa.txt new file mode 100644 index 00000000000..39dfc5fe90e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/by-ncsa.txt @@ -0,0 +1 @@ +developed by the National Center for Supercomputing Applications at the University of Illinois at Urbana-Champaign diff --git a/tests/cluecode/data/copyrights/misco4/by-ncsa.txt.yml b/tests/cluecode/data/copyrights/misco4/by-ncsa.txt.yml new file mode 100644 index 00000000000..4fcd62a48a2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/by-ncsa.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - the National Center for Supercomputing Applications at the University of Illinois at Urbana-Champaign diff --git a/tests/cluecode/data/copyrights/misco4/co-maintainer.txt b/tests/cluecode/data/copyrights/misco4/co-maintainer.txt new file mode 100644 index 00000000000..091014002da --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/co-maintainer.txt @@ -0,0 +1,11 @@ +Debianized by Norbert Tretkowski 2005-04-16 +New co-maintainer Jeff Bailey 2005-09-05 +New co-maintainer Rob Weir 2005-09-15 +New co-maintainer Andres Salomon 2006-01-24 +New co-maintainer Lars Wirzenius 2006-04-13 +New co-maintainer Adeodato Simó 2006-07-24 +New co-maintainer Wouter van Heyst 2007-01-17 +New co-maintainer Jelmer Vernooij 2008-05-02 + +Maintained by the pkg-bazaar team on alioth since May 2007 + diff --git a/tests/cluecode/data/copyrights/misco4/co-maintainer.txt.yml b/tests/cluecode/data/copyrights/misco4/co-maintainer.txt.yml new file mode 100644 index 00000000000..4e30619c9ad --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/co-maintainer.txt.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +authors: + - Norbert Tretkowski + - Jeff Bailey + - Rob Weir + - Andres Salomon + - Lars Wirzenius + - Adeodato Simo + - Wouter van Heyst + - Jelmer Vernooij + - the pkg-bazaar team diff --git a/tests/cluecode/data/copyrights/misco4/co-maintainer2.txt b/tests/cluecode/data/copyrights/misco4/co-maintainer2.txt new file mode 100644 index 00000000000..63ab26bacb3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/co-maintainer2.txt @@ -0,0 +1 @@ +co-maintainer Wouter van Heyst 2007-01-1 diff --git a/tests/cluecode/data/copyrights/misco4/co-maintainer2.txt.yml b/tests/cluecode/data/copyrights/misco4/co-maintainer2.txt.yml new file mode 100644 index 00000000000..a3e7d251bb3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/co-maintainer2.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - Wouter van Heyst diff --git a/tests/cluecode/data/copyrights/misco4/copyright-suffix.txt b/tests/cluecode/data/copyrights/misco4/copyright-suffix.txt new file mode 100644 index 00000000000..121c320ae42 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/copyright-suffix.txt @@ -0,0 +1,3 @@ +Copyright (c) 2003-2004, The ELinks Project +Copyright (c) 2002-2003, Laurent Monin + diff --git a/tests/cluecode/data/copyrights/misco4/copyright-suffix.txt.yml b/tests/cluecode/data/copyrights/misco4/copyright-suffix.txt.yml new file mode 100644 index 00000000000..321f8b5cedc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/copyright-suffix.txt.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2003-2004, The ELinks Project + - Copyright (c) 2002-2003, Laurent Monin +holders: + - The ELinks Project + - Laurent Monin diff --git a/tests/cluecode/data/copyrights/misco4/debianized-by.txt b/tests/cluecode/data/copyrights/misco4/debianized-by.txt new file mode 100644 index 00000000000..91b4c267fb8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/debianized-by.txt @@ -0,0 +1,3 @@ +This package was debianized by Christian Marillat on +Thu, 5 Jan 2006 21:58:19 +0100. + diff --git a/tests/cluecode/data/copyrights/misco4/debianized-by.txt.yml b/tests/cluecode/data/copyrights/misco4/debianized-by.txt.yml new file mode 100644 index 00000000000..c569083ac9d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/debianized-by.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - Christian Marillat diff --git a/tests/cluecode/data/copyrights/misco4/download-at.txt b/tests/cluecode/data/copyrights/misco4/download-at.txt new file mode 100644 index 00000000000..52465fe2769 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/download-at.txt @@ -0,0 +1,3 @@ +Author: Broadcom Corporation +Download: http://www.broadcom.com/support/802.11/linux_sta.php + diff --git a/tests/cluecode/data/copyrights/misco4/download-at.txt.yml b/tests/cluecode/data/copyrights/misco4/download-at.txt.yml new file mode 100644 index 00000000000..a1164cd579d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/download-at.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - Broadcom Corporation diff --git a/tests/cluecode/data/copyrights/misco4/final-agreement.txt b/tests/cluecode/data/copyrights/misco4/final-agreement.txt new file mode 100644 index 00000000000..a1735ac3769 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/final-agreement.txt @@ -0,0 +1 @@ +if any, created by the Project. The Final Specification itself, i diff --git a/tests/cluecode/data/copyrights/misco4/final-agreement.txt.yml b/tests/cluecode/data/copyrights/misco4/final-agreement.txt.yml new file mode 100644 index 00000000000..29a5664b3c0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/final-agreement.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - the Project diff --git a/tests/cluecode/data/copyrights/misco4/freien.txt b/tests/cluecode/data/copyrights/misco4/freien.txt new file mode 100644 index 00000000000..43ec5ae5e0b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/freien.txt @@ -0,0 +1,5 @@ +Developed and created by Axel Metzger and Till +Jaeger, Institut für Rechtsfragen der Freien und +Open Source Software (Institute for Legal Issues +On Free and Open Source Software), +. diff --git a/tests/cluecode/data/copyrights/misco4/freien.txt.yml b/tests/cluecode/data/copyrights/misco4/freien.txt.yml new file mode 100644 index 00000000000..e95bc927121 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/freien.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - Axel Metzger and Till Jaeger, Institut fur Rechtsfragen der Freien diff --git a/tests/cluecode/data/copyrights/misco4/holders-and-contrib.txt b/tests/cluecode/data/copyrights/misco4/holders-and-contrib.txt new file mode 100644 index 00000000000..f4f95e10340 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/holders-and-contrib.txt @@ -0,0 +1,4 @@ +copyright holders, authors, and contributors + + +copyright holder, author, or contributor diff --git a/tests/cluecode/data/copyrights/misco4/holders-and-contrib.txt.yml b/tests/cluecode/data/copyrights/misco4/holders-and-contrib.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/holders-and-contrib.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/iso-date.txt b/tests/cluecode/data/copyrights/misco4/iso-date.txt new file mode 100644 index 00000000000..6dfa870ddea --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/iso-date.txt @@ -0,0 +1 @@ +Copyright (c) 2006-07-24 John Boolage diff --git a/tests/cluecode/data/copyrights/misco4/iso-date.txt.yml b/tests/cluecode/data/copyrights/misco4/iso-date.txt.yml new file mode 100644 index 00000000000..8243ae2f673 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/iso-date.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006-07-24 John Boolage +holders: + - John Boolage diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-0.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-0.txt new file mode 100644 index 00000000000..c23645fff34 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-0.txt @@ -0,0 +1 @@ +(c), , . Good \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-0.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-0.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-0.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-1.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-1.txt new file mode 100644 index 00000000000..183a0d8da8a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-1.txt @@ -0,0 +1 @@ +(c) ,!C2001|~ao!mx \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-1.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-1.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-1.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-10.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-10.txt new file mode 100644 index 00000000000..755bac0ffd2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-10.txt @@ -0,0 +1 @@ +(c) , cN:'class',bWK:true,e \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-10.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-10.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-10.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-101.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-101.txt new file mode 100644 index 00000000000..157310e61fe --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-101.txt @@ -0,0 +1 @@ +(c) (c) a ! ""|Y $?!!Y """SSSS""SSSS|$?Y PS\00\00\00\00\00O\00\00\00E@oE$o'z@!Cth DTa A Rh \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-101.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-101.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-101.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-102.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-102.txt new file mode 100644 index 00000000000..58be3ffa931 Binary files /dev/null and b/tests/cluecode/data/copyrights/misco4/junk-copyright-102.txt differ diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-102.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-102.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-102.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-105.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-105.txt new file mode 100644 index 00000000000..f71dfb10318 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-105.txt @@ -0,0 +1 @@ +(c) (c) AAeI \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-105.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-105.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-105.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-106.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-106.txt new file mode 100644 index 00000000000..89f5ea69d35 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-106.txt @@ -0,0 +1 @@ +(c) (c) AAIAtBGCg \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-106.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-106.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-106.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-108.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-108.txt new file mode 100644 index 00000000000..0be5ff75847 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-108.txt @@ -0,0 +1 @@ +(c) (c) AAIAtBGCg KEee1QEguEAOCIU1nB \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-108.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-108.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-108.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-109.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-109.txt new file mode 100644 index 00000000000..399e7bd5345 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-109.txt @@ -0,0 +1 @@ +(c) (c) AAIAtBGCgx IATvuK AtBGCgvOiAUB \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-109.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-109.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-109.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-11.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-11.txt new file mode 100644 index 00000000000..46b3d405afc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-11.txt @@ -0,0 +1 @@ +(c) , Row \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-11.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-11.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-11.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-110.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-110.txt new file mode 100644 index 00000000000..31a8171a8c5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-110.txt @@ -0,0 +1 @@ +(c) (c) AEATMI1OeOa12E1CUPA3O OEOOI \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-110.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-110.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-110.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-111.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-111.txt new file mode 100644 index 00000000000..43d4ca192b7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-111.txt @@ -0,0 +1 @@ +TestModeCopyrightLogo title Copyright Logo \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-111.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-111.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-111.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-112.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-112.txt new file mode 100644 index 00000000000..be3f018833f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-112.txt @@ -0,0 +1 @@ +Th +-BIeIP EncthmIc~J2xUZAAE^5!E (c) Nmd \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-112.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-112.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-112.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-113.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-113.txt new file mode 100644 index 00000000000..9d2db1ab72e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-113.txt @@ -0,0 +1 @@ +Th0P gtho, (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-113.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-113.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-113.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-114.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-114.txt new file mode 100644 index 00000000000..26a454a804c Binary files /dev/null and b/tests/cluecode/data/copyrights/misco4/junk-copyright-114.txt differ diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-114.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-114.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-114.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-115.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-115.txt new file mode 100644 index 00000000000..15c99ee3bda --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-115.txt @@ -0,0 +1 @@ +ThY (c) AaeaMOOAA8 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-115.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-115.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-115.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-116.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-116.txt new file mode 100644 index 00000000000..c2d68b48054 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-116.txt @@ -0,0 +1 @@ +TlCaEn34 (c) SROs34EIIGGI1aEB \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-116.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-116.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-116.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-117.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-117.txt new file mode 100644 index 00000000000..a95e596a9ef --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-117.txt @@ -0,0 +1 @@ +U1e (c) IjAx? \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-117.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-117.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-117.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-119.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-119.txt new file mode 100644 index 00000000000..90aad845208 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-119.txt @@ -0,0 +1 @@ +U1noI (c) EEIaeIaAAOAE \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-119.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-119.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-119.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-12.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-12.txt new file mode 100644 index 00000000000..78dcadc2759 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-12.txt @@ -0,0 +1 @@ +(c) , Row(2015, 2015, 2013) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-12.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-12.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-12.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-120.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-120.txt new file mode 100644 index 00000000000..ff4b3526563 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-120.txt @@ -0,0 +1 @@ +U34 (c) OOaUnC \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-120.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-120.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-120.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-121.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-121.txt new file mode 100644 index 00000000000..e2a8eeb5901 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-121.txt @@ -0,0 +1 @@ +U3oOHAU (c) EXauAUuao \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-121.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-121.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-121.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-122.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-122.txt new file mode 100644 index 00000000000..285efa7fc24 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-122.txt @@ -0,0 +1 @@ +UThiP (c) KUeY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-122.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-122.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-122.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-123.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-123.txt new file mode 100644 index 00000000000..cd23a811b85 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-123.txt @@ -0,0 +1 @@ +Uu (c) Py \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-123.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-123.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-123.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-124.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-124.txt new file mode 100644 index 00000000000..d674a527035 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-124.txt @@ -0,0 +1 @@ +UUAoAx1B (c) M3B2z3 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-124.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-124.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-124.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-125.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-125.txt new file mode 100644 index 00000000000..dba8458b53a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-125.txt @@ -0,0 +1 @@ +UVob (c) PS3A2o \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-125.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-125.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-125.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-127.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-127.txt new file mode 100644 index 00000000000..3dca747ad46 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-127.txt @@ -0,0 +1 @@ +VEgieAe a1234A12I (c) AaACEEeUB \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-127.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-127.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-127.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-128.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-128.txt new file mode 100644 index 00000000000..35bebea85be --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-128.txt @@ -0,0 +1 @@ +VTh (c) Pu \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-128.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-128.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-128.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-129.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-129.txt new file mode 100644 index 00000000000..0667a40d0f9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-129.txt @@ -0,0 +1 @@ +VuSS vaa (c) Ac \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-129.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-129.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-129.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-131.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-131.txt new file mode 100644 index 00000000000..81b57451b72 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-131.txt @@ -0,0 +1 @@ +Y2oex (c) A1 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-131.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-131.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-131.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-132.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-132.txt new file mode 100644 index 00000000000..ec126b39642 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-132.txt @@ -0,0 +1 @@ +base about:blank' \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-132.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-132.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-132.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-133.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-133.txt new file mode 100644 index 00000000000..3896e18c4be --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-133.txt @@ -0,0 +1 @@ +(c) zbar' \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-133.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-133.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-133.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-134.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-134.txt new file mode 100644 index 00000000000..0a3ff6cc0c8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-134.txt @@ -0,0 +1 @@ +href http://example.com/foo \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-134.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-134.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-134.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-136.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-136.txt new file mode 100644 index 00000000000..1fc8b135783 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-136.txt @@ -0,0 +1 @@ +copyright attr value \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-136.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-136.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-136.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-14.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-14.txt new file mode 100644 index 00000000000..cc635cfee73 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-14.txt @@ -0,0 +1 @@ +(c) , SemanticDirection.INCOMING, None \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-14.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-14.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-14.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-143.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-143.txt new file mode 100644 index 00000000000..626142ade28 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-143.txt @@ -0,0 +1 @@ +(c) extraPathPercentEncodeSet.has \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-143.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-143.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-143.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-145.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-145.txt new file mode 100644 index 00000000000..70df075b741 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-145.txt @@ -0,0 +1 @@ +copyright a href \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-145.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-145.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-145.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-146.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-146.txt new file mode 100644 index 00000000000..c27f229b59e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-146.txt @@ -0,0 +1 @@ +https://fontawesome.com/license/free \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-146.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-146.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-146.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-147.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-147.txt new file mode 100644 index 00000000000..49af6d65695 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-147.txt @@ -0,0 +1 @@ +(c) Object C \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-147.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-147.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-147.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-148.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-148.txt new file mode 100644 index 00000000000..b142ad24f0b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-148.txt @@ -0,0 +1 @@ +(c) ce', url' http://example \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-148.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-148.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-148.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-15.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-15.txt new file mode 100644 index 00000000000..faa4d0f47a4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-15.txt @@ -0,0 +1 @@ +(c) , True, False \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-15.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-15.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-15.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-150.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-150.txt new file mode 100644 index 00000000000..d0f4a8ab29d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-150.txt @@ -0,0 +1 @@ +(c) (c) example.com/ C2 A9 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-150.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-150.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-150.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-152.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-152.txt new file mode 100644 index 00000000000..3c975f66722 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-152.txt @@ -0,0 +1 @@ +copyright content SSENSE / rel apple-touch-icon http://www.ssense.com/nl/icons/apple-touch-icon.png \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-152.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-152.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-152.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-153.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-153.txt new file mode 100644 index 00000000000..564f473b2a7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-153.txt @@ -0,0 +1 @@ +(c) this.destination.error \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-153.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-153.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-153.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-154.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-154.txt new file mode 100644 index 00000000000..5f814319dad --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-154.txt @@ -0,0 +1 @@ +(c) this.destination.next \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-154.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-154.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-154.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-16.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-16.txt new file mode 100644 index 00000000000..ecf8e38b900 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-16.txt @@ -0,0 +1 @@ +(c) , Updated \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-16.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-16.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-16.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-164.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-164.txt new file mode 100644 index 00000000000..c9bd20ef886 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-164.txt @@ -0,0 +1 @@ +(c) Ka (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-164.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-164.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-164.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-165.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-165.txt new file mode 100644 index 00000000000..a8bf6c77f88 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-165.txt @@ -0,0 +1 @@ +(c) Aa (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-165.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-165.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-165.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-166.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-166.txt new file mode 100644 index 00000000000..5da0d5cd509 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-166.txt @@ -0,0 +1 @@ +(c) Ga (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-166.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-166.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-166.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-167.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-167.txt new file mode 100644 index 00000000000..c9bd20ef886 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-167.txt @@ -0,0 +1 @@ +(c) Ka (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-167.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-167.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-167.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-168.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-168.txt new file mode 100644 index 00000000000..316ca6c14e3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-168.txt @@ -0,0 +1 @@ +(c) Qa (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-168.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-168.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-168.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-169.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-169.txt new file mode 100644 index 00000000000..62ab11a20d1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-169.txt @@ -0,0 +1 @@ +Copyright (xmlns:? ^ ^ ) http://PROJECT_URL_HERE_OR_DELETE_THIS_LINE \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-169.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-169.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-169.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-17.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-17.txt new file mode 100644 index 00000000000..01a30d55c6d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-17.txt @@ -0,0 +1 @@ +(c) , VirtualDiskManager NewVirtualDiskManager \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-17.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-17.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-17.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-170.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-170.txt new file mode 100644 index 00000000000..0444f537e1f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-170.txt @@ -0,0 +1 @@ +Copyright TargetPath IsGlobalProperty \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-170.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-170.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-170.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-176.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-176.txt new file mode 100644 index 00000000000..e719145e6c8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-176.txt @@ -0,0 +1 @@ +(c) a.compatibility.units \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-176.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-176.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-176.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-179.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-179.txt new file mode 100644 index 00000000000..9f37203064a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-179.txt @@ -0,0 +1 @@ +(c) if err p.JoinGroup en0, &net.UDPAddr IP group \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-179.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-179.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-179.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-18.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-18.txt new file mode 100644 index 00000000000..a10addb6fe9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-18.txt @@ -0,0 +1 @@ +(c) !! ! (c) SS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-18.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-18.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-18.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-180.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-180.txt new file mode 100644 index 00000000000..7ce11aa9148 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-180.txt @@ -0,0 +1 @@ +(c) Objc , bp+344 (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-180.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-180.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-180.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-181.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-181.txt new file mode 100644 index 00000000000..dc83cb87b76 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-181.txt @@ -0,0 +1 @@ +(c) Objc , bp+352 (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-181.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-181.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-181.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-182.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-182.txt new file mode 100644 index 00000000000..67d89295ded --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-182.txt @@ -0,0 +1 @@ +(c) Objc , bp+392 (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-182.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-182.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-182.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-183.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-183.txt new file mode 100644 index 00000000000..e202825324c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-183.txt @@ -0,0 +1 @@ +(c) Objc , bp+400 (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-183.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-183.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-183.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-186.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-186.txt new file mode 100644 index 00000000000..8dc4d0527bf --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-186.txt @@ -0,0 +1 @@ +(c) .year(2004).format 'YYYY-MM-DD , 2004-10-04', set from a random day on a leap \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-186.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-186.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-186.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-187.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-187.txt new file mode 100644 index 00000000000..9ee80cb70af --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-187.txt @@ -0,0 +1 @@ +(c) .year(2017).format 'YYYY-MM-DD , 2017-10-04', set from a random day on a leap \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-187.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-187.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-187.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-19.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-19.txt new file mode 100644 index 00000000000..61efd04bd13 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-19.txt @@ -0,0 +1 @@ +(c) !!oAE1/2-P3/41/2'o1/213/4*1/2OUNOUOxOxNOxIAEOUUUUOOOIEAAEOOUUUUUUYYYUUUUUUUUUUUUUUUUUUYYUUUUUUUUI1/2,u+-3!| 2"|SSSSSSSSSS (c) SS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-19.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-19.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-19.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-190.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-190.txt new file mode 100644 index 00000000000..b7235d33a27 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-190.txt @@ -0,0 +1 @@ +(c) assert.equal c.domain, example.com \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-190.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-190.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-190.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-191.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-191.txt new file mode 100644 index 00000000000..49af6d65695 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-191.txt @@ -0,0 +1 @@ +(c) Object C \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-191.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-191.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-191.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-193.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-193.txt new file mode 100644 index 00000000000..1bf1ad69953 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-193.txt @@ -0,0 +1 @@ +(c) E QuGU \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-193.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-193.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-193.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-194.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-194.txt new file mode 100644 index 00000000000..180dafdfd08 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-194.txt @@ -0,0 +1 @@ +(c) ErXA6 (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-194.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-194.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-194.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-197.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-197.txt new file mode 100644 index 00000000000..5fcf6662ccc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-197.txt @@ -0,0 +1 @@ +(c) S QuvPo224iq \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-197.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-197.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-197.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-198.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-198.txt new file mode 100644 index 00000000000..1fca2a6118b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-198.txt @@ -0,0 +1 @@ +(c) SUEPKhV (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-198.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-198.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-198.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-199.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-199.txt new file mode 100644 index 00000000000..0d86c40b99d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-199.txt @@ -0,0 +1 @@ +WOu (c) Yx \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-199.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-199.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-199.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-2.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-2.txt new file mode 100644 index 00000000000..9af6d47628e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-2.txt @@ -0,0 +1 @@ +(c) , // Folded \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-2.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-2.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-2.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-20.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-20.txt new file mode 100644 index 00000000000..3a4d8cbed21 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-20.txt @@ -0,0 +1 @@ +(c) !'oCOOA- !"|SSSS|"a (c) SSSSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-20.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-20.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-20.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-201.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-201.txt new file mode 100644 index 00000000000..3a248f3cf3f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-201.txt @@ -0,0 +1 @@ +Copyright (c) < grunt.template.today 'yyyy > David J. Bradshaw \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-201.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-201.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-201.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-203.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-203.txt new file mode 100644 index 00000000000..7b6af573b1e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-203.txt @@ -0,0 +1 @@ +Copyright (c) < grunt.template.today 'yyyy > Tim Ruffles \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-203.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-203.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-203.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-211.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-211.txt new file mode 100644 index 00000000000..76f648c550b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-211.txt @@ -0,0 +1 @@ +(c) Tj ET Q EMC \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-211.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-211.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-211.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-212.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-212.txt new file mode 100644 index 00000000000..342ba68f004 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-212.txt @@ -0,0 +1 @@ +(c) available from the ASN \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-212.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-212.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-212.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-223.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-223.txt new file mode 100644 index 00000000000..581fd91c25e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-223.txt @@ -0,0 +1 @@ +copyright header of example files e592c53 (https://github.com/http-party/node-http-proxy/commit/e592c53d1a23b7920d603a9e9ac294fc0e841f6d) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-223.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-223.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-223.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-24.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-24.txt new file mode 100644 index 00000000000..be7c0f98479 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-24.txt @@ -0,0 +1 @@ +(c) !(r)E3o$?a3/4C1/4u3o3/4E$?a3/4C1/4u!A a http://ilyagram.org/archives/1683.html \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-24.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-24.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-24.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-247.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-247.txt new file mode 100644 index 00000000000..e8e7aa0be54 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-247.txt @@ -0,0 +1 @@ +(c) cloudtrail-s3-dataevents-enabled (https://docs.aws.amazon.com/config/latest/developerguide/cloudtrail-s3-dataevents-enabled.html) The AWS Account \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-247.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-247.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-247.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-248.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-248.txt new file mode 100644 index 00000000000..e6bf0c42ffd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-248.txt @@ -0,0 +1 @@ +(c) cw-loggroup-retention-period-check (https://docs.aws.amazon.com/config/latest/developerguide/cw-loggroup-retention-period-check.html) CloudWatch LogGroup \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-248.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-248.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-248.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-249.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-249.txt new file mode 100644 index 00000000000..ecf275b38d3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-249.txt @@ -0,0 +1 @@ +(c) guardduty-non-archived-findings (https://docs.aws.amazon.com/config/latest/developerguide/guardduty-non-archived-findings.html) Amazon GuardDuty \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-249.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-249.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-249.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-252.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-252.txt new file mode 100644 index 00000000000..4e3416f8815 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-252.txt @@ -0,0 +1 @@ +(c) vpc-sg-open-only-to-authorized-ports (https://docs.aws.amazon.com/config/latest/developerguide/vpc-sg-open-only-to-authorized-ports.html) The VPC Security Group restricts IPv4 TCP \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-252.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-252.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-252.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-253.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-253.txt new file mode 100644 index 00000000000..0d37bf876ea --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-253.txt @@ -0,0 +1 @@ +(c) IsHighSurrogate (c) IsLowSurrogate (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-253.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-253.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-253.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-257.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-257.txt new file mode 100644 index 00000000000..b8da1cb8d66 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-257.txt @@ -0,0 +1 @@ +(c) (c) ECFieldElement A1 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-257.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-257.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-257.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-258.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-258.txt new file mode 100644 index 00000000000..f98dbc08795 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-258.txt @@ -0,0 +1 @@ +(c) (c) Nat224.IsOne \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-258.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-258.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-258.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-26.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-26.txt new file mode 100644 index 00000000000..1402d036196 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-26.txt @@ -0,0 +1 @@ +(c) !8OSSX!!-deguj 3/4odegEiUD E9!AEukj eB c2SSu u <'Un > JGOI SAo \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-26.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-26.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-26.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-262.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-262.txt new file mode 100644 index 00000000000..044da0d864a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-262.txt @@ -0,0 +1 @@ +Copyright symbol (c) (c) (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-262.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-262.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-262.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-263.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-263.txt new file mode 100644 index 00000000000..9f37203064a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-263.txt @@ -0,0 +1 @@ +(c) if err p.JoinGroup en0, &net.UDPAddr IP group \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-263.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-263.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-263.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-264.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-264.txt new file mode 100644 index 00000000000..d065e838509 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-264.txt @@ -0,0 +1 @@ +(c) Unknown J2 V \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-264.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-264.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-264.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-266.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-266.txt new file mode 100644 index 00000000000..657dc74b38b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-266.txt @@ -0,0 +1 @@ +(c) Unknown Wu \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-266.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-266.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-266.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-269.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-269.txt new file mode 100644 index 00000000000..55d036c5448 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-269.txt @@ -0,0 +1 @@ +(c) expectPrintedTarget t, 2019 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-269.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-269.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-269.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-270.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-270.txt new file mode 100644 index 00000000000..4283275cd14 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-270.txt @@ -0,0 +1 @@ +Pp (c) Ac \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-270.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-270.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-270.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-271.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-271.txt new file mode 100644 index 00000000000..31fbfa6a487 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-271.txt @@ -0,0 +1 @@ +Tv (c) Gn \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-271.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-271.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-271.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-272.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-272.txt new file mode 100644 index 00000000000..5c0c4c89948 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-272.txt @@ -0,0 +1 @@ +(c) Cb (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-272.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-272.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-272.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-273.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-273.txt new file mode 100644 index 00000000000..976540c6472 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-273.txt @@ -0,0 +1 @@ +(c) Ib (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-273.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-273.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-273.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-274.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-274.txt new file mode 100644 index 00000000000..4496a3b8ce7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-274.txt @@ -0,0 +1 @@ +(c) Qb (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-274.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-274.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-274.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-275.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-275.txt new file mode 100644 index 00000000000..3f8456fb602 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-275.txt @@ -0,0 +1 @@ +(c) Ts (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-275.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-275.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-275.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-276.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-276.txt new file mode 100644 index 00000000000..fca12f37fd8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-276.txt @@ -0,0 +1 @@ +(c) Wb (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-276.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-276.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-276.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-277.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-277.txt new file mode 100644 index 00000000000..e9783ba77c0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-277.txt @@ -0,0 +1 @@ +(c) b.status fulfilled b.value \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-277.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-277.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-277.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-279.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-279.txt new file mode 100644 index 00000000000..a5512305102 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-279.txt @@ -0,0 +1 @@ +(c) Eu (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-279.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-279.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-279.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-28.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-28.txt new file mode 100644 index 00000000000..5caad17d0ef --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-28.txt @@ -0,0 +1 @@ +(c) !a(r)2+-'u23+-deg'**Pu3+- (c) SSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-28.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-28.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-28.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-281.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-281.txt new file mode 100644 index 00000000000..3ab1dd521a2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-281.txt @@ -0,0 +1 @@ +Eu (c) Eu (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-281.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-281.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-281.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-283.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-283.txt new file mode 100644 index 00000000000..626142ade28 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-283.txt @@ -0,0 +1 @@ +(c) extraPathPercentEncodeSet.has \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-283.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-283.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-283.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-284.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-284.txt new file mode 100644 index 00000000000..809ad10f72a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-284.txt @@ -0,0 +1 @@ +(c) ,u r(1970) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-284.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-284.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-284.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-285.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-285.txt new file mode 100644 index 00000000000..45574d0ec6b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-285.txt @@ -0,0 +1 @@ +(c) . Registered \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-285.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-285.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-285.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-286.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-286.txt new file mode 100644 index 00000000000..52f8c2a2177 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-286.txt @@ -0,0 +1 @@ +(c) Ne (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-286.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-286.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-286.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-287.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-287.txt new file mode 100644 index 00000000000..3b234be909c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-287.txt @@ -0,0 +1 @@ +(c) Oe (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-287.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-287.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-287.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-288.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-288.txt new file mode 100644 index 00000000000..c0f1bd3dde8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-288.txt @@ -0,0 +1 @@ +(c) Be (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-288.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-288.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-288.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-294.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-294.txt new file mode 100644 index 00000000000..483c9e89588 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-294.txt @@ -0,0 +1 @@ +(c) Bj d Cj \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-294.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-294.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-294.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-295.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-295.txt new file mode 100644 index 00000000000..a10aa5e4a7a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-295.txt @@ -0,0 +1 @@ +(c) Gb (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-295.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-295.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-295.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-296.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-296.txt new file mode 100644 index 00000000000..10d56ef34a5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-296.txt @@ -0,0 +1 @@ +(c) Lb (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-296.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-296.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-296.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-297.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-297.txt new file mode 100644 index 00000000000..6aec46c3215 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-297.txt @@ -0,0 +1 @@ +(c) Os (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-297.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-297.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-297.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-298.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-298.txt new file mode 100644 index 00000000000..bf4749b57ee --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-298.txt @@ -0,0 +1 @@ +(c) Ub (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-298.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-298.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-298.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-299.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-299.txt new file mode 100644 index 00000000000..759efc6addb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-299.txt @@ -0,0 +1 @@ +(c) Zb (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-299.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-299.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-299.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-3.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-3.txt new file mode 100644 index 00000000000..68ca34b1a62 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-3.txt @@ -0,0 +1 @@ +(c), ( ) . Group \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-3.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-3.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-3.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-300.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-300.txt new file mode 100644 index 00000000000..77bfc7e299c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-300.txt @@ -0,0 +1 @@ +(c) h.matches.push \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-300.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-300.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-300.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-302.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-302.txt new file mode 100644 index 00000000000..745ae3e91c7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-302.txt @@ -0,0 +1 @@ +(c) . O \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-302.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-302.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-302.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-304.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-304.txt new file mode 100644 index 00000000000..55d036c5448 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-304.txt @@ -0,0 +1 @@ +(c) expectPrintedTarget t, 2019 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-304.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-304.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-304.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-305.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-305.txt new file mode 100644 index 00000000000..6b33ba214a5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-305.txt @@ -0,0 +1 @@ +(c) ,33 ,BD(b.Xb(c+1),33) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-305.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-305.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-305.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-306.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-306.txt new file mode 100644 index 00000000000..4c4bfb54e9e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-306.txt @@ -0,0 +1 @@ +(c) example.com \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-306.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-306.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-306.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-307.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-307.txt new file mode 100644 index 00000000000..6ae84cf3166 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-307.txt @@ -0,0 +1 @@ +(c) . param TokenType \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-307.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-307.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-307.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-308.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-308.txt new file mode 100644 index 00000000000..4c1e1a7c133 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-308.txt @@ -0,0 +1 @@ +(c) Dj d Ej \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-308.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-308.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-308.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-309.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-309.txt new file mode 100644 index 00000000000..26967c3ae5a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-309.txt @@ -0,0 +1 @@ +(c) Ja (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-309.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-309.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-309.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-310.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-310.txt new file mode 100644 index 00000000000..f569357d544 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-310.txt @@ -0,0 +1 @@ +(c) Jb (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-310.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-310.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-310.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-311.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-311.txt new file mode 100644 index 00000000000..fa232e0341c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-311.txt @@ -0,0 +1 @@ +(c) ECFieldElement A1 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-311.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-311.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-311.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-312.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-312.txt new file mode 100644 index 00000000000..e4ea5e49a2e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-312.txt @@ -0,0 +1 @@ +(c) Nat224.isOne \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-312.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-312.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-312.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-313.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-313.txt new file mode 100644 index 00000000000..4b4ae1dd1a7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-313.txt @@ -0,0 +1 @@ +(c) .length?null:Ke.default.createElement 'div', className:'json-schema-2020-12-keyword json-schema-2020-12-keyword \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-313.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-313.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-313.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-314.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-314.txt new file mode 100644 index 00000000000..8ef2185a703 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-314.txt @@ -0,0 +1 @@ +(c) Unknown Bu \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-314.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-314.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-314.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-315.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-315.txt new file mode 100644 index 00000000000..e6162508269 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-315.txt @@ -0,0 +1 @@ +(c) Unknown Hs \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-315.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-315.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-315.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-316.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-316.txt new file mode 100644 index 00000000000..182b1a57893 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-316.txt @@ -0,0 +1 @@ +(c) Unknown Ws \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-316.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-316.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-316.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-318.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-318.txt new file mode 100644 index 00000000000..a0fb8683b8b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-318.txt @@ -0,0 +1 @@ +(c) Ya (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-318.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-318.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-318.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-319.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-319.txt new file mode 100644 index 00000000000..83827134f56 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-319.txt @@ -0,0 +1 @@ +Vt qt (c) Component \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-319.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-319.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-319.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-32.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-32.txt new file mode 100644 index 00000000000..8628cc2d37a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-32.txt @@ -0,0 +1 @@ +(c) !C/PS|SSa!-2* ?1/2u aa (c) SSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-32.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-32.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-32.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-320.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-320.txt new file mode 100644 index 00000000000..8ef2185a703 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-320.txt @@ -0,0 +1 @@ +(c) Unknown Bu \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-320.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-320.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-320.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-321.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-321.txt new file mode 100644 index 00000000000..e6162508269 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-321.txt @@ -0,0 +1 @@ +(c) Unknown Hs \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-321.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-321.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-321.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-322.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-322.txt new file mode 100644 index 00000000000..182b1a57893 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-322.txt @@ -0,0 +1 @@ +(c) Unknown Ws \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-322.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-322.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-322.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-324.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-324.txt new file mode 100644 index 00000000000..a0fb8683b8b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-324.txt @@ -0,0 +1 @@ +(c) Ya (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-324.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-324.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-324.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-325.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-325.txt new file mode 100644 index 00000000000..83827134f56 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-325.txt @@ -0,0 +1 @@ +Vt qt (c) Component \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-325.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-325.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-325.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-33.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-33.txt new file mode 100644 index 00000000000..d1a7cb1d3df --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-33.txt @@ -0,0 +1 @@ +(c) !deg,*deg+-333'+-deg!!! (c) SS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-33.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-33.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-33.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-331.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-331.txt new file mode 100644 index 00000000000..cf0aeca2210 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-331.txt @@ -0,0 +1 @@ +(c) AIuaey YgO \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-331.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-331.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-331.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-332.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-332.txt new file mode 100644 index 00000000000..6d161ee6216 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-332.txt @@ -0,0 +1 @@ +(c) AS5 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-332.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-332.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-332.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-334.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-334.txt new file mode 100644 index 00000000000..14810e31a24 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-334.txt @@ -0,0 +1 @@ +(c) ATo u008bY BaTae \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-334.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-334.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-334.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-335.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-335.txt new file mode 100644 index 00000000000..55c85378e74 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-335.txt @@ -0,0 +1 @@ +(c) AxF u008fuE Ve3 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-335.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-335.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-335.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-337.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-337.txt new file mode 100644 index 00000000000..30895364bd9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-337.txt @@ -0,0 +1 @@ +(c) U Q3 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-337.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-337.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-337.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-338.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-338.txt new file mode 100644 index 00000000000..c3cca20982f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-338.txt @@ -0,0 +1 @@ +(c) U SoU \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-338.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-338.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-338.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-339.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-339.txt new file mode 100644 index 00000000000..9cc2eb0736e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-339.txt @@ -0,0 +1 @@ +(c) UoS u009fo.yY IZo \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-339.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-339.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-339.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-34.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-34.txt new file mode 100644 index 00000000000..ec80614c442 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-34.txt @@ -0,0 +1 @@ +(c) ! degu-$?"a'deg!-!SS (c) SSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-34.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-34.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-34.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-340.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-340.txt new file mode 100644 index 00000000000..14f2d8fbea2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-340.txt @@ -0,0 +1 @@ +(c) Vo u000eo$a Aoa \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-340.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-340.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-340.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-341.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-341.txt new file mode 100644 index 00000000000..ebfd81fb96a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-341.txt @@ -0,0 +1 @@ +(c) Y Rd \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-341.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-341.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-341.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-342.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-342.txt new file mode 100644 index 00000000000..5c4d3187dc9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-342.txt @@ -0,0 +1 @@ +(c) YY ThQ9SS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-342.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-342.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-342.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-343.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-343.txt new file mode 100644 index 00000000000..ae9562dcd11 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-343.txt @@ -0,0 +1 @@ +(c) ZIgd9 O \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-343.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-343.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-343.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-347.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-347.txt new file mode 100644 index 00000000000..bfc2c25e393 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-347.txt @@ -0,0 +1 @@ +Lp (c) AOTh \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-347.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-347.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-347.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-348.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-348.txt new file mode 100644 index 00000000000..410d9d73c26 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-348.txt @@ -0,0 +1 @@ +PAjO I(r) (c) IPxM \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-348.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-348.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-348.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-349.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-349.txt new file mode 100644 index 00000000000..59928104c12 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-349.txt @@ -0,0 +1 @@ +Ld (c) OCOthDTh \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-349.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-349.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-349.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-35.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-35.txt new file mode 100644 index 00000000000..c7b0dac5bac --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-35.txt @@ -0,0 +1 @@ +(c) !E$?a$?A$?i$?odegaAA OAE$?ss'1$?"$?aIae$?A$?+-$?E!E !!$?E$?a!C/$?a$?A$?i$?o*CoU$?u$?i$?AE$?$?$?e1/4I??$?IAae$?C$?a2 o1/2$?E'O$?1$?e$?a$?I$?I$?a$?A$?i$?o+-oA/$?C$?I$?E$?$?!PSCdeg$?I$??$?a!PS... http://blog.livedoor.jp/safe_food_of_asia \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-35.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-35.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-35.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-350.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-350.txt new file mode 100644 index 00000000000..a89ea13c57c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-350.txt @@ -0,0 +1 @@ +Pne u009d3/4 (c) IoUOi \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-350.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-350.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-350.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-351.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-351.txt new file mode 100644 index 00000000000..bf254a66f5f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-351.txt @@ -0,0 +1 @@ +QxthOthT u008byq (c) OthO \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-351.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-351.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-351.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-353.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-353.txt new file mode 100644 index 00000000000..543f65cdb99 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-353.txt @@ -0,0 +1 @@ +(c) Jj d Kj \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-353.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-353.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-353.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-354.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-354.txt new file mode 100644 index 00000000000..927319a55bd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-354.txt @@ -0,0 +1 @@ +(c) Nb (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-354.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-354.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-354.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-355.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-355.txt new file mode 100644 index 00000000000..30a011eaaf9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-355.txt @@ -0,0 +1 @@ +copyright year 69cbf7a (https://github.com/PrismJS/prism/commit/69cbf7a) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-355.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-355.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-355.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-356.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-356.txt new file mode 100644 index 00000000000..3fc9d439b1c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-356.txt @@ -0,0 +1 @@ +(c) Dean McNamee , 2013. Node \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-356.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-356.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-356.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-361.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-361.txt new file mode 100644 index 00000000000..809ad10f72a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-361.txt @@ -0,0 +1 @@ +(c) ,u r(1970) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-361.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-361.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-361.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-362.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-362.txt new file mode 100644 index 00000000000..6c56ea580af --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-362.txt @@ -0,0 +1 @@ +Copyright (c) < grunt.template.today 'yyyy > The < pkg.title pkg.name > team \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-362.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-362.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-362.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-364.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-364.txt new file mode 100644 index 00000000000..41dff8f6def --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-364.txt @@ -0,0 +1 @@ +Copyright (c) < grunt.template.today 'yyyy > Gias Kay Lee \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-364.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-364.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-364.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-365.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-365.txt new file mode 100644 index 00000000000..4b4ae1dd1a7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-365.txt @@ -0,0 +1 @@ +(c) .length?null:Ke.default.createElement 'div', className:'json-schema-2020-12-keyword json-schema-2020-12-keyword \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-365.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-365.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-365.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-4.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-4.txt new file mode 100644 index 00000000000..cba4f25993c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-4.txt @@ -0,0 +1 @@ +(c) ,(r)1/2o,P1/2o 1/4O*I yA,EAE*A degadegu1ssCY http://critique.or.kr/tt/index.php?pl \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-4.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-4.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-4.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-43.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-43.txt new file mode 100644 index 00000000000..b59e78ff54b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-43.txt @@ -0,0 +1 @@ +(c) ? (MON TUE WED THU FRI SAT SUN)/ MON TUE WED THU FRI SAT \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-43.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-43.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-43.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-45.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-45.txt new file mode 100644 index 00000000000..e8a75177868 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-45.txt @@ -0,0 +1 @@ +(c) ? c.warn Dropping side-effect-free statement file line, col \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-45.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-45.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-45.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-47.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-47.txt new file mode 100644 index 00000000000..45797d134fc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-47.txt @@ -0,0 +1 @@ +(c) ?IPSoODEIOu1/4UOuIThO-AuAPSE1/2 http://blog.westca.com/blog_a/p_full/44725.html \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-47.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-47.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-47.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-48.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-48.txt new file mode 100644 index 00000000000..609990baf7d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-48.txt @@ -0,0 +1 @@ +(c) ?IuAAE1/2aPS!Eu3/4I2 auA3oOaNuuA1/2aUAE!PS ?? http://www.blogbus.com/blogbus/blog/index.php?blogid \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-48.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-48.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-48.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-49.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-49.txt new file mode 100644 index 00000000000..18aa45d19b2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-49.txt @@ -0,0 +1 @@ +(c) / 1965 Y AEY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-49.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-49.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-49.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-5.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-5.txt new file mode 100644 index 00000000000..97175a36a0a Binary files /dev/null and b/tests/cluecode/data/copyrights/misco4/junk-copyright-5.txt differ diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-5.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-5.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-5.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-50.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-50.txt new file mode 100644 index 00000000000..633aef8fcab --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-50.txt @@ -0,0 +1 @@ +(c) / const group \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-50.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-50.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-50.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-51.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-51.txt new file mode 100644 index 00000000000..83f60f8dc79 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-51.txt @@ -0,0 +1 @@ +(c) / const projects \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-51.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-51.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-51.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-53.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-53.txt new file mode 100644 index 00000000000..af3440e90e2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-53.txt @@ -0,0 +1 @@ +(c) ... y-moto http://www.y-moto.com \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-53.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-53.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-53.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-55.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-55.txt new file mode 100644 index 00000000000..8965f6f9e44 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-55.txt @@ -0,0 +1 @@ +(c) .as(c, field.metadata) else col \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-55.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-55.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-55.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-56.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-56.txt new file mode 100644 index 00000000000..19372c16691 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-56.txt @@ -0,0 +1 @@ +(c) .GT. ZERO .AND. ABS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-56.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-56.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-56.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-57.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-57.txt new file mode 100644 index 00000000000..eb88e5c50b7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-57.txt @@ -0,0 +1 @@ +(c) .setResultsName ABC \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-57.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-57.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-57.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-58.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-58.txt new file mode 100644 index 00000000000..db5a00c98e5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-58.txt @@ -0,0 +1 @@ +(c) .year(2004).format 'YYYY-MM-DD, 2004-10-04 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-58.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-58.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-58.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-59.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-59.txt new file mode 100644 index 00000000000..5729ca13ab0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-59.txt @@ -0,0 +1 @@ +(c) .year(2004).format 'YYYY-MM-DD , 2004-10-04 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-59.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-59.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-59.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-6.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-6.txt new file mode 100644 index 00000000000..871325c790e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-6.txt @@ -0,0 +1 @@ +(c) , &crarr , &cup , ¤ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-6.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-6.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-6.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-60.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-60.txt new file mode 100644 index 00000000000..3a2f64a29cc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-60.txt @@ -0,0 +1 @@ +(c) .year(2017).format 'YYYY-MM-DD, 2017-10-04 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-60.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-60.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-60.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-61.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-61.txt new file mode 100644 index 00000000000..8b01ac5fdba --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-61.txt @@ -0,0 +1 @@ +(c) .year(2017).format 'YYYY-MM-DD , 2017-10-04 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-61.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-61.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-61.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-62.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-62.txt new file mode 100644 index 00000000000..9345c7ca1bc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-62.txt @@ -0,0 +1 @@ +(c) """""SS"SSSSSSSSSS||SSSSSSSS" a (c) SSSS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-62.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-62.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-62.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-7.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-7.txt new file mode 100644 index 00000000000..7d5c7ba1c9a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-7.txt @@ -0,0 +1 @@ +(c), bvec3(true) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-7.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-7.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-7.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-72.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-72.txt new file mode 100644 index 00000000000..a8861464ee0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-72.txt @@ -0,0 +1 @@ +(c) "<>-+-deg! (c) PSPSY PSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-72.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-72.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-72.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-74.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-74.txt new file mode 100644 index 00000000000..dbfa2bb9b5c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-74.txt @@ -0,0 +1 @@ +(c) "1 ?12'*1/4AECCAEEIE3/4uu'2-a" (c) PSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-74.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-74.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-74.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-75.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-75.txt new file mode 100644 index 00000000000..b8ee70c5f66 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-75.txt @@ -0,0 +1 @@ +(c) "a! +-,23Pdeg-*+-!a-'+-1/4UYUUUUUIAA'uIYYUYUUUOEAoEUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUOOUUUxOOOOOOOxONOxOOxOOxxxxxOOOOI1/2ACAACAP2- (c) SSSSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-75.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-75.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-75.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-8.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-8.txt new file mode 100644 index 00000000000..ccb68e40caa --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-8.txt @@ -0,0 +1 @@ +(c) , C FROM \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-8.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-8.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-8.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-80.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-80.txt new file mode 100644 index 00000000000..cde8901b062 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-80.txt @@ -0,0 +1 @@ +(c) "aae " (r)aY aa(r)C/ea http://money.rin.ru/content/news/?id \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-80.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-80.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-80.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-83.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-83.txt new file mode 100644 index 00000000000..e29dbd51929 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-83.txt @@ -0,0 +1 @@ +(c) "SS (c) SSSS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-83.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-83.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-83.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-84.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-84.txt new file mode 100644 index 00000000000..21fb89d6865 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-84.txt @@ -0,0 +1 @@ +(c) (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-84.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-84.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-84.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-85.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-85.txt new file mode 100644 index 00000000000..fedcda5692c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-85.txt @@ -0,0 +1 @@ +(c) (c) ,3Ian O3XYUao Ewj34CaoP34Cen \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-85.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-85.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-85.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-86.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-86.txt new file mode 100644 index 00000000000..8eeeaaa4293 Binary files /dev/null and b/tests/cluecode/data/copyrights/misco4/junk-copyright-86.txt differ diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-86.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-86.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-86.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-89.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-89.txt new file mode 100644 index 00000000000..19bc0a0d1be --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-89.txt @@ -0,0 +1 @@ +(c) (c) "PS! uy zw\00\00\00\00\00O\00\00\00E@oE "'z@@ Cd6DTadA Th \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-89.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-89.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-89.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-9.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-9.txt new file mode 100644 index 00000000000..676ebee6402 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-9.txt @@ -0,0 +1 @@ +(c) ,CII1/4'(r)-a1DOA3SS$? 3IOIACECIEIxxOAEu AB@ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-9.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-9.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-9.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-90.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-90.txt new file mode 100644 index 00000000000..7e797ae2b7b Binary files /dev/null and b/tests/cluecode/data/copyrights/misco4/junk-copyright-90.txt differ diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-90.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-90.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-90.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-91.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-91.txt new file mode 100644 index 00000000000..0dfc3dfe885 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-91.txt @@ -0,0 +1 @@ +(c) (c) "PS$?""Y !\00\00\00\00\00O\00\00\00E@oET'z@, CuTDTaA W \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-91.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-91.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-91.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-92.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-92.txt new file mode 100644 index 00000000000..1a35b906419 Binary files /dev/null and b/tests/cluecode/data/copyrights/misco4/junk-copyright-92.txt differ diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-92.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-92.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-92.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-95.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-95.txt new file mode 100644 index 00000000000..07209c3c06a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-95.txt @@ -0,0 +1 @@ +(c) (c) (r)wh^ ^^ZWWUTRPRTSMHFDA < < < > > ?@?@ADGEIIC? < < <@BA??> > ?AGE@CDEJGACDDHPNIIFCFMNNMJEBDD@> > ?@DDDDDGDDMMEIPRPE 7458 BGJIHJKIJKMOPUVVUT ZTMFECAABSsqi \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-95.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-95.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-95.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-96.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-96.txt new file mode 100644 index 00000000000..ae683bb5db5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-96.txt @@ -0,0 +1 @@ +(c) (c) <<<<"PSPS"!deg'*o3/4AACEIEEEAA3/41/21/4o,P'333+--<>?3/4>>o13/4AAAAAAECEEEEIIECEIIIEIIDNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOxxOUOOOOUUOOOOOOOOOOOOxOOxOOOxOOOOODDOOOODNOOOOIIOOONNODINOOOOOOOOOOOOONIEEEEIIIIIEEEIIIIIIIIIIIIIEEEEIIDDDNONDDDNODDOODDIIIIIEEEEEECA>>>>1/2AACA?3/41/2*3P1,>>3/4ACEEEEEII3/4',1/2o! IDDDDDDIDDIEA1degPAINNOOOOOONOOOOOONDEAEAEAIIAEEIEEAAEAu"PS3!$?oAAAAACAAo3+-wj$? P1PAIIAAEIIIIIIEAAou?CAEAEEEAEAACEAAAEAA3/41/21/2 1/4 u3-"i b^Z YSVchhge TTW \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-96.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-96.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-96.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-97.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-97.txt new file mode 100644 index 00000000000..7e0ca3c16b3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-97.txt @@ -0,0 +1 @@ +(c) (c) |$?|Y C/ \00\00\00\00\00O\00\00\00E@oEZO'z@-Co DTasA Wa \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-97.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-97.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-97.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-99.txt b/tests/cluecode/data/copyrights/misco4/junk-copyright-99.txt new file mode 100644 index 00000000000..a893783b4d0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-99.txt @@ -0,0 +1 @@ +(c) (c) 12eUEIiaiAOs3434 CBIj AaenIVbvAInEOs34ETVca \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/junk-copyright-99.txt.yml b/tests/cluecode/data/copyrights/misco4/junk-copyright-99.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/junk-copyright-99.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/arm/SA1100/FreeBird b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/arm/SA1100/FreeBird new file mode 100644 index 00000000000..fbf07d8b3d2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/arm/SA1100/FreeBird @@ -0,0 +1,14 @@ +Freebird-1.1 is produced by Legend(C), Inc. +http://web.archive.org/web/*/http://www.legend.com.cn +and software/linux maintained by Coventive(C), Inc. +(http://www.coventive.com) + +Based on the Nicolas's strongarm kernel tree. + + +Tim wu +CIH +Eric Peng +Jeff Lee +Allen Cheng +Tony Liu \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/arm/SA1100/FreeBird.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/arm/SA1100/FreeBird.yml new file mode 100644 index 00000000000..a53638b2f8b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/arm/SA1100/FreeBird.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c), Inc. http://web.archive.org/web + - (c), Inc. (http://www.coventive.com) +holders: + - Inc. + - Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/blockdev/README.DAC960 b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/blockdev/README.DAC960 new file mode 100644 index 00000000000..dc847052114 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/blockdev/README.DAC960 @@ -0,0 +1,25 @@ +Copyright 1998-2001 by Leonard N. Zubkoff + + +Copyright 1998-1999 by Leonard N. Zubkoff +Configuring Mylex DAC960PRL PCI RAID Controller + Firmware Version: 4.07-0-07, Channels: 1, Memory Size: 16MB + PCI Bus: 1, Device: 4, Function: 1, I/O Address: Unassigned + + +Copyright 1998-1999 by Leonard N. Zubkoff +Configuring Mylex DAC960PJ PCI RAID Controller + Firmware Version: 4.06-0-08, Channels: 3, Memory Size: 8MB + PCI Bus: 0, Device: 19, Function: 1, I/O Address: Unassigned + + +Copyright 1998-1999 by Leonard N. Zubkoff +Configuring Mylex DAC960PJ PCI RAID Controller + Firmware Version: 4.06-0-08, Channels: 3, Memory Size: 8MB + PCI Bus: 0, Device: 19, Function: 1, I/O Address: Unassigned + + +Copyright 1998-1999 by Leonard N. Zubkoff +Configuring Mylex DAC960PJ PCI RAID Controller + Firmware Version: 4.06-0-08, Channels: 3, Memory Size: 8MB + PCI Bus: 0, Device: 19, Function: 1, I/O Address: Unassigned \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/blockdev/README.DAC960.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/blockdev/README.DAC960.yml new file mode 100644 index 00000000000..0257cda0cf4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/blockdev/README.DAC960.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1998-2001 by Leonard N. Zubkoff + - Copyright 1998-1999 by Leonard N. Zubkoff Configuring Mylex + - Copyright 1998-1999 by Leonard N. Zubkoff Configuring Mylex + - Copyright 1998-1999 by Leonard N. Zubkoff Configuring Mylex + - Copyright 1998-1999 by Leonard N. Zubkoff Configuring Mylex +holders: + - Leonard N. Zubkoff + - Leonard N. Zubkoff Configuring Mylex + - Leonard N. Zubkoff Configuring Mylex + - Leonard N. Zubkoff Configuring Mylex + - Leonard N. Zubkoff Configuring Mylex diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/bpf/bpf_devel_QA.rst b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/bpf/bpf_devel_QA.rst new file mode 100644 index 00000000000..15f7be7add2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/bpf/bpf_devel_QA.rst @@ -0,0 +1,6 @@ +the actual commit authors in Cc as well for the report. They can +typically be identified through the kernel's git tree. + + +that the original author did. Thus providing a proper rationale and +describing the use-case for the changes is a must. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/bpf/bpf_devel_QA.rst.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/bpf/bpf_devel_QA.rst.yml new file mode 100644 index 00000000000..f1a9773c69f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/bpf/bpf_devel_QA.rst.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders + - authors +authors: + - in Cc + - did. Thus diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/core-api/librs.rst b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/core-api/librs.rst new file mode 100644 index 00000000000..7759d8e9d72 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/core-api/librs.rst @@ -0,0 +1,11 @@ +The library code for encoding and decoding was written by Phil Karn. + +:: + + Copyright 2002, Phil Karn, KA9Q + May be used under the terms of the GNU General Public License (GPL) + + +The wrapper functions and interfaces are written by Thomas Gleixner. + +Many users have provided bugfixes, improvements and helping hands for \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/core-api/librs.rst.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/core-api/librs.rst.yml new file mode 100644 index 00000000000..031776ddb47 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/core-api/librs.rst.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2002, Phil Karn, KA9Q +holders: + - Phil Karn, KA9Q +authors: + - Phil Karn + - Thomas Gleixner diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/driver-api/soundwire/stream.rst b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/driver-api/soundwire/stream.rst new file mode 100644 index 00000000000..be176b74d14 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/driver-api/soundwire/stream.rst @@ -0,0 +1 @@ +stream states maintained by the Bus for each of the audio stream. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/driver-api/soundwire/stream.rst.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/driver-api/soundwire/stream.rst.yml new file mode 100644 index 00000000000..1727787ee73 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/driver-api/soundwire/stream.rst.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - the Bus diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/filesystems/ext4/index.rst b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/filesystems/ext4/index.rst new file mode 100644 index 00000000000..4dbdfb0520d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/filesystems/ext4/index.rst @@ -0,0 +1 @@ +artifacts writen by ext4. More documentation diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/filesystems/ext4/index.rst.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/filesystems/ext4/index.rst.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/filesystems/ext4/index.rst.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/hwmon/w83781d b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/hwmon/w83781d new file mode 100644 index 00000000000..51e2c3ec3db --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/hwmon/w83781d @@ -0,0 +1,10 @@ +Authors: + Frodo Looijaard , + Philip Edelbrock , + Mark Studebaker + +Module parameters + + +Please do not send mail to the author or the sensors group asking for +a datasheet or ideas on how to convince Asus. We can't help. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/hwmon/w83781d.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/hwmon/w83781d.yml new file mode 100644 index 00000000000..242fe4d1f40 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/hwmon/w83781d.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +authors: + - Frodo Looijaard , Philip Edelbrock , Mark Studebaker + + - the sensors group diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/networking/arcnet-hardware.txt b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/networking/arcnet-hardware.txt new file mode 100644 index 00000000000..e9365bdd6e7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/networking/arcnet-hardware.txt @@ -0,0 +1,46 @@ +Waterloo? (C)1985 Waterloo Micro. 8 + No Name -- 8/16 + No Name Taiwan R.O.C? 8 + + + - PC110 settings were verified by Stephen A. Wood + - Also, the JP- and S-numbers probably don't match your card exactly. Try + to find jumpers/switches with the same number of settings - it's + + +This description has been written by Juergen Seifert +using information from the following Original SMC Manual + + +This description has been written by Juergen Seifert +using information from the following Original SMC Manual + + +This description has been written by Juergen Seifert +using information from the following Original CNet Manual + + +This description has been written by Juergen Seifert +using information from the following Original CNet Manual + + +8-bit card (C) 1985 +------------------- + - from Robert Michael Best + + +C2 -- "@Copyright + Waterloo Microsystems Inc. + 1985" + In a chip Socket with info printed on a label covering a round window + showing the circuit inside. (The window indicates it is an EPROM chip.) + + +This description has been written by Juergen Seifert +using information from the Original + "ARCnet Installation Manual" + + +This description has been written by Juergen Seifert +using information from the Original + "ARCnet Installation Manual" \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/networking/arcnet-hardware.txt.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/networking/arcnet-hardware.txt.yml new file mode 100644 index 00000000000..870e5f0d3d3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/networking/arcnet-hardware.txt.yml @@ -0,0 +1,19 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 1985 Waterloo Micro + - (c) 1985 + - Copyright Waterloo Microsystems Inc. 1985 +holders: + - Waterloo Micro + - Waterloo Microsystems Inc. +authors: + - Stephen A. Wood + - Juergen Seifert + - Juergen Seifert + - Juergen Seifert + - Juergen Seifert + - Juergen Seifert + - Juergen Seifert diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/networking/ip-sysctl.txt b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/networking/ip-sysctl.txt new file mode 100644 index 00000000000..244357daf0f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/networking/ip-sysctl.txt @@ -0,0 +1,3 @@ +(c) PAWS (Protection Against Wrapped Sequence numbers) check failure + + This can help mitigate simple "ack loop" DoS attacks, wherein \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/networking/ip-sysctl.txt.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/networking/ip-sysctl.txt.yml new file mode 100644 index 00000000000..cae8a641136 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/networking/ip-sysctl.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) PAWS Protection Against Wrapped Sequence +holders: + - PAWS Protection Against Wrapped Sequence diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/powerpc/hvcs.txt b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/powerpc/hvcs.txt new file mode 100644 index 00000000000..69f3b463494 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/powerpc/hvcs.txt @@ -0,0 +1,12 @@ +Copyright (C) 2004 IBM Corporation + +=========================================================================== + + + Author(s) : Ryan S. Arnold + Date Created: March, 02, 2004 + Last Changed: August, 24, 2004 + + +address that is created by firmware. An example vty-server sysfs entry +looks like the following: \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/powerpc/hvcs.txt.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/powerpc/hvcs.txt.yml new file mode 100644 index 00000000000..db8dabb9e86 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/powerpc/hvcs.txt.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2004 IBM Corporation +holders: + - IBM Corporation +authors: + - Ryan S. Arnold + - firmware. An diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/s390/Debugging390.txt b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/s390/Debugging390.txt new file mode 100644 index 00000000000..f5e785d4872 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/s390/Debugging390.txt @@ -0,0 +1,15 @@ +Copyright (C) 2000-2001 IBM Deutschland Entwicklung GmbH, IBM Corporation + Best viewed with fixed width fonts + +Overview of Document: + + + * Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com) + * (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation. + */ +#include + + +Copyright 1998 Free Software Foundation, Inc. +GDB is free software, covered by the GNU General Public License, and you are +welcome to change it and/or distribute copies of it under certain conditions. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/s390/Debugging390.txt.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/s390/Debugging390.txt.yml new file mode 100644 index 00000000000..13751f0fe39 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/s390/Debugging390.txt.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000-2001 IBM Deutschland Entwicklung GmbH, IBM Corporation Best + - (c) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation + - Copyright 1998 Free Software Foundation, Inc. +holders: + - IBM Deutschland Entwicklung GmbH, IBM Corporation Best + - IBM Deutschland Entwicklung GmbH, IBM Corporation + - Free Software Foundation, Inc. +authors: + - Denis Joseph Barrow diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/sound/cards/mixart.rst b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/sound/cards/mixart.rst new file mode 100644 index 00000000000..9a738c3526d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/sound/cards/mixart.rst @@ -0,0 +1,5 @@ +The firmware files are copyright by Digigram SA + + +Copyright (c) 2003 Digigram SA +Distributable under GPL. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/sound/cards/mixart.rst.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/sound/cards/mixart.rst.yml new file mode 100644 index 00000000000..1dfe462d74e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/Documentation/sound/cards/mixart.rst.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyright by Digigram SA + - Copyright (c) 2003 Digigram SA Distributable +holders: + - Digigram SA + - Digigram SA Distributable diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/alpha/include/asm/floppy.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/alpha/include/asm/floppy.h new file mode 100644 index 00000000000..c6e3439ecc0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/alpha/include/asm/floppy.h @@ -0,0 +1,4 @@ +* Copyright (C) 1995 + */ +#ifndef __ASM_ALPHA_FLOPPY_H +#define __ASM_ALPHA_FLOPPY_H \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/alpha/include/asm/floppy.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/alpha/include/asm/floppy.h.yml new file mode 100644 index 00000000000..c58dab9ed05 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/alpha/include/asm/floppy.h.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1995 diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/alpha/kernel/sys_eiger.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/alpha/kernel/sys_eiger.c new file mode 100644 index 00000000000..97846860a07 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/alpha/kernel/sys_eiger.c @@ -0,0 +1 @@ + Copyright (C) 1999 Iain Grant diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/alpha/kernel/sys_eiger.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/alpha/kernel/sys_eiger.c.yml new file mode 100644 index 00000000000..64b0c7f04b7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/alpha/kernel/sys_eiger.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999 Iain Grant +holders: + - Iain Grant diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/at91-gatwick.dts b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/at91-gatwick.dts new file mode 100644 index 00000000000..a14b3b657ab --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/at91-gatwick.dts @@ -0,0 +1,3 @@ +* Copyright (C) 2018 Laird + * + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/at91-gatwick.dts.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/at91-gatwick.dts.yml new file mode 100644 index 00000000000..ef42b1cf499 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/at91-gatwick.dts.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2018 Laird +holders: + - Laird diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/axm5516-amarillo.dts b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/axm5516-amarillo.dts new file mode 100644 index 00000000000..48329e00e72 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/axm5516-amarillo.dts @@ -0,0 +1 @@ +* Copyright (C) 2013 LSI diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/axm5516-amarillo.dts.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/axm5516-amarillo.dts.yml new file mode 100644 index 00000000000..3a1d820eddc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/axm5516-amarillo.dts.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2013 LSI +holders: + - LSI diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/dra76x-mmc-iodelay.dtsi b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/dra76x-mmc-iodelay.dtsi new file mode 100644 index 00000000000..456277e0a8a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/dra76x-mmc-iodelay.dtsi @@ -0,0 +1,5 @@ +// Copyright (c) 2018 Texas Instruments +// MMC IOdelay values for TI's DRA76x and AM576x SoCs. +// Author: Sekhar Nori + +/* \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/dra76x-mmc-iodelay.dtsi.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/dra76x-mmc-iodelay.dtsi.yml new file mode 100644 index 00000000000..33bbabdf8a9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/dra76x-mmc-iodelay.dtsi.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2018 Texas Instruments +holders: + - Texas Instruments +authors: + - Sekhar Nori diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/imx31-bug.dts b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/imx31-bug.dts new file mode 100644 index 00000000000..1925d5e949c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/imx31-bug.dts @@ -0,0 +1,3 @@ +* Copyright 2012 Denis 'GNUtoo' Carikli + * + * The code contained herein is licensed under the GNU General Public \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/imx31-bug.dts.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/imx31-bug.dts.yml new file mode 100644 index 00000000000..020031f573b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/imx31-bug.dts.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2012 Denis GNUtoo Carikli +holders: + - Denis GNUtoo Carikli diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/socfpga.dtsi b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/socfpga.dtsi new file mode 100644 index 00000000000..8e065576edf --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/socfpga.dtsi @@ -0,0 +1 @@ +* Copyright (C) 2012 Altera diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/socfpga.dtsi.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/socfpga.dtsi.yml new file mode 100644 index 00000000000..74cb4a400f8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/boot/dts/socfpga.dtsi.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2012 Altera +holders: + - Altera diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/kernel/sys_arm.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/kernel/sys_arm.c new file mode 100644 index 00000000000..12b7246d159 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/kernel/sys_arm.c @@ -0,0 +1,4 @@ +* Copyright (C) People who wrote linux/arch/i386/kernel/sys_i386.c + * Copyright (C) 1995, 1996 Russell King. + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/kernel/sys_arm.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/kernel/sys_arm.c.yml new file mode 100644 index 00000000000..e4d0fb2a6d8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/kernel/sys_arm.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) People + - Copyright (c) 1995, 1996 Russell King +holders: + - People + - Russell King diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-imx/mach-bug.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-imx/mach-bug.c new file mode 100644 index 00000000000..52628d9f7f2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-imx/mach-bug.c @@ -0,0 +1,6 @@ +* Copyright (C) 2000 Deep Blue Solutions Ltd + * Copyright (C) 2002 Shane Nay (shane@minirl.com) + * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2011 Denis 'GNUtoo' Carikli + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-imx/mach-bug.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-imx/mach-bug.c.yml new file mode 100644 index 00000000000..99680374350 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-imx/mach-bug.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000 Deep Blue Solutions Ltd + - Copyright (c) 2002 Shane Nay (shane@minirl.com) + - Copyright 2005-2007 Freescale Semiconductor, Inc. + - Copyright 2011 Denis GNUtoo Carikli +holders: + - Deep Blue Solutions Ltd + - Shane Nay + - Freescale Semiconductor, Inc. + - Denis GNUtoo Carikli diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap1/time.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap1/time.c new file mode 100644 index 00000000000..fc9638948c5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap1/time.c @@ -0,0 +1,9 @@ +Copyright (C) 2004 Nokia Corporation +Partial timer rewrite and additional dynamic tick timer support by +Tony Lindgen and +Tuukka Tikkanen + +MPU timer code based on the older MPU timer code for OMAP +Copyright (C) 2000 RidgeRun, Inc. +Author: Greg Lonnon + diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap1/time.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap1/time.c.yml new file mode 100644 index 00000000000..a9a942ca492 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap1/time.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2004 Nokia Corporation + - Copyright (c) 2000 RidgeRun, Inc. +holders: + - Nokia Corporation + - RidgeRun, Inc. +authors: + - Greg Lonnon diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap1/timer32k.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap1/timer32k.c new file mode 100644 index 00000000000..33ba809c73b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap1/timer32k.c @@ -0,0 +1,10 @@ +* Copyright (C) 2004 - 2005 Nokia Corporation + * Partial timer rewrite and additional dynamic tick timer support by + * Tony Lindgen and + * Tuukka Tikkanen + + + * Copyright (C) 2000 RidgeRun, Inc. + * Author: Greg Lonnon + * + * This program is free software; you can redistribute it and/or modify it \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap1/timer32k.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap1/timer32k.c.yml new file mode 100644 index 00000000000..de7c299484b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap1/timer32k.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2004 - 2005 Nokia Corporation + - Copyright (c) 2000 RidgeRun, Inc. +holders: + - Nokia Corporation + - RidgeRun, Inc. +authors: + - Greg Lonnon diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap2/sleep24xx.S b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap2/sleep24xx.S new file mode 100644 index 00000000000..2387cdbe474 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap2/sleep24xx.S @@ -0,0 +1,8 @@ +* (C) Copyright 2004 + * Texas Instruments, + * Richard Woodruff + * + * (C) Copyright 2006 Nokia Corporation + * Fixed idle loop sleep + * Igor Stoppa + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap2/sleep24xx.S.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap2/sleep24xx.S.yml new file mode 100644 index 00000000000..f2c40cf02d2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-omap2/sleep24xx.S.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Copyright 2004 Texas Instruments, Richard Woodruff + - (c) Copyright 2006 Nokia Corporation +holders: + - Texas Instruments, Richard Woodruff + - Nokia Corporation diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-pxa/stargate2.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-pxa/stargate2.c new file mode 100644 index 00000000000..7fa1fc671b4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-pxa/stargate2.c @@ -0,0 +1,5 @@ +* Author: Ed C. Epp + * Created: Nov 05, 2002 + * Copyright: Intel Corp. + * + * Modified 2009: Jonathan Cameron \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-pxa/stargate2.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-pxa/stargate2.c.yml new file mode 100644 index 00000000000..dc3780426c7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-pxa/stargate2.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright Intel Corp. +holders: + - Intel Corp. +authors: + - Ed C. Epp diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-s3c24xx/sleep-s3c2410.S b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-s3c24xx/sleep-s3c2410.S new file mode 100644 index 00000000000..a732458a57d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-s3c24xx/sleep-s3c2410.S @@ -0,0 +1,2 @@ + * Nicolas Pitre, (c) 2002 Monta Vista Software Inc + * Cliff Brake, (c) 2001 diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-s3c24xx/sleep-s3c2410.S.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-s3c24xx/sleep-s3c2410.S.yml new file mode 100644 index 00000000000..a6f36a13a3f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-s3c24xx/sleep-s3c2410.S.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2002 Monta Vista Software Inc Cliff Brake + - (c) 2001 +holders: + - Monta Vista Software Inc Cliff Brake diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-s3c24xx/sleep.S b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-s3c24xx/sleep.S new file mode 100644 index 00000000000..1f9b815ff1c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-s3c24xx/sleep.S @@ -0,0 +1,2 @@ +* Copyright (c) 2004 Simtec Electronics + * Ben Dooks diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-s3c24xx/sleep.S.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-s3c24xx/sleep.S.yml new file mode 100644 index 00000000000..5cabd917f18 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-s3c24xx/sleep.S.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2004 Simtec Electronics Ben Dooks +holders: + - Simtec Electronics Ben Dooks diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-sunxi/headsmp.S b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-sunxi/headsmp.S new file mode 100644 index 00000000000..5f4e0b26c73 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-sunxi/headsmp.S @@ -0,0 +1,4 @@ +* Copyright (c) 2018 Chen-Yu Tsai + * Copyright (c) 2018 Bootlin + * + * Chen-Yu Tsai \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-sunxi/headsmp.S.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-sunxi/headsmp.S.yml new file mode 100644 index 00000000000..a9ffa5d64fe --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-sunxi/headsmp.S.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2018 Chen-Yu Tsai + - Copyright (c) 2018 Bootlin +holders: + - Chen-Yu Tsai + - Bootlin diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-tegra/platsmp.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-tegra/platsmp.c new file mode 100644 index 00000000000..dd0cc185a89 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-tegra/platsmp.c @@ -0,0 +1,6 @@ +* Copyright (C) 2002 ARM Ltd. + * All Rights Reserved + * + * Copyright (C) 2009 Palm + * All Rights Reserved + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-tegra/platsmp.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-tegra/platsmp.c.yml new file mode 100644 index 00000000000..bbbab2d5893 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/mach-tegra/platsmp.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2002 ARM Ltd. + - Copyright (c) 2009 Palm +holders: + - ARM Ltd. + - Palm diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/nwfpe/double_cpdo.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/nwfpe/double_cpdo.c new file mode 100644 index 00000000000..e68dadf7115 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/nwfpe/double_cpdo.c @@ -0,0 +1,5 @@ +(c) Rebel.COM, 1998,1999 + + Direct questions, comments to Scott Bambrough + + This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/nwfpe/double_cpdo.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/nwfpe/double_cpdo.c.yml new file mode 100644 index 00000000000..f255e023fec --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm/nwfpe/double_cpdo.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Rebel.COM, 1998,1999 +holders: + - Rebel.COM diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts new file mode 100644 index 00000000000..6d4caf4308e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts @@ -0,0 +1,4 @@ +* Copyright (c) 2017 BayLibre, SAS. + * Author: Neil Armstrong + * Copyright (c) 2017 Oleg + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts.yml new file mode 100644 index 00000000000..f0e40a58cba --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm64/boot/dts/amlogic/meson-gxm-vega-s96.dts.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2017 BayLibre, SAS. + - Copyright (c) 2017 Oleg +holders: + - BayLibre, SAS. + - Oleg +authors: + - Neil Armstrong diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm64/kernel/sys_compat.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm64/kernel/sys_compat.c new file mode 100644 index 00000000000..07393575585 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm64/kernel/sys_compat.c @@ -0,0 +1,5 @@ +* Copyright (C) People who wrote linux/arch/i386/kernel/sys_i386.c + * Copyright (C) 1995, 1996 Russell King. + * Copyright (C) 2012 ARM Ltd. + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm64/kernel/sys_compat.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm64/kernel/sys_compat.c.yml new file mode 100644 index 00000000000..703697e6f05 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/arm64/kernel/sys_compat.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) People + - Copyright (c) 1995, 1996 Russell King + - Copyright (c) 2012 ARM Ltd. +holders: + - People + - Russell King + - ARM Ltd. diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/ia64/kernel/ivt.S b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/ia64/kernel/ivt.S new file mode 100644 index 00000000000..8012a888711 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/ia64/kernel/ivt.S @@ -0,0 +1,18 @@ +* Copyright (C) 1998-2001, 2003, 2005 Hewlett-Packard Co + * Stephane Eranian + * David Mosberger + * Copyright (C) 2000, 2002-2003 Intel Co + * Asit Mallick + * Suresh Siddha + * Kenneth Chen + * Fenghua Yu + * + * 00/08/23 Asit Mallick TLB handling for SMP + + + * Copyright (C) 2005 Hewlett-Packard Co + * Dan Magenheimer + * Xen paravirtualization + * Copyright (c) 2008 Isaku Yamahata + * VA Linux Systems Japan K.K. + * pv_ops. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/ia64/kernel/ivt.S.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/ia64/kernel/ivt.S.yml new file mode 100644 index 00000000000..6dd3d8cd245 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/ia64/kernel/ivt.S.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998-2001, 2003, 2005 Hewlett-Packard Co Stephane Eranian + David Mosberger + - Copyright (c) 2000, 2002-2003 Intel Co Asit Mallick Suresh Siddha + Kenneth Chen Fenghua Yu + - Copyright (c) 2005 Hewlett-Packard Co Dan Magenheimer Xen + - Copyright (c) 2008 Isaku Yamahata +holders: + - Hewlett-Packard Co Stephane Eranian David Mosberger + - Intel Co Asit Mallick Suresh Siddha Kenneth Chen Fenghua Yu + - Hewlett-Packard Co Dan Magenheimer Xen + - Isaku Yamahata diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/ia64/kernel/ptrace.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/ia64/kernel/ptrace.c new file mode 100644 index 00000000000..74bb1bceabb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/ia64/kernel/ptrace.c @@ -0,0 +1,7 @@ +* Copyright (C) 1999-2005 Hewlett-Packard Co + * David Mosberger-Tang + * Copyright (C) 2006 Intel Co + * 2006-08-12 - IA64 Native Utrace implementation support added by + * Anil S Keshavamurthy + * + * Derived from the x86 and Alpha versions. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/ia64/kernel/ptrace.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/ia64/kernel/ptrace.c.yml new file mode 100644 index 00000000000..dd1a6343004 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/ia64/kernel/ptrace.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999-2005 Hewlett-Packard Co David Mosberger-Tang + - Copyright (c) 2006 Intel Co 2006-08-12 - IA64 Native Utrace +holders: + - Hewlett-Packard Co David Mosberger-Tang + - Intel Co IA64 Native Utrace +authors: + - Anil S Keshavamurthy diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/m68k/include/asm/floppy.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/m68k/include/asm/floppy.h new file mode 100644 index 00000000000..d53a92a25ff --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/m68k/include/asm/floppy.h @@ -0,0 +1,5 @@ +* Copyright (C) 1999, 2000, 2001 + * + * Sun3x support added 2/4/2000 Sam Creasey (sammy@sammy.net) + * + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/m68k/include/asm/floppy.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/m68k/include/asm/floppy.h.yml new file mode 100644 index 00000000000..5770a6163d7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/m68k/include/asm/floppy.h.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999, 2000, 2001 diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/include/asm/fixmap.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/include/asm/fixmap.h new file mode 100644 index 00000000000..44ea81788fe --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/include/asm/fixmap.h @@ -0,0 +1,9 @@ +* Copyright (C) 1998 Ingo Molnar + * + * Copyright 2008 Freescale Semiconductor Inc. + * Port to powerpc added by Kumar Gala + * + * Copyright 2011 Michal Simek + * Copyright 2011 PetaLogix Qld Pty Ltd + * Port to Microblaze + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/include/asm/fixmap.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/include/asm/fixmap.h.yml new file mode 100644 index 00000000000..36e1b2a8e34 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/include/asm/fixmap.h.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998 Ingo Molnar + - Copyright 2008 Freescale Semiconductor Inc. + - Copyright 2011 Michal Simek + - Copyright 2011 PetaLogix Qld Pty Ltd +holders: + - Ingo Molnar + - Freescale Semiconductor Inc. + - Michal Simek + - PetaLogix Qld Pty Ltd diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/lib/fastcopy.S b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/lib/fastcopy.S new file mode 100644 index 00000000000..740a2d57732 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/lib/fastcopy.S @@ -0,0 +1,5 @@ +* Copyright (C) 2008-2009 Michal Simek + * Copyright (C) 2008-2009 PetaLogix + * Copyright (C) 2008 Jim Law - Iris LP All rights reserved. + * + * This file is subject to the terms and conditions of the GNU General \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/lib/fastcopy.S.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/lib/fastcopy.S.yml new file mode 100644 index 00000000000..1e32ec4ac7b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/lib/fastcopy.S.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008-2009 Michal Simek + - Copyright (c) 2008-2009 PetaLogix + - Copyright (c) 2008 Jim Law - Iris LP +holders: + - Michal Simek + - PetaLogix + - Jim Law - Iris LP diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/lib/memcpy.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/lib/memcpy.c new file mode 100644 index 00000000000..9a799cdda87 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/lib/memcpy.c @@ -0,0 +1,17 @@ +* Copyright (C) 2008-2009 Michal Simek + * Copyright (C) 2008-2009 PetaLogix + * Copyright (C) 2007 John Williams + * + * Reasonably optimised generic C-code for memcpy on Microblaze + + + * It is based on demo code originally Copyright 2001 by Intel Corp, taken from + * http://www.embedded.com/showArticle.jhtml?articleID=19205567 + * + * Attempts were made, unsuccessfully, to contact the original + + + * This software has been developed by Intel Corporation. + * Intel specifically disclaims all warranties, express or + * implied, and all liability, including consequential and + * other indirect damages, for the use of this program, including \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/lib/memcpy.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/lib/memcpy.c.yml new file mode 100644 index 00000000000..9685660c8a1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/microblaze/lib/memcpy.c.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008-2009 Michal Simek + - Copyright (c) 2008-2009 PetaLogix + - Copyright (c) 2007 John Williams + - Copyright 2001 by Intel Corp, taken from http://www.embedded.com/showArticle.jhtml?articleID +holders: + - Michal Simek + - PetaLogix + - John Williams + - Intel Corp, +authors: + - Intel Corporation. Intel diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/loongson64/common/cmdline.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/loongson64/common/cmdline.c new file mode 100644 index 00000000000..6dc1698438b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/loongson64/common/cmdline.c @@ -0,0 +1 @@ + * Copyright 2003 ICT CAS diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/loongson64/common/cmdline.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/loongson64/common/cmdline.c.yml new file mode 100644 index 00000000000..3af7df74b38 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/loongson64/common/cmdline.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2003 ICT CAS +holders: + - ICT CAS diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/loongson64/common/env.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/loongson64/common/env.c new file mode 100644 index 00000000000..ea1895a9f0d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/loongson64/common/env.c @@ -0,0 +1,13 @@ +* Copyright 2001 MontaVista Software Inc. + * Author: jsun@mvista.com or jsun@junsun.net + * + * Copyright 2003 ICT CAS + * Author: Michael Guo + * + * Copyright (C) 2007 Lemote Inc. & Institute of Computing Technology + * Author: Fuxin Zhang, zhangfx@lemote.com + * + * Copyright (C) 2009 Lemote Inc. + * Author: Wu Zhangjin, wuzhangjin@gmail.com + * + * This program is free software; you can redistribute it and/or modify it \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/loongson64/common/env.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/loongson64/common/env.c.yml new file mode 100644 index 00000000000..b20091e4cfb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/loongson64/common/env.c.yml @@ -0,0 +1,19 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2001 MontaVista Software Inc. + - Copyright 2003 ICT CAS + - Copyright (c) 2007 Lemote Inc. & Institute of Computing Technology + - Copyright (c) 2009 Lemote Inc. +holders: + - MontaVista Software Inc. + - ICT CAS + - Lemote Inc. & Institute of Computing Technology + - Lemote Inc. +authors: + - jsun@mvista.com or jsun@junsun.net + - Michael Guo + - Fuxin Zhang, zhangfx@lemote.com + - Wu Zhangjin diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/mm/cex-oct.S b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/mm/cex-oct.S new file mode 100644 index 00000000000..59ea77d820d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/mm/cex-oct.S @@ -0,0 +1,3 @@ +* Copyright (C) 2006 Cavium Networks + * Cache error handler + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/mm/cex-oct.S.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/mm/cex-oct.S.yml new file mode 100644 index 00000000000..563d8cdbff1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/mips/mm/cex-oct.S.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006 Cavium Networks Cache +holders: + - Cavium Networks Cache diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/nios2/include/asm/uaccess.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/nios2/include/asm/uaccess.h new file mode 100644 index 00000000000..24bd8dca6b5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/nios2/include/asm/uaccess.h @@ -0,0 +1,5 @@ +* Copyright (C) 2010-2011, Tobias Klauser + * Copyright (C) 2009, Wind River Systems Inc + * Implemented by fredrik.markstrom@gmail.com and ivarholmqvist@gmail.com + * + * This file is subject to the terms and conditions of the GNU General Public \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/nios2/include/asm/uaccess.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/nios2/include/asm/uaccess.h.yml new file mode 100644 index 00000000000..6757dce79ef --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/nios2/include/asm/uaccess.h.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2010-2011, Tobias Klauser + - Copyright (c) 2009, Wind River Systems Inc Implemented +holders: + - Tobias Klauser + - Wind River Systems Inc Implemented +authors: + - fredrik.markstrom@gmail.com diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/parisc/kernel/inventory.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/parisc/kernel/inventory.c new file mode 100644 index 00000000000..f6b263b2f8b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/parisc/kernel/inventory.c @@ -0,0 +1,4 @@ +* Copyright (c) 1999 The Puffin Group (David Kennedy and Alex deVries) + * Copyright (c) 2001 Matthew Wilcox for Hewlett-Packard + * + * These are the routines to discover what hardware exists in this box. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/parisc/kernel/inventory.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/parisc/kernel/inventory.c.yml new file mode 100644 index 00000000000..924e941300c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/parisc/kernel/inventory.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999 The Puffin Group David Kennedy and Alex + - Copyright (c) 2001 Matthew Wilcox +holders: + - The Puffin Group David Kennedy and Alex + - Matthew Wilcox diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/parisc/kernel/pacache.S b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/parisc/kernel/pacache.S new file mode 100644 index 00000000000..9572d184165 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/parisc/kernel/pacache.S @@ -0,0 +1,5 @@ +* Copyright (C) 2000-2001 Hewlett-Packard (John Marvin) + * Copyright (C) 2001 Matthew Wilcox (willy at parisc-linux.org) + * Copyright (C) 2002 Richard Hirst (rhirst with parisc-linux.org) + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/parisc/kernel/pacache.S.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/parisc/kernel/pacache.S.yml new file mode 100644 index 00000000000..705eab0b456 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/parisc/kernel/pacache.S.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000-2001 Hewlett-Packard (John Marvin) + - Copyright (c) 2001 Matthew Wilcox (willy at parisc-linux.org) + - Copyright (c) 2002 Richard Hirst (rhirst with parisc-linux.org) +holders: + - Hewlett-Packard (John Marvin) + - Matthew Wilcox willy at + - Richard Hirst rhirst with diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/boot/rs6000.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/boot/rs6000.h new file mode 100644 index 00000000000..a22fae29361 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/boot/rs6000.h @@ -0,0 +1,4 @@ +Copyright (C) 1990, 1991 Free Software Foundation, Inc. + FIXME: Can someone provide a transliteration of this name into ASCII? + Using the following chars caused a compiler warning on HIUX (so I replaced + them with octal escapes), and isn't useful without an understanding of what \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/boot/rs6000.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/boot/rs6000.h.yml new file mode 100644 index 00000000000..619af420503 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/boot/rs6000.h.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1990, 1991 Free Software Foundation, Inc. FIXME Can +holders: + - Free Software Foundation, Inc. FIXME Can diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/fixmap.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/fixmap.h new file mode 100644 index 00000000000..fa799211e97 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/fixmap.h @@ -0,0 +1,5 @@ +* Copyright (C) 1998 Ingo Molnar + * + * Copyright 2008 Freescale Semiconductor Inc. + * Port to powerpc added by Kumar Gala + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/fixmap.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/fixmap.h.yml new file mode 100644 index 00000000000..62670fc1c06 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/fixmap.h.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998 Ingo Molnar + - Copyright 2008 Freescale Semiconductor Inc. +holders: + - Ingo Molnar + - Freescale Semiconductor Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/floppy.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/floppy.h new file mode 100644 index 00000000000..850ddf292b8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/floppy.h @@ -0,0 +1,5 @@ +* Copyright (C) 1995 + */ +#ifndef __ASM_POWERPC_FLOPPY_H +#define __ASM_POWERPC_FLOPPY_H +#ifdef __KERNEL__ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/floppy.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/floppy.h.yml new file mode 100644 index 00000000000..c58dab9ed05 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/floppy.h.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1995 diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/kgdb.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/kgdb.h new file mode 100644 index 00000000000..0db59ff610b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/kgdb.h @@ -0,0 +1,14 @@ +* copyrights: + * + * PPC64 Mods (C) 2005 Frank Rowand (frowand@mvista.com) + * PPC Mods (C) 2004 Tom Rini (trini@mvista.com) + * PPC Mods (C) 2003 John Whitney (john.whitney@timesys.com) + * PPC Mods (C) 1998 Michael Tesch (tesch@cs.wisc.edu) + * + * + * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) + * Author: Tom Rini + * + * 2006 (c) MontaVista Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/kgdb.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/kgdb.h.yml new file mode 100644 index 00000000000..f2b3c6983f8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/include/asm/kgdb.h.yml @@ -0,0 +1,22 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyrights PPC64 Mods + - (c) 2005 Frank Rowand (frowand@mvista.com) PPC Mods + - (c) 2004 Tom Rini (trini@mvista.com) PPC Mods + - (c) 2003 John Whitney (john.whitney@timesys.com) PPC Mods + - (c) 1998 Michael Tesch (tesch@cs.wisc.edu) + - Copyright (c) 1995 David S. Miller (davem@caip.rutgers.edu) + - (c) MontaVista Software, Inc. +holders: + - PPC64 Mods + - Frank Rowand PPC Mods + - Tom Rini PPC Mods + - John Whitney PPC Mods + - Michael Tesch + - David S. Miller + - MontaVista Software, Inc. +authors: + - Tom Rini diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/4xx/ocm.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/4xx/ocm.c new file mode 100644 index 00000000000..499448bc099 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/4xx/ocm.c @@ -0,0 +1,9 @@ +* (C) Copyright 2009, Applied Micro Circuits Corporation + * Victor Gallardo (vgallardo@amcc.com) + * + * See file CREDITS for list of people who contributed to this + + + seq_printf(m, "MemTotal(C) : %d Bytes\n", ocm->c.memtotal); + + seq_printf(m, "\n"); \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/4xx/ocm.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/4xx/ocm.c.yml new file mode 100644 index 00000000000..69489597bd5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/4xx/ocm.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Copyright 2009, Applied Micro Circuits Corporation Victor Gallardo (vgallardo@amcc.com) + - MemTotal (c) Bytes +holders: + - Applied Micro Circuits Corporation Victor Gallardo + - MemTotal Bytes diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/Makefile b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/Makefile new file mode 100644 index 00000000000..0f72c7c3f3a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/Makefile @@ -0,0 +1,4 @@ +echo " * $*_dump.h: Copyright (C) 2005 IBM." ; \ + echo " * Hex-dump auto generated from $*.c." ; \ + echo " * Do not edit!" ; \ + echo " */" ; \ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/Makefile.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/Makefile.yml new file mode 100644 index 00000000000..78a2818064a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/Makefile.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005 IBM echo Hex-dump +holders: + - IBM echo Hex-dump diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/spu_restore.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/spu_restore.c new file mode 100644 index 00000000000..73e643981d7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/spu_restore.c @@ -0,0 +1,8 @@ +* (C) Copyright IBM Corp. 2005 + * + * SPU-side context restore sequence outlined in + * Synergistic Processor Element Book IV + * + * Author: Mark Nutter + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/spu_restore.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/spu_restore.c.yml new file mode 100644 index 00000000000..53b63b1ddce --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/spu_restore.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Copyright IBM Corp. 2005 SPU-side +holders: + - IBM Corp. SPU-side +authors: + - Mark Nutter diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/spu_save.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/spu_save.c new file mode 100644 index 00000000000..ad814a4da11 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/spu_save.c @@ -0,0 +1,8 @@ +* (C) Copyright IBM Corp. 2005 + * + * SPU-side context save sequence outlined in + * Synergistic Processor Element Book IV + * + * Author: Mark Nutter + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/spu_save.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/spu_save.c.yml new file mode 100644 index 00000000000..53b63b1ddce --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/platforms/cell/spufs/spu_save.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Copyright IBM Corp. 2005 SPU-side +holders: + - IBM Corp. SPU-side +authors: + - Mark Nutter diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/sysdev/pmi.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/sysdev/pmi.c new file mode 100644 index 00000000000..7b199bf17a3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/sysdev/pmi.c @@ -0,0 +1,9 @@ +* (C) Copyright IBM Deutschland Entwicklung GmbH 2005 + * + * PMI (Platform Management Interrupt) is a way to communicate + * with the BMC (Baseboard Management Controller) via interrupts. + * Unlike IPMI it is bidirectional and has a low latency. + + * Author: Christian Krafft + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/sysdev/pmi.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/sysdev/pmi.c.yml new file mode 100644 index 00000000000..684d06b45b1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/powerpc/sysdev/pmi.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Copyright IBM Deutschland Entwicklung GmbH 2005 PMI (Platform Management Interrupt) +holders: + - IBM Deutschland Entwicklung GmbH PMI (Platform Management Interrupt) +authors: + - Christian Krafft diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/asm/idals.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/asm/idals.h new file mode 100644 index 00000000000..b6107610bb6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/asm/idals.h @@ -0,0 +1,5 @@ +* Copyright IBM Corp. 2000 + * + * History of changes + * 07/24/00 new file + * 05/04/02 code restructuring. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/asm/idals.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/asm/idals.h.yml new file mode 100644 index 00000000000..f3294e4d3c9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/asm/idals.h.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright IBM Corp. 2000 History +holders: + - IBM Corp. History diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/asm/vtimer.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/asm/vtimer.h new file mode 100644 index 00000000000..c37ea250ad6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/asm/vtimer.h @@ -0,0 +1,5 @@ +* Copyright IBM Corp. 2003, 2012 + * Virtual CPU timer + * + * Author(s): Jan Glauber + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/asm/vtimer.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/asm/vtimer.h.yml new file mode 100644 index 00000000000..90daee1abd3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/asm/vtimer.h.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright IBM Corp. 2003, 2012 Virtual CPU +holders: + - IBM Corp. Virtual CPU +authors: + - Jan Glauber diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/uapi/asm/monwriter.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/uapi/asm/monwriter.h new file mode 100644 index 00000000000..877d81ae3db --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/uapi/asm/monwriter.h @@ -0,0 +1,6 @@ +* Copyright IBM Corp. 2006 + * Character device driver for writing z/VM APPLDATA monitor records + * Version 1.0 + * Author(s): Melissa Howland + * + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/uapi/asm/monwriter.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/uapi/asm/monwriter.h.yml new file mode 100644 index 00000000000..a1762353416 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/include/uapi/asm/monwriter.h.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright IBM Corp. 2006 Character +holders: + - IBM Corp. Character +authors: + - Melissa Howland diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/mm/page-states.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/mm/page-states.c new file mode 100644 index 00000000000..39290571079 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/mm/page-states.c @@ -0,0 +1,6 @@ +* Copyright IBM Corp. 2008 + * + * Guest page hinting for unused pages. + * + * Author(s): Martin Schwidefsky + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/mm/page-states.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/mm/page-states.c.yml new file mode 100644 index 00000000000..59c533993e9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/s390/mm/page-states.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright IBM Corp. 2008 Guest +holders: + - IBM Corp. Guest +authors: + - Martin Schwidefsky diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/boards/mach-landisk/setup.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/boards/mach-landisk/setup.c new file mode 100644 index 00000000000..44e15a951a9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/boards/mach-landisk/setup.c @@ -0,0 +1,6 @@ +* Copyright (C) 2000 Kazumoto Kojima + * Copyright (C) 2002 Paul Mundt + * Copylight (C) 2002 Atom Create Engineering Co., Ltd. + * Copyright (C) 2005-2007 kogiidena + * + * This file is subject to the terms and conditions of the GNU General Public \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/boards/mach-landisk/setup.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/boards/mach-landisk/setup.c.yml new file mode 100644 index 00000000000..285ce1b26e2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/boards/mach-landisk/setup.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000 Kazumoto Kojima + - Copyright (c) 2002 Paul Mundt Copylight + - (c) 2002 Atom Create Engineering Co., Ltd. + - Copyright (c) 2005-2007 kogiidena +holders: + - Kazumoto Kojima + - Paul Mundt Copylight + - Atom Create Engineering Co., Ltd. + - kogiidena diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/fixups-landisk.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/fixups-landisk.c new file mode 100644 index 00000000000..8084722c91a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/fixups-landisk.c @@ -0,0 +1,4 @@ +* Copyright (C) 2006 kogiidena + * Copyright (C) 2010 Nobuhiro Iwamatsu + * + * May be copied or modified under the terms of the GNU General Public \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/fixups-landisk.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/fixups-landisk.c.yml new file mode 100644 index 00000000000..1fa75f1f5be --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/fixups-landisk.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006 kogiidena + - Copyright (c) 2010 Nobuhiro Iwamatsu +holders: + - kogiidena + - Nobuhiro Iwamatsu diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/pci-sh7751.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/pci-sh7751.h new file mode 100644 index 00000000000..d18b9c650ab --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/pci-sh7751.h @@ -0,0 +1,6 @@ +* Dustin McIntire (dustin@sensoria.com) (c) 2001 + * Paul Mundt (lethal@linux-sh.org) (c) 2003 + * + * May be copied or modified under the terms of the GNU General Public + * License. See linux/COPYING for more information. + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/pci-sh7751.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/pci-sh7751.h.yml new file mode 100644 index 00000000000..39e6f9818ba --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/pci-sh7751.h.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2001 Paul Mundt (lethal@linux-sh.org) + - (c) 2003 May be copied or +holders: + - Paul Mundt + - May be copied diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/pci-sh7780.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/pci-sh7780.h new file mode 100644 index 00000000000..d18b9c650ab --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/pci-sh7780.h @@ -0,0 +1,6 @@ +* Dustin McIntire (dustin@sensoria.com) (c) 2001 + * Paul Mundt (lethal@linux-sh.org) (c) 2003 + * + * May be copied or modified under the terms of the GNU General Public + * License. See linux/COPYING for more information. + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/pci-sh7780.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/pci-sh7780.h.yml new file mode 100644 index 00000000000..39e6f9818ba --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/sh/drivers/pci/pci-sh7780.h.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2001 Paul Mundt (lethal@linux-sh.org) + - (c) 2003 May be copied or +holders: + - Paul Mundt + - May be copied diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/daemon_kern.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/daemon_kern.c new file mode 100644 index 00000000000..499f41cc31f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/daemon_kern.c @@ -0,0 +1,6 @@ +* Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and + * James Leu (jleu@mindspring.net). + * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) + * Copyright (C) 2001 by various other people who didn't put their name here. + * Licensed under the GPL. + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/daemon_kern.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/daemon_kern.c.yml new file mode 100644 index 00000000000..cfe9f6f2393 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/daemon_kern.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001 Lennert Buytenhek (buytenh@gnu.org) and James Leu (jleu@mindspring.net) + - Copyright (c) 2001 - 2007 Jeff Dike + - Copyright (c) 2001 by various +holders: + - Lennert Buytenhek and James Leu + - Jeff Dike + - various diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/daemon_user.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/daemon_user.c new file mode 100644 index 00000000000..6440628c0a7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/daemon_user.c @@ -0,0 +1,6 @@ +* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) + * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and + * James Leu (jleu@mindspring.net). + * Copyright (C) 2001 by various other people who didn't put their name here. + * Licensed under the GPL. + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/daemon_user.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/daemon_user.c.yml new file mode 100644 index 00000000000..6fde9d70c9c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/daemon_user.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001 - 2007 Jeff Dike + - Copyright (c) 2001 Lennert Buytenhek (buytenh@gnu.org) and James Leu (jleu@mindspring.net) + - Copyright (c) 2001 by various +holders: + - Jeff Dike + - Lennert Buytenhek and James Leu + - various diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/net_kern.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/net_kern.c new file mode 100644 index 00000000000..6440628c0a7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/net_kern.c @@ -0,0 +1,6 @@ +* Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) + * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and + * James Leu (jleu@mindspring.net). + * Copyright (C) 2001 by various other people who didn't put their name here. + * Licensed under the GPL. + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/net_kern.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/net_kern.c.yml new file mode 100644 index 00000000000..6fde9d70c9c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/net_kern.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001 - 2007 Jeff Dike + - Copyright (c) 2001 Lennert Buytenhek (buytenh@gnu.org) and James Leu (jleu@mindspring.net) + - Copyright (c) 2001 by various +holders: + - Jeff Dike + - Lennert Buytenhek and James Leu + - various diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/umcast_kern.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/umcast_kern.c new file mode 100644 index 00000000000..5cceb95dd4d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/umcast_kern.c @@ -0,0 +1,9 @@ +* Copyright (C) 2001 by Harald Welte + * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) + * + * based on the existing uml-networking code, which is + * Copyright (C) 2001 Lennert Buytenhek (buytenh@gnu.org) and + * James Leu (jleu@mindspring.net). + * Copyright (C) 2001 by various other people who didn't put their name here. + * + * Licensed under the GPL. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/umcast_kern.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/umcast_kern.c.yml new file mode 100644 index 00000000000..34996bd8282 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/um/drivers/umcast_kern.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001 by Harald Welte + - Copyright (c) 2001 - 2007 Jeff Dike + - Copyright (c) 2001 Lennert Buytenhek (buytenh@gnu.org) and James Leu (jleu@mindspring.net) + - Copyright (c) 2001 by various +holders: + - Harald Welte + - Jeff Dike + - Lennert Buytenhek and James Leu + - various diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/include/asm/floppy.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/include/asm/floppy.h new file mode 100644 index 00000000000..2f56daf8e72 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/include/asm/floppy.h @@ -0,0 +1,4 @@ +* Copyright (C) 1995 + */ +#ifndef _ASM_X86_FLOPPY_H +#define _ASM_X86_FLOPPY_H \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/include/asm/floppy.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/include/asm/floppy.h.yml new file mode 100644 index 00000000000..c58dab9ed05 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/include/asm/floppy.h.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1995 diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/net/bpf_jit_comp.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/net/bpf_jit_comp.c new file mode 100644 index 00000000000..6516e6274d9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/net/bpf_jit_comp.c @@ -0,0 +1,4 @@ +* Copyright (C) 2011-2013 Eric Dumazet (eric.dumazet@gmail.com) + * Internal BPF Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com + * + * This program is free software; you can redistribute it and/or \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/net/bpf_jit_comp.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/net/bpf_jit_comp.c.yml new file mode 100644 index 00000000000..5cbdfffccbe --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/net/bpf_jit_comp.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2011-2013 Eric Dumazet (eric.dumazet@gmail.com) Internal BPF + - Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com +holders: + - Eric Dumazet Internal BPF + - PLUMgrid diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-pm.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-pm.c new file mode 100644 index 00000000000..cd9cd32bb0e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-pm.c @@ -0,0 +1,6 @@ +* Copyright (C) 2010 Andres Salomon + * Copyright (C) 2010 One Laptop per Child + * Copyright (C) 2006 Red Hat, Inc. + * Copyright (C) 2006 Advanced Micro Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-pm.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-pm.c.yml new file mode 100644 index 00000000000..883faf4f29c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-pm.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2010 Andres Salomon + - Copyright (c) 2010 One Laptop + - Copyright (c) 2006 Red Hat, Inc. + - Copyright (c) 2006 Advanced Micro Devices, Inc. +holders: + - Andres Salomon + - One Laptop + - Red Hat, Inc. + - Advanced Micro Devices, Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-rtc.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-rtc.c new file mode 100644 index 00000000000..d687ec21f39 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-rtc.c @@ -0,0 +1,3 @@ +* Copyright (C) 2011 One Laptop per Child + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-rtc.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-rtc.c.yml new file mode 100644 index 00000000000..2fc1ee9a53a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-rtc.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2011 One Laptop +holders: + - One Laptop diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-sci.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-sci.c new file mode 100644 index 00000000000..8c7612eaaf7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-sci.c @@ -0,0 +1,5 @@ +* Copyright (C) 2010 One Laptop per Child + * Copyright (C) 2006 Red Hat, Inc. + * Copyright (C) 2006 Advanced Micro Devices, Inc. + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-sci.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-sci.c.yml new file mode 100644 index 00000000000..1d08458e295 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo1-sci.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2010 One Laptop + - Copyright (c) 2006 Red Hat, Inc. + - Copyright (c) 2006 Advanced Micro Devices, Inc. +holders: + - One Laptop + - Red Hat, Inc. + - Advanced Micro Devices, Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo15-sci.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo15-sci.c new file mode 100644 index 00000000000..a7b70bfdb8d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo15-sci.c @@ -0,0 +1,3 @@ +* Copyright (C) 2009-2010 One Laptop per Child + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo15-sci.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo15-sci.c.yml new file mode 100644 index 00000000000..b845d3c8618 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/arch/x86/platform/olpc/olpc-xo15-sci.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2009-2010 One Laptop +holders: + - One Laptop diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/block/bounce.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/block/bounce.c new file mode 100644 index 00000000000..093e57f47f9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/block/bounce.c @@ -0,0 +1,4 @@ +* The bio of @from is created by bounce, so we can iterate + * its bvec from start to end, but the @from->bi_iter can't be + * trusted because it might be changed by splitting. + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/block/bounce.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/block/bounce.c.yml new file mode 100644 index 00000000000..2c57798d4e2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/block/bounce.c.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - bounce, so we can iterate its bvec diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/crypto/jitterentropy.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/crypto/jitterentropy.c new file mode 100644 index 00000000000..bcc8a073bd4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/crypto/jitterentropy.c @@ -0,0 +1,5 @@ +* Copyright Stephan Mueller , 2015 + * + * Design + * ====== + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/crypto/jitterentropy.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/crypto/jitterentropy.c.yml new file mode 100644 index 00000000000..14626b5d7b9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/crypto/jitterentropy.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright Stephan Mueller , 2015 Design +holders: + - Stephan Mueller , Design diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/acpi/acpica/dscontrol.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/acpi/acpica/dscontrol.c new file mode 100644 index 00000000000..c935f5363ef --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/acpi/acpica/dscontrol.c @@ -0,0 +1,8 @@ +* Copyright (C) 2000 - 2018, Intel Corp. + * + *****************************************************************************/ + + + * Allow references created by the Index operator to return + * unchanged. + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/acpi/acpica/dscontrol.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/acpi/acpica/dscontrol.c.yml new file mode 100644 index 00000000000..03e8e223244 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/acpi/acpica/dscontrol.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000 - 2018, Intel Corp. +holders: + - Intel Corp. +authors: + - the Index diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/acpi/processor_idle.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/acpi/processor_idle.c new file mode 100644 index 00000000000..1c7fbbaeb0a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/acpi/processor_idle.c @@ -0,0 +1,13 @@ +* Copyright (C) 2001, 2002 Andy Grover + * Copyright (C) 2001, 2002 Paul Diefenbaugh + * Copyright (C) 2004, 2005 Dominik Brodowski + * Copyright (C) 2004 Anil S Keshavamurthy + * - Added processor hotplug support + * Copyright (C) 2005 Venkatesh Pallipadi + * - Added support for C3 on SMP + * + + +/* Power(C) State timer broadcast control */ +static void lapic_timer_state_broadcast(struct acpi_processor *pr, + struct acpi_processor_cx *cx, \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/acpi/processor_idle.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/acpi/processor_idle.c.yml new file mode 100644 index 00000000000..4fc1aa124d1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/acpi/processor_idle.c.yml @@ -0,0 +1,18 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001, 2002 Andy Grover + - Copyright (c) 2001, 2002 Paul Diefenbaugh + - Copyright (c) 2004, 2005 Dominik Brodowski + - Copyright (c) 2004 Anil S Keshavamurthy + - Copyright (c) 2005 Venkatesh Pallipadi + - Power (c) State +holders: + - Andy Grover + - Paul Diefenbaugh + - Dominik Brodowski + - Anil S Keshavamurthy + - Venkatesh Pallipadi + - Power State diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/ahci_imx.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/ahci_imx.c new file mode 100644 index 00000000000..73e494a84dc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/ahci_imx.c @@ -0,0 +1,4 @@ +* copyright (c) 2013 Freescale Semiconductor, Inc. + * Freescale IMX AHCI SATA platform driver + * + * based on the AHCI SATA platform driver by Jeff Garzik and Anton Vorontsov \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/ahci_imx.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/ahci_imx.c.yml new file mode 100644 index 00000000000..d557e18ff96 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/ahci_imx.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyright (c) 2013 Freescale Semiconductor, Inc. Freescale IMX +holders: + - Freescale Semiconductor, Inc. Freescale IMX diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/pata_ali.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/pata_ali.c new file mode 100644 index 00000000000..6a0c5cc1467 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/pata_ali.c @@ -0,0 +1,15 @@ +* (C) 2005 Red Hat Inc + * + * based in part upon + + + * Copyright (C) 1998-2000 Michel Aubry, Maintainer + * Copyright (C) 1998-2000 Andrzej Krzysztofowicz, Maintainer + * Copyright (C) 1999-2000 CJ, cjtsai@ali.com.tw, Maintainer + * + * Copyright (C) 1998-2000 Andre Hedrick (andre@linux-ide.org) + * May be copied or modified under the terms of the GNU General Public License + * Copyright (C) 2002 Alan Cox + * ALi (now ULi M5228) support by Clear Zhang + * + * Documentation \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/pata_ali.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/pata_ali.c.yml new file mode 100644 index 00000000000..d56deaaa6f1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/pata_ali.c.yml @@ -0,0 +1,20 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2005 Red Hat Inc + - Copyright (c) 1998-2000 Michel Aubry, Maintainer + - Copyright (c) 1998-2000 Andrzej Krzysztofowicz, Maintainer + - (c) 1999-2000 CJ, cjtsai@ali.com.tw + - Copyright (c) 1998-2000 Andre Hedrick (andre@linux-ide.org) + - Copyright (c) 2002 Alan Cox +holders: + - Red Hat Inc + - Michel Aubry, Maintainer + - Andrzej Krzysztofowicz, Maintainer + - CJ + - Andre Hedrick + - Alan Cox +authors: + - Clear Zhang diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/sata_mv.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/sata_mv.c new file mode 100644 index 00000000000..ab65d16229b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/sata_mv.c @@ -0,0 +1,8 @@ +* Copyright 2008-2009: Marvell Corporation, all rights reserved. + * Copyright 2005: EMC Corporation, all rights reserved. + * Copyright 2005 Red Hat, Inc. All rights reserved. + * + * Originally written by Brett Russ. + * Extensive overhaul and enhancement by Mark Lord . + * + * Please ALWAYS copy linux-ide@vger.kernel.org on emails. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/sata_mv.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/sata_mv.c.yml new file mode 100644 index 00000000000..ea166d615a8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ata/sata_mv.c.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2008-2009 Marvell Corporation + - Copyright 2005 EMC Corporation + - Copyright 2005 Red Hat, Inc. +holders: + - Marvell Corporation + - EMC Corporation + - Red Hat, Inc. +authors: + - Brett Russ. Extensive + - Mark Lord diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/block/DAC960.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/block/DAC960.c new file mode 100644 index 00000000000..244aa67f786 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/block/DAC960.c @@ -0,0 +1,9 @@ +Copyright 1998-2001 by Leonard N. Zubkoff + Portions Copyright 2002 by Mylex (An IBM Business Unit) + + This program is free software; you may redistribute and/or modify it under + + + DAC960_Announce("Copyright 1998-2001 by Leonard N. Zubkoff " + "\n", Controller); +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/block/DAC960.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/block/DAC960.c.yml new file mode 100644 index 00000000000..b1db75b26a0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/block/DAC960.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1998-2001 by Leonard N. Zubkoff + - Portions Copyright 2002 by Mylex (An IBM Business Unit) + - Copyright 1998-2001 by Leonard N. Zubkoff Controller +holders: + - Leonard N. Zubkoff + - Mylex (An IBM Business Unit) + - Leonard N. Zubkoff Controller diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/char/dtlk.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/char/dtlk.c new file mode 100644 index 00000000000..73a812e353d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/char/dtlk.c @@ -0,0 +1,4 @@ +* Original author: Chris Pallotta + * Current maintainer: Jim Van Zandt + * + * 2000-03-18 Jim Van Zandt: Fix polling. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/char/dtlk.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/char/dtlk.c.yml new file mode 100644 index 00000000000..99bb6ffd797 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/char/dtlk.c.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - Chris Pallotta Current maintainer Jim Van Zandt diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/char/tpm/tpm_infineon.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/char/tpm/tpm_infineon.c new file mode 100644 index 00000000000..3952e0753c0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/char/tpm/tpm_infineon.c @@ -0,0 +1,6 @@ +* Copyright (C) 2005, Marcel Selhorst + * Sirrix AG - security technologies and + * Applied Data Security Group, Ruhr-University Bochum, Germany + * Project-Homepage: http://www.trust.rub.de/projects/linux-device-driver-infineon-tpm/ + * + * This program is free software; you can redistribute it and/or \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/char/tpm/tpm_infineon.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/char/tpm/tpm_infineon.c.yml new file mode 100644 index 00000000000..4c0f8f5c4ea --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/char/tpm/tpm_infineon.c.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005, Marcel Selhorst Sirrix AG - security technologies + and Applied Data Security Group, Ruhr-University Bochum, Germany Project-Homepage + http://www.trust.rub.de/projects/linux-device-driver-infineon-tpm +holders: + - Marcel Selhorst Sirrix AG - security technologies and Applied Data Security Group, Ruhr-University + Bochum, Germany Project-Homepage diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/clk-cdce925.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/clk-cdce925.c new file mode 100644 index 00000000000..ea4d816e65a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/clk-cdce925.c @@ -0,0 +1,3 @@ +* Copyright (C) 2014, Topic Embedded Products + * Licenced under GPL + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/clk-cdce925.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/clk-cdce925.c.yml new file mode 100644 index 00000000000..d75f82cc9ae --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/clk-cdce925.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2014, Topic Embedded +holders: + - Topic Embedded diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/clk-si514.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/clk-si514.c new file mode 100644 index 00000000000..7089e30730a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/clk-si514.c @@ -0,0 +1,5 @@ +* Copyright (C) 2015 Topic Embedded Products + * + * Author: Mike Looijmans + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/clk-si514.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/clk-si514.c.yml new file mode 100644 index 00000000000..5c647c6ed36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/clk-si514.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2015 Topic Embedded +holders: + - Topic Embedded +authors: + - Mike Looijmans diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/samsung/clk-exynos5-subcmu.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/samsung/clk-exynos5-subcmu.c new file mode 100644 index 00000000000..a25c3913415 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/samsung/clk-exynos5-subcmu.c @@ -0,0 +1,5 @@ +// Copyright (c) 2018 Samsung Electronics Co., Ltd. +// Author: Marek Szyprowski +// Common Clock Framework support for Exynos5 power-domain dependent clocks + +#include \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/samsung/clk-exynos5-subcmu.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/samsung/clk-exynos5-subcmu.c.yml new file mode 100644 index 00000000000..d9005b4ff90 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/samsung/clk-exynos5-subcmu.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2018 Samsung Electronics Co., Ltd. +holders: + - Samsung Electronics Co., Ltd. +authors: + - Marek Szyprowski Common Clock Framework diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/sunxi-ng/ccu-sun8i-r.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/sunxi-ng/ccu-sun8i-r.h new file mode 100644 index 00000000000..91452aad032 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/sunxi-ng/ccu-sun8i-r.h @@ -0,0 +1,3 @@ +* Copyright 2016 Icenowy + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/sunxi-ng/ccu-sun8i-r.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/sunxi-ng/ccu-sun8i-r.h.yml new file mode 100644 index 00000000000..e56e79ee32b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clk/sunxi-ng/ccu-sun8i-r.h.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2016 Icenowy +holders: + - Icenowy diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clocksource/timer-atmel-pit.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clocksource/timer-atmel-pit.c new file mode 100644 index 00000000000..8375a2fbf8b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clocksource/timer-atmel-pit.c @@ -0,0 +1,3 @@ +* Copyright (C) 2005-2006 M. Amine SAYA, ATMEL Rousset, France + * Revision 2005 M. Nicolas Diremdjian, ATMEL Rousset, France + * Converted to ClockSource/ClockEvents by David Brownell. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clocksource/timer-atmel-pit.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clocksource/timer-atmel-pit.c.yml new file mode 100644 index 00000000000..97b42a5e28e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clocksource/timer-atmel-pit.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005-2006 M. Amine SAYA, ATMEL Rousset, France +holders: + - M. Amine SAYA, ATMEL Rousset, France diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clocksource/timer-ti-32k.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clocksource/timer-ti-32k.c new file mode 100644 index 00000000000..d5ee8fc74bb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clocksource/timer-ti-32k.c @@ -0,0 +1,22 @@ +* Copyright (C) 2009 Nokia Corporation + * + * Update to use new clocksource/clockevent layers + * Author: Kevin Hilman, MontaVista Software, Inc. + * Copyright (C) 2007 MontaVista Software, Inc. + * + * Original driver: + * Copyright (C) 2005 Nokia Corporation + * Author: Paul Mundt + * Juha Yrjölä + * OMAP Dual-mode timer framework support by Timo Teras + * + * Some parts based off of TI's 24xx code: + + * Copyright (C) 2004-2009 Texas Instruments, Inc. + * + * Roughly modelled after the OMAP1 MPU timer code. + + + * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com + * + * This program is free software: you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clocksource/timer-ti-32k.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clocksource/timer-ti-32k.c.yml new file mode 100644 index 00000000000..5d978cf917f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/clocksource/timer-ti-32k.c.yml @@ -0,0 +1,19 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2009 Nokia Corporation + - Copyright (c) 2007 MontaVista Software, Inc. + - Copyright (c) 2005 Nokia Corporation + - Copyright (c) 2004-2009 Texas Instruments, Inc. + - Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com +holders: + - Nokia Corporation + - MontaVista Software, Inc. + - Nokia Corporation + - Texas Instruments, Inc. + - Texas Instruments Incorporated +authors: + - Kevin Hilman, MontaVista Software, Inc. + - Paul Mundt Juha Yrjola OMAP Dual-mode diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/cpufreq/omap-cpufreq.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/cpufreq/omap-cpufreq.c new file mode 100644 index 00000000000..51b440177c2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/cpufreq/omap-cpufreq.c @@ -0,0 +1,9 @@ +* Copyright (C) 2005 Nokia Corporation + * Written by Tony Lindgren + * + * Based on cpu-sa1110.c, Copyright (C) 2001 Russell King + * + * Copyright (C) 2007-2011 Texas Instruments, Inc. + * - OMAP3/4 support by Rajendra Nayak, Santosh Shilimkar + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/cpufreq/omap-cpufreq.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/cpufreq/omap-cpufreq.c.yml new file mode 100644 index 00000000000..5a885eca383 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/cpufreq/omap-cpufreq.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005 Nokia Corporation + - Copyright (c) 2001 Russell King + - Copyright (c) 2007-2011 Texas Instruments, Inc. - OMAP3/4 +holders: + - Nokia Corporation + - Russell King + - Texas Instruments, Inc. - OMAP3/4 +authors: + - Tony Lindgren diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/cpufreq/speedstep-ich.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/cpufreq/speedstep-ich.c new file mode 100644 index 00000000000..95cac6488a4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/cpufreq/speedstep-ich.c @@ -0,0 +1,4 @@ +* (C) 2001 Dave Jones, Arjan van de ven. + * (C) 2002 - 2003 Dominik Brodowski + * + * Licensed under the terms of the GNU GPL License version 2. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/cpufreq/speedstep-ich.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/cpufreq/speedstep-ich.c.yml new file mode 100644 index 00000000000..21d7001813a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/cpufreq/speedstep-ich.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2001 Dave Jones, Arjan van + - (c) 2002 - 2003 Dominik Brodowski +holders: + - Dave Jones, Arjan van + - Dominik Brodowski diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/crypto/nx/nx-842.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/crypto/nx/nx-842.c new file mode 100644 index 00000000000..24df08f6956 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/crypto/nx/nx-842.c @@ -0,0 +1,9 @@ +* Copyright (C) IBM Corporation, 2011-2015 + * + * Designer of the Power data compression engine: + * Bulent Abali + * + * Original Authors: Robert Jennings + * Seth Jennings + * + * Rewrite: Dan Streetman \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/crypto/nx/nx-842.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/crypto/nx/nx-842.c.yml new file mode 100644 index 00000000000..772384c66e8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/crypto/nx/nx-842.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) IBM Corporation, 2011-2015 Designer of the Power +holders: + - IBM Corporation, Designer of the Power +authors: + - Robert Jennings Seth Jennings diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/dma/amba-pl08x.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/dma/amba-pl08x.c new file mode 100644 index 00000000000..c23af627914 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/dma/amba-pl08x.c @@ -0,0 +1,8 @@ +* Copyright (c) 2006 ARM Ltd. + * Copyright (c) 2010 ST-Ericsson SA + * Copyirght (c) 2017 Linaro Ltd. + * + * Author: Peter Pearse + * Author: Linus Walleij + * + * This program is free software; you can redistribute it and/or modify it \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/dma/amba-pl08x.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/dma/amba-pl08x.c.yml new file mode 100644 index 00000000000..e0c41bb41f5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/dma/amba-pl08x.c.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006 ARM Ltd. + - Copyright (c) 2010 ST-Ericsson SA + - Copyirght (c) 2017 Linaro Ltd. +holders: + - ARM Ltd. + - ST-Ericsson SA + - Linaro Ltd. +authors: + - Peter Pearse + - Linus Walleij diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/edac/i3000_edac.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/edac/i3000_edac.c new file mode 100644 index 00000000000..94bfbd3f68f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/edac/i3000_edac.c @@ -0,0 +1,6 @@ +* Copyright (C) 2007 Akamai Technologies, Inc. + * Shamelessly copied from: + * Intel D82875P Memory Controller kernel module + * (C) 2003 Linux Networx (http://lnxi.com) + * + * This file may be distributed under the terms of the \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/edac/i3000_edac.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/edac/i3000_edac.c.yml new file mode 100644 index 00000000000..b1e54962078 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/edac/i3000_edac.c.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2007 Akamai Technologies, Inc. Shamelessly + - (c) 2003 +holders: + - Akamai Technologies, Inc. Shamelessly diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/edac/i82975x_edac.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/edac/i82975x_edac.c new file mode 100644 index 00000000000..c405da4ce2a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/edac/i82975x_edac.c @@ -0,0 +1,8 @@ +* (C) 2007 aCarLab (India) Pvt. Ltd. (http://acarlab.com) + * (C) 2007 jetzbroadband (http://jetzbroadband.com) + * This file may be distributed under the terms of the + * GNU General Public License. + + * Written by Arvind R. + * Copied from i82875p_edac.c source: + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/edac/i82975x_edac.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/edac/i82975x_edac.c.yml new file mode 100644 index 00000000000..a0fb184da79 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/edac/i82975x_edac.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2007 aCarLab (India) Pvt. Ltd. (http://acarlab.com) + - (c) 2007 jetzbroadband (http://jetzbroadband.com) +holders: + - aCarLab (India) Pvt. Ltd. + - jetzbroadband +authors: + - Arvind R. Copied diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpio/gpio-bt8xx.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpio/gpio-bt8xx.c new file mode 100644 index 00000000000..1755de1405e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpio/gpio-bt8xx.c @@ -0,0 +1,23 @@ +Copyright (C) 2008 Michael Buesch + + Please do _only_ contact the people listed _above_ with issues related to this driver. + + + Copyright (C) 1996,97,98 Ralph Metzler + & Marcus Metzler + (c) 1999-2002 Gerd Knorr + + some v4l2 code lines are taken from Justin's bttv2 driver which is + (c) 2000 Justin Schoeman + + V4L1 removal from: + (c) 2005-2006 Nickolay V. Shmyrev + + Fixes to be fully V4L2 compliant by + (c) 2006 Mauro Carvalho Chehab + + Cropping and overscan support + Copyright (C) 2005, 2006 Michael H. Schimek + Sponsored by OPQ Systems AB + + This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpio/gpio-bt8xx.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpio/gpio-bt8xx.c.yml new file mode 100644 index 00000000000..c800f85382f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpio/gpio-bt8xx.c.yml @@ -0,0 +1,20 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008 Michael Buesch + - Copyright (c) 1996,97,98 Ralph Metzler & Marcus Metzler + - (c) 1999-2002 Gerd Knorr + - (c) 2000 Justin Schoeman + - (c) 2005-2006 Nickolay V. Shmyrev + - (c) 2006 Mauro Carvalho Chehab + - Copyright (c) 2005, 2006 Michael H. Schimek Sponsored +holders: + - Michael Buesch + - Ralph Metzler & Marcus Metzler + - Gerd Knorr + - Justin Schoeman + - Nickolay V. Shmyrev + - Mauro Carvalho Chehab + - Michael H. Schimek Sponsored diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpio/gpio-vx855.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpio/gpio-vx855.c new file mode 100644 index 00000000000..cad776cd236 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpio/gpio-vx855.c @@ -0,0 +1,5 @@ +* Copyright (C) 2009 VIA Technologies, Inc. + * Copyright (C) 2010 One Laptop per Child + * Author: Harald Welte + * All rights reserved. + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpio/gpio-vx855.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpio/gpio-vx855.c.yml new file mode 100644 index 00000000000..d616c970145 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpio/gpio-vx855.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2009 VIA Technologies, Inc. + - Copyright (c) 2010 One Laptop +holders: + - VIA Technologies, Inc. + - One Laptop +authors: + - Harald Welte diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/amd/include/atombios.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/amd/include/atombios.h new file mode 100644 index 00000000000..3892b4eacaf --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/amd/include/atombios.h @@ -0,0 +1,39 @@ +/* + * Copyright 2006-2007 Advanced Micro Devices, Inc. + * + + + + + +/****************************************************************************/ +// Structure used by DynamicClockGatingTable.ctb +/****************************************************************************/ + + + + + + +/****************************************************************************/ +// Structure used by EnableDispPowerGatingTable.ctb +/****************************************************************************/ + + + + + + +/****************************************************************************/ +// Structure used by EnableASIC_StaticPwrMgtTable.ctb +/****************************************************************************/ + + + + + + +/****************************************************************************/ +// Structures used by DAC_LoadDetectionTable.ctb +/****************************************************************************/ +DynamicClockGatingTable diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/amd/include/atombios.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/amd/include/atombios.h.yml new file mode 100644 index 00000000000..2f1c4a70894 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/amd/include/atombios.h.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2006-2007 Advanced Micro Devices, Inc. +holders: + - Advanced Micro Devices, Inc. +authors: + - DynamicClockGatingTable.ctb + - EnableDispPowerGatingTable.ctb + - EnableASIC_StaticPwrMgtTable.ctb diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/drm_agpsupport.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/drm_agpsupport.c new file mode 100644 index 00000000000..92ea0785c65 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/drm_agpsupport.c @@ -0,0 +1,9 @@ +* \author Rickard E. (Rik) Faith + * \author Gareth Hughes + */ + + + * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. + * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. + * All Rights Reserved. + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/drm_agpsupport.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/drm_agpsupport.c.yml new file mode 100644 index 00000000000..d23fd8add58 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/drm_agpsupport.c.yml @@ -0,0 +1,13 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1999 Precision Insight, Inc., Cedar Park, Texas + - Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California +holders: + - Precision Insight, Inc., Cedar Park, Texas + - VA Linux Systems, Inc., Sunnyvale, California +authors: + - Rickard E. + - Gareth Hughes diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c new file mode 100644 index 00000000000..4c96ca3bd8b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c @@ -0,0 +1,7 @@ +* Copyright © 2016 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + + + * Author: Deepak M + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c.yml new file mode 100644 index 00000000000..45cbd5bd200 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2016 Intel Corporation +holders: + - Intel Corporation +authors: + - Deepak M diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c new file mode 100644 index 00000000000..4089263ac78 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c @@ -0,0 +1,2 @@ +* Copyright (C) 2017-2018, Bootlin + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c.yml new file mode 100644 index 00000000000..b6c8cdada74 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2017-2018, Bootlin +holders: + - Bootlin diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/qxl/qxl_prime.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/qxl/qxl_prime.c new file mode 100644 index 00000000000..8564d82435f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/qxl/qxl_prime.c @@ -0,0 +1,7 @@ +* Copyright 2014 Canonical + * + * Permission is hereby granted, free of charge, to any person obtaining a + + + * Authors: Andreas Pokorny + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/qxl/qxl_prime.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/qxl/qxl_prime.c.yml new file mode 100644 index 00000000000..d290a1b4b7b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/qxl/qxl_prime.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2014 Canonical +holders: + - Canonical +authors: + - Andreas Pokorny diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/radeon/atombios.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/radeon/atombios.h new file mode 100644 index 00000000000..c642d93dbec --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/radeon/atombios.h @@ -0,0 +1,7979 @@ +/* + * Copyright 2006-2007 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * 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. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. + */ + + +/****************************************************************************/ +/*Portion I: Definitions shared between VBIOS and Driver */ +/****************************************************************************/ + + +#ifndef _ATOMBIOS_H +#define _ATOMBIOS_H + +#define ATOM_VERSION_MAJOR 0x00020000 +#define ATOM_VERSION_MINOR 0x00000002 + +#define ATOM_HEADER_VERSION (ATOM_VERSION_MAJOR | ATOM_VERSION_MINOR) + +/* Endianness should be specified before inclusion, + * default to little endian + */ +#ifndef ATOM_BIG_ENDIAN +#error Endian not specified +#endif + +#ifdef _H2INC + #ifndef ULONG + typedef unsigned long ULONG; + #endif + + #ifndef UCHAR + typedef unsigned char UCHAR; + #endif + + #ifndef USHORT + typedef unsigned short USHORT; + #endif +#endif + +#define ATOM_DAC_A 0 +#define ATOM_DAC_B 1 +#define ATOM_EXT_DAC 2 + +#define ATOM_CRTC1 0 +#define ATOM_CRTC2 1 +#define ATOM_CRTC3 2 +#define ATOM_CRTC4 3 +#define ATOM_CRTC5 4 +#define ATOM_CRTC6 5 +#define ATOM_CRTC_INVALID 0xFF + +#define ATOM_DIGA 0 +#define ATOM_DIGB 1 + +#define ATOM_PPLL1 0 +#define ATOM_PPLL2 1 +#define ATOM_DCPLL 2 +#define ATOM_PPLL0 2 +#define ATOM_PPLL3 3 + +#define ATOM_EXT_PLL1 8 +#define ATOM_EXT_PLL2 9 +#define ATOM_EXT_CLOCK 10 +#define ATOM_PPLL_INVALID 0xFF + +#define ENCODER_REFCLK_SRC_P1PLL 0 +#define ENCODER_REFCLK_SRC_P2PLL 1 +#define ENCODER_REFCLK_SRC_DCPLL 2 +#define ENCODER_REFCLK_SRC_EXTCLK 3 +#define ENCODER_REFCLK_SRC_INVALID 0xFF + +#define ATOM_SCALER1 0 +#define ATOM_SCALER2 1 + +#define ATOM_SCALER_DISABLE 0 +#define ATOM_SCALER_CENTER 1 +#define ATOM_SCALER_EXPANSION 2 +#define ATOM_SCALER_MULTI_EX 3 + +#define ATOM_DISABLE 0 +#define ATOM_ENABLE 1 +#define ATOM_LCD_BLOFF (ATOM_DISABLE+2) +#define ATOM_LCD_BLON (ATOM_ENABLE+2) +#define ATOM_LCD_BL_BRIGHTNESS_CONTROL (ATOM_ENABLE+3) +#define ATOM_LCD_SELFTEST_START (ATOM_DISABLE+5) +#define ATOM_LCD_SELFTEST_STOP (ATOM_ENABLE+5) +#define ATOM_ENCODER_INIT (ATOM_DISABLE+7) +#define ATOM_INIT (ATOM_DISABLE+7) +#define ATOM_GET_STATUS (ATOM_DISABLE+8) + +#define ATOM_BLANKING 1 +#define ATOM_BLANKING_OFF 0 + +#define ATOM_CURSOR1 0 +#define ATOM_CURSOR2 1 + +#define ATOM_ICON1 0 +#define ATOM_ICON2 1 + +#define ATOM_CRT1 0 +#define ATOM_CRT2 1 + +#define ATOM_TV_NTSC 1 +#define ATOM_TV_NTSCJ 2 +#define ATOM_TV_PAL 3 +#define ATOM_TV_PALM 4 +#define ATOM_TV_PALCN 5 +#define ATOM_TV_PALN 6 +#define ATOM_TV_PAL60 7 +#define ATOM_TV_SECAM 8 +#define ATOM_TV_CV 16 + +#define ATOM_DAC1_PS2 1 +#define ATOM_DAC1_CV 2 +#define ATOM_DAC1_NTSC 3 +#define ATOM_DAC1_PAL 4 + +#define ATOM_DAC2_PS2 ATOM_DAC1_PS2 +#define ATOM_DAC2_CV ATOM_DAC1_CV +#define ATOM_DAC2_NTSC ATOM_DAC1_NTSC +#define ATOM_DAC2_PAL ATOM_DAC1_PAL + +#define ATOM_PM_ON 0 +#define ATOM_PM_STANDBY 1 +#define ATOM_PM_SUSPEND 2 +#define ATOM_PM_OFF 3 + +/* Bit0:{=0:single, =1:dual}, + Bit1 {=0:666RGB, =1:888RGB}, + Bit2:3:{Grey level} + Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888}*/ + +#define ATOM_PANEL_MISC_DUAL 0x00000001 +#define ATOM_PANEL_MISC_888RGB 0x00000002 +#define ATOM_PANEL_MISC_GREY_LEVEL 0x0000000C +#define ATOM_PANEL_MISC_FPDI 0x00000010 +#define ATOM_PANEL_MISC_GREY_LEVEL_SHIFT 2 +#define ATOM_PANEL_MISC_SPATIAL 0x00000020 +#define ATOM_PANEL_MISC_TEMPORAL 0x00000040 +#define ATOM_PANEL_MISC_API_ENABLED 0x00000080 + + +#define MEMTYPE_DDR1 "DDR1" +#define MEMTYPE_DDR2 "DDR2" +#define MEMTYPE_DDR3 "DDR3" +#define MEMTYPE_DDR4 "DDR4" + +#define ASIC_BUS_TYPE_PCI "PCI" +#define ASIC_BUS_TYPE_AGP "AGP" +#define ASIC_BUS_TYPE_PCIE "PCI_EXPRESS" + +/* Maximum size of that FireGL flag string */ + +#define ATOM_FIREGL_FLAG_STRING "FGL" //Flag used to enable FireGL Support +#define ATOM_MAX_SIZE_OF_FIREGL_FLAG_STRING 3 //sizeof( ATOM_FIREGL_FLAG_STRING ) + +#define ATOM_FAKE_DESKTOP_STRING "DSK" //Flag used to enable mobile ASIC on Desktop +#define ATOM_MAX_SIZE_OF_FAKE_DESKTOP_STRING ATOM_MAX_SIZE_OF_FIREGL_FLAG_STRING + +#define ATOM_M54T_FLAG_STRING "M54T" //Flag used to enable M54T Support +#define ATOM_MAX_SIZE_OF_M54T_FLAG_STRING 4 //sizeof( ATOM_M54T_FLAG_STRING ) + +#define HW_ASSISTED_I2C_STATUS_FAILURE 2 +#define HW_ASSISTED_I2C_STATUS_SUCCESS 1 + +#pragma pack(1) /* BIOS data must use byte alignment */ + +/* Define offset to location of ROM header. */ + +#define OFFSET_TO_POINTER_TO_ATOM_ROM_HEADER 0x00000048L +#define OFFSET_TO_ATOM_ROM_IMAGE_SIZE 0x00000002L + +#define OFFSET_TO_ATOMBIOS_ASIC_BUS_MEM_TYPE 0x94 +#define MAXSIZE_OF_ATOMBIOS_ASIC_BUS_MEM_TYPE 20 /* including the terminator 0x0! */ +#define OFFSET_TO_GET_ATOMBIOS_STRINGS_NUMBER 0x002f +#define OFFSET_TO_GET_ATOMBIOS_STRINGS_START 0x006e + +/* Common header for all ROM Data tables. + Every table pointed _ATOM_MASTER_DATA_TABLE has this common header. + And the pointer actually points to this header. */ + +typedef struct _ATOM_COMMON_TABLE_HEADER +{ + USHORT usStructureSize; + UCHAR ucTableFormatRevision; /*Change it when the Parser is not backward compatible */ + UCHAR ucTableContentRevision; /*Change it only when the table needs to change but the firmware */ + /*Image can't be updated, while Driver needs to carry the new table! */ +}ATOM_COMMON_TABLE_HEADER; + +/****************************************************************************/ +// Structure stores the ROM header. +/****************************************************************************/ +typedef struct _ATOM_ROM_HEADER +{ + ATOM_COMMON_TABLE_HEADER sHeader; + UCHAR uaFirmWareSignature[4]; /*Signature to distinguish between Atombios and non-atombios, + atombios should init it as "ATOM", don't change the position */ + USHORT usBiosRuntimeSegmentAddress; + USHORT usProtectedModeInfoOffset; + USHORT usConfigFilenameOffset; + USHORT usCRC_BlockOffset; + USHORT usBIOS_BootupMessageOffset; + USHORT usInt10Offset; + USHORT usPciBusDevInitCode; + USHORT usIoBaseAddress; + USHORT usSubsystemVendorID; + USHORT usSubsystemID; + USHORT usPCI_InfoOffset; + USHORT usMasterCommandTableOffset; /*Offset for SW to get all command table offsets, Don't change the position */ + USHORT usMasterDataTableOffset; /*Offset for SW to get all data table offsets, Don't change the position */ + UCHAR ucExtendedFunctionCode; + UCHAR ucReserved; +}ATOM_ROM_HEADER; + +/*==============================Command Table Portion==================================== */ + +#ifdef UEFI_BUILD + #define UTEMP USHORT + #define USHORT void* +#endif + +/****************************************************************************/ +// Structures used in Command.mtb +/****************************************************************************/ +typedef struct _ATOM_MASTER_LIST_OF_COMMAND_TABLES{ + USHORT ASIC_Init; //Function Table, used by various SW components,latest version 1.1 + USHORT GetDisplaySurfaceSize; //Atomic Table, Used by Bios when enabling HW ICON + USHORT ASIC_RegistersInit; //Atomic Table, indirectly used by various SW components,called from ASIC_Init + USHORT VRAM_BlockVenderDetection; //Atomic Table, used only by Bios + USHORT DIGxEncoderControl; //Only used by Bios + USHORT MemoryControllerInit; //Atomic Table, indirectly used by various SW components,called from ASIC_Init + USHORT EnableCRTCMemReq; //Function Table,directly used by various SW components,latest version 2.1 + USHORT MemoryParamAdjust; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock if needed + USHORT DVOEncoderControl; //Function Table,directly used by various SW components,latest version 1.2 + USHORT GPIOPinControl; //Atomic Table, only used by Bios + USHORT SetEngineClock; //Function Table,directly used by various SW components,latest version 1.1 + USHORT SetMemoryClock; //Function Table,directly used by various SW components,latest version 1.1 + USHORT SetPixelClock; //Function Table,directly used by various SW components,latest version 1.2 + USHORT EnableDispPowerGating; //Atomic Table, indirectly used by various SW components,called from ASIC_Init + USHORT ResetMemoryDLL; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock + USHORT ResetMemoryDevice; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock + USHORT MemoryPLLInit; //Atomic Table, used only by Bios + USHORT AdjustDisplayPll; //Atomic Table, used by various SW componentes. + USHORT AdjustMemoryController; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock + USHORT EnableASIC_StaticPwrMgt; //Atomic Table, only used by Bios + USHORT SetUniphyInstance; //Atomic Table, only used by Bios + USHORT DAC_LoadDetection; //Atomic Table, directly used by various SW components,latest version 1.2 + USHORT LVTMAEncoderControl; //Atomic Table,directly used by various SW components,latest version 1.3 + USHORT HW_Misc_Operation; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT DAC1EncoderControl; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT DAC2EncoderControl; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT DVOOutputControl; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT CV1OutputControl; //Atomic Table, Atomic Table, Obsolete from Ry6xx, use DAC2 Output instead + USHORT GetConditionalGoldenSetting; //Only used by Bios + USHORT TVEncoderControl; //Function Table,directly used by various SW components,latest version 1.1 + USHORT PatchMCSetting; //only used by BIOS + USHORT MC_SEQ_Control; //only used by BIOS + USHORT Gfx_Harvesting; //Atomic Table, Obsolete from Ry6xx, Now only used by BIOS for GFX harvesting + USHORT EnableScaler; //Atomic Table, used only by Bios + USHORT BlankCRTC; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT EnableCRTC; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT GetPixelClock; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT EnableVGA_Render; //Function Table,directly used by various SW components,latest version 1.1 + USHORT GetSCLKOverMCLKRatio; //Atomic Table, only used by Bios + USHORT SetCRTC_Timing; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT SetCRTC_OverScan; //Atomic Table, used by various SW components,latest version 1.1 + USHORT SetCRTC_Replication; //Atomic Table, used only by Bios + USHORT SelectCRTC_Source; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT EnableGraphSurfaces; //Atomic Table, used only by Bios + USHORT UpdateCRTC_DoubleBufferRegisters; //Atomic Table, used only by Bios + USHORT LUT_AutoFill; //Atomic Table, only used by Bios + USHORT EnableHW_IconCursor; //Atomic Table, only used by Bios + USHORT GetMemoryClock; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT GetEngineClock; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT SetCRTC_UsingDTDTiming; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT ExternalEncoderControl; //Atomic Table, directly used by various SW components,latest version 2.1 + USHORT LVTMAOutputControl; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT VRAM_BlockDetectionByStrap; //Atomic Table, used only by Bios + USHORT MemoryCleanUp; //Atomic Table, only used by Bios + USHORT ProcessI2cChannelTransaction; //Function Table,only used by Bios + USHORT WriteOneByteToHWAssistedI2C; //Function Table,indirectly used by various SW components + USHORT ReadHWAssistedI2CStatus; //Atomic Table, indirectly used by various SW components + USHORT SpeedFanControl; //Function Table,indirectly used by various SW components,called from ASIC_Init + USHORT PowerConnectorDetection; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT MC_Synchronization; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock + USHORT ComputeMemoryEnginePLL; //Atomic Table, indirectly used by various SW components,called from SetMemory/EngineClock + USHORT MemoryRefreshConversion; //Atomic Table, indirectly used by various SW components,called from SetMemory or SetEngineClock + USHORT VRAM_GetCurrentInfoBlock; //Atomic Table, used only by Bios + USHORT DynamicMemorySettings; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock + USHORT MemoryTraining; //Atomic Table, used only by Bios + USHORT EnableSpreadSpectrumOnPPLL; //Atomic Table, directly used by various SW components,latest version 1.2 + USHORT TMDSAOutputControl; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT SetVoltage; //Function Table,directly and/or indirectly used by various SW components,latest version 1.1 + USHORT DAC1OutputControl; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT DAC2OutputControl; //Atomic Table, directly used by various SW components,latest version 1.1 + USHORT ComputeMemoryClockParam; //Function Table,only used by Bios, obsolete soon.Switch to use "ReadEDIDFromHWAssistedI2C" + USHORT ClockSource; //Atomic Table, indirectly used by various SW components,called from ASIC_Init + USHORT MemoryDeviceInit; //Atomic Table, indirectly used by various SW components,called from SetMemoryClock + USHORT GetDispObjectInfo; //Atomic Table, indirectly used by various SW components,called from EnableVGARender + USHORT DIG1EncoderControl; //Atomic Table,directly used by various SW components,latest version 1.1 + USHORT DIG2EncoderControl; //Atomic Table,directly used by various SW components,latest version 1.1 + USHORT DIG1TransmitterControl; //Atomic Table,directly used by various SW components,latest version 1.1 + USHORT DIG2TransmitterControl; //Atomic Table,directly used by various SW components,latest version 1.1 + USHORT ProcessAuxChannelTransaction; //Function Table,only used by Bios + USHORT DPEncoderService; //Function Table,only used by Bios + USHORT GetVoltageInfo; //Function Table,only used by Bios since SI +}ATOM_MASTER_LIST_OF_COMMAND_TABLES; + +// For backward compatible +#define ReadEDIDFromHWAssistedI2C ProcessI2cChannelTransaction +#define DPTranslatorControl DIG2EncoderControl +#define UNIPHYTransmitterControl DIG1TransmitterControl +#define LVTMATransmitterControl DIG2TransmitterControl +#define SetCRTC_DPM_State GetConditionalGoldenSetting +#define ASIC_StaticPwrMgtStatusChange SetUniphyInstance +#define HPDInterruptService ReadHWAssistedI2CStatus +#define EnableVGA_Access GetSCLKOverMCLKRatio +#define EnableYUV GetDispObjectInfo +#define DynamicClockGating EnableDispPowerGating +#define SetupHWAssistedI2CStatus ComputeMemoryClockParam + +#define TMDSAEncoderControl PatchMCSetting +#define LVDSEncoderControl MC_SEQ_Control +#define LCD1OutputControl HW_Misc_Operation +#define TV1OutputControl Gfx_Harvesting + +typedef struct _ATOM_MASTER_COMMAND_TABLE +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_MASTER_LIST_OF_COMMAND_TABLES ListOfCommandTables; +}ATOM_MASTER_COMMAND_TABLE; + +/****************************************************************************/ +// Structures used in every command table +/****************************************************************************/ +typedef struct _ATOM_TABLE_ATTRIBUTE +{ +#if ATOM_BIG_ENDIAN + USHORT UpdatedByUtility:1; //[15]=Table updated by utility flag + USHORT PS_SizeInBytes:7; //[14:8]=Size of parameter space in Bytes (multiple of a dword), + USHORT WS_SizeInBytes:8; //[7:0]=Size of workspace in Bytes (in multiple of a dword), +#else + USHORT WS_SizeInBytes:8; //[7:0]=Size of workspace in Bytes (in multiple of a dword), + USHORT PS_SizeInBytes:7; //[14:8]=Size of parameter space in Bytes (multiple of a dword), + USHORT UpdatedByUtility:1; //[15]=Table updated by utility flag +#endif +}ATOM_TABLE_ATTRIBUTE; + +typedef union _ATOM_TABLE_ATTRIBUTE_ACCESS +{ + ATOM_TABLE_ATTRIBUTE sbfAccess; + USHORT susAccess; +}ATOM_TABLE_ATTRIBUTE_ACCESS; + +/****************************************************************************/ +// Common header for all command tables. +// Every table pointed by _ATOM_MASTER_COMMAND_TABLE has this common header. +// And the pointer actually points to this header. +/****************************************************************************/ +typedef struct _ATOM_COMMON_ROM_COMMAND_TABLE_HEADER +{ + ATOM_COMMON_TABLE_HEADER CommonHeader; + ATOM_TABLE_ATTRIBUTE TableAttribute; +}ATOM_COMMON_ROM_COMMAND_TABLE_HEADER; + +/****************************************************************************/ +// Structures used by ComputeMemoryEnginePLLTable +/****************************************************************************/ +#define COMPUTE_MEMORY_PLL_PARAM 1 +#define COMPUTE_ENGINE_PLL_PARAM 2 +#define ADJUST_MC_SETTING_PARAM 3 + +/****************************************************************************/ +// Structures used by AdjustMemoryControllerTable +/****************************************************************************/ +typedef struct _ATOM_ADJUST_MEMORY_CLOCK_FREQ +{ +#if ATOM_BIG_ENDIAN + ULONG ulPointerReturnFlag:1; // BYTE_3[7]=1 - Return the pointer to the right Data Block; BYTE_3[7]=0 - Program the right Data Block + ULONG ulMemoryModuleNumber:7; // BYTE_3[6:0] + ULONG ulClockFreq:24; +#else + ULONG ulClockFreq:24; + ULONG ulMemoryModuleNumber:7; // BYTE_3[6:0] + ULONG ulPointerReturnFlag:1; // BYTE_3[7]=1 - Return the pointer to the right Data Block; BYTE_3[7]=0 - Program the right Data Block +#endif +}ATOM_ADJUST_MEMORY_CLOCK_FREQ; +#define POINTER_RETURN_FLAG 0x80 + +typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS +{ + ULONG ulClock; //When returen, it's the re-calculated clock based on given Fb_div Post_Div and ref_div + UCHAR ucAction; //0:reserved //1:Memory //2:Engine + UCHAR ucReserved; //may expand to return larger Fbdiv later + UCHAR ucFbDiv; //return value + UCHAR ucPostDiv; //return value +}COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS; + +typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V2 +{ + ULONG ulClock; //When return, [23:0] return real clock + UCHAR ucAction; //0:reserved;COMPUTE_MEMORY_PLL_PARAM:Memory;COMPUTE_ENGINE_PLL_PARAM:Engine. it return ref_div to be written to register + USHORT usFbDiv; //return Feedback value to be written to register + UCHAR ucPostDiv; //return post div to be written to register +}COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V2; +#define COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS + + +#define SET_CLOCK_FREQ_MASK 0x00FFFFFF //Clock change tables only take bit [23:0] as the requested clock value +#define USE_NON_BUS_CLOCK_MASK 0x01000000 //Applicable to both memory and engine clock change, when set, it uses another clock as the temporary clock (engine uses memory and vice versa) +#define USE_MEMORY_SELF_REFRESH_MASK 0x02000000 //Only applicable to memory clock change, when set, using memory self refresh during clock transition +#define SKIP_INTERNAL_MEMORY_PARAMETER_CHANGE 0x04000000 //Only applicable to memory clock change, when set, the table will skip predefined internal memory parameter change +#define FIRST_TIME_CHANGE_CLOCK 0x08000000 //Applicable to both memory and engine clock change,when set, it means this is 1st time to change clock after ASIC bootup +#define SKIP_SW_PROGRAM_PLL 0x10000000 //Applicable to both memory and engine clock change, when set, it means the table will not program SPLL/MPLL +#define USE_SS_ENABLED_PIXEL_CLOCK USE_NON_BUS_CLOCK_MASK + +#define b3USE_NON_BUS_CLOCK_MASK 0x01 //Applicable to both memory and engine clock change, when set, it uses another clock as the temporary clock (engine uses memory and vice versa) +#define b3USE_MEMORY_SELF_REFRESH 0x02 //Only applicable to memory clock change, when set, using memory self refresh during clock transition +#define b3SKIP_INTERNAL_MEMORY_PARAMETER_CHANGE 0x04 //Only applicable to memory clock change, when set, the table will skip predefined internal memory parameter change +#define b3FIRST_TIME_CHANGE_CLOCK 0x08 //Applicable to both memory and engine clock change,when set, it means this is 1st time to change clock after ASIC bootup +#define b3SKIP_SW_PROGRAM_PLL 0x10 //Applicable to both memory and engine clock change, when set, it means the table will not program SPLL/MPLL + +typedef struct _ATOM_COMPUTE_CLOCK_FREQ +{ +#if ATOM_BIG_ENDIAN + ULONG ulComputeClockFlag:8; // =1: COMPUTE_MEMORY_PLL_PARAM, =2: COMPUTE_ENGINE_PLL_PARAM + ULONG ulClockFreq:24; // in unit of 10kHz +#else + ULONG ulClockFreq:24; // in unit of 10kHz + ULONG ulComputeClockFlag:8; // =1: COMPUTE_MEMORY_PLL_PARAM, =2: COMPUTE_ENGINE_PLL_PARAM +#endif +}ATOM_COMPUTE_CLOCK_FREQ; + +typedef struct _ATOM_S_MPLL_FB_DIVIDER +{ + USHORT usFbDivFrac; + USHORT usFbDiv; +}ATOM_S_MPLL_FB_DIVIDER; + +typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V3 +{ + union + { + ATOM_COMPUTE_CLOCK_FREQ ulClock; //Input Parameter + ULONG ulClockParams; //ULONG access for BE + ATOM_S_MPLL_FB_DIVIDER ulFbDiv; //Output Parameter + }; + UCHAR ucRefDiv; //Output Parameter + UCHAR ucPostDiv; //Output Parameter + UCHAR ucCntlFlag; //Output Parameter + UCHAR ucReserved; +}COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V3; + +// ucCntlFlag +#define ATOM_PLL_CNTL_FLAG_PLL_POST_DIV_EN 1 +#define ATOM_PLL_CNTL_FLAG_MPLL_VCO_MODE 2 +#define ATOM_PLL_CNTL_FLAG_FRACTION_DISABLE 4 +#define ATOM_PLL_CNTL_FLAG_SPLL_ISPARE_9 8 + + +// V4 are only used for APU which PLL outside GPU +typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4 +{ +#if ATOM_BIG_ENDIAN + ULONG ucPostDiv:8; //return parameter: post divider which is used to program to register directly + ULONG ulClock:24; //Input= target clock, output = actual clock +#else + ULONG ulClock:24; //Input= target clock, output = actual clock + ULONG ucPostDiv:8; //return parameter: post divider which is used to program to register directly +#endif +}COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4; + +typedef struct _COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V5 +{ + union + { + ATOM_COMPUTE_CLOCK_FREQ ulClock; //Input Parameter + ULONG ulClockParams; //ULONG access for BE + ATOM_S_MPLL_FB_DIVIDER ulFbDiv; //Output Parameter + }; + UCHAR ucRefDiv; //Output Parameter + UCHAR ucPostDiv; //Output Parameter + union + { + UCHAR ucCntlFlag; //Output Flags + UCHAR ucInputFlag; //Input Flags. ucInputFlag[0] - Strobe(1)/Performance(0) mode + }; + UCHAR ucReserved; +}COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V5; + + +typedef struct _COMPUTE_GPU_CLOCK_INPUT_PARAMETERS_V1_6 +{ + ATOM_COMPUTE_CLOCK_FREQ ulClock; //Input Parameter + ULONG ulReserved[2]; +}COMPUTE_GPU_CLOCK_INPUT_PARAMETERS_V1_6; + +//ATOM_COMPUTE_CLOCK_FREQ.ulComputeClockFlag +#define COMPUTE_GPUCLK_INPUT_FLAG_CLK_TYPE_MASK 0x0f +#define COMPUTE_GPUCLK_INPUT_FLAG_DEFAULT_GPUCLK 0x00 +#define COMPUTE_GPUCLK_INPUT_FLAG_SCLK 0x01 + +typedef struct _COMPUTE_GPU_CLOCK_OUTPUT_PARAMETERS_V1_6 +{ + COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_V4 ulClock; //Output Parameter: ucPostDiv=DFS divider + ATOM_S_MPLL_FB_DIVIDER ulFbDiv; //Output Parameter: PLL FB divider + UCHAR ucPllRefDiv; //Output Parameter: PLL ref divider + UCHAR ucPllPostDiv; //Output Parameter: PLL post divider + UCHAR ucPllCntlFlag; //Output Flags: control flag + UCHAR ucReserved; +}COMPUTE_GPU_CLOCK_OUTPUT_PARAMETERS_V1_6; + +//ucPllCntlFlag +#define SPLL_CNTL_FLAG_VCO_MODE_MASK 0x03 + + +// ucInputFlag +#define ATOM_PLL_INPUT_FLAG_PLL_STROBE_MODE_EN 1 // 1-StrobeMode, 0-PerformanceMode + +// use for ComputeMemoryClockParamTable +typedef struct _COMPUTE_MEMORY_CLOCK_PARAM_PARAMETERS_V2_1 +{ + union + { + ULONG ulClock; + ATOM_S_MPLL_FB_DIVIDER ulFbDiv; //Output:UPPER_WORD=FB_DIV_INTEGER, LOWER_WORD=FB_DIV_FRAC shl (16-FB_FRACTION_BITS) + }; + UCHAR ucDllSpeed; //Output + UCHAR ucPostDiv; //Output + union{ + UCHAR ucInputFlag; //Input : ATOM_PLL_INPUT_FLAG_PLL_STROBE_MODE_EN: 1-StrobeMode, 0-PerformanceMode + UCHAR ucPllCntlFlag; //Output: + }; + UCHAR ucBWCntl; +}COMPUTE_MEMORY_CLOCK_PARAM_PARAMETERS_V2_1; + +// definition of ucInputFlag +#define MPLL_INPUT_FLAG_STROBE_MODE_EN 0x01 +// definition of ucPllCntlFlag +#define MPLL_CNTL_FLAG_VCO_MODE_MASK 0x03 +#define MPLL_CNTL_FLAG_BYPASS_DQ_PLL 0x04 +#define MPLL_CNTL_FLAG_QDR_ENABLE 0x08 +#define MPLL_CNTL_FLAG_AD_HALF_RATE 0x10 + +//MPLL_CNTL_FLAG_BYPASS_AD_PLL has a wrong name, should be BYPASS_DQ_PLL +#define MPLL_CNTL_FLAG_BYPASS_AD_PLL 0x04 + +typedef struct _DYNAMICE_MEMORY_SETTINGS_PARAMETER +{ + ATOM_COMPUTE_CLOCK_FREQ ulClock; + ULONG ulReserved[2]; +}DYNAMICE_MEMORY_SETTINGS_PARAMETER; + +typedef struct _DYNAMICE_ENGINE_SETTINGS_PARAMETER +{ + ATOM_COMPUTE_CLOCK_FREQ ulClock; + ULONG ulMemoryClock; + ULONG ulReserved; +}DYNAMICE_ENGINE_SETTINGS_PARAMETER; + +/****************************************************************************/ +// Structures used by SetEngineClockTable +/****************************************************************************/ +typedef struct _SET_ENGINE_CLOCK_PARAMETERS +{ + ULONG ulTargetEngineClock; //In 10Khz unit +}SET_ENGINE_CLOCK_PARAMETERS; + +typedef struct _SET_ENGINE_CLOCK_PS_ALLOCATION +{ + ULONG ulTargetEngineClock; //In 10Khz unit + COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION sReserved; +}SET_ENGINE_CLOCK_PS_ALLOCATION; + +/****************************************************************************/ +// Structures used by SetMemoryClockTable +/****************************************************************************/ +typedef struct _SET_MEMORY_CLOCK_PARAMETERS +{ + ULONG ulTargetMemoryClock; //In 10Khz unit +}SET_MEMORY_CLOCK_PARAMETERS; + +typedef struct _SET_MEMORY_CLOCK_PS_ALLOCATION +{ + ULONG ulTargetMemoryClock; //In 10Khz unit + COMPUTE_MEMORY_ENGINE_PLL_PARAMETERS_PS_ALLOCATION sReserved; +}SET_MEMORY_CLOCK_PS_ALLOCATION; + +/****************************************************************************/ +// Structures used by ASIC_Init.ctb +/****************************************************************************/ +typedef struct _ASIC_INIT_PARAMETERS +{ + ULONG ulDefaultEngineClock; //In 10Khz unit + ULONG ulDefaultMemoryClock; //In 10Khz unit +}ASIC_INIT_PARAMETERS; + +typedef struct _ASIC_INIT_PS_ALLOCATION +{ + ASIC_INIT_PARAMETERS sASICInitClocks; + SET_ENGINE_CLOCK_PS_ALLOCATION sReserved; //Caller doesn't need to init this structure +}ASIC_INIT_PS_ALLOCATION; + +/****************************************************************************/ +// Structure used by DynamicClockGatingTable.ctb +/****************************************************************************/ +typedef struct _DYNAMIC_CLOCK_GATING_PARAMETERS +{ + UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE + UCHAR ucPadding[3]; +}DYNAMIC_CLOCK_GATING_PARAMETERS; +#define DYNAMIC_CLOCK_GATING_PS_ALLOCATION DYNAMIC_CLOCK_GATING_PARAMETERS + +/****************************************************************************/ +// Structure used by EnableDispPowerGatingTable.ctb +/****************************************************************************/ +typedef struct _ENABLE_DISP_POWER_GATING_PARAMETERS_V2_1 +{ + UCHAR ucDispPipeId; // ATOM_CRTC1, ATOM_CRTC2, ... + UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE + UCHAR ucPadding[2]; +}ENABLE_DISP_POWER_GATING_PARAMETERS_V2_1; + +/****************************************************************************/ +// Structure used by EnableASIC_StaticPwrMgtTable.ctb +/****************************************************************************/ +typedef struct _ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS +{ + UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE + UCHAR ucPadding[3]; +}ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS; +#define ENABLE_ASIC_STATIC_PWR_MGT_PS_ALLOCATION ENABLE_ASIC_STATIC_PWR_MGT_PARAMETERS + +/****************************************************************************/ +// Structures used by DAC_LoadDetectionTable.ctb +/****************************************************************************/ +typedef struct _DAC_LOAD_DETECTION_PARAMETERS +{ + USHORT usDeviceID; //{ATOM_DEVICE_CRTx_SUPPORT,ATOM_DEVICE_TVx_SUPPORT,ATOM_DEVICE_CVx_SUPPORT} + UCHAR ucDacType; //{ATOM_DAC_A,ATOM_DAC_B, ATOM_EXT_DAC} + UCHAR ucMisc; //Valid only when table revision =1.3 and above +}DAC_LOAD_DETECTION_PARAMETERS; + +// DAC_LOAD_DETECTION_PARAMETERS.ucMisc +#define DAC_LOAD_MISC_YPrPb 0x01 + +typedef struct _DAC_LOAD_DETECTION_PS_ALLOCATION +{ + DAC_LOAD_DETECTION_PARAMETERS sDacload; + ULONG Reserved[2];// Don't set this one, allocation for EXT DAC +}DAC_LOAD_DETECTION_PS_ALLOCATION; + +/****************************************************************************/ +// Structures used by DAC1EncoderControlTable.ctb and DAC2EncoderControlTable.ctb +/****************************************************************************/ +typedef struct _DAC_ENCODER_CONTROL_PARAMETERS +{ + USHORT usPixelClock; // in 10KHz; for bios convenient + UCHAR ucDacStandard; // See definition of ATOM_DACx_xxx, For DEC3.0, bit 7 used as internal flag to indicate DAC2 (==1) or DAC1 (==0) + UCHAR ucAction; // 0: turn off encoder + // 1: setup and turn on encoder + // 7: ATOM_ENCODER_INIT Initialize DAC +}DAC_ENCODER_CONTROL_PARAMETERS; + +#define DAC_ENCODER_CONTROL_PS_ALLOCATION DAC_ENCODER_CONTROL_PARAMETERS + +/****************************************************************************/ +// Structures used by DIG1EncoderControlTable +// DIG2EncoderControlTable +// ExternalEncoderControlTable +/****************************************************************************/ +typedef struct _DIG_ENCODER_CONTROL_PARAMETERS +{ + USHORT usPixelClock; // in 10KHz; for bios convenient + UCHAR ucConfig; + // [2] Link Select: + // =0: PHY linkA if bfLane<3 + // =1: PHY linkB if bfLanes<3 + // =0: PHY linkA+B if bfLanes=3 + // [3] Transmitter Sel + // =0: UNIPHY or PCIEPHY + // =1: LVTMA + UCHAR ucAction; // =0: turn off encoder + // =1: turn on encoder + UCHAR ucEncoderMode; + // =0: DP encoder + // =1: LVDS encoder + // =2: DVI encoder + // =3: HDMI encoder + // =4: SDVO encoder + UCHAR ucLaneNum; // how many lanes to enable + UCHAR ucReserved[2]; +}DIG_ENCODER_CONTROL_PARAMETERS; +#define DIG_ENCODER_CONTROL_PS_ALLOCATION DIG_ENCODER_CONTROL_PARAMETERS +#define EXTERNAL_ENCODER_CONTROL_PARAMETER DIG_ENCODER_CONTROL_PARAMETERS + +//ucConfig +#define ATOM_ENCODER_CONFIG_DPLINKRATE_MASK 0x01 +#define ATOM_ENCODER_CONFIG_DPLINKRATE_1_62GHZ 0x00 +#define ATOM_ENCODER_CONFIG_DPLINKRATE_2_70GHZ 0x01 +#define ATOM_ENCODER_CONFIG_DPLINKRATE_5_40GHZ 0x02 +#define ATOM_ENCODER_CONFIG_LINK_SEL_MASK 0x04 +#define ATOM_ENCODER_CONFIG_LINKA 0x00 +#define ATOM_ENCODER_CONFIG_LINKB 0x04 +#define ATOM_ENCODER_CONFIG_LINKA_B ATOM_TRANSMITTER_CONFIG_LINKA +#define ATOM_ENCODER_CONFIG_LINKB_A ATOM_ENCODER_CONFIG_LINKB +#define ATOM_ENCODER_CONFIG_TRANSMITTER_SEL_MASK 0x08 +#define ATOM_ENCODER_CONFIG_UNIPHY 0x00 +#define ATOM_ENCODER_CONFIG_LVTMA 0x08 +#define ATOM_ENCODER_CONFIG_TRANSMITTER1 0x00 +#define ATOM_ENCODER_CONFIG_TRANSMITTER2 0x08 +#define ATOM_ENCODER_CONFIG_DIGB 0x80 // VBIOS Internal use, outside SW should set this bit=0 +// ucAction +// ATOM_ENABLE: Enable Encoder +// ATOM_DISABLE: Disable Encoder + +//ucEncoderMode +#define ATOM_ENCODER_MODE_DP 0 +#define ATOM_ENCODER_MODE_LVDS 1 +#define ATOM_ENCODER_MODE_DVI 2 +#define ATOM_ENCODER_MODE_HDMI 3 +#define ATOM_ENCODER_MODE_SDVO 4 +#define ATOM_ENCODER_MODE_DP_AUDIO 5 +#define ATOM_ENCODER_MODE_TV 13 +#define ATOM_ENCODER_MODE_CV 14 +#define ATOM_ENCODER_MODE_CRT 15 +#define ATOM_ENCODER_MODE_DVO 16 +#define ATOM_ENCODER_MODE_DP_SST ATOM_ENCODER_MODE_DP // For DP1.2 +#define ATOM_ENCODER_MODE_DP_MST 5 // For DP1.2 + +typedef struct _ATOM_DIG_ENCODER_CONFIG_V2 +{ +#if ATOM_BIG_ENDIAN + UCHAR ucReserved1:2; + UCHAR ucTransmitterSel:2; // =0: UniphyAB, =1: UniphyCD =2: UniphyEF + UCHAR ucLinkSel:1; // =0: linkA/C/E =1: linkB/D/F + UCHAR ucReserved:1; + UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz +#else + UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz + UCHAR ucReserved:1; + UCHAR ucLinkSel:1; // =0: linkA/C/E =1: linkB/D/F + UCHAR ucTransmitterSel:2; // =0: UniphyAB, =1: UniphyCD =2: UniphyEF + UCHAR ucReserved1:2; +#endif +}ATOM_DIG_ENCODER_CONFIG_V2; + + +typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V2 +{ + USHORT usPixelClock; // in 10KHz; for bios convenient + ATOM_DIG_ENCODER_CONFIG_V2 acConfig; + UCHAR ucAction; + UCHAR ucEncoderMode; + // =0: DP encoder + // =1: LVDS encoder + // =2: DVI encoder + // =3: HDMI encoder + // =4: SDVO encoder + UCHAR ucLaneNum; // how many lanes to enable + UCHAR ucStatus; // = DP_LINK_TRAINING_COMPLETE or DP_LINK_TRAINING_INCOMPLETE, only used by VBIOS with command ATOM_ENCODER_CMD_QUERY_DP_LINK_TRAINING_STATUS + UCHAR ucReserved; +}DIG_ENCODER_CONTROL_PARAMETERS_V2; + +//ucConfig +#define ATOM_ENCODER_CONFIG_V2_DPLINKRATE_MASK 0x01 +#define ATOM_ENCODER_CONFIG_V2_DPLINKRATE_1_62GHZ 0x00 +#define ATOM_ENCODER_CONFIG_V2_DPLINKRATE_2_70GHZ 0x01 +#define ATOM_ENCODER_CONFIG_V2_LINK_SEL_MASK 0x04 +#define ATOM_ENCODER_CONFIG_V2_LINKA 0x00 +#define ATOM_ENCODER_CONFIG_V2_LINKB 0x04 +#define ATOM_ENCODER_CONFIG_V2_TRANSMITTER_SEL_MASK 0x18 +#define ATOM_ENCODER_CONFIG_V2_TRANSMITTER1 0x00 +#define ATOM_ENCODER_CONFIG_V2_TRANSMITTER2 0x08 +#define ATOM_ENCODER_CONFIG_V2_TRANSMITTER3 0x10 + +// ucAction: +// ATOM_DISABLE +// ATOM_ENABLE +#define ATOM_ENCODER_CMD_DP_LINK_TRAINING_START 0x08 +#define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN1 0x09 +#define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN2 0x0a +#define ATOM_ENCODER_CMD_DP_LINK_TRAINING_PATTERN3 0x13 +#define ATOM_ENCODER_CMD_DP_LINK_TRAINING_COMPLETE 0x0b +#define ATOM_ENCODER_CMD_DP_VIDEO_OFF 0x0c +#define ATOM_ENCODER_CMD_DP_VIDEO_ON 0x0d +#define ATOM_ENCODER_CMD_QUERY_DP_LINK_TRAINING_STATUS 0x0e +#define ATOM_ENCODER_CMD_SETUP 0x0f +#define ATOM_ENCODER_CMD_SETUP_PANEL_MODE 0x10 + +// ucStatus +#define ATOM_ENCODER_STATUS_LINK_TRAINING_COMPLETE 0x10 +#define ATOM_ENCODER_STATUS_LINK_TRAINING_INCOMPLETE 0x00 + +//ucTableFormatRevision=1 +//ucTableContentRevision=3 +// Following function ENABLE sub-function will be used by driver when TMDS/HDMI/LVDS is used, disable function will be used by driver +typedef struct _ATOM_DIG_ENCODER_CONFIG_V3 +{ +#if ATOM_BIG_ENDIAN + UCHAR ucReserved1:1; + UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) + UCHAR ucReserved:3; + UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz +#else + UCHAR ucDPLinkRate:1; // =0: 1.62Ghz, =1: 2.7Ghz + UCHAR ucReserved:3; + UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) + UCHAR ucReserved1:1; +#endif +}ATOM_DIG_ENCODER_CONFIG_V3; + +#define ATOM_ENCODER_CONFIG_V3_DPLINKRATE_MASK 0x03 +#define ATOM_ENCODER_CONFIG_V3_DPLINKRATE_1_62GHZ 0x00 +#define ATOM_ENCODER_CONFIG_V3_DPLINKRATE_2_70GHZ 0x01 +#define ATOM_ENCODER_CONFIG_V3_ENCODER_SEL 0x70 +#define ATOM_ENCODER_CONFIG_V3_DIG0_ENCODER 0x00 +#define ATOM_ENCODER_CONFIG_V3_DIG1_ENCODER 0x10 +#define ATOM_ENCODER_CONFIG_V3_DIG2_ENCODER 0x20 +#define ATOM_ENCODER_CONFIG_V3_DIG3_ENCODER 0x30 +#define ATOM_ENCODER_CONFIG_V3_DIG4_ENCODER 0x40 +#define ATOM_ENCODER_CONFIG_V3_DIG5_ENCODER 0x50 + +typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V3 +{ + USHORT usPixelClock; // in 10KHz; for bios convenient + ATOM_DIG_ENCODER_CONFIG_V3 acConfig; + UCHAR ucAction; + union { + UCHAR ucEncoderMode; + // =0: DP encoder + // =1: LVDS encoder + // =2: DVI encoder + // =3: HDMI encoder + // =4: SDVO encoder + // =5: DP audio + UCHAR ucPanelMode; // only valid when ucAction == ATOM_ENCODER_CMD_SETUP_PANEL_MODE + // =0: external DP + // =1: internal DP2 + // =0x11: internal DP1 for NutMeg/Travis DP translator + }; + UCHAR ucLaneNum; // how many lanes to enable + UCHAR ucBitPerColor; // only valid for DP mode when ucAction = ATOM_ENCODER_CMD_SETUP + UCHAR ucReserved; +}DIG_ENCODER_CONTROL_PARAMETERS_V3; + +//ucTableFormatRevision=1 +//ucTableContentRevision=4 +// start from NI +// Following function ENABLE sub-function will be used by driver when TMDS/HDMI/LVDS is used, disable function will be used by driver +typedef struct _ATOM_DIG_ENCODER_CONFIG_V4 +{ +#if ATOM_BIG_ENDIAN + UCHAR ucReserved1:1; + UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) + UCHAR ucReserved:2; + UCHAR ucDPLinkRate:2; // =0: 1.62Ghz, =1: 2.7Ghz, 2=5.4Ghz <= Changed comparing to previous version +#else + UCHAR ucDPLinkRate:2; // =0: 1.62Ghz, =1: 2.7Ghz, 2=5.4Ghz <= Changed comparing to previous version + UCHAR ucReserved:2; + UCHAR ucDigSel:3; // =0/1/2/3/4/5: DIG0/1/2/3/4/5 (In register spec also referred as DIGA/B/C/D/E/F) + UCHAR ucReserved1:1; +#endif +}ATOM_DIG_ENCODER_CONFIG_V4; + +#define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_MASK 0x03 +#define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_1_62GHZ 0x00 +#define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_2_70GHZ 0x01 +#define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_5_40GHZ 0x02 +#define ATOM_ENCODER_CONFIG_V4_DPLINKRATE_3_24GHZ 0x03 +#define ATOM_ENCODER_CONFIG_V4_ENCODER_SEL 0x70 +#define ATOM_ENCODER_CONFIG_V4_DIG0_ENCODER 0x00 +#define ATOM_ENCODER_CONFIG_V4_DIG1_ENCODER 0x10 +#define ATOM_ENCODER_CONFIG_V4_DIG2_ENCODER 0x20 +#define ATOM_ENCODER_CONFIG_V4_DIG3_ENCODER 0x30 +#define ATOM_ENCODER_CONFIG_V4_DIG4_ENCODER 0x40 +#define ATOM_ENCODER_CONFIG_V4_DIG5_ENCODER 0x50 +#define ATOM_ENCODER_CONFIG_V4_DIG6_ENCODER 0x60 + +typedef struct _DIG_ENCODER_CONTROL_PARAMETERS_V4 +{ + USHORT usPixelClock; // in 10KHz; for bios convenient + union{ + ATOM_DIG_ENCODER_CONFIG_V4 acConfig; + UCHAR ucConfig; + }; + UCHAR ucAction; + union { + UCHAR ucEncoderMode; + // =0: DP encoder + // =1: LVDS encoder + // =2: DVI encoder + // =3: HDMI encoder + // =4: SDVO encoder + // =5: DP audio + UCHAR ucPanelMode; // only valid when ucAction == ATOM_ENCODER_CMD_SETUP_PANEL_MODE + // =0: external DP + // =1: internal DP2 + // =0x11: internal DP1 for NutMeg/Travis DP translator + }; + UCHAR ucLaneNum; // how many lanes to enable + UCHAR ucBitPerColor; // only valid for DP mode when ucAction = ATOM_ENCODER_CMD_SETUP + UCHAR ucHPD_ID; // HPD ID (1-6). =0 means to skip HDP programming. New comparing to previous version +}DIG_ENCODER_CONTROL_PARAMETERS_V4; + +// define ucBitPerColor: +#define PANEL_BPC_UNDEFINE 0x00 +#define PANEL_6BIT_PER_COLOR 0x01 +#define PANEL_8BIT_PER_COLOR 0x02 +#define PANEL_10BIT_PER_COLOR 0x03 +#define PANEL_12BIT_PER_COLOR 0x04 +#define PANEL_16BIT_PER_COLOR 0x05 + +//define ucPanelMode +#define DP_PANEL_MODE_EXTERNAL_DP_MODE 0x00 +#define DP_PANEL_MODE_INTERNAL_DP2_MODE 0x01 +#define DP_PANEL_MODE_INTERNAL_DP1_MODE 0x11 + +/****************************************************************************/ +// Structures used by UNIPHYTransmitterControlTable +// LVTMATransmitterControlTable +// DVOOutputControlTable +/****************************************************************************/ +typedef struct _ATOM_DP_VS_MODE +{ + UCHAR ucLaneSel; + UCHAR ucLaneSet; +}ATOM_DP_VS_MODE; + +typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS +{ + union + { + USHORT usPixelClock; // in 10KHz; for bios convenient + USHORT usInitInfo; // when init uniphy,lower 8bit is used for connector type defined in objectid.h + ATOM_DP_VS_MODE asMode; // DP Voltage swing mode + }; + UCHAR ucConfig; + // [0]=0: 4 lane Link, + // =1: 8 lane Link ( Dual Links TMDS ) + // [1]=0: InCoherent mode + // =1: Coherent Mode + // [2] Link Select: + // =0: PHY linkA if bfLane<3 + // =1: PHY linkB if bfLanes<3 + // =0: PHY linkA+B if bfLanes=3 + // [5:4]PCIE lane Sel + // =0: lane 0~3 or 0~7 + // =1: lane 4~7 + // =2: lane 8~11 or 8~15 + // =3: lane 12~15 + UCHAR ucAction; // =0: turn off encoder + // =1: turn on encoder + UCHAR ucReserved[4]; +}DIG_TRANSMITTER_CONTROL_PARAMETERS; + +#define DIG_TRANSMITTER_CONTROL_PS_ALLOCATION DIG_TRANSMITTER_CONTROL_PARAMETERS + +//ucInitInfo +#define ATOM_TRAMITTER_INITINFO_CONNECTOR_MASK 0x00ff + +//ucConfig +#define ATOM_TRANSMITTER_CONFIG_8LANE_LINK 0x01 +#define ATOM_TRANSMITTER_CONFIG_COHERENT 0x02 +#define ATOM_TRANSMITTER_CONFIG_LINK_SEL_MASK 0x04 +#define ATOM_TRANSMITTER_CONFIG_LINKA 0x00 +#define ATOM_TRANSMITTER_CONFIG_LINKB 0x04 +#define ATOM_TRANSMITTER_CONFIG_LINKA_B 0x00 +#define ATOM_TRANSMITTER_CONFIG_LINKB_A 0x04 + +#define ATOM_TRANSMITTER_CONFIG_ENCODER_SEL_MASK 0x08 // only used when ATOM_TRANSMITTER_ACTION_ENABLE +#define ATOM_TRANSMITTER_CONFIG_DIG1_ENCODER 0x00 // only used when ATOM_TRANSMITTER_ACTION_ENABLE +#define ATOM_TRANSMITTER_CONFIG_DIG2_ENCODER 0x08 // only used when ATOM_TRANSMITTER_ACTION_ENABLE + +#define ATOM_TRANSMITTER_CONFIG_CLKSRC_MASK 0x30 +#define ATOM_TRANSMITTER_CONFIG_CLKSRC_PPLL 0x00 +#define ATOM_TRANSMITTER_CONFIG_CLKSRC_PCIE 0x20 +#define ATOM_TRANSMITTER_CONFIG_CLKSRC_XTALIN 0x30 +#define ATOM_TRANSMITTER_CONFIG_LANE_SEL_MASK 0xc0 +#define ATOM_TRANSMITTER_CONFIG_LANE_0_3 0x00 +#define ATOM_TRANSMITTER_CONFIG_LANE_0_7 0x00 +#define ATOM_TRANSMITTER_CONFIG_LANE_4_7 0x40 +#define ATOM_TRANSMITTER_CONFIG_LANE_8_11 0x80 +#define ATOM_TRANSMITTER_CONFIG_LANE_8_15 0x80 +#define ATOM_TRANSMITTER_CONFIG_LANE_12_15 0xc0 + +//ucAction +#define ATOM_TRANSMITTER_ACTION_DISABLE 0 +#define ATOM_TRANSMITTER_ACTION_ENABLE 1 +#define ATOM_TRANSMITTER_ACTION_LCD_BLOFF 2 +#define ATOM_TRANSMITTER_ACTION_LCD_BLON 3 +#define ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL 4 +#define ATOM_TRANSMITTER_ACTION_LCD_SELFTEST_START 5 +#define ATOM_TRANSMITTER_ACTION_LCD_SELFTEST_STOP 6 +#define ATOM_TRANSMITTER_ACTION_INIT 7 +#define ATOM_TRANSMITTER_ACTION_DISABLE_OUTPUT 8 +#define ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT 9 +#define ATOM_TRANSMITTER_ACTION_SETUP 10 +#define ATOM_TRANSMITTER_ACTION_SETUP_VSEMPH 11 +#define ATOM_TRANSMITTER_ACTION_POWER_ON 12 +#define ATOM_TRANSMITTER_ACTION_POWER_OFF 13 + +// Following are used for DigTransmitterControlTable ver1.2 +typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V2 +{ +#if ATOM_BIG_ENDIAN + UCHAR ucTransmitterSel:2; //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) + // =1 Dig Transmitter 2 ( Uniphy CD ) + // =2 Dig Transmitter 3 ( Uniphy EF ) + UCHAR ucReserved:1; + UCHAR fDPConnector:1; //bit4=0: DP connector =1: None DP connector + UCHAR ucEncoderSel:1; //bit3=0: Data/Clk path source from DIGA( DIG inst0 ). =1: Data/clk path source from DIGB ( DIG inst1 ) + UCHAR ucLinkSel:1; //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E + // =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F + + UCHAR fCoherentMode:1; //bit1=1: Coherent Mode ( for DVI/HDMI mode ) + UCHAR fDualLinkConnector:1; //bit0=1: Dual Link DVI connector +#else + UCHAR fDualLinkConnector:1; //bit0=1: Dual Link DVI connector + UCHAR fCoherentMode:1; //bit1=1: Coherent Mode ( for DVI/HDMI mode ) + UCHAR ucLinkSel:1; //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E + // =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F + UCHAR ucEncoderSel:1; //bit3=0: Data/Clk path source from DIGA( DIG inst0 ). =1: Data/clk path source from DIGB ( DIG inst1 ) + UCHAR fDPConnector:1; //bit4=0: DP connector =1: None DP connector + UCHAR ucReserved:1; + UCHAR ucTransmitterSel:2; //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) + // =1 Dig Transmitter 2 ( Uniphy CD ) + // =2 Dig Transmitter 3 ( Uniphy EF ) +#endif +}ATOM_DIG_TRANSMITTER_CONFIG_V2; + +//ucConfig +//Bit0 +#define ATOM_TRANSMITTER_CONFIG_V2_DUAL_LINK_CONNECTOR 0x01 + +//Bit1 +#define ATOM_TRANSMITTER_CONFIG_V2_COHERENT 0x02 + +//Bit2 +#define ATOM_TRANSMITTER_CONFIG_V2_LINK_SEL_MASK 0x04 +#define ATOM_TRANSMITTER_CONFIG_V2_LINKA 0x00 +#define ATOM_TRANSMITTER_CONFIG_V2_LINKB 0x04 + +// Bit3 +#define ATOM_TRANSMITTER_CONFIG_V2_ENCODER_SEL_MASK 0x08 +#define ATOM_TRANSMITTER_CONFIG_V2_DIG1_ENCODER 0x00 // only used when ucAction == ATOM_TRANSMITTER_ACTION_ENABLE or ATOM_TRANSMITTER_ACTION_SETUP +#define ATOM_TRANSMITTER_CONFIG_V2_DIG2_ENCODER 0x08 // only used when ucAction == ATOM_TRANSMITTER_ACTION_ENABLE or ATOM_TRANSMITTER_ACTION_SETUP + +// Bit4 +#define ATOM_TRASMITTER_CONFIG_V2_DP_CONNECTOR 0x10 + +// Bit7:6 +#define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER_SEL_MASK 0xC0 +#define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER1 0x00 //AB +#define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER2 0x40 //CD +#define ATOM_TRANSMITTER_CONFIG_V2_TRANSMITTER3 0x80 //EF + +typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V2 +{ + union + { + USHORT usPixelClock; // in 10KHz; for bios convenient + USHORT usInitInfo; // when init uniphy,lower 8bit is used for connector type defined in objectid.h + ATOM_DP_VS_MODE asMode; // DP Voltage swing mode + }; + ATOM_DIG_TRANSMITTER_CONFIG_V2 acConfig; + UCHAR ucAction; // define as ATOM_TRANSMITER_ACTION_XXX + UCHAR ucReserved[4]; +}DIG_TRANSMITTER_CONTROL_PARAMETERS_V2; + +typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V3 +{ +#if ATOM_BIG_ENDIAN + UCHAR ucTransmitterSel:2; //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) + // =1 Dig Transmitter 2 ( Uniphy CD ) + // =2 Dig Transmitter 3 ( Uniphy EF ) + UCHAR ucRefClkSource:2; //bit5:4: PPLL1 =0, PPLL2=1, EXT_CLK=2 + UCHAR ucEncoderSel:1; //bit3=0: Data/Clk path source from DIGA/C/E. =1: Data/clk path source from DIGB/D/F + UCHAR ucLinkSel:1; //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E + // =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F + UCHAR fCoherentMode:1; //bit1=1: Coherent Mode ( for DVI/HDMI mode ) + UCHAR fDualLinkConnector:1; //bit0=1: Dual Link DVI connector +#else + UCHAR fDualLinkConnector:1; //bit0=1: Dual Link DVI connector + UCHAR fCoherentMode:1; //bit1=1: Coherent Mode ( for DVI/HDMI mode ) + UCHAR ucLinkSel:1; //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E + // =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F + UCHAR ucEncoderSel:1; //bit3=0: Data/Clk path source from DIGA/C/E. =1: Data/clk path source from DIGB/D/F + UCHAR ucRefClkSource:2; //bit5:4: PPLL1 =0, PPLL2=1, EXT_CLK=2 + UCHAR ucTransmitterSel:2; //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) + // =1 Dig Transmitter 2 ( Uniphy CD ) + // =2 Dig Transmitter 3 ( Uniphy EF ) +#endif +}ATOM_DIG_TRANSMITTER_CONFIG_V3; + + +typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V3 +{ + union + { + USHORT usPixelClock; // in 10KHz; for bios convenient + USHORT usInitInfo; // when init uniphy,lower 8bit is used for connector type defined in objectid.h + ATOM_DP_VS_MODE asMode; // DP Voltage swing mode + }; + ATOM_DIG_TRANSMITTER_CONFIG_V3 acConfig; + UCHAR ucAction; // define as ATOM_TRANSMITER_ACTION_XXX + UCHAR ucLaneNum; + UCHAR ucReserved[3]; +}DIG_TRANSMITTER_CONTROL_PARAMETERS_V3; + +//ucConfig +//Bit0 +#define ATOM_TRANSMITTER_CONFIG_V3_DUAL_LINK_CONNECTOR 0x01 + +//Bit1 +#define ATOM_TRANSMITTER_CONFIG_V3_COHERENT 0x02 + +//Bit2 +#define ATOM_TRANSMITTER_CONFIG_V3_LINK_SEL_MASK 0x04 +#define ATOM_TRANSMITTER_CONFIG_V3_LINKA 0x00 +#define ATOM_TRANSMITTER_CONFIG_V3_LINKB 0x04 + +// Bit3 +#define ATOM_TRANSMITTER_CONFIG_V3_ENCODER_SEL_MASK 0x08 +#define ATOM_TRANSMITTER_CONFIG_V3_DIG1_ENCODER 0x00 +#define ATOM_TRANSMITTER_CONFIG_V3_DIG2_ENCODER 0x08 + +// Bit5:4 +#define ATOM_TRASMITTER_CONFIG_V3_REFCLK_SEL_MASK 0x30 +#define ATOM_TRASMITTER_CONFIG_V3_P1PLL 0x00 +#define ATOM_TRASMITTER_CONFIG_V3_P2PLL 0x10 +#define ATOM_TRASMITTER_CONFIG_V3_REFCLK_SRC_EXT 0x20 + +// Bit7:6 +#define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER_SEL_MASK 0xC0 +#define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER1 0x00 //AB +#define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER2 0x40 //CD +#define ATOM_TRANSMITTER_CONFIG_V3_TRANSMITTER3 0x80 //EF + + +/****************************************************************************/ +// Structures used by UNIPHYTransmitterControlTable V1.4 +// ASIC Families: NI +// ucTableFormatRevision=1 +// ucTableContentRevision=4 +/****************************************************************************/ +typedef struct _ATOM_DP_VS_MODE_V4 +{ + UCHAR ucLaneSel; + union + { + UCHAR ucLaneSet; + struct { +#if ATOM_BIG_ENDIAN + UCHAR ucPOST_CURSOR2:2; //Bit[7:6] Post Cursor2 Level <= New in V4 + UCHAR ucPRE_EMPHASIS:3; //Bit[5:3] Pre-emphasis Level + UCHAR ucVOLTAGE_SWING:3; //Bit[2:0] Voltage Swing Level +#else + UCHAR ucVOLTAGE_SWING:3; //Bit[2:0] Voltage Swing Level + UCHAR ucPRE_EMPHASIS:3; //Bit[5:3] Pre-emphasis Level + UCHAR ucPOST_CURSOR2:2; //Bit[7:6] Post Cursor2 Level <= New in V4 +#endif + }; + }; +}ATOM_DP_VS_MODE_V4; + +typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V4 +{ +#if ATOM_BIG_ENDIAN + UCHAR ucTransmitterSel:2; //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) + // =1 Dig Transmitter 2 ( Uniphy CD ) + // =2 Dig Transmitter 3 ( Uniphy EF ) + UCHAR ucRefClkSource:2; //bit5:4: PPLL1 =0, PPLL2=1, DCPLL=2, EXT_CLK=3 <= New + UCHAR ucEncoderSel:1; //bit3=0: Data/Clk path source from DIGA/C/E. =1: Data/clk path source from DIGB/D/F + UCHAR ucLinkSel:1; //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E + // =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F + UCHAR fCoherentMode:1; //bit1=1: Coherent Mode ( for DVI/HDMI mode ) + UCHAR fDualLinkConnector:1; //bit0=1: Dual Link DVI connector +#else + UCHAR fDualLinkConnector:1; //bit0=1: Dual Link DVI connector + UCHAR fCoherentMode:1; //bit1=1: Coherent Mode ( for DVI/HDMI mode ) + UCHAR ucLinkSel:1; //bit2=0: Uniphy LINKA or C or E when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is A or C or E + // =1: Uniphy LINKB or D or F when fDualLinkConnector=0. when fDualLinkConnector=1, it means master link of dual link is B or D or F + UCHAR ucEncoderSel:1; //bit3=0: Data/Clk path source from DIGA/C/E. =1: Data/clk path source from DIGB/D/F + UCHAR ucRefClkSource:2; //bit5:4: PPLL1 =0, PPLL2=1, DCPLL=2, EXT_CLK=3 <= New + UCHAR ucTransmitterSel:2; //bit7:6: =0 Dig Transmitter 1 ( Uniphy AB ) + // =1 Dig Transmitter 2 ( Uniphy CD ) + // =2 Dig Transmitter 3 ( Uniphy EF ) +#endif +}ATOM_DIG_TRANSMITTER_CONFIG_V4; + +typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V4 +{ + union + { + USHORT usPixelClock; // in 10KHz; for bios convenient + USHORT usInitInfo; // when init uniphy,lower 8bit is used for connector type defined in objectid.h + ATOM_DP_VS_MODE_V4 asMode; // DP Voltage swing mode Redefined comparing to previous version + }; + union + { + ATOM_DIG_TRANSMITTER_CONFIG_V4 acConfig; + UCHAR ucConfig; + }; + UCHAR ucAction; // define as ATOM_TRANSMITER_ACTION_XXX + UCHAR ucLaneNum; + UCHAR ucReserved[3]; +}DIG_TRANSMITTER_CONTROL_PARAMETERS_V4; + +//ucConfig +//Bit0 +#define ATOM_TRANSMITTER_CONFIG_V4_DUAL_LINK_CONNECTOR 0x01 +//Bit1 +#define ATOM_TRANSMITTER_CONFIG_V4_COHERENT 0x02 +//Bit2 +#define ATOM_TRANSMITTER_CONFIG_V4_LINK_SEL_MASK 0x04 +#define ATOM_TRANSMITTER_CONFIG_V4_LINKA 0x00 +#define ATOM_TRANSMITTER_CONFIG_V4_LINKB 0x04 +// Bit3 +#define ATOM_TRANSMITTER_CONFIG_V4_ENCODER_SEL_MASK 0x08 +#define ATOM_TRANSMITTER_CONFIG_V4_DIG1_ENCODER 0x00 +#define ATOM_TRANSMITTER_CONFIG_V4_DIG2_ENCODER 0x08 +// Bit5:4 +#define ATOM_TRANSMITTER_CONFIG_V4_REFCLK_SEL_MASK 0x30 +#define ATOM_TRANSMITTER_CONFIG_V4_P1PLL 0x00 +#define ATOM_TRANSMITTER_CONFIG_V4_P2PLL 0x10 +#define ATOM_TRANSMITTER_CONFIG_V4_DCPLL 0x20 // New in _V4 +#define ATOM_TRANSMITTER_CONFIG_V4_REFCLK_SRC_EXT 0x30 // Changed comparing to V3 +// Bit7:6 +#define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER_SEL_MASK 0xC0 +#define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER1 0x00 //AB +#define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER2 0x40 //CD +#define ATOM_TRANSMITTER_CONFIG_V4_TRANSMITTER3 0x80 //EF + + +typedef struct _ATOM_DIG_TRANSMITTER_CONFIG_V5 +{ +#if ATOM_BIG_ENDIAN + UCHAR ucReservd1:1; + UCHAR ucHPDSel:3; + UCHAR ucPhyClkSrcId:2; + UCHAR ucCoherentMode:1; + UCHAR ucReserved:1; +#else + UCHAR ucReserved:1; + UCHAR ucCoherentMode:1; + UCHAR ucPhyClkSrcId:2; + UCHAR ucHPDSel:3; + UCHAR ucReservd1:1; +#endif +}ATOM_DIG_TRANSMITTER_CONFIG_V5; + +typedef struct _DIG_TRANSMITTER_CONTROL_PARAMETERS_V1_5 +{ + USHORT usSymClock; // Encoder Clock in 10kHz,(DP mode)= linkclock/10, (TMDS/LVDS/HDMI)= pixel clock, (HDMI deep color), =pixel clock * deep_color_ratio + UCHAR ucPhyId; // 0=UNIPHYA, 1=UNIPHYB, 2=UNIPHYC, 3=UNIPHYD, 4= UNIPHYE 5=UNIPHYF + UCHAR ucAction; // define as ATOM_TRANSMITER_ACTION_xxx + UCHAR ucLaneNum; // indicate lane number 1-8 + UCHAR ucConnObjId; // Connector Object Id defined in ObjectId.h + UCHAR ucDigMode; // indicate DIG mode + union{ + ATOM_DIG_TRANSMITTER_CONFIG_V5 asConfig; + UCHAR ucConfig; + }; + UCHAR ucDigEncoderSel; // indicate DIG front end encoder + UCHAR ucDPLaneSet; + UCHAR ucReserved; + UCHAR ucReserved1; +}DIG_TRANSMITTER_CONTROL_PARAMETERS_V1_5; + +//ucPhyId +#define ATOM_PHY_ID_UNIPHYA 0 +#define ATOM_PHY_ID_UNIPHYB 1 +#define ATOM_PHY_ID_UNIPHYC 2 +#define ATOM_PHY_ID_UNIPHYD 3 +#define ATOM_PHY_ID_UNIPHYE 4 +#define ATOM_PHY_ID_UNIPHYF 5 +#define ATOM_PHY_ID_UNIPHYG 6 + +// ucDigEncoderSel +#define ATOM_TRANMSITTER_V5__DIGA_SEL 0x01 +#define ATOM_TRANMSITTER_V5__DIGB_SEL 0x02 +#define ATOM_TRANMSITTER_V5__DIGC_SEL 0x04 +#define ATOM_TRANMSITTER_V5__DIGD_SEL 0x08 +#define ATOM_TRANMSITTER_V5__DIGE_SEL 0x10 +#define ATOM_TRANMSITTER_V5__DIGF_SEL 0x20 +#define ATOM_TRANMSITTER_V5__DIGG_SEL 0x40 + +// ucDigMode +#define ATOM_TRANSMITTER_DIGMODE_V5_DP 0 +#define ATOM_TRANSMITTER_DIGMODE_V5_LVDS 1 +#define ATOM_TRANSMITTER_DIGMODE_V5_DVI 2 +#define ATOM_TRANSMITTER_DIGMODE_V5_HDMI 3 +#define ATOM_TRANSMITTER_DIGMODE_V5_SDVO 4 +#define ATOM_TRANSMITTER_DIGMODE_V5_DP_MST 5 + +// ucDPLaneSet +#define DP_LANE_SET__0DB_0_4V 0x00 +#define DP_LANE_SET__0DB_0_6V 0x01 +#define DP_LANE_SET__0DB_0_8V 0x02 +#define DP_LANE_SET__0DB_1_2V 0x03 +#define DP_LANE_SET__3_5DB_0_4V 0x08 +#define DP_LANE_SET__3_5DB_0_6V 0x09 +#define DP_LANE_SET__3_5DB_0_8V 0x0a +#define DP_LANE_SET__6DB_0_4V 0x10 +#define DP_LANE_SET__6DB_0_6V 0x11 +#define DP_LANE_SET__9_5DB_0_4V 0x18 + +// ATOM_DIG_TRANSMITTER_CONFIG_V5 asConfig; +// Bit1 +#define ATOM_TRANSMITTER_CONFIG_V5_COHERENT 0x02 + +// Bit3:2 +#define ATOM_TRANSMITTER_CONFIG_V5_REFCLK_SEL_MASK 0x0c +#define ATOM_TRANSMITTER_CONFIG_V5_REFCLK_SEL_SHIFT 0x02 + +#define ATOM_TRANSMITTER_CONFIG_V5_P1PLL 0x00 +#define ATOM_TRANSMITTER_CONFIG_V5_P2PLL 0x04 +#define ATOM_TRANSMITTER_CONFIG_V5_P0PLL 0x08 +#define ATOM_TRANSMITTER_CONFIG_V5_REFCLK_SRC_EXT 0x0c +// Bit6:4 +#define ATOM_TRANSMITTER_CONFIG_V5_HPD_SEL_MASK 0x70 +#define ATOM_TRANSMITTER_CONFIG_V5_HPD_SEL_SHIFT 0x04 + +#define ATOM_TRANSMITTER_CONFIG_V5_NO_HPD_SEL 0x00 +#define ATOM_TRANSMITTER_CONFIG_V5_HPD1_SEL 0x10 +#define ATOM_TRANSMITTER_CONFIG_V5_HPD2_SEL 0x20 +#define ATOM_TRANSMITTER_CONFIG_V5_HPD3_SEL 0x30 +#define ATOM_TRANSMITTER_CONFIG_V5_HPD4_SEL 0x40 +#define ATOM_TRANSMITTER_CONFIG_V5_HPD5_SEL 0x50 +#define ATOM_TRANSMITTER_CONFIG_V5_HPD6_SEL 0x60 + +#define DIG_TRANSMITTER_CONTROL_PS_ALLOCATION_V1_5 DIG_TRANSMITTER_CONTROL_PARAMETERS_V1_5 + + +/****************************************************************************/ +// Structures used by ExternalEncoderControlTable V1.3 +// ASIC Families: Evergreen, Llano, NI +// ucTableFormatRevision=1 +// ucTableContentRevision=3 +/****************************************************************************/ + +typedef struct _EXTERNAL_ENCODER_CONTROL_PARAMETERS_V3 +{ + union{ + USHORT usPixelClock; // pixel clock in 10Khz, valid when ucAction=SETUP/ENABLE_OUTPUT + USHORT usConnectorId; // connector id, valid when ucAction = INIT + }; + UCHAR ucConfig; // indicate which encoder, and DP link rate when ucAction = SETUP/ENABLE_OUTPUT + UCHAR ucAction; // + UCHAR ucEncoderMode; // encoder mode, only used when ucAction = SETUP/ENABLE_OUTPUT + UCHAR ucLaneNum; // lane number, only used when ucAction = SETUP/ENABLE_OUTPUT + UCHAR ucBitPerColor; // output bit per color, only valid when ucAction = SETUP/ENABLE_OUTPUT and ucEncodeMode= DP + UCHAR ucReserved; +}EXTERNAL_ENCODER_CONTROL_PARAMETERS_V3; + +// ucAction +#define EXTERNAL_ENCODER_ACTION_V3_DISABLE_OUTPUT 0x00 +#define EXTERNAL_ENCODER_ACTION_V3_ENABLE_OUTPUT 0x01 +#define EXTERNAL_ENCODER_ACTION_V3_ENCODER_INIT 0x07 +#define EXTERNAL_ENCODER_ACTION_V3_ENCODER_SETUP 0x0f +#define EXTERNAL_ENCODER_ACTION_V3_ENCODER_BLANKING_OFF 0x10 +#define EXTERNAL_ENCODER_ACTION_V3_ENCODER_BLANKING 0x11 +#define EXTERNAL_ENCODER_ACTION_V3_DACLOAD_DETECTION 0x12 +#define EXTERNAL_ENCODER_ACTION_V3_DDC_SETUP 0x14 + +// ucConfig +#define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_MASK 0x03 +#define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_1_62GHZ 0x00 +#define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_2_70GHZ 0x01 +#define EXTERNAL_ENCODER_CONFIG_V3_DPLINKRATE_5_40GHZ 0x02 +#define EXTERNAL_ENCODER_CONFIG_V3_ENCODER_SEL_MASK 0x70 +#define EXTERNAL_ENCODER_CONFIG_V3_ENCODER1 0x00 +#define EXTERNAL_ENCODER_CONFIG_V3_ENCODER2 0x10 +#define EXTERNAL_ENCODER_CONFIG_V3_ENCODER3 0x20 + +typedef struct _EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION_V3 +{ + EXTERNAL_ENCODER_CONTROL_PARAMETERS_V3 sExtEncoder; + ULONG ulReserved[2]; +}EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION_V3; + + +/****************************************************************************/ +// Structures used by DAC1OuputControlTable +// DAC2OuputControlTable +// LVTMAOutputControlTable (Before DEC30) +// TMDSAOutputControlTable (Before DEC30) +/****************************************************************************/ +typedef struct _DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS +{ + UCHAR ucAction; // Possible input:ATOM_ENABLE||ATOMDISABLE + // When the display is LCD, in addition to above: + // ATOM_LCD_BLOFF|| ATOM_LCD_BLON ||ATOM_LCD_BL_BRIGHTNESS_CONTROL||ATOM_LCD_SELFTEST_START|| + // ATOM_LCD_SELFTEST_STOP + + UCHAR aucPadding[3]; // padding to DWORD aligned +}DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS; + +#define DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS + + +#define CRT1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS +#define CRT1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION + +#define CRT2_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS +#define CRT2_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION + +#define CV1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS +#define CV1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION + +#define TV1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS +#define TV1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION + +#define DFP1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS +#define DFP1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION + +#define DFP2_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS +#define DFP2_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION + +#define LCD1_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS +#define LCD1_OUTPUT_CONTROL_PS_ALLOCATION DISPLAY_DEVICE_OUTPUT_CONTROL_PS_ALLOCATION + +#define DVO_OUTPUT_CONTROL_PARAMETERS DISPLAY_DEVICE_OUTPUT_CONTROL_PARAMETERS +#define DVO_OUTPUT_CONTROL_PS_ALLOCATION DIG_TRANSMITTER_CONTROL_PS_ALLOCATION +#define DVO_OUTPUT_CONTROL_PARAMETERS_V3 DIG_TRANSMITTER_CONTROL_PARAMETERS + +/****************************************************************************/ +// Structures used by BlankCRTCTable +/****************************************************************************/ +typedef struct _BLANK_CRTC_PARAMETERS +{ + UCHAR ucCRTC; // ATOM_CRTC1 or ATOM_CRTC2 + UCHAR ucBlanking; // ATOM_BLANKING or ATOM_BLANKINGOFF + USHORT usBlackColorRCr; + USHORT usBlackColorGY; + USHORT usBlackColorBCb; +}BLANK_CRTC_PARAMETERS; +#define BLANK_CRTC_PS_ALLOCATION BLANK_CRTC_PARAMETERS + +/****************************************************************************/ +// Structures used by EnableCRTCTable +// EnableCRTCMemReqTable +// UpdateCRTC_DoubleBufferRegistersTable +/****************************************************************************/ +typedef struct _ENABLE_CRTC_PARAMETERS +{ + UCHAR ucCRTC; // ATOM_CRTC1 or ATOM_CRTC2 + UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE + UCHAR ucPadding[2]; +}ENABLE_CRTC_PARAMETERS; +#define ENABLE_CRTC_PS_ALLOCATION ENABLE_CRTC_PARAMETERS + +/****************************************************************************/ +// Structures used by SetCRTC_OverScanTable +/****************************************************************************/ +typedef struct _SET_CRTC_OVERSCAN_PARAMETERS +{ + USHORT usOverscanRight; // right + USHORT usOverscanLeft; // left + USHORT usOverscanBottom; // bottom + USHORT usOverscanTop; // top + UCHAR ucCRTC; // ATOM_CRTC1 or ATOM_CRTC2 + UCHAR ucPadding[3]; +}SET_CRTC_OVERSCAN_PARAMETERS; +#define SET_CRTC_OVERSCAN_PS_ALLOCATION SET_CRTC_OVERSCAN_PARAMETERS + +/****************************************************************************/ +// Structures used by SetCRTC_ReplicationTable +/****************************************************************************/ +typedef struct _SET_CRTC_REPLICATION_PARAMETERS +{ + UCHAR ucH_Replication; // horizontal replication + UCHAR ucV_Replication; // vertical replication + UCHAR usCRTC; // ATOM_CRTC1 or ATOM_CRTC2 + UCHAR ucPadding; +}SET_CRTC_REPLICATION_PARAMETERS; +#define SET_CRTC_REPLICATION_PS_ALLOCATION SET_CRTC_REPLICATION_PARAMETERS + +/****************************************************************************/ +// Structures used by SelectCRTC_SourceTable +/****************************************************************************/ +typedef struct _SELECT_CRTC_SOURCE_PARAMETERS +{ + UCHAR ucCRTC; // ATOM_CRTC1 or ATOM_CRTC2 + UCHAR ucDevice; // ATOM_DEVICE_CRT1|ATOM_DEVICE_CRT2|.... + UCHAR ucPadding[2]; +}SELECT_CRTC_SOURCE_PARAMETERS; +#define SELECT_CRTC_SOURCE_PS_ALLOCATION SELECT_CRTC_SOURCE_PARAMETERS + +typedef struct _SELECT_CRTC_SOURCE_PARAMETERS_V2 +{ + UCHAR ucCRTC; // ATOM_CRTC1 or ATOM_CRTC2 + UCHAR ucEncoderID; // DAC1/DAC2/TVOUT/DIG1/DIG2/DVO + UCHAR ucEncodeMode; // Encoding mode, only valid when using DIG1/DIG2/DVO + UCHAR ucPadding; +}SELECT_CRTC_SOURCE_PARAMETERS_V2; + +//ucEncoderID +//#define ASIC_INT_DAC1_ENCODER_ID 0x00 +//#define ASIC_INT_TV_ENCODER_ID 0x02 +//#define ASIC_INT_DIG1_ENCODER_ID 0x03 +//#define ASIC_INT_DAC2_ENCODER_ID 0x04 +//#define ASIC_EXT_TV_ENCODER_ID 0x06 +//#define ASIC_INT_DVO_ENCODER_ID 0x07 +//#define ASIC_INT_DIG2_ENCODER_ID 0x09 +//#define ASIC_EXT_DIG_ENCODER_ID 0x05 + +//ucEncodeMode +//#define ATOM_ENCODER_MODE_DP 0 +//#define ATOM_ENCODER_MODE_LVDS 1 +//#define ATOM_ENCODER_MODE_DVI 2 +//#define ATOM_ENCODER_MODE_HDMI 3 +//#define ATOM_ENCODER_MODE_SDVO 4 +//#define ATOM_ENCODER_MODE_TV 13 +//#define ATOM_ENCODER_MODE_CV 14 +//#define ATOM_ENCODER_MODE_CRT 15 + +/****************************************************************************/ +// Structures used by SetPixelClockTable +// GetPixelClockTable +/****************************************************************************/ +//Major revision=1., Minor revision=1 +typedef struct _PIXEL_CLOCK_PARAMETERS +{ + USHORT usPixelClock; // in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div) + // 0 means disable PPLL + USHORT usRefDiv; // Reference divider + USHORT usFbDiv; // feedback divider + UCHAR ucPostDiv; // post divider + UCHAR ucFracFbDiv; // fractional feedback divider + UCHAR ucPpll; // ATOM_PPLL1 or ATOM_PPL2 + UCHAR ucRefDivSrc; // ATOM_PJITTER or ATO_NONPJITTER + UCHAR ucCRTC; // Which CRTC uses this Ppll + UCHAR ucPadding; +}PIXEL_CLOCK_PARAMETERS; + +//Major revision=1., Minor revision=2, add ucMiscIfno +//ucMiscInfo: +#define MISC_FORCE_REPROG_PIXEL_CLOCK 0x1 +#define MISC_DEVICE_INDEX_MASK 0xF0 +#define MISC_DEVICE_INDEX_SHIFT 4 + +typedef struct _PIXEL_CLOCK_PARAMETERS_V2 +{ + USHORT usPixelClock; // in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div) + // 0 means disable PPLL + USHORT usRefDiv; // Reference divider + USHORT usFbDiv; // feedback divider + UCHAR ucPostDiv; // post divider + UCHAR ucFracFbDiv; // fractional feedback divider + UCHAR ucPpll; // ATOM_PPLL1 or ATOM_PPL2 + UCHAR ucRefDivSrc; // ATOM_PJITTER or ATO_NONPJITTER + UCHAR ucCRTC; // Which CRTC uses this Ppll + UCHAR ucMiscInfo; // Different bits for different purpose, bit [7:4] as device index, bit[0]=Force prog +}PIXEL_CLOCK_PARAMETERS_V2; + +//Major revision=1., Minor revision=3, structure/definition change +//ucEncoderMode: +//ATOM_ENCODER_MODE_DP +//ATOM_ENOCDER_MODE_LVDS +//ATOM_ENOCDER_MODE_DVI +//ATOM_ENOCDER_MODE_HDMI +//ATOM_ENOCDER_MODE_SDVO +//ATOM_ENCODER_MODE_TV 13 +//ATOM_ENCODER_MODE_CV 14 +//ATOM_ENCODER_MODE_CRT 15 + +//ucDVOConfig +//#define DVO_ENCODER_CONFIG_RATE_SEL 0x01 +//#define DVO_ENCODER_CONFIG_DDR_SPEED 0x00 +//#define DVO_ENCODER_CONFIG_SDR_SPEED 0x01 +//#define DVO_ENCODER_CONFIG_OUTPUT_SEL 0x0c +//#define DVO_ENCODER_CONFIG_LOW12BIT 0x00 +//#define DVO_ENCODER_CONFIG_UPPER12BIT 0x04 +//#define DVO_ENCODER_CONFIG_24BIT 0x08 + +//ucMiscInfo: also changed, see below +#define PIXEL_CLOCK_MISC_FORCE_PROG_PPLL 0x01 +#define PIXEL_CLOCK_MISC_VGA_MODE 0x02 +#define PIXEL_CLOCK_MISC_CRTC_SEL_MASK 0x04 +#define PIXEL_CLOCK_MISC_CRTC_SEL_CRTC1 0x00 +#define PIXEL_CLOCK_MISC_CRTC_SEL_CRTC2 0x04 +#define PIXEL_CLOCK_MISC_USE_ENGINE_FOR_DISPCLK 0x08 +#define PIXEL_CLOCK_MISC_REF_DIV_SRC 0x10 +// V1.4 for RoadRunner +#define PIXEL_CLOCK_V4_MISC_SS_ENABLE 0x10 +#define PIXEL_CLOCK_V4_MISC_COHERENT_MODE 0x20 + + +typedef struct _PIXEL_CLOCK_PARAMETERS_V3 +{ + USHORT usPixelClock; // in 10kHz unit; for bios convenient = (RefClk*FB_Div)/(Ref_Div*Post_Div) + // 0 means disable PPLL. For VGA PPLL,make sure this value is not 0. + USHORT usRefDiv; // Reference divider + USHORT usFbDiv; // feedback divider + UCHAR ucPostDiv; // post divider + UCHAR ucFracFbDiv; // fractional feedback divider + UCHAR ucPpll; // ATOM_PPLL1 or ATOM_PPL2 + UCHAR ucTransmitterId; // graphic encoder id defined in objectId.h + union + { + UCHAR ucEncoderMode; // encoder type defined as ATOM_ENCODER_MODE_DP/DVI/HDMI/ + UCHAR ucDVOConfig; // when use DVO, need to know SDR/DDR, 12bit or 24bit + }; + UCHAR ucMiscInfo; // bit[0]=Force program, bit[1]= set pclk for VGA, b[2]= CRTC sel + // bit[3]=0:use PPLL for dispclk source, =1: use engine clock for dispclock source + // bit[4]=0:use XTALIN as the source of reference divider,=1 use the pre-defined clock as the source of reference divider +}PIXEL_CLOCK_PARAMETERS_V3; + +#define PIXEL_CLOCK_PARAMETERS_LAST PIXEL_CLOCK_PARAMETERS_V2 +#define GET_PIXEL_CLOCK_PS_ALLOCATION PIXEL_CLOCK_PARAMETERS_LAST + +typedef struct _PIXEL_CLOCK_PARAMETERS_V5 +{ + UCHAR ucCRTC; // ATOM_CRTC1~6, indicate the CRTC controller to + // drive the pixel clock. not used for DCPLL case. + union{ + UCHAR ucReserved; + UCHAR ucFracFbDiv; // [gphan] temporary to prevent build problem. remove it after driver code is changed. + }; + USHORT usPixelClock; // target the pixel clock to drive the CRTC timing + // 0 means disable PPLL/DCPLL. + USHORT usFbDiv; // feedback divider integer part. + UCHAR ucPostDiv; // post divider. + UCHAR ucRefDiv; // Reference divider + UCHAR ucPpll; // ATOM_PPLL1/ATOM_PPLL2/ATOM_DCPLL + UCHAR ucTransmitterID; // ASIC encoder id defined in objectId.h, + // indicate which graphic encoder will be used. + UCHAR ucEncoderMode; // Encoder mode: + UCHAR ucMiscInfo; // bit[0]= Force program PPLL + // bit[1]= when VGA timing is used. + // bit[3:2]= HDMI panel bit depth: =0: 24bpp =1:30bpp, =2:32bpp + // bit[4]= RefClock source for PPLL. + // =0: XTLAIN( default mode ) + // =1: other external clock source, which is pre-defined + // by VBIOS depend on the feature required. + // bit[7:5]: reserved. + ULONG ulFbDivDecFrac; // 20 bit feedback divider decimal fraction part, range from 1~999999 ( 0.000001 to 0.999999 ) + +}PIXEL_CLOCK_PARAMETERS_V5; + +#define PIXEL_CLOCK_V5_MISC_FORCE_PROG_PPLL 0x01 +#define PIXEL_CLOCK_V5_MISC_VGA_MODE 0x02 +#define PIXEL_CLOCK_V5_MISC_HDMI_BPP_MASK 0x0c +#define PIXEL_CLOCK_V5_MISC_HDMI_24BPP 0x00 +#define PIXEL_CLOCK_V5_MISC_HDMI_30BPP 0x04 +#define PIXEL_CLOCK_V5_MISC_HDMI_32BPP 0x08 +#define PIXEL_CLOCK_V5_MISC_REF_DIV_SRC 0x10 + +typedef struct _CRTC_PIXEL_CLOCK_FREQ +{ +#if ATOM_BIG_ENDIAN + ULONG ucCRTC:8; // ATOM_CRTC1~6, indicate the CRTC controller to + // drive the pixel clock. not used for DCPLL case. + ULONG ulPixelClock:24; // target the pixel clock to drive the CRTC timing. + // 0 means disable PPLL/DCPLL. Expanded to 24 bits comparing to previous version. +#else + ULONG ulPixelClock:24; // target the pixel clock to drive the CRTC timing. + // 0 means disable PPLL/DCPLL. Expanded to 24 bits comparing to previous version. + ULONG ucCRTC:8; // ATOM_CRTC1~6, indicate the CRTC controller to + // drive the pixel clock. not used for DCPLL case. +#endif +}CRTC_PIXEL_CLOCK_FREQ; + +typedef struct _PIXEL_CLOCK_PARAMETERS_V6 +{ + union{ + CRTC_PIXEL_CLOCK_FREQ ulCrtcPclkFreq; // pixel clock and CRTC id frequency + ULONG ulDispEngClkFreq; // dispclk frequency + }; + USHORT usFbDiv; // feedback divider integer part. + UCHAR ucPostDiv; // post divider. + UCHAR ucRefDiv; // Reference divider + UCHAR ucPpll; // ATOM_PPLL1/ATOM_PPLL2/ATOM_DCPLL + UCHAR ucTransmitterID; // ASIC encoder id defined in objectId.h, + // indicate which graphic encoder will be used. + UCHAR ucEncoderMode; // Encoder mode: + UCHAR ucMiscInfo; // bit[0]= Force program PPLL + // bit[1]= when VGA timing is used. + // bit[3:2]= HDMI panel bit depth: =0: 24bpp =1:30bpp, =2:32bpp + // bit[4]= RefClock source for PPLL. + // =0: XTLAIN( default mode ) + // =1: other external clock source, which is pre-defined + // by VBIOS depend on the feature required. + // bit[7:5]: reserved. + ULONG ulFbDivDecFrac; // 20 bit feedback divider decimal fraction part, range from 1~999999 ( 0.000001 to 0.999999 ) + +}PIXEL_CLOCK_PARAMETERS_V6; + +#define PIXEL_CLOCK_V6_MISC_FORCE_PROG_PPLL 0x01 +#define PIXEL_CLOCK_V6_MISC_VGA_MODE 0x02 +#define PIXEL_CLOCK_V6_MISC_HDMI_BPP_MASK 0x0c +#define PIXEL_CLOCK_V6_MISC_HDMI_24BPP 0x00 +#define PIXEL_CLOCK_V6_MISC_HDMI_36BPP 0x04 +#define PIXEL_CLOCK_V6_MISC_HDMI_36BPP_V6 0x08 //for V6, the correct defintion for 36bpp should be 2 for 36bpp(2:1) +#define PIXEL_CLOCK_V6_MISC_HDMI_30BPP 0x08 +#define PIXEL_CLOCK_V6_MISC_HDMI_30BPP_V6 0x04 //for V6, the correct defintion for 30bpp should be 1 for 36bpp(5:4) +#define PIXEL_CLOCK_V6_MISC_HDMI_48BPP 0x0c +#define PIXEL_CLOCK_V6_MISC_REF_DIV_SRC 0x10 +#define PIXEL_CLOCK_V6_MISC_GEN_DPREFCLK 0x40 + +typedef struct _GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V2 +{ + PIXEL_CLOCK_PARAMETERS_V3 sDispClkInput; +}GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V2; + +typedef struct _GET_DISP_PLL_STATUS_OUTPUT_PARAMETERS_V2 +{ + UCHAR ucStatus; + UCHAR ucRefDivSrc; // =1: reference clock source from XTALIN, =0: source from PCIE ref clock + UCHAR ucReserved[2]; +}GET_DISP_PLL_STATUS_OUTPUT_PARAMETERS_V2; + +typedef struct _GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V3 +{ + PIXEL_CLOCK_PARAMETERS_V5 sDispClkInput; +}GET_DISP_PLL_STATUS_INPUT_PARAMETERS_V3; + +/****************************************************************************/ +// Structures used by AdjustDisplayPllTable +/****************************************************************************/ +typedef struct _ADJUST_DISPLAY_PLL_PARAMETERS +{ + USHORT usPixelClock; + UCHAR ucTransmitterID; + UCHAR ucEncodeMode; + union + { + UCHAR ucDVOConfig; //if DVO, need passing link rate and output 12bitlow or 24bit + UCHAR ucConfig; //if none DVO, not defined yet + }; + UCHAR ucReserved[3]; +}ADJUST_DISPLAY_PLL_PARAMETERS; + +#define ADJUST_DISPLAY_CONFIG_SS_ENABLE 0x10 +#define ADJUST_DISPLAY_PLL_PS_ALLOCATION ADJUST_DISPLAY_PLL_PARAMETERS + +typedef struct _ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3 +{ + USHORT usPixelClock; // target pixel clock + UCHAR ucTransmitterID; // GPU transmitter id defined in objectid.h + UCHAR ucEncodeMode; // encoder mode: CRT, LVDS, DP, TMDS or HDMI + UCHAR ucDispPllConfig; // display pll configure parameter defined as following DISPPLL_CONFIG_XXXX + UCHAR ucExtTransmitterID; // external encoder id. + UCHAR ucReserved[2]; +}ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3; + +// usDispPllConfig v1.2 for RoadRunner +#define DISPPLL_CONFIG_DVO_RATE_SEL 0x0001 // need only when ucTransmitterID = DVO +#define DISPPLL_CONFIG_DVO_DDR_SPEED 0x0000 // need only when ucTransmitterID = DVO +#define DISPPLL_CONFIG_DVO_SDR_SPEED 0x0001 // need only when ucTransmitterID = DVO +#define DISPPLL_CONFIG_DVO_OUTPUT_SEL 0x000c // need only when ucTransmitterID = DVO +#define DISPPLL_CONFIG_DVO_LOW12BIT 0x0000 // need only when ucTransmitterID = DVO +#define DISPPLL_CONFIG_DVO_UPPER12BIT 0x0004 // need only when ucTransmitterID = DVO +#define DISPPLL_CONFIG_DVO_24BIT 0x0008 // need only when ucTransmitterID = DVO +#define DISPPLL_CONFIG_SS_ENABLE 0x0010 // Only used when ucEncoderMode = DP or LVDS +#define DISPPLL_CONFIG_COHERENT_MODE 0x0020 // Only used when ucEncoderMode = TMDS or HDMI +#define DISPPLL_CONFIG_DUAL_LINK 0x0040 // Only used when ucEncoderMode = TMDS or LVDS + + +typedef struct _ADJUST_DISPLAY_PLL_OUTPUT_PARAMETERS_V3 +{ + ULONG ulDispPllFreq; // return display PPLL freq which is used to generate the pixclock, and related idclk, symclk etc + UCHAR ucRefDiv; // if it is none-zero, it is used to be calculated the other ppll parameter fb_divider and post_div ( if it is not given ) + UCHAR ucPostDiv; // if it is none-zero, it is used to be calculated the other ppll parameter fb_divider + UCHAR ucReserved[2]; +}ADJUST_DISPLAY_PLL_OUTPUT_PARAMETERS_V3; + +typedef struct _ADJUST_DISPLAY_PLL_PS_ALLOCATION_V3 +{ + union + { + ADJUST_DISPLAY_PLL_INPUT_PARAMETERS_V3 sInput; + ADJUST_DISPLAY_PLL_OUTPUT_PARAMETERS_V3 sOutput; + }; +} ADJUST_DISPLAY_PLL_PS_ALLOCATION_V3; + +/****************************************************************************/ +// Structures used by EnableYUVTable +/****************************************************************************/ +typedef struct _ENABLE_YUV_PARAMETERS +{ + UCHAR ucEnable; // ATOM_ENABLE:Enable YUV or ATOM_DISABLE:Disable YUV (RGB) + UCHAR ucCRTC; // Which CRTC needs this YUV or RGB format + UCHAR ucPadding[2]; +}ENABLE_YUV_PARAMETERS; +#define ENABLE_YUV_PS_ALLOCATION ENABLE_YUV_PARAMETERS + +/****************************************************************************/ +// Structures used by GetMemoryClockTable +/****************************************************************************/ +typedef struct _GET_MEMORY_CLOCK_PARAMETERS +{ + ULONG ulReturnMemoryClock; // current memory speed in 10KHz unit +} GET_MEMORY_CLOCK_PARAMETERS; +#define GET_MEMORY_CLOCK_PS_ALLOCATION GET_MEMORY_CLOCK_PARAMETERS + +/****************************************************************************/ +// Structures used by GetEngineClockTable +/****************************************************************************/ +typedef struct _GET_ENGINE_CLOCK_PARAMETERS +{ + ULONG ulReturnEngineClock; // current engine speed in 10KHz unit +} GET_ENGINE_CLOCK_PARAMETERS; +#define GET_ENGINE_CLOCK_PS_ALLOCATION GET_ENGINE_CLOCK_PARAMETERS + +/****************************************************************************/ +// Following Structures and constant may be obsolete +/****************************************************************************/ +//Maxium 8 bytes,the data read in will be placed in the parameter space. +//Read operaion successeful when the paramter space is non-zero, otherwise read operation failed +typedef struct _READ_EDID_FROM_HW_I2C_DATA_PARAMETERS +{ + USHORT usPrescale; //Ratio between Engine clock and I2C clock + USHORT usVRAMAddress; //Address in Frame Buffer where to pace raw EDID + USHORT usStatus; //When use output: lower byte EDID checksum, high byte hardware status + //WHen use input: lower byte as 'byte to read':currently limited to 128byte or 1byte + UCHAR ucSlaveAddr; //Read from which slave + UCHAR ucLineNumber; //Read from which HW assisted line +}READ_EDID_FROM_HW_I2C_DATA_PARAMETERS; +#define READ_EDID_FROM_HW_I2C_DATA_PS_ALLOCATION READ_EDID_FROM_HW_I2C_DATA_PARAMETERS + + +#define ATOM_WRITE_I2C_FORMAT_PSOFFSET_PSDATABYTE 0 +#define ATOM_WRITE_I2C_FORMAT_PSOFFSET_PSTWODATABYTES 1 +#define ATOM_WRITE_I2C_FORMAT_PSCOUNTER_PSOFFSET_IDDATABLOCK 2 +#define ATOM_WRITE_I2C_FORMAT_PSCOUNTER_IDOFFSET_PLUS_IDDATABLOCK 3 +#define ATOM_WRITE_I2C_FORMAT_IDCOUNTER_IDOFFSET_IDDATABLOCK 4 + +typedef struct _WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS +{ + USHORT usPrescale; //Ratio between Engine clock and I2C clock + USHORT usByteOffset; //Write to which byte + //Upper portion of usByteOffset is Format of data + //1bytePS+offsetPS + //2bytesPS+offsetPS + //blockID+offsetPS + //blockID+offsetID + //blockID+counterID+offsetID + UCHAR ucData; //PS data1 + UCHAR ucStatus; //Status byte 1=success, 2=failure, Also is used as PS data2 + UCHAR ucSlaveAddr; //Write to which slave + UCHAR ucLineNumber; //Write from which HW assisted line +}WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS; + +#define WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS + +typedef struct _SET_UP_HW_I2C_DATA_PARAMETERS +{ + USHORT usPrescale; //Ratio between Engine clock and I2C clock + UCHAR ucSlaveAddr; //Write to which slave + UCHAR ucLineNumber; //Write from which HW assisted line +}SET_UP_HW_I2C_DATA_PARAMETERS; + + +/**************************************************************************/ +#define SPEED_FAN_CONTROL_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS + + +/****************************************************************************/ +// Structures used by PowerConnectorDetectionTable +/****************************************************************************/ +typedef struct _POWER_CONNECTOR_DETECTION_PARAMETERS +{ + UCHAR ucPowerConnectorStatus; //Used for return value 0: detected, 1:not detected + UCHAR ucPwrBehaviorId; + USHORT usPwrBudget; //how much power currently boot to in unit of watt +}POWER_CONNECTOR_DETECTION_PARAMETERS; + +typedef struct POWER_CONNECTOR_DETECTION_PS_ALLOCATION +{ + UCHAR ucPowerConnectorStatus; //Used for return value 0: detected, 1:not detected + UCHAR ucReserved; + USHORT usPwrBudget; //how much power currently boot to in unit of watt + WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; +}POWER_CONNECTOR_DETECTION_PS_ALLOCATION; + +/****************************LVDS SS Command Table Definitions**********************/ + +/****************************************************************************/ +// Structures used by EnableSpreadSpectrumOnPPLLTable +/****************************************************************************/ +typedef struct _ENABLE_LVDS_SS_PARAMETERS +{ + USHORT usSpreadSpectrumPercentage; + UCHAR ucSpreadSpectrumType; //Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD + UCHAR ucSpreadSpectrumStepSize_Delay; //bits3:2 SS_STEP_SIZE; bit 6:4 SS_DELAY + UCHAR ucEnable; //ATOM_ENABLE or ATOM_DISABLE + UCHAR ucPadding[3]; +}ENABLE_LVDS_SS_PARAMETERS; + +//ucTableFormatRevision=1,ucTableContentRevision=2 +typedef struct _ENABLE_LVDS_SS_PARAMETERS_V2 +{ + USHORT usSpreadSpectrumPercentage; + UCHAR ucSpreadSpectrumType; //Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD + UCHAR ucSpreadSpectrumStep; // + UCHAR ucEnable; //ATOM_ENABLE or ATOM_DISABLE + UCHAR ucSpreadSpectrumDelay; + UCHAR ucSpreadSpectrumRange; + UCHAR ucPadding; +}ENABLE_LVDS_SS_PARAMETERS_V2; + +//This new structure is based on ENABLE_LVDS_SS_PARAMETERS but expands to SS on PPLL, so other devices can use SS. +typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL +{ + USHORT usSpreadSpectrumPercentage; + UCHAR ucSpreadSpectrumType; // Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Others:TBD + UCHAR ucSpreadSpectrumStep; // + UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE + UCHAR ucSpreadSpectrumDelay; + UCHAR ucSpreadSpectrumRange; + UCHAR ucPpll; // ATOM_PPLL1/ATOM_PPLL2 +}ENABLE_SPREAD_SPECTRUM_ON_PPLL; + +typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL_V2 +{ + USHORT usSpreadSpectrumPercentage; + UCHAR ucSpreadSpectrumType; // Bit[0]: 0-Down Spread,1-Center Spread. + // Bit[1]: 1-Ext. 0-Int. + // Bit[3:2]: =0 P1PLL =1 P2PLL =2 DCPLL + // Bits[7:4] reserved + UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE + USHORT usSpreadSpectrumAmount; // Includes SS_AMOUNT_FBDIV[7:0] and SS_AMOUNT_NFRAC_SLIP[11:8] + USHORT usSpreadSpectrumStep; // SS_STEP_SIZE_DSFRAC +}ENABLE_SPREAD_SPECTRUM_ON_PPLL_V2; + +#define ATOM_PPLL_SS_TYPE_V2_DOWN_SPREAD 0x00 +#define ATOM_PPLL_SS_TYPE_V2_CENTRE_SPREAD 0x01 +#define ATOM_PPLL_SS_TYPE_V2_EXT_SPREAD 0x02 +#define ATOM_PPLL_SS_TYPE_V2_PPLL_SEL_MASK 0x0c +#define ATOM_PPLL_SS_TYPE_V2_P1PLL 0x00 +#define ATOM_PPLL_SS_TYPE_V2_P2PLL 0x04 +#define ATOM_PPLL_SS_TYPE_V2_DCPLL 0x08 +#define ATOM_PPLL_SS_AMOUNT_V2_FBDIV_MASK 0x00FF +#define ATOM_PPLL_SS_AMOUNT_V2_FBDIV_SHIFT 0 +#define ATOM_PPLL_SS_AMOUNT_V2_NFRAC_MASK 0x0F00 +#define ATOM_PPLL_SS_AMOUNT_V2_NFRAC_SHIFT 8 + +// Used by DCE5.0 + typedef struct _ENABLE_SPREAD_SPECTRUM_ON_PPLL_V3 +{ + USHORT usSpreadSpectrumAmountFrac; // SS_AMOUNT_DSFRAC New in DCE5.0 + UCHAR ucSpreadSpectrumType; // Bit[0]: 0-Down Spread,1-Center Spread. + // Bit[1]: 1-Ext. 0-Int. + // Bit[3:2]: =0 P1PLL =1 P2PLL =2 DCPLL + // Bits[7:4] reserved + UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE + USHORT usSpreadSpectrumAmount; // Includes SS_AMOUNT_FBDIV[7:0] and SS_AMOUNT_NFRAC_SLIP[11:8] + USHORT usSpreadSpectrumStep; // SS_STEP_SIZE_DSFRAC +}ENABLE_SPREAD_SPECTRUM_ON_PPLL_V3; + +#define ATOM_PPLL_SS_TYPE_V3_DOWN_SPREAD 0x00 +#define ATOM_PPLL_SS_TYPE_V3_CENTRE_SPREAD 0x01 +#define ATOM_PPLL_SS_TYPE_V3_EXT_SPREAD 0x02 +#define ATOM_PPLL_SS_TYPE_V3_PPLL_SEL_MASK 0x0c +#define ATOM_PPLL_SS_TYPE_V3_P1PLL 0x00 +#define ATOM_PPLL_SS_TYPE_V3_P2PLL 0x04 +#define ATOM_PPLL_SS_TYPE_V3_DCPLL 0x08 +#define ATOM_PPLL_SS_TYPE_V3_P0PLL ATOM_PPLL_SS_TYPE_V3_DCPLL +#define ATOM_PPLL_SS_AMOUNT_V3_FBDIV_MASK 0x00FF +#define ATOM_PPLL_SS_AMOUNT_V3_FBDIV_SHIFT 0 +#define ATOM_PPLL_SS_AMOUNT_V3_NFRAC_MASK 0x0F00 +#define ATOM_PPLL_SS_AMOUNT_V3_NFRAC_SHIFT 8 + +#define ENABLE_SPREAD_SPECTRUM_ON_PPLL_PS_ALLOCATION ENABLE_SPREAD_SPECTRUM_ON_PPLL + +/**************************************************************************/ + +typedef struct _SET_PIXEL_CLOCK_PS_ALLOCATION +{ + PIXEL_CLOCK_PARAMETERS sPCLKInput; + ENABLE_SPREAD_SPECTRUM_ON_PPLL sReserved;//Caller doesn't need to init this portion +}SET_PIXEL_CLOCK_PS_ALLOCATION; + +#define ENABLE_VGA_RENDER_PS_ALLOCATION SET_PIXEL_CLOCK_PS_ALLOCATION + +/****************************************************************************/ +// Structures used by ### +/****************************************************************************/ +typedef struct _MEMORY_TRAINING_PARAMETERS +{ + ULONG ulTargetMemoryClock; //In 10Khz unit +}MEMORY_TRAINING_PARAMETERS; +#define MEMORY_TRAINING_PS_ALLOCATION MEMORY_TRAINING_PARAMETERS + + +/****************************LVDS and other encoder command table definitions **********************/ + + +/****************************************************************************/ +// Structures used by LVDSEncoderControlTable (Before DCE30) +// LVTMAEncoderControlTable (Before DCE30) +// TMDSAEncoderControlTable (Before DCE30) +/****************************************************************************/ +typedef struct _LVDS_ENCODER_CONTROL_PARAMETERS +{ + USHORT usPixelClock; // in 10KHz; for bios convenient + UCHAR ucMisc; // bit0=0: Enable single link + // =1: Enable dual link + // Bit1=0: 666RGB + // =1: 888RGB + UCHAR ucAction; // 0: turn off encoder + // 1: setup and turn on encoder +}LVDS_ENCODER_CONTROL_PARAMETERS; + +#define LVDS_ENCODER_CONTROL_PS_ALLOCATION LVDS_ENCODER_CONTROL_PARAMETERS + +#define TMDS1_ENCODER_CONTROL_PARAMETERS LVDS_ENCODER_CONTROL_PARAMETERS +#define TMDS1_ENCODER_CONTROL_PS_ALLOCATION TMDS1_ENCODER_CONTROL_PARAMETERS + +#define TMDS2_ENCODER_CONTROL_PARAMETERS TMDS1_ENCODER_CONTROL_PARAMETERS +#define TMDS2_ENCODER_CONTROL_PS_ALLOCATION TMDS2_ENCODER_CONTROL_PARAMETERS + + +//ucTableFormatRevision=1,ucTableContentRevision=2 +typedef struct _LVDS_ENCODER_CONTROL_PARAMETERS_V2 +{ + USHORT usPixelClock; // in 10KHz; for bios convenient + UCHAR ucMisc; // see PANEL_ENCODER_MISC_xx defintions below + UCHAR ucAction; // 0: turn off encoder + // 1: setup and turn on encoder + UCHAR ucTruncate; // bit0=0: Disable truncate + // =1: Enable truncate + // bit4=0: 666RGB + // =1: 888RGB + UCHAR ucSpatial; // bit0=0: Disable spatial dithering + // =1: Enable spatial dithering + // bit4=0: 666RGB + // =1: 888RGB + UCHAR ucTemporal; // bit0=0: Disable temporal dithering + // =1: Enable temporal dithering + // bit4=0: 666RGB + // =1: 888RGB + // bit5=0: Gray level 2 + // =1: Gray level 4 + UCHAR ucFRC; // bit4=0: 25FRC_SEL pattern E + // =1: 25FRC_SEL pattern F + // bit6:5=0: 50FRC_SEL pattern A + // =1: 50FRC_SEL pattern B + // =2: 50FRC_SEL pattern C + // =3: 50FRC_SEL pattern D + // bit7=0: 75FRC_SEL pattern E + // =1: 75FRC_SEL pattern F +}LVDS_ENCODER_CONTROL_PARAMETERS_V2; + +#define LVDS_ENCODER_CONTROL_PS_ALLOCATION_V2 LVDS_ENCODER_CONTROL_PARAMETERS_V2 + +#define TMDS1_ENCODER_CONTROL_PARAMETERS_V2 LVDS_ENCODER_CONTROL_PARAMETERS_V2 +#define TMDS1_ENCODER_CONTROL_PS_ALLOCATION_V2 TMDS1_ENCODER_CONTROL_PARAMETERS_V2 + +#define TMDS2_ENCODER_CONTROL_PARAMETERS_V2 TMDS1_ENCODER_CONTROL_PARAMETERS_V2 +#define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_V2 TMDS2_ENCODER_CONTROL_PARAMETERS_V2 + +#define LVDS_ENCODER_CONTROL_PARAMETERS_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V2 +#define LVDS_ENCODER_CONTROL_PS_ALLOCATION_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V3 + +#define TMDS1_ENCODER_CONTROL_PARAMETERS_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V3 +#define TMDS1_ENCODER_CONTROL_PS_ALLOCATION_V3 TMDS1_ENCODER_CONTROL_PARAMETERS_V3 + +#define TMDS2_ENCODER_CONTROL_PARAMETERS_V3 LVDS_ENCODER_CONTROL_PARAMETERS_V3 +#define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_V3 TMDS2_ENCODER_CONTROL_PARAMETERS_V3 + +/****************************************************************************/ +// Structures used by ### +/****************************************************************************/ +typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS +{ + UCHAR ucEnable; // Enable or Disable External TMDS encoder + UCHAR ucMisc; // Bit0=0:Enable Single link;=1:Enable Dual link;Bit1 {=0:666RGB, =1:888RGB} + UCHAR ucPadding[2]; +}ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS; + +typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION +{ + ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS sXTmdsEncoder; + WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; //Caller doesn't need to init this portion +}ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION; + +#define ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS_V2 LVDS_ENCODER_CONTROL_PARAMETERS_V2 + +typedef struct _ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION_V2 +{ + ENABLE_EXTERNAL_TMDS_ENCODER_PARAMETERS_V2 sXTmdsEncoder; + WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; //Caller doesn't need to init this portion +}ENABLE_EXTERNAL_TMDS_ENCODER_PS_ALLOCATION_V2; + +typedef struct _EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION +{ + DIG_ENCODER_CONTROL_PARAMETERS sDigEncoder; + WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; +}EXTERNAL_ENCODER_CONTROL_PS_ALLOCATION; + +/****************************************************************************/ +// Structures used by DVOEncoderControlTable +/****************************************************************************/ +//ucTableFormatRevision=1,ucTableContentRevision=3 + +//ucDVOConfig: +#define DVO_ENCODER_CONFIG_RATE_SEL 0x01 +#define DVO_ENCODER_CONFIG_DDR_SPEED 0x00 +#define DVO_ENCODER_CONFIG_SDR_SPEED 0x01 +#define DVO_ENCODER_CONFIG_OUTPUT_SEL 0x0c +#define DVO_ENCODER_CONFIG_LOW12BIT 0x00 +#define DVO_ENCODER_CONFIG_UPPER12BIT 0x04 +#define DVO_ENCODER_CONFIG_24BIT 0x08 + +typedef struct _DVO_ENCODER_CONTROL_PARAMETERS_V3 +{ + USHORT usPixelClock; + UCHAR ucDVOConfig; + UCHAR ucAction; //ATOM_ENABLE/ATOM_DISABLE/ATOM_HPD_INIT + UCHAR ucReseved[4]; +}DVO_ENCODER_CONTROL_PARAMETERS_V3; +#define DVO_ENCODER_CONTROL_PS_ALLOCATION_V3 DVO_ENCODER_CONTROL_PARAMETERS_V3 + +typedef struct _DVO_ENCODER_CONTROL_PARAMETERS_V1_4 +{ + USHORT usPixelClock; + UCHAR ucDVOConfig; + UCHAR ucAction; //ATOM_ENABLE/ATOM_DISABLE/ATOM_HPD_INIT + UCHAR ucBitPerColor; //please refer to definition of PANEL_xBIT_PER_COLOR + UCHAR ucReseved[3]; +}DVO_ENCODER_CONTROL_PARAMETERS_V1_4; +#define DVO_ENCODER_CONTROL_PS_ALLOCATION_V1_4 DVO_ENCODER_CONTROL_PARAMETERS_V1_4 + + +//ucTableFormatRevision=1 +//ucTableContentRevision=3 structure is not changed but usMisc add bit 1 as another input for +// bit1=0: non-coherent mode +// =1: coherent mode + +//========================================================================================== +//Only change is here next time when changing encoder parameter definitions again! +#define LVDS_ENCODER_CONTROL_PARAMETERS_LAST LVDS_ENCODER_CONTROL_PARAMETERS_V3 +#define LVDS_ENCODER_CONTROL_PS_ALLOCATION_LAST LVDS_ENCODER_CONTROL_PARAMETERS_LAST + +#define TMDS1_ENCODER_CONTROL_PARAMETERS_LAST LVDS_ENCODER_CONTROL_PARAMETERS_V3 +#define TMDS1_ENCODER_CONTROL_PS_ALLOCATION_LAST TMDS1_ENCODER_CONTROL_PARAMETERS_LAST + +#define TMDS2_ENCODER_CONTROL_PARAMETERS_LAST LVDS_ENCODER_CONTROL_PARAMETERS_V3 +#define TMDS2_ENCODER_CONTROL_PS_ALLOCATION_LAST TMDS2_ENCODER_CONTROL_PARAMETERS_LAST + +#define DVO_ENCODER_CONTROL_PARAMETERS_LAST DVO_ENCODER_CONTROL_PARAMETERS +#define DVO_ENCODER_CONTROL_PS_ALLOCATION_LAST DVO_ENCODER_CONTROL_PS_ALLOCATION + +//========================================================================================== +#define PANEL_ENCODER_MISC_DUAL 0x01 +#define PANEL_ENCODER_MISC_COHERENT 0x02 +#define PANEL_ENCODER_MISC_TMDS_LINKB 0x04 +#define PANEL_ENCODER_MISC_HDMI_TYPE 0x08 + +#define PANEL_ENCODER_ACTION_DISABLE ATOM_DISABLE +#define PANEL_ENCODER_ACTION_ENABLE ATOM_ENABLE +#define PANEL_ENCODER_ACTION_COHERENTSEQ (ATOM_ENABLE+1) + +#define PANEL_ENCODER_TRUNCATE_EN 0x01 +#define PANEL_ENCODER_TRUNCATE_DEPTH 0x10 +#define PANEL_ENCODER_SPATIAL_DITHER_EN 0x01 +#define PANEL_ENCODER_SPATIAL_DITHER_DEPTH 0x10 +#define PANEL_ENCODER_TEMPORAL_DITHER_EN 0x01 +#define PANEL_ENCODER_TEMPORAL_DITHER_DEPTH 0x10 +#define PANEL_ENCODER_TEMPORAL_LEVEL_4 0x20 +#define PANEL_ENCODER_25FRC_MASK 0x10 +#define PANEL_ENCODER_25FRC_E 0x00 +#define PANEL_ENCODER_25FRC_F 0x10 +#define PANEL_ENCODER_50FRC_MASK 0x60 +#define PANEL_ENCODER_50FRC_A 0x00 +#define PANEL_ENCODER_50FRC_B 0x20 +#define PANEL_ENCODER_50FRC_C 0x40 +#define PANEL_ENCODER_50FRC_D 0x60 +#define PANEL_ENCODER_75FRC_MASK 0x80 +#define PANEL_ENCODER_75FRC_E 0x00 +#define PANEL_ENCODER_75FRC_F 0x80 + +/****************************************************************************/ +// Structures used by SetVoltageTable +/****************************************************************************/ +#define SET_VOLTAGE_TYPE_ASIC_VDDC 1 +#define SET_VOLTAGE_TYPE_ASIC_MVDDC 2 +#define SET_VOLTAGE_TYPE_ASIC_MVDDQ 3 +#define SET_VOLTAGE_TYPE_ASIC_VDDCI 4 +#define SET_VOLTAGE_INIT_MODE 5 +#define SET_VOLTAGE_GET_MAX_VOLTAGE 6 //Gets the Max. voltage for the soldered Asic + +#define SET_ASIC_VOLTAGE_MODE_ALL_SOURCE 0x1 +#define SET_ASIC_VOLTAGE_MODE_SOURCE_A 0x2 +#define SET_ASIC_VOLTAGE_MODE_SOURCE_B 0x4 + +#define SET_ASIC_VOLTAGE_MODE_SET_VOLTAGE 0x0 +#define SET_ASIC_VOLTAGE_MODE_GET_GPIOVAL 0x1 +#define SET_ASIC_VOLTAGE_MODE_GET_GPIOMASK 0x2 + +typedef struct _SET_VOLTAGE_PARAMETERS +{ + UCHAR ucVoltageType; // To tell which voltage to set up, VDDC/MVDDC/MVDDQ + UCHAR ucVoltageMode; // To set all, to set source A or source B or ... + UCHAR ucVoltageIndex; // An index to tell which voltage level + UCHAR ucReserved; +}SET_VOLTAGE_PARAMETERS; + +typedef struct _SET_VOLTAGE_PARAMETERS_V2 +{ + UCHAR ucVoltageType; // To tell which voltage to set up, VDDC/MVDDC/MVDDQ + UCHAR ucVoltageMode; // Not used, maybe use for state machine for differen power mode + USHORT usVoltageLevel; // real voltage level +}SET_VOLTAGE_PARAMETERS_V2; + +// used by both SetVoltageTable v1.3 and v1.4 +typedef struct _SET_VOLTAGE_PARAMETERS_V1_3 +{ + UCHAR ucVoltageType; // To tell which voltage to set up, VDDC/MVDDC/MVDDQ/VDDCI + UCHAR ucVoltageMode; // Indicate action: Set voltage level + USHORT usVoltageLevel; // real voltage level in unit of mv or Voltage Phase (0, 1, 2, .. ) +}SET_VOLTAGE_PARAMETERS_V1_3; + +//ucVoltageType +#define VOLTAGE_TYPE_VDDC 1 +#define VOLTAGE_TYPE_MVDDC 2 +#define VOLTAGE_TYPE_MVDDQ 3 +#define VOLTAGE_TYPE_VDDCI 4 + +//SET_VOLTAGE_PARAMETERS_V3.ucVoltageMode +#define ATOM_SET_VOLTAGE 0 //Set voltage Level +#define ATOM_INIT_VOLTAGE_REGULATOR 3 //Init Regulator +#define ATOM_SET_VOLTAGE_PHASE 4 //Set Vregulator Phase, only for SVID/PVID regulator +#define ATOM_GET_MAX_VOLTAGE 6 //Get Max Voltage, not used from SetVoltageTable v1.3 +#define ATOM_GET_VOLTAGE_LEVEL 6 //Get Voltage level from vitual voltage ID, not used for SetVoltage v1.4 +#define ATOM_GET_LEAKAGE_ID 8 //Get Leakage Voltage Id ( starting from SMU7x IP ), SetVoltage v1.4 + +// define vitual voltage id in usVoltageLevel +#define ATOM_VIRTUAL_VOLTAGE_ID0 0xff01 +#define ATOM_VIRTUAL_VOLTAGE_ID1 0xff02 +#define ATOM_VIRTUAL_VOLTAGE_ID2 0xff03 +#define ATOM_VIRTUAL_VOLTAGE_ID3 0xff04 +#define ATOM_VIRTUAL_VOLTAGE_ID4 0xff05 +#define ATOM_VIRTUAL_VOLTAGE_ID5 0xff06 +#define ATOM_VIRTUAL_VOLTAGE_ID6 0xff07 +#define ATOM_VIRTUAL_VOLTAGE_ID7 0xff08 + +typedef struct _SET_VOLTAGE_PS_ALLOCATION +{ + SET_VOLTAGE_PARAMETERS sASICSetVoltage; + WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; +}SET_VOLTAGE_PS_ALLOCATION; + +// New Added from SI for GetVoltageInfoTable, input parameter structure +typedef struct _GET_VOLTAGE_INFO_INPUT_PARAMETER_V1_1 +{ + UCHAR ucVoltageType; // Input: To tell which voltage to set up, VDDC/MVDDC/MVDDQ/VDDCI + UCHAR ucVoltageMode; // Input: Indicate action: Get voltage info + USHORT usVoltageLevel; // Input: real voltage level in unit of mv or Voltage Phase (0, 1, 2, .. ) or Leakage Id + ULONG ulReserved; +}GET_VOLTAGE_INFO_INPUT_PARAMETER_V1_1; + +// New Added from SI for GetVoltageInfoTable, output parameter structure when ucVotlageMode == ATOM_GET_VOLTAGE_VID +typedef struct _GET_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1 +{ + ULONG ulVotlageGpioState; + ULONG ulVoltageGPioMask; +}GET_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1; + +// New Added from SI for GetVoltageInfoTable, output parameter structure when ucVotlageMode == ATOM_GET_VOLTAGE_STATEx_LEAKAGE_VID +typedef struct _GET_LEAKAGE_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1 +{ + USHORT usVoltageLevel; + USHORT usVoltageId; // Voltage Id programmed in Voltage Regulator + ULONG ulReseved; +}GET_LEAKAGE_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_1; + + +// GetVoltageInfo v1.1 ucVoltageMode +#define ATOM_GET_VOLTAGE_VID 0x00 +#define ATOM_GET_VOTLAGE_INIT_SEQ 0x03 +#define ATOM_GET_VOLTTAGE_PHASE_PHASE_VID 0x04 +#define ATOM_GET_VOLTAGE_SVID2 0x07 //Get SVI2 Regulator Info + +// for SI, this state map to 0xff02 voltage state in Power Play table, which is power boost state +#define ATOM_GET_VOLTAGE_STATE0_LEAKAGE_VID 0x10 +// for SI, this state map to 0xff01 voltage state in Power Play table, which is performance state +#define ATOM_GET_VOLTAGE_STATE1_LEAKAGE_VID 0x11 + +#define ATOM_GET_VOLTAGE_STATE2_LEAKAGE_VID 0x12 +#define ATOM_GET_VOLTAGE_STATE3_LEAKAGE_VID 0x13 + +// New Added from CI Hawaii for GetVoltageInfoTable, input parameter structure +typedef struct _GET_VOLTAGE_INFO_INPUT_PARAMETER_V1_2 +{ + UCHAR ucVoltageType; // Input: To tell which voltage to set up, VDDC/MVDDC/MVDDQ/VDDCI + UCHAR ucVoltageMode; // Input: Indicate action: Get voltage info + USHORT usVoltageLevel; // Input: real voltage level in unit of mv or Voltage Phase (0, 1, 2, .. ) or Leakage Id + ULONG ulSCLKFreq; // Input: when ucVoltageMode= ATOM_GET_VOLTAGE_EVV_VOLTAGE, DPM state SCLK frequency, Define in PPTable SCLK/Voltage dependence table +}GET_VOLTAGE_INFO_INPUT_PARAMETER_V1_2; + +// New in GetVoltageInfo v1.2 ucVoltageMode +#define ATOM_GET_VOLTAGE_EVV_VOLTAGE 0x09 + +// New Added from CI Hawaii for EVV feature +typedef struct _GET_EVV_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_2 +{ + USHORT usVoltageLevel; // real voltage level in unit of mv + USHORT usVoltageId; // Voltage Id programmed in Voltage Regulator + ULONG ulReseved; +}GET_EVV_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_2; + +/****************************************************************************/ +// Structures used by TVEncoderControlTable +/****************************************************************************/ +typedef struct _TV_ENCODER_CONTROL_PARAMETERS +{ + USHORT usPixelClock; // in 10KHz; for bios convenient + UCHAR ucTvStandard; // See definition "ATOM_TV_NTSC ..." + UCHAR ucAction; // 0: turn off encoder + // 1: setup and turn on encoder +}TV_ENCODER_CONTROL_PARAMETERS; + +typedef struct _TV_ENCODER_CONTROL_PS_ALLOCATION +{ + TV_ENCODER_CONTROL_PARAMETERS sTVEncoder; + WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; // Don't set this one +}TV_ENCODER_CONTROL_PS_ALLOCATION; + +//==============================Data Table Portion==================================== + +/****************************************************************************/ +// Structure used in Data.mtb +/****************************************************************************/ +typedef struct _ATOM_MASTER_LIST_OF_DATA_TABLES +{ + USHORT UtilityPipeLine; // Offest for the utility to get parser info,Don't change this position! + USHORT MultimediaCapabilityInfo; // Only used by MM Lib,latest version 1.1, not configuable from Bios, need to include the table to build Bios + USHORT MultimediaConfigInfo; // Only used by MM Lib,latest version 2.1, not configuable from Bios, need to include the table to build Bios + USHORT StandardVESA_Timing; // Only used by Bios + USHORT FirmwareInfo; // Shared by various SW components,latest version 1.4 + USHORT PaletteData; // Only used by BIOS + USHORT LCD_Info; // Shared by various SW components,latest version 1.3, was called LVDS_Info + USHORT DIGTransmitterInfo; // Internal used by VBIOS only version 3.1 + USHORT AnalogTV_Info; // Shared by various SW components,latest version 1.1 + USHORT SupportedDevicesInfo; // Will be obsolete from R600 + USHORT GPIO_I2C_Info; // Shared by various SW components,latest version 1.2 will be used from R600 + USHORT VRAM_UsageByFirmware; // Shared by various SW components,latest version 1.3 will be used from R600 + USHORT GPIO_Pin_LUT; // Shared by various SW components,latest version 1.1 + USHORT VESA_ToInternalModeLUT; // Only used by Bios + USHORT ComponentVideoInfo; // Shared by various SW components,latest version 2.1 will be used from R600 + USHORT PowerPlayInfo; // Shared by various SW components,latest version 2.1,new design from R600 + USHORT CompassionateData; // Will be obsolete from R600 + USHORT SaveRestoreInfo; // Only used by Bios + USHORT PPLL_SS_Info; // Shared by various SW components,latest version 1.2, used to call SS_Info, change to new name because of int ASIC SS info + USHORT OemInfo; // Defined and used by external SW, should be obsolete soon + USHORT XTMDS_Info; // Will be obsolete from R600 + USHORT MclkSS_Info; // Shared by various SW components,latest version 1.1, only enabled when ext SS chip is used + USHORT Object_Header; // Shared by various SW components,latest version 1.1 + USHORT IndirectIOAccess; // Only used by Bios,this table position can't change at all!! + USHORT MC_InitParameter; // Only used by command table + USHORT ASIC_VDDC_Info; // Will be obsolete from R600 + USHORT ASIC_InternalSS_Info; // New tabel name from R600, used to be called "ASIC_MVDDC_Info" + USHORT TV_VideoMode; // Only used by command table + USHORT VRAM_Info; // Only used by command table, latest version 1.3 + USHORT MemoryTrainingInfo; // Used for VBIOS and Diag utility for memory training purpose since R600. the new table rev start from 2.1 + USHORT IntegratedSystemInfo; // Shared by various SW components + USHORT ASIC_ProfilingInfo; // New table name from R600, used to be called "ASIC_VDDCI_Info" for pre-R600 + USHORT VoltageObjectInfo; // Shared by various SW components, latest version 1.1 + USHORT PowerSourceInfo; // Shared by various SW components, latest versoin 1.1 +}ATOM_MASTER_LIST_OF_DATA_TABLES; + +typedef struct _ATOM_MASTER_DATA_TABLE +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_MASTER_LIST_OF_DATA_TABLES ListOfDataTables; +}ATOM_MASTER_DATA_TABLE; + +// For backward compatible +#define LVDS_Info LCD_Info +#define DAC_Info PaletteData +#define TMDS_Info DIGTransmitterInfo + +/****************************************************************************/ +// Structure used in MultimediaCapabilityInfoTable +/****************************************************************************/ +typedef struct _ATOM_MULTIMEDIA_CAPABILITY_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ULONG ulSignature; // HW info table signature string "$ATI" + UCHAR ucI2C_Type; // I2C type (normal GP_IO, ImpactTV GP_IO, Dedicated I2C pin, etc) + UCHAR ucTV_OutInfo; // Type of TV out supported (3:0) and video out crystal frequency (6:4) and TV data port (7) + UCHAR ucVideoPortInfo; // Provides the video port capabilities + UCHAR ucHostPortInfo; // Provides host port configuration information +}ATOM_MULTIMEDIA_CAPABILITY_INFO; + +/****************************************************************************/ +// Structure used in MultimediaConfigInfoTable +/****************************************************************************/ +typedef struct _ATOM_MULTIMEDIA_CONFIG_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ULONG ulSignature; // MM info table signature sting "$MMT" + UCHAR ucTunerInfo; // Type of tuner installed on the adapter (4:0) and video input for tuner (7:5) + UCHAR ucAudioChipInfo; // List the audio chip type (3:0) product type (4) and OEM revision (7:5) + UCHAR ucProductID; // Defines as OEM ID or ATI board ID dependent on product type setting + UCHAR ucMiscInfo1; // Tuner voltage (1:0) HW teletext support (3:2) FM audio decoder (5:4) reserved (6) audio scrambling (7) + UCHAR ucMiscInfo2; // I2S input config (0) I2S output config (1) I2S Audio Chip (4:2) SPDIF Output Config (5) reserved (7:6) + UCHAR ucMiscInfo3; // Video Decoder Type (3:0) Video In Standard/Crystal (7:4) + UCHAR ucMiscInfo4; // Video Decoder Host Config (2:0) reserved (7:3) + UCHAR ucVideoInput0Info;// Video Input 0 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) + UCHAR ucVideoInput1Info;// Video Input 1 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) + UCHAR ucVideoInput2Info;// Video Input 2 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) + UCHAR ucVideoInput3Info;// Video Input 3 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) + UCHAR ucVideoInput4Info;// Video Input 4 Type (1:0) F/B setting (2) physical connector ID (5:3) reserved (7:6) +}ATOM_MULTIMEDIA_CONFIG_INFO; + + +/****************************************************************************/ +// Structures used in FirmwareInfoTable +/****************************************************************************/ + +// usBIOSCapability Definition: +// Bit 0 = 0: Bios image is not Posted, =1:Bios image is Posted; +// Bit 1 = 0: Dual CRTC is not supported, =1: Dual CRTC is supported; +// Bit 2 = 0: Extended Desktop is not supported, =1: Extended Desktop is supported; +// Others: Reserved +#define ATOM_BIOS_INFO_ATOM_FIRMWARE_POSTED 0x0001 +#define ATOM_BIOS_INFO_DUAL_CRTC_SUPPORT 0x0002 +#define ATOM_BIOS_INFO_EXTENDED_DESKTOP_SUPPORT 0x0004 +#define ATOM_BIOS_INFO_MEMORY_CLOCK_SS_SUPPORT 0x0008 // (valid from v1.1 ~v1.4):=1: memclk SS enable, =0 memclk SS disable. +#define ATOM_BIOS_INFO_ENGINE_CLOCK_SS_SUPPORT 0x0010 // (valid from v1.1 ~v1.4):=1: engclk SS enable, =0 engclk SS disable. +#define ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU 0x0020 +#define ATOM_BIOS_INFO_WMI_SUPPORT 0x0040 +#define ATOM_BIOS_INFO_PPMODE_ASSIGNGED_BY_SYSTEM 0x0080 +#define ATOM_BIOS_INFO_HYPERMEMORY_SUPPORT 0x0100 +#define ATOM_BIOS_INFO_HYPERMEMORY_SIZE_MASK 0x1E00 +#define ATOM_BIOS_INFO_VPOST_WITHOUT_FIRST_MODE_SET 0x2000 +#define ATOM_BIOS_INFO_BIOS_SCRATCH6_SCL2_REDEFINE 0x4000 +#define ATOM_BIOS_INFO_MEMORY_CLOCK_EXT_SS_SUPPORT 0x0008 // (valid from v2.1 ): =1: memclk ss enable with external ss chip +#define ATOM_BIOS_INFO_ENGINE_CLOCK_EXT_SS_SUPPORT 0x0010 // (valid from v2.1 ): =1: engclk ss enable with external ss chip + +#ifndef _H2INC + +//Please don't add or expand this bitfield structure below, this one will retire soon.! +typedef struct _ATOM_FIRMWARE_CAPABILITY +{ +#if ATOM_BIG_ENDIAN + USHORT Reserved:1; + USHORT SCL2Redefined:1; + USHORT PostWithoutModeSet:1; + USHORT HyperMemory_Size:4; + USHORT HyperMemory_Support:1; + USHORT PPMode_Assigned:1; + USHORT WMI_SUPPORT:1; + USHORT GPUControlsBL:1; + USHORT EngineClockSS_Support:1; + USHORT MemoryClockSS_Support:1; + USHORT ExtendedDesktopSupport:1; + USHORT DualCRTC_Support:1; + USHORT FirmwarePosted:1; +#else + USHORT FirmwarePosted:1; + USHORT DualCRTC_Support:1; + USHORT ExtendedDesktopSupport:1; + USHORT MemoryClockSS_Support:1; + USHORT EngineClockSS_Support:1; + USHORT GPUControlsBL:1; + USHORT WMI_SUPPORT:1; + USHORT PPMode_Assigned:1; + USHORT HyperMemory_Support:1; + USHORT HyperMemory_Size:4; + USHORT PostWithoutModeSet:1; + USHORT SCL2Redefined:1; + USHORT Reserved:1; +#endif +}ATOM_FIRMWARE_CAPABILITY; + +typedef union _ATOM_FIRMWARE_CAPABILITY_ACCESS +{ + ATOM_FIRMWARE_CAPABILITY sbfAccess; + USHORT susAccess; +}ATOM_FIRMWARE_CAPABILITY_ACCESS; + +#else + +typedef union _ATOM_FIRMWARE_CAPABILITY_ACCESS +{ + USHORT susAccess; +}ATOM_FIRMWARE_CAPABILITY_ACCESS; + +#endif + +typedef struct _ATOM_FIRMWARE_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ULONG ulFirmwareRevision; + ULONG ulDefaultEngineClock; //In 10Khz unit + ULONG ulDefaultMemoryClock; //In 10Khz unit + ULONG ulDriverTargetEngineClock; //In 10Khz unit + ULONG ulDriverTargetMemoryClock; //In 10Khz unit + ULONG ulMaxEngineClockPLL_Output; //In 10Khz unit + ULONG ulMaxMemoryClockPLL_Output; //In 10Khz unit + ULONG ulMaxPixelClockPLL_Output; //In 10Khz unit + ULONG ulASICMaxEngineClock; //In 10Khz unit + ULONG ulASICMaxMemoryClock; //In 10Khz unit + UCHAR ucASICMaxTemperature; + UCHAR ucPadding[3]; //Don't use them + ULONG aulReservedForBIOS[3]; //Don't use them + USHORT usMinEngineClockPLL_Input; //In 10Khz unit + USHORT usMaxEngineClockPLL_Input; //In 10Khz unit + USHORT usMinEngineClockPLL_Output; //In 10Khz unit + USHORT usMinMemoryClockPLL_Input; //In 10Khz unit + USHORT usMaxMemoryClockPLL_Input; //In 10Khz unit + USHORT usMinMemoryClockPLL_Output; //In 10Khz unit + USHORT usMaxPixelClock; //In 10Khz unit, Max. Pclk + USHORT usMinPixelClockPLL_Input; //In 10Khz unit + USHORT usMaxPixelClockPLL_Input; //In 10Khz unit + USHORT usMinPixelClockPLL_Output; //In 10Khz unit, the definitions above can't change!!! + ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability; + USHORT usReferenceClock; //In 10Khz unit + USHORT usPM_RTS_Location; //RTS PM4 starting location in ROM in 1Kb unit + UCHAR ucPM_RTS_StreamSize; //RTS PM4 packets in Kb unit + UCHAR ucDesign_ID; //Indicate what is the board design + UCHAR ucMemoryModule_ID; //Indicate what is the board design +}ATOM_FIRMWARE_INFO; + +typedef struct _ATOM_FIRMWARE_INFO_V1_2 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ULONG ulFirmwareRevision; + ULONG ulDefaultEngineClock; //In 10Khz unit + ULONG ulDefaultMemoryClock; //In 10Khz unit + ULONG ulDriverTargetEngineClock; //In 10Khz unit + ULONG ulDriverTargetMemoryClock; //In 10Khz unit + ULONG ulMaxEngineClockPLL_Output; //In 10Khz unit + ULONG ulMaxMemoryClockPLL_Output; //In 10Khz unit + ULONG ulMaxPixelClockPLL_Output; //In 10Khz unit + ULONG ulASICMaxEngineClock; //In 10Khz unit + ULONG ulASICMaxMemoryClock; //In 10Khz unit + UCHAR ucASICMaxTemperature; + UCHAR ucMinAllowedBL_Level; + UCHAR ucPadding[2]; //Don't use them + ULONG aulReservedForBIOS[2]; //Don't use them + ULONG ulMinPixelClockPLL_Output; //In 10Khz unit + USHORT usMinEngineClockPLL_Input; //In 10Khz unit + USHORT usMaxEngineClockPLL_Input; //In 10Khz unit + USHORT usMinEngineClockPLL_Output; //In 10Khz unit + USHORT usMinMemoryClockPLL_Input; //In 10Khz unit + USHORT usMaxMemoryClockPLL_Input; //In 10Khz unit + USHORT usMinMemoryClockPLL_Output; //In 10Khz unit + USHORT usMaxPixelClock; //In 10Khz unit, Max. Pclk + USHORT usMinPixelClockPLL_Input; //In 10Khz unit + USHORT usMaxPixelClockPLL_Input; //In 10Khz unit + USHORT usMinPixelClockPLL_Output; //In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output + ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability; + USHORT usReferenceClock; //In 10Khz unit + USHORT usPM_RTS_Location; //RTS PM4 starting location in ROM in 1Kb unit + UCHAR ucPM_RTS_StreamSize; //RTS PM4 packets in Kb unit + UCHAR ucDesign_ID; //Indicate what is the board design + UCHAR ucMemoryModule_ID; //Indicate what is the board design +}ATOM_FIRMWARE_INFO_V1_2; + +typedef struct _ATOM_FIRMWARE_INFO_V1_3 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ULONG ulFirmwareRevision; + ULONG ulDefaultEngineClock; //In 10Khz unit + ULONG ulDefaultMemoryClock; //In 10Khz unit + ULONG ulDriverTargetEngineClock; //In 10Khz unit + ULONG ulDriverTargetMemoryClock; //In 10Khz unit + ULONG ulMaxEngineClockPLL_Output; //In 10Khz unit + ULONG ulMaxMemoryClockPLL_Output; //In 10Khz unit + ULONG ulMaxPixelClockPLL_Output; //In 10Khz unit + ULONG ulASICMaxEngineClock; //In 10Khz unit + ULONG ulASICMaxMemoryClock; //In 10Khz unit + UCHAR ucASICMaxTemperature; + UCHAR ucMinAllowedBL_Level; + UCHAR ucPadding[2]; //Don't use them + ULONG aulReservedForBIOS; //Don't use them + ULONG ul3DAccelerationEngineClock;//In 10Khz unit + ULONG ulMinPixelClockPLL_Output; //In 10Khz unit + USHORT usMinEngineClockPLL_Input; //In 10Khz unit + USHORT usMaxEngineClockPLL_Input; //In 10Khz unit + USHORT usMinEngineClockPLL_Output; //In 10Khz unit + USHORT usMinMemoryClockPLL_Input; //In 10Khz unit + USHORT usMaxMemoryClockPLL_Input; //In 10Khz unit + USHORT usMinMemoryClockPLL_Output; //In 10Khz unit + USHORT usMaxPixelClock; //In 10Khz unit, Max. Pclk + USHORT usMinPixelClockPLL_Input; //In 10Khz unit + USHORT usMaxPixelClockPLL_Input; //In 10Khz unit + USHORT usMinPixelClockPLL_Output; //In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output + ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability; + USHORT usReferenceClock; //In 10Khz unit + USHORT usPM_RTS_Location; //RTS PM4 starting location in ROM in 1Kb unit + UCHAR ucPM_RTS_StreamSize; //RTS PM4 packets in Kb unit + UCHAR ucDesign_ID; //Indicate what is the board design + UCHAR ucMemoryModule_ID; //Indicate what is the board design +}ATOM_FIRMWARE_INFO_V1_3; + +typedef struct _ATOM_FIRMWARE_INFO_V1_4 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ULONG ulFirmwareRevision; + ULONG ulDefaultEngineClock; //In 10Khz unit + ULONG ulDefaultMemoryClock; //In 10Khz unit + ULONG ulDriverTargetEngineClock; //In 10Khz unit + ULONG ulDriverTargetMemoryClock; //In 10Khz unit + ULONG ulMaxEngineClockPLL_Output; //In 10Khz unit + ULONG ulMaxMemoryClockPLL_Output; //In 10Khz unit + ULONG ulMaxPixelClockPLL_Output; //In 10Khz unit + ULONG ulASICMaxEngineClock; //In 10Khz unit + ULONG ulASICMaxMemoryClock; //In 10Khz unit + UCHAR ucASICMaxTemperature; + UCHAR ucMinAllowedBL_Level; + USHORT usBootUpVDDCVoltage; //In MV unit + USHORT usLcdMinPixelClockPLL_Output; // In MHz unit + USHORT usLcdMaxPixelClockPLL_Output; // In MHz unit + ULONG ul3DAccelerationEngineClock;//In 10Khz unit + ULONG ulMinPixelClockPLL_Output; //In 10Khz unit + USHORT usMinEngineClockPLL_Input; //In 10Khz unit + USHORT usMaxEngineClockPLL_Input; //In 10Khz unit + USHORT usMinEngineClockPLL_Output; //In 10Khz unit + USHORT usMinMemoryClockPLL_Input; //In 10Khz unit + USHORT usMaxMemoryClockPLL_Input; //In 10Khz unit + USHORT usMinMemoryClockPLL_Output; //In 10Khz unit + USHORT usMaxPixelClock; //In 10Khz unit, Max. Pclk + USHORT usMinPixelClockPLL_Input; //In 10Khz unit + USHORT usMaxPixelClockPLL_Input; //In 10Khz unit + USHORT usMinPixelClockPLL_Output; //In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output + ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability; + USHORT usReferenceClock; //In 10Khz unit + USHORT usPM_RTS_Location; //RTS PM4 starting location in ROM in 1Kb unit + UCHAR ucPM_RTS_StreamSize; //RTS PM4 packets in Kb unit + UCHAR ucDesign_ID; //Indicate what is the board design + UCHAR ucMemoryModule_ID; //Indicate what is the board design +}ATOM_FIRMWARE_INFO_V1_4; + +//the structure below to be used from Cypress +typedef struct _ATOM_FIRMWARE_INFO_V2_1 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ULONG ulFirmwareRevision; + ULONG ulDefaultEngineClock; //In 10Khz unit + ULONG ulDefaultMemoryClock; //In 10Khz unit + ULONG ulReserved1; + ULONG ulReserved2; + ULONG ulMaxEngineClockPLL_Output; //In 10Khz unit + ULONG ulMaxMemoryClockPLL_Output; //In 10Khz unit + ULONG ulMaxPixelClockPLL_Output; //In 10Khz unit + ULONG ulBinaryAlteredInfo; //Was ulASICMaxEngineClock + ULONG ulDefaultDispEngineClkFreq; //In 10Khz unit + UCHAR ucReserved1; //Was ucASICMaxTemperature; + UCHAR ucMinAllowedBL_Level; + USHORT usBootUpVDDCVoltage; //In MV unit + USHORT usLcdMinPixelClockPLL_Output; // In MHz unit + USHORT usLcdMaxPixelClockPLL_Output; // In MHz unit + ULONG ulReserved4; //Was ulAsicMaximumVoltage + ULONG ulMinPixelClockPLL_Output; //In 10Khz unit + USHORT usMinEngineClockPLL_Input; //In 10Khz unit + USHORT usMaxEngineClockPLL_Input; //In 10Khz unit + USHORT usMinEngineClockPLL_Output; //In 10Khz unit + USHORT usMinMemoryClockPLL_Input; //In 10Khz unit + USHORT usMaxMemoryClockPLL_Input; //In 10Khz unit + USHORT usMinMemoryClockPLL_Output; //In 10Khz unit + USHORT usMaxPixelClock; //In 10Khz unit, Max. Pclk + USHORT usMinPixelClockPLL_Input; //In 10Khz unit + USHORT usMaxPixelClockPLL_Input; //In 10Khz unit + USHORT usMinPixelClockPLL_Output; //In 10Khz unit - lower 16bit of ulMinPixelClockPLL_Output + ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability; + USHORT usCoreReferenceClock; //In 10Khz unit + USHORT usMemoryReferenceClock; //In 10Khz unit + USHORT usUniphyDPModeExtClkFreq; //In 10Khz unit, if it is 0, In DP Mode Uniphy Input clock from internal PPLL, otherwise Input clock from external Spread clock + UCHAR ucMemoryModule_ID; //Indicate what is the board design + UCHAR ucReserved4[3]; +}ATOM_FIRMWARE_INFO_V2_1; + +//the structure below to be used from NI +//ucTableFormatRevision=2 +//ucTableContentRevision=2 +typedef struct _ATOM_FIRMWARE_INFO_V2_2 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ULONG ulFirmwareRevision; + ULONG ulDefaultEngineClock; //In 10Khz unit + ULONG ulDefaultMemoryClock; //In 10Khz unit + ULONG ulSPLL_OutputFreq; //In 10Khz unit + ULONG ulGPUPLL_OutputFreq; //In 10Khz unit + ULONG ulReserved1; //Was ulMaxEngineClockPLL_Output; //In 10Khz unit* + ULONG ulReserved2; //Was ulMaxMemoryClockPLL_Output; //In 10Khz unit* + ULONG ulMaxPixelClockPLL_Output; //In 10Khz unit + ULONG ulBinaryAlteredInfo; //Was ulASICMaxEngineClock ? + ULONG ulDefaultDispEngineClkFreq; //In 10Khz unit. This is the frequency before DCDTO, corresponding to usBootUpVDDCVoltage. + UCHAR ucReserved3; //Was ucASICMaxTemperature; + UCHAR ucMinAllowedBL_Level; + USHORT usBootUpVDDCVoltage; //In MV unit + USHORT usLcdMinPixelClockPLL_Output; // In MHz unit + USHORT usLcdMaxPixelClockPLL_Output; // In MHz unit + ULONG ulReserved4; //Was ulAsicMaximumVoltage + ULONG ulMinPixelClockPLL_Output; //In 10Khz unit + UCHAR ucRemoteDisplayConfig; + UCHAR ucReserved5[3]; //Was usMinEngineClockPLL_Input and usMaxEngineClockPLL_Input + ULONG ulReserved6; //Was usMinEngineClockPLL_Output and usMinMemoryClockPLL_Input + ULONG ulReserved7; //Was usMaxMemoryClockPLL_Input and usMinMemoryClockPLL_Output + USHORT usReserved11; //Was usMaxPixelClock; //In 10Khz unit, Max. Pclk used only for DAC + USHORT usMinPixelClockPLL_Input; //In 10Khz unit + USHORT usMaxPixelClockPLL_Input; //In 10Khz unit + USHORT usBootUpVDDCIVoltage; //In unit of mv; Was usMinPixelClockPLL_Output; + ATOM_FIRMWARE_CAPABILITY_ACCESS usFirmwareCapability; + USHORT usCoreReferenceClock; //In 10Khz unit + USHORT usMemoryReferenceClock; //In 10Khz unit + USHORT usUniphyDPModeExtClkFreq; //In 10Khz unit, if it is 0, In DP Mode Uniphy Input clock from internal PPLL, otherwise Input clock from external Spread clock + UCHAR ucMemoryModule_ID; //Indicate what is the board design + UCHAR ucReserved9[3]; + USHORT usBootUpMVDDCVoltage; //In unit of mv; Was usMinPixelClockPLL_Output; + USHORT usReserved12; + ULONG ulReserved10[3]; // New added comparing to previous version +}ATOM_FIRMWARE_INFO_V2_2; + +#define ATOM_FIRMWARE_INFO_LAST ATOM_FIRMWARE_INFO_V2_2 + + +// definition of ucRemoteDisplayConfig +#define REMOTE_DISPLAY_DISABLE 0x00 +#define REMOTE_DISPLAY_ENABLE 0x01 + +/****************************************************************************/ +// Structures used in IntegratedSystemInfoTable +/****************************************************************************/ +#define IGP_CAP_FLAG_DYNAMIC_CLOCK_EN 0x2 +#define IGP_CAP_FLAG_AC_CARD 0x4 +#define IGP_CAP_FLAG_SDVO_CARD 0x8 +#define IGP_CAP_FLAG_POSTDIV_BY_2_MODE 0x10 + +typedef struct _ATOM_INTEGRATED_SYSTEM_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ULONG ulBootUpEngineClock; //in 10kHz unit + ULONG ulBootUpMemoryClock; //in 10kHz unit + ULONG ulMaxSystemMemoryClock; //in 10kHz unit + ULONG ulMinSystemMemoryClock; //in 10kHz unit + UCHAR ucNumberOfCyclesInPeriodHi; + UCHAR ucLCDTimingSel; //=0:not valid.!=0 sel this timing descriptor from LCD EDID. + USHORT usReserved1; + USHORT usInterNBVoltageLow; //An intermidiate PMW value to set the voltage + USHORT usInterNBVoltageHigh; //Another intermidiate PMW value to set the voltage + ULONG ulReserved[2]; + + USHORT usFSBClock; //In MHz unit + USHORT usCapabilityFlag; //Bit0=1 indicates the fake HDMI support,Bit1=0/1 for Dynamic clocking dis/enable + //Bit[3:2]== 0:No PCIE card, 1:AC card, 2:SDVO card + //Bit[4]==1: P/2 mode, ==0: P/1 mode + USHORT usPCIENBCfgReg7; //bit[7:0]=MUX_Sel, bit[9:8]=MUX_SEL_LEVEL2, bit[10]=Lane_Reversal + USHORT usK8MemoryClock; //in MHz unit + USHORT usK8SyncStartDelay; //in 0.01 us unit + USHORT usK8DataReturnTime; //in 0.01 us unit + UCHAR ucMaxNBVoltage; + UCHAR ucMinNBVoltage; + UCHAR ucMemoryType; //[7:4]=1:DDR1;=2:DDR2;=3:DDR3.[3:0] is reserved + UCHAR ucNumberOfCyclesInPeriod; //CG.FVTHROT_PWM_CTRL_REG0.NumberOfCyclesInPeriod + UCHAR ucStartingPWM_HighTime; //CG.FVTHROT_PWM_CTRL_REG0.StartingPWM_HighTime + UCHAR ucHTLinkWidth; //16 bit vs. 8 bit + UCHAR ucMaxNBVoltageHigh; + UCHAR ucMinNBVoltageHigh; +}ATOM_INTEGRATED_SYSTEM_INFO; + +/* Explanation on entries in ATOM_INTEGRATED_SYSTEM_INFO +ulBootUpMemoryClock: For Intel IGP,it's the UMA system memory clock + For AMD IGP,it's 0 if no SidePort memory installed or it's the boot-up SidePort memory clock +ulMaxSystemMemoryClock: For Intel IGP,it's the Max freq from memory SPD if memory runs in ASYNC mode or otherwise (SYNC mode) it's 0 + For AMD IGP,for now this can be 0 +ulMinSystemMemoryClock: For Intel IGP,it's 133MHz if memory runs in ASYNC mode or otherwise (SYNC mode) it's 0 + For AMD IGP,for now this can be 0 + +usFSBClock: For Intel IGP,it's FSB Freq + For AMD IGP,it's HT Link Speed + +usK8MemoryClock: For AMD IGP only. For RevF CPU, set it to 200 +usK8SyncStartDelay: For AMD IGP only. Memory access latency in K8, required for watermark calculation +usK8DataReturnTime: For AMD IGP only. Memory access latency in K8, required for watermark calculation + +VC:Voltage Control +ucMaxNBVoltage: Voltage regulator dependent PWM value. Low 8 bits of the value for the max voltage.Set this one to 0xFF if VC without PWM. Set this to 0x0 if no VC at all. +ucMinNBVoltage: Voltage regulator dependent PWM value. Low 8 bits of the value for the min voltage.Set this one to 0x00 if VC without PWM or no VC at all. + +ucNumberOfCyclesInPeriod: Indicate how many cycles when PWM duty is 100%. low 8 bits of the value. +ucNumberOfCyclesInPeriodHi: Indicate how many cycles when PWM duty is 100%. high 8 bits of the value.If the PWM has an inverter,set bit [7]==1,otherwise set it 0 + +ucMaxNBVoltageHigh: Voltage regulator dependent PWM value. High 8 bits of the value for the max voltage.Set this one to 0xFF if VC without PWM. Set this to 0x0 if no VC at all. +ucMinNBVoltageHigh: Voltage regulator dependent PWM value. High 8 bits of the value for the min voltage.Set this one to 0x00 if VC without PWM or no VC at all. + + +usInterNBVoltageLow: Voltage regulator dependent PWM value. The value makes the the voltage >=Min NB voltage but <=InterNBVoltageHigh. Set this to 0x0000 if VC without PWM or no VC at all. +usInterNBVoltageHigh: Voltage regulator dependent PWM value. The value makes the the voltage >=InterNBVoltageLow but <=Max NB voltage.Set this to 0x0000 if VC without PWM or no VC at all. +*/ + + +/* +The following IGP table is introduced from RS780, which is supposed to be put by SBIOS in FB before IGP VBIOS starts VPOST; +Then VBIOS will copy the whole structure to its image so all GPU SW components can access this data structure to get whatever they need. +The enough reservation should allow us to never change table revisions. Whenever needed, a GPU SW component can use reserved portion for new data entries. + +SW components can access the IGP system infor structure in the same way as before +*/ + + +typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V2 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ULONG ulBootUpEngineClock; //in 10kHz unit + ULONG ulReserved1[2]; //must be 0x0 for the reserved + ULONG ulBootUpUMAClock; //in 10kHz unit + ULONG ulBootUpSidePortClock; //in 10kHz unit + ULONG ulMinSidePortClock; //in 10kHz unit + ULONG ulReserved2[6]; //must be 0x0 for the reserved + ULONG ulSystemConfig; //see explanation below + ULONG ulBootUpReqDisplayVector; + ULONG ulOtherDisplayMisc; + ULONG ulDDISlot1Config; + ULONG ulDDISlot2Config; + UCHAR ucMemoryType; //[3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved + UCHAR ucUMAChannelNumber; + UCHAR ucDockingPinBit; + UCHAR ucDockingPinPolarity; + ULONG ulDockingPinCFGInfo; + ULONG ulCPUCapInfo; + USHORT usNumberOfCyclesInPeriod; + USHORT usMaxNBVoltage; + USHORT usMinNBVoltage; + USHORT usBootUpNBVoltage; + ULONG ulHTLinkFreq; //in 10Khz + USHORT usMinHTLinkWidth; + USHORT usMaxHTLinkWidth; + USHORT usUMASyncStartDelay; + USHORT usUMADataReturnTime; + USHORT usLinkStatusZeroTime; + USHORT usDACEfuse; //for storing badgap value (for RS880 only) + ULONG ulHighVoltageHTLinkFreq; // in 10Khz + ULONG ulLowVoltageHTLinkFreq; // in 10Khz + USHORT usMaxUpStreamHTLinkWidth; + USHORT usMaxDownStreamHTLinkWidth; + USHORT usMinUpStreamHTLinkWidth; + USHORT usMinDownStreamHTLinkWidth; + USHORT usFirmwareVersion; //0 means FW is not supported. Otherwise it's the FW version loaded by SBIOS and driver should enable FW. + USHORT usFullT0Time; // Input to calculate minimum HT link change time required by NB P-State. Unit is 0.01us. + ULONG ulReserved3[96]; //must be 0x0 +}ATOM_INTEGRATED_SYSTEM_INFO_V2; + +/* +ulBootUpEngineClock: Boot-up Engine Clock in 10Khz; +ulBootUpUMAClock: Boot-up UMA Clock in 10Khz; it must be 0x0 when UMA is not present +ulBootUpSidePortClock: Boot-up SidePort Clock in 10Khz; it must be 0x0 when SidePort Memory is not present,this could be equal to or less than maximum supported Sideport memory clock + +ulSystemConfig: +Bit[0]=1: PowerExpress mode =0 Non-PowerExpress mode; +Bit[1]=1: system boots up at AMD overdrived state or user customized mode. In this case, driver will just stick to this boot-up mode. No other PowerPlay state + =0: system boots up at driver control state. Power state depends on PowerPlay table. +Bit[2]=1: PWM method is used on NB voltage control. =0: GPIO method is used. +Bit[3]=1: Only one power state(Performance) will be supported. + =0: Multiple power states supported from PowerPlay table. +Bit[4]=1: CLMC is supported and enabled on current system. + =0: CLMC is not supported or enabled on current system. SBIOS need to support HT link/freq change through ATIF interface. +Bit[5]=1: Enable CDLW for all driver control power states. Max HT width is from SBIOS, while Min HT width is determined by display requirement. + =0: CDLW is disabled. If CLMC is enabled case, Min HT width will be set equal to Max HT width. If CLMC disabled case, Max HT width will be applied. +Bit[6]=1: High Voltage requested for all power states. In this case, voltage will be forced at 1.1v and powerplay table voltage drop/throttling request will be ignored. + =0: Voltage settings is determined by powerplay table. +Bit[7]=1: Enable CLMC as hybrid Mode. CDLD and CILR will be disabled in this case and we're using legacy C1E. This is workaround for CPU(Griffin) performance issue. + =0: Enable CLMC as regular mode, CDLD and CILR will be enabled. +Bit[8]=1: CDLF is supported and enabled on current system. + =0: CDLF is not supported or enabled on current system. +Bit[9]=1: DLL Shut Down feature is enabled on current system. + =0: DLL Shut Down feature is not enabled or supported on current system. + +ulBootUpReqDisplayVector: This dword is a bit vector indicates what display devices are requested during boot-up. Refer to ATOM_DEVICE_xxx_SUPPORT for the bit vector definitions. + +ulOtherDisplayMisc: [15:8]- Bootup LCD Expansion selection; 0-center, 1-full panel size expansion; + [7:0] - BootupTV standard selection; This is a bit vector to indicate what TV standards are supported by the system. Refer to ucTVSupportedStd definition; + +ulDDISlot1Config: Describes the PCIE lane configuration on this DDI PCIE slot (ADD2 card) or connector (Mobile design). + [3:0] - Bit vector to indicate PCIE lane config of the DDI slot/connector on chassis (bit 0=1 lane 3:0; bit 1=1 lane 7:4; bit 2=1 lane 11:8; bit 3=1 lane 15:12) + [7:4] - Bit vector to indicate PCIE lane config of the same DDI slot/connector on docking station (bit 4=1 lane 3:0; bit 5=1 lane 7:4; bit 6=1 lane 11:8; bit 7=1 lane 15:12) + When a DDI connector is not "paired" (meaming two connections mutualexclusive on chassis or docking, only one of them can be connected at one time. + in both chassis and docking, SBIOS has to duplicate the same PCIE lane info from chassis to docking or vice versa. For example: + one DDI connector is only populated in docking with PCIE lane 8-11, but there is no paired connection on chassis, SBIOS has to copy bit 6 to bit 2. + + [15:8] - Lane configuration attribute; + [23:16]- Connector type, possible value: + CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D + CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D + CONNECTOR_OBJECT_ID_HDMI_TYPE_A + CONNECTOR_OBJECT_ID_DISPLAYPORT + CONNECTOR_OBJECT_ID_eDP + [31:24]- Reserved + +ulDDISlot2Config: Same as Slot1. +ucMemoryType: SidePort memory type, set it to 0x0 when Sideport memory is not installed. Driver needs this info to change sideport memory clock. Not for display in CCC. +For IGP, Hypermemory is the only memory type showed in CCC. + +ucUMAChannelNumber: how many channels for the UMA; + +ulDockingPinCFGInfo: [15:0]-Bus/Device/Function # to CFG to read this Docking Pin; [31:16]-reg offset in CFG to read this pin +ucDockingPinBit: which bit in this register to read the pin status; +ucDockingPinPolarity:Polarity of the pin when docked; + +ulCPUCapInfo: [7:0]=1:Griffin;[7:0]=2:Greyhound;[7:0]=3:K8, [7:0]=4:Pharaoh, other bits reserved for now and must be 0x0 + +usNumberOfCyclesInPeriod:Indicate how many cycles when PWM duty is 100%. + +usMaxNBVoltage:Max. voltage control value in either PWM or GPIO mode. +usMinNBVoltage:Min. voltage control value in either PWM or GPIO mode. + GPIO mode: both usMaxNBVoltage & usMinNBVoltage have a valid value ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE=0 + PWM mode: both usMaxNBVoltage & usMinNBVoltage have a valid value ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE=1 + GPU SW don't control mode: usMaxNBVoltage & usMinNBVoltage=0 and no care about ulSystemConfig.SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE + +usBootUpNBVoltage:Boot-up voltage regulator dependent PWM value. + +ulHTLinkFreq: Bootup HT link Frequency in 10Khz. +usMinHTLinkWidth: Bootup minimum HT link width. If CDLW disabled, this is equal to usMaxHTLinkWidth. + If CDLW enabled, both upstream and downstream width should be the same during bootup. +usMaxHTLinkWidth: Bootup maximum HT link width. If CDLW disabled, this is equal to usMinHTLinkWidth. + If CDLW enabled, both upstream and downstream width should be the same during bootup. + +usUMASyncStartDelay: Memory access latency, required for watermark calculation +usUMADataReturnTime: Memory access latency, required for watermark calculation +usLinkStatusZeroTime:Memory access latency required for watermark calculation, set this to 0x0 for K8 CPU, set a proper value in 0.01 the unit of us +for Griffin or Greyhound. SBIOS needs to convert to actual time by: + if T0Ttime [5:4]=00b, then usLinkStatusZeroTime=T0Ttime [3:0]*0.1us (0.0 to 1.5us) + if T0Ttime [5:4]=01b, then usLinkStatusZeroTime=T0Ttime [3:0]*0.5us (0.0 to 7.5us) + if T0Ttime [5:4]=10b, then usLinkStatusZeroTime=T0Ttime [3:0]*2.0us (0.0 to 30us) + if T0Ttime [5:4]=11b, and T0Ttime [3:0]=0x0 to 0xa, then usLinkStatusZeroTime=T0Ttime [3:0]*20us (0.0 to 200us) + +ulHighVoltageHTLinkFreq: HT link frequency for power state with low voltage. If boot up runs in HT1, this must be 0. + This must be less than or equal to ulHTLinkFreq(bootup frequency). +ulLowVoltageHTLinkFreq: HT link frequency for power state with low voltage or voltage scaling 1.0v~1.1v. If boot up runs in HT1, this must be 0. + This must be less than or equal to ulHighVoltageHTLinkFreq. + +usMaxUpStreamHTLinkWidth: Asymmetric link width support in the future, to replace usMaxHTLinkWidth. Not used for now. +usMaxDownStreamHTLinkWidth: same as above. +usMinUpStreamHTLinkWidth: Asymmetric link width support in the future, to replace usMinHTLinkWidth. Not used for now. +usMinDownStreamHTLinkWidth: same as above. +*/ + +// ATOM_INTEGRATED_SYSTEM_INFO::ulCPUCapInfo - CPU type definition +#define INTEGRATED_SYSTEM_INFO__UNKNOWN_CPU 0 +#define INTEGRATED_SYSTEM_INFO__AMD_CPU__GRIFFIN 1 +#define INTEGRATED_SYSTEM_INFO__AMD_CPU__GREYHOUND 2 +#define INTEGRATED_SYSTEM_INFO__AMD_CPU__K8 3 +#define INTEGRATED_SYSTEM_INFO__AMD_CPU__PHARAOH 4 +#define INTEGRATED_SYSTEM_INFO__AMD_CPU__OROCHI 5 + +#define INTEGRATED_SYSTEM_INFO__AMD_CPU__MAX_CODE INTEGRATED_SYSTEM_INFO__AMD_CPU__OROCHI // this deff reflects max defined CPU code + +#define SYSTEM_CONFIG_POWEREXPRESS_ENABLE 0x00000001 +#define SYSTEM_CONFIG_RUN_AT_OVERDRIVE_ENGINE 0x00000002 +#define SYSTEM_CONFIG_USE_PWM_ON_VOLTAGE 0x00000004 +#define SYSTEM_CONFIG_PERFORMANCE_POWERSTATE_ONLY 0x00000008 +#define SYSTEM_CONFIG_CLMC_ENABLED 0x00000010 +#define SYSTEM_CONFIG_CDLW_ENABLED 0x00000020 +#define SYSTEM_CONFIG_HIGH_VOLTAGE_REQUESTED 0x00000040 +#define SYSTEM_CONFIG_CLMC_HYBRID_MODE_ENABLED 0x00000080 +#define SYSTEM_CONFIG_CDLF_ENABLED 0x00000100 +#define SYSTEM_CONFIG_DLL_SHUTDOWN_ENABLED 0x00000200 + +#define IGP_DDI_SLOT_LANE_CONFIG_MASK 0x000000FF + +#define b0IGP_DDI_SLOT_LANE_MAP_MASK 0x0F +#define b0IGP_DDI_SLOT_DOCKING_LANE_MAP_MASK 0xF0 +#define b0IGP_DDI_SLOT_CONFIG_LANE_0_3 0x01 +#define b0IGP_DDI_SLOT_CONFIG_LANE_4_7 0x02 +#define b0IGP_DDI_SLOT_CONFIG_LANE_8_11 0x04 +#define b0IGP_DDI_SLOT_CONFIG_LANE_12_15 0x08 + +#define IGP_DDI_SLOT_ATTRIBUTE_MASK 0x0000FF00 +#define IGP_DDI_SLOT_CONFIG_REVERSED 0x00000100 +#define b1IGP_DDI_SLOT_CONFIG_REVERSED 0x01 + +#define IGP_DDI_SLOT_CONNECTOR_TYPE_MASK 0x00FF0000 + +// IntegratedSystemInfoTable new Rev is V5 after V2, because of the real rev of V2 is v1.4. This rev is used for RR +typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V5 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ULONG ulBootUpEngineClock; //in 10kHz unit + ULONG ulDentistVCOFreq; //Dentist VCO clock in 10kHz unit, the source of GPU SCLK, LCLK, UCLK and VCLK. + ULONG ulLClockFreq; //GPU Lclk freq in 10kHz unit, have relationship with NCLK in NorthBridge + ULONG ulBootUpUMAClock; //in 10kHz unit + ULONG ulReserved1[8]; //must be 0x0 for the reserved + ULONG ulBootUpReqDisplayVector; + ULONG ulOtherDisplayMisc; + ULONG ulReserved2[4]; //must be 0x0 for the reserved + ULONG ulSystemConfig; //TBD + ULONG ulCPUCapInfo; //TBD + USHORT usMaxNBVoltage; //high NB voltage, calculated using current VDDNB (D24F2xDC) and VDDNB offset fuse; + USHORT usMinNBVoltage; //low NB voltage, calculated using current VDDNB (D24F2xDC) and VDDNB offset fuse; + USHORT usBootUpNBVoltage; //boot up NB voltage + UCHAR ucHtcTmpLmt; //bit [22:16] of D24F3x64 Hardware Thermal Control (HTC) Register, may not be needed, TBD + UCHAR ucTjOffset; //bit [28:22] of D24F3xE4 Thermtrip Status Register,may not be needed, TBD + ULONG ulReserved3[4]; //must be 0x0 for the reserved + ULONG ulDDISlot1Config; //see above ulDDISlot1Config definition + ULONG ulDDISlot2Config; + ULONG ulDDISlot3Config; + ULONG ulDDISlot4Config; + ULONG ulReserved4[4]; //must be 0x0 for the reserved + UCHAR ucMemoryType; //[3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved + UCHAR ucUMAChannelNumber; + USHORT usReserved; + ULONG ulReserved5[4]; //must be 0x0 for the reserved + ULONG ulCSR_M3_ARB_CNTL_DEFAULT[10];//arrays with values for CSR M3 arbiter for default + ULONG ulCSR_M3_ARB_CNTL_UVD[10]; //arrays with values for CSR M3 arbiter for UVD playback + ULONG ulCSR_M3_ARB_CNTL_FS3D[10];//arrays with values for CSR M3 arbiter for Full Screen 3D applications + ULONG ulReserved6[61]; //must be 0x0 +}ATOM_INTEGRATED_SYSTEM_INFO_V5; + +#define ATOM_CRT_INT_ENCODER1_INDEX 0x00000000 +#define ATOM_LCD_INT_ENCODER1_INDEX 0x00000001 +#define ATOM_TV_INT_ENCODER1_INDEX 0x00000002 +#define ATOM_DFP_INT_ENCODER1_INDEX 0x00000003 +#define ATOM_CRT_INT_ENCODER2_INDEX 0x00000004 +#define ATOM_LCD_EXT_ENCODER1_INDEX 0x00000005 +#define ATOM_TV_EXT_ENCODER1_INDEX 0x00000006 +#define ATOM_DFP_EXT_ENCODER1_INDEX 0x00000007 +#define ATOM_CV_INT_ENCODER1_INDEX 0x00000008 +#define ATOM_DFP_INT_ENCODER2_INDEX 0x00000009 +#define ATOM_CRT_EXT_ENCODER1_INDEX 0x0000000A +#define ATOM_CV_EXT_ENCODER1_INDEX 0x0000000B +#define ATOM_DFP_INT_ENCODER3_INDEX 0x0000000C +#define ATOM_DFP_INT_ENCODER4_INDEX 0x0000000D + +// define ASIC internal encoder id ( bit vector ), used for CRTC_SourceSelTable +#define ASIC_INT_DAC1_ENCODER_ID 0x00 +#define ASIC_INT_TV_ENCODER_ID 0x02 +#define ASIC_INT_DIG1_ENCODER_ID 0x03 +#define ASIC_INT_DAC2_ENCODER_ID 0x04 +#define ASIC_EXT_TV_ENCODER_ID 0x06 +#define ASIC_INT_DVO_ENCODER_ID 0x07 +#define ASIC_INT_DIG2_ENCODER_ID 0x09 +#define ASIC_EXT_DIG_ENCODER_ID 0x05 +#define ASIC_EXT_DIG2_ENCODER_ID 0x08 +#define ASIC_INT_DIG3_ENCODER_ID 0x0a +#define ASIC_INT_DIG4_ENCODER_ID 0x0b +#define ASIC_INT_DIG5_ENCODER_ID 0x0c +#define ASIC_INT_DIG6_ENCODER_ID 0x0d +#define ASIC_INT_DIG7_ENCODER_ID 0x0e + +//define Encoder attribute +#define ATOM_ANALOG_ENCODER 0 +#define ATOM_DIGITAL_ENCODER 1 +#define ATOM_DP_ENCODER 2 + +#define ATOM_ENCODER_ENUM_MASK 0x70 +#define ATOM_ENCODER_ENUM_ID1 0x00 +#define ATOM_ENCODER_ENUM_ID2 0x10 +#define ATOM_ENCODER_ENUM_ID3 0x20 +#define ATOM_ENCODER_ENUM_ID4 0x30 +#define ATOM_ENCODER_ENUM_ID5 0x40 +#define ATOM_ENCODER_ENUM_ID6 0x50 + +#define ATOM_DEVICE_CRT1_INDEX 0x00000000 +#define ATOM_DEVICE_LCD1_INDEX 0x00000001 +#define ATOM_DEVICE_TV1_INDEX 0x00000002 +#define ATOM_DEVICE_DFP1_INDEX 0x00000003 +#define ATOM_DEVICE_CRT2_INDEX 0x00000004 +#define ATOM_DEVICE_LCD2_INDEX 0x00000005 +#define ATOM_DEVICE_DFP6_INDEX 0x00000006 +#define ATOM_DEVICE_DFP2_INDEX 0x00000007 +#define ATOM_DEVICE_CV_INDEX 0x00000008 +#define ATOM_DEVICE_DFP3_INDEX 0x00000009 +#define ATOM_DEVICE_DFP4_INDEX 0x0000000A +#define ATOM_DEVICE_DFP5_INDEX 0x0000000B + +#define ATOM_DEVICE_RESERVEDC_INDEX 0x0000000C +#define ATOM_DEVICE_RESERVEDD_INDEX 0x0000000D +#define ATOM_DEVICE_RESERVEDE_INDEX 0x0000000E +#define ATOM_DEVICE_RESERVEDF_INDEX 0x0000000F +#define ATOM_MAX_SUPPORTED_DEVICE_INFO (ATOM_DEVICE_DFP3_INDEX+1) +#define ATOM_MAX_SUPPORTED_DEVICE_INFO_2 ATOM_MAX_SUPPORTED_DEVICE_INFO +#define ATOM_MAX_SUPPORTED_DEVICE_INFO_3 (ATOM_DEVICE_DFP5_INDEX + 1 ) + +#define ATOM_MAX_SUPPORTED_DEVICE (ATOM_DEVICE_RESERVEDF_INDEX+1) + +#define ATOM_DEVICE_CRT1_SUPPORT (0x1L << ATOM_DEVICE_CRT1_INDEX ) +#define ATOM_DEVICE_LCD1_SUPPORT (0x1L << ATOM_DEVICE_LCD1_INDEX ) +#define ATOM_DEVICE_TV1_SUPPORT (0x1L << ATOM_DEVICE_TV1_INDEX ) +#define ATOM_DEVICE_DFP1_SUPPORT (0x1L << ATOM_DEVICE_DFP1_INDEX ) +#define ATOM_DEVICE_CRT2_SUPPORT (0x1L << ATOM_DEVICE_CRT2_INDEX ) +#define ATOM_DEVICE_LCD2_SUPPORT (0x1L << ATOM_DEVICE_LCD2_INDEX ) +#define ATOM_DEVICE_DFP6_SUPPORT (0x1L << ATOM_DEVICE_DFP6_INDEX ) +#define ATOM_DEVICE_DFP2_SUPPORT (0x1L << ATOM_DEVICE_DFP2_INDEX ) +#define ATOM_DEVICE_CV_SUPPORT (0x1L << ATOM_DEVICE_CV_INDEX ) +#define ATOM_DEVICE_DFP3_SUPPORT (0x1L << ATOM_DEVICE_DFP3_INDEX ) +#define ATOM_DEVICE_DFP4_SUPPORT (0x1L << ATOM_DEVICE_DFP4_INDEX ) +#define ATOM_DEVICE_DFP5_SUPPORT (0x1L << ATOM_DEVICE_DFP5_INDEX ) + +#define ATOM_DEVICE_CRT_SUPPORT (ATOM_DEVICE_CRT1_SUPPORT | ATOM_DEVICE_CRT2_SUPPORT) +#define ATOM_DEVICE_DFP_SUPPORT (ATOM_DEVICE_DFP1_SUPPORT | ATOM_DEVICE_DFP2_SUPPORT | ATOM_DEVICE_DFP3_SUPPORT | ATOM_DEVICE_DFP4_SUPPORT | ATOM_DEVICE_DFP5_SUPPORT | ATOM_DEVICE_DFP6_SUPPORT) +#define ATOM_DEVICE_TV_SUPPORT (ATOM_DEVICE_TV1_SUPPORT) +#define ATOM_DEVICE_LCD_SUPPORT (ATOM_DEVICE_LCD1_SUPPORT | ATOM_DEVICE_LCD2_SUPPORT) + +#define ATOM_DEVICE_CONNECTOR_TYPE_MASK 0x000000F0 +#define ATOM_DEVICE_CONNECTOR_TYPE_SHIFT 0x00000004 +#define ATOM_DEVICE_CONNECTOR_VGA 0x00000001 +#define ATOM_DEVICE_CONNECTOR_DVI_I 0x00000002 +#define ATOM_DEVICE_CONNECTOR_DVI_D 0x00000003 +#define ATOM_DEVICE_CONNECTOR_DVI_A 0x00000004 +#define ATOM_DEVICE_CONNECTOR_SVIDEO 0x00000005 +#define ATOM_DEVICE_CONNECTOR_COMPOSITE 0x00000006 +#define ATOM_DEVICE_CONNECTOR_LVDS 0x00000007 +#define ATOM_DEVICE_CONNECTOR_DIGI_LINK 0x00000008 +#define ATOM_DEVICE_CONNECTOR_SCART 0x00000009 +#define ATOM_DEVICE_CONNECTOR_HDMI_TYPE_A 0x0000000A +#define ATOM_DEVICE_CONNECTOR_HDMI_TYPE_B 0x0000000B +#define ATOM_DEVICE_CONNECTOR_CASE_1 0x0000000E +#define ATOM_DEVICE_CONNECTOR_DISPLAYPORT 0x0000000F + + +#define ATOM_DEVICE_DAC_INFO_MASK 0x0000000F +#define ATOM_DEVICE_DAC_INFO_SHIFT 0x00000000 +#define ATOM_DEVICE_DAC_INFO_NODAC 0x00000000 +#define ATOM_DEVICE_DAC_INFO_DACA 0x00000001 +#define ATOM_DEVICE_DAC_INFO_DACB 0x00000002 +#define ATOM_DEVICE_DAC_INFO_EXDAC 0x00000003 + +#define ATOM_DEVICE_I2C_ID_NOI2C 0x00000000 + +#define ATOM_DEVICE_I2C_LINEMUX_MASK 0x0000000F +#define ATOM_DEVICE_I2C_LINEMUX_SHIFT 0x00000000 + +#define ATOM_DEVICE_I2C_ID_MASK 0x00000070 +#define ATOM_DEVICE_I2C_ID_SHIFT 0x00000004 +#define ATOM_DEVICE_I2C_ID_IS_FOR_NON_MM_USE 0x00000001 +#define ATOM_DEVICE_I2C_ID_IS_FOR_MM_USE 0x00000002 +#define ATOM_DEVICE_I2C_ID_IS_FOR_SDVO_USE 0x00000003 //For IGP RS600 +#define ATOM_DEVICE_I2C_ID_IS_FOR_DAC_SCL 0x00000004 //For IGP RS690 + +#define ATOM_DEVICE_I2C_HARDWARE_CAP_MASK 0x00000080 +#define ATOM_DEVICE_I2C_HARDWARE_CAP_SHIFT 0x00000007 +#define ATOM_DEVICE_USES_SOFTWARE_ASSISTED_I2C 0x00000000 +#define ATOM_DEVICE_USES_HARDWARE_ASSISTED_I2C 0x00000001 + +// usDeviceSupport: +// Bits0 = 0 - no CRT1 support= 1- CRT1 is supported +// Bit 1 = 0 - no LCD1 support= 1- LCD1 is supported +// Bit 2 = 0 - no TV1 support= 1- TV1 is supported +// Bit 3 = 0 - no DFP1 support= 1- DFP1 is supported +// Bit 4 = 0 - no CRT2 support= 1- CRT2 is supported +// Bit 5 = 0 - no LCD2 support= 1- LCD2 is supported +// Bit 6 = 0 - no DFP6 support= 1- DFP6 is supported +// Bit 7 = 0 - no DFP2 support= 1- DFP2 is supported +// Bit 8 = 0 - no CV support= 1- CV is supported +// Bit 9 = 0 - no DFP3 support= 1- DFP3 is supported +// Bit 10 = 0 - no DFP4 support= 1- DFP4 is supported +// Bit 11 = 0 - no DFP5 support= 1- DFP5 is supported +// +// + +/****************************************************************************/ +/* Structure used in MclkSS_InfoTable */ +/****************************************************************************/ +// ucI2C_ConfigID +// [7:0] - I2C LINE Associate ID +// = 0 - no I2C +// [7] - HW_Cap = 1, [6:0]=HW assisted I2C ID(HW line selection) +// = 0, [6:0]=SW assisted I2C ID +// [6-4] - HW_ENGINE_ID = 1, HW engine for NON multimedia use +// = 2, HW engine for Multimedia use +// = 3-7 Reserved for future I2C engines +// [3-0] - I2C_LINE_MUX = A Mux number when it's HW assisted I2C or GPIO ID when it's SW I2C + +typedef struct _ATOM_I2C_ID_CONFIG +{ +#if ATOM_BIG_ENDIAN + UCHAR bfHW_Capable:1; + UCHAR bfHW_EngineID:3; + UCHAR bfI2C_LineMux:4; +#else + UCHAR bfI2C_LineMux:4; + UCHAR bfHW_EngineID:3; + UCHAR bfHW_Capable:1; +#endif +}ATOM_I2C_ID_CONFIG; + +typedef union _ATOM_I2C_ID_CONFIG_ACCESS +{ + ATOM_I2C_ID_CONFIG sbfAccess; + UCHAR ucAccess; +}ATOM_I2C_ID_CONFIG_ACCESS; + + +/****************************************************************************/ +// Structure used in GPIO_I2C_InfoTable +/****************************************************************************/ +typedef struct _ATOM_GPIO_I2C_ASSIGMENT +{ + USHORT usClkMaskRegisterIndex; + USHORT usClkEnRegisterIndex; + USHORT usClkY_RegisterIndex; + USHORT usClkA_RegisterIndex; + USHORT usDataMaskRegisterIndex; + USHORT usDataEnRegisterIndex; + USHORT usDataY_RegisterIndex; + USHORT usDataA_RegisterIndex; + ATOM_I2C_ID_CONFIG_ACCESS sucI2cId; + UCHAR ucClkMaskShift; + UCHAR ucClkEnShift; + UCHAR ucClkY_Shift; + UCHAR ucClkA_Shift; + UCHAR ucDataMaskShift; + UCHAR ucDataEnShift; + UCHAR ucDataY_Shift; + UCHAR ucDataA_Shift; + UCHAR ucReserved1; + UCHAR ucReserved2; +}ATOM_GPIO_I2C_ASSIGMENT; + +typedef struct _ATOM_GPIO_I2C_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_GPIO_I2C_ASSIGMENT asGPIO_Info[ATOM_MAX_SUPPORTED_DEVICE]; +}ATOM_GPIO_I2C_INFO; + +/****************************************************************************/ +// Common Structure used in other structures +/****************************************************************************/ + +#ifndef _H2INC + +//Please don't add or expand this bitfield structure below, this one will retire soon.! +typedef struct _ATOM_MODE_MISC_INFO +{ +#if ATOM_BIG_ENDIAN + USHORT Reserved:6; + USHORT RGB888:1; + USHORT DoubleClock:1; + USHORT Interlace:1; + USHORT CompositeSync:1; + USHORT V_ReplicationBy2:1; + USHORT H_ReplicationBy2:1; + USHORT VerticalCutOff:1; + USHORT VSyncPolarity:1; //0=Active High, 1=Active Low + USHORT HSyncPolarity:1; //0=Active High, 1=Active Low + USHORT HorizontalCutOff:1; +#else + USHORT HorizontalCutOff:1; + USHORT HSyncPolarity:1; //0=Active High, 1=Active Low + USHORT VSyncPolarity:1; //0=Active High, 1=Active Low + USHORT VerticalCutOff:1; + USHORT H_ReplicationBy2:1; + USHORT V_ReplicationBy2:1; + USHORT CompositeSync:1; + USHORT Interlace:1; + USHORT DoubleClock:1; + USHORT RGB888:1; + USHORT Reserved:6; +#endif +}ATOM_MODE_MISC_INFO; + +typedef union _ATOM_MODE_MISC_INFO_ACCESS +{ + ATOM_MODE_MISC_INFO sbfAccess; + USHORT usAccess; +}ATOM_MODE_MISC_INFO_ACCESS; + +#else + +typedef union _ATOM_MODE_MISC_INFO_ACCESS +{ + USHORT usAccess; +}ATOM_MODE_MISC_INFO_ACCESS; + +#endif + +// usModeMiscInfo- +#define ATOM_H_CUTOFF 0x01 +#define ATOM_HSYNC_POLARITY 0x02 //0=Active High, 1=Active Low +#define ATOM_VSYNC_POLARITY 0x04 //0=Active High, 1=Active Low +#define ATOM_V_CUTOFF 0x08 +#define ATOM_H_REPLICATIONBY2 0x10 +#define ATOM_V_REPLICATIONBY2 0x20 +#define ATOM_COMPOSITESYNC 0x40 +#define ATOM_INTERLACE 0x80 +#define ATOM_DOUBLE_CLOCK_MODE 0x100 +#define ATOM_RGB888_MODE 0x200 + +//usRefreshRate- +#define ATOM_REFRESH_43 43 +#define ATOM_REFRESH_47 47 +#define ATOM_REFRESH_56 56 +#define ATOM_REFRESH_60 60 +#define ATOM_REFRESH_65 65 +#define ATOM_REFRESH_70 70 +#define ATOM_REFRESH_72 72 +#define ATOM_REFRESH_75 75 +#define ATOM_REFRESH_85 85 + +// ATOM_MODE_TIMING data are exactly the same as VESA timing data. +// Translation from EDID to ATOM_MODE_TIMING, use the following formula. +// +// VESA_HTOTAL = VESA_ACTIVE + 2* VESA_BORDER + VESA_BLANK +// = EDID_HA + EDID_HBL +// VESA_HDISP = VESA_ACTIVE = EDID_HA +// VESA_HSYNC_START = VESA_ACTIVE + VESA_BORDER + VESA_FRONT_PORCH +// = EDID_HA + EDID_HSO +// VESA_HSYNC_WIDTH = VESA_HSYNC_TIME = EDID_HSPW +// VESA_BORDER = EDID_BORDER + +/****************************************************************************/ +// Structure used in SetCRTC_UsingDTDTimingTable +/****************************************************************************/ +typedef struct _SET_CRTC_USING_DTD_TIMING_PARAMETERS +{ + USHORT usH_Size; + USHORT usH_Blanking_Time; + USHORT usV_Size; + USHORT usV_Blanking_Time; + USHORT usH_SyncOffset; + USHORT usH_SyncWidth; + USHORT usV_SyncOffset; + USHORT usV_SyncWidth; + ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo; + UCHAR ucH_Border; // From DFP EDID + UCHAR ucV_Border; + UCHAR ucCRTC; // ATOM_CRTC1 or ATOM_CRTC2 + UCHAR ucPadding[3]; +}SET_CRTC_USING_DTD_TIMING_PARAMETERS; + +/****************************************************************************/ +// Structure used in SetCRTC_TimingTable +/****************************************************************************/ +typedef struct _SET_CRTC_TIMING_PARAMETERS +{ + USHORT usH_Total; // horizontal total + USHORT usH_Disp; // horizontal display + USHORT usH_SyncStart; // horozontal Sync start + USHORT usH_SyncWidth; // horizontal Sync width + USHORT usV_Total; // vertical total + USHORT usV_Disp; // vertical display + USHORT usV_SyncStart; // vertical Sync start + USHORT usV_SyncWidth; // vertical Sync width + ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo; + UCHAR ucCRTC; // ATOM_CRTC1 or ATOM_CRTC2 + UCHAR ucOverscanRight; // right + UCHAR ucOverscanLeft; // left + UCHAR ucOverscanBottom; // bottom + UCHAR ucOverscanTop; // top + UCHAR ucReserved; +}SET_CRTC_TIMING_PARAMETERS; +#define SET_CRTC_TIMING_PARAMETERS_PS_ALLOCATION SET_CRTC_TIMING_PARAMETERS + +/****************************************************************************/ +// Structure used in StandardVESA_TimingTable +// AnalogTV_InfoTable +// ComponentVideoInfoTable +/****************************************************************************/ +typedef struct _ATOM_MODE_TIMING +{ + USHORT usCRTC_H_Total; + USHORT usCRTC_H_Disp; + USHORT usCRTC_H_SyncStart; + USHORT usCRTC_H_SyncWidth; + USHORT usCRTC_V_Total; + USHORT usCRTC_V_Disp; + USHORT usCRTC_V_SyncStart; + USHORT usCRTC_V_SyncWidth; + USHORT usPixelClock; //in 10Khz unit + ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo; + USHORT usCRTC_OverscanRight; + USHORT usCRTC_OverscanLeft; + USHORT usCRTC_OverscanBottom; + USHORT usCRTC_OverscanTop; + USHORT usReserve; + UCHAR ucInternalModeNumber; + UCHAR ucRefreshRate; +}ATOM_MODE_TIMING; + +typedef struct _ATOM_DTD_FORMAT +{ + USHORT usPixClk; + USHORT usHActive; + USHORT usHBlanking_Time; + USHORT usVActive; + USHORT usVBlanking_Time; + USHORT usHSyncOffset; + USHORT usHSyncWidth; + USHORT usVSyncOffset; + USHORT usVSyncWidth; + USHORT usImageHSize; + USHORT usImageVSize; + UCHAR ucHBorder; + UCHAR ucVBorder; + ATOM_MODE_MISC_INFO_ACCESS susModeMiscInfo; + UCHAR ucInternalModeNumber; + UCHAR ucRefreshRate; +}ATOM_DTD_FORMAT; + +/****************************************************************************/ +// Structure used in LVDS_InfoTable +// * Need a document to describe this table +/****************************************************************************/ +#define SUPPORTED_LCD_REFRESHRATE_30Hz 0x0004 +#define SUPPORTED_LCD_REFRESHRATE_40Hz 0x0008 +#define SUPPORTED_LCD_REFRESHRATE_50Hz 0x0010 +#define SUPPORTED_LCD_REFRESHRATE_60Hz 0x0020 + +//ucTableFormatRevision=1 +//ucTableContentRevision=1 +typedef struct _ATOM_LVDS_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_DTD_FORMAT sLCDTiming; + USHORT usModePatchTableOffset; + USHORT usSupportedRefreshRate; //Refer to panel info table in ATOMBIOS extension Spec. + USHORT usOffDelayInMs; + UCHAR ucPowerSequenceDigOntoDEin10Ms; + UCHAR ucPowerSequenceDEtoBLOnin10Ms; + UCHAR ucLVDS_Misc; // Bit0:{=0:single, =1:dual},Bit1 {=0:666RGB, =1:888RGB},Bit2:3:{Grey level} + // Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888} + // Bit5:{=0:Spatial Dithering disabled;1 Spatial Dithering enabled} + // Bit6:{=0:Temporal Dithering disabled;1 Temporal Dithering enabled} + UCHAR ucPanelDefaultRefreshRate; + UCHAR ucPanelIdentification; + UCHAR ucSS_Id; +}ATOM_LVDS_INFO; + +//ucTableFormatRevision=1 +//ucTableContentRevision=2 +typedef struct _ATOM_LVDS_INFO_V12 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_DTD_FORMAT sLCDTiming; + USHORT usExtInfoTableOffset; + USHORT usSupportedRefreshRate; //Refer to panel info table in ATOMBIOS extension Spec. + USHORT usOffDelayInMs; + UCHAR ucPowerSequenceDigOntoDEin10Ms; + UCHAR ucPowerSequenceDEtoBLOnin10Ms; + UCHAR ucLVDS_Misc; // Bit0:{=0:single, =1:dual},Bit1 {=0:666RGB, =1:888RGB},Bit2:3:{Grey level} + // Bit4:{=0:LDI format for RGB888, =1 FPDI format for RGB888} + // Bit5:{=0:Spatial Dithering disabled;1 Spatial Dithering enabled} + // Bit6:{=0:Temporal Dithering disabled;1 Temporal Dithering enabled} + UCHAR ucPanelDefaultRefreshRate; + UCHAR ucPanelIdentification; + UCHAR ucSS_Id; + USHORT usLCDVenderID; + USHORT usLCDProductID; + UCHAR ucLCDPanel_SpecialHandlingCap; + UCHAR ucPanelInfoSize; // start from ATOM_DTD_FORMAT to end of panel info, include ExtInfoTable + UCHAR ucReserved[2]; +}ATOM_LVDS_INFO_V12; + +//Definitions for ucLCDPanel_SpecialHandlingCap: + +//Once DAL sees this CAP is set, it will read EDID from LCD on its own instead of using sLCDTiming in ATOM_LVDS_INFO_V12. +//Other entries in ATOM_LVDS_INFO_V12 are still valid/useful to DAL +#define LCDPANEL_CAP_READ_EDID 0x1 + +//If a design supports DRR (dynamic refresh rate) on internal panels (LVDS or EDP), this cap is set in ucLCDPanel_SpecialHandlingCap together +//with multiple supported refresh rates@usSupportedRefreshRate. This cap should not be set when only slow refresh rate is supported (static +//refresh rate switch by SW. This is only valid from ATOM_LVDS_INFO_V12 +#define LCDPANEL_CAP_DRR_SUPPORTED 0x2 + +//Use this cap bit for a quick reference whether an embadded panel (LCD1 ) is LVDS or eDP. +#define LCDPANEL_CAP_eDP 0x4 + + +//Color Bit Depth definition in EDID V1.4 @BYTE 14h +//Bit 6 5 4 + // 0 0 0 - Color bit depth is undefined + // 0 0 1 - 6 Bits per Primary Color + // 0 1 0 - 8 Bits per Primary Color + // 0 1 1 - 10 Bits per Primary Color + // 1 0 0 - 12 Bits per Primary Color + // 1 0 1 - 14 Bits per Primary Color + // 1 1 0 - 16 Bits per Primary Color + // 1 1 1 - Reserved + +#define PANEL_COLOR_BIT_DEPTH_MASK 0x70 + +// Bit7:{=0:Random Dithering disabled;1 Random Dithering enabled} +#define PANEL_RANDOM_DITHER 0x80 +#define PANEL_RANDOM_DITHER_MASK 0x80 + +#define ATOM_LVDS_INFO_LAST ATOM_LVDS_INFO_V12 // no need to change this + +/****************************************************************************/ +// Structures used by LCD_InfoTable V1.3 Note: previous version was called ATOM_LVDS_INFO_V12 +// ASIC Families: NI +// ucTableFormatRevision=1 +// ucTableContentRevision=3 +/****************************************************************************/ +typedef struct _ATOM_LCD_INFO_V13 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_DTD_FORMAT sLCDTiming; + USHORT usExtInfoTableOffset; + USHORT usSupportedRefreshRate; //Refer to panel info table in ATOMBIOS extension Spec. + ULONG ulReserved0; + UCHAR ucLCD_Misc; // Reorganized in V13 + // Bit0: {=0:single, =1:dual}, + // Bit1: {=0:LDI format for RGB888, =1 FPDI format for RGB888} // was {=0:666RGB, =1:888RGB}, + // Bit3:2: {Grey level} + // Bit6:4 Color Bit Depth definition (see below definition in EDID V1.4 @BYTE 14h) + // Bit7 Reserved. was for ATOM_PANEL_MISC_API_ENABLED, still need it? + UCHAR ucPanelDefaultRefreshRate; + UCHAR ucPanelIdentification; + UCHAR ucSS_Id; + USHORT usLCDVenderID; + USHORT usLCDProductID; + UCHAR ucLCDPanel_SpecialHandlingCap; // Reorganized in V13 + // Bit0: Once DAL sees this CAP is set, it will read EDID from LCD on its own + // Bit1: See LCDPANEL_CAP_DRR_SUPPORTED + // Bit2: a quick reference whether an embadded panel (LCD1 ) is LVDS (0) or eDP (1) + // Bit7-3: Reserved + UCHAR ucPanelInfoSize; // start from ATOM_DTD_FORMAT to end of panel info, include ExtInfoTable + USHORT usBacklightPWM; // Backlight PWM in Hz. New in _V13 + + UCHAR ucPowerSequenceDIGONtoDE_in4Ms; + UCHAR ucPowerSequenceDEtoVARY_BL_in4Ms; + UCHAR ucPowerSequenceVARY_BLtoDE_in4Ms; + UCHAR ucPowerSequenceDEtoDIGON_in4Ms; + + UCHAR ucOffDelay_in4Ms; + UCHAR ucPowerSequenceVARY_BLtoBLON_in4Ms; + UCHAR ucPowerSequenceBLONtoVARY_BL_in4Ms; + UCHAR ucReserved1; + + UCHAR ucDPCD_eDP_CONFIGURATION_CAP; // dpcd 0dh + UCHAR ucDPCD_MAX_LINK_RATE; // dpcd 01h + UCHAR ucDPCD_MAX_LANE_COUNT; // dpcd 02h + UCHAR ucDPCD_MAX_DOWNSPREAD; // dpcd 03h + + USHORT usMaxPclkFreqInSingleLink; // Max PixelClock frequency in single link mode. + UCHAR uceDPToLVDSRxId; + UCHAR ucLcdReservd; + ULONG ulReserved[2]; +}ATOM_LCD_INFO_V13; + +#define ATOM_LCD_INFO_LAST ATOM_LCD_INFO_V13 + +//Definitions for ucLCD_Misc +#define ATOM_PANEL_MISC_V13_DUAL 0x00000001 +#define ATOM_PANEL_MISC_V13_FPDI 0x00000002 +#define ATOM_PANEL_MISC_V13_GREY_LEVEL 0x0000000C +#define ATOM_PANEL_MISC_V13_GREY_LEVEL_SHIFT 2 +#define ATOM_PANEL_MISC_V13_COLOR_BIT_DEPTH_MASK 0x70 +#define ATOM_PANEL_MISC_V13_6BIT_PER_COLOR 0x10 +#define ATOM_PANEL_MISC_V13_8BIT_PER_COLOR 0x20 + +//Color Bit Depth definition in EDID V1.4 @BYTE 14h +//Bit 6 5 4 + // 0 0 0 - Color bit depth is undefined + // 0 0 1 - 6 Bits per Primary Color + // 0 1 0 - 8 Bits per Primary Color + // 0 1 1 - 10 Bits per Primary Color + // 1 0 0 - 12 Bits per Primary Color + // 1 0 1 - 14 Bits per Primary Color + // 1 1 0 - 16 Bits per Primary Color + // 1 1 1 - Reserved + +//Definitions for ucLCDPanel_SpecialHandlingCap: + +//Once DAL sees this CAP is set, it will read EDID from LCD on its own instead of using sLCDTiming in ATOM_LVDS_INFO_V12. +//Other entries in ATOM_LVDS_INFO_V12 are still valid/useful to DAL +#define LCDPANEL_CAP_V13_READ_EDID 0x1 // = LCDPANEL_CAP_READ_EDID no change comparing to previous version + +//If a design supports DRR (dynamic refresh rate) on internal panels (LVDS or EDP), this cap is set in ucLCDPanel_SpecialHandlingCap together +//with multiple supported refresh rates@usSupportedRefreshRate. This cap should not be set when only slow refresh rate is supported (static +//refresh rate switch by SW. This is only valid from ATOM_LVDS_INFO_V12 +#define LCDPANEL_CAP_V13_DRR_SUPPORTED 0x2 // = LCDPANEL_CAP_DRR_SUPPORTED no change comparing to previous version + +//Use this cap bit for a quick reference whether an embadded panel (LCD1 ) is LVDS or eDP. +#define LCDPANEL_CAP_V13_eDP 0x4 // = LCDPANEL_CAP_eDP no change comparing to previous version + +//uceDPToLVDSRxId +#define eDP_TO_LVDS_RX_DISABLE 0x00 // no eDP->LVDS translator chip +#define eDP_TO_LVDS_COMMON_ID 0x01 // common eDP->LVDS translator chip without AMD SW init +#define eDP_TO_LVDS_RT_ID 0x02 // RT tanslator which require AMD SW init + +typedef struct _ATOM_PATCH_RECORD_MODE +{ + UCHAR ucRecordType; + USHORT usHDisp; + USHORT usVDisp; +}ATOM_PATCH_RECORD_MODE; + +typedef struct _ATOM_LCD_RTS_RECORD +{ + UCHAR ucRecordType; + UCHAR ucRTSValue; +}ATOM_LCD_RTS_RECORD; + +//!! If the record below exits, it shoud always be the first record for easy use in command table!!! +// The record below is only used when LVDS_Info is present. From ATOM_LVDS_INFO_V12, use ucLCDPanel_SpecialHandlingCap instead. +typedef struct _ATOM_LCD_MODE_CONTROL_CAP +{ + UCHAR ucRecordType; + USHORT usLCDCap; +}ATOM_LCD_MODE_CONTROL_CAP; + +#define LCD_MODE_CAP_BL_OFF 1 +#define LCD_MODE_CAP_CRTC_OFF 2 +#define LCD_MODE_CAP_PANEL_OFF 4 + +typedef struct _ATOM_FAKE_EDID_PATCH_RECORD +{ + UCHAR ucRecordType; + UCHAR ucFakeEDIDLength; + UCHAR ucFakeEDIDString[1]; // This actually has ucFakeEdidLength elements. +} ATOM_FAKE_EDID_PATCH_RECORD; + +typedef struct _ATOM_PANEL_RESOLUTION_PATCH_RECORD +{ + UCHAR ucRecordType; + USHORT usHSize; + USHORT usVSize; +}ATOM_PANEL_RESOLUTION_PATCH_RECORD; + +#define LCD_MODE_PATCH_RECORD_MODE_TYPE 1 +#define LCD_RTS_RECORD_TYPE 2 +#define LCD_CAP_RECORD_TYPE 3 +#define LCD_FAKE_EDID_PATCH_RECORD_TYPE 4 +#define LCD_PANEL_RESOLUTION_RECORD_TYPE 5 +#define LCD_EDID_OFFSET_PATCH_RECORD_TYPE 6 +#define ATOM_RECORD_END_TYPE 0xFF + +/****************************Spread Spectrum Info Table Definitions **********************/ + +//ucTableFormatRevision=1 +//ucTableContentRevision=2 +typedef struct _ATOM_SPREAD_SPECTRUM_ASSIGNMENT +{ + USHORT usSpreadSpectrumPercentage; + UCHAR ucSpreadSpectrumType; //Bit1=0 Down Spread,=1 Center Spread. Bit1=1 Ext. =0 Int. Bit2=1: PCIE REFCLK SS =0 iternal PPLL SS Others:TBD + UCHAR ucSS_Step; + UCHAR ucSS_Delay; + UCHAR ucSS_Id; + UCHAR ucRecommendedRef_Div; + UCHAR ucSS_Range; //it was reserved for V11 +}ATOM_SPREAD_SPECTRUM_ASSIGNMENT; + +#define ATOM_MAX_SS_ENTRY 16 +#define ATOM_DP_SS_ID1 0x0f1 // SS ID for internal DP stream at 2.7Ghz. if ATOM_DP_SS_ID2 does not exist in SS_InfoTable, it is used for internal DP stream at 1.62Ghz as well. +#define ATOM_DP_SS_ID2 0x0f2 // SS ID for internal DP stream at 1.62Ghz, if it exists in SS_InfoTable. +#define ATOM_LVLINK_2700MHz_SS_ID 0x0f3 // SS ID for LV link translator chip at 2.7Ghz +#define ATOM_LVLINK_1620MHz_SS_ID 0x0f4 // SS ID for LV link translator chip at 1.62Ghz + + +#define ATOM_SS_DOWN_SPREAD_MODE_MASK 0x00000000 +#define ATOM_SS_DOWN_SPREAD_MODE 0x00000000 +#define ATOM_SS_CENTRE_SPREAD_MODE_MASK 0x00000001 +#define ATOM_SS_CENTRE_SPREAD_MODE 0x00000001 +#define ATOM_INTERNAL_SS_MASK 0x00000000 +#define ATOM_EXTERNAL_SS_MASK 0x00000002 +#define EXEC_SS_STEP_SIZE_SHIFT 2 +#define EXEC_SS_DELAY_SHIFT 4 +#define ACTIVEDATA_TO_BLON_DELAY_SHIFT 4 + +typedef struct _ATOM_SPREAD_SPECTRUM_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_SPREAD_SPECTRUM_ASSIGNMENT asSS_Info[ATOM_MAX_SS_ENTRY]; +}ATOM_SPREAD_SPECTRUM_INFO; + +/****************************************************************************/ +// Structure used in AnalogTV_InfoTable (Top level) +/****************************************************************************/ +//ucTVBootUpDefaultStd definition: + +//ATOM_TV_NTSC 1 +//ATOM_TV_NTSCJ 2 +//ATOM_TV_PAL 3 +//ATOM_TV_PALM 4 +//ATOM_TV_PALCN 5 +//ATOM_TV_PALN 6 +//ATOM_TV_PAL60 7 +//ATOM_TV_SECAM 8 + +//ucTVSupportedStd definition: +#define NTSC_SUPPORT 0x1 +#define NTSCJ_SUPPORT 0x2 + +#define PAL_SUPPORT 0x4 +#define PALM_SUPPORT 0x8 +#define PALCN_SUPPORT 0x10 +#define PALN_SUPPORT 0x20 +#define PAL60_SUPPORT 0x40 +#define SECAM_SUPPORT 0x80 + +#define MAX_SUPPORTED_TV_TIMING 2 + +typedef struct _ATOM_ANALOG_TV_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + UCHAR ucTV_SupportedStandard; + UCHAR ucTV_BootUpDefaultStandard; + UCHAR ucExt_TV_ASIC_ID; + UCHAR ucExt_TV_ASIC_SlaveAddr; + /*ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_TV_TIMING];*/ + ATOM_MODE_TIMING aModeTimings[MAX_SUPPORTED_TV_TIMING]; +}ATOM_ANALOG_TV_INFO; + +#define MAX_SUPPORTED_TV_TIMING_V1_2 3 + +typedef struct _ATOM_ANALOG_TV_INFO_V1_2 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + UCHAR ucTV_SupportedStandard; + UCHAR ucTV_BootUpDefaultStandard; + UCHAR ucExt_TV_ASIC_ID; + UCHAR ucExt_TV_ASIC_SlaveAddr; + ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_TV_TIMING_V1_2]; +}ATOM_ANALOG_TV_INFO_V1_2; + +typedef struct _ATOM_DPCD_INFO +{ + UCHAR ucRevisionNumber; //10h : Revision 1.0; 11h : Revision 1.1 + UCHAR ucMaxLinkRate; //06h : 1.62Gbps per lane; 0Ah = 2.7Gbps per lane + UCHAR ucMaxLane; //Bits 4:0 = MAX_LANE_COUNT (1/2/4). Bit 7 = ENHANCED_FRAME_CAP + UCHAR ucMaxDownSpread; //Bit0 = 0: No Down spread; Bit0 = 1: 0.5% (Subject to change according to DP spec) +}ATOM_DPCD_INFO; + +#define ATOM_DPCD_MAX_LANE_MASK 0x1F + +/**************************************************************************/ +// VRAM usage and their defintions + +// One chunk of VRAM used by Bios are for HWICON surfaces,EDID data. +// Current Mode timing and Dail Timing and/or STD timing data EACH device. They can be broken down as below. +// All the addresses below are the offsets from the frame buffer start.They all MUST be Dword aligned! +// To driver: The physical address of this memory portion=mmFB_START(4K aligned)+ATOMBIOS_VRAM_USAGE_START_ADDR+ATOM_x_ADDR +// To Bios: ATOMBIOS_VRAM_USAGE_START_ADDR+ATOM_x_ADDR->MM_INDEX + +#ifndef VESA_MEMORY_IN_64K_BLOCK +#define VESA_MEMORY_IN_64K_BLOCK 0x100 //256*64K=16Mb (Max. VESA memory is 16Mb!) +#endif + +#define ATOM_EDID_RAW_DATASIZE 256 //In Bytes +#define ATOM_HWICON_SURFACE_SIZE 4096 //In Bytes +#define ATOM_HWICON_INFOTABLE_SIZE 32 +#define MAX_DTD_MODE_IN_VRAM 6 +#define ATOM_DTD_MODE_SUPPORT_TBL_SIZE (MAX_DTD_MODE_IN_VRAM*28) //28= (SIZEOF ATOM_DTD_FORMAT) +#define ATOM_STD_MODE_SUPPORT_TBL_SIZE 32*8 //32 is a predefined number,8= (SIZEOF ATOM_STD_FORMAT) +//20 bytes for Encoder Type and DPCD in STD EDID area +#define DFP_ENCODER_TYPE_OFFSET (ATOM_EDID_RAW_DATASIZE + ATOM_DTD_MODE_SUPPORT_TBL_SIZE + ATOM_STD_MODE_SUPPORT_TBL_SIZE - 20) +#define ATOM_DP_DPCD_OFFSET (DFP_ENCODER_TYPE_OFFSET + 4 ) + +#define ATOM_HWICON1_SURFACE_ADDR 0 +#define ATOM_HWICON2_SURFACE_ADDR (ATOM_HWICON1_SURFACE_ADDR + ATOM_HWICON_SURFACE_SIZE) +#define ATOM_HWICON_INFOTABLE_ADDR (ATOM_HWICON2_SURFACE_ADDR + ATOM_HWICON_SURFACE_SIZE) +#define ATOM_CRT1_EDID_ADDR (ATOM_HWICON_INFOTABLE_ADDR + ATOM_HWICON_INFOTABLE_SIZE) +#define ATOM_CRT1_DTD_MODE_TBL_ADDR (ATOM_CRT1_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) +#define ATOM_CRT1_STD_MODE_TBL_ADDR (ATOM_CRT1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) + +#define ATOM_LCD1_EDID_ADDR (ATOM_CRT1_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) +#define ATOM_LCD1_DTD_MODE_TBL_ADDR (ATOM_LCD1_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) +#define ATOM_LCD1_STD_MODE_TBL_ADDR (ATOM_LCD1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) + +#define ATOM_TV1_DTD_MODE_TBL_ADDR (ATOM_LCD1_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) + +#define ATOM_DFP1_EDID_ADDR (ATOM_TV1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) +#define ATOM_DFP1_DTD_MODE_TBL_ADDR (ATOM_DFP1_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) +#define ATOM_DFP1_STD_MODE_TBL_ADDR (ATOM_DFP1_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) + +#define ATOM_CRT2_EDID_ADDR (ATOM_DFP1_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) +#define ATOM_CRT2_DTD_MODE_TBL_ADDR (ATOM_CRT2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) +#define ATOM_CRT2_STD_MODE_TBL_ADDR (ATOM_CRT2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) + +#define ATOM_LCD2_EDID_ADDR (ATOM_CRT2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) +#define ATOM_LCD2_DTD_MODE_TBL_ADDR (ATOM_LCD2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) +#define ATOM_LCD2_STD_MODE_TBL_ADDR (ATOM_LCD2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) + +#define ATOM_DFP6_EDID_ADDR (ATOM_LCD2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) +#define ATOM_DFP6_DTD_MODE_TBL_ADDR (ATOM_DFP6_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) +#define ATOM_DFP6_STD_MODE_TBL_ADDR (ATOM_DFP6_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) + +#define ATOM_DFP2_EDID_ADDR (ATOM_DFP6_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) +#define ATOM_DFP2_DTD_MODE_TBL_ADDR (ATOM_DFP2_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) +#define ATOM_DFP2_STD_MODE_TBL_ADDR (ATOM_DFP2_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) + +#define ATOM_CV_EDID_ADDR (ATOM_DFP2_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) +#define ATOM_CV_DTD_MODE_TBL_ADDR (ATOM_CV_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) +#define ATOM_CV_STD_MODE_TBL_ADDR (ATOM_CV_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) + +#define ATOM_DFP3_EDID_ADDR (ATOM_CV_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) +#define ATOM_DFP3_DTD_MODE_TBL_ADDR (ATOM_DFP3_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) +#define ATOM_DFP3_STD_MODE_TBL_ADDR (ATOM_DFP3_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) + +#define ATOM_DFP4_EDID_ADDR (ATOM_DFP3_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) +#define ATOM_DFP4_DTD_MODE_TBL_ADDR (ATOM_DFP4_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) +#define ATOM_DFP4_STD_MODE_TBL_ADDR (ATOM_DFP4_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) + +#define ATOM_DFP5_EDID_ADDR (ATOM_DFP4_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) +#define ATOM_DFP5_DTD_MODE_TBL_ADDR (ATOM_DFP5_EDID_ADDR + ATOM_EDID_RAW_DATASIZE) +#define ATOM_DFP5_STD_MODE_TBL_ADDR (ATOM_DFP5_DTD_MODE_TBL_ADDR + ATOM_DTD_MODE_SUPPORT_TBL_SIZE) + +#define ATOM_DP_TRAINING_TBL_ADDR (ATOM_DFP5_STD_MODE_TBL_ADDR + ATOM_STD_MODE_SUPPORT_TBL_SIZE) + +#define ATOM_STACK_STORAGE_START (ATOM_DP_TRAINING_TBL_ADDR + 1024) +#define ATOM_STACK_STORAGE_END ATOM_STACK_STORAGE_START + 512 + +//The size below is in Kb! +#define ATOM_VRAM_RESERVE_SIZE ((((ATOM_STACK_STORAGE_END - ATOM_HWICON1_SURFACE_ADDR)>>10)+4)&0xFFFC) + +#define ATOM_VRAM_RESERVE_V2_SIZE 32 + +#define ATOM_VRAM_OPERATION_FLAGS_MASK 0xC0000000L +#define ATOM_VRAM_OPERATION_FLAGS_SHIFT 30 +#define ATOM_VRAM_BLOCK_NEEDS_NO_RESERVATION 0x1 +#define ATOM_VRAM_BLOCK_NEEDS_RESERVATION 0x0 + +/***********************************************************************************/ +// Structure used in VRAM_UsageByFirmwareTable +// Note1: This table is filled by SetBiosReservationStartInFB in CoreCommSubs.asm +// at running time. +// note2: From RV770, the memory is more than 32bit addressable, so we will change +// ucTableFormatRevision=1,ucTableContentRevision=4, the strcuture remains +// exactly same as 1.1 and 1.2 (1.3 is never in use), but ulStartAddrUsedByFirmware +// (in offset to start of memory address) is KB aligned instead of byte aligend. +/***********************************************************************************/ +// Note3: +/* If we change usReserved to "usFBUsedbyDrvInKB", then to VBIOS this usFBUsedbyDrvInKB is a predefined, unchanged constant across VGA or non VGA adapter, +for CAIL, The size of FB access area is known, only thing missing is the Offset of FB Access area, so we can have: + +If (ulStartAddrUsedByFirmware!=0) +FBAccessAreaOffset= ulStartAddrUsedByFirmware - usFBUsedbyDrvInKB; +Reserved area has been claimed by VBIOS including this FB access area; CAIL doesn't need to reserve any extra area for this purpose +else //Non VGA case + if (FB_Size<=2Gb) + FBAccessAreaOffset= FB_Size - usFBUsedbyDrvInKB; + else + FBAccessAreaOffset= Aper_Size - usFBUsedbyDrvInKB + +CAIL needs to claim an reserved area defined by FBAccessAreaOffset and usFBUsedbyDrvInKB in non VGA case.*/ + +/***********************************************************************************/ +#define ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO 1 + +typedef struct _ATOM_FIRMWARE_VRAM_RESERVE_INFO +{ + ULONG ulStartAddrUsedByFirmware; + USHORT usFirmwareUseInKb; + USHORT usReserved; +}ATOM_FIRMWARE_VRAM_RESERVE_INFO; + +typedef struct _ATOM_VRAM_USAGE_BY_FIRMWARE +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_FIRMWARE_VRAM_RESERVE_INFO asFirmwareVramReserveInfo[ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO]; +}ATOM_VRAM_USAGE_BY_FIRMWARE; + +// change verion to 1.5, when allow driver to allocate the vram area for command table access. +typedef struct _ATOM_FIRMWARE_VRAM_RESERVE_INFO_V1_5 +{ + ULONG ulStartAddrUsedByFirmware; + USHORT usFirmwareUseInKb; + USHORT usFBUsedByDrvInKb; +}ATOM_FIRMWARE_VRAM_RESERVE_INFO_V1_5; + +typedef struct _ATOM_VRAM_USAGE_BY_FIRMWARE_V1_5 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_FIRMWARE_VRAM_RESERVE_INFO_V1_5 asFirmwareVramReserveInfo[ATOM_MAX_FIRMWARE_VRAM_USAGE_INFO]; +}ATOM_VRAM_USAGE_BY_FIRMWARE_V1_5; + +/****************************************************************************/ +// Structure used in GPIO_Pin_LUTTable +/****************************************************************************/ +typedef struct _ATOM_GPIO_PIN_ASSIGNMENT +{ + USHORT usGpioPin_AIndex; + UCHAR ucGpioPinBitShift; + UCHAR ucGPIO_ID; +}ATOM_GPIO_PIN_ASSIGNMENT; + +//ucGPIO_ID pre-define id for multiple usage +//from SMU7.x, if ucGPIO_ID=PP_AC_DC_SWITCH_GPIO_PINID in GPIO_LUTTable, AC/DC switching feature is enable +#define PP_AC_DC_SWITCH_GPIO_PINID 60 +//from SMU7.x, if ucGPIO_ID=VDDC_REGULATOR_VRHOT_GPIO_PINID in GPIO_LUTable, VRHot feature is enable +#define VDDC_VRHOT_GPIO_PINID 61 +//if ucGPIO_ID=VDDC_PCC_GPIO_PINID in GPIO_LUTable, Peak Current Control feature is enabled +#define VDDC_PCC_GPIO_PINID 62 + +typedef struct _ATOM_GPIO_PIN_LUT +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_GPIO_PIN_ASSIGNMENT asGPIO_Pin[1]; +}ATOM_GPIO_PIN_LUT; + +/****************************************************************************/ +// Structure used in ComponentVideoInfoTable +/****************************************************************************/ +#define GPIO_PIN_ACTIVE_HIGH 0x1 + +#define MAX_SUPPORTED_CV_STANDARDS 5 + +// definitions for ATOM_D_INFO.ucSettings +#define ATOM_GPIO_SETTINGS_BITSHIFT_MASK 0x1F // [4:0] +#define ATOM_GPIO_SETTINGS_RESERVED_MASK 0x60 // [6:5] = must be zeroed out +#define ATOM_GPIO_SETTINGS_ACTIVE_MASK 0x80 // [7] + +typedef struct _ATOM_GPIO_INFO +{ + USHORT usAOffset; + UCHAR ucSettings; + UCHAR ucReserved; +}ATOM_GPIO_INFO; + +// definitions for ATOM_COMPONENT_VIDEO_INFO.ucMiscInfo (bit vector) +#define ATOM_CV_RESTRICT_FORMAT_SELECTION 0x2 + +// definitions for ATOM_COMPONENT_VIDEO_INFO.uc480i/uc480p/uc720p/uc1080i +#define ATOM_GPIO_DEFAULT_MODE_EN 0x80 //[7]; +#define ATOM_GPIO_SETTING_PERMODE_MASK 0x7F //[6:0] + +// definitions for ATOM_COMPONENT_VIDEO_INFO.ucLetterBoxMode +//Line 3 out put 5V. +#define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_A 0x01 //represent gpio 3 state for 16:9 +#define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_B 0x02 //represent gpio 4 state for 16:9 +#define ATOM_CV_LINE3_ASPECTRATIO_16_9_GPIO_SHIFT 0x0 + +//Line 3 out put 2.2V +#define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_A 0x04 //represent gpio 3 state for 4:3 Letter box +#define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_B 0x08 //represent gpio 4 state for 4:3 Letter box +#define ATOM_CV_LINE3_ASPECTRATIO_4_3_LETBOX_GPIO_SHIFT 0x2 + +//Line 3 out put 0V +#define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_A 0x10 //represent gpio 3 state for 4:3 +#define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_B 0x20 //represent gpio 4 state for 4:3 +#define ATOM_CV_LINE3_ASPECTRATIO_4_3_GPIO_SHIFT 0x4 + +#define ATOM_CV_LINE3_ASPECTRATIO_MASK 0x3F // bit [5:0] + +#define ATOM_CV_LINE3_ASPECTRATIO_EXIST 0x80 //bit 7 + +//GPIO bit index in gpio setting per mode value, also represend the block no. in gpio blocks. +#define ATOM_GPIO_INDEX_LINE3_ASPECRATIO_GPIO_A 3 //bit 3 in uc480i/uc480p/uc720p/uc1080i, which represend the default gpio bit setting for the mode. +#define ATOM_GPIO_INDEX_LINE3_ASPECRATIO_GPIO_B 4 //bit 4 in uc480i/uc480p/uc720p/uc1080i, which represend the default gpio bit setting for the mode. + + +typedef struct _ATOM_COMPONENT_VIDEO_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usMask_PinRegisterIndex; + USHORT usEN_PinRegisterIndex; + USHORT usY_PinRegisterIndex; + USHORT usA_PinRegisterIndex; + UCHAR ucBitShift; + UCHAR ucPinActiveState; //ucPinActiveState: Bit0=1 active high, =0 active low + ATOM_DTD_FORMAT sReserved; // must be zeroed out + UCHAR ucMiscInfo; + UCHAR uc480i; + UCHAR uc480p; + UCHAR uc720p; + UCHAR uc1080i; + UCHAR ucLetterBoxMode; + UCHAR ucReserved[3]; + UCHAR ucNumOfWbGpioBlocks; //For Component video D-Connector support. If zere, NTSC type connector + ATOM_GPIO_INFO aWbGpioStateBlock[MAX_SUPPORTED_CV_STANDARDS]; + ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_CV_STANDARDS]; +}ATOM_COMPONENT_VIDEO_INFO; + +//ucTableFormatRevision=2 +//ucTableContentRevision=1 +typedef struct _ATOM_COMPONENT_VIDEO_INFO_V21 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + UCHAR ucMiscInfo; + UCHAR uc480i; + UCHAR uc480p; + UCHAR uc720p; + UCHAR uc1080i; + UCHAR ucReserved; + UCHAR ucLetterBoxMode; + UCHAR ucNumOfWbGpioBlocks; //For Component video D-Connector support. If zere, NTSC type connector + ATOM_GPIO_INFO aWbGpioStateBlock[MAX_SUPPORTED_CV_STANDARDS]; + ATOM_DTD_FORMAT aModeTimings[MAX_SUPPORTED_CV_STANDARDS]; +}ATOM_COMPONENT_VIDEO_INFO_V21; + +#define ATOM_COMPONENT_VIDEO_INFO_LAST ATOM_COMPONENT_VIDEO_INFO_V21 + +/****************************************************************************/ +// Structure used in object_InfoTable +/****************************************************************************/ +typedef struct _ATOM_OBJECT_HEADER +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usDeviceSupport; + USHORT usConnectorObjectTableOffset; + USHORT usRouterObjectTableOffset; + USHORT usEncoderObjectTableOffset; + USHORT usProtectionObjectTableOffset; //only available when Protection block is independent. + USHORT usDisplayPathTableOffset; +}ATOM_OBJECT_HEADER; + +typedef struct _ATOM_OBJECT_HEADER_V3 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usDeviceSupport; + USHORT usConnectorObjectTableOffset; + USHORT usRouterObjectTableOffset; + USHORT usEncoderObjectTableOffset; + USHORT usProtectionObjectTableOffset; //only available when Protection block is independent. + USHORT usDisplayPathTableOffset; + USHORT usMiscObjectTableOffset; +}ATOM_OBJECT_HEADER_V3; + +typedef struct _ATOM_DISPLAY_OBJECT_PATH +{ + USHORT usDeviceTag; //supported device + USHORT usSize; //the size of ATOM_DISPLAY_OBJECT_PATH + USHORT usConnObjectId; //Connector Object ID + USHORT usGPUObjectId; //GPU ID + USHORT usGraphicObjIds[1]; //1st Encoder Obj source from GPU to last Graphic Obj destinate to connector. +}ATOM_DISPLAY_OBJECT_PATH; + +typedef struct _ATOM_DISPLAY_EXTERNAL_OBJECT_PATH +{ + USHORT usDeviceTag; //supported device + USHORT usSize; //the size of ATOM_DISPLAY_OBJECT_PATH + USHORT usConnObjectId; //Connector Object ID + USHORT usGPUObjectId; //GPU ID + USHORT usGraphicObjIds[2]; //usGraphicObjIds[0]= GPU internal encoder, usGraphicObjIds[1]= external encoder +}ATOM_DISPLAY_EXTERNAL_OBJECT_PATH; + +typedef struct _ATOM_DISPLAY_OBJECT_PATH_TABLE +{ + UCHAR ucNumOfDispPath; + UCHAR ucVersion; + UCHAR ucPadding[2]; + ATOM_DISPLAY_OBJECT_PATH asDispPath[1]; +}ATOM_DISPLAY_OBJECT_PATH_TABLE; + + +typedef struct _ATOM_OBJECT //each object has this structure +{ + USHORT usObjectID; + USHORT usSrcDstTableOffset; + USHORT usRecordOffset; //this pointing to a bunch of records defined below + USHORT usReserved; +}ATOM_OBJECT; + +typedef struct _ATOM_OBJECT_TABLE //Above 4 object table offset pointing to a bunch of objects all have this structure +{ + UCHAR ucNumberOfObjects; + UCHAR ucPadding[3]; + ATOM_OBJECT asObjects[1]; +}ATOM_OBJECT_TABLE; + +typedef struct _ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT //usSrcDstTableOffset pointing to this structure +{ + UCHAR ucNumberOfSrc; + USHORT usSrcObjectID[1]; + UCHAR ucNumberOfDst; + USHORT usDstObjectID[1]; +}ATOM_SRC_DST_TABLE_FOR_ONE_OBJECT; + + +//Two definitions below are for OPM on MXM module designs + +#define EXT_HPDPIN_LUTINDEX_0 0 +#define EXT_HPDPIN_LUTINDEX_1 1 +#define EXT_HPDPIN_LUTINDEX_2 2 +#define EXT_HPDPIN_LUTINDEX_3 3 +#define EXT_HPDPIN_LUTINDEX_4 4 +#define EXT_HPDPIN_LUTINDEX_5 5 +#define EXT_HPDPIN_LUTINDEX_6 6 +#define EXT_HPDPIN_LUTINDEX_7 7 +#define MAX_NUMBER_OF_EXT_HPDPIN_LUT_ENTRIES (EXT_HPDPIN_LUTINDEX_7+1) + +#define EXT_AUXDDC_LUTINDEX_0 0 +#define EXT_AUXDDC_LUTINDEX_1 1 +#define EXT_AUXDDC_LUTINDEX_2 2 +#define EXT_AUXDDC_LUTINDEX_3 3 +#define EXT_AUXDDC_LUTINDEX_4 4 +#define EXT_AUXDDC_LUTINDEX_5 5 +#define EXT_AUXDDC_LUTINDEX_6 6 +#define EXT_AUXDDC_LUTINDEX_7 7 +#define MAX_NUMBER_OF_EXT_AUXDDC_LUT_ENTRIES (EXT_AUXDDC_LUTINDEX_7+1) + +//ucChannelMapping are defined as following +//for DP connector, eDP, DP to VGA/LVDS +//Bit[1:0]: Define which pin connect to DP connector DP_Lane0, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 +//Bit[3:2]: Define which pin connect to DP connector DP_Lane1, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 +//Bit[5:4]: Define which pin connect to DP connector DP_Lane2, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 +//Bit[7:6]: Define which pin connect to DP connector DP_Lane3, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 +typedef struct _ATOM_DP_CONN_CHANNEL_MAPPING +{ +#if ATOM_BIG_ENDIAN + UCHAR ucDP_Lane3_Source:2; + UCHAR ucDP_Lane2_Source:2; + UCHAR ucDP_Lane1_Source:2; + UCHAR ucDP_Lane0_Source:2; +#else + UCHAR ucDP_Lane0_Source:2; + UCHAR ucDP_Lane1_Source:2; + UCHAR ucDP_Lane2_Source:2; + UCHAR ucDP_Lane3_Source:2; +#endif +}ATOM_DP_CONN_CHANNEL_MAPPING; + +//for DVI/HDMI, in dual link case, both links have to have same mapping. +//Bit[1:0]: Define which pin connect to DVI connector data Lane2, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 +//Bit[3:2]: Define which pin connect to DVI connector data Lane1, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 +//Bit[5:4]: Define which pin connect to DVI connector data Lane0, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 +//Bit[7:6]: Define which pin connect to DVI connector clock lane, =0: source from GPU pin TX0, =1: from GPU pin TX1, =2: from GPU pin TX2, =3 from GPU pin TX3 +typedef struct _ATOM_DVI_CONN_CHANNEL_MAPPING +{ +#if ATOM_BIG_ENDIAN + UCHAR ucDVI_CLK_Source:2; + UCHAR ucDVI_DATA0_Source:2; + UCHAR ucDVI_DATA1_Source:2; + UCHAR ucDVI_DATA2_Source:2; +#else + UCHAR ucDVI_DATA2_Source:2; + UCHAR ucDVI_DATA1_Source:2; + UCHAR ucDVI_DATA0_Source:2; + UCHAR ucDVI_CLK_Source:2; +#endif +}ATOM_DVI_CONN_CHANNEL_MAPPING; + +typedef struct _EXT_DISPLAY_PATH +{ + USHORT usDeviceTag; //A bit vector to show what devices are supported + USHORT usDeviceACPIEnum; //16bit device ACPI id. + USHORT usDeviceConnector; //A physical connector for displays to plug in, using object connector definitions + UCHAR ucExtAUXDDCLutIndex; //An index into external AUX/DDC channel LUT + UCHAR ucExtHPDPINLutIndex; //An index into external HPD pin LUT + USHORT usExtEncoderObjId; //external encoder object id + union{ + UCHAR ucChannelMapping; // if ucChannelMapping=0, using default one to one mapping + ATOM_DP_CONN_CHANNEL_MAPPING asDPMapping; + ATOM_DVI_CONN_CHANNEL_MAPPING asDVIMapping; + }; + UCHAR ucChPNInvert; // bit vector for up to 8 lanes, =0: P and N is not invert, =1 P and N is inverted + USHORT usCaps; + USHORT usReserved; +}EXT_DISPLAY_PATH; + +#define NUMBER_OF_UCHAR_FOR_GUID 16 +#define MAX_NUMBER_OF_EXT_DISPLAY_PATH 7 + +//usCaps +#define EXT_DISPLAY_PATH_CAPS__HBR2_DISABLE 0x01 +#define EXT_DISPLAY_PATH_CAPS__DP_FIXED_VS_EN 0x02 + +typedef struct _ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + UCHAR ucGuid [NUMBER_OF_UCHAR_FOR_GUID]; // a GUID is a 16 byte long string + EXT_DISPLAY_PATH sPath[MAX_NUMBER_OF_EXT_DISPLAY_PATH]; // total of fixed 7 entries. + UCHAR ucChecksum; // a simple Checksum of the sum of whole structure equal to 0x0. + UCHAR uc3DStereoPinId; // use for eDP panel + UCHAR ucRemoteDisplayConfig; + UCHAR uceDPToLVDSRxId; + UCHAR ucFixDPVoltageSwing; // usCaps[1]=1, this indicate DP_LANE_SET value + UCHAR Reserved[3]; // for potential expansion +}ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO; + +//Related definitions, all records are different but they have a commond header +typedef struct _ATOM_COMMON_RECORD_HEADER +{ + UCHAR ucRecordType; //An emun to indicate the record type + UCHAR ucRecordSize; //The size of the whole record in byte +}ATOM_COMMON_RECORD_HEADER; + + +#define ATOM_I2C_RECORD_TYPE 1 +#define ATOM_HPD_INT_RECORD_TYPE 2 +#define ATOM_OUTPUT_PROTECTION_RECORD_TYPE 3 +#define ATOM_CONNECTOR_DEVICE_TAG_RECORD_TYPE 4 +#define ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD_TYPE 5 //Obsolete, switch to use GPIO_CNTL_RECORD_TYPE +#define ATOM_ENCODER_FPGA_CONTROL_RECORD_TYPE 6 //Obsolete, switch to use GPIO_CNTL_RECORD_TYPE +#define ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD_TYPE 7 +#define ATOM_JTAG_RECORD_TYPE 8 //Obsolete, switch to use GPIO_CNTL_RECORD_TYPE +#define ATOM_OBJECT_GPIO_CNTL_RECORD_TYPE 9 +#define ATOM_ENCODER_DVO_CF_RECORD_TYPE 10 +#define ATOM_CONNECTOR_CF_RECORD_TYPE 11 +#define ATOM_CONNECTOR_HARDCODE_DTD_RECORD_TYPE 12 +#define ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD_TYPE 13 +#define ATOM_ROUTER_DDC_PATH_SELECT_RECORD_TYPE 14 +#define ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD_TYPE 15 +#define ATOM_CONNECTOR_HPDPIN_LUT_RECORD_TYPE 16 //This is for the case when connectors are not known to object table +#define ATOM_CONNECTOR_AUXDDC_LUT_RECORD_TYPE 17 //This is for the case when connectors are not known to object table +#define ATOM_OBJECT_LINK_RECORD_TYPE 18 //Once this record is present under one object, it indicats the oobject is linked to another obj described by the record +#define ATOM_CONNECTOR_REMOTE_CAP_RECORD_TYPE 19 +#define ATOM_ENCODER_CAP_RECORD_TYPE 20 +#define ATOM_BRACKET_LAYOUT_RECORD_TYPE 21 + +//Must be updated when new record type is added,equal to that record definition! +#define ATOM_MAX_OBJECT_RECORD_NUMBER ATOM_BRACKET_LAYOUT_RECORD_TYPE + +typedef struct _ATOM_I2C_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + ATOM_I2C_ID_CONFIG sucI2cId; + UCHAR ucI2CAddr; //The slave address, it's 0 when the record is attached to connector for DDC +}ATOM_I2C_RECORD; + +typedef struct _ATOM_HPD_INT_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + UCHAR ucHPDIntGPIOID; //Corresponding block in GPIO_PIN_INFO table gives the pin info + UCHAR ucPlugged_PinState; +}ATOM_HPD_INT_RECORD; + + +typedef struct _ATOM_OUTPUT_PROTECTION_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + UCHAR ucProtectionFlag; + UCHAR ucReserved; +}ATOM_OUTPUT_PROTECTION_RECORD; + +typedef struct _ATOM_CONNECTOR_DEVICE_TAG +{ + ULONG ulACPIDeviceEnum; //Reserved for now + USHORT usDeviceID; //This Id is same as "ATOM_DEVICE_XXX_SUPPORT" + USHORT usPadding; +}ATOM_CONNECTOR_DEVICE_TAG; + +typedef struct _ATOM_CONNECTOR_DEVICE_TAG_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + UCHAR ucNumberOfDevice; + UCHAR ucReserved; + ATOM_CONNECTOR_DEVICE_TAG asDeviceTag[1]; //This Id is same as "ATOM_DEVICE_XXX_SUPPORT", 1 is only for allocation +}ATOM_CONNECTOR_DEVICE_TAG_RECORD; + + +typedef struct _ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + UCHAR ucConfigGPIOID; + UCHAR ucConfigGPIOState; //Set to 1 when it's active high to enable external flow in + UCHAR ucFlowinGPIPID; + UCHAR ucExtInGPIPID; +}ATOM_CONNECTOR_DVI_EXT_INPUT_RECORD; + +typedef struct _ATOM_ENCODER_FPGA_CONTROL_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + UCHAR ucCTL1GPIO_ID; + UCHAR ucCTL1GPIOState; //Set to 1 when it's active high + UCHAR ucCTL2GPIO_ID; + UCHAR ucCTL2GPIOState; //Set to 1 when it's active high + UCHAR ucCTL3GPIO_ID; + UCHAR ucCTL3GPIOState; //Set to 1 when it's active high + UCHAR ucCTLFPGA_IN_ID; + UCHAR ucPadding[3]; +}ATOM_ENCODER_FPGA_CONTROL_RECORD; + +typedef struct _ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + UCHAR ucGPIOID; //Corresponding block in GPIO_PIN_INFO table gives the pin info + UCHAR ucTVActiveState; //Indicating when the pin==0 or 1 when TV is connected +}ATOM_CONNECTOR_CVTV_SHARE_DIN_RECORD; + +typedef struct _ATOM_JTAG_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + UCHAR ucTMSGPIO_ID; + UCHAR ucTMSGPIOState; //Set to 1 when it's active high + UCHAR ucTCKGPIO_ID; + UCHAR ucTCKGPIOState; //Set to 1 when it's active high + UCHAR ucTDOGPIO_ID; + UCHAR ucTDOGPIOState; //Set to 1 when it's active high + UCHAR ucTDIGPIO_ID; + UCHAR ucTDIGPIOState; //Set to 1 when it's active high + UCHAR ucPadding[2]; +}ATOM_JTAG_RECORD; + + +//The following generic object gpio pin control record type will replace JTAG_RECORD/FPGA_CONTROL_RECORD/DVI_EXT_INPUT_RECORD above gradually +typedef struct _ATOM_GPIO_PIN_CONTROL_PAIR +{ + UCHAR ucGPIOID; // GPIO_ID, find the corresponding ID in GPIO_LUT table + UCHAR ucGPIO_PinState; // Pin state showing how to set-up the pin +}ATOM_GPIO_PIN_CONTROL_PAIR; + +typedef struct _ATOM_OBJECT_GPIO_CNTL_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + UCHAR ucFlags; // Future expnadibility + UCHAR ucNumberOfPins; // Number of GPIO pins used to control the object + ATOM_GPIO_PIN_CONTROL_PAIR asGpio[1]; // the real gpio pin pair determined by number of pins ucNumberOfPins +}ATOM_OBJECT_GPIO_CNTL_RECORD; + +//Definitions for GPIO pin state +#define GPIO_PIN_TYPE_INPUT 0x00 +#define GPIO_PIN_TYPE_OUTPUT 0x10 +#define GPIO_PIN_TYPE_HW_CONTROL 0x20 + +//For GPIO_PIN_TYPE_OUTPUT the following is defined +#define GPIO_PIN_OUTPUT_STATE_MASK 0x01 +#define GPIO_PIN_OUTPUT_STATE_SHIFT 0 +#define GPIO_PIN_STATE_ACTIVE_LOW 0x0 +#define GPIO_PIN_STATE_ACTIVE_HIGH 0x1 + +// Indexes to GPIO array in GLSync record +// GLSync record is for Frame Lock/Gen Lock feature. +#define ATOM_GPIO_INDEX_GLSYNC_REFCLK 0 +#define ATOM_GPIO_INDEX_GLSYNC_HSYNC 1 +#define ATOM_GPIO_INDEX_GLSYNC_VSYNC 2 +#define ATOM_GPIO_INDEX_GLSYNC_SWAP_REQ 3 +#define ATOM_GPIO_INDEX_GLSYNC_SWAP_GNT 4 +#define ATOM_GPIO_INDEX_GLSYNC_INTERRUPT 5 +#define ATOM_GPIO_INDEX_GLSYNC_V_RESET 6 +#define ATOM_GPIO_INDEX_GLSYNC_SWAP_CNTL 7 +#define ATOM_GPIO_INDEX_GLSYNC_SWAP_SEL 8 +#define ATOM_GPIO_INDEX_GLSYNC_MAX 9 + +typedef struct _ATOM_ENCODER_DVO_CF_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + ULONG ulStrengthControl; // DVOA strength control for CF + UCHAR ucPadding[2]; +}ATOM_ENCODER_DVO_CF_RECORD; + +// Bit maps for ATOM_ENCODER_CAP_RECORD.ucEncoderCap +#define ATOM_ENCODER_CAP_RECORD_HBR2 0x01 // DP1.2 HBR2 is supported by HW encoder +#define ATOM_ENCODER_CAP_RECORD_HBR2_EN 0x02 // DP1.2 HBR2 setting is qualified and HBR2 can be enabled + +typedef struct _ATOM_ENCODER_CAP_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + union { + USHORT usEncoderCap; + struct { +#if ATOM_BIG_ENDIAN + USHORT usReserved:14; // Bit1-15 may be defined for other capability in future + USHORT usHBR2En:1; // Bit1 is for DP1.2 HBR2 enable + USHORT usHBR2Cap:1; // Bit0 is for DP1.2 HBR2 capability. +#else + USHORT usHBR2Cap:1; // Bit0 is for DP1.2 HBR2 capability. + USHORT usHBR2En:1; // Bit1 is for DP1.2 HBR2 enable + USHORT usReserved:14; // Bit1-15 may be defined for other capability in future +#endif + }; + }; +}ATOM_ENCODER_CAP_RECORD; + +// value for ATOM_CONNECTOR_CF_RECORD.ucConnectedDvoBundle +#define ATOM_CONNECTOR_CF_RECORD_CONNECTED_UPPER12BITBUNDLEA 1 +#define ATOM_CONNECTOR_CF_RECORD_CONNECTED_LOWER12BITBUNDLEB 2 + +typedef struct _ATOM_CONNECTOR_CF_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + USHORT usMaxPixClk; + UCHAR ucFlowCntlGpioId; + UCHAR ucSwapCntlGpioId; + UCHAR ucConnectedDvoBundle; + UCHAR ucPadding; +}ATOM_CONNECTOR_CF_RECORD; + +typedef struct _ATOM_CONNECTOR_HARDCODE_DTD_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + ATOM_DTD_FORMAT asTiming; +}ATOM_CONNECTOR_HARDCODE_DTD_RECORD; + +typedef struct _ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; //ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD_TYPE + UCHAR ucSubConnectorType; //CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D|X_ID_DUAL_LINK_DVI_D|HDMI_TYPE_A + UCHAR ucReserved; +}ATOM_CONNECTOR_PCIE_SUBCONNECTOR_RECORD; + + +typedef struct _ATOM_ROUTER_DDC_PATH_SELECT_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + UCHAR ucMuxType; //decide the number of ucMuxState, =0, no pin state, =1: single state with complement, >1: multiple state + UCHAR ucMuxControlPin; + UCHAR ucMuxState[2]; //for alligment purpose +}ATOM_ROUTER_DDC_PATH_SELECT_RECORD; + +typedef struct _ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + UCHAR ucMuxType; + UCHAR ucMuxControlPin; + UCHAR ucMuxState[2]; //for alligment purpose +}ATOM_ROUTER_DATA_CLOCK_PATH_SELECT_RECORD; + +// define ucMuxType +#define ATOM_ROUTER_MUX_PIN_STATE_MASK 0x0f +#define ATOM_ROUTER_MUX_PIN_SINGLE_STATE_COMPLEMENT 0x01 + +typedef struct _ATOM_CONNECTOR_HPDPIN_LUT_RECORD //record for ATOM_CONNECTOR_HPDPIN_LUT_RECORD_TYPE +{ + ATOM_COMMON_RECORD_HEADER sheader; + UCHAR ucHPDPINMap[MAX_NUMBER_OF_EXT_HPDPIN_LUT_ENTRIES]; //An fixed size array which maps external pins to internal GPIO_PIN_INFO table +}ATOM_CONNECTOR_HPDPIN_LUT_RECORD; + +typedef struct _ATOM_CONNECTOR_AUXDDC_LUT_RECORD //record for ATOM_CONNECTOR_AUXDDC_LUT_RECORD_TYPE +{ + ATOM_COMMON_RECORD_HEADER sheader; + ATOM_I2C_ID_CONFIG ucAUXDDCMap[MAX_NUMBER_OF_EXT_AUXDDC_LUT_ENTRIES]; //An fixed size array which maps external pins to internal DDC ID +}ATOM_CONNECTOR_AUXDDC_LUT_RECORD; + +typedef struct _ATOM_OBJECT_LINK_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + USHORT usObjectID; //could be connector, encorder or other object in object.h +}ATOM_OBJECT_LINK_RECORD; + +typedef struct _ATOM_CONNECTOR_REMOTE_CAP_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + USHORT usReserved; +}ATOM_CONNECTOR_REMOTE_CAP_RECORD; + +typedef struct _ATOM_CONNECTOR_LAYOUT_INFO +{ + USHORT usConnectorObjectId; + UCHAR ucConnectorType; + UCHAR ucPosition; +}ATOM_CONNECTOR_LAYOUT_INFO; + +// define ATOM_CONNECTOR_LAYOUT_INFO.ucConnectorType to describe the display connector size +#define CONNECTOR_TYPE_DVI_D 1 +#define CONNECTOR_TYPE_DVI_I 2 +#define CONNECTOR_TYPE_VGA 3 +#define CONNECTOR_TYPE_HDMI 4 +#define CONNECTOR_TYPE_DISPLAY_PORT 5 +#define CONNECTOR_TYPE_MINI_DISPLAY_PORT 6 + +typedef struct _ATOM_BRACKET_LAYOUT_RECORD +{ + ATOM_COMMON_RECORD_HEADER sheader; + UCHAR ucLength; + UCHAR ucWidth; + UCHAR ucConnNum; + UCHAR ucReserved; + ATOM_CONNECTOR_LAYOUT_INFO asConnInfo[1]; +}ATOM_BRACKET_LAYOUT_RECORD; + +/****************************************************************************/ +// ASIC voltage data table +/****************************************************************************/ +typedef struct _ATOM_VOLTAGE_INFO_HEADER +{ + USHORT usVDDCBaseLevel; //In number of 50mv unit + USHORT usReserved; //For possible extension table offset + UCHAR ucNumOfVoltageEntries; + UCHAR ucBytesPerVoltageEntry; + UCHAR ucVoltageStep; //Indicating in how many mv increament is one step, 0.5mv unit + UCHAR ucDefaultVoltageEntry; + UCHAR ucVoltageControlI2cLine; + UCHAR ucVoltageControlAddress; + UCHAR ucVoltageControlOffset; +}ATOM_VOLTAGE_INFO_HEADER; + +typedef struct _ATOM_VOLTAGE_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_VOLTAGE_INFO_HEADER viHeader; + UCHAR ucVoltageEntries[64]; //64 is for allocation, the actual number of entry is present at ucNumOfVoltageEntries*ucBytesPerVoltageEntry +}ATOM_VOLTAGE_INFO; + + +typedef struct _ATOM_VOLTAGE_FORMULA +{ + USHORT usVoltageBaseLevel; // In number of 1mv unit + USHORT usVoltageStep; // Indicating in how many mv increament is one step, 1mv unit + UCHAR ucNumOfVoltageEntries; // Number of Voltage Entry, which indicate max Voltage + UCHAR ucFlag; // bit0=0 :step is 1mv =1 0.5mv + UCHAR ucBaseVID; // if there is no lookup table, VID= BaseVID + ( Vol - BaseLevle ) /VoltageStep + UCHAR ucReserved; + UCHAR ucVIDAdjustEntries[32]; // 32 is for allocation, the actual number of entry is present at ucNumOfVoltageEntries +}ATOM_VOLTAGE_FORMULA; + +typedef struct _VOLTAGE_LUT_ENTRY +{ + USHORT usVoltageCode; // The Voltage ID, either GPIO or I2C code + USHORT usVoltageValue; // The corresponding Voltage Value, in mV +}VOLTAGE_LUT_ENTRY; + +typedef struct _ATOM_VOLTAGE_FORMULA_V2 +{ + UCHAR ucNumOfVoltageEntries; // Number of Voltage Entry, which indicate max Voltage + UCHAR ucReserved[3]; + VOLTAGE_LUT_ENTRY asVIDAdjustEntries[32];// 32 is for allocation, the actual number of entries is in ucNumOfVoltageEntries +}ATOM_VOLTAGE_FORMULA_V2; + +typedef struct _ATOM_VOLTAGE_CONTROL +{ + UCHAR ucVoltageControlId; //Indicate it is controlled by I2C or GPIO or HW state machine + UCHAR ucVoltageControlI2cLine; + UCHAR ucVoltageControlAddress; + UCHAR ucVoltageControlOffset; + USHORT usGpioPin_AIndex; //GPIO_PAD register index + UCHAR ucGpioPinBitShift[9]; //at most 8 pin support 255 VIDs, termintate with 0xff + UCHAR ucReserved; +}ATOM_VOLTAGE_CONTROL; + +// Define ucVoltageControlId +#define VOLTAGE_CONTROLLED_BY_HW 0x00 +#define VOLTAGE_CONTROLLED_BY_I2C_MASK 0x7F +#define VOLTAGE_CONTROLLED_BY_GPIO 0x80 +#define VOLTAGE_CONTROL_ID_LM64 0x01 //I2C control, used for R5xx Core Voltage +#define VOLTAGE_CONTROL_ID_DAC 0x02 //I2C control, used for R5xx/R6xx MVDDC,MVDDQ or VDDCI +#define VOLTAGE_CONTROL_ID_VT116xM 0x03 //I2C control, used for R6xx Core Voltage +#define VOLTAGE_CONTROL_ID_DS4402 0x04 +#define VOLTAGE_CONTROL_ID_UP6266 0x05 +#define VOLTAGE_CONTROL_ID_SCORPIO 0x06 +#define VOLTAGE_CONTROL_ID_VT1556M 0x07 +#define VOLTAGE_CONTROL_ID_CHL822x 0x08 +#define VOLTAGE_CONTROL_ID_VT1586M 0x09 +#define VOLTAGE_CONTROL_ID_UP1637 0x0A +#define VOLTAGE_CONTROL_ID_CHL8214 0x0B +#define VOLTAGE_CONTROL_ID_UP1801 0x0C +#define VOLTAGE_CONTROL_ID_ST6788A 0x0D +#define VOLTAGE_CONTROL_ID_CHLIR3564SVI2 0x0E +#define VOLTAGE_CONTROL_ID_AD527x 0x0F +#define VOLTAGE_CONTROL_ID_NCP81022 0x10 +#define VOLTAGE_CONTROL_ID_LTC2635 0x11 + +typedef struct _ATOM_VOLTAGE_OBJECT +{ + UCHAR ucVoltageType; //Indicate Voltage Source: VDDC, MVDDC, MVDDQ or MVDDCI + UCHAR ucSize; //Size of Object + ATOM_VOLTAGE_CONTROL asControl; //describ how to control + ATOM_VOLTAGE_FORMULA asFormula; //Indicate How to convert real Voltage to VID +}ATOM_VOLTAGE_OBJECT; + +typedef struct _ATOM_VOLTAGE_OBJECT_V2 +{ + UCHAR ucVoltageType; //Indicate Voltage Source: VDDC, MVDDC, MVDDQ or MVDDCI + UCHAR ucSize; //Size of Object + ATOM_VOLTAGE_CONTROL asControl; //describ how to control + ATOM_VOLTAGE_FORMULA_V2 asFormula; //Indicate How to convert real Voltage to VID +}ATOM_VOLTAGE_OBJECT_V2; + +typedef struct _ATOM_VOLTAGE_OBJECT_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_VOLTAGE_OBJECT asVoltageObj[3]; //Info for Voltage control +}ATOM_VOLTAGE_OBJECT_INFO; + +typedef struct _ATOM_VOLTAGE_OBJECT_INFO_V2 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_VOLTAGE_OBJECT_V2 asVoltageObj[3]; //Info for Voltage control +}ATOM_VOLTAGE_OBJECT_INFO_V2; + +typedef struct _ATOM_LEAKID_VOLTAGE +{ + UCHAR ucLeakageId; + UCHAR ucReserved; + USHORT usVoltage; +}ATOM_LEAKID_VOLTAGE; + +typedef struct _ATOM_VOLTAGE_OBJECT_HEADER_V3{ + UCHAR ucVoltageType; //Indicate Voltage Source: VDDC, MVDDC, MVDDQ or MVDDCI + UCHAR ucVoltageMode; //Indicate voltage control mode: Init/Set/Leakage/Set phase + USHORT usSize; //Size of Object +}ATOM_VOLTAGE_OBJECT_HEADER_V3; + +// ATOM_VOLTAGE_OBJECT_HEADER_V3.ucVoltageMode +#define VOLTAGE_OBJ_GPIO_LUT 0 //VOLTAGE and GPIO Lookup table ->ATOM_GPIO_VOLTAGE_OBJECT_V3 +#define VOLTAGE_OBJ_VR_I2C_INIT_SEQ 3 //VOLTAGE REGULATOR INIT sequece through I2C -> ATOM_I2C_VOLTAGE_OBJECT_V3 +#define VOLTAGE_OBJ_PHASE_LUT 4 //Set Vregulator Phase lookup table ->ATOM_GPIO_VOLTAGE_OBJECT_V3 +#define VOLTAGE_OBJ_SVID2 7 //Indicate voltage control by SVID2 ->ATOM_SVID2_VOLTAGE_OBJECT_V3 +#define VOLTAGE_OBJ_EVV 8 +#define VOLTAGE_OBJ_PWRBOOST_LEAKAGE_LUT 0x10 //Powerboost Voltage and LeakageId lookup table->ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 +#define VOLTAGE_OBJ_HIGH_STATE_LEAKAGE_LUT 0x11 //High voltage state Voltage and LeakageId lookup table->ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 +#define VOLTAGE_OBJ_HIGH1_STATE_LEAKAGE_LUT 0x12 //High1 voltage state Voltage and LeakageId lookup table->ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 + +typedef struct _VOLTAGE_LUT_ENTRY_V2 +{ + ULONG ulVoltageId; // The Voltage ID which is used to program GPIO register + USHORT usVoltageValue; // The corresponding Voltage Value, in mV +}VOLTAGE_LUT_ENTRY_V2; + +typedef struct _LEAKAGE_VOLTAGE_LUT_ENTRY_V2 +{ + USHORT usVoltageLevel; // The Voltage ID which is used to program GPIO register + USHORT usVoltageId; + USHORT usLeakageId; // The corresponding Voltage Value, in mV +}LEAKAGE_VOLTAGE_LUT_ENTRY_V2; + +typedef struct _ATOM_I2C_VOLTAGE_OBJECT_V3 +{ + ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader; // voltage mode = VOLTAGE_OBJ_VR_I2C_INIT_SEQ + UCHAR ucVoltageRegulatorId; //Indicate Voltage Regulator Id + UCHAR ucVoltageControlI2cLine; + UCHAR ucVoltageControlAddress; + UCHAR ucVoltageControlOffset; + ULONG ulReserved; + VOLTAGE_LUT_ENTRY asVolI2cLut[1]; // end with 0xff +}ATOM_I2C_VOLTAGE_OBJECT_V3; + +// ATOM_I2C_VOLTAGE_OBJECT_V3.ucVoltageControlFlag +#define VOLTAGE_DATA_ONE_BYTE 0 +#define VOLTAGE_DATA_TWO_BYTE 1 + +typedef struct _ATOM_GPIO_VOLTAGE_OBJECT_V3 +{ + ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader; // voltage mode = VOLTAGE_OBJ_GPIO_LUT or VOLTAGE_OBJ_PHASE_LUT + UCHAR ucVoltageGpioCntlId; // default is 0 which indicate control through CG VID mode + UCHAR ucGpioEntryNum; // indiate the entry numbers of Votlage/Gpio value Look up table + UCHAR ucPhaseDelay; // phase delay in unit of micro second + UCHAR ucReserved; + ULONG ulGpioMaskVal; // GPIO Mask value + VOLTAGE_LUT_ENTRY_V2 asVolGpioLut[1]; +}ATOM_GPIO_VOLTAGE_OBJECT_V3; + +typedef struct _ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 +{ + ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader; // voltage mode = 0x10/0x11/0x12 + UCHAR ucLeakageCntlId; // default is 0 + UCHAR ucLeakageEntryNum; // indicate the entry number of LeakageId/Voltage Lut table + UCHAR ucReserved[2]; + ULONG ulMaxVoltageLevel; + LEAKAGE_VOLTAGE_LUT_ENTRY_V2 asLeakageIdLut[1]; +}ATOM_LEAKAGE_VOLTAGE_OBJECT_V3; + + +typedef struct _ATOM_SVID2_VOLTAGE_OBJECT_V3 +{ + ATOM_VOLTAGE_OBJECT_HEADER_V3 sHeader; // voltage mode = VOLTAGE_OBJ_SVID2 +// 14:7 – PSI0_VID +// 6 – PSI0_EN +// 5 – PSI1 +// 4:2 – load line slope trim. +// 1:0 – offset trim, + USHORT usLoadLine_PSI; +// GPU GPIO pin Id to SVID2 regulator VRHot pin. possible value 0~31. 0 means GPIO0, 31 means GPIO31 + UCHAR ucSVDGpioId; //0~31 indicate GPIO0~31 + UCHAR ucSVCGpioId; //0~31 indicate GPIO0~31 + ULONG ulReserved; +}ATOM_SVID2_VOLTAGE_OBJECT_V3; + +typedef union _ATOM_VOLTAGE_OBJECT_V3{ + ATOM_GPIO_VOLTAGE_OBJECT_V3 asGpioVoltageObj; + ATOM_I2C_VOLTAGE_OBJECT_V3 asI2cVoltageObj; + ATOM_LEAKAGE_VOLTAGE_OBJECT_V3 asLeakageObj; + ATOM_SVID2_VOLTAGE_OBJECT_V3 asSVID2Obj; +}ATOM_VOLTAGE_OBJECT_V3; + +typedef struct _ATOM_VOLTAGE_OBJECT_INFO_V3_1 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_VOLTAGE_OBJECT_V3 asVoltageObj[3]; //Info for Voltage control +}ATOM_VOLTAGE_OBJECT_INFO_V3_1; + +typedef struct _ATOM_ASIC_PROFILE_VOLTAGE +{ + UCHAR ucProfileId; + UCHAR ucReserved; + USHORT usSize; + USHORT usEfuseSpareStartAddr; + USHORT usFuseIndex[8]; //from LSB to MSB, Max 8bit,end of 0xffff if less than 8 efuse id, + ATOM_LEAKID_VOLTAGE asLeakVol[2]; //Leakid and relatd voltage +}ATOM_ASIC_PROFILE_VOLTAGE; + +//ucProfileId +#define ATOM_ASIC_PROFILE_ID_EFUSE_VOLTAGE 1 +#define ATOM_ASIC_PROFILE_ID_EFUSE_PERFORMANCE_VOLTAGE 1 +#define ATOM_ASIC_PROFILE_ID_EFUSE_THERMAL_VOLTAGE 2 + +typedef struct _ATOM_ASIC_PROFILING_INFO +{ + ATOM_COMMON_TABLE_HEADER asHeader; + ATOM_ASIC_PROFILE_VOLTAGE asVoltage; +}ATOM_ASIC_PROFILING_INFO; + +typedef struct _ATOM_ASIC_PROFILING_INFO_V2_1 +{ + ATOM_COMMON_TABLE_HEADER asHeader; + UCHAR ucLeakageBinNum; // indicate the entry number of LeakageId/Voltage Lut table + USHORT usLeakageBinArrayOffset; // offset of USHORT Leakage Bin list array ( from lower LeakageId to higher) + + UCHAR ucElbVDDC_Num; + USHORT usElbVDDC_IdArrayOffset; // offset of USHORT virtual VDDC voltage id ( 0xff01~0xff08 ) + USHORT usElbVDDC_LevelArrayOffset; // offset of 2 dimension voltage level USHORT array + + UCHAR ucElbVDDCI_Num; + USHORT usElbVDDCI_IdArrayOffset; // offset of USHORT virtual VDDCI voltage id ( 0xff01~0xff08 ) + USHORT usElbVDDCI_LevelArrayOffset; // offset of 2 dimension voltage level USHORT array +}ATOM_ASIC_PROFILING_INFO_V2_1; + +typedef struct _ATOM_ASIC_PROFILING_INFO_V3_1 +{ + ATOM_COMMON_TABLE_HEADER asHeader; + ULONG ulEvvDerateTdp; + ULONG ulEvvDerateTdc; + ULONG ulBoardCoreTemp; + ULONG ulMaxVddc; + ULONG ulMinVddc; + ULONG ulLoadLineSlop; + ULONG ulLeakageTemp; + ULONG ulLeakageVoltage; + ULONG ulCACmEncodeRange; + ULONG ulCACmEncodeAverage; + ULONG ulCACbEncodeRange; + ULONG ulCACbEncodeAverage; + ULONG ulKt_bEncodeRange; + ULONG ulKt_bEncodeAverage; + ULONG ulKv_mEncodeRange; + ULONG ulKv_mEncodeAverage; + ULONG ulKv_bEncodeRange; + ULONG ulKv_bEncodeAverage; + ULONG ulLkgEncodeLn_MaxDivMin; + ULONG ulLkgEncodeMin; + ULONG ulEfuseLogisticAlpha; + USHORT usPowerDpm0; + USHORT usCurrentDpm0; + USHORT usPowerDpm1; + USHORT usCurrentDpm1; + USHORT usPowerDpm2; + USHORT usCurrentDpm2; + USHORT usPowerDpm3; + USHORT usCurrentDpm3; + USHORT usPowerDpm4; + USHORT usCurrentDpm4; + USHORT usPowerDpm5; + USHORT usCurrentDpm5; + USHORT usPowerDpm6; + USHORT usCurrentDpm6; + USHORT usPowerDpm7; + USHORT usCurrentDpm7; +}ATOM_ASIC_PROFILING_INFO_V3_1; + + +typedef struct _ATOM_POWER_SOURCE_OBJECT +{ + UCHAR ucPwrSrcId; // Power source + UCHAR ucPwrSensorType; // GPIO, I2C or none + UCHAR ucPwrSensId; // if GPIO detect, it is GPIO id, if I2C detect, it is I2C id + UCHAR ucPwrSensSlaveAddr; // Slave address if I2C detect + UCHAR ucPwrSensRegIndex; // I2C register Index if I2C detect + UCHAR ucPwrSensRegBitMask; // detect which bit is used if I2C detect + UCHAR ucPwrSensActiveState; // high active or low active + UCHAR ucReserve[3]; // reserve + USHORT usSensPwr; // in unit of watt +}ATOM_POWER_SOURCE_OBJECT; + +typedef struct _ATOM_POWER_SOURCE_INFO +{ + ATOM_COMMON_TABLE_HEADER asHeader; + UCHAR asPwrbehave[16]; + ATOM_POWER_SOURCE_OBJECT asPwrObj[1]; +}ATOM_POWER_SOURCE_INFO; + + +//Define ucPwrSrcId +#define POWERSOURCE_PCIE_ID1 0x00 +#define POWERSOURCE_6PIN_CONNECTOR_ID1 0x01 +#define POWERSOURCE_8PIN_CONNECTOR_ID1 0x02 +#define POWERSOURCE_6PIN_CONNECTOR_ID2 0x04 +#define POWERSOURCE_8PIN_CONNECTOR_ID2 0x08 + +//define ucPwrSensorId +#define POWER_SENSOR_ALWAYS 0x00 +#define POWER_SENSOR_GPIO 0x01 +#define POWER_SENSOR_I2C 0x02 + +typedef struct _ATOM_CLK_VOLT_CAPABILITY +{ + ULONG ulVoltageIndex; // The Voltage Index indicated by FUSE, same voltage index shared with SCLK DPM fuse table + ULONG ulMaximumSupportedCLK; // Maximum clock supported with specified voltage index, unit in 10kHz +}ATOM_CLK_VOLT_CAPABILITY; + +typedef struct _ATOM_AVAILABLE_SCLK_LIST +{ + ULONG ulSupportedSCLK; // Maximum clock supported with specified voltage index, unit in 10kHz + USHORT usVoltageIndex; // The Voltage Index indicated by FUSE for specified SCLK + USHORT usVoltageID; // The Voltage ID indicated by FUSE for specified SCLK +}ATOM_AVAILABLE_SCLK_LIST; + +// ATOM_INTEGRATED_SYSTEM_INFO_V6 ulSystemConfig cap definition +#define ATOM_IGP_INFO_V6_SYSTEM_CONFIG__PCIE_POWER_GATING_ENABLE 1 // refer to ulSystemConfig bit[0] + +// this IntegrateSystemInfoTable is used for Liano/Ontario APU +typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V6 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ULONG ulBootUpEngineClock; + ULONG ulDentistVCOFreq; + ULONG ulBootUpUMAClock; + ATOM_CLK_VOLT_CAPABILITY sDISPCLK_Voltage[4]; + ULONG ulBootUpReqDisplayVector; + ULONG ulOtherDisplayMisc; + ULONG ulGPUCapInfo; + ULONG ulSB_MMIO_Base_Addr; + USHORT usRequestedPWMFreqInHz; + UCHAR ucHtcTmpLmt; + UCHAR ucHtcHystLmt; + ULONG ulMinEngineClock; + ULONG ulSystemConfig; + ULONG ulCPUCapInfo; + USHORT usNBP0Voltage; + USHORT usNBP1Voltage; + USHORT usBootUpNBVoltage; + USHORT usExtDispConnInfoOffset; + USHORT usPanelRefreshRateRange; + UCHAR ucMemoryType; + UCHAR ucUMAChannelNumber; + ULONG ulCSR_M3_ARB_CNTL_DEFAULT[10]; + ULONG ulCSR_M3_ARB_CNTL_UVD[10]; + ULONG ulCSR_M3_ARB_CNTL_FS3D[10]; + ATOM_AVAILABLE_SCLK_LIST sAvail_SCLK[5]; + ULONG ulGMCRestoreResetTime; + ULONG ulMinimumNClk; + ULONG ulIdleNClk; + ULONG ulDDR_DLL_PowerUpTime; + ULONG ulDDR_PLL_PowerUpTime; + USHORT usPCIEClkSSPercentage; + USHORT usPCIEClkSSType; + USHORT usLvdsSSPercentage; + USHORT usLvdsSSpreadRateIn10Hz; + USHORT usHDMISSPercentage; + USHORT usHDMISSpreadRateIn10Hz; + USHORT usDVISSPercentage; + USHORT usDVISSpreadRateIn10Hz; + ULONG SclkDpmBoostMargin; + ULONG SclkDpmThrottleMargin; + USHORT SclkDpmTdpLimitPG; + USHORT SclkDpmTdpLimitBoost; + ULONG ulBoostEngineCLock; + UCHAR ulBoostVid_2bit; + UCHAR EnableBoost; + USHORT GnbTdpLimit; + USHORT usMaxLVDSPclkFreqInSingleLink; + UCHAR ucLvdsMisc; + UCHAR ucLVDSReserved; + ULONG ulReserved3[15]; + ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo; +}ATOM_INTEGRATED_SYSTEM_INFO_V6; + +// ulGPUCapInfo +#define INTEGRATED_SYSTEM_INFO_V6_GPUCAPINFO__TMDSHDMI_COHERENT_SINGLEPLL_MODE 0x01 +#define INTEGRATED_SYSTEM_INFO_V6_GPUCAPINFO__DISABLE_AUX_HW_MODE_DETECTION 0x08 + +//ucLVDSMisc: +#define SYS_INFO_LVDSMISC__888_FPDI_MODE 0x01 +#define SYS_INFO_LVDSMISC__DL_CH_SWAP 0x02 +#define SYS_INFO_LVDSMISC__888_BPC 0x04 +#define SYS_INFO_LVDSMISC__OVERRIDE_EN 0x08 +#define SYS_INFO_LVDSMISC__BLON_ACTIVE_LOW 0x10 +// new since Trinity +#define SYS_INFO_LVDSMISC__TRAVIS_LVDS_VOL_OVERRIDE_EN 0x20 + +// not used any more +#define SYS_INFO_LVDSMISC__VSYNC_ACTIVE_LOW 0x04 +#define SYS_INFO_LVDSMISC__HSYNC_ACTIVE_LOW 0x08 + +/********************************************************************************************************************** + ATOM_INTEGRATED_SYSTEM_INFO_V6 Description +ulBootUpEngineClock: VBIOS bootup Engine clock frequency, in 10kHz unit. if it is equal 0, then VBIOS use pre-defined bootup engine clock +ulDentistVCOFreq: Dentist VCO clock in 10kHz unit. +ulBootUpUMAClock: System memory boot up clock frequency in 10Khz unit. +sDISPCLK_Voltage: Report Display clock voltage requirement. + +ulBootUpReqDisplayVector: VBIOS boot up display IDs, following are supported devices in Liano/Ontaio projects: + ATOM_DEVICE_CRT1_SUPPORT 0x0001 + ATOM_DEVICE_CRT2_SUPPORT 0x0010 + ATOM_DEVICE_DFP1_SUPPORT 0x0008 + ATOM_DEVICE_DFP6_SUPPORT 0x0040 + ATOM_DEVICE_DFP2_SUPPORT 0x0080 + ATOM_DEVICE_DFP3_SUPPORT 0x0200 + ATOM_DEVICE_DFP4_SUPPORT 0x0400 + ATOM_DEVICE_DFP5_SUPPORT 0x0800 + ATOM_DEVICE_LCD1_SUPPORT 0x0002 +ulOtherDisplayMisc: Other display related flags, not defined yet. +ulGPUCapInfo: bit[0]=0: TMDS/HDMI Coherent Mode use cascade PLL mode. + =1: TMDS/HDMI Coherent Mode use signel PLL mode. + bit[3]=0: Enable HW AUX mode detection logic + =1: Disable HW AUX mode dettion logic +ulSB_MMIO_Base_Addr: Physical Base address to SB MMIO space. Driver needs to initialize it for SMU usage. + +usRequestedPWMFreqInHz: When it's set to 0x0 by SBIOS: the LCD BackLight is not controlled by GPU(SW). + Any attempt to change BL using VBIOS function or enable VariBri from PP table is not effective since ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==0; + + When it's set to a non-zero frequency, the BackLight is controlled by GPU (SW) in one of two ways below: + 1. SW uses the GPU BL PWM output to control the BL, in chis case, this non-zero frequency determines what freq GPU should use; + VBIOS will set up proper PWM frequency and ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1,as the result, + Changing BL using VBIOS function is functional in both driver and non-driver present environment; + and enabling VariBri under the driver environment from PP table is optional. + + 2. SW uses other means to control BL (like DPCD),this non-zero frequency serves as a flag only indicating + that BL control from GPU is expected. + VBIOS will NOT set up PWM frequency but make ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1 + Changing BL using VBIOS function could be functional in both driver and non-driver present environment,but + it's per platform + and enabling VariBri under the driver environment from PP table is optional. + +ucHtcTmpLmt: Refer to D18F3x64 bit[22:16], HtcTmpLmt. + Threshold on value to enter HTC_active state. +ucHtcHystLmt: Refer to D18F3x64 bit[27:24], HtcHystLmt. + To calculate threshold off value to exit HTC_active state, which is Threshold on vlaue minus ucHtcHystLmt. +ulMinEngineClock: Minimum SCLK allowed in 10kHz unit. This is calculated based on WRCK Fuse settings. +ulSystemConfig: Bit[0]=0: PCIE Power Gating Disabled + =1: PCIE Power Gating Enabled + Bit[1]=0: DDR-DLL shut-down feature disabled. + 1: DDR-DLL shut-down feature enabled. + Bit[2]=0: DDR-PLL Power down feature disabled. + 1: DDR-PLL Power down feature enabled. +ulCPUCapInfo: TBD +usNBP0Voltage: VID for voltage on NB P0 State +usNBP1Voltage: VID for voltage on NB P1 State +usBootUpNBVoltage: Voltage Index of GNB voltage configured by SBIOS, which is suffcient to support VBIOS DISPCLK requirement. +usExtDispConnInfoOffset: Offset to sExtDispConnInfo inside the structure +usPanelRefreshRateRange: Bit vector for LCD supported refresh rate range. If DRR is requestd by the platform, at least two bits need to be set + to indicate a range. + SUPPORTED_LCD_REFRESHRATE_30Hz 0x0004 + SUPPORTED_LCD_REFRESHRATE_40Hz 0x0008 + SUPPORTED_LCD_REFRESHRATE_50Hz 0x0010 + SUPPORTED_LCD_REFRESHRATE_60Hz 0x0020 +ucMemoryType: [3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved. +ucUMAChannelNumber: System memory channel numbers. +ulCSR_M3_ARB_CNTL_DEFAULT[10]: Arrays with values for CSR M3 arbiter for default +ulCSR_M3_ARB_CNTL_UVD[10]: Arrays with values for CSR M3 arbiter for UVD playback. +ulCSR_M3_ARB_CNTL_FS3D[10]: Arrays with values for CSR M3 arbiter for Full Screen 3D applications. +sAvail_SCLK[5]: Arrays to provide availabe list of SLCK and corresponding voltage, order from low to high +ulGMCRestoreResetTime: GMC power restore and GMC reset time to calculate data reconnection latency. Unit in ns. +ulMinimumNClk: Minimum NCLK speed among all NB-Pstates to calcualte data reconnection latency. Unit in 10kHz. +ulIdleNClk: NCLK speed while memory runs in self-refresh state. Unit in 10kHz. +ulDDR_DLL_PowerUpTime: DDR PHY DLL power up time. Unit in ns. +ulDDR_PLL_PowerUpTime: DDR PHY PLL power up time. Unit in ns. +usPCIEClkSSPercentage: PCIE Clock Spred Spectrum Percentage in unit 0.01%; 100 mean 1%. +usPCIEClkSSType: PCIE Clock Spred Spectrum Type. 0 for Down spread(default); 1 for Center spread. +usLvdsSSPercentage: LVDS panel ( not include eDP ) Spread Spectrum Percentage in unit of 0.01%, =0, use VBIOS default setting. +usLvdsSSpreadRateIn10Hz: LVDS panel ( not include eDP ) Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. +usHDMISSPercentage: HDMI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. +usHDMISSpreadRateIn10Hz: HDMI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. +usDVISSPercentage: DVI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. +usDVISSpreadRateIn10Hz: DVI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. +usMaxLVDSPclkFreqInSingleLink: Max pixel clock LVDS panel single link, if=0 means VBIOS use default threhold, right now it is 85Mhz +ucLVDSMisc: [bit0] LVDS 888bit panel mode =0: LVDS 888 panel in LDI mode, =1: LVDS 888 panel in FPDI mode + [bit1] LVDS panel lower and upper link mapping =0: lower link and upper link not swap, =1: lower link and upper link are swapped + [bit2] LVDS 888bit per color mode =0: 666 bit per color =1:888 bit per color + [bit3] LVDS parameter override enable =0: ucLvdsMisc parameter are not used =1: ucLvdsMisc parameter should be used + [bit4] Polarity of signal sent to digital BLON output pin. =0: not inverted(active high) =1: inverted ( active low ) +**********************************************************************************************************************/ + +// this Table is used for Liano/Ontario APU +typedef struct _ATOM_FUSION_SYSTEM_INFO_V1 +{ + ATOM_INTEGRATED_SYSTEM_INFO_V6 sIntegratedSysInfo; + ULONG ulPowerplayTable[128]; +}ATOM_FUSION_SYSTEM_INFO_V1; + + +typedef struct _ATOM_TDP_CONFIG_BITS +{ +#if ATOM_BIG_ENDIAN + ULONG uReserved:2; + ULONG uTDP_Value:14; // Original TDP value in tens of milli watts + ULONG uCTDP_Value:14; // Override value in tens of milli watts + ULONG uCTDP_Enable:2; // = (uCTDP_Value > uTDP_Value? 2: (uCTDP_Value < uTDP_Value)) +#else + ULONG uCTDP_Enable:2; // = (uCTDP_Value > uTDP_Value? 2: (uCTDP_Value < uTDP_Value)) + ULONG uCTDP_Value:14; // Override value in tens of milli watts + ULONG uTDP_Value:14; // Original TDP value in tens of milli watts + ULONG uReserved:2; +#endif +}ATOM_TDP_CONFIG_BITS; + +typedef union _ATOM_TDP_CONFIG +{ + ATOM_TDP_CONFIG_BITS TDP_config; + ULONG TDP_config_all; +}ATOM_TDP_CONFIG; + +/********************************************************************************************************************** + ATOM_FUSION_SYSTEM_INFO_V1 Description +sIntegratedSysInfo: refer to ATOM_INTEGRATED_SYSTEM_INFO_V6 definition. +ulPowerplayTable[128]: This 512 bytes memory is used to save ATOM_PPLIB_POWERPLAYTABLE3, starting form ulPowerplayTable[0] +**********************************************************************************************************************/ + +// this IntegrateSystemInfoTable is used for Trinity APU +typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V1_7 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ULONG ulBootUpEngineClock; + ULONG ulDentistVCOFreq; + ULONG ulBootUpUMAClock; + ATOM_CLK_VOLT_CAPABILITY sDISPCLK_Voltage[4]; + ULONG ulBootUpReqDisplayVector; + ULONG ulOtherDisplayMisc; + ULONG ulGPUCapInfo; + ULONG ulSB_MMIO_Base_Addr; + USHORT usRequestedPWMFreqInHz; + UCHAR ucHtcTmpLmt; + UCHAR ucHtcHystLmt; + ULONG ulMinEngineClock; + ULONG ulSystemConfig; + ULONG ulCPUCapInfo; + USHORT usNBP0Voltage; + USHORT usNBP1Voltage; + USHORT usBootUpNBVoltage; + USHORT usExtDispConnInfoOffset; + USHORT usPanelRefreshRateRange; + UCHAR ucMemoryType; + UCHAR ucUMAChannelNumber; + UCHAR strVBIOSMsg[40]; + ATOM_TDP_CONFIG asTdpConfig; + ULONG ulReserved[19]; + ATOM_AVAILABLE_SCLK_LIST sAvail_SCLK[5]; + ULONG ulGMCRestoreResetTime; + ULONG ulMinimumNClk; + ULONG ulIdleNClk; + ULONG ulDDR_DLL_PowerUpTime; + ULONG ulDDR_PLL_PowerUpTime; + USHORT usPCIEClkSSPercentage; + USHORT usPCIEClkSSType; + USHORT usLvdsSSPercentage; + USHORT usLvdsSSpreadRateIn10Hz; + USHORT usHDMISSPercentage; + USHORT usHDMISSpreadRateIn10Hz; + USHORT usDVISSPercentage; + USHORT usDVISSpreadRateIn10Hz; + ULONG SclkDpmBoostMargin; + ULONG SclkDpmThrottleMargin; + USHORT SclkDpmTdpLimitPG; + USHORT SclkDpmTdpLimitBoost; + ULONG ulBoostEngineCLock; + UCHAR ulBoostVid_2bit; + UCHAR EnableBoost; + USHORT GnbTdpLimit; + USHORT usMaxLVDSPclkFreqInSingleLink; + UCHAR ucLvdsMisc; + UCHAR ucTravisLVDSVolAdjust; + UCHAR ucLVDSPwrOnSeqDIGONtoDE_in4Ms; + UCHAR ucLVDSPwrOnSeqDEtoVARY_BL_in4Ms; + UCHAR ucLVDSPwrOffSeqVARY_BLtoDE_in4Ms; + UCHAR ucLVDSPwrOffSeqDEtoDIGON_in4Ms; + UCHAR ucLVDSOffToOnDelay_in4Ms; + UCHAR ucLVDSPwrOnSeqVARY_BLtoBLON_in4Ms; + UCHAR ucLVDSPwrOffSeqBLONtoVARY_BL_in4Ms; + UCHAR ucMinAllowedBL_Level; + ULONG ulLCDBitDepthControlVal; + ULONG ulNbpStateMemclkFreq[4]; + USHORT usNBP2Voltage; + USHORT usNBP3Voltage; + ULONG ulNbpStateNClkFreq[4]; + UCHAR ucNBDPMEnable; + UCHAR ucReserved[3]; + UCHAR ucDPMState0VclkFid; + UCHAR ucDPMState0DclkFid; + UCHAR ucDPMState1VclkFid; + UCHAR ucDPMState1DclkFid; + UCHAR ucDPMState2VclkFid; + UCHAR ucDPMState2DclkFid; + UCHAR ucDPMState3VclkFid; + UCHAR ucDPMState3DclkFid; + ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo; +}ATOM_INTEGRATED_SYSTEM_INFO_V1_7; + +// ulOtherDisplayMisc +#define INTEGRATED_SYSTEM_INFO__GET_EDID_CALLBACK_FUNC_SUPPORT 0x01 +#define INTEGRATED_SYSTEM_INFO__GET_BOOTUP_DISPLAY_CALLBACK_FUNC_SUPPORT 0x02 +#define INTEGRATED_SYSTEM_INFO__GET_EXPANSION_CALLBACK_FUNC_SUPPORT 0x04 +#define INTEGRATED_SYSTEM_INFO__FAST_BOOT_SUPPORT 0x08 + +// ulGPUCapInfo +#define SYS_INFO_GPUCAPS__TMDSHDMI_COHERENT_SINGLEPLL_MODE 0x01 +#define SYS_INFO_GPUCAPS__DP_SINGLEPLL_MODE 0x02 +#define SYS_INFO_GPUCAPS__DISABLE_AUX_MODE_DETECT 0x08 +#define SYS_INFO_GPUCAPS__ENABEL_DFS_BYPASS 0x10 + +/********************************************************************************************************************** + ATOM_INTEGRATED_SYSTEM_INFO_V1_7 Description +ulBootUpEngineClock: VBIOS bootup Engine clock frequency, in 10kHz unit. if it is equal 0, then VBIOS use pre-defined bootup engine clock +ulDentistVCOFreq: Dentist VCO clock in 10kHz unit. +ulBootUpUMAClock: System memory boot up clock frequency in 10Khz unit. +sDISPCLK_Voltage: Report Display clock voltage requirement. + +ulBootUpReqDisplayVector: VBIOS boot up display IDs, following are supported devices in Trinity projects: + ATOM_DEVICE_CRT1_SUPPORT 0x0001 + ATOM_DEVICE_DFP1_SUPPORT 0x0008 + ATOM_DEVICE_DFP6_SUPPORT 0x0040 + ATOM_DEVICE_DFP2_SUPPORT 0x0080 + ATOM_DEVICE_DFP3_SUPPORT 0x0200 + ATOM_DEVICE_DFP4_SUPPORT 0x0400 + ATOM_DEVICE_DFP5_SUPPORT 0x0800 + ATOM_DEVICE_LCD1_SUPPORT 0x0002 +ulOtherDisplayMisc: bit[0]=0: INT15 callback function Get LCD EDID ( ax=4e08, bl=1b ) is not supported by SBIOS. + =1: INT15 callback function Get LCD EDID ( ax=4e08, bl=1b ) is supported by SBIOS. + bit[1]=0: INT15 callback function Get boot display( ax=4e08, bl=01h) is not supported by SBIOS + =1: INT15 callback function Get boot display( ax=4e08, bl=01h) is supported by SBIOS + bit[2]=0: INT15 callback function Get panel Expansion ( ax=4e08, bl=02h) is not supported by SBIOS + =1: INT15 callback function Get panel Expansion ( ax=4e08, bl=02h) is supported by SBIOS + bit[3]=0: VBIOS fast boot is disable + =1: VBIOS fast boot is enable. ( VBIOS skip display device detection in every set mode if LCD panel is connect and LID is open) +ulGPUCapInfo: bit[0]=0: TMDS/HDMI Coherent Mode use cascade PLL mode. + =1: TMDS/HDMI Coherent Mode use signel PLL mode. + bit[1]=0: DP mode use cascade PLL mode ( New for Trinity ) + =1: DP mode use single PLL mode + bit[3]=0: Enable AUX HW mode detection logic + =1: Disable AUX HW mode detection logic + +ulSB_MMIO_Base_Addr: Physical Base address to SB MMIO space. Driver needs to initialize it for SMU usage. + +usRequestedPWMFreqInHz: When it's set to 0x0 by SBIOS: the LCD BackLight is not controlled by GPU(SW). + Any attempt to change BL using VBIOS function or enable VariBri from PP table is not effective since ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==0; + + When it's set to a non-zero frequency, the BackLight is controlled by GPU (SW) in one of two ways below: + 1. SW uses the GPU BL PWM output to control the BL, in chis case, this non-zero frequency determines what freq GPU should use; + VBIOS will set up proper PWM frequency and ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1,as the result, + Changing BL using VBIOS function is functional in both driver and non-driver present environment; + and enabling VariBri under the driver environment from PP table is optional. + + 2. SW uses other means to control BL (like DPCD),this non-zero frequency serves as a flag only indicating + that BL control from GPU is expected. + VBIOS will NOT set up PWM frequency but make ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1 + Changing BL using VBIOS function could be functional in both driver and non-driver present environment,but + it's per platform + and enabling VariBri under the driver environment from PP table is optional. + +ucHtcTmpLmt: Refer to D18F3x64 bit[22:16], HtcTmpLmt. + Threshold on value to enter HTC_active state. +ucHtcHystLmt: Refer to D18F3x64 bit[27:24], HtcHystLmt. + To calculate threshold off value to exit HTC_active state, which is Threshold on vlaue minus ucHtcHystLmt. +ulMinEngineClock: Minimum SCLK allowed in 10kHz unit. This is calculated based on WRCK Fuse settings. +ulSystemConfig: Bit[0]=0: PCIE Power Gating Disabled + =1: PCIE Power Gating Enabled + Bit[1]=0: DDR-DLL shut-down feature disabled. + 1: DDR-DLL shut-down feature enabled. + Bit[2]=0: DDR-PLL Power down feature disabled. + 1: DDR-PLL Power down feature enabled. +ulCPUCapInfo: TBD +usNBP0Voltage: VID for voltage on NB P0 State +usNBP1Voltage: VID for voltage on NB P1 State +usNBP2Voltage: VID for voltage on NB P2 State +usNBP3Voltage: VID for voltage on NB P3 State +usBootUpNBVoltage: Voltage Index of GNB voltage configured by SBIOS, which is suffcient to support VBIOS DISPCLK requirement. +usExtDispConnInfoOffset: Offset to sExtDispConnInfo inside the structure +usPanelRefreshRateRange: Bit vector for LCD supported refresh rate range. If DRR is requestd by the platform, at least two bits need to be set + to indicate a range. + SUPPORTED_LCD_REFRESHRATE_30Hz 0x0004 + SUPPORTED_LCD_REFRESHRATE_40Hz 0x0008 + SUPPORTED_LCD_REFRESHRATE_50Hz 0x0010 + SUPPORTED_LCD_REFRESHRATE_60Hz 0x0020 +ucMemoryType: [3:0]=1:DDR1;=2:DDR2;=3:DDR3.[7:4] is reserved. +ucUMAChannelNumber: System memory channel numbers. +ulCSR_M3_ARB_CNTL_DEFAULT[10]: Arrays with values for CSR M3 arbiter for default +ulCSR_M3_ARB_CNTL_UVD[10]: Arrays with values for CSR M3 arbiter for UVD playback. +ulCSR_M3_ARB_CNTL_FS3D[10]: Arrays with values for CSR M3 arbiter for Full Screen 3D applications. +sAvail_SCLK[5]: Arrays to provide availabe list of SLCK and corresponding voltage, order from low to high +ulGMCRestoreResetTime: GMC power restore and GMC reset time to calculate data reconnection latency. Unit in ns. +ulMinimumNClk: Minimum NCLK speed among all NB-Pstates to calcualte data reconnection latency. Unit in 10kHz. +ulIdleNClk: NCLK speed while memory runs in self-refresh state. Unit in 10kHz. +ulDDR_DLL_PowerUpTime: DDR PHY DLL power up time. Unit in ns. +ulDDR_PLL_PowerUpTime: DDR PHY PLL power up time. Unit in ns. +usPCIEClkSSPercentage: PCIE Clock Spread Spectrum Percentage in unit 0.01%; 100 mean 1%. +usPCIEClkSSType: PCIE Clock Spread Spectrum Type. 0 for Down spread(default); 1 for Center spread. +usLvdsSSPercentage: LVDS panel ( not include eDP ) Spread Spectrum Percentage in unit of 0.01%, =0, use VBIOS default setting. +usLvdsSSpreadRateIn10Hz: LVDS panel ( not include eDP ) Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. +usHDMISSPercentage: HDMI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. +usHDMISSpreadRateIn10Hz: HDMI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. +usDVISSPercentage: DVI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. +usDVISSpreadRateIn10Hz: DVI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. +usMaxLVDSPclkFreqInSingleLink: Max pixel clock LVDS panel single link, if=0 means VBIOS use default threhold, right now it is 85Mhz +ucLVDSMisc: [bit0] LVDS 888bit panel mode =0: LVDS 888 panel in LDI mode, =1: LVDS 888 panel in FPDI mode + [bit1] LVDS panel lower and upper link mapping =0: lower link and upper link not swap, =1: lower link and upper link are swapped + [bit2] LVDS 888bit per color mode =0: 666 bit per color =1:888 bit per color + [bit3] LVDS parameter override enable =0: ucLvdsMisc parameter are not used =1: ucLvdsMisc parameter should be used + [bit4] Polarity of signal sent to digital BLON output pin. =0: not inverted(active high) =1: inverted ( active low ) + [bit5] Travid LVDS output voltage override enable, when =1, use ucTravisLVDSVolAdjust value to overwrite Traivs register LVDS_CTRL_4 +ucTravisLVDSVolAdjust When ucLVDSMisc[5]=1,it means platform SBIOS want to overwrite TravisLVDSVoltage. Then VBIOS will use ucTravisLVDSVolAdjust + value to program Travis register LVDS_CTRL_4 +ucLVDSPwrOnSeqDIGONtoDE_in4Ms: LVDS power up sequence time in unit of 4ms, time delay from DIGON signal active to data enable signal active( DE ). + =0 mean use VBIOS default which is 8 ( 32ms ). The LVDS power up sequence is as following: DIGON->DE->VARY_BL->BLON. + This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. +ucLVDSPwrOnDEtoVARY_BL_in4Ms: LVDS power up sequence time in unit of 4ms., time delay from DE( data enable ) active to Vary Brightness enable signal active( VARY_BL ). + =0 mean use VBIOS default which is 90 ( 360ms ). The LVDS power up sequence is as following: DIGON->DE->VARY_BL->BLON. + This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. + +ucLVDSPwrOffVARY_BLtoDE_in4Ms: LVDS power down sequence time in unit of 4ms, time delay from data enable ( DE ) signal off to LCDVCC (DIGON) off. + =0 mean use VBIOS default delay which is 8 ( 32ms ). The LVDS power down sequence is as following: BLON->VARY_BL->DE->DIGON + This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. + +ucLVDSPwrOffDEtoDIGON_in4Ms: LVDS power down sequence time in unit of 4ms, time delay from vary brightness enable signal( VARY_BL) off to data enable ( DE ) signal off. + =0 mean use VBIOS default which is 90 ( 360ms ). The LVDS power down sequence is as following: BLON->VARY_BL->DE->DIGON + This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. + +ucLVDSOffToOnDelay_in4Ms: LVDS power down sequence time in unit of 4ms. Time delay from DIGON signal off to DIGON signal active. + =0 means to use VBIOS default delay which is 125 ( 500ms ). + This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. + +ucLVDSPwrOnSeqVARY_BLtoBLON_in4Ms: + LVDS power up sequence time in unit of 4ms. Time delay from VARY_BL signal on to DLON signal active. + =0 means to use VBIOS default delay which is 0 ( 0ms ). + This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. + +ucLVDSPwrOffSeqBLONtoVARY_BL_in4Ms: + LVDS power down sequence time in unit of 4ms. Time delay from BLON signal off to VARY_BL signal off. + =0 means to use VBIOS default delay which is 0 ( 0ms ). + This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. + +ucMinAllowedBL_Level: Lowest LCD backlight PWM level. This is customer platform specific parameters. By default it is 0. + +ulNbpStateMemclkFreq[4]: system memory clock frequncey in unit of 10Khz in different NB pstate. + +**********************************************************************************************************************/ + +// this IntegrateSystemInfoTable is used for Kaveri & Kabini APU +typedef struct _ATOM_INTEGRATED_SYSTEM_INFO_V1_8 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ULONG ulBootUpEngineClock; + ULONG ulDentistVCOFreq; + ULONG ulBootUpUMAClock; + ATOM_CLK_VOLT_CAPABILITY sDISPCLK_Voltage[4]; + ULONG ulBootUpReqDisplayVector; + ULONG ulVBIOSMisc; + ULONG ulGPUCapInfo; + ULONG ulDISP_CLK2Freq; + USHORT usRequestedPWMFreqInHz; + UCHAR ucHtcTmpLmt; + UCHAR ucHtcHystLmt; + ULONG ulReserved2; + ULONG ulSystemConfig; + ULONG ulCPUCapInfo; + ULONG ulReserved3; + USHORT usGPUReservedSysMemSize; + USHORT usExtDispConnInfoOffset; + USHORT usPanelRefreshRateRange; + UCHAR ucMemoryType; + UCHAR ucUMAChannelNumber; + UCHAR strVBIOSMsg[40]; + ATOM_TDP_CONFIG asTdpConfig; + ULONG ulReserved[19]; + ATOM_AVAILABLE_SCLK_LIST sAvail_SCLK[5]; + ULONG ulGMCRestoreResetTime; + ULONG ulReserved4; + ULONG ulIdleNClk; + ULONG ulDDR_DLL_PowerUpTime; + ULONG ulDDR_PLL_PowerUpTime; + USHORT usPCIEClkSSPercentage; + USHORT usPCIEClkSSType; + USHORT usLvdsSSPercentage; + USHORT usLvdsSSpreadRateIn10Hz; + USHORT usHDMISSPercentage; + USHORT usHDMISSpreadRateIn10Hz; + USHORT usDVISSPercentage; + USHORT usDVISSpreadRateIn10Hz; + ULONG ulGPUReservedSysMemBaseAddrLo; + ULONG ulGPUReservedSysMemBaseAddrHi; + ULONG ulReserved5[3]; + USHORT usMaxLVDSPclkFreqInSingleLink; + UCHAR ucLvdsMisc; + UCHAR ucTravisLVDSVolAdjust; + UCHAR ucLVDSPwrOnSeqDIGONtoDE_in4Ms; + UCHAR ucLVDSPwrOnSeqDEtoVARY_BL_in4Ms; + UCHAR ucLVDSPwrOffSeqVARY_BLtoDE_in4Ms; + UCHAR ucLVDSPwrOffSeqDEtoDIGON_in4Ms; + UCHAR ucLVDSOffToOnDelay_in4Ms; + UCHAR ucLVDSPwrOnSeqVARY_BLtoBLON_in4Ms; + UCHAR ucLVDSPwrOffSeqBLONtoVARY_BL_in4Ms; + UCHAR ucMinAllowedBL_Level; + ULONG ulLCDBitDepthControlVal; + ULONG ulNbpStateMemclkFreq[4]; + ULONG ulReserved6; + ULONG ulNbpStateNClkFreq[4]; + USHORT usNBPStateVoltage[4]; + USHORT usBootUpNBVoltage; + USHORT usReserved2; + ATOM_EXTERNAL_DISPLAY_CONNECTION_INFO sExtDispConnInfo; +}ATOM_INTEGRATED_SYSTEM_INFO_V1_8; + +/********************************************************************************************************************** + ATOM_INTEGRATED_SYSTEM_INFO_V1_8 Description +ulBootUpEngineClock: VBIOS bootup Engine clock frequency, in 10kHz unit. if it is equal 0, then VBIOS use pre-defined bootup engine clock +ulDentistVCOFreq: Dentist VCO clock in 10kHz unit. +ulBootUpUMAClock: System memory boot up clock frequency in 10Khz unit. +sDISPCLK_Voltage: Report Display clock frequency requirement on GNB voltage(up to 4 voltage levels). + +ulBootUpReqDisplayVector: VBIOS boot up display IDs, following are supported devices in Trinity projects: + ATOM_DEVICE_CRT1_SUPPORT 0x0001 + ATOM_DEVICE_DFP1_SUPPORT 0x0008 + ATOM_DEVICE_DFP6_SUPPORT 0x0040 + ATOM_DEVICE_DFP2_SUPPORT 0x0080 + ATOM_DEVICE_DFP3_SUPPORT 0x0200 + ATOM_DEVICE_DFP4_SUPPORT 0x0400 + ATOM_DEVICE_DFP5_SUPPORT 0x0800 + ATOM_DEVICE_LCD1_SUPPORT 0x0002 + +ulVBIOSMisc: Miscellenous flags for VBIOS requirement and interface + bit[0]=0: INT15 callback function Get LCD EDID ( ax=4e08, bl=1b ) is not supported by SBIOS. + =1: INT15 callback function Get LCD EDID ( ax=4e08, bl=1b ) is supported by SBIOS. + bit[1]=0: INT15 callback function Get boot display( ax=4e08, bl=01h) is not supported by SBIOS + =1: INT15 callback function Get boot display( ax=4e08, bl=01h) is supported by SBIOS + bit[2]=0: INT15 callback function Get panel Expansion ( ax=4e08, bl=02h) is not supported by SBIOS + =1: INT15 callback function Get panel Expansion ( ax=4e08, bl=02h) is supported by SBIOS + bit[3]=0: VBIOS fast boot is disable + =1: VBIOS fast boot is enable. ( VBIOS skip display device detection in every set mode if LCD panel is connect and LID is open) + +ulGPUCapInfo: bit[0~2]= Reserved + bit[3]=0: Enable AUX HW mode detection logic + =1: Disable AUX HW mode detection logic + bit[4]=0: Disable DFS bypass feature + =1: Enable DFS bypass feature + +usRequestedPWMFreqInHz: When it's set to 0x0 by SBIOS: the LCD BackLight is not controlled by GPU(SW). + Any attempt to change BL using VBIOS function or enable VariBri from PP table is not effective since ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==0; + + When it's set to a non-zero frequency, the BackLight is controlled by GPU (SW) in one of two ways below: + 1. SW uses the GPU BL PWM output to control the BL, in chis case, this non-zero frequency determines what freq GPU should use; + VBIOS will set up proper PWM frequency and ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1,as the result, + Changing BL using VBIOS function is functional in both driver and non-driver present environment; + and enabling VariBri under the driver environment from PP table is optional. + + 2. SW uses other means to control BL (like DPCD),this non-zero frequency serves as a flag only indicating + that BL control from GPU is expected. + VBIOS will NOT set up PWM frequency but make ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU==1 + Changing BL using VBIOS function could be functional in both driver and non-driver present environment,but + it's per platform + and enabling VariBri under the driver environment from PP table is optional. + +ucHtcTmpLmt: Refer to D18F3x64 bit[22:16], HtcTmpLmt. Threshold on value to enter HTC_active state. +ucHtcHystLmt: Refer to D18F3x64 bit[27:24], HtcHystLmt. + To calculate threshold off value to exit HTC_active state, which is Threshold on vlaue minus ucHtcHystLmt. + +ulSystemConfig: Bit[0]=0: PCIE Power Gating Disabled + =1: PCIE Power Gating Enabled + Bit[1]=0: DDR-DLL shut-down feature disabled. + 1: DDR-DLL shut-down feature enabled. + Bit[2]=0: DDR-PLL Power down feature disabled. + 1: DDR-PLL Power down feature enabled. + Bit[3]=0: GNB DPM is disabled + =1: GNB DPM is enabled +ulCPUCapInfo: TBD + +usExtDispConnInfoOffset: Offset to sExtDispConnInfo inside the structure +usPanelRefreshRateRange: Bit vector for LCD supported refresh rate range. If DRR is requestd by the platform, at least two bits need to be set + to indicate a range. + SUPPORTED_LCD_REFRESHRATE_30Hz 0x0004 + SUPPORTED_LCD_REFRESHRATE_40Hz 0x0008 + SUPPORTED_LCD_REFRESHRATE_50Hz 0x0010 + SUPPORTED_LCD_REFRESHRATE_60Hz 0x0020 + +ucMemoryType: [3:0]=1:DDR1;=2:DDR2;=3:DDR3;=5:GDDR5; [7:4] is reserved. +ucUMAChannelNumber: System memory channel numbers. + +strVBIOSMsg[40]: VBIOS boot up customized message string + +sAvail_SCLK[5]: Arrays to provide availabe list of SLCK and corresponding voltage, order from low to high + +ulGMCRestoreResetTime: GMC power restore and GMC reset time to calculate data reconnection latency. Unit in ns. +ulIdleNClk: NCLK speed while memory runs in self-refresh state, used to calculate self-refresh latency. Unit in 10kHz. +ulDDR_DLL_PowerUpTime: DDR PHY DLL power up time. Unit in ns. +ulDDR_PLL_PowerUpTime: DDR PHY PLL power up time. Unit in ns. + +usPCIEClkSSPercentage: PCIE Clock Spread Spectrum Percentage in unit 0.01%; 100 mean 1%. +usPCIEClkSSType: PCIE Clock Spread Spectrum Type. 0 for Down spread(default); 1 for Center spread. +usLvdsSSPercentage: LVDS panel ( not include eDP ) Spread Spectrum Percentage in unit of 0.01%, =0, use VBIOS default setting. +usLvdsSSpreadRateIn10Hz: LVDS panel ( not include eDP ) Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. +usHDMISSPercentage: HDMI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. +usHDMISSpreadRateIn10Hz: HDMI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. +usDVISSPercentage: DVI Spread Spectrum Percentage in unit 0.01%; 100 mean 1%, =0, use VBIOS default setting. +usDVISSpreadRateIn10Hz: DVI Spread Spectrum frequency in unit of 10Hz, =0, use VBIOS default setting. + +usGPUReservedSysMemSize: Reserved system memory size for ACP engine in APU GNB, units in MB. 0/2/4MB based on CMOS options, current default could be 0MB. KV only, not on KB. +ulGPUReservedSysMemBaseAddrLo: Low 32 bits base address to the reserved system memory. +ulGPUReservedSysMemBaseAddrHi: High 32 bits base address to the reserved system memory. + +usMaxLVDSPclkFreqInSingleLink: Max pixel clock LVDS panel single link, if=0 means VBIOS use default threhold, right now it is 85Mhz +ucLVDSMisc: [bit0] LVDS 888bit panel mode =0: LVDS 888 panel in LDI mode, =1: LVDS 888 panel in FPDI mode + [bit1] LVDS panel lower and upper link mapping =0: lower link and upper link not swap, =1: lower link and upper link are swapped + [bit2] LVDS 888bit per color mode =0: 666 bit per color =1:888 bit per color + [bit3] LVDS parameter override enable =0: ucLvdsMisc parameter are not used =1: ucLvdsMisc parameter should be used + [bit4] Polarity of signal sent to digital BLON output pin. =0: not inverted(active high) =1: inverted ( active low ) + [bit5] Travid LVDS output voltage override enable, when =1, use ucTravisLVDSVolAdjust value to overwrite Traivs register LVDS_CTRL_4 +ucTravisLVDSVolAdjust When ucLVDSMisc[5]=1,it means platform SBIOS want to overwrite TravisLVDSVoltage. Then VBIOS will use ucTravisLVDSVolAdjust + value to program Travis register LVDS_CTRL_4 +ucLVDSPwrOnSeqDIGONtoDE_in4Ms: + LVDS power up sequence time in unit of 4ms, time delay from DIGON signal active to data enable signal active( DE ). + =0 mean use VBIOS default which is 8 ( 32ms ). The LVDS power up sequence is as following: DIGON->DE->VARY_BL->BLON. + This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. +ucLVDSPwrOnDEtoVARY_BL_in4Ms: + LVDS power up sequence time in unit of 4ms., time delay from DE( data enable ) active to Vary Brightness enable signal active( VARY_BL ). + =0 mean use VBIOS default which is 90 ( 360ms ). The LVDS power up sequence is as following: DIGON->DE->VARY_BL->BLON. + This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. +ucLVDSPwrOffVARY_BLtoDE_in4Ms: + LVDS power down sequence time in unit of 4ms, time delay from data enable ( DE ) signal off to LCDVCC (DIGON) off. + =0 mean use VBIOS default delay which is 8 ( 32ms ). The LVDS power down sequence is as following: BLON->VARY_BL->DE->DIGON + This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. +ucLVDSPwrOffDEtoDIGON_in4Ms: + LVDS power down sequence time in unit of 4ms, time delay from vary brightness enable signal( VARY_BL) off to data enable ( DE ) signal off. + =0 mean use VBIOS default which is 90 ( 360ms ). The LVDS power down sequence is as following: BLON->VARY_BL->DE->DIGON + This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. +ucLVDSOffToOnDelay_in4Ms: + LVDS power down sequence time in unit of 4ms. Time delay from DIGON signal off to DIGON signal active. + =0 means to use VBIOS default delay which is 125 ( 500ms ). + This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. +ucLVDSPwrOnSeqVARY_BLtoBLON_in4Ms: + LVDS power up sequence time in unit of 4ms. Time delay from VARY_BL signal on to DLON signal active. + =0 means to use VBIOS default delay which is 0 ( 0ms ). + This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. + +ucLVDSPwrOffSeqBLONtoVARY_BL_in4Ms: + LVDS power down sequence time in unit of 4ms. Time delay from BLON signal off to VARY_BL signal off. + =0 means to use VBIOS default delay which is 0 ( 0ms ). + This parameter is used by VBIOS only. VBIOS will patch LVDS_InfoTable. +ucMinAllowedBL_Level: Lowest LCD backlight PWM level. This is customer platform specific parameters. By default it is 0. + +ulLCDBitDepthControlVal: GPU display control encoder bit dither control setting, used to program register mmFMT_BIT_DEPTH_CONTROL + +ulNbpStateMemclkFreq[4]: system memory clock frequncey in unit of 10Khz in different NB P-State(P0, P1, P2 & P3). +ulNbpStateNClkFreq[4]: NB P-State NClk frequency in different NB P-State +usNBPStateVoltage[4]: NB P-State (P0/P1 & P2/P3) voltage; NBP3 refers to lowes voltage +usBootUpNBVoltage: NB P-State voltage during boot up before driver loaded +sExtDispConnInfo: Display connector information table provided to VBIOS + +**********************************************************************************************************************/ + +// this Table is used for Kaveri/Kabini APU +typedef struct _ATOM_FUSION_SYSTEM_INFO_V2 +{ + ATOM_INTEGRATED_SYSTEM_INFO_V1_8 sIntegratedSysInfo; // refer to ATOM_INTEGRATED_SYSTEM_INFO_V1_8 definition + ULONG ulPowerplayTable[128]; // Update comments here to link new powerplay table definition structure +}ATOM_FUSION_SYSTEM_INFO_V2; + + +/**************************************************************************/ +// This portion is only used when ext thermal chip or engine/memory clock SS chip is populated on a design +//Memory SS Info Table +//Define Memory Clock SS chip ID +#define ICS91719 1 +#define ICS91720 2 + +//Define one structure to inform SW a "block of data" writing to external SS chip via I2C protocol +typedef struct _ATOM_I2C_DATA_RECORD +{ + UCHAR ucNunberOfBytes; //Indicates how many bytes SW needs to write to the external ASIC for one block, besides to "Start" and "Stop" + UCHAR ucI2CData[1]; //I2C data in bytes, should be less than 16 bytes usually +}ATOM_I2C_DATA_RECORD; + + +//Define one structure to inform SW how many blocks of data writing to external SS chip via I2C protocol, in addition to other information +typedef struct _ATOM_I2C_DEVICE_SETUP_INFO +{ + ATOM_I2C_ID_CONFIG_ACCESS sucI2cId; //I2C line and HW/SW assisted cap. + UCHAR ucSSChipID; //SS chip being used + UCHAR ucSSChipSlaveAddr; //Slave Address to set up this SS chip + UCHAR ucNumOfI2CDataRecords; //number of data block + ATOM_I2C_DATA_RECORD asI2CData[1]; +}ATOM_I2C_DEVICE_SETUP_INFO; + +//========================================================================================== +typedef struct _ATOM_ASIC_MVDD_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_I2C_DEVICE_SETUP_INFO asI2CSetup[1]; +}ATOM_ASIC_MVDD_INFO; + +//========================================================================================== +#define ATOM_MCLK_SS_INFO ATOM_ASIC_MVDD_INFO + +//========================================================================================== +/**************************************************************************/ + +typedef struct _ATOM_ASIC_SS_ASSIGNMENT +{ + ULONG ulTargetClockRange; //Clock Out frequence (VCO ), in unit of 10Khz + USHORT usSpreadSpectrumPercentage; //in unit of 0.01% + USHORT usSpreadRateInKhz; //in unit of kHz, modulation freq + UCHAR ucClockIndication; //Indicate which clock source needs SS + UCHAR ucSpreadSpectrumMode; //Bit1=0 Down Spread,=1 Center Spread. + UCHAR ucReserved[2]; +}ATOM_ASIC_SS_ASSIGNMENT; + +//Define ucClockIndication, SW uses the IDs below to search if the SS is required/enabled on a clock branch/signal type. +//SS is not required or enabled if a match is not found. +#define ASIC_INTERNAL_MEMORY_SS 1 +#define ASIC_INTERNAL_ENGINE_SS 2 +#define ASIC_INTERNAL_UVD_SS 3 +#define ASIC_INTERNAL_SS_ON_TMDS 4 +#define ASIC_INTERNAL_SS_ON_HDMI 5 +#define ASIC_INTERNAL_SS_ON_LVDS 6 +#define ASIC_INTERNAL_SS_ON_DP 7 +#define ASIC_INTERNAL_SS_ON_DCPLL 8 +#define ASIC_EXTERNAL_SS_ON_DP_CLOCK 9 +#define ASIC_INTERNAL_VCE_SS 10 +#define ASIC_INTERNAL_GPUPLL_SS 11 + + +typedef struct _ATOM_ASIC_SS_ASSIGNMENT_V2 +{ + ULONG ulTargetClockRange; //For mem/engine/uvd, Clock Out frequence (VCO ), in unit of 10Khz + //For TMDS/HDMI/LVDS, it is pixel clock , for DP, it is link clock ( 27000 or 16200 ) + USHORT usSpreadSpectrumPercentage; //in unit of 0.01% or 0.001%, decided by ucSpreadSpectrumMode bit4 + USHORT usSpreadRateIn10Hz; //in unit of 10Hz, modulation freq + UCHAR ucClockIndication; //Indicate which clock source needs SS + UCHAR ucSpreadSpectrumMode; //Bit0=0 Down Spread,=1 Center Spread, bit1=0: internal SS bit1=1: external SS + UCHAR ucReserved[2]; +}ATOM_ASIC_SS_ASSIGNMENT_V2; + +//ucSpreadSpectrumMode +//#define ATOM_SS_DOWN_SPREAD_MODE_MASK 0x00000000 +//#define ATOM_SS_DOWN_SPREAD_MODE 0x00000000 +//#define ATOM_SS_CENTRE_SPREAD_MODE_MASK 0x00000001 +//#define ATOM_SS_CENTRE_SPREAD_MODE 0x00000001 +//#define ATOM_INTERNAL_SS_MASK 0x00000000 +//#define ATOM_EXTERNAL_SS_MASK 0x00000002 + +typedef struct _ATOM_ASIC_INTERNAL_SS_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_ASIC_SS_ASSIGNMENT asSpreadSpectrum[4]; +}ATOM_ASIC_INTERNAL_SS_INFO; + +typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V2 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_ASIC_SS_ASSIGNMENT_V2 asSpreadSpectrum[1]; //this is point only. +}ATOM_ASIC_INTERNAL_SS_INFO_V2; + +typedef struct _ATOM_ASIC_SS_ASSIGNMENT_V3 +{ + ULONG ulTargetClockRange; //For mem/engine/uvd, Clock Out frequence (VCO ), in unit of 10Khz + //For TMDS/HDMI/LVDS, it is pixel clock , for DP, it is link clock ( 27000 or 16200 ) + USHORT usSpreadSpectrumPercentage; //in unit of 0.01% + USHORT usSpreadRateIn10Hz; //in unit of 10Hz, modulation freq + UCHAR ucClockIndication; //Indicate which clock source needs SS + UCHAR ucSpreadSpectrumMode; //Bit0=0 Down Spread,=1 Center Spread, bit1=0: internal SS bit1=1: external SS + UCHAR ucReserved[2]; +}ATOM_ASIC_SS_ASSIGNMENT_V3; + +//ATOM_ASIC_SS_ASSIGNMENT_V3.ucSpreadSpectrumMode +#define SS_MODE_V3_CENTRE_SPREAD_MASK 0x01 +#define SS_MODE_V3_EXTERNAL_SS_MASK 0x02 +#define SS_MODE_V3_PERCENTAGE_DIV_BY_1000_MASK 0x10 + +typedef struct _ATOM_ASIC_INTERNAL_SS_INFO_V3 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_ASIC_SS_ASSIGNMENT_V3 asSpreadSpectrum[1]; //this is pointer only. +}ATOM_ASIC_INTERNAL_SS_INFO_V3; + + +//==============================Scratch Pad Definition Portion=============================== +#define ATOM_DEVICE_CONNECT_INFO_DEF 0 +#define ATOM_ROM_LOCATION_DEF 1 +#define ATOM_TV_STANDARD_DEF 2 +#define ATOM_ACTIVE_INFO_DEF 3 +#define ATOM_LCD_INFO_DEF 4 +#define ATOM_DOS_REQ_INFO_DEF 5 +#define ATOM_ACC_CHANGE_INFO_DEF 6 +#define ATOM_DOS_MODE_INFO_DEF 7 +#define ATOM_I2C_CHANNEL_STATUS_DEF 8 +#define ATOM_I2C_CHANNEL_STATUS1_DEF 9 +#define ATOM_INTERNAL_TIMER_DEF 10 + +// BIOS_0_SCRATCH Definition +#define ATOM_S0_CRT1_MONO 0x00000001L +#define ATOM_S0_CRT1_COLOR 0x00000002L +#define ATOM_S0_CRT1_MASK (ATOM_S0_CRT1_MONO+ATOM_S0_CRT1_COLOR) + +#define ATOM_S0_TV1_COMPOSITE_A 0x00000004L +#define ATOM_S0_TV1_SVIDEO_A 0x00000008L +#define ATOM_S0_TV1_MASK_A (ATOM_S0_TV1_COMPOSITE_A+ATOM_S0_TV1_SVIDEO_A) + +#define ATOM_S0_CV_A 0x00000010L +#define ATOM_S0_CV_DIN_A 0x00000020L +#define ATOM_S0_CV_MASK_A (ATOM_S0_CV_A+ATOM_S0_CV_DIN_A) + + +#define ATOM_S0_CRT2_MONO 0x00000100L +#define ATOM_S0_CRT2_COLOR 0x00000200L +#define ATOM_S0_CRT2_MASK (ATOM_S0_CRT2_MONO+ATOM_S0_CRT2_COLOR) + +#define ATOM_S0_TV1_COMPOSITE 0x00000400L +#define ATOM_S0_TV1_SVIDEO 0x00000800L +#define ATOM_S0_TV1_SCART 0x00004000L +#define ATOM_S0_TV1_MASK (ATOM_S0_TV1_COMPOSITE+ATOM_S0_TV1_SVIDEO+ATOM_S0_TV1_SCART) + +#define ATOM_S0_CV 0x00001000L +#define ATOM_S0_CV_DIN 0x00002000L +#define ATOM_S0_CV_MASK (ATOM_S0_CV+ATOM_S0_CV_DIN) + +#define ATOM_S0_DFP1 0x00010000L +#define ATOM_S0_DFP2 0x00020000L +#define ATOM_S0_LCD1 0x00040000L +#define ATOM_S0_LCD2 0x00080000L +#define ATOM_S0_DFP6 0x00100000L +#define ATOM_S0_DFP3 0x00200000L +#define ATOM_S0_DFP4 0x00400000L +#define ATOM_S0_DFP5 0x00800000L + +#define ATOM_S0_DFP_MASK ATOM_S0_DFP1 | ATOM_S0_DFP2 | ATOM_S0_DFP3 | ATOM_S0_DFP4 | ATOM_S0_DFP5 | ATOM_S0_DFP6 + +#define ATOM_S0_FAD_REGISTER_BUG 0x02000000L // If set, indicates we are running a PCIE asic with + // the FAD/HDP reg access bug. Bit is read by DAL, this is obsolete from RV5xx + +#define ATOM_S0_THERMAL_STATE_MASK 0x1C000000L +#define ATOM_S0_THERMAL_STATE_SHIFT 26 + +#define ATOM_S0_SYSTEM_POWER_STATE_MASK 0xE0000000L +#define ATOM_S0_SYSTEM_POWER_STATE_SHIFT 29 + +#define ATOM_S0_SYSTEM_POWER_STATE_VALUE_AC 1 +#define ATOM_S0_SYSTEM_POWER_STATE_VALUE_DC 2 +#define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LITEAC 3 +#define ATOM_S0_SYSTEM_POWER_STATE_VALUE_LIT2AC 4 + +//Byte aligned definition for BIOS usage +#define ATOM_S0_CRT1_MONOb0 0x01 +#define ATOM_S0_CRT1_COLORb0 0x02 +#define ATOM_S0_CRT1_MASKb0 (ATOM_S0_CRT1_MONOb0+ATOM_S0_CRT1_COLORb0) + +#define ATOM_S0_TV1_COMPOSITEb0 0x04 +#define ATOM_S0_TV1_SVIDEOb0 0x08 +#define ATOM_S0_TV1_MASKb0 (ATOM_S0_TV1_COMPOSITEb0+ATOM_S0_TV1_SVIDEOb0) + +#define ATOM_S0_CVb0 0x10 +#define ATOM_S0_CV_DINb0 0x20 +#define ATOM_S0_CV_MASKb0 (ATOM_S0_CVb0+ATOM_S0_CV_DINb0) + +#define ATOM_S0_CRT2_MONOb1 0x01 +#define ATOM_S0_CRT2_COLORb1 0x02 +#define ATOM_S0_CRT2_MASKb1 (ATOM_S0_CRT2_MONOb1+ATOM_S0_CRT2_COLORb1) + +#define ATOM_S0_TV1_COMPOSITEb1 0x04 +#define ATOM_S0_TV1_SVIDEOb1 0x08 +#define ATOM_S0_TV1_SCARTb1 0x40 +#define ATOM_S0_TV1_MASKb1 (ATOM_S0_TV1_COMPOSITEb1+ATOM_S0_TV1_SVIDEOb1+ATOM_S0_TV1_SCARTb1) + +#define ATOM_S0_CVb1 0x10 +#define ATOM_S0_CV_DINb1 0x20 +#define ATOM_S0_CV_MASKb1 (ATOM_S0_CVb1+ATOM_S0_CV_DINb1) + +#define ATOM_S0_DFP1b2 0x01 +#define ATOM_S0_DFP2b2 0x02 +#define ATOM_S0_LCD1b2 0x04 +#define ATOM_S0_LCD2b2 0x08 +#define ATOM_S0_DFP6b2 0x10 +#define ATOM_S0_DFP3b2 0x20 +#define ATOM_S0_DFP4b2 0x40 +#define ATOM_S0_DFP5b2 0x80 + + +#define ATOM_S0_THERMAL_STATE_MASKb3 0x1C +#define ATOM_S0_THERMAL_STATE_SHIFTb3 2 + +#define ATOM_S0_SYSTEM_POWER_STATE_MASKb3 0xE0 +#define ATOM_S0_LCD1_SHIFT 18 + +// BIOS_1_SCRATCH Definition +#define ATOM_S1_ROM_LOCATION_MASK 0x0000FFFFL +#define ATOM_S1_PCI_BUS_DEV_MASK 0xFFFF0000L + +// BIOS_2_SCRATCH Definition +#define ATOM_S2_TV1_STANDARD_MASK 0x0000000FL +#define ATOM_S2_CURRENT_BL_LEVEL_MASK 0x0000FF00L +#define ATOM_S2_CURRENT_BL_LEVEL_SHIFT 8 + +#define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASK 0x0C000000L +#define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASK_SHIFT 26 +#define ATOM_S2_FORCEDLOWPWRMODE_STATE_CHANGE 0x10000000L + +#define ATOM_S2_DEVICE_DPMS_STATE 0x00010000L +#define ATOM_S2_VRI_BRIGHT_ENABLE 0x20000000L + +#define ATOM_S2_DISPLAY_ROTATION_0_DEGREE 0x0 +#define ATOM_S2_DISPLAY_ROTATION_90_DEGREE 0x1 +#define ATOM_S2_DISPLAY_ROTATION_180_DEGREE 0x2 +#define ATOM_S2_DISPLAY_ROTATION_270_DEGREE 0x3 +#define ATOM_S2_DISPLAY_ROTATION_DEGREE_SHIFT 30 +#define ATOM_S2_DISPLAY_ROTATION_ANGLE_MASK 0xC0000000L + + +//Byte aligned definition for BIOS usage +#define ATOM_S2_TV1_STANDARD_MASKb0 0x0F +#define ATOM_S2_CURRENT_BL_LEVEL_MASKb1 0xFF +#define ATOM_S2_DEVICE_DPMS_STATEb2 0x01 + +#define ATOM_S2_DEVICE_DPMS_MASKw1 0x3FF +#define ATOM_S2_FORCEDLOWPWRMODE_STATE_MASKb3 0x0C +#define ATOM_S2_FORCEDLOWPWRMODE_STATE_CHANGEb3 0x10 +#define ATOM_S2_TMDS_COHERENT_MODEb3 0x10 // used by VBIOS code only, use coherent mode for TMDS/HDMI mode +#define ATOM_S2_VRI_BRIGHT_ENABLEb3 0x20 +#define ATOM_S2_ROTATION_STATE_MASKb3 0xC0 + + +// BIOS_3_SCRATCH Definition +#define ATOM_S3_CRT1_ACTIVE 0x00000001L +#define ATOM_S3_LCD1_ACTIVE 0x00000002L +#define ATOM_S3_TV1_ACTIVE 0x00000004L +#define ATOM_S3_DFP1_ACTIVE 0x00000008L +#define ATOM_S3_CRT2_ACTIVE 0x00000010L +#define ATOM_S3_LCD2_ACTIVE 0x00000020L +#define ATOM_S3_DFP6_ACTIVE 0x00000040L +#define ATOM_S3_DFP2_ACTIVE 0x00000080L +#define ATOM_S3_CV_ACTIVE 0x00000100L +#define ATOM_S3_DFP3_ACTIVE 0x00000200L +#define ATOM_S3_DFP4_ACTIVE 0x00000400L +#define ATOM_S3_DFP5_ACTIVE 0x00000800L + +#define ATOM_S3_DEVICE_ACTIVE_MASK 0x00000FFFL + +#define ATOM_S3_LCD_FULLEXPANSION_ACTIVE 0x00001000L +#define ATOM_S3_LCD_EXPANSION_ASPEC_RATIO_ACTIVE 0x00002000L + +#define ATOM_S3_CRT1_CRTC_ACTIVE 0x00010000L +#define ATOM_S3_LCD1_CRTC_ACTIVE 0x00020000L +#define ATOM_S3_TV1_CRTC_ACTIVE 0x00040000L +#define ATOM_S3_DFP1_CRTC_ACTIVE 0x00080000L +#define ATOM_S3_CRT2_CRTC_ACTIVE 0x00100000L +#define ATOM_S3_LCD2_CRTC_ACTIVE 0x00200000L +#define ATOM_S3_DFP6_CRTC_ACTIVE 0x00400000L +#define ATOM_S3_DFP2_CRTC_ACTIVE 0x00800000L +#define ATOM_S3_CV_CRTC_ACTIVE 0x01000000L +#define ATOM_S3_DFP3_CRTC_ACTIVE 0x02000000L +#define ATOM_S3_DFP4_CRTC_ACTIVE 0x04000000L +#define ATOM_S3_DFP5_CRTC_ACTIVE 0x08000000L + +#define ATOM_S3_DEVICE_CRTC_ACTIVE_MASK 0x0FFF0000L +#define ATOM_S3_ASIC_GUI_ENGINE_HUNG 0x20000000L +//Below two definitions are not supported in pplib, but in the old powerplay in DAL +#define ATOM_S3_ALLOW_FAST_PWR_SWITCH 0x40000000L +#define ATOM_S3_RQST_GPU_USE_MIN_PWR 0x80000000L + +//Byte aligned definition for BIOS usage +#define ATOM_S3_CRT1_ACTIVEb0 0x01 +#define ATOM_S3_LCD1_ACTIVEb0 0x02 +#define ATOM_S3_TV1_ACTIVEb0 0x04 +#define ATOM_S3_DFP1_ACTIVEb0 0x08 +#define ATOM_S3_CRT2_ACTIVEb0 0x10 +#define ATOM_S3_LCD2_ACTIVEb0 0x20 +#define ATOM_S3_DFP6_ACTIVEb0 0x40 +#define ATOM_S3_DFP2_ACTIVEb0 0x80 +#define ATOM_S3_CV_ACTIVEb1 0x01 +#define ATOM_S3_DFP3_ACTIVEb1 0x02 +#define ATOM_S3_DFP4_ACTIVEb1 0x04 +#define ATOM_S3_DFP5_ACTIVEb1 0x08 + +#define ATOM_S3_ACTIVE_CRTC1w0 0xFFF + +#define ATOM_S3_CRT1_CRTC_ACTIVEb2 0x01 +#define ATOM_S3_LCD1_CRTC_ACTIVEb2 0x02 +#define ATOM_S3_TV1_CRTC_ACTIVEb2 0x04 +#define ATOM_S3_DFP1_CRTC_ACTIVEb2 0x08 +#define ATOM_S3_CRT2_CRTC_ACTIVEb2 0x10 +#define ATOM_S3_LCD2_CRTC_ACTIVEb2 0x20 +#define ATOM_S3_DFP6_CRTC_ACTIVEb2 0x40 +#define ATOM_S3_DFP2_CRTC_ACTIVEb2 0x80 +#define ATOM_S3_CV_CRTC_ACTIVEb3 0x01 +#define ATOM_S3_DFP3_CRTC_ACTIVEb3 0x02 +#define ATOM_S3_DFP4_CRTC_ACTIVEb3 0x04 +#define ATOM_S3_DFP5_CRTC_ACTIVEb3 0x08 + +#define ATOM_S3_ACTIVE_CRTC2w1 0xFFF + +// BIOS_4_SCRATCH Definition +#define ATOM_S4_LCD1_PANEL_ID_MASK 0x000000FFL +#define ATOM_S4_LCD1_REFRESH_MASK 0x0000FF00L +#define ATOM_S4_LCD1_REFRESH_SHIFT 8 + +//Byte aligned definition for BIOS usage +#define ATOM_S4_LCD1_PANEL_ID_MASKb0 0x0FF +#define ATOM_S4_LCD1_REFRESH_MASKb1 ATOM_S4_LCD1_PANEL_ID_MASKb0 +#define ATOM_S4_VRAM_INFO_MASKb2 ATOM_S4_LCD1_PANEL_ID_MASKb0 + +// BIOS_5_SCRATCH Definition, BIOS_5_SCRATCH is used by Firmware only !!!! +#define ATOM_S5_DOS_REQ_CRT1b0 0x01 +#define ATOM_S5_DOS_REQ_LCD1b0 0x02 +#define ATOM_S5_DOS_REQ_TV1b0 0x04 +#define ATOM_S5_DOS_REQ_DFP1b0 0x08 +#define ATOM_S5_DOS_REQ_CRT2b0 0x10 +#define ATOM_S5_DOS_REQ_LCD2b0 0x20 +#define ATOM_S5_DOS_REQ_DFP6b0 0x40 +#define ATOM_S5_DOS_REQ_DFP2b0 0x80 +#define ATOM_S5_DOS_REQ_CVb1 0x01 +#define ATOM_S5_DOS_REQ_DFP3b1 0x02 +#define ATOM_S5_DOS_REQ_DFP4b1 0x04 +#define ATOM_S5_DOS_REQ_DFP5b1 0x08 + +#define ATOM_S5_DOS_REQ_DEVICEw0 0x0FFF + +#define ATOM_S5_DOS_REQ_CRT1 0x0001 +#define ATOM_S5_DOS_REQ_LCD1 0x0002 +#define ATOM_S5_DOS_REQ_TV1 0x0004 +#define ATOM_S5_DOS_REQ_DFP1 0x0008 +#define ATOM_S5_DOS_REQ_CRT2 0x0010 +#define ATOM_S5_DOS_REQ_LCD2 0x0020 +#define ATOM_S5_DOS_REQ_DFP6 0x0040 +#define ATOM_S5_DOS_REQ_DFP2 0x0080 +#define ATOM_S5_DOS_REQ_CV 0x0100 +#define ATOM_S5_DOS_REQ_DFP3 0x0200 +#define ATOM_S5_DOS_REQ_DFP4 0x0400 +#define ATOM_S5_DOS_REQ_DFP5 0x0800 + +#define ATOM_S5_DOS_FORCE_CRT1b2 ATOM_S5_DOS_REQ_CRT1b0 +#define ATOM_S5_DOS_FORCE_TV1b2 ATOM_S5_DOS_REQ_TV1b0 +#define ATOM_S5_DOS_FORCE_CRT2b2 ATOM_S5_DOS_REQ_CRT2b0 +#define ATOM_S5_DOS_FORCE_CVb3 ATOM_S5_DOS_REQ_CVb1 +#define ATOM_S5_DOS_FORCE_DEVICEw1 (ATOM_S5_DOS_FORCE_CRT1b2+ATOM_S5_DOS_FORCE_TV1b2+ATOM_S5_DOS_FORCE_CRT2b2+\ + (ATOM_S5_DOS_FORCE_CVb3<<8)) + +// BIOS_6_SCRATCH Definition +#define ATOM_S6_DEVICE_CHANGE 0x00000001L +#define ATOM_S6_SCALER_CHANGE 0x00000002L +#define ATOM_S6_LID_CHANGE 0x00000004L +#define ATOM_S6_DOCKING_CHANGE 0x00000008L +#define ATOM_S6_ACC_MODE 0x00000010L +#define ATOM_S6_EXT_DESKTOP_MODE 0x00000020L +#define ATOM_S6_LID_STATE 0x00000040L +#define ATOM_S6_DOCK_STATE 0x00000080L +#define ATOM_S6_CRITICAL_STATE 0x00000100L +#define ATOM_S6_HW_I2C_BUSY_STATE 0x00000200L +#define ATOM_S6_THERMAL_STATE_CHANGE 0x00000400L +#define ATOM_S6_INTERRUPT_SET_BY_BIOS 0x00000800L +#define ATOM_S6_REQ_LCD_EXPANSION_FULL 0x00001000L //Normal expansion Request bit for LCD +#define ATOM_S6_REQ_LCD_EXPANSION_ASPEC_RATIO 0x00002000L //Aspect ratio expansion Request bit for LCD + +#define ATOM_S6_DISPLAY_STATE_CHANGE 0x00004000L //This bit is recycled when ATOM_BIOS_INFO_BIOS_SCRATCH6_SCL2_REDEFINE is set,previously it's SCL2_H_expansion +#define ATOM_S6_I2C_STATE_CHANGE 0x00008000L //This bit is recycled,when ATOM_BIOS_INFO_BIOS_SCRATCH6_SCL2_REDEFINE is set,previously it's SCL2_V_expansion + +#define ATOM_S6_ACC_REQ_CRT1 0x00010000L +#define ATOM_S6_ACC_REQ_LCD1 0x00020000L +#define ATOM_S6_ACC_REQ_TV1 0x00040000L +#define ATOM_S6_ACC_REQ_DFP1 0x00080000L +#define ATOM_S6_ACC_REQ_CRT2 0x00100000L +#define ATOM_S6_ACC_REQ_LCD2 0x00200000L +#define ATOM_S6_ACC_REQ_DFP6 0x00400000L +#define ATOM_S6_ACC_REQ_DFP2 0x00800000L +#define ATOM_S6_ACC_REQ_CV 0x01000000L +#define ATOM_S6_ACC_REQ_DFP3 0x02000000L +#define ATOM_S6_ACC_REQ_DFP4 0x04000000L +#define ATOM_S6_ACC_REQ_DFP5 0x08000000L + +#define ATOM_S6_ACC_REQ_MASK 0x0FFF0000L +#define ATOM_S6_SYSTEM_POWER_MODE_CHANGE 0x10000000L +#define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH 0x20000000L +#define ATOM_S6_VRI_BRIGHTNESS_CHANGE 0x40000000L +#define ATOM_S6_CONFIG_DISPLAY_CHANGE_MASK 0x80000000L + +//Byte aligned definition for BIOS usage +#define ATOM_S6_DEVICE_CHANGEb0 0x01 +#define ATOM_S6_SCALER_CHANGEb0 0x02 +#define ATOM_S6_LID_CHANGEb0 0x04 +#define ATOM_S6_DOCKING_CHANGEb0 0x08 +#define ATOM_S6_ACC_MODEb0 0x10 +#define ATOM_S6_EXT_DESKTOP_MODEb0 0x20 +#define ATOM_S6_LID_STATEb0 0x40 +#define ATOM_S6_DOCK_STATEb0 0x80 +#define ATOM_S6_CRITICAL_STATEb1 0x01 +#define ATOM_S6_HW_I2C_BUSY_STATEb1 0x02 +#define ATOM_S6_THERMAL_STATE_CHANGEb1 0x04 +#define ATOM_S6_INTERRUPT_SET_BY_BIOSb1 0x08 +#define ATOM_S6_REQ_LCD_EXPANSION_FULLb1 0x10 +#define ATOM_S6_REQ_LCD_EXPANSION_ASPEC_RATIOb1 0x20 + +#define ATOM_S6_ACC_REQ_CRT1b2 0x01 +#define ATOM_S6_ACC_REQ_LCD1b2 0x02 +#define ATOM_S6_ACC_REQ_TV1b2 0x04 +#define ATOM_S6_ACC_REQ_DFP1b2 0x08 +#define ATOM_S6_ACC_REQ_CRT2b2 0x10 +#define ATOM_S6_ACC_REQ_LCD2b2 0x20 +#define ATOM_S6_ACC_REQ_DFP6b2 0x40 +#define ATOM_S6_ACC_REQ_DFP2b2 0x80 +#define ATOM_S6_ACC_REQ_CVb3 0x01 +#define ATOM_S6_ACC_REQ_DFP3b3 0x02 +#define ATOM_S6_ACC_REQ_DFP4b3 0x04 +#define ATOM_S6_ACC_REQ_DFP5b3 0x08 + +#define ATOM_S6_ACC_REQ_DEVICEw1 ATOM_S5_DOS_REQ_DEVICEw0 +#define ATOM_S6_SYSTEM_POWER_MODE_CHANGEb3 0x10 +#define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCHb3 0x20 +#define ATOM_S6_VRI_BRIGHTNESS_CHANGEb3 0x40 +#define ATOM_S6_CONFIG_DISPLAY_CHANGEb3 0x80 + +#define ATOM_S6_DEVICE_CHANGE_SHIFT 0 +#define ATOM_S6_SCALER_CHANGE_SHIFT 1 +#define ATOM_S6_LID_CHANGE_SHIFT 2 +#define ATOM_S6_DOCKING_CHANGE_SHIFT 3 +#define ATOM_S6_ACC_MODE_SHIFT 4 +#define ATOM_S6_EXT_DESKTOP_MODE_SHIFT 5 +#define ATOM_S6_LID_STATE_SHIFT 6 +#define ATOM_S6_DOCK_STATE_SHIFT 7 +#define ATOM_S6_CRITICAL_STATE_SHIFT 8 +#define ATOM_S6_HW_I2C_BUSY_STATE_SHIFT 9 +#define ATOM_S6_THERMAL_STATE_CHANGE_SHIFT 10 +#define ATOM_S6_INTERRUPT_SET_BY_BIOS_SHIFT 11 +#define ATOM_S6_REQ_SCALER_SHIFT 12 +#define ATOM_S6_REQ_SCALER_ARATIO_SHIFT 13 +#define ATOM_S6_DISPLAY_STATE_CHANGE_SHIFT 14 +#define ATOM_S6_I2C_STATE_CHANGE_SHIFT 15 +#define ATOM_S6_SYSTEM_POWER_MODE_CHANGE_SHIFT 28 +#define ATOM_S6_ACC_BLOCK_DISPLAY_SWITCH_SHIFT 29 +#define ATOM_S6_VRI_BRIGHTNESS_CHANGE_SHIFT 30 +#define ATOM_S6_CONFIG_DISPLAY_CHANGE_SHIFT 31 + +// BIOS_7_SCRATCH Definition, BIOS_7_SCRATCH is used by Firmware only !!!! +#define ATOM_S7_DOS_MODE_TYPEb0 0x03 +#define ATOM_S7_DOS_MODE_VGAb0 0x00 +#define ATOM_S7_DOS_MODE_VESAb0 0x01 +#define ATOM_S7_DOS_MODE_EXTb0 0x02 +#define ATOM_S7_DOS_MODE_PIXEL_DEPTHb0 0x0C +#define ATOM_S7_DOS_MODE_PIXEL_FORMATb0 0xF0 +#define ATOM_S7_DOS_8BIT_DAC_ENb1 0x01 +#define ATOM_S7_ASIC_INIT_COMPLETEb1 0x02 +#define ATOM_S7_ASIC_INIT_COMPLETE_MASK 0x00000200 +#define ATOM_S7_DOS_MODE_NUMBERw1 0x0FFFF + +#define ATOM_S7_DOS_8BIT_DAC_EN_SHIFT 8 + +// BIOS_8_SCRATCH Definition +#define ATOM_S8_I2C_CHANNEL_BUSY_MASK 0x00000FFFF +#define ATOM_S8_I2C_HW_ENGINE_BUSY_MASK 0x0FFFF0000 + +#define ATOM_S8_I2C_CHANNEL_BUSY_SHIFT 0 +#define ATOM_S8_I2C_ENGINE_BUSY_SHIFT 16 + +// BIOS_9_SCRATCH Definition +#ifndef ATOM_S9_I2C_CHANNEL_COMPLETED_MASK +#define ATOM_S9_I2C_CHANNEL_COMPLETED_MASK 0x0000FFFF +#endif +#ifndef ATOM_S9_I2C_CHANNEL_ABORTED_MASK +#define ATOM_S9_I2C_CHANNEL_ABORTED_MASK 0xFFFF0000 +#endif +#ifndef ATOM_S9_I2C_CHANNEL_COMPLETED_SHIFT +#define ATOM_S9_I2C_CHANNEL_COMPLETED_SHIFT 0 +#endif +#ifndef ATOM_S9_I2C_CHANNEL_ABORTED_SHIFT +#define ATOM_S9_I2C_CHANNEL_ABORTED_SHIFT 16 +#endif + + +#define ATOM_FLAG_SET 0x20 +#define ATOM_FLAG_CLEAR 0 +#define CLEAR_ATOM_S6_ACC_MODE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_ACC_MODE_SHIFT | ATOM_FLAG_CLEAR) +#define SET_ATOM_S6_DEVICE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DEVICE_CHANGE_SHIFT | ATOM_FLAG_SET) +#define SET_ATOM_S6_VRI_BRIGHTNESS_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_VRI_BRIGHTNESS_CHANGE_SHIFT | ATOM_FLAG_SET) +#define SET_ATOM_S6_SCALER_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_SCALER_CHANGE_SHIFT | ATOM_FLAG_SET) +#define SET_ATOM_S6_LID_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_LID_CHANGE_SHIFT | ATOM_FLAG_SET) + +#define SET_ATOM_S6_LID_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_LID_STATE_SHIFT | ATOM_FLAG_SET) +#define CLEAR_ATOM_S6_LID_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_LID_STATE_SHIFT | ATOM_FLAG_CLEAR) + +#define SET_ATOM_S6_DOCK_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DOCKING_CHANGE_SHIFT | ATOM_FLAG_SET) +#define SET_ATOM_S6_DOCK_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DOCK_STATE_SHIFT | ATOM_FLAG_SET) +#define CLEAR_ATOM_S6_DOCK_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DOCK_STATE_SHIFT | ATOM_FLAG_CLEAR) + +#define SET_ATOM_S6_THERMAL_STATE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_THERMAL_STATE_CHANGE_SHIFT | ATOM_FLAG_SET) +#define SET_ATOM_S6_SYSTEM_POWER_MODE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_SYSTEM_POWER_MODE_CHANGE_SHIFT | ATOM_FLAG_SET) +#define SET_ATOM_S6_INTERRUPT_SET_BY_BIOS ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_INTERRUPT_SET_BY_BIOS_SHIFT | ATOM_FLAG_SET) + +#define SET_ATOM_S6_CRITICAL_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_CRITICAL_STATE_SHIFT | ATOM_FLAG_SET) +#define CLEAR_ATOM_S6_CRITICAL_STATE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_CRITICAL_STATE_SHIFT | ATOM_FLAG_CLEAR) + +#define SET_ATOM_S6_REQ_SCALER ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_SHIFT | ATOM_FLAG_SET) +#define CLEAR_ATOM_S6_REQ_SCALER ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_SHIFT | ATOM_FLAG_CLEAR ) + +#define SET_ATOM_S6_REQ_SCALER_ARATIO ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_ARATIO_SHIFT | ATOM_FLAG_SET ) +#define CLEAR_ATOM_S6_REQ_SCALER_ARATIO ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_REQ_SCALER_ARATIO_SHIFT | ATOM_FLAG_CLEAR ) + +#define SET_ATOM_S6_I2C_STATE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_I2C_STATE_CHANGE_SHIFT | ATOM_FLAG_SET ) + +#define SET_ATOM_S6_DISPLAY_STATE_CHANGE ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_DISPLAY_STATE_CHANGE_SHIFT | ATOM_FLAG_SET ) + +#define SET_ATOM_S6_DEVICE_RECONFIG ((ATOM_ACC_CHANGE_INFO_DEF << 8 )|ATOM_S6_CONFIG_DISPLAY_CHANGE_SHIFT | ATOM_FLAG_SET) +#define CLEAR_ATOM_S0_LCD1 ((ATOM_DEVICE_CONNECT_INFO_DEF << 8 )| ATOM_S0_LCD1_SHIFT | ATOM_FLAG_CLEAR ) +#define SET_ATOM_S7_DOS_8BIT_DAC_EN ((ATOM_DOS_MODE_INFO_DEF << 8 )|ATOM_S7_DOS_8BIT_DAC_EN_SHIFT | ATOM_FLAG_SET ) +#define CLEAR_ATOM_S7_DOS_8BIT_DAC_EN ((ATOM_DOS_MODE_INFO_DEF << 8 )|ATOM_S7_DOS_8BIT_DAC_EN_SHIFT | ATOM_FLAG_CLEAR ) + +/****************************************************************************/ +//Portion II: Definitinos only used in Driver +/****************************************************************************/ + +// Macros used by driver +#ifdef __cplusplus +#define GetIndexIntoMasterTable(MasterOrData, FieldName) ((reinterpret_cast(&(static_cast(0))->FieldName)-static_cast(0))/sizeof(USHORT)) + +#define GET_COMMAND_TABLE_COMMANDSET_REVISION(TABLE_HEADER_OFFSET) (((static_cast(TABLE_HEADER_OFFSET))->ucTableFormatRevision )&0x3F) +#define GET_COMMAND_TABLE_PARAMETER_REVISION(TABLE_HEADER_OFFSET) (((static_cast(TABLE_HEADER_OFFSET))->ucTableContentRevision)&0x3F) +#else // not __cplusplus +#define GetIndexIntoMasterTable(MasterOrData, FieldName) (((char*)(&((ATOM_MASTER_LIST_OF_##MasterOrData##_TABLES*)0)->FieldName)-(char*)0)/sizeof(USHORT)) + +#define GET_COMMAND_TABLE_COMMANDSET_REVISION(TABLE_HEADER_OFFSET) ((((ATOM_COMMON_TABLE_HEADER*)TABLE_HEADER_OFFSET)->ucTableFormatRevision)&0x3F) +#define GET_COMMAND_TABLE_PARAMETER_REVISION(TABLE_HEADER_OFFSET) ((((ATOM_COMMON_TABLE_HEADER*)TABLE_HEADER_OFFSET)->ucTableContentRevision)&0x3F) +#endif // __cplusplus + +#define GET_DATA_TABLE_MAJOR_REVISION GET_COMMAND_TABLE_COMMANDSET_REVISION +#define GET_DATA_TABLE_MINOR_REVISION GET_COMMAND_TABLE_PARAMETER_REVISION + +/****************************************************************************/ +//Portion III: Definitinos only used in VBIOS +/****************************************************************************/ +#define ATOM_DAC_SRC 0x80 +#define ATOM_SRC_DAC1 0 +#define ATOM_SRC_DAC2 0x80 + +typedef struct _MEMORY_PLLINIT_PARAMETERS +{ + ULONG ulTargetMemoryClock; //In 10Khz unit + UCHAR ucAction; //not define yet + UCHAR ucFbDiv_Hi; //Fbdiv Hi byte + UCHAR ucFbDiv; //FB value + UCHAR ucPostDiv; //Post div +}MEMORY_PLLINIT_PARAMETERS; + +#define MEMORY_PLLINIT_PS_ALLOCATION MEMORY_PLLINIT_PARAMETERS + + +#define GPIO_PIN_WRITE 0x01 +#define GPIO_PIN_READ 0x00 + +typedef struct _GPIO_PIN_CONTROL_PARAMETERS +{ + UCHAR ucGPIO_ID; //return value, read from GPIO pins + UCHAR ucGPIOBitShift; //define which bit in uGPIOBitVal need to be update + UCHAR ucGPIOBitVal; //Set/Reset corresponding bit defined in ucGPIOBitMask + UCHAR ucAction; //=GPIO_PIN_WRITE: Read; =GPIO_PIN_READ: Write +}GPIO_PIN_CONTROL_PARAMETERS; + +typedef struct _ENABLE_SCALER_PARAMETERS +{ + UCHAR ucScaler; // ATOM_SCALER1, ATOM_SCALER2 + UCHAR ucEnable; // ATOM_SCALER_DISABLE or ATOM_SCALER_CENTER or ATOM_SCALER_EXPANSION + UCHAR ucTVStandard; // + UCHAR ucPadding[1]; +}ENABLE_SCALER_PARAMETERS; +#define ENABLE_SCALER_PS_ALLOCATION ENABLE_SCALER_PARAMETERS + +//ucEnable: +#define SCALER_BYPASS_AUTO_CENTER_NO_REPLICATION 0 +#define SCALER_BYPASS_AUTO_CENTER_AUTO_REPLICATION 1 +#define SCALER_ENABLE_2TAP_ALPHA_MODE 2 +#define SCALER_ENABLE_MULTITAP_MODE 3 + +typedef struct _ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS +{ + ULONG usHWIconHorzVertPosn; // Hardware Icon Vertical position + UCHAR ucHWIconVertOffset; // Hardware Icon Vertical offset + UCHAR ucHWIconHorzOffset; // Hardware Icon Horizontal offset + UCHAR ucSelection; // ATOM_CURSOR1 or ATOM_ICON1 or ATOM_CURSOR2 or ATOM_ICON2 + UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE +}ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS; + +typedef struct _ENABLE_HARDWARE_ICON_CURSOR_PS_ALLOCATION +{ + ENABLE_HARDWARE_ICON_CURSOR_PARAMETERS sEnableIcon; + ENABLE_CRTC_PARAMETERS sReserved; +}ENABLE_HARDWARE_ICON_CURSOR_PS_ALLOCATION; + +typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS +{ + USHORT usHight; // Image Hight + USHORT usWidth; // Image Width + UCHAR ucSurface; // Surface 1 or 2 + UCHAR ucPadding[3]; +}ENABLE_GRAPH_SURFACE_PARAMETERS; + +typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_2 +{ + USHORT usHight; // Image Hight + USHORT usWidth; // Image Width + UCHAR ucSurface; // Surface 1 or 2 + UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE + UCHAR ucPadding[2]; +}ENABLE_GRAPH_SURFACE_PARAMETERS_V1_2; + +typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_3 +{ + USHORT usHight; // Image Hight + USHORT usWidth; // Image Width + UCHAR ucSurface; // Surface 1 or 2 + UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE + USHORT usDeviceId; // Active Device Id for this surface. If no device, set to 0. +}ENABLE_GRAPH_SURFACE_PARAMETERS_V1_3; + +typedef struct _ENABLE_GRAPH_SURFACE_PARAMETERS_V1_4 +{ + USHORT usHight; // Image Hight + USHORT usWidth; // Image Width + USHORT usGraphPitch; + UCHAR ucColorDepth; + UCHAR ucPixelFormat; + UCHAR ucSurface; // Surface 1 or 2 + UCHAR ucEnable; // ATOM_ENABLE or ATOM_DISABLE + UCHAR ucModeType; + UCHAR ucReserved; +}ENABLE_GRAPH_SURFACE_PARAMETERS_V1_4; + +// ucEnable +#define ATOM_GRAPH_CONTROL_SET_PITCH 0x0f +#define ATOM_GRAPH_CONTROL_SET_DISP_START 0x10 + +typedef struct _ENABLE_GRAPH_SURFACE_PS_ALLOCATION +{ + ENABLE_GRAPH_SURFACE_PARAMETERS sSetSurface; + ENABLE_YUV_PS_ALLOCATION sReserved; // Don't set this one +}ENABLE_GRAPH_SURFACE_PS_ALLOCATION; + +typedef struct _MEMORY_CLEAN_UP_PARAMETERS +{ + USHORT usMemoryStart; //in 8Kb boundary, offset from memory base address + USHORT usMemorySize; //8Kb blocks aligned +}MEMORY_CLEAN_UP_PARAMETERS; +#define MEMORY_CLEAN_UP_PS_ALLOCATION MEMORY_CLEAN_UP_PARAMETERS + +typedef struct _GET_DISPLAY_SURFACE_SIZE_PARAMETERS +{ + USHORT usX_Size; //When use as input parameter, usX_Size indicates which CRTC + USHORT usY_Size; +}GET_DISPLAY_SURFACE_SIZE_PARAMETERS; + +typedef struct _GET_DISPLAY_SURFACE_SIZE_PARAMETERS_V2 +{ + union{ + USHORT usX_Size; //When use as input parameter, usX_Size indicates which CRTC + USHORT usSurface; + }; + USHORT usY_Size; + USHORT usDispXStart; + USHORT usDispYStart; +}GET_DISPLAY_SURFACE_SIZE_PARAMETERS_V2; + + +typedef struct _PALETTE_DATA_CONTROL_PARAMETERS_V3 +{ + UCHAR ucLutId; + UCHAR ucAction; + USHORT usLutStartIndex; + USHORT usLutLength; + USHORT usLutOffsetInVram; +}PALETTE_DATA_CONTROL_PARAMETERS_V3; + +// ucAction: +#define PALETTE_DATA_AUTO_FILL 1 +#define PALETTE_DATA_READ 2 +#define PALETTE_DATA_WRITE 3 + + +typedef struct _INTERRUPT_SERVICE_PARAMETERS_V2 +{ + UCHAR ucInterruptId; + UCHAR ucServiceId; + UCHAR ucStatus; + UCHAR ucReserved; +}INTERRUPT_SERVICE_PARAMETER_V2; + +// ucInterruptId +#define HDP1_INTERRUPT_ID 1 +#define HDP2_INTERRUPT_ID 2 +#define HDP3_INTERRUPT_ID 3 +#define HDP4_INTERRUPT_ID 4 +#define HDP5_INTERRUPT_ID 5 +#define HDP6_INTERRUPT_ID 6 +#define SW_INTERRUPT_ID 11 + +// ucAction +#define INTERRUPT_SERVICE_GEN_SW_INT 1 +#define INTERRUPT_SERVICE_GET_STATUS 2 + + // ucStatus +#define INTERRUPT_STATUS__INT_TRIGGER 1 +#define INTERRUPT_STATUS__HPD_HIGH 2 + +typedef struct _INDIRECT_IO_ACCESS +{ + ATOM_COMMON_TABLE_HEADER sHeader; + UCHAR IOAccessSequence[256]; +} INDIRECT_IO_ACCESS; + +#define INDIRECT_READ 0x00 +#define INDIRECT_WRITE 0x80 + +#define INDIRECT_IO_MM 0 +#define INDIRECT_IO_PLL 1 +#define INDIRECT_IO_MC 2 +#define INDIRECT_IO_PCIE 3 +#define INDIRECT_IO_PCIEP 4 +#define INDIRECT_IO_NBMISC 5 +#define INDIRECT_IO_SMU 5 + +#define INDIRECT_IO_PLL_READ INDIRECT_IO_PLL | INDIRECT_READ +#define INDIRECT_IO_PLL_WRITE INDIRECT_IO_PLL | INDIRECT_WRITE +#define INDIRECT_IO_MC_READ INDIRECT_IO_MC | INDIRECT_READ +#define INDIRECT_IO_MC_WRITE INDIRECT_IO_MC | INDIRECT_WRITE +#define INDIRECT_IO_PCIE_READ INDIRECT_IO_PCIE | INDIRECT_READ +#define INDIRECT_IO_PCIE_WRITE INDIRECT_IO_PCIE | INDIRECT_WRITE +#define INDIRECT_IO_PCIEP_READ INDIRECT_IO_PCIEP | INDIRECT_READ +#define INDIRECT_IO_PCIEP_WRITE INDIRECT_IO_PCIEP | INDIRECT_WRITE +#define INDIRECT_IO_NBMISC_READ INDIRECT_IO_NBMISC | INDIRECT_READ +#define INDIRECT_IO_NBMISC_WRITE INDIRECT_IO_NBMISC | INDIRECT_WRITE +#define INDIRECT_IO_SMU_READ INDIRECT_IO_SMU | INDIRECT_READ +#define INDIRECT_IO_SMU_WRITE INDIRECT_IO_SMU | INDIRECT_WRITE + +typedef struct _ATOM_OEM_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_I2C_ID_CONFIG_ACCESS sucI2cId; +}ATOM_OEM_INFO; + +typedef struct _ATOM_TV_MODE +{ + UCHAR ucVMode_Num; //Video mode number + UCHAR ucTV_Mode_Num; //Internal TV mode number +}ATOM_TV_MODE; + +typedef struct _ATOM_BIOS_INT_TVSTD_MODE +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usTV_Mode_LUT_Offset; // Pointer to standard to internal number conversion table + USHORT usTV_FIFO_Offset; // Pointer to FIFO entry table + USHORT usNTSC_Tbl_Offset; // Pointer to SDTV_Mode_NTSC table + USHORT usPAL_Tbl_Offset; // Pointer to SDTV_Mode_PAL table + USHORT usCV_Tbl_Offset; // Pointer to SDTV_Mode_PAL table +}ATOM_BIOS_INT_TVSTD_MODE; + + +typedef struct _ATOM_TV_MODE_SCALER_PTR +{ + USHORT ucFilter0_Offset; //Pointer to filter format 0 coefficients + USHORT usFilter1_Offset; //Pointer to filter format 0 coefficients + UCHAR ucTV_Mode_Num; +}ATOM_TV_MODE_SCALER_PTR; + +typedef struct _ATOM_STANDARD_VESA_TIMING +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_DTD_FORMAT aModeTimings[16]; // 16 is not the real array number, just for initial allocation +}ATOM_STANDARD_VESA_TIMING; + + +typedef struct _ATOM_STD_FORMAT +{ + USHORT usSTD_HDisp; + USHORT usSTD_VDisp; + USHORT usSTD_RefreshRate; + USHORT usReserved; +}ATOM_STD_FORMAT; + +typedef struct _ATOM_VESA_TO_EXTENDED_MODE +{ + USHORT usVESA_ModeNumber; + USHORT usExtendedModeNumber; +}ATOM_VESA_TO_EXTENDED_MODE; + +typedef struct _ATOM_VESA_TO_INTENAL_MODE_LUT +{ + ATOM_COMMON_TABLE_HEADER sHeader; + ATOM_VESA_TO_EXTENDED_MODE asVESA_ToExtendedModeInfo[76]; +}ATOM_VESA_TO_INTENAL_MODE_LUT; + +/*************** ATOM Memory Related Data Structure ***********************/ +typedef struct _ATOM_MEMORY_VENDOR_BLOCK{ + UCHAR ucMemoryType; + UCHAR ucMemoryVendor; + UCHAR ucAdjMCId; + UCHAR ucDynClkId; + ULONG ulDllResetClkRange; +}ATOM_MEMORY_VENDOR_BLOCK; + + +typedef struct _ATOM_MEMORY_SETTING_ID_CONFIG{ +#if ATOM_BIG_ENDIAN + ULONG ucMemBlkId:8; + ULONG ulMemClockRange:24; +#else + ULONG ulMemClockRange:24; + ULONG ucMemBlkId:8; +#endif +}ATOM_MEMORY_SETTING_ID_CONFIG; + +typedef union _ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS +{ + ATOM_MEMORY_SETTING_ID_CONFIG slAccess; + ULONG ulAccess; +}ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS; + + +typedef struct _ATOM_MEMORY_SETTING_DATA_BLOCK{ + ATOM_MEMORY_SETTING_ID_CONFIG_ACCESS ulMemoryID; + ULONG aulMemData[1]; +}ATOM_MEMORY_SETTING_DATA_BLOCK; + + +typedef struct _ATOM_INIT_REG_INDEX_FORMAT{ + USHORT usRegIndex; // MC register index + UCHAR ucPreRegDataLength; // offset in ATOM_INIT_REG_DATA_BLOCK.saRegDataBuf +}ATOM_INIT_REG_INDEX_FORMAT; + + +typedef struct _ATOM_INIT_REG_BLOCK{ + USHORT usRegIndexTblSize; //size of asRegIndexBuf + USHORT usRegDataBlkSize; //size of ATOM_MEMORY_SETTING_DATA_BLOCK + ATOM_INIT_REG_INDEX_FORMAT asRegIndexBuf[1]; + ATOM_MEMORY_SETTING_DATA_BLOCK asRegDataBuf[1]; +}ATOM_INIT_REG_BLOCK; + +#define END_OF_REG_INDEX_BLOCK 0x0ffff +#define END_OF_REG_DATA_BLOCK 0x00000000 +#define ATOM_INIT_REG_MASK_FLAG 0x80 //Not used in BIOS +#define CLOCK_RANGE_HIGHEST 0x00ffffff + +#define VALUE_DWORD SIZEOF ULONG +#define VALUE_SAME_AS_ABOVE 0 +#define VALUE_MASK_DWORD 0x84 + +#define INDEX_ACCESS_RANGE_BEGIN (VALUE_DWORD + 1) +#define INDEX_ACCESS_RANGE_END (INDEX_ACCESS_RANGE_BEGIN + 1) +#define VALUE_INDEX_ACCESS_SINGLE (INDEX_ACCESS_RANGE_END + 1) +//#define ACCESS_MCIODEBUGIND 0x40 //defined in BIOS code +#define ACCESS_PLACEHOLDER 0x80 + +typedef struct _ATOM_MC_INIT_PARAM_TABLE +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usAdjustARB_SEQDataOffset; + USHORT usMCInitMemTypeTblOffset; + USHORT usMCInitCommonTblOffset; + USHORT usMCInitPowerDownTblOffset; + ULONG ulARB_SEQDataBuf[32]; + ATOM_INIT_REG_BLOCK asMCInitMemType; + ATOM_INIT_REG_BLOCK asMCInitCommon; +}ATOM_MC_INIT_PARAM_TABLE; + + +#define _4Mx16 0x2 +#define _4Mx32 0x3 +#define _8Mx16 0x12 +#define _8Mx32 0x13 +#define _16Mx16 0x22 +#define _16Mx32 0x23 +#define _32Mx16 0x32 +#define _32Mx32 0x33 +#define _64Mx8 0x41 +#define _64Mx16 0x42 +#define _64Mx32 0x43 +#define _128Mx8 0x51 +#define _128Mx16 0x52 +#define _128Mx32 0x53 +#define _256Mx8 0x61 +#define _256Mx16 0x62 +#define _512Mx8 0x71 + +#define SAMSUNG 0x1 +#define INFINEON 0x2 +#define ELPIDA 0x3 +#define ETRON 0x4 +#define NANYA 0x5 +#define HYNIX 0x6 +#define MOSEL 0x7 +#define WINBOND 0x8 +#define ESMT 0x9 +#define MICRON 0xF + +#define QIMONDA INFINEON +#define PROMOS MOSEL +#define KRETON INFINEON +#define ELIXIR NANYA +#define MEZZA ELPIDA + + +/////////////Support for GDDR5 MC uCode to reside in upper 64K of ROM///////////// + +#define UCODE_ROM_START_ADDRESS 0x1b800 +#define UCODE_SIGNATURE 0x4375434d // 'MCuC' - MC uCode + +//uCode block header for reference + +typedef struct _MCuCodeHeader +{ + ULONG ulSignature; + UCHAR ucRevision; + UCHAR ucChecksum; + UCHAR ucReserved1; + UCHAR ucReserved2; + USHORT usParametersLength; + USHORT usUCodeLength; + USHORT usReserved1; + USHORT usReserved2; +} MCuCodeHeader; + +////////////////////////////////////////////////////////////////////////////////// + +#define ATOM_MAX_NUMBER_OF_VRAM_MODULE 16 + +#define ATOM_VRAM_MODULE_MEMORY_VENDOR_ID_MASK 0xF +typedef struct _ATOM_VRAM_MODULE_V1 +{ + ULONG ulReserved; + USHORT usEMRSValue; + USHORT usMRSValue; + USHORT usReserved; + UCHAR ucExtMemoryID; // An external indicator (by hardcode, callback or pin) to tell what is the current memory module + UCHAR ucMemoryType; // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] reserved; + UCHAR ucMemoryVenderID; // Predefined,never change across designs or memory type/vender + UCHAR ucMemoryDeviceCfg; // [7:4]=0x0:4M;=0x1:8M;=0x2:16M;0x3:32M....[3:0]=0x0:x4;=0x1:x8;=0x2:x16;=0x3:x32... + UCHAR ucRow; // Number of Row,in power of 2; + UCHAR ucColumn; // Number of Column,in power of 2; + UCHAR ucBank; // Nunber of Bank; + UCHAR ucRank; // Number of Rank, in power of 2 + UCHAR ucChannelNum; // Number of channel; + UCHAR ucChannelConfig; // [3:0]=Indication of what channel combination;[4:7]=Channel bit width, in number of 2 + UCHAR ucDefaultMVDDQ_ID; // Default MVDDQ setting for this memory block, ID linking to MVDDQ info table to find real set-up data; + UCHAR ucDefaultMVDDC_ID; // Default MVDDC setting for this memory block, ID linking to MVDDC info table to find real set-up data; + UCHAR ucReserved[2]; +}ATOM_VRAM_MODULE_V1; + + +typedef struct _ATOM_VRAM_MODULE_V2 +{ + ULONG ulReserved; + ULONG ulFlags; // To enable/disable functionalities based on memory type + ULONG ulEngineClock; // Override of default engine clock for particular memory type + ULONG ulMemoryClock; // Override of default memory clock for particular memory type + USHORT usEMRS2Value; // EMRS2 Value is used for GDDR2 and GDDR4 memory type + USHORT usEMRS3Value; // EMRS3 Value is used for GDDR2 and GDDR4 memory type + USHORT usEMRSValue; + USHORT usMRSValue; + USHORT usReserved; + UCHAR ucExtMemoryID; // An external indicator (by hardcode, callback or pin) to tell what is the current memory module + UCHAR ucMemoryType; // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] - must not be used for now; + UCHAR ucMemoryVenderID; // Predefined,never change across designs or memory type/vender. If not predefined, vendor detection table gets executed + UCHAR ucMemoryDeviceCfg; // [7:4]=0x0:4M;=0x1:8M;=0x2:16M;0x3:32M....[3:0]=0x0:x4;=0x1:x8;=0x2:x16;=0x3:x32... + UCHAR ucRow; // Number of Row,in power of 2; + UCHAR ucColumn; // Number of Column,in power of 2; + UCHAR ucBank; // Nunber of Bank; + UCHAR ucRank; // Number of Rank, in power of 2 + UCHAR ucChannelNum; // Number of channel; + UCHAR ucChannelConfig; // [3:0]=Indication of what channel combination;[4:7]=Channel bit width, in number of 2 + UCHAR ucDefaultMVDDQ_ID; // Default MVDDQ setting for this memory block, ID linking to MVDDQ info table to find real set-up data; + UCHAR ucDefaultMVDDC_ID; // Default MVDDC setting for this memory block, ID linking to MVDDC info table to find real set-up data; + UCHAR ucRefreshRateFactor; + UCHAR ucReserved[3]; +}ATOM_VRAM_MODULE_V2; + + +typedef struct _ATOM_MEMORY_TIMING_FORMAT +{ + ULONG ulClkRange; // memory clock in 10kHz unit, when target memory clock is below this clock, use this memory timing + union{ + USHORT usMRS; // mode register + USHORT usDDR3_MR0; + }; + union{ + USHORT usEMRS; // extended mode register + USHORT usDDR3_MR1; + }; + UCHAR ucCL; // CAS latency + UCHAR ucWL; // WRITE Latency + UCHAR uctRAS; // tRAS + UCHAR uctRC; // tRC + UCHAR uctRFC; // tRFC + UCHAR uctRCDR; // tRCDR + UCHAR uctRCDW; // tRCDW + UCHAR uctRP; // tRP + UCHAR uctRRD; // tRRD + UCHAR uctWR; // tWR + UCHAR uctWTR; // tWTR + UCHAR uctPDIX; // tPDIX + UCHAR uctFAW; // tFAW + UCHAR uctAOND; // tAOND + union + { + struct { + UCHAR ucflag; // flag to control memory timing calculation. bit0= control EMRS2 Infineon + UCHAR ucReserved; + }; + USHORT usDDR3_MR2; + }; +}ATOM_MEMORY_TIMING_FORMAT; + + +typedef struct _ATOM_MEMORY_TIMING_FORMAT_V1 +{ + ULONG ulClkRange; // memory clock in 10kHz unit, when target memory clock is below this clock, use this memory timing + USHORT usMRS; // mode register + USHORT usEMRS; // extended mode register + UCHAR ucCL; // CAS latency + UCHAR ucWL; // WRITE Latency + UCHAR uctRAS; // tRAS + UCHAR uctRC; // tRC + UCHAR uctRFC; // tRFC + UCHAR uctRCDR; // tRCDR + UCHAR uctRCDW; // tRCDW + UCHAR uctRP; // tRP + UCHAR uctRRD; // tRRD + UCHAR uctWR; // tWR + UCHAR uctWTR; // tWTR + UCHAR uctPDIX; // tPDIX + UCHAR uctFAW; // tFAW + UCHAR uctAOND; // tAOND + UCHAR ucflag; // flag to control memory timing calculation. bit0= control EMRS2 Infineon +////////////////////////////////////GDDR parameters/////////////////////////////////// + UCHAR uctCCDL; // + UCHAR uctCRCRL; // + UCHAR uctCRCWL; // + UCHAR uctCKE; // + UCHAR uctCKRSE; // + UCHAR uctCKRSX; // + UCHAR uctFAW32; // + UCHAR ucMR5lo; // + UCHAR ucMR5hi; // + UCHAR ucTerminator; +}ATOM_MEMORY_TIMING_FORMAT_V1; + +typedef struct _ATOM_MEMORY_TIMING_FORMAT_V2 +{ + ULONG ulClkRange; // memory clock in 10kHz unit, when target memory clock is below this clock, use this memory timing + USHORT usMRS; // mode register + USHORT usEMRS; // extended mode register + UCHAR ucCL; // CAS latency + UCHAR ucWL; // WRITE Latency + UCHAR uctRAS; // tRAS + UCHAR uctRC; // tRC + UCHAR uctRFC; // tRFC + UCHAR uctRCDR; // tRCDR + UCHAR uctRCDW; // tRCDW + UCHAR uctRP; // tRP + UCHAR uctRRD; // tRRD + UCHAR uctWR; // tWR + UCHAR uctWTR; // tWTR + UCHAR uctPDIX; // tPDIX + UCHAR uctFAW; // tFAW + UCHAR uctAOND; // tAOND + UCHAR ucflag; // flag to control memory timing calculation. bit0= control EMRS2 Infineon +////////////////////////////////////GDDR parameters/////////////////////////////////// + UCHAR uctCCDL; // + UCHAR uctCRCRL; // + UCHAR uctCRCWL; // + UCHAR uctCKE; // + UCHAR uctCKRSE; // + UCHAR uctCKRSX; // + UCHAR uctFAW32; // + UCHAR ucMR4lo; // + UCHAR ucMR4hi; // + UCHAR ucMR5lo; // + UCHAR ucMR5hi; // + UCHAR ucTerminator; + UCHAR ucReserved; +}ATOM_MEMORY_TIMING_FORMAT_V2; + +typedef struct _ATOM_MEMORY_FORMAT +{ + ULONG ulDllDisClock; // memory DLL will be disable when target memory clock is below this clock + union{ + USHORT usEMRS2Value; // EMRS2 Value is used for GDDR2 and GDDR4 memory type + USHORT usDDR3_Reserved; // Not used for DDR3 memory + }; + union{ + USHORT usEMRS3Value; // EMRS3 Value is used for GDDR2 and GDDR4 memory type + USHORT usDDR3_MR3; // Used for DDR3 memory + }; + UCHAR ucMemoryType; // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4;[3:0] - must not be used for now; + UCHAR ucMemoryVenderID; // Predefined,never change across designs or memory type/vender. If not predefined, vendor detection table gets executed + UCHAR ucRow; // Number of Row,in power of 2; + UCHAR ucColumn; // Number of Column,in power of 2; + UCHAR ucBank; // Nunber of Bank; + UCHAR ucRank; // Number of Rank, in power of 2 + UCHAR ucBurstSize; // burst size, 0= burst size=4 1= burst size=8 + UCHAR ucDllDisBit; // position of DLL Enable/Disable bit in EMRS ( Extended Mode Register ) + UCHAR ucRefreshRateFactor; // memory refresh rate in unit of ms + UCHAR ucDensity; // _8Mx32, _16Mx32, _16Mx16, _32Mx16 + UCHAR ucPreamble; //[7:4] Write Preamble, [3:0] Read Preamble + UCHAR ucMemAttrib; // Memory Device Addribute, like RDBI/WDBI etc + ATOM_MEMORY_TIMING_FORMAT asMemTiming[5]; //Memory Timing block sort from lower clock to higher clock +}ATOM_MEMORY_FORMAT; + + +typedef struct _ATOM_VRAM_MODULE_V3 +{ + ULONG ulChannelMapCfg; // board dependent paramenter:Channel combination + USHORT usSize; // size of ATOM_VRAM_MODULE_V3 + USHORT usDefaultMVDDQ; // board dependent parameter:Default Memory Core Voltage + USHORT usDefaultMVDDC; // board dependent parameter:Default Memory IO Voltage + UCHAR ucExtMemoryID; // An external indicator (by hardcode, callback or pin) to tell what is the current memory module + UCHAR ucChannelNum; // board dependent parameter:Number of channel; + UCHAR ucChannelSize; // board dependent parameter:32bit or 64bit + UCHAR ucVREFI; // board dependnt parameter: EXT or INT +160mv to -140mv + UCHAR ucNPL_RT; // board dependent parameter:NPL round trip delay, used for calculate memory timing parameters + UCHAR ucFlag; // To enable/disable functionalities based on memory type + ATOM_MEMORY_FORMAT asMemory; // describ all of video memory parameters from memory spec +}ATOM_VRAM_MODULE_V3; + + +//ATOM_VRAM_MODULE_V3.ucNPL_RT +#define NPL_RT_MASK 0x0f +#define BATTERY_ODT_MASK 0xc0 + +#define ATOM_VRAM_MODULE ATOM_VRAM_MODULE_V3 + +typedef struct _ATOM_VRAM_MODULE_V4 +{ + ULONG ulChannelMapCfg; // board dependent parameter: Channel combination + USHORT usModuleSize; // size of ATOM_VRAM_MODULE_V4, make it easy for VBIOS to look for next entry of VRAM_MODULE + USHORT usPrivateReserved; // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! + // MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS) + USHORT usReserved; + UCHAR ucExtMemoryID; // An external indicator (by hardcode, callback or pin) to tell what is the current memory module + UCHAR ucMemoryType; // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4; 0x5:DDR5 [3:0] - Must be 0x0 for now; + UCHAR ucChannelNum; // Number of channels present in this module config + UCHAR ucChannelWidth; // 0 - 32 bits; 1 - 64 bits + UCHAR ucDensity; // _8Mx32, _16Mx32, _16Mx16, _32Mx16 + UCHAR ucFlag; // To enable/disable functionalities based on memory type + UCHAR ucMisc; // bit0: 0 - single rank; 1 - dual rank; bit2: 0 - burstlength 4, 1 - burstlength 8 + UCHAR ucVREFI; // board dependent parameter + UCHAR ucNPL_RT; // board dependent parameter:NPL round trip delay, used for calculate memory timing parameters + UCHAR ucPreamble; // [7:4] Write Preamble, [3:0] Read Preamble + UCHAR ucMemorySize; // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! + // Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros + UCHAR ucReserved[3]; + +//compare with V3, we flat the struct by merging ATOM_MEMORY_FORMAT (as is) into V4 as the same level + union{ + USHORT usEMRS2Value; // EMRS2 Value is used for GDDR2 and GDDR4 memory type + USHORT usDDR3_Reserved; + }; + union{ + USHORT usEMRS3Value; // EMRS3 Value is used for GDDR2 and GDDR4 memory type + USHORT usDDR3_MR3; // Used for DDR3 memory + }; + UCHAR ucMemoryVenderID; // Predefined, If not predefined, vendor detection table gets executed + UCHAR ucRefreshRateFactor; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms) + UCHAR ucReserved2[2]; + ATOM_MEMORY_TIMING_FORMAT asMemTiming[5];//Memory Timing block sort from lower clock to higher clock +}ATOM_VRAM_MODULE_V4; + +#define VRAM_MODULE_V4_MISC_RANK_MASK 0x3 +#define VRAM_MODULE_V4_MISC_DUAL_RANK 0x1 +#define VRAM_MODULE_V4_MISC_BL_MASK 0x4 +#define VRAM_MODULE_V4_MISC_BL8 0x4 +#define VRAM_MODULE_V4_MISC_DUAL_CS 0x10 + +typedef struct _ATOM_VRAM_MODULE_V5 +{ + ULONG ulChannelMapCfg; // board dependent parameter: Channel combination + USHORT usModuleSize; // size of ATOM_VRAM_MODULE_V4, make it easy for VBIOS to look for next entry of VRAM_MODULE + USHORT usPrivateReserved; // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! + // MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS) + USHORT usReserved; + UCHAR ucExtMemoryID; // An external indicator (by hardcode, callback or pin) to tell what is the current memory module + UCHAR ucMemoryType; // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4; 0x5:DDR5 [3:0] - Must be 0x0 for now; + UCHAR ucChannelNum; // Number of channels present in this module config + UCHAR ucChannelWidth; // 0 - 32 bits; 1 - 64 bits + UCHAR ucDensity; // _8Mx32, _16Mx32, _16Mx16, _32Mx16 + UCHAR ucFlag; // To enable/disable functionalities based on memory type + UCHAR ucMisc; // bit0: 0 - single rank; 1 - dual rank; bit2: 0 - burstlength 4, 1 - burstlength 8 + UCHAR ucVREFI; // board dependent parameter + UCHAR ucNPL_RT; // board dependent parameter:NPL round trip delay, used for calculate memory timing parameters + UCHAR ucPreamble; // [7:4] Write Preamble, [3:0] Read Preamble + UCHAR ucMemorySize; // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! + // Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros + UCHAR ucReserved[3]; + +//compare with V3, we flat the struct by merging ATOM_MEMORY_FORMAT (as is) into V4 as the same level + USHORT usEMRS2Value; // EMRS2 Value is used for GDDR2 and GDDR4 memory type + USHORT usEMRS3Value; // EMRS3 Value is used for GDDR2 and GDDR4 memory type + UCHAR ucMemoryVenderID; // Predefined, If not predefined, vendor detection table gets executed + UCHAR ucRefreshRateFactor; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms) + UCHAR ucFIFODepth; // FIFO depth supposes to be detected during vendor detection, but if we dont do vendor detection we have to hardcode FIFO Depth + UCHAR ucCDR_Bandwidth; // [0:3]=Read CDR bandwidth, [4:7] - Write CDR Bandwidth + ATOM_MEMORY_TIMING_FORMAT_V1 asMemTiming[5];//Memory Timing block sort from lower clock to higher clock +}ATOM_VRAM_MODULE_V5; + +typedef struct _ATOM_VRAM_MODULE_V6 +{ + ULONG ulChannelMapCfg; // board dependent parameter: Channel combination + USHORT usModuleSize; // size of ATOM_VRAM_MODULE_V4, make it easy for VBIOS to look for next entry of VRAM_MODULE + USHORT usPrivateReserved; // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! + // MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS) + USHORT usReserved; + UCHAR ucExtMemoryID; // An external indicator (by hardcode, callback or pin) to tell what is the current memory module + UCHAR ucMemoryType; // [7:4]=0x1:DDR1;=0x2:DDR2;=0x3:DDR3;=0x4:DDR4; 0x5:DDR5 [3:0] - Must be 0x0 for now; + UCHAR ucChannelNum; // Number of channels present in this module config + UCHAR ucChannelWidth; // 0 - 32 bits; 1 - 64 bits + UCHAR ucDensity; // _8Mx32, _16Mx32, _16Mx16, _32Mx16 + UCHAR ucFlag; // To enable/disable functionalities based on memory type + UCHAR ucMisc; // bit0: 0 - single rank; 1 - dual rank; bit2: 0 - burstlength 4, 1 - burstlength 8 + UCHAR ucVREFI; // board dependent parameter + UCHAR ucNPL_RT; // board dependent parameter:NPL round trip delay, used for calculate memory timing parameters + UCHAR ucPreamble; // [7:4] Write Preamble, [3:0] Read Preamble + UCHAR ucMemorySize; // BIOS internal reserved space to optimize code size, updated by the compiler, shouldn't be modified manually!! + // Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros + UCHAR ucReserved[3]; + +//compare with V3, we flat the struct by merging ATOM_MEMORY_FORMAT (as is) into V4 as the same level + USHORT usEMRS2Value; // EMRS2 Value is used for GDDR2 and GDDR4 memory type + USHORT usEMRS3Value; // EMRS3 Value is used for GDDR2 and GDDR4 memory type + UCHAR ucMemoryVenderID; // Predefined, If not predefined, vendor detection table gets executed + UCHAR ucRefreshRateFactor; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms) + UCHAR ucFIFODepth; // FIFO depth supposes to be detected during vendor detection, but if we dont do vendor detection we have to hardcode FIFO Depth + UCHAR ucCDR_Bandwidth; // [0:3]=Read CDR bandwidth, [4:7] - Write CDR Bandwidth + ATOM_MEMORY_TIMING_FORMAT_V2 asMemTiming[5];//Memory Timing block sort from lower clock to higher clock +}ATOM_VRAM_MODULE_V6; + +typedef struct _ATOM_VRAM_MODULE_V7 +{ +// Design Specific Values + ULONG ulChannelMapCfg; // mmMC_SHARED_CHREMAP + USHORT usModuleSize; // Size of ATOM_VRAM_MODULE_V7 + USHORT usPrivateReserved; // MC_ARB_RAMCFG (includes NOOFBANK,NOOFRANKS,NOOFROWS,NOOFCOLS) + USHORT usEnableChannels; // bit vector which indicate which channels are enabled + UCHAR ucExtMemoryID; // Current memory module ID + UCHAR ucMemoryType; // MEM_TYPE_DDR2/DDR3/GDDR3/GDDR5 + UCHAR ucChannelNum; // Number of mem. channels supported in this module + UCHAR ucChannelWidth; // CHANNEL_16BIT/CHANNEL_32BIT/CHANNEL_64BIT + UCHAR ucDensity; // _8Mx32, _16Mx32, _16Mx16, _32Mx16 + UCHAR ucReserve; // Former container for Mx_FLAGS like DBI_AC_MODE_ENABLE_ASIC for GDDR4. Not used now. + UCHAR ucMisc; // RANK_OF_THISMEMORY etc. + UCHAR ucVREFI; // Not used. + UCHAR ucNPL_RT; // Round trip delay (MC_SEQ_CAS_TIMING [28:24]:TCL=CL+NPL_RT-2). Always 2. + UCHAR ucPreamble; // [7:4] Write Preamble, [3:0] Read Preamble + UCHAR ucMemorySize; // Total memory size in unit of 16MB for CONFIG_MEMSIZE - bit[23:0] zeros + USHORT usSEQSettingOffset; + UCHAR ucReserved; +// Memory Module specific values + USHORT usEMRS2Value; // EMRS2/MR2 Value. + USHORT usEMRS3Value; // EMRS3/MR3 Value. + UCHAR ucMemoryVenderID; // [7:4] Revision, [3:0] Vendor code + UCHAR ucRefreshRateFactor; // [1:0]=RefreshFactor (00=8ms, 01=16ms, 10=32ms,11=64ms) + UCHAR ucFIFODepth; // FIFO depth can be detected during vendor detection, here is hardcoded per memory + UCHAR ucCDR_Bandwidth; // [0:3]=Read CDR bandwidth, [4:7] - Write CDR Bandwidth + char strMemPNString[20]; // part number end with '0'. +}ATOM_VRAM_MODULE_V7; + +typedef struct _ATOM_VRAM_INFO_V2 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + UCHAR ucNumOfVRAMModule; + ATOM_VRAM_MODULE aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE]; // just for allocation, real number of blocks is in ucNumOfVRAMModule; +}ATOM_VRAM_INFO_V2; + +typedef struct _ATOM_VRAM_INFO_V3 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usMemAdjustTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting + USHORT usMemClkPatchTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting + USHORT usRerseved; + UCHAR aVID_PinsShift[9]; // 8 bit strap maximum+terminator + UCHAR ucNumOfVRAMModule; + ATOM_VRAM_MODULE aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE]; // just for allocation, real number of blocks is in ucNumOfVRAMModule; + ATOM_INIT_REG_BLOCK asMemPatch; // for allocation + // ATOM_INIT_REG_BLOCK aMemAdjust; +}ATOM_VRAM_INFO_V3; + +#define ATOM_VRAM_INFO_LAST ATOM_VRAM_INFO_V3 + +typedef struct _ATOM_VRAM_INFO_V4 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usMemAdjustTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting + USHORT usMemClkPatchTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting + USHORT usRerseved; + UCHAR ucMemDQ7_0ByteRemap; // DQ line byte remap, =0: Memory Data line BYTE0, =1: BYTE1, =2: BYTE2, =3: BYTE3 + ULONG ulMemDQ7_0BitRemap; // each DQ line ( 7~0) use 3bits, like: DQ0=Bit[2:0], DQ1:[5:3], ... DQ7:[23:21] + UCHAR ucReservde[4]; + UCHAR ucNumOfVRAMModule; + ATOM_VRAM_MODULE_V4 aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE]; // just for allocation, real number of blocks is in ucNumOfVRAMModule; + ATOM_INIT_REG_BLOCK asMemPatch; // for allocation + // ATOM_INIT_REG_BLOCK aMemAdjust; +}ATOM_VRAM_INFO_V4; + +typedef struct _ATOM_VRAM_INFO_HEADER_V2_1 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usMemAdjustTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory vendor specific MC adjust setting + USHORT usMemClkPatchTblOffset; // offset of ATOM_INIT_REG_BLOCK structure for memory clock specific MC setting + USHORT usPerBytePresetOffset; // offset of ATOM_INIT_REG_BLOCK structure for Per Byte Offset Preset Settings + USHORT usReserved[3]; + UCHAR ucNumOfVRAMModule; // indicate number of VRAM module + UCHAR ucMemoryClkPatchTblVer; // version of memory AC timing register list + UCHAR ucVramModuleVer; // indicate ATOM_VRAM_MODUE version + UCHAR ucReserved; + ATOM_VRAM_MODULE_V7 aVramInfo[ATOM_MAX_NUMBER_OF_VRAM_MODULE]; // just for allocation, real number of blocks is in ucNumOfVRAMModule; +}ATOM_VRAM_INFO_HEADER_V2_1; + + +typedef struct _ATOM_VRAM_GPIO_DETECTION_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + UCHAR aVID_PinsShift[9]; //8 bit strap maximum+terminator +}ATOM_VRAM_GPIO_DETECTION_INFO; + + +typedef struct _ATOM_MEMORY_TRAINING_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + UCHAR ucTrainingLoop; + UCHAR ucReserved[3]; + ATOM_INIT_REG_BLOCK asMemTrainingSetting; +}ATOM_MEMORY_TRAINING_INFO; + + +typedef struct SW_I2C_CNTL_DATA_PARAMETERS +{ + UCHAR ucControl; + UCHAR ucData; + UCHAR ucSatus; + UCHAR ucTemp; +} SW_I2C_CNTL_DATA_PARAMETERS; + +#define SW_I2C_CNTL_DATA_PS_ALLOCATION SW_I2C_CNTL_DATA_PARAMETERS + +typedef struct _SW_I2C_IO_DATA_PARAMETERS +{ + USHORT GPIO_Info; + UCHAR ucAct; + UCHAR ucData; + } SW_I2C_IO_DATA_PARAMETERS; + +#define SW_I2C_IO_DATA_PS_ALLOCATION SW_I2C_IO_DATA_PARAMETERS + +/****************************SW I2C CNTL DEFINITIONS**********************/ +#define SW_I2C_IO_RESET 0 +#define SW_I2C_IO_GET 1 +#define SW_I2C_IO_DRIVE 2 +#define SW_I2C_IO_SET 3 +#define SW_I2C_IO_START 4 + +#define SW_I2C_IO_CLOCK 0 +#define SW_I2C_IO_DATA 0x80 + +#define SW_I2C_IO_ZERO 0 +#define SW_I2C_IO_ONE 0x100 + +#define SW_I2C_CNTL_READ 0 +#define SW_I2C_CNTL_WRITE 1 +#define SW_I2C_CNTL_START 2 +#define SW_I2C_CNTL_STOP 3 +#define SW_I2C_CNTL_OPEN 4 +#define SW_I2C_CNTL_CLOSE 5 +#define SW_I2C_CNTL_WRITE1BIT 6 + +//==============================VESA definition Portion=============================== +#define VESA_OEM_PRODUCT_REV "01.00" +#define VESA_MODE_ATTRIBUTE_MODE_SUPPORT 0xBB //refer to VBE spec p.32, no TTY support +#define VESA_MODE_WIN_ATTRIBUTE 7 +#define VESA_WIN_SIZE 64 + +typedef struct _PTR_32_BIT_STRUCTURE +{ + USHORT Offset16; + USHORT Segment16; +} PTR_32_BIT_STRUCTURE; + +typedef union _PTR_32_BIT_UNION +{ + PTR_32_BIT_STRUCTURE SegmentOffset; + ULONG Ptr32_Bit; +} PTR_32_BIT_UNION; + +typedef struct _VBE_1_2_INFO_BLOCK_UPDATABLE +{ + UCHAR VbeSignature[4]; + USHORT VbeVersion; + PTR_32_BIT_UNION OemStringPtr; + UCHAR Capabilities[4]; + PTR_32_BIT_UNION VideoModePtr; + USHORT TotalMemory; +} VBE_1_2_INFO_BLOCK_UPDATABLE; + + +typedef struct _VBE_2_0_INFO_BLOCK_UPDATABLE +{ + VBE_1_2_INFO_BLOCK_UPDATABLE CommonBlock; + USHORT OemSoftRev; + PTR_32_BIT_UNION OemVendorNamePtr; + PTR_32_BIT_UNION OemProductNamePtr; + PTR_32_BIT_UNION OemProductRevPtr; +} VBE_2_0_INFO_BLOCK_UPDATABLE; + +typedef union _VBE_VERSION_UNION +{ + VBE_2_0_INFO_BLOCK_UPDATABLE VBE_2_0_InfoBlock; + VBE_1_2_INFO_BLOCK_UPDATABLE VBE_1_2_InfoBlock; +} VBE_VERSION_UNION; + +typedef struct _VBE_INFO_BLOCK +{ + VBE_VERSION_UNION UpdatableVBE_Info; + UCHAR Reserved[222]; + UCHAR OemData[256]; +} VBE_INFO_BLOCK; + +typedef struct _VBE_FP_INFO +{ + USHORT HSize; + USHORT VSize; + USHORT FPType; + UCHAR RedBPP; + UCHAR GreenBPP; + UCHAR BlueBPP; + UCHAR ReservedBPP; + ULONG RsvdOffScrnMemSize; + ULONG RsvdOffScrnMEmPtr; + UCHAR Reserved[14]; +} VBE_FP_INFO; + +typedef struct _VESA_MODE_INFO_BLOCK +{ +// Mandatory information for all VBE revisions + USHORT ModeAttributes; // dw ? ; mode attributes + UCHAR WinAAttributes; // db ? ; window A attributes + UCHAR WinBAttributes; // db ? ; window B attributes + USHORT WinGranularity; // dw ? ; window granularity + USHORT WinSize; // dw ? ; window size + USHORT WinASegment; // dw ? ; window A start segment + USHORT WinBSegment; // dw ? ; window B start segment + ULONG WinFuncPtr; // dd ? ; real mode pointer to window function + USHORT BytesPerScanLine;// dw ? ; bytes per scan line + +//; Mandatory information for VBE 1.2 and above + USHORT XResolution; // dw ? ; horizontal resolution in pixels or characters + USHORT YResolution; // dw ? ; vertical resolution in pixels or characters + UCHAR XCharSize; // db ? ; character cell width in pixels + UCHAR YCharSize; // db ? ; character cell height in pixels + UCHAR NumberOfPlanes; // db ? ; number of memory planes + UCHAR BitsPerPixel; // db ? ; bits per pixel + UCHAR NumberOfBanks; // db ? ; number of banks + UCHAR MemoryModel; // db ? ; memory model type + UCHAR BankSize; // db ? ; bank size in KB + UCHAR NumberOfImagePages;// db ? ; number of images + UCHAR ReservedForPageFunction;//db 1 ; reserved for page function + +//; Direct Color fields(required for direct/6 and YUV/7 memory models) + UCHAR RedMaskSize; // db ? ; size of direct color red mask in bits + UCHAR RedFieldPosition; // db ? ; bit position of lsb of red mask + UCHAR GreenMaskSize; // db ? ; size of direct color green mask in bits + UCHAR GreenFieldPosition; // db ? ; bit position of lsb of green mask + UCHAR BlueMaskSize; // db ? ; size of direct color blue mask in bits + UCHAR BlueFieldPosition; // db ? ; bit position of lsb of blue mask + UCHAR RsvdMaskSize; // db ? ; size of direct color reserved mask in bits + UCHAR RsvdFieldPosition; // db ? ; bit position of lsb of reserved mask + UCHAR DirectColorModeInfo;// db ? ; direct color mode attributes + +//; Mandatory information for VBE 2.0 and above + ULONG PhysBasePtr; // dd ? ; physical address for flat memory frame buffer + ULONG Reserved_1; // dd 0 ; reserved - always set to 0 + USHORT Reserved_2; // dw 0 ; reserved - always set to 0 + +//; Mandatory information for VBE 3.0 and above + USHORT LinBytesPerScanLine; // dw ? ; bytes per scan line for linear modes + UCHAR BnkNumberOfImagePages;// db ? ; number of images for banked modes + UCHAR LinNumberOfImagPages; // db ? ; number of images for linear modes + UCHAR LinRedMaskSize; // db ? ; size of direct color red mask(linear modes) + UCHAR LinRedFieldPosition; // db ? ; bit position of lsb of red mask(linear modes) + UCHAR LinGreenMaskSize; // db ? ; size of direct color green mask(linear modes) + UCHAR LinGreenFieldPosition;// db ? ; bit position of lsb of green mask(linear modes) + UCHAR LinBlueMaskSize; // db ? ; size of direct color blue mask(linear modes) + UCHAR LinBlueFieldPosition; // db ? ; bit position of lsb of blue mask(linear modes) + UCHAR LinRsvdMaskSize; // db ? ; size of direct color reserved mask(linear modes) + UCHAR LinRsvdFieldPosition; // db ? ; bit position of lsb of reserved mask(linear modes) + ULONG MaxPixelClock; // dd ? ; maximum pixel clock(in Hz) for graphics mode + UCHAR Reserved; // db 190 dup (0) +} VESA_MODE_INFO_BLOCK; + +// BIOS function CALLS +#define ATOM_BIOS_EXTENDED_FUNCTION_CODE 0xA0 // ATI Extended Function code +#define ATOM_BIOS_FUNCTION_COP_MODE 0x00 +#define ATOM_BIOS_FUNCTION_SHORT_QUERY1 0x04 +#define ATOM_BIOS_FUNCTION_SHORT_QUERY2 0x05 +#define ATOM_BIOS_FUNCTION_SHORT_QUERY3 0x06 +#define ATOM_BIOS_FUNCTION_GET_DDC 0x0B +#define ATOM_BIOS_FUNCTION_ASIC_DSTATE 0x0E +#define ATOM_BIOS_FUNCTION_DEBUG_PLAY 0x0F +#define ATOM_BIOS_FUNCTION_STV_STD 0x16 +#define ATOM_BIOS_FUNCTION_DEVICE_DET 0x17 +#define ATOM_BIOS_FUNCTION_DEVICE_SWITCH 0x18 + +#define ATOM_BIOS_FUNCTION_PANEL_CONTROL 0x82 +#define ATOM_BIOS_FUNCTION_OLD_DEVICE_DET 0x83 +#define ATOM_BIOS_FUNCTION_OLD_DEVICE_SWITCH 0x84 +#define ATOM_BIOS_FUNCTION_HW_ICON 0x8A +#define ATOM_BIOS_FUNCTION_SET_CMOS 0x8B +#define SUB_FUNCTION_UPDATE_DISPLAY_INFO 0x8000 // Sub function 80 +#define SUB_FUNCTION_UPDATE_EXPANSION_INFO 0x8100 // Sub function 80 + +#define ATOM_BIOS_FUNCTION_DISPLAY_INFO 0x8D +#define ATOM_BIOS_FUNCTION_DEVICE_ON_OFF 0x8E +#define ATOM_BIOS_FUNCTION_VIDEO_STATE 0x8F +#define ATOM_SUB_FUNCTION_GET_CRITICAL_STATE 0x0300 // Sub function 03 +#define ATOM_SUB_FUNCTION_GET_LIDSTATE 0x0700 // Sub function 7 +#define ATOM_SUB_FUNCTION_THERMAL_STATE_NOTICE 0x1400 // Notify caller the current thermal state +#define ATOM_SUB_FUNCTION_CRITICAL_STATE_NOTICE 0x8300 // Notify caller the current critical state +#define ATOM_SUB_FUNCTION_SET_LIDSTATE 0x8500 // Sub function 85 +#define ATOM_SUB_FUNCTION_GET_REQ_DISPLAY_FROM_SBIOS_MODE 0x8900// Sub function 89 +#define ATOM_SUB_FUNCTION_INFORM_ADC_SUPPORT 0x9400 // Notify caller that ADC is supported + + +#define ATOM_BIOS_FUNCTION_VESA_DPMS 0x4F10 // Set DPMS +#define ATOM_SUB_FUNCTION_SET_DPMS 0x0001 // BL: Sub function 01 +#define ATOM_SUB_FUNCTION_GET_DPMS 0x0002 // BL: Sub function 02 +#define ATOM_PARAMETER_VESA_DPMS_ON 0x0000 // BH Parameter for DPMS ON. +#define ATOM_PARAMETER_VESA_DPMS_STANDBY 0x0100 // BH Parameter for DPMS STANDBY +#define ATOM_PARAMETER_VESA_DPMS_SUSPEND 0x0200 // BH Parameter for DPMS SUSPEND +#define ATOM_PARAMETER_VESA_DPMS_OFF 0x0400 // BH Parameter for DPMS OFF +#define ATOM_PARAMETER_VESA_DPMS_REDUCE_ON 0x0800 // BH Parameter for DPMS REDUCE ON (NOT SUPPORTED) + +#define ATOM_BIOS_RETURN_CODE_MASK 0x0000FF00L +#define ATOM_BIOS_REG_HIGH_MASK 0x0000FF00L +#define ATOM_BIOS_REG_LOW_MASK 0x000000FFL + +// structure used for VBIOS only + +//DispOutInfoTable +typedef struct _ASIC_TRANSMITTER_INFO +{ + USHORT usTransmitterObjId; + USHORT usSupportDevice; + UCHAR ucTransmitterCmdTblId; + UCHAR ucConfig; + UCHAR ucEncoderID; //available 1st encoder ( default ) + UCHAR ucOptionEncoderID; //available 2nd encoder ( optional ) + UCHAR uc2ndEncoderID; + UCHAR ucReserved; +}ASIC_TRANSMITTER_INFO; + +#define ASIC_TRANSMITTER_INFO_CONFIG__DVO_SDR_MODE 0x01 +#define ASIC_TRANSMITTER_INFO_CONFIG__COHERENT_MODE 0x02 +#define ASIC_TRANSMITTER_INFO_CONFIG__ENCODEROBJ_ID_MASK 0xc4 +#define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_A 0x00 +#define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_B 0x04 +#define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_C 0x40 +#define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_D 0x44 +#define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_E 0x80 +#define ASIC_TRANSMITTER_INFO_CONFIG__ENCODER_F 0x84 + +typedef struct _ASIC_ENCODER_INFO +{ + UCHAR ucEncoderID; + UCHAR ucEncoderConfig; + USHORT usEncoderCmdTblId; +}ASIC_ENCODER_INFO; + +typedef struct _ATOM_DISP_OUT_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT ptrTransmitterInfo; + USHORT ptrEncoderInfo; + ASIC_TRANSMITTER_INFO asTransmitterInfo[1]; + ASIC_ENCODER_INFO asEncoderInfo[1]; +}ATOM_DISP_OUT_INFO; + +typedef struct _ATOM_DISP_OUT_INFO_V2 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT ptrTransmitterInfo; + USHORT ptrEncoderInfo; + USHORT ptrMainCallParserFar; // direct address of main parser call in VBIOS binary. + ASIC_TRANSMITTER_INFO asTransmitterInfo[1]; + ASIC_ENCODER_INFO asEncoderInfo[1]; +}ATOM_DISP_OUT_INFO_V2; + + +typedef struct _ATOM_DISP_CLOCK_ID { + UCHAR ucPpllId; + UCHAR ucPpllAttribute; +}ATOM_DISP_CLOCK_ID; + +// ucPpllAttribute +#define CLOCK_SOURCE_SHAREABLE 0x01 +#define CLOCK_SOURCE_DP_MODE 0x02 +#define CLOCK_SOURCE_NONE_DP_MODE 0x04 + +//DispOutInfoTable +typedef struct _ASIC_TRANSMITTER_INFO_V2 +{ + USHORT usTransmitterObjId; + USHORT usDispClkIdOffset; // point to clock source id list supported by Encoder Object + UCHAR ucTransmitterCmdTblId; + UCHAR ucConfig; + UCHAR ucEncoderID; // available 1st encoder ( default ) + UCHAR ucOptionEncoderID; // available 2nd encoder ( optional ) + UCHAR uc2ndEncoderID; + UCHAR ucReserved; +}ASIC_TRANSMITTER_INFO_V2; + +typedef struct _ATOM_DISP_OUT_INFO_V3 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT ptrTransmitterInfo; + USHORT ptrEncoderInfo; + USHORT ptrMainCallParserFar; // direct address of main parser call in VBIOS binary. + USHORT usReserved; + UCHAR ucDCERevision; + UCHAR ucMaxDispEngineNum; + UCHAR ucMaxActiveDispEngineNum; + UCHAR ucMaxPPLLNum; + UCHAR ucCoreRefClkSource; // value of CORE_REF_CLK_SOURCE + UCHAR ucDispCaps; + UCHAR ucReserved[2]; + ASIC_TRANSMITTER_INFO_V2 asTransmitterInfo[1]; // for alligment only +}ATOM_DISP_OUT_INFO_V3; + +//ucDispCaps +#define DISPLAY_CAPS__DP_PCLK_FROM_PPLL 0x01 +#define DISPLAY_CAPS__FORCE_DISPDEV_CONNECTED 0x02 + +typedef enum CORE_REF_CLK_SOURCE{ + CLOCK_SRC_XTALIN=0, + CLOCK_SRC_XO_IN=1, + CLOCK_SRC_XO_IN2=2, +}CORE_REF_CLK_SOURCE; + +// DispDevicePriorityInfo +typedef struct _ATOM_DISPLAY_DEVICE_PRIORITY_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT asDevicePriority[16]; +}ATOM_DISPLAY_DEVICE_PRIORITY_INFO; + +//ProcessAuxChannelTransactionTable +typedef struct _PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS +{ + USHORT lpAuxRequest; + USHORT lpDataOut; + UCHAR ucChannelID; + union + { + UCHAR ucReplyStatus; + UCHAR ucDelay; + }; + UCHAR ucDataOutLen; + UCHAR ucReserved; +}PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS; + +//ProcessAuxChannelTransactionTable +typedef struct _PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS_V2 +{ + USHORT lpAuxRequest; + USHORT lpDataOut; + UCHAR ucChannelID; + union + { + UCHAR ucReplyStatus; + UCHAR ucDelay; + }; + UCHAR ucDataOutLen; + UCHAR ucHPD_ID; //=0: HPD1, =1: HPD2, =2: HPD3, =3: HPD4, =4: HPD5, =5: HPD6 +}PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS_V2; + +#define PROCESS_AUX_CHANNEL_TRANSACTION_PS_ALLOCATION PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS + +//GetSinkType + +typedef struct _DP_ENCODER_SERVICE_PARAMETERS +{ + USHORT ucLinkClock; + union + { + UCHAR ucConfig; // for DP training command + UCHAR ucI2cId; // use for GET_SINK_TYPE command + }; + UCHAR ucAction; + UCHAR ucStatus; + UCHAR ucLaneNum; + UCHAR ucReserved[2]; +}DP_ENCODER_SERVICE_PARAMETERS; + +// ucAction +#define ATOM_DP_ACTION_GET_SINK_TYPE 0x01 +/* obselete */ +#define ATOM_DP_ACTION_TRAINING_START 0x02 +#define ATOM_DP_ACTION_TRAINING_COMPLETE 0x03 +#define ATOM_DP_ACTION_TRAINING_PATTERN_SEL 0x04 +#define ATOM_DP_ACTION_SET_VSWING_PREEMP 0x05 +#define ATOM_DP_ACTION_GET_VSWING_PREEMP 0x06 +#define ATOM_DP_ACTION_BLANKING 0x07 + +// ucConfig +#define ATOM_DP_CONFIG_ENCODER_SEL_MASK 0x03 +#define ATOM_DP_CONFIG_DIG1_ENCODER 0x00 +#define ATOM_DP_CONFIG_DIG2_ENCODER 0x01 +#define ATOM_DP_CONFIG_EXTERNAL_ENCODER 0x02 +#define ATOM_DP_CONFIG_LINK_SEL_MASK 0x04 +#define ATOM_DP_CONFIG_LINK_A 0x00 +#define ATOM_DP_CONFIG_LINK_B 0x04 +/* /obselete */ +#define DP_ENCODER_SERVICE_PS_ALLOCATION WRITE_ONE_BYTE_HW_I2C_DATA_PARAMETERS + + +typedef struct _DP_ENCODER_SERVICE_PARAMETERS_V2 +{ + USHORT usExtEncoderObjId; // External Encoder Object Id, output parameter only, use when ucAction = DP_SERVICE_V2_ACTION_DET_EXT_CONNECTION + UCHAR ucAuxId; + UCHAR ucAction; + UCHAR ucSinkType; // Iput and Output parameters. + UCHAR ucHPDId; // Input parameter, used when ucAction = DP_SERVICE_V2_ACTION_DET_EXT_CONNECTION + UCHAR ucReserved[2]; +}DP_ENCODER_SERVICE_PARAMETERS_V2; + +typedef struct _DP_ENCODER_SERVICE_PS_ALLOCATION_V2 +{ + DP_ENCODER_SERVICE_PARAMETERS_V2 asDPServiceParam; + PROCESS_AUX_CHANNEL_TRANSACTION_PARAMETERS_V2 asAuxParam; +}DP_ENCODER_SERVICE_PS_ALLOCATION_V2; + +// ucAction +#define DP_SERVICE_V2_ACTION_GET_SINK_TYPE 0x01 +#define DP_SERVICE_V2_ACTION_DET_LCD_CONNECTION 0x02 + + +// DP_TRAINING_TABLE +#define DPCD_SET_LINKRATE_LANENUM_PATTERN1_TBL_ADDR ATOM_DP_TRAINING_TBL_ADDR +#define DPCD_SET_SS_CNTL_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 8 ) +#define DPCD_SET_LANE_VSWING_PREEMP_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 16 ) +#define DPCD_SET_TRAINING_PATTERN0_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 24 ) +#define DPCD_SET_TRAINING_PATTERN2_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 32) +#define DPCD_GET_LINKRATE_LANENUM_SS_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 40) +#define DPCD_GET_LANE_STATUS_ADJUST_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 48) +#define DP_I2C_AUX_DDC_WRITE_START_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 60) +#define DP_I2C_AUX_DDC_WRITE_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 64) +#define DP_I2C_AUX_DDC_READ_START_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 72) +#define DP_I2C_AUX_DDC_READ_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 76) +#define DP_I2C_AUX_DDC_WRITE_END_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 80) +#define DP_I2C_AUX_DDC_READ_END_TBL_ADDR (ATOM_DP_TRAINING_TBL_ADDR + 84) + +typedef struct _PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS +{ + UCHAR ucI2CSpeed; + union + { + UCHAR ucRegIndex; + UCHAR ucStatus; + }; + USHORT lpI2CDataOut; + UCHAR ucFlag; + UCHAR ucTransBytes; + UCHAR ucSlaveAddr; + UCHAR ucLineNumber; +}PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS; + +#define PROCESS_I2C_CHANNEL_TRANSACTION_PS_ALLOCATION PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS + +//ucFlag +#define HW_I2C_WRITE 1 +#define HW_I2C_READ 0 +#define I2C_2BYTE_ADDR 0x02 + +/****************************************************************************/ +// Structures used by HW_Misc_OperationTable +/****************************************************************************/ +typedef struct _ATOM_HW_MISC_OPERATION_INPUT_PARAMETER_V1_1 +{ + UCHAR ucCmd; // Input: To tell which action to take + UCHAR ucReserved[3]; + ULONG ulReserved; +}ATOM_HW_MISC_OPERATION_INPUT_PARAMETER_V1_1; + +typedef struct _ATOM_HW_MISC_OPERATION_OUTPUT_PARAMETER_V1_1 +{ + UCHAR ucReturnCode; // Output: Return value base on action was taken + UCHAR ucReserved[3]; + ULONG ulReserved; +}ATOM_HW_MISC_OPERATION_OUTPUT_PARAMETER_V1_1; + +// Actions code +#define ATOM_GET_SDI_SUPPORT 0xF0 + +// Return code +#define ATOM_UNKNOWN_CMD 0 +#define ATOM_FEATURE_NOT_SUPPORTED 1 +#define ATOM_FEATURE_SUPPORTED 2 + +typedef struct _ATOM_HW_MISC_OPERATION_PS_ALLOCATION +{ + ATOM_HW_MISC_OPERATION_INPUT_PARAMETER_V1_1 sInput_Output; + PROCESS_I2C_CHANNEL_TRANSACTION_PARAMETERS sReserved; +}ATOM_HW_MISC_OPERATION_PS_ALLOCATION; + +/****************************************************************************/ + +typedef struct _SET_HWBLOCK_INSTANCE_PARAMETER_V2 +{ + UCHAR ucHWBlkInst; // HW block instance, 0, 1, 2, ... + UCHAR ucReserved[3]; +}SET_HWBLOCK_INSTANCE_PARAMETER_V2; + +#define HWBLKINST_INSTANCE_MASK 0x07 +#define HWBLKINST_HWBLK_MASK 0xF0 +#define HWBLKINST_HWBLK_SHIFT 0x04 + +//ucHWBlock +#define SELECT_DISP_ENGINE 0 +#define SELECT_DISP_PLL 1 +#define SELECT_DCIO_UNIPHY_LINK0 2 +#define SELECT_DCIO_UNIPHY_LINK1 3 +#define SELECT_DCIO_IMPCAL 4 +#define SELECT_DCIO_DIG 6 +#define SELECT_CRTC_PIXEL_RATE 7 +#define SELECT_VGA_BLK 8 + +// DIGTransmitterInfoTable structure used to program UNIPHY settings +typedef struct _DIG_TRANSMITTER_INFO_HEADER_V3_1{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usDPVsPreEmphSettingOffset; // offset of PHY_ANALOG_SETTING_INFO * with DP Voltage Swing and Pre-Emphasis for each Link clock + USHORT usPhyAnalogRegListOffset; // offset of CLOCK_CONDITION_REGESTER_INFO* with None-DP mode Analog Setting's register Info + USHORT usPhyAnalogSettingOffset; // offset of CLOCK_CONDITION_SETTING_ENTRY* with None-DP mode Analog Setting for each link clock range + USHORT usPhyPllRegListOffset; // offset of CLOCK_CONDITION_REGESTER_INFO* with Phy Pll register Info + USHORT usPhyPllSettingOffset; // offset of CLOCK_CONDITION_SETTING_ENTRY* with Phy Pll Settings +}DIG_TRANSMITTER_INFO_HEADER_V3_1; + +typedef struct _DIG_TRANSMITTER_INFO_HEADER_V3_2{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usDPVsPreEmphSettingOffset; // offset of PHY_ANALOG_SETTING_INFO * with DP Voltage Swing and Pre-Emphasis for each Link clock + USHORT usPhyAnalogRegListOffset; // offset of CLOCK_CONDITION_REGESTER_INFO* with None-DP mode Analog Setting's register Info + USHORT usPhyAnalogSettingOffset; // offset of CLOCK_CONDITION_SETTING_ENTRY* with None-DP mode Analog Setting for each link clock range + USHORT usPhyPllRegListOffset; // offset of CLOCK_CONDITION_REGESTER_INFO* with Phy Pll register Info + USHORT usPhyPllSettingOffset; // offset of CLOCK_CONDITION_SETTING_ENTRY* with Phy Pll Settings + USHORT usDPSSRegListOffset; // offset of CLOCK_CONDITION_REGESTER_INFO* with Phy SS Pll register Info + USHORT usDPSSSettingOffset; // offset of CLOCK_CONDITION_SETTING_ENTRY* with Phy SS Pll Settings +}DIG_TRANSMITTER_INFO_HEADER_V3_2; + +typedef struct _CLOCK_CONDITION_REGESTER_INFO{ + USHORT usRegisterIndex; + UCHAR ucStartBit; + UCHAR ucEndBit; +}CLOCK_CONDITION_REGESTER_INFO; + +typedef struct _CLOCK_CONDITION_SETTING_ENTRY{ + USHORT usMaxClockFreq; + UCHAR ucEncodeMode; + UCHAR ucPhySel; + ULONG ulAnalogSetting[1]; +}CLOCK_CONDITION_SETTING_ENTRY; + +typedef struct _CLOCK_CONDITION_SETTING_INFO{ + USHORT usEntrySize; + CLOCK_CONDITION_SETTING_ENTRY asClkCondSettingEntry[1]; +}CLOCK_CONDITION_SETTING_INFO; + +typedef struct _PHY_CONDITION_REG_VAL{ + ULONG ulCondition; + ULONG ulRegVal; +}PHY_CONDITION_REG_VAL; + +typedef struct _PHY_CONDITION_REG_VAL_V2{ + ULONG ulCondition; + UCHAR ucCondition2; + ULONG ulRegVal; +}PHY_CONDITION_REG_VAL_V2; + +typedef struct _PHY_CONDITION_REG_INFO{ + USHORT usRegIndex; + USHORT usSize; + PHY_CONDITION_REG_VAL asRegVal[1]; +}PHY_CONDITION_REG_INFO; + +typedef struct _PHY_CONDITION_REG_INFO_V2{ + USHORT usRegIndex; + USHORT usSize; + PHY_CONDITION_REG_VAL_V2 asRegVal[1]; +}PHY_CONDITION_REG_INFO_V2; + +typedef struct _PHY_ANALOG_SETTING_INFO{ + UCHAR ucEncodeMode; + UCHAR ucPhySel; + USHORT usSize; + PHY_CONDITION_REG_INFO asAnalogSetting[1]; +}PHY_ANALOG_SETTING_INFO; + +typedef struct _PHY_ANALOG_SETTING_INFO_V2{ + UCHAR ucEncodeMode; + UCHAR ucPhySel; + USHORT usSize; + PHY_CONDITION_REG_INFO_V2 asAnalogSetting[1]; +}PHY_ANALOG_SETTING_INFO_V2; + +typedef struct _GFX_HAVESTING_PARAMETERS { + UCHAR ucGfxBlkId; //GFX blk id to be harvested, like CU, RB or PRIM + UCHAR ucReserved; //reserved + UCHAR ucActiveUnitNumPerSH; //requested active CU/RB/PRIM number per shader array + UCHAR ucMaxUnitNumPerSH; //max CU/RB/PRIM number per shader array +} GFX_HAVESTING_PARAMETERS; + +//ucGfxBlkId +#define GFX_HARVESTING_CU_ID 0 +#define GFX_HARVESTING_RB_ID 1 +#define GFX_HARVESTING_PRIM_ID 2 + +/****************************************************************************/ +//Portion VI: Definitinos for vbios MC scratch registers that driver used +/****************************************************************************/ + +#define MC_MISC0__MEMORY_TYPE_MASK 0xF0000000 +#define MC_MISC0__MEMORY_TYPE__GDDR1 0x10000000 +#define MC_MISC0__MEMORY_TYPE__DDR2 0x20000000 +#define MC_MISC0__MEMORY_TYPE__GDDR3 0x30000000 +#define MC_MISC0__MEMORY_TYPE__GDDR4 0x40000000 +#define MC_MISC0__MEMORY_TYPE__GDDR5 0x50000000 +#define MC_MISC0__MEMORY_TYPE__HBM 0x60000000 +#define MC_MISC0__MEMORY_TYPE__DDR3 0xB0000000 + +#define ATOM_MEM_TYPE_DDR_STRING "DDR" +#define ATOM_MEM_TYPE_DDR2_STRING "DDR2" +#define ATOM_MEM_TYPE_GDDR3_STRING "GDDR3" +#define ATOM_MEM_TYPE_GDDR4_STRING "GDDR4" +#define ATOM_MEM_TYPE_GDDR5_STRING "GDDR5" +#define ATOM_MEM_TYPE_HBM_STRING "HBM" +#define ATOM_MEM_TYPE_DDR3_STRING "DDR3" + +/****************************************************************************/ +//Portion VI: Definitinos being oboselete +/****************************************************************************/ + +//========================================================================================== +//Remove the definitions below when driver is ready! +typedef struct _ATOM_DAC_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usMaxFrequency; // in 10kHz unit + USHORT usReserved; +}ATOM_DAC_INFO; + + +typedef struct _COMPASSIONATE_DATA +{ + ATOM_COMMON_TABLE_HEADER sHeader; + + //============================== DAC1 portion + UCHAR ucDAC1_BG_Adjustment; + UCHAR ucDAC1_DAC_Adjustment; + USHORT usDAC1_FORCE_Data; + //============================== DAC2 portion + UCHAR ucDAC2_CRT2_BG_Adjustment; + UCHAR ucDAC2_CRT2_DAC_Adjustment; + USHORT usDAC2_CRT2_FORCE_Data; + USHORT usDAC2_CRT2_MUX_RegisterIndex; + UCHAR ucDAC2_CRT2_MUX_RegisterInfo; //Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low + UCHAR ucDAC2_NTSC_BG_Adjustment; + UCHAR ucDAC2_NTSC_DAC_Adjustment; + USHORT usDAC2_TV1_FORCE_Data; + USHORT usDAC2_TV1_MUX_RegisterIndex; + UCHAR ucDAC2_TV1_MUX_RegisterInfo; //Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low + UCHAR ucDAC2_CV_BG_Adjustment; + UCHAR ucDAC2_CV_DAC_Adjustment; + USHORT usDAC2_CV_FORCE_Data; + USHORT usDAC2_CV_MUX_RegisterIndex; + UCHAR ucDAC2_CV_MUX_RegisterInfo; //Bit[4:0]=Bit position,Bit[7]=1:Active High;=0 Active Low + UCHAR ucDAC2_PAL_BG_Adjustment; + UCHAR ucDAC2_PAL_DAC_Adjustment; + USHORT usDAC2_TV2_FORCE_Data; +}COMPASSIONATE_DATA; + +/****************************Supported Device Info Table Definitions**********************/ +// ucConnectInfo: +// [7:4] - connector type +// = 1 - VGA connector +// = 2 - DVI-I +// = 3 - DVI-D +// = 4 - DVI-A +// = 5 - SVIDEO +// = 6 - COMPOSITE +// = 7 - LVDS +// = 8 - DIGITAL LINK +// = 9 - SCART +// = 0xA - HDMI_type A +// = 0xB - HDMI_type B +// = 0xE - Special case1 (DVI+DIN) +// Others=TBD +// [3:0] - DAC Associated +// = 0 - no DAC +// = 1 - DACA +// = 2 - DACB +// = 3 - External DAC +// Others=TBD +// + +typedef struct _ATOM_CONNECTOR_INFO +{ +#if ATOM_BIG_ENDIAN + UCHAR bfConnectorType:4; + UCHAR bfAssociatedDAC:4; +#else + UCHAR bfAssociatedDAC:4; + UCHAR bfConnectorType:4; +#endif +}ATOM_CONNECTOR_INFO; + +typedef union _ATOM_CONNECTOR_INFO_ACCESS +{ + ATOM_CONNECTOR_INFO sbfAccess; + UCHAR ucAccess; +}ATOM_CONNECTOR_INFO_ACCESS; + +typedef struct _ATOM_CONNECTOR_INFO_I2C +{ + ATOM_CONNECTOR_INFO_ACCESS sucConnectorInfo; + ATOM_I2C_ID_CONFIG_ACCESS sucI2cId; +}ATOM_CONNECTOR_INFO_I2C; + + +typedef struct _ATOM_SUPPORTED_DEVICES_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usDeviceSupport; + ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO]; +}ATOM_SUPPORTED_DEVICES_INFO; + +#define NO_INT_SRC_MAPPED 0xFF + +typedef struct _ATOM_CONNECTOR_INC_SRC_BITMAP +{ + UCHAR ucIntSrcBitmap; +}ATOM_CONNECTOR_INC_SRC_BITMAP; + +typedef struct _ATOM_SUPPORTED_DEVICES_INFO_2 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usDeviceSupport; + ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO_2]; + ATOM_CONNECTOR_INC_SRC_BITMAP asIntSrcInfo[ATOM_MAX_SUPPORTED_DEVICE_INFO_2]; +}ATOM_SUPPORTED_DEVICES_INFO_2; + +typedef struct _ATOM_SUPPORTED_DEVICES_INFO_2d1 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usDeviceSupport; + ATOM_CONNECTOR_INFO_I2C asConnInfo[ATOM_MAX_SUPPORTED_DEVICE]; + ATOM_CONNECTOR_INC_SRC_BITMAP asIntSrcInfo[ATOM_MAX_SUPPORTED_DEVICE]; +}ATOM_SUPPORTED_DEVICES_INFO_2d1; + +#define ATOM_SUPPORTED_DEVICES_INFO_LAST ATOM_SUPPORTED_DEVICES_INFO_2d1 + + +typedef struct _ATOM_MISC_CONTROL_INFO +{ + USHORT usFrequency; + UCHAR ucPLL_ChargePump; // PLL charge-pump gain control + UCHAR ucPLL_DutyCycle; // PLL duty cycle control + UCHAR ucPLL_VCO_Gain; // PLL VCO gain control + UCHAR ucPLL_VoltageSwing; // PLL driver voltage swing control +}ATOM_MISC_CONTROL_INFO; + + +#define ATOM_MAX_MISC_INFO 4 + +typedef struct _ATOM_TMDS_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usMaxFrequency; // in 10Khz + ATOM_MISC_CONTROL_INFO asMiscInfo[ATOM_MAX_MISC_INFO]; +}ATOM_TMDS_INFO; + + +typedef struct _ATOM_ENCODER_ANALOG_ATTRIBUTE +{ + UCHAR ucTVStandard; //Same as TV standards defined above, + UCHAR ucPadding[1]; +}ATOM_ENCODER_ANALOG_ATTRIBUTE; + +typedef struct _ATOM_ENCODER_DIGITAL_ATTRIBUTE +{ + UCHAR ucAttribute; //Same as other digital encoder attributes defined above + UCHAR ucPadding[1]; +}ATOM_ENCODER_DIGITAL_ATTRIBUTE; + +typedef union _ATOM_ENCODER_ATTRIBUTE +{ + ATOM_ENCODER_ANALOG_ATTRIBUTE sAlgAttrib; + ATOM_ENCODER_DIGITAL_ATTRIBUTE sDigAttrib; +}ATOM_ENCODER_ATTRIBUTE; + + +typedef struct _DVO_ENCODER_CONTROL_PARAMETERS +{ + USHORT usPixelClock; + USHORT usEncoderID; + UCHAR ucDeviceType; //Use ATOM_DEVICE_xxx1_Index to indicate device type only. + UCHAR ucAction; //ATOM_ENABLE/ATOM_DISABLE/ATOM_HPD_INIT + ATOM_ENCODER_ATTRIBUTE usDevAttr; +}DVO_ENCODER_CONTROL_PARAMETERS; + +typedef struct _DVO_ENCODER_CONTROL_PS_ALLOCATION +{ + DVO_ENCODER_CONTROL_PARAMETERS sDVOEncoder; + WRITE_ONE_BYTE_HW_I2C_DATA_PS_ALLOCATION sReserved; //Caller doesn't need to init this portion +}DVO_ENCODER_CONTROL_PS_ALLOCATION; + + +#define ATOM_XTMDS_ASIC_SI164_ID 1 +#define ATOM_XTMDS_ASIC_SI178_ID 2 +#define ATOM_XTMDS_ASIC_TFP513_ID 3 +#define ATOM_XTMDS_SUPPORTED_SINGLELINK 0x00000001 +#define ATOM_XTMDS_SUPPORTED_DUALLINK 0x00000002 +#define ATOM_XTMDS_MVPU_FPGA 0x00000004 + + +typedef struct _ATOM_XTMDS_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + USHORT usSingleLinkMaxFrequency; + ATOM_I2C_ID_CONFIG_ACCESS sucI2cId; //Point the ID on which I2C is used to control external chip + UCHAR ucXtransimitterID; + UCHAR ucSupportedLink; // Bit field, bit0=1, single link supported;bit1=1,dual link supported + UCHAR ucSequnceAlterID; // Even with the same external TMDS asic, it's possible that the program seqence alters + // due to design. This ID is used to alert driver that the sequence is not "standard"! + UCHAR ucMasterAddress; // Address to control Master xTMDS Chip + UCHAR ucSlaveAddress; // Address to control Slave xTMDS Chip +}ATOM_XTMDS_INFO; + +typedef struct _DFP_DPMS_STATUS_CHANGE_PARAMETERS +{ + UCHAR ucEnable; // ATOM_ENABLE=On or ATOM_DISABLE=Off + UCHAR ucDevice; // ATOM_DEVICE_DFP1_INDEX.... + UCHAR ucPadding[2]; +}DFP_DPMS_STATUS_CHANGE_PARAMETERS; + +/****************************Legacy Power Play Table Definitions **********************/ + +//Definitions for ulPowerPlayMiscInfo +#define ATOM_PM_MISCINFO_SPLIT_CLOCK 0x00000000L +#define ATOM_PM_MISCINFO_USING_MCLK_SRC 0x00000001L +#define ATOM_PM_MISCINFO_USING_SCLK_SRC 0x00000002L + +#define ATOM_PM_MISCINFO_VOLTAGE_DROP_SUPPORT 0x00000004L +#define ATOM_PM_MISCINFO_VOLTAGE_DROP_ACTIVE_HIGH 0x00000008L + +#define ATOM_PM_MISCINFO_LOAD_PERFORMANCE_EN 0x00000010L + +#define ATOM_PM_MISCINFO_ENGINE_CLOCK_CONTRL_EN 0x00000020L +#define ATOM_PM_MISCINFO_MEMORY_CLOCK_CONTRL_EN 0x00000040L +#define ATOM_PM_MISCINFO_PROGRAM_VOLTAGE 0x00000080L //When this bit set, ucVoltageDropIndex is not an index for GPIO pin, but a voltage ID that SW needs program + +#define ATOM_PM_MISCINFO_ASIC_REDUCED_SPEED_SCLK_EN 0x00000100L +#define ATOM_PM_MISCINFO_ASIC_DYNAMIC_VOLTAGE_EN 0x00000200L +#define ATOM_PM_MISCINFO_ASIC_SLEEP_MODE_EN 0x00000400L +#define ATOM_PM_MISCINFO_LOAD_BALANCE_EN 0x00000800L +#define ATOM_PM_MISCINFO_DEFAULT_DC_STATE_ENTRY_TRUE 0x00001000L +#define ATOM_PM_MISCINFO_DEFAULT_LOW_DC_STATE_ENTRY_TRUE 0x00002000L +#define ATOM_PM_MISCINFO_LOW_LCD_REFRESH_RATE 0x00004000L + +#define ATOM_PM_MISCINFO_DRIVER_DEFAULT_MODE 0x00008000L +#define ATOM_PM_MISCINFO_OVER_CLOCK_MODE 0x00010000L +#define ATOM_PM_MISCINFO_OVER_DRIVE_MODE 0x00020000L +#define ATOM_PM_MISCINFO_POWER_SAVING_MODE 0x00040000L +#define ATOM_PM_MISCINFO_THERMAL_DIODE_MODE 0x00080000L + +#define ATOM_PM_MISCINFO_FRAME_MODULATION_MASK 0x00300000L //0-FM Disable, 1-2 level FM, 2-4 level FM, 3-Reserved +#define ATOM_PM_MISCINFO_FRAME_MODULATION_SHIFT 20 + +#define ATOM_PM_MISCINFO_DYN_CLK_3D_IDLE 0x00400000L +#define ATOM_PM_MISCINFO_DYNAMIC_CLOCK_DIVIDER_BY_2 0x00800000L +#define ATOM_PM_MISCINFO_DYNAMIC_CLOCK_DIVIDER_BY_4 0x01000000L +#define ATOM_PM_MISCINFO_DYNAMIC_HDP_BLOCK_EN 0x02000000L //When set, Dynamic +#define ATOM_PM_MISCINFO_DYNAMIC_MC_HOST_BLOCK_EN 0x04000000L //When set, Dynamic +#define ATOM_PM_MISCINFO_3D_ACCELERATION_EN 0x08000000L //When set, This mode is for acceleated 3D mode + +#define ATOM_PM_MISCINFO_POWERPLAY_SETTINGS_GROUP_MASK 0x70000000L //1-Optimal Battery Life Group, 2-High Battery, 3-Balanced, 4-High Performance, 5- Optimal Performance (Default state with Default clocks) +#define ATOM_PM_MISCINFO_POWERPLAY_SETTINGS_GROUP_SHIFT 28 +#define ATOM_PM_MISCINFO_ENABLE_BACK_BIAS 0x80000000L + +#define ATOM_PM_MISCINFO2_SYSTEM_AC_LITE_MODE 0x00000001L +#define ATOM_PM_MISCINFO2_MULTI_DISPLAY_SUPPORT 0x00000002L +#define ATOM_PM_MISCINFO2_DYNAMIC_BACK_BIAS_EN 0x00000004L +#define ATOM_PM_MISCINFO2_FS3D_OVERDRIVE_INFO 0x00000008L +#define ATOM_PM_MISCINFO2_FORCEDLOWPWR_MODE 0x00000010L +#define ATOM_PM_MISCINFO2_VDDCI_DYNAMIC_VOLTAGE_EN 0x00000020L +#define ATOM_PM_MISCINFO2_VIDEO_PLAYBACK_CAPABLE 0x00000040L //If this bit is set in multi-pp mode, then driver will pack up one with the minior power consumption. + //If it's not set in any pp mode, driver will use its default logic to pick a pp mode in video playback +#define ATOM_PM_MISCINFO2_NOT_VALID_ON_DC 0x00000080L +#define ATOM_PM_MISCINFO2_STUTTER_MODE_EN 0x00000100L +#define ATOM_PM_MISCINFO2_UVD_SUPPORT_MODE 0x00000200L + +//ucTableFormatRevision=1 +//ucTableContentRevision=1 +typedef struct _ATOM_POWERMODE_INFO +{ + ULONG ulMiscInfo; //The power level should be arranged in ascending order + ULONG ulReserved1; // must set to 0 + ULONG ulReserved2; // must set to 0 + USHORT usEngineClock; + USHORT usMemoryClock; + UCHAR ucVoltageDropIndex; // index to GPIO table + UCHAR ucSelectedPanel_RefreshRate;// panel refresh rate + UCHAR ucMinTemperature; + UCHAR ucMaxTemperature; + UCHAR ucNumPciELanes; // number of PCIE lanes +}ATOM_POWERMODE_INFO; + +//ucTableFormatRevision=2 +//ucTableContentRevision=1 +typedef struct _ATOM_POWERMODE_INFO_V2 +{ + ULONG ulMiscInfo; //The power level should be arranged in ascending order + ULONG ulMiscInfo2; + ULONG ulEngineClock; + ULONG ulMemoryClock; + UCHAR ucVoltageDropIndex; // index to GPIO table + UCHAR ucSelectedPanel_RefreshRate;// panel refresh rate + UCHAR ucMinTemperature; + UCHAR ucMaxTemperature; + UCHAR ucNumPciELanes; // number of PCIE lanes +}ATOM_POWERMODE_INFO_V2; + +//ucTableFormatRevision=2 +//ucTableContentRevision=2 +typedef struct _ATOM_POWERMODE_INFO_V3 +{ + ULONG ulMiscInfo; //The power level should be arranged in ascending order + ULONG ulMiscInfo2; + ULONG ulEngineClock; + ULONG ulMemoryClock; + UCHAR ucVoltageDropIndex; // index to Core (VDDC) votage table + UCHAR ucSelectedPanel_RefreshRate;// panel refresh rate + UCHAR ucMinTemperature; + UCHAR ucMaxTemperature; + UCHAR ucNumPciELanes; // number of PCIE lanes + UCHAR ucVDDCI_VoltageDropIndex; // index to VDDCI votage table +}ATOM_POWERMODE_INFO_V3; + + +#define ATOM_MAX_NUMBEROF_POWER_BLOCK 8 + +#define ATOM_PP_OVERDRIVE_INTBITMAP_AUXWIN 0x01 +#define ATOM_PP_OVERDRIVE_INTBITMAP_OVERDRIVE 0x02 + +#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_LM63 0x01 +#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ADM1032 0x02 +#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ADM1030 0x03 +#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_MUA6649 0x04 +#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_LM64 0x05 +#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_F75375 0x06 +#define ATOM_PP_OVERDRIVE_THERMALCONTROLLER_ASC7512 0x07 // Andigilog + + +typedef struct _ATOM_POWERPLAY_INFO +{ + ATOM_COMMON_TABLE_HEADER sHeader; + UCHAR ucOverdriveThermalController; + UCHAR ucOverdriveI2cLine; + UCHAR ucOverdriveIntBitmap; + UCHAR ucOverdriveControllerAddress; + UCHAR ucSizeOfPowerModeEntry; + UCHAR ucNumOfPowerModeEntries; + ATOM_POWERMODE_INFO asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK]; +}ATOM_POWERPLAY_INFO; + +typedef struct _ATOM_POWERPLAY_INFO_V2 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + UCHAR ucOverdriveThermalController; + UCHAR ucOverdriveI2cLine; + UCHAR ucOverdriveIntBitmap; + UCHAR ucOverdriveControllerAddress; + UCHAR ucSizeOfPowerModeEntry; + UCHAR ucNumOfPowerModeEntries; + ATOM_POWERMODE_INFO_V2 asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK]; +}ATOM_POWERPLAY_INFO_V2; + +typedef struct _ATOM_POWERPLAY_INFO_V3 +{ + ATOM_COMMON_TABLE_HEADER sHeader; + UCHAR ucOverdriveThermalController; + UCHAR ucOverdriveI2cLine; + UCHAR ucOverdriveIntBitmap; + UCHAR ucOverdriveControllerAddress; + UCHAR ucSizeOfPowerModeEntry; + UCHAR ucNumOfPowerModeEntries; + ATOM_POWERMODE_INFO_V3 asPowerPlayInfo[ATOM_MAX_NUMBEROF_POWER_BLOCK]; +}ATOM_POWERPLAY_INFO_V3; + + +// Following definitions are for compatibility issue in different SW components. +#define ATOM_MASTER_DATA_TABLE_REVISION 0x01 +#define Object_Info Object_Header +#define AdjustARB_SEQ MC_InitParameter +#define VRAM_GPIO_DetectionInfo VoltageObjectInfo +#define ASIC_VDDCI_Info ASIC_ProfilingInfo +#define ASIC_MVDDQ_Info MemoryTrainingInfo +#define SS_Info PPLL_SS_Info +#define ASIC_MVDDC_Info ASIC_InternalSS_Info +#define DispDevicePriorityInfo SaveRestoreInfo +#define DispOutInfo TV_VideoMode + + +#define ATOM_ENCODER_OBJECT_TABLE ATOM_OBJECT_TABLE +#define ATOM_CONNECTOR_OBJECT_TABLE ATOM_OBJECT_TABLE + +//New device naming, remove them when both DAL/VBIOS is ready +#define DFP2I_OUTPUT_CONTROL_PARAMETERS CRT1_OUTPUT_CONTROL_PARAMETERS +#define DFP2I_OUTPUT_CONTROL_PS_ALLOCATION DFP2I_OUTPUT_CONTROL_PARAMETERS + +#define DFP1X_OUTPUT_CONTROL_PARAMETERS CRT1_OUTPUT_CONTROL_PARAMETERS +#define DFP1X_OUTPUT_CONTROL_PS_ALLOCATION DFP1X_OUTPUT_CONTROL_PARAMETERS + +#define DFP1I_OUTPUT_CONTROL_PARAMETERS DFP1_OUTPUT_CONTROL_PARAMETERS +#define DFP1I_OUTPUT_CONTROL_PS_ALLOCATION DFP1_OUTPUT_CONTROL_PS_ALLOCATION + +#define ATOM_DEVICE_DFP1I_SUPPORT ATOM_DEVICE_DFP1_SUPPORT +#define ATOM_DEVICE_DFP1X_SUPPORT ATOM_DEVICE_DFP2_SUPPORT + +#define ATOM_DEVICE_DFP1I_INDEX ATOM_DEVICE_DFP1_INDEX +#define ATOM_DEVICE_DFP1X_INDEX ATOM_DEVICE_DFP2_INDEX + +#define ATOM_DEVICE_DFP2I_INDEX 0x00000009 +#define ATOM_DEVICE_DFP2I_SUPPORT (0x1L << ATOM_DEVICE_DFP2I_INDEX) + +#define ATOM_S0_DFP1I ATOM_S0_DFP1 +#define ATOM_S0_DFP1X ATOM_S0_DFP2 + +#define ATOM_S0_DFP2I 0x00200000L +#define ATOM_S0_DFP2Ib2 0x20 + +#define ATOM_S2_DFP1I_DPMS_STATE ATOM_S2_DFP1_DPMS_STATE +#define ATOM_S2_DFP1X_DPMS_STATE ATOM_S2_DFP2_DPMS_STATE + +#define ATOM_S2_DFP2I_DPMS_STATE 0x02000000L +#define ATOM_S2_DFP2I_DPMS_STATEb3 0x02 + +#define ATOM_S3_DFP2I_ACTIVEb1 0x02 + +#define ATOM_S3_DFP1I_ACTIVE ATOM_S3_DFP1_ACTIVE +#define ATOM_S3_DFP1X_ACTIVE ATOM_S3_DFP2_ACTIVE + +#define ATOM_S3_DFP2I_ACTIVE 0x00000200L + +#define ATOM_S3_DFP1I_CRTC_ACTIVE ATOM_S3_DFP1_CRTC_ACTIVE +#define ATOM_S3_DFP1X_CRTC_ACTIVE ATOM_S3_DFP2_CRTC_ACTIVE +#define ATOM_S3_DFP2I_CRTC_ACTIVE 0x02000000L + +#define ATOM_S3_DFP2I_CRTC_ACTIVEb3 0x02 +#define ATOM_S5_DOS_REQ_DFP2Ib1 0x02 + +#define ATOM_S5_DOS_REQ_DFP2I 0x0200 +#define ATOM_S6_ACC_REQ_DFP1I ATOM_S6_ACC_REQ_DFP1 +#define ATOM_S6_ACC_REQ_DFP1X ATOM_S6_ACC_REQ_DFP2 + +#define ATOM_S6_ACC_REQ_DFP2Ib3 0x02 +#define ATOM_S6_ACC_REQ_DFP2I 0x02000000L + +#define TMDS1XEncoderControl DVOEncoderControl +#define DFP1XOutputControl DVOOutputControl + +#define ExternalDFPOutputControl DFP1XOutputControl +#define EnableExternalTMDS_Encoder TMDS1XEncoderControl + +#define DFP1IOutputControl TMDSAOutputControl +#define DFP2IOutputControl LVTMAOutputControl + +#define DAC1_ENCODER_CONTROL_PARAMETERS DAC_ENCODER_CONTROL_PARAMETERS +#define DAC1_ENCODER_CONTROL_PS_ALLOCATION DAC_ENCODER_CONTROL_PS_ALLOCATION + +#define DAC2_ENCODER_CONTROL_PARAMETERS DAC_ENCODER_CONTROL_PARAMETERS +#define DAC2_ENCODER_CONTROL_PS_ALLOCATION DAC_ENCODER_CONTROL_PS_ALLOCATION + +#define ucDac1Standard ucDacStandard +#define ucDac2Standard ucDacStandard + +#define TMDS1EncoderControl TMDSAEncoderControl +#define TMDS2EncoderControl LVTMAEncoderControl + +#define DFP1OutputControl TMDSAOutputControl +#define DFP2OutputControl LVTMAOutputControl +#define CRT1OutputControl DAC1OutputControl +#define CRT2OutputControl DAC2OutputControl + +//These two lines will be removed for sure in a few days, will follow up with Michael V. +#define EnableLVDS_SS EnableSpreadSpectrumOnPPLL +#define ENABLE_LVDS_SS_PARAMETERS_V3 ENABLE_SPREAD_SPECTRUM_ON_PPLL + +//#define ATOM_S2_CRT1_DPMS_STATE 0x00010000L +//#define ATOM_S2_LCD1_DPMS_STATE ATOM_S2_CRT1_DPMS_STATE +//#define ATOM_S2_TV1_DPMS_STATE ATOM_S2_CRT1_DPMS_STATE +//#define ATOM_S2_DFP1_DPMS_STATE ATOM_S2_CRT1_DPMS_STATE +//#define ATOM_S2_CRT2_DPMS_STATE ATOM_S2_CRT1_DPMS_STATE + +#define ATOM_S6_ACC_REQ_TV2 0x00400000L +#define ATOM_DEVICE_TV2_INDEX 0x00000006 +#define ATOM_DEVICE_TV2_SUPPORT (0x1L << ATOM_DEVICE_TV2_INDEX) +#define ATOM_S0_TV2 0x00100000L +#define ATOM_S3_TV2_ACTIVE ATOM_S3_DFP6_ACTIVE +#define ATOM_S3_TV2_CRTC_ACTIVE ATOM_S3_DFP6_CRTC_ACTIVE + +// +#define ATOM_S2_CRT1_DPMS_STATE 0x00010000L +#define ATOM_S2_LCD1_DPMS_STATE 0x00020000L +#define ATOM_S2_TV1_DPMS_STATE 0x00040000L +#define ATOM_S2_DFP1_DPMS_STATE 0x00080000L +#define ATOM_S2_CRT2_DPMS_STATE 0x00100000L +#define ATOM_S2_LCD2_DPMS_STATE 0x00200000L +#define ATOM_S2_TV2_DPMS_STATE 0x00400000L +#define ATOM_S2_DFP2_DPMS_STATE 0x00800000L +#define ATOM_S2_CV_DPMS_STATE 0x01000000L +#define ATOM_S2_DFP3_DPMS_STATE 0x02000000L +#define ATOM_S2_DFP4_DPMS_STATE 0x04000000L +#define ATOM_S2_DFP5_DPMS_STATE 0x08000000L + +#define ATOM_S2_CRT1_DPMS_STATEb2 0x01 +#define ATOM_S2_LCD1_DPMS_STATEb2 0x02 +#define ATOM_S2_TV1_DPMS_STATEb2 0x04 +#define ATOM_S2_DFP1_DPMS_STATEb2 0x08 +#define ATOM_S2_CRT2_DPMS_STATEb2 0x10 +#define ATOM_S2_LCD2_DPMS_STATEb2 0x20 +#define ATOM_S2_TV2_DPMS_STATEb2 0x40 +#define ATOM_S2_DFP2_DPMS_STATEb2 0x80 +#define ATOM_S2_CV_DPMS_STATEb3 0x01 +#define ATOM_S2_DFP3_DPMS_STATEb3 0x02 +#define ATOM_S2_DFP4_DPMS_STATEb3 0x04 +#define ATOM_S2_DFP5_DPMS_STATEb3 0x08 + +#define ATOM_S3_ASIC_GUI_ENGINE_HUNGb3 0x20 +#define ATOM_S3_ALLOW_FAST_PWR_SWITCHb3 0x40 +#define ATOM_S3_RQST_GPU_USE_MIN_PWRb3 0x80 + +/*********************************************************************************/ + +#pragma pack() // BIOS data must use byte alignment + +// +// AMD ACPI Table +// +#pragma pack(1) + +typedef struct { + ULONG Signature; + ULONG TableLength; //Length + UCHAR Revision; + UCHAR Checksum; + UCHAR OemId[6]; + UCHAR OemTableId[8]; //UINT64 OemTableId; + ULONG OemRevision; + ULONG CreatorId; + ULONG CreatorRevision; +} AMD_ACPI_DESCRIPTION_HEADER; +/* +//EFI_ACPI_DESCRIPTION_HEADER from AcpiCommon.h +typedef struct { + UINT32 Signature; //0x0 + UINT32 Length; //0x4 + UINT8 Revision; //0x8 + UINT8 Checksum; //0x9 + UINT8 OemId[6]; //0xA + UINT64 OemTableId; //0x10 + UINT32 OemRevision; //0x18 + UINT32 CreatorId; //0x1C + UINT32 CreatorRevision; //0x20 +}EFI_ACPI_DESCRIPTION_HEADER; +*/ +typedef struct { + AMD_ACPI_DESCRIPTION_HEADER SHeader; + UCHAR TableUUID[16]; //0x24 + ULONG VBIOSImageOffset; //0x34. Offset to the first GOP_VBIOS_CONTENT block from the beginning of the structure. + ULONG Lib1ImageOffset; //0x38. Offset to the first GOP_LIB1_CONTENT block from the beginning of the structure. + ULONG Reserved[4]; //0x3C +}UEFI_ACPI_VFCT; + +typedef struct { + ULONG PCIBus; //0x4C + ULONG PCIDevice; //0x50 + ULONG PCIFunction; //0x54 + USHORT VendorID; //0x58 + USHORT DeviceID; //0x5A + USHORT SSVID; //0x5C + USHORT SSID; //0x5E + ULONG Revision; //0x60 + ULONG ImageLength; //0x64 +}VFCT_IMAGE_HEADER; + + +typedef struct { + VFCT_IMAGE_HEADER VbiosHeader; + UCHAR VbiosContent[1]; +}GOP_VBIOS_CONTENT; + +typedef struct { + VFCT_IMAGE_HEADER Lib1Header; + UCHAR Lib1Content[1]; +}GOP_LIB1_CONTENT; + +#pragma pack() + + +#endif /* _ATOMBIOS_H */ + +#include "pptable.h" \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/radeon/atombios.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/radeon/atombios.h.yml new file mode 100644 index 00000000000..2f1c4a70894 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/radeon/atombios.h.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2006-2007 Advanced Micro Devices, Inc. +holders: + - Advanced Micro Devices, Inc. +authors: + - DynamicClockGatingTable.ctb + - EnableDispPowerGatingTable.ctb + - EnableASIC_StaticPwrMgtTable.ctb diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/vc4/vc4_drv.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/vc4/vc4_drv.h new file mode 100644 index 00000000000..44b660114cd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/vc4/vc4_drv.h @@ -0,0 +1,8 @@ +* Copyright (C) 2015 Broadcom + * + * This program is free software; you can redistribute it and/or modify + + + /* List of BOs that are being written by the RCL. Other than + * the binner temporary storage, this is all the BOs written + * by the job. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/vc4/vc4_drv.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/vc4/vc4_drv.h.yml new file mode 100644 index 00000000000..41670445dc6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/gpu/drm/vc4/vc4_drv.h.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2015 Broadcom +holders: + - Broadcom +authors: + - the RCL. Other diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hid/hid-appleir.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hid/hid-appleir.c new file mode 100644 index 00000000000..560d5442bb1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hid/hid-appleir.c @@ -0,0 +1,13 @@ +* Original driver written by James McKenzie + * Ported to recent 2.6 kernel versions by Greg Kroah-Hartman + * Updated to support newer remotes by Bastien Nocera + * Ported to HID subsystem by Benjamin Tissoires + * + * Copyright (C) 2006 James McKenzie + * Copyright (C) 2008 Greg Kroah-Hartman + * Copyright (C) 2008 Novell Inc. + * Copyright (C) 2010, 2012 Bastien Nocera + * Copyright (C) 2013 Benjamin Tissoires + * Copyright (C) 2013 Red Hat Inc. All Rights Reserved + * + * This software is licensed under the terms of the GNU General Public \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hid/hid-appleir.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hid/hid-appleir.c.yml new file mode 100644 index 00000000000..cbc8cbd11d3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hid/hid-appleir.c.yml @@ -0,0 +1,23 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006 James McKenzie + - Copyright (c) 2008 Greg Kroah-Hartman + - Copyright (c) 2008 Novell Inc. + - Copyright (c) 2010, 2012 Bastien Nocera + - Copyright (c) 2013 Benjamin Tissoires + - Copyright (c) 2013 Red Hat Inc. +holders: + - James McKenzie + - Greg Kroah-Hartman + - Novell Inc. + - Bastien Nocera + - Benjamin Tissoires + - Red Hat Inc. +authors: + - James McKenzie Ported + - Greg Kroah-Hartman + - Bastien Nocera + - Benjamin Tissoires diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hwmon/nct7904.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hwmon/nct7904.c new file mode 100644 index 00000000000..e71a4ea494f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hwmon/nct7904.c @@ -0,0 +1,4 @@ +* Copyright (c) 2015 Kontron + * Author: Vadim V. Vlasov + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hwmon/nct7904.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hwmon/nct7904.c.yml new file mode 100644 index 00000000000..c662b6326a4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hwmon/nct7904.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2015 Kontron +holders: + - Kontron +authors: + - Vadim V. Vlasov diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hwmon/via686a.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hwmon/via686a.c new file mode 100644 index 00000000000..82410b17ab5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hwmon/via686a.c @@ -0,0 +1,28 @@ +* Copyright (c) 1998 - 2002 Frodo Looijaard , + * Kyösti Mälkki , + * Mark Studebaker , + * and Bob Dougherty + * + * (Some conversion-factor data were contributed by Jonathan Teh Soon Yew + + + * From HWMon.cpp (Copyright 1998-2000 Jonathan Teh Soon Yew): + * voltagefactor[0]=1.25/2628; (2628/1.25=2102.4) // Vccp + * voltagefactor[1]=1.25/2628; (2628/1.25=2102.4) // +2.5V + + + * (These conversions were contributed by Jonathan Teh Soon Yew + * ) + */ +static inline u8 IN_TO_REG(long val, int in_num) + + + * linear fits from HWMon.cpp (Copyright 1998-2000 Jonathan Teh Soon Yew) + * if(temp<169) + * return double(temp)*0.427-32.08; + + + * A fifth-order polynomial fits the unofficial data (provided by Alex van + * Kaam ) a bit better. It also give more reasonable + * numbers on my machine (ie. they agree with what my BIOS tells me). + * Here's the fifth-order fit to the 8-bit data: \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hwmon/via686a.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hwmon/via686a.c.yml new file mode 100644 index 00000000000..7120faf0b3b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/hwmon/via686a.c.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998 - 2002 Frodo Looijaard , Kyosti Malkki + , Mark Studebaker , and Bob Dougherty + - Copyright 1998-2000 Jonathan Teh Soon + - Copyright 1998-2000 Jonathan Teh Soon +holders: + - Frodo Looijaard , Kyosti Malkki , Mark Studebaker , and Bob Dougherty + - Jonathan Teh Soon + - Jonathan Teh Soon +authors: + - Jonathan Teh Soon Yew + - Alex van Kaam diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/i2c/busses/i2c-at91.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/i2c/busses/i2c-at91.c new file mode 100644 index 00000000000..708ae754d65 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/i2c/busses/i2c-at91.c @@ -0,0 +1,11 @@ +* Copyright (C) 2011 Weinmann Medical GmbH + * Author: Nikolaus Voss + * + * Evolved from original work by: + * Copyright (C) 2004 Rick Bronson + * Converted to 2.6 by Andrew Victor + * + * Borrowed heavily from original work by: + * Copyright (C) 2000 Philip Edelbrock + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/i2c/busses/i2c-at91.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/i2c/busses/i2c-at91.c.yml new file mode 100644 index 00000000000..59d23e87518 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/i2c/busses/i2c-at91.c.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2011 Weinmann Medical GmbH + - Copyright (c) 2004 Rick Bronson Converted + - Copyright (c) 2000 Philip Edelbrock +holders: + - Weinmann Medical GmbH + - Rick Bronson Converted + - Philip Edelbrock +authors: + - Nikolaus Voss + - Andrew Victor diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ide/alim15x3.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ide/alim15x3.c new file mode 100644 index 00000000000..c02b4bef1a1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ide/alim15x3.c @@ -0,0 +1,12 @@ +* Copyright (C) 1998-2000 Michel Aubry, Maintainer + * Copyright (C) 1998-2000 Andrzej Krzysztofowicz, Maintainer + * Copyright (C) 1999-2000 CJ, cjtsai@ali.com.tw, Maintainer + * + * Copyright (C) 1998-2000 Andre Hedrick (andre@linux-ide.org) + * May be copied or modified under the terms of the GNU General Public License + * Copyright (C) 2002 Alan Cox + * ALi (now ULi M5228) support by Clear Zhang + * Copyright (C) 2007 MontaVista Software, Inc. + * Copyright (C) 2007-2010 Bartlomiej Zolnierkiewicz + * + * (U)DMA capable version of ali 1533/1543(C), 1535(D) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ide/alim15x3.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ide/alim15x3.c.yml new file mode 100644 index 00000000000..847d5820541 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/ide/alim15x3.c.yml @@ -0,0 +1,22 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998-2000 Michel Aubry, Maintainer + - Copyright (c) 1998-2000 Andrzej Krzysztofowicz, Maintainer + - (c) 1999-2000 CJ, cjtsai@ali.com.tw + - Copyright (c) 1998-2000 Andre Hedrick (andre@linux-ide.org) + - Copyright (c) 2002 Alan Cox + - Copyright (c) 2007 MontaVista Software, Inc. + - Copyright (c) 2007-2010 Bartlomiej Zolnierkiewicz +holders: + - Michel Aubry, Maintainer + - Andrzej Krzysztofowicz, Maintainer + - CJ + - Andre Hedrick + - Alan Cox + - MontaVista Software, Inc. + - Bartlomiej Zolnierkiewicz +authors: + - Clear Zhang diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/keyboard/jornada680_kbd.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/keyboard/jornada680_kbd.c new file mode 100644 index 00000000000..ece78bf7ae0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/keyboard/jornada680_kbd.c @@ -0,0 +1,10 @@ +* Copyright (C) 2007 Kristoffer Ericson + * + * Based on hp680_keyb.c + * Copyright (C) 2006 Paul Mundt + * Copyright (C) 2005 Andriy Skulysh + * Split from drivers/input/keyboard/hp600_keyb.c + * Copyright (C) 2000 Yaegashi Takeshi (hp6xx kbd scan routine and translation table) + * Copyright (C) 2000 Niibe Yutaka (HP620 Keyb translation table) + * + * This program is free software; you can redistribute it and/or modify it \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/keyboard/jornada680_kbd.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/keyboard/jornada680_kbd.c.yml new file mode 100644 index 00000000000..7c68ae4c4fe --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/keyboard/jornada680_kbd.c.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2007 Kristoffer Ericson + - Copyright (c) 2006 Paul Mundt + - Copyright (c) 2005 Andriy Skulysh Split + - Copyright (c) 2000 Yaegashi Takeshi + - Copyright (c) 2000 Niibe Yutaka +holders: + - Kristoffer Ericson + - Paul Mundt + - Andriy Skulysh Split + - Yaegashi Takeshi + - Niibe Yutaka diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/keyboard/jornada720_kbd.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/keyboard/jornada720_kbd.c new file mode 100644 index 00000000000..6d583ff7dd3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/keyboard/jornada720_kbd.c @@ -0,0 +1,8 @@ +* Copyright (C) 2006/2007 Kristoffer Ericson + * + * Copyright (C) 2006 jornada 720 kbd driver by + Filip Zyzniewsk + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/keyboard/jornada720_kbd.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/keyboard/jornada720_kbd.c.yml new file mode 100644 index 00000000000..d97449b74de --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/keyboard/jornada720_kbd.c.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006/2007 Kristoffer Ericson + - Copyright (c) 2006 jornada + - (c) 2004 jornada +holders: + - Kristoffer Ericson + - jornada + - jornada +authors: + - Filip Zyzniewsk Filip.Zyzniewski@tefnet.plX + - Alex Lange diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/mouse/hgpk.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/mouse/hgpk.c new file mode 100644 index 00000000000..9764ca5af19 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/mouse/hgpk.c @@ -0,0 +1,13 @@ +* Copyright (c) 2006-2008 One Laptop Per Child + * Authors: + * Zephaniah E. Hull + * Andres Salomon + * + * This driver is partly based on the ALPS driver, which is: + + * Copyright (c) 2003 Neil Brown + * Copyright (c) 2003-2005 Peter Osterlund + * Copyright (c) 2004 Dmitry Torokhov + * Copyright (c) 2005 Vojtech Pavlik + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/mouse/hgpk.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/mouse/hgpk.c.yml new file mode 100644 index 00000000000..060347872ee --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/mouse/hgpk.c.yml @@ -0,0 +1,18 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006-2008 One Laptop Per Child + - Copyright (c) 2003 Neil Brown + - Copyright (c) 2003-2005 Peter Osterlund + - Copyright (c) 2004 Dmitry Torokhov + - Copyright (c) 2005 Vojtech Pavlik +holders: + - One Laptop Per Child + - Neil Brown + - Peter Osterlund + - Dmitry Torokhov + - Vojtech Pavlik +authors: + - Zephaniah E. Hull Andres Salomon diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/mouse/vsxxxaa.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/mouse/vsxxxaa.c new file mode 100644 index 00000000000..613c3363d18 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/mouse/vsxxxaa.c @@ -0,0 +1,4 @@ + (C) 2001 + * by Karsten Merker + * and Maciej W. Rozycki + diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/mouse/vsxxxaa.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/mouse/vsxxxaa.c.yml new file mode 100644 index 00000000000..cc4e36d1eef --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/mouse/vsxxxaa.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2001 by Karsten Merker and Maciej W. Rozycki +holders: + - Karsten Merker and Maciej W. Rozycki diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/serio/olpc_apsp.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/serio/olpc_apsp.c new file mode 100644 index 00000000000..a892e6dcef8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/serio/olpc_apsp.c @@ -0,0 +1,3 @@ +* Copyright (C) 2011-2013 One Laptop Per Child + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/serio/olpc_apsp.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/serio/olpc_apsp.c.yml new file mode 100644 index 00000000000..08ef3460898 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/serio/olpc_apsp.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2011-2013 One Laptop Per Child +holders: + - One Laptop Per Child diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/touchscreen/rohm_bu21023.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/touchscreen/rohm_bu21023.c new file mode 100644 index 00000000000..abd64b88766 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/touchscreen/rohm_bu21023.c @@ -0,0 +1,3 @@ +* Copyright (C) 2012 ROHM CO.,LTD. + * + * This software is licensed under the terms of the GNU General Public \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/touchscreen/rohm_bu21023.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/touchscreen/rohm_bu21023.c.yml new file mode 100644 index 00000000000..c81b3d53efc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/input/touchscreen/rohm_bu21023.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2012 ROHM +holders: + - ROHM diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/hisax_debug.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/hisax_debug.h new file mode 100644 index 00000000000..689872e48bc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/hisax_debug.h @@ -0,0 +1,5 @@ +* Author Frode Isaksen + * Copyright 2001 by Frode Isaksen + * 2001 by Kai Germaschewski + * + * This software may be used and distributed according to the terms \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/hisax_debug.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/hisax_debug.h.yml new file mode 100644 index 00000000000..2f056c2d51a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/hisax_debug.h.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2001 by Frode Isaksen 2001 by Kai Germaschewski +holders: + - Frode Isaksen by Kai Germaschewski +authors: + - Frode Isaksen diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481.h new file mode 100644 index 00000000000..689872e48bc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481.h @@ -0,0 +1,5 @@ +* Author Frode Isaksen + * Copyright 2001 by Frode Isaksen + * 2001 by Kai Germaschewski + * + * This software may be used and distributed according to the terms \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481.h.yml new file mode 100644 index 00000000000..2f056c2d51a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481.h.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2001 by Frode Isaksen 2001 by Kai Germaschewski +holders: + - Frode Isaksen by Kai Germaschewski +authors: + - Frode Isaksen diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481_b.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481_b.c new file mode 100644 index 00000000000..689872e48bc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481_b.c @@ -0,0 +1,5 @@ +* Author Frode Isaksen + * Copyright 2001 by Frode Isaksen + * 2001 by Kai Germaschewski + * + * This software may be used and distributed according to the terms \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481_b.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481_b.c.yml new file mode 100644 index 00000000000..2f056c2d51a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481_b.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2001 by Frode Isaksen 2001 by Kai Germaschewski +holders: + - Frode Isaksen by Kai Germaschewski +authors: + - Frode Isaksen diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481_d.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481_d.c new file mode 100644 index 00000000000..689872e48bc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481_d.c @@ -0,0 +1,5 @@ +* Author Frode Isaksen + * Copyright 2001 by Frode Isaksen + * 2001 by Kai Germaschewski + * + * This software may be used and distributed according to the terms \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481_d.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481_d.c.yml new file mode 100644 index 00000000000..2f056c2d51a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/hisax/st5481_d.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2001 by Frode Isaksen 2001 by Kai Germaschewski +holders: + - Frode Isaksen by Kai Germaschewski +authors: + - Frode Isaksen diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/i4l/isdn_audio.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/i4l/isdn_audio.c new file mode 100644 index 00000000000..9182c41c1ef --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/i4l/isdn_audio.c @@ -0,0 +1,10 @@ +* Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de) + * DTMF code (c) 1996 by Christian Mock (cm@kukuruz.ping.at) + * Silence detection (c) 1998 by Armin Schindler (mac@gismo.telekom.de) + * + * This software may be used and distributed according to the terms + + + * (C) by Gert Doering and Klaus Weidner + * Used by permission of Gert Doering + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/i4l/isdn_audio.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/i4l/isdn_audio.c.yml new file mode 100644 index 00000000000..2940fdb98e7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/isdn/i4l/isdn_audio.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de) + - (c) 1996 by Christian Mock (cm@kukuruz.ping.at) Silence + - (c) 1998 by Armin Schindler (mac@gismo.telekom.de) + - (c) by Gert Doering and Klaus Weidner +holders: + - Fritz Elfert + - Christian Mock Silence + - Armin Schindler + - Gert Doering and Klaus Weidner diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/md/raid1.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/md/raid1.c new file mode 100644 index 00000000000..5bb28f70f94 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/md/raid1.c @@ -0,0 +1,20 @@ +* Copyright (C) 1999, 2000, 2001 Ingo Molnar, Red Hat + * + * Copyright (C) 1996, 1997, 1998 Ingo Molnar, Miguel de Icaza, Gadi Oxman + * + * RAID-1 management functions. + + * Better read-balancing code written by Mika Kuoppala , 2000 + * + * Fixes to reconstruction by Jakob Østergaard" + * Various fixes by Neil Brown + * + * Changes by Peter T. Breuer 31/1/2003 to support + * bitmapped intelligence in resync: + * + + + * Additions to bitmap code, (C) 2003-2004 Paul Clements, SteelEye Technology: + * - persistent bitmap code + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/md/raid1.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/md/raid1.c.yml new file mode 100644 index 00000000000..8a1a5467447 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/md/raid1.c.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999, 2000, 2001 Ingo Molnar, Red Hat + - Copyright (c) 1996, 1997, 1998 Ingo Molnar, Miguel de Icaza, Gadi Oxman + - (c) 2003-2004 Paul Clements, SteelEye Technology - persistent +holders: + - Ingo Molnar, Red Hat + - Ingo Molnar, Miguel de Icaza, Gadi Oxman + - Paul Clements, SteelEye Technology - persistent +authors: + - Mika Kuoppala , Fixes + - Jakob Ostergaard + - Neil Brown + - Peter T. Breuer diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/dvb-frontends/drxd.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/dvb-frontends/drxd.h new file mode 100644 index 00000000000..2728ef02736 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/dvb-frontends/drxd.h @@ -0,0 +1,3 @@ +* Copyright (C) 2005-2007 Micronas + * + * This program is free software; you can redistribute it and/or \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/dvb-frontends/drxd.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/dvb-frontends/drxd.h.yml new file mode 100644 index 00000000000..6465a711c02 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/dvb-frontends/drxd.h.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005-2007 Micronas +holders: + - Micronas diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/dvb-frontends/drxd_firm.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/dvb-frontends/drxd_firm.c new file mode 100644 index 00000000000..1df85dd86f7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/dvb-frontends/drxd_firm.c @@ -0,0 +1,3 @@ +* Copyright (C) 2006-2007 Micronas + * + * This program is free software; you can redistribute it and/or \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/dvb-frontends/drxd_firm.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/dvb-frontends/drxd_firm.c.yml new file mode 100644 index 00000000000..600ab423992 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/dvb-frontends/drxd_firm.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006-2007 Micronas +holders: + - Micronas diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/i2c/tda7432.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/i2c/tda7432.c new file mode 100644 index 00000000000..3d735f942ad --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/i2c/tda7432.c @@ -0,0 +1,11 @@ +* Muting and tone control by Jonathan Isom + * + * Copyright (c) 2000 Eric Sandeen + * Copyright (c) 2006 Mauro Carvalho Chehab + * This code is placed under the terms of the GNU General Public License + * Based on tda9855.c by Steve VanDeBogart (vandebo@uclink.berkeley.edu) + * Which was based on tda8425.c by Greg Alexander (c) 1998 + * + * OPTIONS: + * debug - set to 1 if you'd like to see debug messages + * set to 2 if you'd like to be inundated with debug messages \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/i2c/tda7432.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/i2c/tda7432.c.yml new file mode 100644 index 00000000000..9e1b0af85c4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/i2c/tda7432.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000 Eric Sandeen + - Copyright (c) 2006 Mauro Carvalho Chehab + - Greg Alexander (c) 1998 OPTIONS +holders: + - Eric Sandeen + - Mauro Carvalho Chehab + - Greg Alexander OPTIONS +authors: + - Jonathan Isom diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie-ir.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie-ir.c new file mode 100644 index 00000000000..8ea4be57a22 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie-ir.c @@ -0,0 +1,3 @@ +* Copyright (C) 2014 Max nibble + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie-ir.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie-ir.c.yml new file mode 100644 index 00000000000..15e1fff4f4a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie-ir.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2014 Max nibble +holders: + - Max nibble diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie-main.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie-main.c new file mode 100644 index 00000000000..8ea4be57a22 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie-main.c @@ -0,0 +1,3 @@ +* Copyright (C) 2014 Max nibble + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie-main.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie-main.c.yml new file mode 100644 index 00000000000..15e1fff4f4a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie-main.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2014 Max nibble +holders: + - Max nibble diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie.h new file mode 100644 index 00000000000..8ea4be57a22 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie.h @@ -0,0 +1,3 @@ +* Copyright (C) 2014 Max nibble + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie.h.yml new file mode 100644 index 00000000000..15e1fff4f4a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/smipcie/smipcie.h.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2014 Max nibble +holders: + - Max nibble diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/tw686x/tw686x-audio.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/tw686x/tw686x-audio.c new file mode 100644 index 00000000000..f30b25a5074 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/tw686x/tw686x-audio.c @@ -0,0 +1,10 @@ +* Copyright (C) 2015 VanguardiaSur - www.vanguardiasur.com.ar + * + * Based on the audio support from the tw6869 driver: + * Copyright 2015 www.starterkit.ru + * + * Based on: + + * (c) 2011-12 liran [Intersil|Techwell China] + * + * This program is free software; you can redistribute it and/or modify it \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/tw686x/tw686x-audio.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/tw686x/tw686x-audio.c.yml new file mode 100644 index 00000000000..c35bc2a2e41 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/pci/tw686x/tw686x-audio.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2015 VanguardiaSur + - Copyright 2015 www.starterkit.ru + - (c) 2011-12 liran Intersil Techwell China +holders: + - VanguardiaSur + - www.starterkit.ru + - liran Intersil Techwell China diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/radio/radio-gemtek.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/radio/radio-gemtek.c new file mode 100644 index 00000000000..a42a8efebdb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/radio/radio-gemtek.c @@ -0,0 +1,15 @@ +* Copyright 1998 Jonas Munsin + * + * GemTek hasn't released any specs on the card, so the protocol had to + + + * RadioTrack II driver for Linux radio support (C) 1998 Ben Pfaff + * + * Based on RadioTrack I/RadioReveal (C) 1997 M. Kirkwood + * Converted to new API by Alan Cox + * Various bugfixes and enhancements by Russell Kroll + * + * Converted to the radio-isa framework by Hans Verkuil + * Converted to V4L2 API by Mauro Carvalho Chehab + * + * Note: this card seems to swap the left and right audio channels! \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/radio/radio-gemtek.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/radio/radio-gemtek.c.yml new file mode 100644 index 00000000000..fe1cd0a0361 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/radio/radio-gemtek.c.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1998 Jonas Munsin + - (c) 1998 Ben Pfaff + - (c) 1997 M. Kirkwood Converted +holders: + - Jonas Munsin + - Ben Pfaff + - M. Kirkwood Converted +authors: + - Alan Cox + - Russell Kroll + - Hans Verkuil + - Mauro Carvalho Chehab diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/radio/radio-rtrack2.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/radio/radio-rtrack2.c new file mode 100644 index 00000000000..701878d5ad6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/radio/radio-rtrack2.c @@ -0,0 +1,10 @@ +* Copyright 1998 Ben Pfaff + * + * Based on RadioTrack I/RadioReveal (C) 1997 M. Kirkwood + * Converted to new API by Alan Cox + * Various bugfixes and enhancements by Russell Kroll + * + * Converted to the radio-isa framework by Hans Verkuil + * Converted to V4L2 API by Mauro Carvalho Chehab + * + * Fully tested with actual hardware and the v4l2-compliance tool. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/radio/radio-rtrack2.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/radio/radio-rtrack2.c.yml new file mode 100644 index 00000000000..b7eae5836ef --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/radio/radio-rtrack2.c.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1998 Ben Pfaff + - (c) 1997 M. Kirkwood Converted +holders: + - Ben Pfaff + - M. Kirkwood Converted +authors: + - Alan Cox + - Russell Kroll + - Hans Verkuil + - Mauro Carvalho Chehab diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/tuners/m88rs6000t.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/tuners/m88rs6000t.c new file mode 100644 index 00000000000..8ea4be57a22 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/tuners/m88rs6000t.c @@ -0,0 +1,3 @@ +* Copyright (C) 2014 Max nibble + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/tuners/m88rs6000t.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/tuners/m88rs6000t.c.yml new file mode 100644 index 00000000000..15e1fff4f4a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/tuners/m88rs6000t.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2014 Max nibble +holders: + - Max nibble diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/dvb-usb/af9005-script.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/dvb-usb/af9005-script.h new file mode 100644 index 00000000000..f729fb5ac24 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/dvb-usb/af9005-script.h @@ -0,0 +1,2 @@ +File automatically generated by createinit.py using data +extracted from AF05BDA.sys (windows driver): \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/dvb-usb/af9005-script.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/dvb-usb/af9005-script.h.yml new file mode 100644 index 00000000000..c56bed5a51a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/dvb-usb/af9005-script.h.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - createinit.py diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_bridge.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_bridge.h new file mode 100644 index 00000000000..50524db4f09 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_bridge.h @@ -0,0 +1,8 @@ +* Copyright (C) 2008 Erik Andrén + * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project. + * Copyright (C) 2005 m5603x Linux Driver Project + * + * Portions of code to USB interface and ALi driver software, + * Copyright (c) 2006 Willem Duinker + * v4l2 interface modeled after the V4L2 driver + * for SN9C10x PC Camera Controllers \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_bridge.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_bridge.h.yml new file mode 100644 index 00000000000..7ea2f1f11f5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_bridge.h.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008 Erik Andren + - Copyright (c) 2007 Ilyes Gouta + - Copyright (c) 2005 m5603x + - Copyright (c) 2006 Willem Duinker +holders: + - Erik Andren + - Ilyes Gouta + - m5603x + - Willem Duinker diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_core.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_core.c new file mode 100644 index 00000000000..50524db4f09 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_core.c @@ -0,0 +1,8 @@ +* Copyright (C) 2008 Erik Andrén + * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project. + * Copyright (C) 2005 m5603x Linux Driver Project + * + * Portions of code to USB interface and ALi driver software, + * Copyright (c) 2006 Willem Duinker + * v4l2 interface modeled after the V4L2 driver + * for SN9C10x PC Camera Controllers \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_core.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_core.c.yml new file mode 100644 index 00000000000..7ea2f1f11f5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_core.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008 Erik Andren + - Copyright (c) 2007 Ilyes Gouta + - Copyright (c) 2005 m5603x + - Copyright (c) 2006 Willem Duinker +holders: + - Erik Andren + - Ilyes Gouta + - m5603x + - Willem Duinker diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_mt9m111.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_mt9m111.c new file mode 100644 index 00000000000..50524db4f09 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_mt9m111.c @@ -0,0 +1,8 @@ +* Copyright (C) 2008 Erik Andrén + * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project. + * Copyright (C) 2005 m5603x Linux Driver Project + * + * Portions of code to USB interface and ALi driver software, + * Copyright (c) 2006 Willem Duinker + * v4l2 interface modeled after the V4L2 driver + * for SN9C10x PC Camera Controllers \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_mt9m111.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_mt9m111.c.yml new file mode 100644 index 00000000000..7ea2f1f11f5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_mt9m111.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008 Erik Andren + - Copyright (c) 2007 Ilyes Gouta + - Copyright (c) 2005 m5603x + - Copyright (c) 2006 Willem Duinker +holders: + - Erik Andren + - Ilyes Gouta + - m5603x + - Willem Duinker diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_mt9m111.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_mt9m111.h new file mode 100644 index 00000000000..49791102f53 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_mt9m111.h @@ -0,0 +1,13 @@ +* Copyright (C) 2008 Erik Andrén + * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project. + * Copyright (C) 2005 m5603x Linux Driver Project + * + * Portions of code to USB interface and ALi driver software, + * Copyright (c) 2006 Willem Duinker + * v4l2 interface modeled after the V4L2 driver + * for SN9C10x PC Camera Controllers + + + * Copyright (C) 2008, Robert Jarzmik + * + * This program is free software; you can redistribute it and/or \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_mt9m111.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_mt9m111.h.yml new file mode 100644 index 00000000000..7b5f5f1257c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_mt9m111.h.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008 Erik Andren + - Copyright (c) 2007 Ilyes Gouta + - Copyright (c) 2005 m5603x + - Copyright (c) 2006 Willem Duinker + - Copyright (c) 2008, Robert Jarzmik +holders: + - Erik Andren + - Ilyes Gouta + - m5603x + - Willem Duinker + - Robert Jarzmik diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_ov7660.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_ov7660.c new file mode 100644 index 00000000000..300ebb375da --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_ov7660.c @@ -0,0 +1,8 @@ +* Copyright (C) 2009 Erik Andrén + * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project. + * Copyright (C) 2005 m5603x Linux Driver Project + * + * Portions of code to USB interface and ALi driver software, + * Copyright (c) 2006 Willem Duinker + * v4l2 interface modeled after the V4L2 driver + * for SN9C10x PC Camera Controllers \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_ov7660.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_ov7660.c.yml new file mode 100644 index 00000000000..ea0ce1b65a7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_ov7660.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2009 Erik Andren + - Copyright (c) 2007 Ilyes Gouta + - Copyright (c) 2005 m5603x + - Copyright (c) 2006 Willem Duinker +holders: + - Erik Andren + - Ilyes Gouta + - m5603x + - Willem Duinker diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_s5k83a.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_s5k83a.c new file mode 100644 index 00000000000..50524db4f09 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_s5k83a.c @@ -0,0 +1,8 @@ +* Copyright (C) 2008 Erik Andrén + * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project. + * Copyright (C) 2005 m5603x Linux Driver Project + * + * Portions of code to USB interface and ALi driver software, + * Copyright (c) 2006 Willem Duinker + * v4l2 interface modeled after the V4L2 driver + * for SN9C10x PC Camera Controllers \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_s5k83a.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_s5k83a.c.yml new file mode 100644 index 00000000000..7ea2f1f11f5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_s5k83a.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008 Erik Andren + - Copyright (c) 2007 Ilyes Gouta + - Copyright (c) 2005 m5603x + - Copyright (c) 2006 Willem Duinker +holders: + - Erik Andren + - Ilyes Gouta + - m5603x + - Willem Duinker diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_s5k83a.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_s5k83a.h new file mode 100644 index 00000000000..50524db4f09 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_s5k83a.h @@ -0,0 +1,8 @@ +* Copyright (C) 2008 Erik Andrén + * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project. + * Copyright (C) 2005 m5603x Linux Driver Project + * + * Portions of code to USB interface and ALi driver software, + * Copyright (c) 2006 Willem Duinker + * v4l2 interface modeled after the V4L2 driver + * for SN9C10x PC Camera Controllers \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_s5k83a.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_s5k83a.h.yml new file mode 100644 index 00000000000..7ea2f1f11f5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_s5k83a.h.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008 Erik Andren + - Copyright (c) 2007 Ilyes Gouta + - Copyright (c) 2005 m5603x + - Copyright (c) 2006 Willem Duinker +holders: + - Erik Andren + - Ilyes Gouta + - m5603x + - Willem Duinker diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_sensor.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_sensor.h new file mode 100644 index 00000000000..50524db4f09 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_sensor.h @@ -0,0 +1,8 @@ +* Copyright (C) 2008 Erik Andrén + * Copyright (C) 2007 Ilyes Gouta. Based on the m5603x Linux Driver Project. + * Copyright (C) 2005 m5603x Linux Driver Project + * + * Portions of code to USB interface and ALi driver software, + * Copyright (c) 2006 Willem Duinker + * v4l2 interface modeled after the V4L2 driver + * for SN9C10x PC Camera Controllers \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_sensor.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_sensor.h.yml new file mode 100644 index 00000000000..7ea2f1f11f5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/m5602/m5602_sensor.h.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008 Erik Andren + - Copyright (c) 2007 Ilyes Gouta + - Copyright (c) 2005 m5603x + - Copyright (c) 2006 Willem Duinker +holders: + - Erik Andren + - Ilyes Gouta + - m5603x + - Willem Duinker diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/sonixb.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/sonixb.c new file mode 100644 index 00000000000..fcd6e316ddf --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/sonixb.c @@ -0,0 +1,5 @@ +* Copyright (C) 2009-2011 Jean-François Moine + * Copyright (C) 2003 2004 Michel Xhaard mxhaard@magic.fr + * Add Pas106 Stefano Mozzi (C) 2004 + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/sonixb.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/sonixb.c.yml new file mode 100644 index 00000000000..ff9e59c3da8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/media/usb/gspca/sonixb.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2009-2011 Jean-Francois Moine http://moinejf.free.fr + - Copyright (c) 2003 2004 Michel Xhaard mxhaard@magic.fr + - Pas106 Stefano Mozzi (c) 2004 +holders: + - Jean-Francois Moine + - Michel Xhaard + - Pas106 Stefano Mozzi diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/misc/eeprom/eeprom_93cx6.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/misc/eeprom/eeprom_93cx6.c new file mode 100644 index 00000000000..6f006890bb5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/misc/eeprom/eeprom_93cx6.c @@ -0,0 +1,4 @@ +* Copyright (C) 2004 - 2006 rt2x00 SourceForge Project + * + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/misc/eeprom/eeprom_93cx6.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/misc/eeprom/eeprom_93cx6.c.yml new file mode 100644 index 00000000000..2e9242c9a8b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/misc/eeprom/eeprom_93cx6.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2004 - 2006 rt2x00 SourceForge Project http://rt2x00.serialmonkey.com +holders: + - rt2x00 SourceForge Project diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/misc/mei/hw-txe-regs.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/misc/mei/hw-txe-regs.h new file mode 100644 index 00000000000..4c9c7622d69 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/misc/mei/hw-txe-regs.h @@ -0,0 +1,13 @@ +* Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + + + * Copyright(c) 2013 - 2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + + + * New commands and payloads should not be written by the Host + * until this indicates that the previous command has been processed. + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/misc/mei/hw-txe-regs.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/misc/mei/hw-txe-regs.h.yml new file mode 100644 index 00000000000..b3d24101140 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/misc/mei/hw-txe-regs.h.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2013 - 2014 Intel Corporation + - Copyright (c) 2013 - 2014 Intel Corporation +holders: + - Intel Corporation + - Intel Corporation +authors: + - the Host diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/mtd/nand/raw/sunxi_nand.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/mtd/nand/raw/sunxi_nand.c new file mode 100644 index 00000000000..2e4589bf0d7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/mtd/nand/raw/sunxi_nand.c @@ -0,0 +1,13 @@ +* Copyright (C) 2013 Boris BREZILLON + * + * Derived from: + + * Copyright (C) 2013 Qiang Yu + * + * https://github.com/hno/Allwinner-Info + * Copyright (C) 2013 Henrik Nordström + * + * Copyright (C) 2013 Dmitriy B. + * Copyright (C) 2013 Sergey Lapin + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/mtd/nand/raw/sunxi_nand.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/mtd/nand/raw/sunxi_nand.c.yml new file mode 100644 index 00000000000..468c7e119e3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/mtd/nand/raw/sunxi_nand.c.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2013 Boris BREZILLON + - Copyright (c) 2013 Qiang Yu + - Copyright (c) 2013 Henrik Nordstrom + - Copyright (c) 2013 Dmitriy B. + - Copyright (c) 2013 Sergey Lapin +holders: + - Boris BREZILLON + - Qiang Yu + - Henrik Nordstrom + - Dmitriy B. + - Sergey Lapin diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/dev.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/dev.c new file mode 100644 index 00000000000..37f5c6a3ec9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/dev.c @@ -0,0 +1,11 @@ +* Copyright (C) 2005 Marc Kleine-Budde, Pengutronix + * Copyright (C) 2006 Andrey Volkov, Varma Electronics + * Copyright (C) 2008-2009 Wolfgang Grandegger + * + * This program is free software; you can redistribute it and/or modify + + + * Copyright 2004-2006 Pavel Pisa - DCE FELK CVUT cz + * Copyright 2005 Stanislav Marek + * email: pisa@cmp.felk.cvut.cz + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/dev.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/dev.c.yml new file mode 100644 index 00000000000..648413498df --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/dev.c.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005 Marc Kleine-Budde, Pengutronix + - Copyright (c) 2006 Andrey Volkov, Varma Electronics + - Copyright (c) 2008-2009 Wolfgang Grandegger + - Copyright 2004-2006 Pavel Pisa + - Copyright 2005 Stanislav Marek +holders: + - Marc Kleine-Budde, Pengutronix + - Andrey Volkov, Varma Electronics + - Wolfgang Grandegger + - Pavel Pisa + - Stanislav Marek diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/sja1000/sja1000.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/sja1000/sja1000.c new file mode 100644 index 00000000000..6d7ee9462b8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/sja1000/sja1000.c @@ -0,0 +1,6 @@ +* Copyright (c) 2003 Matthias Brukner, Trajet Gmbh, Rebenring 33, + * 38106 Braunschweig, GERMANY + * + * Copyright (c) 2002-2007 Volkswagen Group Electronic Research + * All rights reserved. + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/sja1000/sja1000.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/sja1000/sja1000.c.yml new file mode 100644 index 00000000000..a51786efe8a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/sja1000/sja1000.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2003 Matthias Brukner, Trajet Gmbh, Rebenring + - Copyright (c) 2002-2007 Volkswagen Group Electronic Research +holders: + - Matthias Brukner, Trajet Gmbh, Rebenring + - Volkswagen Group Electronic Research diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/sja1000/sja1000.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/sja1000/sja1000.h new file mode 100644 index 00000000000..6d7ee9462b8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/sja1000/sja1000.h @@ -0,0 +1,6 @@ +* Copyright (c) 2003 Matthias Brukner, Trajet Gmbh, Rebenring 33, + * 38106 Braunschweig, GERMANY + * + * Copyright (c) 2002-2007 Volkswagen Group Electronic Research + * All rights reserved. + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/sja1000/sja1000.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/sja1000/sja1000.h.yml new file mode 100644 index 00000000000..a51786efe8a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/can/sja1000/sja1000.h.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2003 Matthias Brukner, Trajet Gmbh, Rebenring + - Copyright (c) 2002-2007 Volkswagen Group Electronic Research +holders: + - Matthias Brukner, Trajet Gmbh, Rebenring + - Volkswagen Group Electronic Research diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/8390/ne2k-pci.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/8390/ne2k-pci.c new file mode 100644 index 00000000000..04134cb878b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/8390/ne2k-pci.c @@ -0,0 +1,2 @@ +Copyright 1993 assigned to the United States Government as represented + by the Director, National Security Agency. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/8390/ne2k-pci.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/8390/ne2k-pci.c.yml new file mode 100644 index 00000000000..f9ab135f4e4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/8390/ne2k-pci.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1993 assigned +holders: + - assigned diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/broadcom/tg3.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/broadcom/tg3.h new file mode 100644 index 00000000000..337a4380897 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/broadcom/tg3.h @@ -0,0 +1,48 @@ +* Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) + * Copyright (C) 2001 Jeff Garzik (jgarzik@pobox.com) + * Copyright (C) 2004 Sun Microsystems Inc. + * Copyright (C) 2007-2016 Broadcom Corporation. + * Copyright (C) 2016-2017 Broadcom Limited. + * Copyright (C) 2018 Broadcom. All Rights Reserved. The term "Broadcom" + * refers to Broadcom Inc. and/or its subsidiaries. + */ + + + /* Statistics maintained by Receive MAC. */ + tg3_stat64_t rx_octets; + u64 __reserved1; + + + /* Statistics maintained by Transmit MAC. */ + tg3_stat64_t tx_octets; + u64 __reserved2; + + + /* Statistics maintained by Receive List Placement. */ + tg3_stat64_t COS_rx_packets[16]; + tg3_stat64_t COS_rx_filter_dropped; + + + /* Statistics maintained by Host Coalescing. */ + tg3_stat64_t ring_set_send_prod_index; + tg3_stat64_t ring_status_update; + + + /* Statistics maintained by Receive MAC. */ + u64 rx_octets; + u64 rx_fragments; + + + /* Statistics maintained by Transmit MAC. */ + u64 tx_octets; + u64 tx_collisions; + + + /* Statistics maintained by Receive List Placement. */ + u64 dma_writeq_full; + u64 dma_write_prioq_full; + + + /* Statistics maintained by Host Coalescing. */ + u64 ring_set_send_prod_index; + u64 ring_status_update; \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/broadcom/tg3.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/broadcom/tg3.h.yml new file mode 100644 index 00000000000..58648944a16 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/broadcom/tg3.h.yml @@ -0,0 +1,27 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com) + - Copyright (c) 2001 Jeff Garzik (jgarzik@pobox.com) + - Copyright (c) 2004 Sun Microsystems Inc. + - Copyright (c) 2007-2016 Broadcom Corporation + - Copyright (c) 2016-2017 Broadcom Limited + - Copyright (c) 2018 Broadcom +holders: + - David S. Miller + - Jeff Garzik + - Sun Microsystems Inc. + - Broadcom Corporation + - Broadcom Limited + - Broadcom +authors: + - Receive MAC. + - Transmit MAC. + - Receive List Placement + - Host Coalescing + - Receive MAC. + - Transmit MAC. + - Receive List Placement + - Host Coalescing diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/dec/tulip/de4x5.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/dec/tulip/de4x5.c new file mode 100644 index 00000000000..33f9bffbd6f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/dec/tulip/de4x5.c @@ -0,0 +1,117 @@ +Copyright 1994, 1995 Digital Equipment Corporation. + + Testing resources for this driver have been made available + + + Fix recognition bug reported by . + Add request/release_region code. + Add loadable modules support for PCI. + + + suggestion by . + 0.33 8-Aug-95 Add shared interrupt support (not released yet). + 0.331 21-Aug-95 Fix de4x5_open() with fast CPUs. + + + Made changes suggested by : + Change driver to detect all DECchip based cards + with DEC_ONLY restriction a special case. + + + Fix for multiple PCI cards reported by + Duh, put the IRQF_SHARED flag into request_interrupt(). + Fix SMC ethernet address in enet_det[]. + + + reported by and + . + Add cache locks to prevent a race condition as + reported by and + . + Upgraded alloc_device() code. + + + Fix EISA probe bugs reported by + and . + 0.441 9-Sep-96 Change dc21041_autoconf() to probe quiet BNC media + + + by + 0.45 8-Dec-96 Include endian functions for PPC use, from work + by and . + 0.451 28-Dec-96 Added fix to allow autoprobe for modules after + suggestion from . + + + by . + Added multi-MAC, one SROM feature from discussion + with . + + + Fix MII PHY reset problem from work done by + . + 0.52 26-Apr-97 Some changes may not credit the right people - + a disk crash meant I lost some mail. + + + module load: bug reported by + + Fix multi-MAC, one SROM, to work with 2114x chips: + bug reported by . + Make above search independent of BIOS device scan + direction. + + + problem reports by + and + . + Added argument list to set up each board from either + + + by . + 0.533 9-Jan-98 Fix more 64 bit bugs reported by . + 0.534 24-Jan-98 Fix last (?) endian bug from + 0.535 21-Feb-98 Fix Ethernet Address PROM reset bug for DC21040. + + + from problem report by + Add MII parallel detection to 2114x_autoconf() for + case where no autonegotiation partner exists from + problem report by . + Add ability to force connection type directly even + when using SROM control from problem report by + . + Updated the PCI interface to conform with the latest + version. I hope nothing is broken... + + by . + Fix is_anc_capable() bug reported by + . + Fix type[13]_infoblock() bug: during MII search, PHY + lp->rst not run because lp->ibn not initialised - + from report & fix by . + Fix probe bug with EISA & PCI cards present from + report by . + 0.541 24-Aug-98 Fix compiler problems associated with i386-string + ops from multiple bug reports and temporary fix + + + kernels and modules from bug report by + et al. + 0.542 15-Sep-98 Fix dc2114x_autoconf() to stop multiple messages + when media is unconnected. + + + a 21143 by . + Change PCI/EISA bus probing order. + 0.545 28-Nov-99 Further Moto SROM bug fix from + + + from report by + 0.546 22-Feb-01 Fixes Alpha XP1000 oops. The srom_search function + was causing a page fault when initializing the + + + 0.547 08-Nov-01 Use library crc32 functions by + 0.548 30-Aug-03 Big 2.6 cleanup. Ported to PCI/EISA probing and + generic DMA APIs. Fixed DE425 support on Alpha. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/dec/tulip/de4x5.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/dec/tulip/de4x5.c.yml new file mode 100644 index 00000000000..82aeac4bb90 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/dec/tulip/de4x5.c.yml @@ -0,0 +1,32 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1994, 1995 Digital Equipment Corporation +holders: + - Digital Equipment Corporation +authors: + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/seeq/ether3.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/seeq/ether3.c new file mode 100644 index 00000000000..67bb9b5ec71 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/seeq/ether3.c @@ -0,0 +1,8 @@ +* Copyright (C) 1995-2000 Russell King + * + * This program is free software; you can redistribute it and/or modify + + +static char version[] = "ether3 ethernet driver (c) 1995-2000 R.M.King v1.17\n"; + +#include "ether3.h" \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/seeq/ether3.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/seeq/ether3.c.yml new file mode 100644 index 00000000000..348c7ed28a0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/seeq/ether3.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1995-2000 Russell King + - (c) 1995-2000 R.M.King v1.17 +holders: + - Russell King + - R.M.King v1.17 diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/smsc/smc91c92_cs.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/smsc/smc91c92_cs.c new file mode 100644 index 00000000000..f575e9e81dd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/smsc/smc91c92_cs.c @@ -0,0 +1,10 @@ +Copyright (C) 1999 David A. Hinds -- dahinds@users.sourceforge.net + + smc91c92_cs.c 1.122 2002/10/25 06:26:39 + + This driver contains code written by Donald Becker + (becker@scyld.com), Rowan Hughes (x-csrdh@jcu.edu.au), + David Hinds (dahinds@users.sourceforge.net), and Erik Stahlman + (erik@vt.edu). Donald wrote the SMC 91c92 code using parts of + Erik's SMC 91c94 driver. Rowan wrote a similar driver, and I've + incorporated some parts of his driver here. I (Dave) wrote most \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/smsc/smc91c92_cs.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/smsc/smc91c92_cs.c.yml new file mode 100644 index 00000000000..cbe9a0dd8b1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/smsc/smc91c92_cs.c.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999 David A. Hinds - dahinds@users.sourceforge.net +holders: + - David A. Hinds +authors: + - Donald Becker (becker@scyld.com), Rowan Hughes (x-csrdh@jcu.edu.au), David Hinds (dahinds@users.sourceforge.net), + and Erik Stahlman (erik@vt.edu). Donald diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c new file mode 100644 index 00000000000..07dea4c24d9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c @@ -0,0 +1,4 @@ +* Copyright (C) 2017, Adaptrum, Inc. + * (Written by Alexandru Gagniuc for Adaptrum, Inc.) + * Licensed under the GPLv2 or (at your option) any later version. + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c.yml new file mode 100644 index 00000000000..cf657719d63 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/stmicro/stmmac/dwmac-anarion.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2017, Adaptrum, Inc. Written +holders: + - Adaptrum, Inc. Written diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c new file mode 100644 index 00000000000..91ca212ce71 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c @@ -0,0 +1,3 @@ +* Copyright (c) 2018 Synopsys, Inc. and/or its affiliates. + * stmmac TC Handling (HW only) + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c.yml new file mode 100644 index 00000000000..749e9face6e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2018 Synopsys, Inc. and/or its affiliates. stmmac TC Handling +holders: + - Synopsys, Inc. and/or its affiliates. stmmac TC Handling diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/hamradio/mkiss.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/hamradio/mkiss.c new file mode 100644 index 00000000000..4ab09f44111 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/hamradio/mkiss.c @@ -0,0 +1,5 @@ +* Copyright (C) Hans Alblas PE1AYX + * Copyright (C) 2004, 05 Ralf Baechle DL5RB + * Copyright (C) 2004, 05 Thomas Osterried DL9SAU + */ +#include \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/hamradio/mkiss.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/hamradio/mkiss.c.yml new file mode 100644 index 00000000000..480b57e24fa --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/hamradio/mkiss.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Hans Alblas PE1AYX + - Copyright (c) 2004, 05 Ralf Baechle DL5RB + - Copyright (c) 2004, 05 Thomas Osterried DL9SAU +holders: + - Hans Alblas PE1AYX + - Ralf Baechle DL5RB + - Thomas Osterried DL9SAU diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/macvlan.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/macvlan.c new file mode 100644 index 00000000000..abaf3e6e169 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/macvlan.c @@ -0,0 +1,10 @@ +* Copyright (c) 2007 Patrick McHardy + * + * This program is free software; you can redistribute it and/or + + + * (C) Copyright 2001-2006 + * Alex Zeffertt, Cambridge Broadband Ltd, ajz@cambridgebroadband.com + * Re-worked by Ben Greear + * --- + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/macvlan.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/macvlan.c.yml new file mode 100644 index 00000000000..b601ff7e243 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/macvlan.c.yml @@ -0,0 +1,13 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2007 Patrick McHardy + - (c) Copyright 2001-2006 Alex Zeffertt, Cambridge Broadband Ltd, ajz@cambridgebroadband.com + Re-worked +holders: + - Patrick McHardy + - Alex Zeffertt, Cambridge Broadband Ltd, Re-worked +authors: + - Ben Greear diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/usb/hso.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/usb/hso.c new file mode 100644 index 00000000000..f89ef872479 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/usb/hso.c @@ -0,0 +1,10 @@ +* Copyright (C) 2008 Option International + * Filip Aben + * Denis Joseph Barrow + * Jan Dumon + * Copyright (C) 2007 Andrew Bird (Sphere Systems Ltd) + * + * Copyright (C) 2008 Greg Kroah-Hartman + * Copyright (C) 2008 Novell, Inc. + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/usb/hso.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/usb/hso.c.yml new file mode 100644 index 00000000000..412d6b97fe3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/usb/hso.c.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008 Option International Filip Aben Denis Joseph Barrow + Jan Dumon + - Copyright (c) 2007 Andrew Bird (Sphere Systems Ltd) + - Copyright (c) 2008 Greg Kroah-Hartman + - Copyright (c) 2008 Novell, Inc. +holders: + - Option International Filip Aben Denis Joseph Barrow Jan Dumon + - Andrew Bird (Sphere Systems Ltd) + - Greg Kroah-Hartman + - Novell, Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/ath/dfs_pri_detector.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/ath/dfs_pri_detector.c new file mode 100644 index 00000000000..3ec1c4a50b4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/ath/dfs_pri_detector.c @@ -0,0 +1,9 @@ +* Copyright (c) 2012 Neratec Solutions AG + * + * Permission to use, copy, modify, and/or distribute this software for any + + +#define DFS_POOL_STAT_INC(c) (global_dfs_pool_stats.c++) +#define DFS_POOL_STAT_DEC(c) (global_dfs_pool_stats.c--) +#define GET_PRI_TO_USE(MIN, MAX, RUNTIME) \ + (MIN + PRI_TOLERANCE == MAX - PRI_TOLERANCE ? \ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/ath/dfs_pri_detector.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/ath/dfs_pri_detector.c.yml new file mode 100644 index 00000000000..d4049fc3044 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/ath/dfs_pri_detector.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2012 Neratec Solutions AG + - (c) (global_dfs_pool_stats.c++) + - (c) (global_dfs_pool_stats.c-) +holders: + - Neratec Solutions AG + - global_dfs_pool_stats.c + - global_dfs_pool_stats.c diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/intel/ipw2x00/ipw2200.c new file mode 100644 index 00000000000..edac15978e0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/intel/ipw2x00/ipw2200.c @@ -0,0 +1,12054 @@ +/****************************************************************************** + + Copyright(c) 2003 - 2006 Intel Corporation. All rights reserved. + + 802.11 status code portion of this file from ethereal-0.10.6: + Copyright 2000, Axis Communications AB + Ethereal - Network traffic analyzer + By Gerald Combs + Copyright 1998 Gerald Combs + + This program is free software; you can redistribute it and/or modify it + under the terms of version 2 of the GNU General Public License as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 59 + Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + The full GNU General Public License is included in this distribution in the + file called LICENSE. + + Contact Information: + Intel Linux Wireless + Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 + +******************************************************************************/ + +#include +#include +#include +#include "ipw2200.h" +#include "ipw.h" + + +#ifndef KBUILD_EXTMOD +#define VK "k" +#else +#define VK +#endif + +#ifdef CONFIG_IPW2200_DEBUG +#define VD "d" +#else +#define VD +#endif + +#ifdef CONFIG_IPW2200_MONITOR +#define VM "m" +#else +#define VM +#endif + +#ifdef CONFIG_IPW2200_PROMISCUOUS +#define VP "p" +#else +#define VP +#endif + +#ifdef CONFIG_IPW2200_RADIOTAP +#define VR "r" +#else +#define VR +#endif + +#ifdef CONFIG_IPW2200_QOS +#define VQ "q" +#else +#define VQ +#endif + +#define IPW2200_VERSION "1.2.2" VK VD VM VP VR VQ +#define DRV_DESCRIPTION "Intel(R) PRO/Wireless 2200/2915 Network Driver" +#define DRV_COPYRIGHT "Copyright(c) 2003-2006 Intel Corporation" +#define DRV_VERSION IPW2200_VERSION + +#define ETH_P_80211_STATS (ETH_P_80211_RAW + 1) + +MODULE_DESCRIPTION(DRV_DESCRIPTION); +MODULE_VERSION(DRV_VERSION); +MODULE_AUTHOR(DRV_COPYRIGHT); +MODULE_LICENSE("GPL"); +MODULE_FIRMWARE("ipw2200-ibss.fw"); +#ifdef CONFIG_IPW2200_MONITOR +MODULE_FIRMWARE("ipw2200-sniffer.fw"); +#endif +MODULE_FIRMWARE("ipw2200-bss.fw"); + +static int cmdlog = 0; +static int debug = 0; +static int default_channel = 0; +static int network_mode = 0; + +static u32 ipw_debug_level; +static int associate; +static int auto_create = 1; +static int led_support = 1; +static int disable = 0; +static int bt_coexist = 0; +static int hwcrypto = 0; +static int roaming = 1; +static const char ipw_modes[] = { + 'a', 'b', 'g', '?' +}; +static int antenna = CFG_SYS_ANTENNA_BOTH; + +#ifdef CONFIG_IPW2200_PROMISCUOUS +static int rtap_iface = 0; /* def: 0 -- do not create rtap interface */ +#endif + +static struct ieee80211_rate ipw2200_rates[] = { + { .bitrate = 10 }, + { .bitrate = 20, .flags = IEEE80211_RATE_SHORT_PREAMBLE }, + { .bitrate = 55, .flags = IEEE80211_RATE_SHORT_PREAMBLE }, + { .bitrate = 110, .flags = IEEE80211_RATE_SHORT_PREAMBLE }, + { .bitrate = 60 }, + { .bitrate = 90 }, + { .bitrate = 120 }, + { .bitrate = 180 }, + { .bitrate = 240 }, + { .bitrate = 360 }, + { .bitrate = 480 }, + { .bitrate = 540 } +}; + +#define ipw2200_a_rates (ipw2200_rates + 4) +#define ipw2200_num_a_rates 8 +#define ipw2200_bg_rates (ipw2200_rates + 0) +#define ipw2200_num_bg_rates 12 + +/* Ugly macro to convert literal channel numbers into their mhz equivalents + * There are certianly some conditions that will break this (like feeding it '30') + * but they shouldn't arise since nothing talks on channel 30. */ +#define ieee80211chan2mhz(x) \ + (((x) <= 14) ? \ + (((x) == 14) ? 2484 : ((x) * 5) + 2407) : \ + ((x) + 1000) * 5) + +#ifdef CONFIG_IPW2200_QOS +static int qos_enable = 0; +static int qos_burst_enable = 0; +static int qos_no_ack_mask = 0; +static int burst_duration_CCK = 0; +static int burst_duration_OFDM = 0; + +static struct libipw_qos_parameters def_qos_parameters_OFDM = { + {QOS_TX0_CW_MIN_OFDM, QOS_TX1_CW_MIN_OFDM, QOS_TX2_CW_MIN_OFDM, + QOS_TX3_CW_MIN_OFDM}, + {QOS_TX0_CW_MAX_OFDM, QOS_TX1_CW_MAX_OFDM, QOS_TX2_CW_MAX_OFDM, + QOS_TX3_CW_MAX_OFDM}, + {QOS_TX0_AIFS, QOS_TX1_AIFS, QOS_TX2_AIFS, QOS_TX3_AIFS}, + {QOS_TX0_ACM, QOS_TX1_ACM, QOS_TX2_ACM, QOS_TX3_ACM}, + {QOS_TX0_TXOP_LIMIT_OFDM, QOS_TX1_TXOP_LIMIT_OFDM, + QOS_TX2_TXOP_LIMIT_OFDM, QOS_TX3_TXOP_LIMIT_OFDM} +}; + +static struct libipw_qos_parameters def_qos_parameters_CCK = { + {QOS_TX0_CW_MIN_CCK, QOS_TX1_CW_MIN_CCK, QOS_TX2_CW_MIN_CCK, + QOS_TX3_CW_MIN_CCK}, + {QOS_TX0_CW_MAX_CCK, QOS_TX1_CW_MAX_CCK, QOS_TX2_CW_MAX_CCK, + QOS_TX3_CW_MAX_CCK}, + {QOS_TX0_AIFS, QOS_TX1_AIFS, QOS_TX2_AIFS, QOS_TX3_AIFS}, + {QOS_TX0_ACM, QOS_TX1_ACM, QOS_TX2_ACM, QOS_TX3_ACM}, + {QOS_TX0_TXOP_LIMIT_CCK, QOS_TX1_TXOP_LIMIT_CCK, QOS_TX2_TXOP_LIMIT_CCK, + QOS_TX3_TXOP_LIMIT_CCK} +}; + +static struct libipw_qos_parameters def_parameters_OFDM = { + {DEF_TX0_CW_MIN_OFDM, DEF_TX1_CW_MIN_OFDM, DEF_TX2_CW_MIN_OFDM, + DEF_TX3_CW_MIN_OFDM}, + {DEF_TX0_CW_MAX_OFDM, DEF_TX1_CW_MAX_OFDM, DEF_TX2_CW_MAX_OFDM, + DEF_TX3_CW_MAX_OFDM}, + {DEF_TX0_AIFS, DEF_TX1_AIFS, DEF_TX2_AIFS, DEF_TX3_AIFS}, + {DEF_TX0_ACM, DEF_TX1_ACM, DEF_TX2_ACM, DEF_TX3_ACM}, + {DEF_TX0_TXOP_LIMIT_OFDM, DEF_TX1_TXOP_LIMIT_OFDM, + DEF_TX2_TXOP_LIMIT_OFDM, DEF_TX3_TXOP_LIMIT_OFDM} +}; + +static struct libipw_qos_parameters def_parameters_CCK = { + {DEF_TX0_CW_MIN_CCK, DEF_TX1_CW_MIN_CCK, DEF_TX2_CW_MIN_CCK, + DEF_TX3_CW_MIN_CCK}, + {DEF_TX0_CW_MAX_CCK, DEF_TX1_CW_MAX_CCK, DEF_TX2_CW_MAX_CCK, + DEF_TX3_CW_MAX_CCK}, + {DEF_TX0_AIFS, DEF_TX1_AIFS, DEF_TX2_AIFS, DEF_TX3_AIFS}, + {DEF_TX0_ACM, DEF_TX1_ACM, DEF_TX2_ACM, DEF_TX3_ACM}, + {DEF_TX0_TXOP_LIMIT_CCK, DEF_TX1_TXOP_LIMIT_CCK, DEF_TX2_TXOP_LIMIT_CCK, + DEF_TX3_TXOP_LIMIT_CCK} +}; + +static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 }; + +static int from_priority_to_tx_queue[] = { + IPW_TX_QUEUE_1, IPW_TX_QUEUE_2, IPW_TX_QUEUE_2, IPW_TX_QUEUE_1, + IPW_TX_QUEUE_3, IPW_TX_QUEUE_3, IPW_TX_QUEUE_4, IPW_TX_QUEUE_4 +}; + +static u32 ipw_qos_get_burst_duration(struct ipw_priv *priv); + +static int ipw_send_qos_params_command(struct ipw_priv *priv, struct libipw_qos_parameters + *qos_param); +static int ipw_send_qos_info_command(struct ipw_priv *priv, struct libipw_qos_information_element + *qos_param); +#endif /* CONFIG_IPW2200_QOS */ + +static struct iw_statistics *ipw_get_wireless_stats(struct net_device *dev); +static void ipw_remove_current_network(struct ipw_priv *priv); +static void ipw_rx(struct ipw_priv *priv); +static int ipw_queue_tx_reclaim(struct ipw_priv *priv, + struct clx2_tx_queue *txq, int qindex); +static int ipw_queue_reset(struct ipw_priv *priv); + +static int ipw_queue_tx_hcmd(struct ipw_priv *priv, int hcmd, void *buf, + int len, int sync); + +static void ipw_tx_queue_free(struct ipw_priv *); + +static struct ipw_rx_queue *ipw_rx_queue_alloc(struct ipw_priv *); +static void ipw_rx_queue_free(struct ipw_priv *, struct ipw_rx_queue *); +static void ipw_rx_queue_replenish(void *); +static int ipw_up(struct ipw_priv *); +static void ipw_bg_up(struct work_struct *work); +static void ipw_down(struct ipw_priv *); +static void ipw_bg_down(struct work_struct *work); +static int ipw_config(struct ipw_priv *); +static int init_supported_rates(struct ipw_priv *priv, + struct ipw_supported_rates *prates); +static void ipw_set_hwcrypto_keys(struct ipw_priv *); +static void ipw_send_wep_keys(struct ipw_priv *, int); + +static int snprint_line(char *buf, size_t count, + const u8 * data, u32 len, u32 ofs) +{ + int out, i, j, l; + char c; + + out = snprintf(buf, count, "%08X", ofs); + + for (l = 0, i = 0; i < 2; i++) { + out += snprintf(buf + out, count - out, " "); + for (j = 0; j < 8 && l < len; j++, l++) + out += snprintf(buf + out, count - out, "%02X ", + data[(i * 8 + j)]); + for (; j < 8; j++) + out += snprintf(buf + out, count - out, " "); + } + + out += snprintf(buf + out, count - out, " "); + for (l = 0, i = 0; i < 2; i++) { + out += snprintf(buf + out, count - out, " "); + for (j = 0; j < 8 && l < len; j++, l++) { + c = data[(i * 8 + j)]; + if (!isascii(c) || !isprint(c)) + c = '.'; + + out += snprintf(buf + out, count - out, "%c", c); + } + + for (; j < 8; j++) + out += snprintf(buf + out, count - out, " "); + } + + return out; +} + +static void printk_buf(int level, const u8 * data, u32 len) +{ + char line[81]; + u32 ofs = 0; + if (!(ipw_debug_level & level)) + return; + + while (len) { + snprint_line(line, sizeof(line), &data[ofs], + min(len, 16U), ofs); + printk(KERN_DEBUG "%s\n", line); + ofs += 16; + len -= min(len, 16U); + } +} + +static int snprintk_buf(u8 * output, size_t size, const u8 * data, size_t len) +{ + size_t out = size; + u32 ofs = 0; + int total = 0; + + while (size && len) { + out = snprint_line(output, size, &data[ofs], + min_t(size_t, len, 16U), ofs); + + ofs += 16; + output += out; + size -= out; + len -= min_t(size_t, len, 16U); + total += out; + } + return total; +} + +/* alias for 32-bit indirect read (for SRAM/reg above 4K), with debug wrapper */ +static u32 _ipw_read_reg32(struct ipw_priv *priv, u32 reg); +#define ipw_read_reg32(a, b) _ipw_read_reg32(a, b) + +/* alias for 8-bit indirect read (for SRAM/reg above 4K), with debug wrapper */ +static u8 _ipw_read_reg8(struct ipw_priv *ipw, u32 reg); +#define ipw_read_reg8(a, b) _ipw_read_reg8(a, b) + +/* 8-bit indirect write (for SRAM/reg above 4K), with debug wrapper */ +static void _ipw_write_reg8(struct ipw_priv *priv, u32 reg, u8 value); +static inline void ipw_write_reg8(struct ipw_priv *a, u32 b, u8 c) +{ + IPW_DEBUG_IO("%s %d: write_indirect8(0x%08X, 0x%08X)\n", __FILE__, + __LINE__, (u32) (b), (u32) (c)); + _ipw_write_reg8(a, b, c); +} + +/* 16-bit indirect write (for SRAM/reg above 4K), with debug wrapper */ +static void _ipw_write_reg16(struct ipw_priv *priv, u32 reg, u16 value); +static inline void ipw_write_reg16(struct ipw_priv *a, u32 b, u16 c) +{ + IPW_DEBUG_IO("%s %d: write_indirect16(0x%08X, 0x%08X)\n", __FILE__, + __LINE__, (u32) (b), (u32) (c)); + _ipw_write_reg16(a, b, c); +} + +/* 32-bit indirect write (for SRAM/reg above 4K), with debug wrapper */ +static void _ipw_write_reg32(struct ipw_priv *priv, u32 reg, u32 value); +static inline void ipw_write_reg32(struct ipw_priv *a, u32 b, u32 c) +{ + IPW_DEBUG_IO("%s %d: write_indirect32(0x%08X, 0x%08X)\n", __FILE__, + __LINE__, (u32) (b), (u32) (c)); + _ipw_write_reg32(a, b, c); +} + +/* 8-bit direct write (low 4K) */ +static inline void _ipw_write8(struct ipw_priv *ipw, unsigned long ofs, + u8 val) +{ + writeb(val, ipw->hw_base + ofs); +} + +/* 8-bit direct write (for low 4K of SRAM/regs), with debug wrapper */ +#define ipw_write8(ipw, ofs, val) do { \ + IPW_DEBUG_IO("%s %d: write_direct8(0x%08X, 0x%08X)\n", __FILE__, \ + __LINE__, (u32)(ofs), (u32)(val)); \ + _ipw_write8(ipw, ofs, val); \ +} while (0) + +/* 16-bit direct write (low 4K) */ +static inline void _ipw_write16(struct ipw_priv *ipw, unsigned long ofs, + u16 val) +{ + writew(val, ipw->hw_base + ofs); +} + +/* 16-bit direct write (for low 4K of SRAM/regs), with debug wrapper */ +#define ipw_write16(ipw, ofs, val) do { \ + IPW_DEBUG_IO("%s %d: write_direct16(0x%08X, 0x%08X)\n", __FILE__, \ + __LINE__, (u32)(ofs), (u32)(val)); \ + _ipw_write16(ipw, ofs, val); \ +} while (0) + +/* 32-bit direct write (low 4K) */ +static inline void _ipw_write32(struct ipw_priv *ipw, unsigned long ofs, + u32 val) +{ + writel(val, ipw->hw_base + ofs); +} + +/* 32-bit direct write (for low 4K of SRAM/regs), with debug wrapper */ +#define ipw_write32(ipw, ofs, val) do { \ + IPW_DEBUG_IO("%s %d: write_direct32(0x%08X, 0x%08X)\n", __FILE__, \ + __LINE__, (u32)(ofs), (u32)(val)); \ + _ipw_write32(ipw, ofs, val); \ +} while (0) + +/* 8-bit direct read (low 4K) */ +static inline u8 _ipw_read8(struct ipw_priv *ipw, unsigned long ofs) +{ + return readb(ipw->hw_base + ofs); +} + +/* alias to 8-bit direct read (low 4K of SRAM/regs), with debug wrapper */ +#define ipw_read8(ipw, ofs) ({ \ + IPW_DEBUG_IO("%s %d: read_direct8(0x%08X)\n", __FILE__, __LINE__, \ + (u32)(ofs)); \ + _ipw_read8(ipw, ofs); \ +}) + +/* 16-bit direct read (low 4K) */ +static inline u16 _ipw_read16(struct ipw_priv *ipw, unsigned long ofs) +{ + return readw(ipw->hw_base + ofs); +} + +/* alias to 16-bit direct read (low 4K of SRAM/regs), with debug wrapper */ +#define ipw_read16(ipw, ofs) ({ \ + IPW_DEBUG_IO("%s %d: read_direct16(0x%08X)\n", __FILE__, __LINE__, \ + (u32)(ofs)); \ + _ipw_read16(ipw, ofs); \ +}) + +/* 32-bit direct read (low 4K) */ +static inline u32 _ipw_read32(struct ipw_priv *ipw, unsigned long ofs) +{ + return readl(ipw->hw_base + ofs); +} + +/* alias to 32-bit direct read (low 4K of SRAM/regs), with debug wrapper */ +#define ipw_read32(ipw, ofs) ({ \ + IPW_DEBUG_IO("%s %d: read_direct32(0x%08X)\n", __FILE__, __LINE__, \ + (u32)(ofs)); \ + _ipw_read32(ipw, ofs); \ +}) + +static void _ipw_read_indirect(struct ipw_priv *, u32, u8 *, int); +/* alias to multi-byte read (SRAM/regs above 4K), with debug wrapper */ +#define ipw_read_indirect(a, b, c, d) ({ \ + IPW_DEBUG_IO("%s %d: read_indirect(0x%08X) %u bytes\n", __FILE__, \ + __LINE__, (u32)(b), (u32)(d)); \ + _ipw_read_indirect(a, b, c, d); \ +}) + +/* alias to multi-byte read (SRAM/regs above 4K), with debug wrapper */ +static void _ipw_write_indirect(struct ipw_priv *priv, u32 addr, u8 * data, + int num); +#define ipw_write_indirect(a, b, c, d) do { \ + IPW_DEBUG_IO("%s %d: write_indirect(0x%08X) %u bytes\n", __FILE__, \ + __LINE__, (u32)(b), (u32)(d)); \ + _ipw_write_indirect(a, b, c, d); \ +} while (0) + +/* 32-bit indirect write (above 4K) */ +static void _ipw_write_reg32(struct ipw_priv *priv, u32 reg, u32 value) +{ + IPW_DEBUG_IO(" %p : reg = 0x%8X : value = 0x%8X\n", priv, reg, value); + _ipw_write32(priv, IPW_INDIRECT_ADDR, reg); + _ipw_write32(priv, IPW_INDIRECT_DATA, value); +} + +/* 8-bit indirect write (above 4K) */ +static void _ipw_write_reg8(struct ipw_priv *priv, u32 reg, u8 value) +{ + u32 aligned_addr = reg & IPW_INDIRECT_ADDR_MASK; /* dword align */ + u32 dif_len = reg - aligned_addr; + + IPW_DEBUG_IO(" reg = 0x%8X : value = 0x%8X\n", reg, value); + _ipw_write32(priv, IPW_INDIRECT_ADDR, aligned_addr); + _ipw_write8(priv, IPW_INDIRECT_DATA + dif_len, value); +} + +/* 16-bit indirect write (above 4K) */ +static void _ipw_write_reg16(struct ipw_priv *priv, u32 reg, u16 value) +{ + u32 aligned_addr = reg & IPW_INDIRECT_ADDR_MASK; /* dword align */ + u32 dif_len = (reg - aligned_addr) & (~0x1ul); + + IPW_DEBUG_IO(" reg = 0x%8X : value = 0x%8X\n", reg, value); + _ipw_write32(priv, IPW_INDIRECT_ADDR, aligned_addr); + _ipw_write16(priv, IPW_INDIRECT_DATA + dif_len, value); +} + +/* 8-bit indirect read (above 4K) */ +static u8 _ipw_read_reg8(struct ipw_priv *priv, u32 reg) +{ + u32 word; + _ipw_write32(priv, IPW_INDIRECT_ADDR, reg & IPW_INDIRECT_ADDR_MASK); + IPW_DEBUG_IO(" reg = 0x%8X :\n", reg); + word = _ipw_read32(priv, IPW_INDIRECT_DATA); + return (word >> ((reg & 0x3) * 8)) & 0xff; +} + +/* 32-bit indirect read (above 4K) */ +static u32 _ipw_read_reg32(struct ipw_priv *priv, u32 reg) +{ + u32 value; + + IPW_DEBUG_IO("%p : reg = 0x%08x\n", priv, reg); + + _ipw_write32(priv, IPW_INDIRECT_ADDR, reg); + value = _ipw_read32(priv, IPW_INDIRECT_DATA); + IPW_DEBUG_IO(" reg = 0x%4X : value = 0x%4x\n", reg, value); + return value; +} + +/* General purpose, no alignment requirement, iterative (multi-byte) read, */ +/* for area above 1st 4K of SRAM/reg space */ +static void _ipw_read_indirect(struct ipw_priv *priv, u32 addr, u8 * buf, + int num) +{ + u32 aligned_addr = addr & IPW_INDIRECT_ADDR_MASK; /* dword align */ + u32 dif_len = addr - aligned_addr; + u32 i; + + IPW_DEBUG_IO("addr = %i, buf = %p, num = %i\n", addr, buf, num); + + if (num <= 0) { + return; + } + + /* Read the first dword (or portion) byte by byte */ + if (unlikely(dif_len)) { + _ipw_write32(priv, IPW_INDIRECT_ADDR, aligned_addr); + /* Start reading at aligned_addr + dif_len */ + for (i = dif_len; ((i < 4) && (num > 0)); i++, num--) + *buf++ = _ipw_read8(priv, IPW_INDIRECT_DATA + i); + aligned_addr += 4; + } + + /* Read all of the middle dwords as dwords, with auto-increment */ + _ipw_write32(priv, IPW_AUTOINC_ADDR, aligned_addr); + for (; num >= 4; buf += 4, aligned_addr += 4, num -= 4) + *(u32 *) buf = _ipw_read32(priv, IPW_AUTOINC_DATA); + + /* Read the last dword (or portion) byte by byte */ + if (unlikely(num)) { + _ipw_write32(priv, IPW_INDIRECT_ADDR, aligned_addr); + for (i = 0; num > 0; i++, num--) + *buf++ = ipw_read8(priv, IPW_INDIRECT_DATA + i); + } +} + +/* General purpose, no alignment requirement, iterative (multi-byte) write, */ +/* for area above 1st 4K of SRAM/reg space */ +static void _ipw_write_indirect(struct ipw_priv *priv, u32 addr, u8 * buf, + int num) +{ + u32 aligned_addr = addr & IPW_INDIRECT_ADDR_MASK; /* dword align */ + u32 dif_len = addr - aligned_addr; + u32 i; + + IPW_DEBUG_IO("addr = %i, buf = %p, num = %i\n", addr, buf, num); + + if (num <= 0) { + return; + } + + /* Write the first dword (or portion) byte by byte */ + if (unlikely(dif_len)) { + _ipw_write32(priv, IPW_INDIRECT_ADDR, aligned_addr); + /* Start writing at aligned_addr + dif_len */ + for (i = dif_len; ((i < 4) && (num > 0)); i++, num--, buf++) + _ipw_write8(priv, IPW_INDIRECT_DATA + i, *buf); + aligned_addr += 4; + } + + /* Write all of the middle dwords as dwords, with auto-increment */ + _ipw_write32(priv, IPW_AUTOINC_ADDR, aligned_addr); + for (; num >= 4; buf += 4, aligned_addr += 4, num -= 4) + _ipw_write32(priv, IPW_AUTOINC_DATA, *(u32 *) buf); + + /* Write the last dword (or portion) byte by byte */ + if (unlikely(num)) { + _ipw_write32(priv, IPW_INDIRECT_ADDR, aligned_addr); + for (i = 0; num > 0; i++, num--, buf++) + _ipw_write8(priv, IPW_INDIRECT_DATA + i, *buf); + } +} + +/* General purpose, no alignment requirement, iterative (multi-byte) write, */ +/* for 1st 4K of SRAM/regs space */ +static void ipw_write_direct(struct ipw_priv *priv, u32 addr, void *buf, + int num) +{ + memcpy_toio((priv->hw_base + addr), buf, num); +} + +/* Set bit(s) in low 4K of SRAM/regs */ +static inline void ipw_set_bit(struct ipw_priv *priv, u32 reg, u32 mask) +{ + ipw_write32(priv, reg, ipw_read32(priv, reg) | mask); +} + +/* Clear bit(s) in low 4K of SRAM/regs */ +static inline void ipw_clear_bit(struct ipw_priv *priv, u32 reg, u32 mask) +{ + ipw_write32(priv, reg, ipw_read32(priv, reg) & ~mask); +} + +static inline void __ipw_enable_interrupts(struct ipw_priv *priv) +{ + if (priv->status & STATUS_INT_ENABLED) + return; + priv->status |= STATUS_INT_ENABLED; + ipw_write32(priv, IPW_INTA_MASK_R, IPW_INTA_MASK_ALL); +} + +static inline void __ipw_disable_interrupts(struct ipw_priv *priv) +{ + if (!(priv->status & STATUS_INT_ENABLED)) + return; + priv->status &= ~STATUS_INT_ENABLED; + ipw_write32(priv, IPW_INTA_MASK_R, ~IPW_INTA_MASK_ALL); +} + +static inline void ipw_enable_interrupts(struct ipw_priv *priv) +{ + unsigned long flags; + + spin_lock_irqsave(&priv->irq_lock, flags); + __ipw_enable_interrupts(priv); + spin_unlock_irqrestore(&priv->irq_lock, flags); +} + +static inline void ipw_disable_interrupts(struct ipw_priv *priv) +{ + unsigned long flags; + + spin_lock_irqsave(&priv->irq_lock, flags); + __ipw_disable_interrupts(priv); + spin_unlock_irqrestore(&priv->irq_lock, flags); +} + +static char *ipw_error_desc(u32 val) +{ + switch (val) { + case IPW_FW_ERROR_OK: + return "ERROR_OK"; + case IPW_FW_ERROR_FAIL: + return "ERROR_FAIL"; + case IPW_FW_ERROR_MEMORY_UNDERFLOW: + return "MEMORY_UNDERFLOW"; + case IPW_FW_ERROR_MEMORY_OVERFLOW: + return "MEMORY_OVERFLOW"; + case IPW_FW_ERROR_BAD_PARAM: + return "BAD_PARAM"; + case IPW_FW_ERROR_BAD_CHECKSUM: + return "BAD_CHECKSUM"; + case IPW_FW_ERROR_NMI_INTERRUPT: + return "NMI_INTERRUPT"; + case IPW_FW_ERROR_BAD_DATABASE: + return "BAD_DATABASE"; + case IPW_FW_ERROR_ALLOC_FAIL: + return "ALLOC_FAIL"; + case IPW_FW_ERROR_DMA_UNDERRUN: + return "DMA_UNDERRUN"; + case IPW_FW_ERROR_DMA_STATUS: + return "DMA_STATUS"; + case IPW_FW_ERROR_DINO_ERROR: + return "DINO_ERROR"; + case IPW_FW_ERROR_EEPROM_ERROR: + return "EEPROM_ERROR"; + case IPW_FW_ERROR_SYSASSERT: + return "SYSASSERT"; + case IPW_FW_ERROR_FATAL_ERROR: + return "FATAL_ERROR"; + default: + return "UNKNOWN_ERROR"; + } +} + +static void ipw_dump_error_log(struct ipw_priv *priv, + struct ipw_fw_error *error) +{ + u32 i; + + if (!error) { + IPW_ERROR("Error allocating and capturing error log. " + "Nothing to dump.\n"); + return; + } + + IPW_ERROR("Start IPW Error Log Dump:\n"); + IPW_ERROR("Status: 0x%08X, Config: %08X\n", + error->status, error->config); + + for (i = 0; i < error->elem_len; i++) + IPW_ERROR("%s %i 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x\n", + ipw_error_desc(error->elem[i].desc), + error->elem[i].time, + error->elem[i].blink1, + error->elem[i].blink2, + error->elem[i].link1, + error->elem[i].link2, error->elem[i].data); + for (i = 0; i < error->log_len; i++) + IPW_ERROR("%i\t0x%08x\t%i\n", + error->log[i].time, + error->log[i].data, error->log[i].event); +} + +static inline int ipw_is_init(struct ipw_priv *priv) +{ + return (priv->status & STATUS_INIT) ? 1 : 0; +} + +static int ipw_get_ordinal(struct ipw_priv *priv, u32 ord, void *val, u32 * len) +{ + u32 addr, field_info, field_len, field_count, total_len; + + IPW_DEBUG_ORD("ordinal = %i\n", ord); + + if (!priv || !val || !len) { + IPW_DEBUG_ORD("Invalid argument\n"); + return -EINVAL; + } + + /* verify device ordinal tables have been initialized */ + if (!priv->table0_addr || !priv->table1_addr || !priv->table2_addr) { + IPW_DEBUG_ORD("Access ordinals before initialization\n"); + return -EINVAL; + } + + switch (IPW_ORD_TABLE_ID_MASK & ord) { + case IPW_ORD_TABLE_0_MASK: + /* + * TABLE 0: Direct access to a table of 32 bit values + * + * This is a very simple table with the data directly + * read from the table + */ + + /* remove the table id from the ordinal */ + ord &= IPW_ORD_TABLE_VALUE_MASK; + + /* boundary check */ + if (ord > priv->table0_len) { + IPW_DEBUG_ORD("ordinal value (%i) longer then " + "max (%i)\n", ord, priv->table0_len); + return -EINVAL; + } + + /* verify we have enough room to store the value */ + if (*len < sizeof(u32)) { + IPW_DEBUG_ORD("ordinal buffer length too small, " + "need %zd\n", sizeof(u32)); + return -EINVAL; + } + + IPW_DEBUG_ORD("Reading TABLE0[%i] from offset 0x%08x\n", + ord, priv->table0_addr + (ord << 2)); + + *len = sizeof(u32); + ord <<= 2; + *((u32 *) val) = ipw_read32(priv, priv->table0_addr + ord); + break; + + case IPW_ORD_TABLE_1_MASK: + /* + * TABLE 1: Indirect access to a table of 32 bit values + * + * This is a fairly large table of u32 values each + * representing starting addr for the data (which is + * also a u32) + */ + + /* remove the table id from the ordinal */ + ord &= IPW_ORD_TABLE_VALUE_MASK; + + /* boundary check */ + if (ord > priv->table1_len) { + IPW_DEBUG_ORD("ordinal value too long\n"); + return -EINVAL; + } + + /* verify we have enough room to store the value */ + if (*len < sizeof(u32)) { + IPW_DEBUG_ORD("ordinal buffer length too small, " + "need %zd\n", sizeof(u32)); + return -EINVAL; + } + + *((u32 *) val) = + ipw_read_reg32(priv, (priv->table1_addr + (ord << 2))); + *len = sizeof(u32); + break; + + case IPW_ORD_TABLE_2_MASK: + /* + * TABLE 2: Indirect access to a table of variable sized values + * + * This table consist of six values, each containing + * - dword containing the starting offset of the data + * - dword containing the lengh in the first 16bits + * and the count in the second 16bits + */ + + /* remove the table id from the ordinal */ + ord &= IPW_ORD_TABLE_VALUE_MASK; + + /* boundary check */ + if (ord > priv->table2_len) { + IPW_DEBUG_ORD("ordinal value too long\n"); + return -EINVAL; + } + + /* get the address of statistic */ + addr = ipw_read_reg32(priv, priv->table2_addr + (ord << 3)); + + /* get the second DW of statistics ; + * two 16-bit words - first is length, second is count */ + field_info = + ipw_read_reg32(priv, + priv->table2_addr + (ord << 3) + + sizeof(u32)); + + /* get each entry length */ + field_len = *((u16 *) & field_info); + + /* get number of entries */ + field_count = *(((u16 *) & field_info) + 1); + + /* abort if not enough memory */ + total_len = field_len * field_count; + if (total_len > *len) { + *len = total_len; + return -EINVAL; + } + + *len = total_len; + if (!total_len) + return 0; + + IPW_DEBUG_ORD("addr = 0x%08x, total_len = %i, " + "field_info = 0x%08x\n", + addr, total_len, field_info); + ipw_read_indirect(priv, addr, val, total_len); + break; + + default: + IPW_DEBUG_ORD("Invalid ordinal!\n"); + return -EINVAL; + + } + + return 0; +} + +static void ipw_init_ordinals(struct ipw_priv *priv) +{ + priv->table0_addr = IPW_ORDINALS_TABLE_LOWER; + priv->table0_len = ipw_read32(priv, priv->table0_addr); + + IPW_DEBUG_ORD("table 0 offset at 0x%08x, len = %i\n", + priv->table0_addr, priv->table0_len); + + priv->table1_addr = ipw_read32(priv, IPW_ORDINALS_TABLE_1); + priv->table1_len = ipw_read_reg32(priv, priv->table1_addr); + + IPW_DEBUG_ORD("table 1 offset at 0x%08x, len = %i\n", + priv->table1_addr, priv->table1_len); + + priv->table2_addr = ipw_read32(priv, IPW_ORDINALS_TABLE_2); + priv->table2_len = ipw_read_reg32(priv, priv->table2_addr); + priv->table2_len &= 0x0000ffff; /* use first two bytes */ + + IPW_DEBUG_ORD("table 2 offset at 0x%08x, len = %i\n", + priv->table2_addr, priv->table2_len); + +} + +static u32 ipw_register_toggle(u32 reg) +{ + reg &= ~IPW_START_STANDBY; + if (reg & IPW_GATE_ODMA) + reg &= ~IPW_GATE_ODMA; + if (reg & IPW_GATE_IDMA) + reg &= ~IPW_GATE_IDMA; + if (reg & IPW_GATE_ADMA) + reg &= ~IPW_GATE_ADMA; + return reg; +} + +/* + * LED behavior: + * - On radio ON, turn on any LEDs that require to be on during start + * - On initialization, start unassociated blink + * - On association, disable unassociated blink + * - On disassociation, start unassociated blink + * - On radio OFF, turn off any LEDs started during radio on + * + */ +#define LD_TIME_LINK_ON msecs_to_jiffies(300) +#define LD_TIME_LINK_OFF msecs_to_jiffies(2700) +#define LD_TIME_ACT_ON msecs_to_jiffies(250) + +static void ipw_led_link_on(struct ipw_priv *priv) +{ + unsigned long flags; + u32 led; + + /* If configured to not use LEDs, or nic_type is 1, + * then we don't toggle a LINK led */ + if (priv->config & CFG_NO_LED || priv->nic_type == EEPROM_NIC_TYPE_1) + return; + + spin_lock_irqsave(&priv->lock, flags); + + if (!(priv->status & STATUS_RF_KILL_MASK) && + !(priv->status & STATUS_LED_LINK_ON)) { + IPW_DEBUG_LED("Link LED On\n"); + led = ipw_read_reg32(priv, IPW_EVENT_REG); + led |= priv->led_association_on; + + led = ipw_register_toggle(led); + + IPW_DEBUG_LED("Reg: 0x%08X\n", led); + ipw_write_reg32(priv, IPW_EVENT_REG, led); + + priv->status |= STATUS_LED_LINK_ON; + + /* If we aren't associated, schedule turning the LED off */ + if (!(priv->status & STATUS_ASSOCIATED)) + schedule_delayed_work(&priv->led_link_off, + LD_TIME_LINK_ON); + } + + spin_unlock_irqrestore(&priv->lock, flags); +} + +static void ipw_bg_led_link_on(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, led_link_on.work); + mutex_lock(&priv->mutex); + ipw_led_link_on(priv); + mutex_unlock(&priv->mutex); +} + +static void ipw_led_link_off(struct ipw_priv *priv) +{ + unsigned long flags; + u32 led; + + /* If configured not to use LEDs, or nic type is 1, + * then we don't goggle the LINK led. */ + if (priv->config & CFG_NO_LED || priv->nic_type == EEPROM_NIC_TYPE_1) + return; + + spin_lock_irqsave(&priv->lock, flags); + + if (priv->status & STATUS_LED_LINK_ON) { + led = ipw_read_reg32(priv, IPW_EVENT_REG); + led &= priv->led_association_off; + led = ipw_register_toggle(led); + + IPW_DEBUG_LED("Reg: 0x%08X\n", led); + ipw_write_reg32(priv, IPW_EVENT_REG, led); + + IPW_DEBUG_LED("Link LED Off\n"); + + priv->status &= ~STATUS_LED_LINK_ON; + + /* If we aren't associated and the radio is on, schedule + * turning the LED on (blink while unassociated) */ + if (!(priv->status & STATUS_RF_KILL_MASK) && + !(priv->status & STATUS_ASSOCIATED)) + schedule_delayed_work(&priv->led_link_on, + LD_TIME_LINK_OFF); + + } + + spin_unlock_irqrestore(&priv->lock, flags); +} + +static void ipw_bg_led_link_off(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, led_link_off.work); + mutex_lock(&priv->mutex); + ipw_led_link_off(priv); + mutex_unlock(&priv->mutex); +} + +static void __ipw_led_activity_on(struct ipw_priv *priv) +{ + u32 led; + + if (priv->config & CFG_NO_LED) + return; + + if (priv->status & STATUS_RF_KILL_MASK) + return; + + if (!(priv->status & STATUS_LED_ACT_ON)) { + led = ipw_read_reg32(priv, IPW_EVENT_REG); + led |= priv->led_activity_on; + + led = ipw_register_toggle(led); + + IPW_DEBUG_LED("Reg: 0x%08X\n", led); + ipw_write_reg32(priv, IPW_EVENT_REG, led); + + IPW_DEBUG_LED("Activity LED On\n"); + + priv->status |= STATUS_LED_ACT_ON; + + cancel_delayed_work(&priv->led_act_off); + schedule_delayed_work(&priv->led_act_off, LD_TIME_ACT_ON); + } else { + /* Reschedule LED off for full time period */ + cancel_delayed_work(&priv->led_act_off); + schedule_delayed_work(&priv->led_act_off, LD_TIME_ACT_ON); + } +} + +#if 0 +void ipw_led_activity_on(struct ipw_priv *priv) +{ + unsigned long flags; + spin_lock_irqsave(&priv->lock, flags); + __ipw_led_activity_on(priv); + spin_unlock_irqrestore(&priv->lock, flags); +} +#endif /* 0 */ + +static void ipw_led_activity_off(struct ipw_priv *priv) +{ + unsigned long flags; + u32 led; + + if (priv->config & CFG_NO_LED) + return; + + spin_lock_irqsave(&priv->lock, flags); + + if (priv->status & STATUS_LED_ACT_ON) { + led = ipw_read_reg32(priv, IPW_EVENT_REG); + led &= priv->led_activity_off; + + led = ipw_register_toggle(led); + + IPW_DEBUG_LED("Reg: 0x%08X\n", led); + ipw_write_reg32(priv, IPW_EVENT_REG, led); + + IPW_DEBUG_LED("Activity LED Off\n"); + + priv->status &= ~STATUS_LED_ACT_ON; + } + + spin_unlock_irqrestore(&priv->lock, flags); +} + +static void ipw_bg_led_activity_off(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, led_act_off.work); + mutex_lock(&priv->mutex); + ipw_led_activity_off(priv); + mutex_unlock(&priv->mutex); +} + +static void ipw_led_band_on(struct ipw_priv *priv) +{ + unsigned long flags; + u32 led; + + /* Only nic type 1 supports mode LEDs */ + if (priv->config & CFG_NO_LED || + priv->nic_type != EEPROM_NIC_TYPE_1 || !priv->assoc_network) + return; + + spin_lock_irqsave(&priv->lock, flags); + + led = ipw_read_reg32(priv, IPW_EVENT_REG); + if (priv->assoc_network->mode == IEEE_A) { + led |= priv->led_ofdm_on; + led &= priv->led_association_off; + IPW_DEBUG_LED("Mode LED On: 802.11a\n"); + } else if (priv->assoc_network->mode == IEEE_G) { + led |= priv->led_ofdm_on; + led |= priv->led_association_on; + IPW_DEBUG_LED("Mode LED On: 802.11g\n"); + } else { + led &= priv->led_ofdm_off; + led |= priv->led_association_on; + IPW_DEBUG_LED("Mode LED On: 802.11b\n"); + } + + led = ipw_register_toggle(led); + + IPW_DEBUG_LED("Reg: 0x%08X\n", led); + ipw_write_reg32(priv, IPW_EVENT_REG, led); + + spin_unlock_irqrestore(&priv->lock, flags); +} + +static void ipw_led_band_off(struct ipw_priv *priv) +{ + unsigned long flags; + u32 led; + + /* Only nic type 1 supports mode LEDs */ + if (priv->config & CFG_NO_LED || priv->nic_type != EEPROM_NIC_TYPE_1) + return; + + spin_lock_irqsave(&priv->lock, flags); + + led = ipw_read_reg32(priv, IPW_EVENT_REG); + led &= priv->led_ofdm_off; + led &= priv->led_association_off; + + led = ipw_register_toggle(led); + + IPW_DEBUG_LED("Reg: 0x%08X\n", led); + ipw_write_reg32(priv, IPW_EVENT_REG, led); + + spin_unlock_irqrestore(&priv->lock, flags); +} + +static void ipw_led_radio_on(struct ipw_priv *priv) +{ + ipw_led_link_on(priv); +} + +static void ipw_led_radio_off(struct ipw_priv *priv) +{ + ipw_led_activity_off(priv); + ipw_led_link_off(priv); +} + +static void ipw_led_link_up(struct ipw_priv *priv) +{ + /* Set the Link Led on for all nic types */ + ipw_led_link_on(priv); +} + +static void ipw_led_link_down(struct ipw_priv *priv) +{ + ipw_led_activity_off(priv); + ipw_led_link_off(priv); + + if (priv->status & STATUS_RF_KILL_MASK) + ipw_led_radio_off(priv); +} + +static void ipw_led_init(struct ipw_priv *priv) +{ + priv->nic_type = priv->eeprom[EEPROM_NIC_TYPE]; + + /* Set the default PINs for the link and activity leds */ + priv->led_activity_on = IPW_ACTIVITY_LED; + priv->led_activity_off = ~(IPW_ACTIVITY_LED); + + priv->led_association_on = IPW_ASSOCIATED_LED; + priv->led_association_off = ~(IPW_ASSOCIATED_LED); + + /* Set the default PINs for the OFDM leds */ + priv->led_ofdm_on = IPW_OFDM_LED; + priv->led_ofdm_off = ~(IPW_OFDM_LED); + + switch (priv->nic_type) { + case EEPROM_NIC_TYPE_1: + /* In this NIC type, the LEDs are reversed.... */ + priv->led_activity_on = IPW_ASSOCIATED_LED; + priv->led_activity_off = ~(IPW_ASSOCIATED_LED); + priv->led_association_on = IPW_ACTIVITY_LED; + priv->led_association_off = ~(IPW_ACTIVITY_LED); + + if (!(priv->config & CFG_NO_LED)) + ipw_led_band_on(priv); + + /* And we don't blink link LEDs for this nic, so + * just return here */ + return; + + case EEPROM_NIC_TYPE_3: + case EEPROM_NIC_TYPE_2: + case EEPROM_NIC_TYPE_4: + case EEPROM_NIC_TYPE_0: + break; + + default: + IPW_DEBUG_INFO("Unknown NIC type from EEPROM: %d\n", + priv->nic_type); + priv->nic_type = EEPROM_NIC_TYPE_0; + break; + } + + if (!(priv->config & CFG_NO_LED)) { + if (priv->status & STATUS_ASSOCIATED) + ipw_led_link_on(priv); + else + ipw_led_link_off(priv); + } +} + +static void ipw_led_shutdown(struct ipw_priv *priv) +{ + ipw_led_activity_off(priv); + ipw_led_link_off(priv); + ipw_led_band_off(priv); + cancel_delayed_work(&priv->led_link_on); + cancel_delayed_work(&priv->led_link_off); + cancel_delayed_work(&priv->led_act_off); +} + +/* + * The following adds a new attribute to the sysfs representation + * of this device driver (i.e. a new file in /sys/bus/pci/drivers/ipw/) + * used for controlling the debug level. + * + * See the level definitions in ipw for details. + */ +static ssize_t debug_level_show(struct device_driver *d, char *buf) +{ + return sprintf(buf, "0x%08X\n", ipw_debug_level); +} + +static ssize_t debug_level_store(struct device_driver *d, const char *buf, + size_t count) +{ + char *p = (char *)buf; + u32 val; + + if (p[1] == 'x' || p[1] == 'X' || p[0] == 'x' || p[0] == 'X') { + p++; + if (p[0] == 'x' || p[0] == 'X') + p++; + val = simple_strtoul(p, &p, 16); + } else + val = simple_strtoul(p, &p, 10); + if (p == buf) + printk(KERN_INFO DRV_NAME + ": %s is not in hex or decimal form.\n", buf); + else + ipw_debug_level = val; + + return strnlen(buf, count); +} +static DRIVER_ATTR_RW(debug_level); + +static inline u32 ipw_get_event_log_len(struct ipw_priv *priv) +{ + /* length = 1st dword in log */ + return ipw_read_reg32(priv, ipw_read32(priv, IPW_EVENT_LOG)); +} + +static void ipw_capture_event_log(struct ipw_priv *priv, + u32 log_len, struct ipw_event *log) +{ + u32 base; + + if (log_len) { + base = ipw_read32(priv, IPW_EVENT_LOG); + ipw_read_indirect(priv, base + sizeof(base) + sizeof(u32), + (u8 *) log, sizeof(*log) * log_len); + } +} + +static struct ipw_fw_error *ipw_alloc_error_log(struct ipw_priv *priv) +{ + struct ipw_fw_error *error; + u32 log_len = ipw_get_event_log_len(priv); + u32 base = ipw_read32(priv, IPW_ERROR_LOG); + u32 elem_len = ipw_read_reg32(priv, base); + + error = kmalloc(sizeof(*error) + + sizeof(*error->elem) * elem_len + + sizeof(*error->log) * log_len, GFP_ATOMIC); + if (!error) { + IPW_ERROR("Memory allocation for firmware error log " + "failed.\n"); + return NULL; + } + error->jiffies = jiffies; + error->status = priv->status; + error->config = priv->config; + error->elem_len = elem_len; + error->log_len = log_len; + error->elem = (struct ipw_error_elem *)error->payload; + error->log = (struct ipw_event *)(error->elem + elem_len); + + ipw_capture_event_log(priv, log_len, error->log); + + if (elem_len) + ipw_read_indirect(priv, base + sizeof(base), (u8 *) error->elem, + sizeof(*error->elem) * elem_len); + + return error; +} + +static ssize_t show_event_log(struct device *d, + struct device_attribute *attr, char *buf) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + u32 log_len = ipw_get_event_log_len(priv); + u32 log_size; + struct ipw_event *log; + u32 len = 0, i; + + /* not using min() because of its strict type checking */ + log_size = PAGE_SIZE / sizeof(*log) > log_len ? + sizeof(*log) * log_len : PAGE_SIZE; + log = kzalloc(log_size, GFP_KERNEL); + if (!log) { + IPW_ERROR("Unable to allocate memory for log\n"); + return 0; + } + log_len = log_size / sizeof(*log); + ipw_capture_event_log(priv, log_len, log); + + len += snprintf(buf + len, PAGE_SIZE - len, "%08X", log_len); + for (i = 0; i < log_len; i++) + len += snprintf(buf + len, PAGE_SIZE - len, + "\n%08X%08X%08X", + log[i].time, log[i].event, log[i].data); + len += snprintf(buf + len, PAGE_SIZE - len, "\n"); + kfree(log); + return len; +} + +static DEVICE_ATTR(event_log, 0444, show_event_log, NULL); + +static ssize_t show_error(struct device *d, + struct device_attribute *attr, char *buf) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + u32 len = 0, i; + if (!priv->error) + return 0; + len += snprintf(buf + len, PAGE_SIZE - len, + "%08lX%08X%08X%08X", + priv->error->jiffies, + priv->error->status, + priv->error->config, priv->error->elem_len); + for (i = 0; i < priv->error->elem_len; i++) + len += snprintf(buf + len, PAGE_SIZE - len, + "\n%08X%08X%08X%08X%08X%08X%08X", + priv->error->elem[i].time, + priv->error->elem[i].desc, + priv->error->elem[i].blink1, + priv->error->elem[i].blink2, + priv->error->elem[i].link1, + priv->error->elem[i].link2, + priv->error->elem[i].data); + + len += snprintf(buf + len, PAGE_SIZE - len, + "\n%08X", priv->error->log_len); + for (i = 0; i < priv->error->log_len; i++) + len += snprintf(buf + len, PAGE_SIZE - len, + "\n%08X%08X%08X", + priv->error->log[i].time, + priv->error->log[i].event, + priv->error->log[i].data); + len += snprintf(buf + len, PAGE_SIZE - len, "\n"); + return len; +} + +static ssize_t clear_error(struct device *d, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + + kfree(priv->error); + priv->error = NULL; + return count; +} + +static DEVICE_ATTR(error, 0644, show_error, clear_error); + +static ssize_t show_cmd_log(struct device *d, + struct device_attribute *attr, char *buf) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + u32 len = 0, i; + if (!priv->cmdlog) + return 0; + for (i = (priv->cmdlog_pos + 1) % priv->cmdlog_len; + (i != priv->cmdlog_pos) && (len < PAGE_SIZE); + i = (i + 1) % priv->cmdlog_len) { + len += + snprintf(buf + len, PAGE_SIZE - len, + "\n%08lX%08X%08X%08X\n", priv->cmdlog[i].jiffies, + priv->cmdlog[i].retcode, priv->cmdlog[i].cmd.cmd, + priv->cmdlog[i].cmd.len); + len += + snprintk_buf(buf + len, PAGE_SIZE - len, + (u8 *) priv->cmdlog[i].cmd.param, + priv->cmdlog[i].cmd.len); + len += snprintf(buf + len, PAGE_SIZE - len, "\n"); + } + len += snprintf(buf + len, PAGE_SIZE - len, "\n"); + return len; +} + +static DEVICE_ATTR(cmd_log, 0444, show_cmd_log, NULL); + +#ifdef CONFIG_IPW2200_PROMISCUOUS +static void ipw_prom_free(struct ipw_priv *priv); +static int ipw_prom_alloc(struct ipw_priv *priv); +static ssize_t store_rtap_iface(struct device *d, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + int rc = 0; + + if (count < 1) + return -EINVAL; + + switch (buf[0]) { + case '0': + if (!rtap_iface) + return count; + + if (netif_running(priv->prom_net_dev)) { + IPW_WARNING("Interface is up. Cannot unregister.\n"); + return count; + } + + ipw_prom_free(priv); + rtap_iface = 0; + break; + + case '1': + if (rtap_iface) + return count; + + rc = ipw_prom_alloc(priv); + if (!rc) + rtap_iface = 1; + break; + + default: + return -EINVAL; + } + + if (rc) { + IPW_ERROR("Failed to register promiscuous network " + "device (error %d).\n", rc); + } + + return count; +} + +static ssize_t show_rtap_iface(struct device *d, + struct device_attribute *attr, + char *buf) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + if (rtap_iface) + return sprintf(buf, "%s", priv->prom_net_dev->name); + else { + buf[0] = '-'; + buf[1] = '1'; + buf[2] = '\0'; + return 3; + } +} + +static DEVICE_ATTR(rtap_iface, 0600, show_rtap_iface, store_rtap_iface); + +static ssize_t store_rtap_filter(struct device *d, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + + if (!priv->prom_priv) { + IPW_ERROR("Attempting to set filter without " + "rtap_iface enabled.\n"); + return -EPERM; + } + + priv->prom_priv->filter = simple_strtol(buf, NULL, 0); + + IPW_DEBUG_INFO("Setting rtap filter to " BIT_FMT16 "\n", + BIT_ARG16(priv->prom_priv->filter)); + + return count; +} + +static ssize_t show_rtap_filter(struct device *d, + struct device_attribute *attr, + char *buf) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + return sprintf(buf, "0x%04X", + priv->prom_priv ? priv->prom_priv->filter : 0); +} + +static DEVICE_ATTR(rtap_filter, 0600, show_rtap_filter, store_rtap_filter); +#endif + +static ssize_t show_scan_age(struct device *d, struct device_attribute *attr, + char *buf) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + return sprintf(buf, "%d\n", priv->ieee->scan_age); +} + +static ssize_t store_scan_age(struct device *d, struct device_attribute *attr, + const char *buf, size_t count) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + struct net_device *dev = priv->net_dev; + char buffer[] = "00000000"; + unsigned long len = + (sizeof(buffer) - 1) > count ? count : sizeof(buffer) - 1; + unsigned long val; + char *p = buffer; + + IPW_DEBUG_INFO("enter\n"); + + strncpy(buffer, buf, len); + buffer[len] = 0; + + if (p[1] == 'x' || p[1] == 'X' || p[0] == 'x' || p[0] == 'X') { + p++; + if (p[0] == 'x' || p[0] == 'X') + p++; + val = simple_strtoul(p, &p, 16); + } else + val = simple_strtoul(p, &p, 10); + if (p == buffer) { + IPW_DEBUG_INFO("%s: user supplied invalid value.\n", dev->name); + } else { + priv->ieee->scan_age = val; + IPW_DEBUG_INFO("set scan_age = %u\n", priv->ieee->scan_age); + } + + IPW_DEBUG_INFO("exit\n"); + return len; +} + +static DEVICE_ATTR(scan_age, 0644, show_scan_age, store_scan_age); + +static ssize_t show_led(struct device *d, struct device_attribute *attr, + char *buf) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + return sprintf(buf, "%d\n", (priv->config & CFG_NO_LED) ? 0 : 1); +} + +static ssize_t store_led(struct device *d, struct device_attribute *attr, + const char *buf, size_t count) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + + IPW_DEBUG_INFO("enter\n"); + + if (count == 0) + return 0; + + if (*buf == 0) { + IPW_DEBUG_LED("Disabling LED control.\n"); + priv->config |= CFG_NO_LED; + ipw_led_shutdown(priv); + } else { + IPW_DEBUG_LED("Enabling LED control.\n"); + priv->config &= ~CFG_NO_LED; + ipw_led_init(priv); + } + + IPW_DEBUG_INFO("exit\n"); + return count; +} + +static DEVICE_ATTR(led, 0644, show_led, store_led); + +static ssize_t show_status(struct device *d, + struct device_attribute *attr, char *buf) +{ + struct ipw_priv *p = dev_get_drvdata(d); + return sprintf(buf, "0x%08x\n", (int)p->status); +} + +static DEVICE_ATTR(status, 0444, show_status, NULL); + +static ssize_t show_cfg(struct device *d, struct device_attribute *attr, + char *buf) +{ + struct ipw_priv *p = dev_get_drvdata(d); + return sprintf(buf, "0x%08x\n", (int)p->config); +} + +static DEVICE_ATTR(cfg, 0444, show_cfg, NULL); + +static ssize_t show_nic_type(struct device *d, + struct device_attribute *attr, char *buf) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + return sprintf(buf, "TYPE: %d\n", priv->nic_type); +} + +static DEVICE_ATTR(nic_type, 0444, show_nic_type, NULL); + +static ssize_t show_ucode_version(struct device *d, + struct device_attribute *attr, char *buf) +{ + u32 len = sizeof(u32), tmp = 0; + struct ipw_priv *p = dev_get_drvdata(d); + + if (ipw_get_ordinal(p, IPW_ORD_STAT_UCODE_VERSION, &tmp, &len)) + return 0; + + return sprintf(buf, "0x%08x\n", tmp); +} + +static DEVICE_ATTR(ucode_version, 0644, show_ucode_version, NULL); + +static ssize_t show_rtc(struct device *d, struct device_attribute *attr, + char *buf) +{ + u32 len = sizeof(u32), tmp = 0; + struct ipw_priv *p = dev_get_drvdata(d); + + if (ipw_get_ordinal(p, IPW_ORD_STAT_RTC, &tmp, &len)) + return 0; + + return sprintf(buf, "0x%08x\n", tmp); +} + +static DEVICE_ATTR(rtc, 0644, show_rtc, NULL); + +/* + * Add a device attribute to view/control the delay between eeprom + * operations. + */ +static ssize_t show_eeprom_delay(struct device *d, + struct device_attribute *attr, char *buf) +{ + struct ipw_priv *p = dev_get_drvdata(d); + int n = p->eeprom_delay; + return sprintf(buf, "%i\n", n); +} +static ssize_t store_eeprom_delay(struct device *d, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct ipw_priv *p = dev_get_drvdata(d); + sscanf(buf, "%i", &p->eeprom_delay); + return strnlen(buf, count); +} + +static DEVICE_ATTR(eeprom_delay, 0644, show_eeprom_delay, store_eeprom_delay); + +static ssize_t show_command_event_reg(struct device *d, + struct device_attribute *attr, char *buf) +{ + u32 reg = 0; + struct ipw_priv *p = dev_get_drvdata(d); + + reg = ipw_read_reg32(p, IPW_INTERNAL_CMD_EVENT); + return sprintf(buf, "0x%08x\n", reg); +} +static ssize_t store_command_event_reg(struct device *d, + struct device_attribute *attr, + const char *buf, size_t count) +{ + u32 reg; + struct ipw_priv *p = dev_get_drvdata(d); + + sscanf(buf, "%x", ®); + ipw_write_reg32(p, IPW_INTERNAL_CMD_EVENT, reg); + return strnlen(buf, count); +} + +static DEVICE_ATTR(command_event_reg, 0644, + show_command_event_reg, store_command_event_reg); + +static ssize_t show_mem_gpio_reg(struct device *d, + struct device_attribute *attr, char *buf) +{ + u32 reg = 0; + struct ipw_priv *p = dev_get_drvdata(d); + + reg = ipw_read_reg32(p, 0x301100); + return sprintf(buf, "0x%08x\n", reg); +} +static ssize_t store_mem_gpio_reg(struct device *d, + struct device_attribute *attr, + const char *buf, size_t count) +{ + u32 reg; + struct ipw_priv *p = dev_get_drvdata(d); + + sscanf(buf, "%x", ®); + ipw_write_reg32(p, 0x301100, reg); + return strnlen(buf, count); +} + +static DEVICE_ATTR(mem_gpio_reg, 0644, show_mem_gpio_reg, store_mem_gpio_reg); + +static ssize_t show_indirect_dword(struct device *d, + struct device_attribute *attr, char *buf) +{ + u32 reg = 0; + struct ipw_priv *priv = dev_get_drvdata(d); + + if (priv->status & STATUS_INDIRECT_DWORD) + reg = ipw_read_reg32(priv, priv->indirect_dword); + else + reg = 0; + + return sprintf(buf, "0x%08x\n", reg); +} +static ssize_t store_indirect_dword(struct device *d, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + + sscanf(buf, "%x", &priv->indirect_dword); + priv->status |= STATUS_INDIRECT_DWORD; + return strnlen(buf, count); +} + +static DEVICE_ATTR(indirect_dword, 0644, + show_indirect_dword, store_indirect_dword); + +static ssize_t show_indirect_byte(struct device *d, + struct device_attribute *attr, char *buf) +{ + u8 reg = 0; + struct ipw_priv *priv = dev_get_drvdata(d); + + if (priv->status & STATUS_INDIRECT_BYTE) + reg = ipw_read_reg8(priv, priv->indirect_byte); + else + reg = 0; + + return sprintf(buf, "0x%02x\n", reg); +} +static ssize_t store_indirect_byte(struct device *d, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + + sscanf(buf, "%x", &priv->indirect_byte); + priv->status |= STATUS_INDIRECT_BYTE; + return strnlen(buf, count); +} + +static DEVICE_ATTR(indirect_byte, 0644, + show_indirect_byte, store_indirect_byte); + +static ssize_t show_direct_dword(struct device *d, + struct device_attribute *attr, char *buf) +{ + u32 reg = 0; + struct ipw_priv *priv = dev_get_drvdata(d); + + if (priv->status & STATUS_DIRECT_DWORD) + reg = ipw_read32(priv, priv->direct_dword); + else + reg = 0; + + return sprintf(buf, "0x%08x\n", reg); +} +static ssize_t store_direct_dword(struct device *d, + struct device_attribute *attr, + const char *buf, size_t count) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + + sscanf(buf, "%x", &priv->direct_dword); + priv->status |= STATUS_DIRECT_DWORD; + return strnlen(buf, count); +} + +static DEVICE_ATTR(direct_dword, 0644, show_direct_dword, store_direct_dword); + +static int rf_kill_active(struct ipw_priv *priv) +{ + if (0 == (ipw_read32(priv, 0x30) & 0x10000)) { + priv->status |= STATUS_RF_KILL_HW; + wiphy_rfkill_set_hw_state(priv->ieee->wdev.wiphy, true); + } else { + priv->status &= ~STATUS_RF_KILL_HW; + wiphy_rfkill_set_hw_state(priv->ieee->wdev.wiphy, false); + } + + return (priv->status & STATUS_RF_KILL_HW) ? 1 : 0; +} + +static ssize_t show_rf_kill(struct device *d, struct device_attribute *attr, + char *buf) +{ + /* 0 - RF kill not enabled + 1 - SW based RF kill active (sysfs) + 2 - HW based RF kill active + 3 - Both HW and SW baed RF kill active */ + struct ipw_priv *priv = dev_get_drvdata(d); + int val = ((priv->status & STATUS_RF_KILL_SW) ? 0x1 : 0x0) | + (rf_kill_active(priv) ? 0x2 : 0x0); + return sprintf(buf, "%i\n", val); +} + +static int ipw_radio_kill_sw(struct ipw_priv *priv, int disable_radio) +{ + if ((disable_radio ? 1 : 0) == + ((priv->status & STATUS_RF_KILL_SW) ? 1 : 0)) + return 0; + + IPW_DEBUG_RF_KILL("Manual SW RF Kill set to: RADIO %s\n", + disable_radio ? "OFF" : "ON"); + + if (disable_radio) { + priv->status |= STATUS_RF_KILL_SW; + + cancel_delayed_work(&priv->request_scan); + cancel_delayed_work(&priv->request_direct_scan); + cancel_delayed_work(&priv->request_passive_scan); + cancel_delayed_work(&priv->scan_event); + schedule_work(&priv->down); + } else { + priv->status &= ~STATUS_RF_KILL_SW; + if (rf_kill_active(priv)) { + IPW_DEBUG_RF_KILL("Can not turn radio back on - " + "disabled by HW switch\n"); + /* Make sure the RF_KILL check timer is running */ + cancel_delayed_work(&priv->rf_kill); + schedule_delayed_work(&priv->rf_kill, + round_jiffies_relative(2 * HZ)); + } else + schedule_work(&priv->up); + } + + return 1; +} + +static ssize_t store_rf_kill(struct device *d, struct device_attribute *attr, + const char *buf, size_t count) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + + ipw_radio_kill_sw(priv, buf[0] == '1'); + + return count; +} + +static DEVICE_ATTR(rf_kill, 0644, show_rf_kill, store_rf_kill); + +static ssize_t show_speed_scan(struct device *d, struct device_attribute *attr, + char *buf) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + int pos = 0, len = 0; + if (priv->config & CFG_SPEED_SCAN) { + while (priv->speed_scan[pos] != 0) + len += sprintf(&buf[len], "%d ", + priv->speed_scan[pos++]); + return len + sprintf(&buf[len], "\n"); + } + + return sprintf(buf, "0\n"); +} + +static ssize_t store_speed_scan(struct device *d, struct device_attribute *attr, + const char *buf, size_t count) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + int channel, pos = 0; + const char *p = buf; + + /* list of space separated channels to scan, optionally ending with 0 */ + while ((channel = simple_strtol(p, NULL, 0))) { + if (pos == MAX_SPEED_SCAN - 1) { + priv->speed_scan[pos] = 0; + break; + } + + if (libipw_is_valid_channel(priv->ieee, channel)) + priv->speed_scan[pos++] = channel; + else + IPW_WARNING("Skipping invalid channel request: %d\n", + channel); + p = strchr(p, ' '); + if (!p) + break; + while (*p == ' ' || *p == '\t') + p++; + } + + if (pos == 0) + priv->config &= ~CFG_SPEED_SCAN; + else { + priv->speed_scan_pos = 0; + priv->config |= CFG_SPEED_SCAN; + } + + return count; +} + +static DEVICE_ATTR(speed_scan, 0644, show_speed_scan, store_speed_scan); + +static ssize_t show_net_stats(struct device *d, struct device_attribute *attr, + char *buf) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + return sprintf(buf, "%c\n", (priv->config & CFG_NET_STATS) ? '1' : '0'); +} + +static ssize_t store_net_stats(struct device *d, struct device_attribute *attr, + const char *buf, size_t count) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + if (buf[0] == '1') + priv->config |= CFG_NET_STATS; + else + priv->config &= ~CFG_NET_STATS; + + return count; +} + +static DEVICE_ATTR(net_stats, 0644, show_net_stats, store_net_stats); + +static ssize_t show_channels(struct device *d, + struct device_attribute *attr, + char *buf) +{ + struct ipw_priv *priv = dev_get_drvdata(d); + const struct libipw_geo *geo = libipw_get_geo(priv->ieee); + int len = 0, i; + + len = sprintf(&buf[len], + "Displaying %d channels in 2.4Ghz band " + "(802.11bg):\n", geo->bg_channels); + + for (i = 0; i < geo->bg_channels; i++) { + len += sprintf(&buf[len], "%d: BSS%s%s, %s, Band %s.\n", + geo->bg[i].channel, + geo->bg[i].flags & LIBIPW_CH_RADAR_DETECT ? + " (radar spectrum)" : "", + ((geo->bg[i].flags & LIBIPW_CH_NO_IBSS) || + (geo->bg[i].flags & LIBIPW_CH_RADAR_DETECT)) + ? "" : ", IBSS", + geo->bg[i].flags & LIBIPW_CH_PASSIVE_ONLY ? + "passive only" : "active/passive", + geo->bg[i].flags & LIBIPW_CH_B_ONLY ? + "B" : "B/G"); + } + + len += sprintf(&buf[len], + "Displaying %d channels in 5.2Ghz band " + "(802.11a):\n", geo->a_channels); + for (i = 0; i < geo->a_channels; i++) { + len += sprintf(&buf[len], "%d: BSS%s%s, %s.\n", + geo->a[i].channel, + geo->a[i].flags & LIBIPW_CH_RADAR_DETECT ? + " (radar spectrum)" : "", + ((geo->a[i].flags & LIBIPW_CH_NO_IBSS) || + (geo->a[i].flags & LIBIPW_CH_RADAR_DETECT)) + ? "" : ", IBSS", + geo->a[i].flags & LIBIPW_CH_PASSIVE_ONLY ? + "passive only" : "active/passive"); + } + + return len; +} + +static DEVICE_ATTR(channels, 0400, show_channels, NULL); + +static void notify_wx_assoc_event(struct ipw_priv *priv) +{ + union iwreq_data wrqu; + wrqu.ap_addr.sa_family = ARPHRD_ETHER; + if (priv->status & STATUS_ASSOCIATED) + memcpy(wrqu.ap_addr.sa_data, priv->bssid, ETH_ALEN); + else + eth_zero_addr(wrqu.ap_addr.sa_data); + wireless_send_event(priv->net_dev, SIOCGIWAP, &wrqu, NULL); +} + +static void ipw_irq_tasklet(struct ipw_priv *priv) +{ + u32 inta, inta_mask, handled = 0; + unsigned long flags; + int rc = 0; + + spin_lock_irqsave(&priv->irq_lock, flags); + + inta = ipw_read32(priv, IPW_INTA_RW); + inta_mask = ipw_read32(priv, IPW_INTA_MASK_R); + + if (inta == 0xFFFFFFFF) { + /* Hardware disappeared */ + IPW_WARNING("TASKLET INTA == 0xFFFFFFFF\n"); + /* Only handle the cached INTA values */ + inta = 0; + } + inta &= (IPW_INTA_MASK_ALL & inta_mask); + + /* Add any cached INTA values that need to be handled */ + inta |= priv->isr_inta; + + spin_unlock_irqrestore(&priv->irq_lock, flags); + + spin_lock_irqsave(&priv->lock, flags); + + /* handle all the justifications for the interrupt */ + if (inta & IPW_INTA_BIT_RX_TRANSFER) { + ipw_rx(priv); + handled |= IPW_INTA_BIT_RX_TRANSFER; + } + + if (inta & IPW_INTA_BIT_TX_CMD_QUEUE) { + IPW_DEBUG_HC("Command completed.\n"); + rc = ipw_queue_tx_reclaim(priv, &priv->txq_cmd, -1); + priv->status &= ~STATUS_HCMD_ACTIVE; + wake_up_interruptible(&priv->wait_command_queue); + handled |= IPW_INTA_BIT_TX_CMD_QUEUE; + } + + if (inta & IPW_INTA_BIT_TX_QUEUE_1) { + IPW_DEBUG_TX("TX_QUEUE_1\n"); + rc = ipw_queue_tx_reclaim(priv, &priv->txq[0], 0); + handled |= IPW_INTA_BIT_TX_QUEUE_1; + } + + if (inta & IPW_INTA_BIT_TX_QUEUE_2) { + IPW_DEBUG_TX("TX_QUEUE_2\n"); + rc = ipw_queue_tx_reclaim(priv, &priv->txq[1], 1); + handled |= IPW_INTA_BIT_TX_QUEUE_2; + } + + if (inta & IPW_INTA_BIT_TX_QUEUE_3) { + IPW_DEBUG_TX("TX_QUEUE_3\n"); + rc = ipw_queue_tx_reclaim(priv, &priv->txq[2], 2); + handled |= IPW_INTA_BIT_TX_QUEUE_3; + } + + if (inta & IPW_INTA_BIT_TX_QUEUE_4) { + IPW_DEBUG_TX("TX_QUEUE_4\n"); + rc = ipw_queue_tx_reclaim(priv, &priv->txq[3], 3); + handled |= IPW_INTA_BIT_TX_QUEUE_4; + } + + if (inta & IPW_INTA_BIT_STATUS_CHANGE) { + IPW_WARNING("STATUS_CHANGE\n"); + handled |= IPW_INTA_BIT_STATUS_CHANGE; + } + + if (inta & IPW_INTA_BIT_BEACON_PERIOD_EXPIRED) { + IPW_WARNING("TX_PERIOD_EXPIRED\n"); + handled |= IPW_INTA_BIT_BEACON_PERIOD_EXPIRED; + } + + if (inta & IPW_INTA_BIT_SLAVE_MODE_HOST_CMD_DONE) { + IPW_WARNING("HOST_CMD_DONE\n"); + handled |= IPW_INTA_BIT_SLAVE_MODE_HOST_CMD_DONE; + } + + if (inta & IPW_INTA_BIT_FW_INITIALIZATION_DONE) { + IPW_WARNING("FW_INITIALIZATION_DONE\n"); + handled |= IPW_INTA_BIT_FW_INITIALIZATION_DONE; + } + + if (inta & IPW_INTA_BIT_FW_CARD_DISABLE_PHY_OFF_DONE) { + IPW_WARNING("PHY_OFF_DONE\n"); + handled |= IPW_INTA_BIT_FW_CARD_DISABLE_PHY_OFF_DONE; + } + + if (inta & IPW_INTA_BIT_RF_KILL_DONE) { + IPW_DEBUG_RF_KILL("RF_KILL_DONE\n"); + priv->status |= STATUS_RF_KILL_HW; + wiphy_rfkill_set_hw_state(priv->ieee->wdev.wiphy, true); + wake_up_interruptible(&priv->wait_command_queue); + priv->status &= ~(STATUS_ASSOCIATED | STATUS_ASSOCIATING); + cancel_delayed_work(&priv->request_scan); + cancel_delayed_work(&priv->request_direct_scan); + cancel_delayed_work(&priv->request_passive_scan); + cancel_delayed_work(&priv->scan_event); + schedule_work(&priv->link_down); + schedule_delayed_work(&priv->rf_kill, 2 * HZ); + handled |= IPW_INTA_BIT_RF_KILL_DONE; + } + + if (inta & IPW_INTA_BIT_FATAL_ERROR) { + IPW_WARNING("Firmware error detected. Restarting.\n"); + if (priv->error) { + IPW_DEBUG_FW("Sysfs 'error' log already exists.\n"); + if (ipw_debug_level & IPW_DL_FW_ERRORS) { + struct ipw_fw_error *error = + ipw_alloc_error_log(priv); + ipw_dump_error_log(priv, error); + kfree(error); + } + } else { + priv->error = ipw_alloc_error_log(priv); + if (priv->error) + IPW_DEBUG_FW("Sysfs 'error' log captured.\n"); + else + IPW_DEBUG_FW("Error allocating sysfs 'error' " + "log.\n"); + if (ipw_debug_level & IPW_DL_FW_ERRORS) + ipw_dump_error_log(priv, priv->error); + } + + /* XXX: If hardware encryption is for WPA/WPA2, + * we have to notify the supplicant. */ + if (priv->ieee->sec.encrypt) { + priv->status &= ~STATUS_ASSOCIATED; + notify_wx_assoc_event(priv); + } + + /* Keep the restart process from trying to send host + * commands by clearing the INIT status bit */ + priv->status &= ~STATUS_INIT; + + /* Cancel currently queued command. */ + priv->status &= ~STATUS_HCMD_ACTIVE; + wake_up_interruptible(&priv->wait_command_queue); + + schedule_work(&priv->adapter_restart); + handled |= IPW_INTA_BIT_FATAL_ERROR; + } + + if (inta & IPW_INTA_BIT_PARITY_ERROR) { + IPW_ERROR("Parity error\n"); + handled |= IPW_INTA_BIT_PARITY_ERROR; + } + + if (handled != inta) { + IPW_ERROR("Unhandled INTA bits 0x%08x\n", inta & ~handled); + } + + spin_unlock_irqrestore(&priv->lock, flags); + + /* enable all interrupts */ + ipw_enable_interrupts(priv); +} + +#define IPW_CMD(x) case IPW_CMD_ ## x : return #x +static char *get_cmd_string(u8 cmd) +{ + switch (cmd) { + IPW_CMD(HOST_COMPLETE); + IPW_CMD(POWER_DOWN); + IPW_CMD(SYSTEM_CONFIG); + IPW_CMD(MULTICAST_ADDRESS); + IPW_CMD(SSID); + IPW_CMD(ADAPTER_ADDRESS); + IPW_CMD(PORT_TYPE); + IPW_CMD(RTS_THRESHOLD); + IPW_CMD(FRAG_THRESHOLD); + IPW_CMD(POWER_MODE); + IPW_CMD(WEP_KEY); + IPW_CMD(TGI_TX_KEY); + IPW_CMD(SCAN_REQUEST); + IPW_CMD(SCAN_REQUEST_EXT); + IPW_CMD(ASSOCIATE); + IPW_CMD(SUPPORTED_RATES); + IPW_CMD(SCAN_ABORT); + IPW_CMD(TX_FLUSH); + IPW_CMD(QOS_PARAMETERS); + IPW_CMD(DINO_CONFIG); + IPW_CMD(RSN_CAPABILITIES); + IPW_CMD(RX_KEY); + IPW_CMD(CARD_DISABLE); + IPW_CMD(SEED_NUMBER); + IPW_CMD(TX_POWER); + IPW_CMD(COUNTRY_INFO); + IPW_CMD(AIRONET_INFO); + IPW_CMD(AP_TX_POWER); + IPW_CMD(CCKM_INFO); + IPW_CMD(CCX_VER_INFO); + IPW_CMD(SET_CALIBRATION); + IPW_CMD(SENSITIVITY_CALIB); + IPW_CMD(RETRY_LIMIT); + IPW_CMD(IPW_PRE_POWER_DOWN); + IPW_CMD(VAP_BEACON_TEMPLATE); + IPW_CMD(VAP_DTIM_PERIOD); + IPW_CMD(EXT_SUPPORTED_RATES); + IPW_CMD(VAP_LOCAL_TX_PWR_CONSTRAINT); + IPW_CMD(VAP_QUIET_INTERVALS); + IPW_CMD(VAP_CHANNEL_SWITCH); + IPW_CMD(VAP_MANDATORY_CHANNELS); + IPW_CMD(VAP_CELL_PWR_LIMIT); + IPW_CMD(VAP_CF_PARAM_SET); + IPW_CMD(VAP_SET_BEACONING_STATE); + IPW_CMD(MEASUREMENT); + IPW_CMD(POWER_CAPABILITY); + IPW_CMD(SUPPORTED_CHANNELS); + IPW_CMD(TPC_REPORT); + IPW_CMD(WME_INFO); + IPW_CMD(PRODUCTION_COMMAND); + default: + return "UNKNOWN"; + } +} + +#define HOST_COMPLETE_TIMEOUT HZ + +static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd) +{ + int rc = 0; + unsigned long flags; + unsigned long now, end; + + spin_lock_irqsave(&priv->lock, flags); + if (priv->status & STATUS_HCMD_ACTIVE) { + IPW_ERROR("Failed to send %s: Already sending a command.\n", + get_cmd_string(cmd->cmd)); + spin_unlock_irqrestore(&priv->lock, flags); + return -EAGAIN; + } + + priv->status |= STATUS_HCMD_ACTIVE; + + if (priv->cmdlog) { + priv->cmdlog[priv->cmdlog_pos].jiffies = jiffies; + priv->cmdlog[priv->cmdlog_pos].cmd.cmd = cmd->cmd; + priv->cmdlog[priv->cmdlog_pos].cmd.len = cmd->len; + memcpy(priv->cmdlog[priv->cmdlog_pos].cmd.param, cmd->param, + cmd->len); + priv->cmdlog[priv->cmdlog_pos].retcode = -1; + } + + IPW_DEBUG_HC("%s command (#%d) %d bytes: 0x%08X\n", + get_cmd_string(cmd->cmd), cmd->cmd, cmd->len, + priv->status); + +#ifndef DEBUG_CMD_WEP_KEY + if (cmd->cmd == IPW_CMD_WEP_KEY) + IPW_DEBUG_HC("WEP_KEY command masked out for secure.\n"); + else +#endif + printk_buf(IPW_DL_HOST_COMMAND, (u8 *) cmd->param, cmd->len); + + rc = ipw_queue_tx_hcmd(priv, cmd->cmd, cmd->param, cmd->len, 0); + if (rc) { + priv->status &= ~STATUS_HCMD_ACTIVE; + IPW_ERROR("Failed to send %s: Reason %d\n", + get_cmd_string(cmd->cmd), rc); + spin_unlock_irqrestore(&priv->lock, flags); + goto exit; + } + spin_unlock_irqrestore(&priv->lock, flags); + + now = jiffies; + end = now + HOST_COMPLETE_TIMEOUT; +again: + rc = wait_event_interruptible_timeout(priv->wait_command_queue, + !(priv-> + status & STATUS_HCMD_ACTIVE), + end - now); + if (rc < 0) { + now = jiffies; + if (time_before(now, end)) + goto again; + rc = 0; + } + + if (rc == 0) { + spin_lock_irqsave(&priv->lock, flags); + if (priv->status & STATUS_HCMD_ACTIVE) { + IPW_ERROR("Failed to send %s: Command timed out.\n", + get_cmd_string(cmd->cmd)); + priv->status &= ~STATUS_HCMD_ACTIVE; + spin_unlock_irqrestore(&priv->lock, flags); + rc = -EIO; + goto exit; + } + spin_unlock_irqrestore(&priv->lock, flags); + } else + rc = 0; + + if (priv->status & STATUS_RF_KILL_HW) { + IPW_ERROR("Failed to send %s: Aborted due to RF kill switch.\n", + get_cmd_string(cmd->cmd)); + rc = -EIO; + goto exit; + } + + exit: + if (priv->cmdlog) { + priv->cmdlog[priv->cmdlog_pos++].retcode = rc; + priv->cmdlog_pos %= priv->cmdlog_len; + } + return rc; +} + +static int ipw_send_cmd_simple(struct ipw_priv *priv, u8 command) +{ + struct host_cmd cmd = { + .cmd = command, + }; + + return __ipw_send_cmd(priv, &cmd); +} + +static int ipw_send_cmd_pdu(struct ipw_priv *priv, u8 command, u8 len, + void *data) +{ + struct host_cmd cmd = { + .cmd = command, + .len = len, + .param = data, + }; + + return __ipw_send_cmd(priv, &cmd); +} + +static int ipw_send_host_complete(struct ipw_priv *priv) +{ + if (!priv) { + IPW_ERROR("Invalid args\n"); + return -1; + } + + return ipw_send_cmd_simple(priv, IPW_CMD_HOST_COMPLETE); +} + +static int ipw_send_system_config(struct ipw_priv *priv) +{ + return ipw_send_cmd_pdu(priv, IPW_CMD_SYSTEM_CONFIG, + sizeof(priv->sys_config), + &priv->sys_config); +} + +static int ipw_send_ssid(struct ipw_priv *priv, u8 * ssid, int len) +{ + if (!priv || !ssid) { + IPW_ERROR("Invalid args\n"); + return -1; + } + + return ipw_send_cmd_pdu(priv, IPW_CMD_SSID, min(len, IW_ESSID_MAX_SIZE), + ssid); +} + +static int ipw_send_adapter_address(struct ipw_priv *priv, u8 * mac) +{ + if (!priv || !mac) { + IPW_ERROR("Invalid args\n"); + return -1; + } + + IPW_DEBUG_INFO("%s: Setting MAC to %pM\n", + priv->net_dev->name, mac); + + return ipw_send_cmd_pdu(priv, IPW_CMD_ADAPTER_ADDRESS, ETH_ALEN, mac); +} + +static void ipw_adapter_restart(void *adapter) +{ + struct ipw_priv *priv = adapter; + + if (priv->status & STATUS_RF_KILL_MASK) + return; + + ipw_down(priv); + + if (priv->assoc_network && + (priv->assoc_network->capability & WLAN_CAPABILITY_IBSS)) + ipw_remove_current_network(priv); + + if (ipw_up(priv)) { + IPW_ERROR("Failed to up device\n"); + return; + } +} + +static void ipw_bg_adapter_restart(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, adapter_restart); + mutex_lock(&priv->mutex); + ipw_adapter_restart(priv); + mutex_unlock(&priv->mutex); +} + +static void ipw_abort_scan(struct ipw_priv *priv); + +#define IPW_SCAN_CHECK_WATCHDOG (5 * HZ) + +static void ipw_scan_check(void *data) +{ + struct ipw_priv *priv = data; + + if (priv->status & STATUS_SCAN_ABORTING) { + IPW_DEBUG_SCAN("Scan completion watchdog resetting " + "adapter after (%dms).\n", + jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG)); + schedule_work(&priv->adapter_restart); + } else if (priv->status & STATUS_SCANNING) { + IPW_DEBUG_SCAN("Scan completion watchdog aborting scan " + "after (%dms).\n", + jiffies_to_msecs(IPW_SCAN_CHECK_WATCHDOG)); + ipw_abort_scan(priv); + schedule_delayed_work(&priv->scan_check, HZ); + } +} + +static void ipw_bg_scan_check(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, scan_check.work); + mutex_lock(&priv->mutex); + ipw_scan_check(priv); + mutex_unlock(&priv->mutex); +} + +static int ipw_send_scan_request_ext(struct ipw_priv *priv, + struct ipw_scan_request_ext *request) +{ + return ipw_send_cmd_pdu(priv, IPW_CMD_SCAN_REQUEST_EXT, + sizeof(*request), request); +} + +static int ipw_send_scan_abort(struct ipw_priv *priv) +{ + if (!priv) { + IPW_ERROR("Invalid args\n"); + return -1; + } + + return ipw_send_cmd_simple(priv, IPW_CMD_SCAN_ABORT); +} + +static int ipw_set_sensitivity(struct ipw_priv *priv, u16 sens) +{ + struct ipw_sensitivity_calib calib = { + .beacon_rssi_raw = cpu_to_le16(sens), + }; + + return ipw_send_cmd_pdu(priv, IPW_CMD_SENSITIVITY_CALIB, sizeof(calib), + &calib); +} + +static int ipw_send_associate(struct ipw_priv *priv, + struct ipw_associate *associate) +{ + if (!priv || !associate) { + IPW_ERROR("Invalid args\n"); + return -1; + } + + return ipw_send_cmd_pdu(priv, IPW_CMD_ASSOCIATE, sizeof(*associate), + associate); +} + +static int ipw_send_supported_rates(struct ipw_priv *priv, + struct ipw_supported_rates *rates) +{ + if (!priv || !rates) { + IPW_ERROR("Invalid args\n"); + return -1; + } + + return ipw_send_cmd_pdu(priv, IPW_CMD_SUPPORTED_RATES, sizeof(*rates), + rates); +} + +static int ipw_set_random_seed(struct ipw_priv *priv) +{ + u32 val; + + if (!priv) { + IPW_ERROR("Invalid args\n"); + return -1; + } + + get_random_bytes(&val, sizeof(val)); + + return ipw_send_cmd_pdu(priv, IPW_CMD_SEED_NUMBER, sizeof(val), &val); +} + +static int ipw_send_card_disable(struct ipw_priv *priv, u32 phy_off) +{ + __le32 v = cpu_to_le32(phy_off); + if (!priv) { + IPW_ERROR("Invalid args\n"); + return -1; + } + + return ipw_send_cmd_pdu(priv, IPW_CMD_CARD_DISABLE, sizeof(v), &v); +} + +static int ipw_send_tx_power(struct ipw_priv *priv, struct ipw_tx_power *power) +{ + if (!priv || !power) { + IPW_ERROR("Invalid args\n"); + return -1; + } + + return ipw_send_cmd_pdu(priv, IPW_CMD_TX_POWER, sizeof(*power), power); +} + +static int ipw_set_tx_power(struct ipw_priv *priv) +{ + const struct libipw_geo *geo = libipw_get_geo(priv->ieee); + struct ipw_tx_power tx_power; + s8 max_power; + int i; + + memset(&tx_power, 0, sizeof(tx_power)); + + /* configure device for 'G' band */ + tx_power.ieee_mode = IPW_G_MODE; + tx_power.num_channels = geo->bg_channels; + for (i = 0; i < geo->bg_channels; i++) { + max_power = geo->bg[i].max_power; + tx_power.channels_tx_power[i].channel_number = + geo->bg[i].channel; + tx_power.channels_tx_power[i].tx_power = max_power ? + min(max_power, priv->tx_power) : priv->tx_power; + } + if (ipw_send_tx_power(priv, &tx_power)) + return -EIO; + + /* configure device to also handle 'B' band */ + tx_power.ieee_mode = IPW_B_MODE; + if (ipw_send_tx_power(priv, &tx_power)) + return -EIO; + + /* configure device to also handle 'A' band */ + if (priv->ieee->abg_true) { + tx_power.ieee_mode = IPW_A_MODE; + tx_power.num_channels = geo->a_channels; + for (i = 0; i < tx_power.num_channels; i++) { + max_power = geo->a[i].max_power; + tx_power.channels_tx_power[i].channel_number = + geo->a[i].channel; + tx_power.channels_tx_power[i].tx_power = max_power ? + min(max_power, priv->tx_power) : priv->tx_power; + } + if (ipw_send_tx_power(priv, &tx_power)) + return -EIO; + } + return 0; +} + +static int ipw_send_rts_threshold(struct ipw_priv *priv, u16 rts) +{ + struct ipw_rts_threshold rts_threshold = { + .rts_threshold = cpu_to_le16(rts), + }; + + if (!priv) { + IPW_ERROR("Invalid args\n"); + return -1; + } + + return ipw_send_cmd_pdu(priv, IPW_CMD_RTS_THRESHOLD, + sizeof(rts_threshold), &rts_threshold); +} + +static int ipw_send_frag_threshold(struct ipw_priv *priv, u16 frag) +{ + struct ipw_frag_threshold frag_threshold = { + .frag_threshold = cpu_to_le16(frag), + }; + + if (!priv) { + IPW_ERROR("Invalid args\n"); + return -1; + } + + return ipw_send_cmd_pdu(priv, IPW_CMD_FRAG_THRESHOLD, + sizeof(frag_threshold), &frag_threshold); +} + +static int ipw_send_power_mode(struct ipw_priv *priv, u32 mode) +{ + __le32 param; + + if (!priv) { + IPW_ERROR("Invalid args\n"); + return -1; + } + + /* If on battery, set to 3, if AC set to CAM, else user + * level */ + switch (mode) { + case IPW_POWER_BATTERY: + param = cpu_to_le32(IPW_POWER_INDEX_3); + break; + case IPW_POWER_AC: + param = cpu_to_le32(IPW_POWER_MODE_CAM); + break; + default: + param = cpu_to_le32(mode); + break; + } + + return ipw_send_cmd_pdu(priv, IPW_CMD_POWER_MODE, sizeof(param), + ¶m); +} + +static int ipw_send_retry_limit(struct ipw_priv *priv, u8 slimit, u8 llimit) +{ + struct ipw_retry_limit retry_limit = { + .short_retry_limit = slimit, + .long_retry_limit = llimit + }; + + if (!priv) { + IPW_ERROR("Invalid args\n"); + return -1; + } + + return ipw_send_cmd_pdu(priv, IPW_CMD_RETRY_LIMIT, sizeof(retry_limit), + &retry_limit); +} + +/* + * The IPW device contains a Microwire compatible EEPROM that stores + * various data like the MAC address. Usually the firmware has exclusive + * access to the eeprom, but during device initialization (before the + * device driver has sent the HostComplete command to the firmware) the + * device driver has read access to the EEPROM by way of indirect addressing + * through a couple of memory mapped registers. + * + * The following is a simplified implementation for pulling data out of the + * the eeprom, along with some helper functions to find information in + * the per device private data's copy of the eeprom. + * + * NOTE: To better understand how these functions work (i.e what is a chip + * select and why do have to keep driving the eeprom clock?), read + * just about any data sheet for a Microwire compatible EEPROM. + */ + +/* write a 32 bit value into the indirect accessor register */ +static inline void eeprom_write_reg(struct ipw_priv *p, u32 data) +{ + ipw_write_reg32(p, FW_MEM_REG_EEPROM_ACCESS, data); + + /* the eeprom requires some time to complete the operation */ + udelay(p->eeprom_delay); +} + +/* perform a chip select operation */ +static void eeprom_cs(struct ipw_priv *priv) +{ + eeprom_write_reg(priv, 0); + eeprom_write_reg(priv, EEPROM_BIT_CS); + eeprom_write_reg(priv, EEPROM_BIT_CS | EEPROM_BIT_SK); + eeprom_write_reg(priv, EEPROM_BIT_CS); +} + +/* perform a chip select operation */ +static void eeprom_disable_cs(struct ipw_priv *priv) +{ + eeprom_write_reg(priv, EEPROM_BIT_CS); + eeprom_write_reg(priv, 0); + eeprom_write_reg(priv, EEPROM_BIT_SK); +} + +/* push a single bit down to the eeprom */ +static inline void eeprom_write_bit(struct ipw_priv *p, u8 bit) +{ + int d = (bit ? EEPROM_BIT_DI : 0); + eeprom_write_reg(p, EEPROM_BIT_CS | d); + eeprom_write_reg(p, EEPROM_BIT_CS | d | EEPROM_BIT_SK); +} + +/* push an opcode followed by an address down to the eeprom */ +static void eeprom_op(struct ipw_priv *priv, u8 op, u8 addr) +{ + int i; + + eeprom_cs(priv); + eeprom_write_bit(priv, 1); + eeprom_write_bit(priv, op & 2); + eeprom_write_bit(priv, op & 1); + for (i = 7; i >= 0; i--) { + eeprom_write_bit(priv, addr & (1 << i)); + } +} + +/* pull 16 bits off the eeprom, one bit at a time */ +static u16 eeprom_read_u16(struct ipw_priv *priv, u8 addr) +{ + int i; + u16 r = 0; + + /* Send READ Opcode */ + eeprom_op(priv, EEPROM_CMD_READ, addr); + + /* Send dummy bit */ + eeprom_write_reg(priv, EEPROM_BIT_CS); + + /* Read the byte off the eeprom one bit at a time */ + for (i = 0; i < 16; i++) { + u32 data = 0; + eeprom_write_reg(priv, EEPROM_BIT_CS | EEPROM_BIT_SK); + eeprom_write_reg(priv, EEPROM_BIT_CS); + data = ipw_read_reg32(priv, FW_MEM_REG_EEPROM_ACCESS); + r = (r << 1) | ((data & EEPROM_BIT_DO) ? 1 : 0); + } + + /* Send another dummy bit */ + eeprom_write_reg(priv, 0); + eeprom_disable_cs(priv); + + return r; +} + +/* helper function for pulling the mac address out of the private */ +/* data's copy of the eeprom data */ +static void eeprom_parse_mac(struct ipw_priv *priv, u8 * mac) +{ + memcpy(mac, &priv->eeprom[EEPROM_MAC_ADDRESS], ETH_ALEN); +} + +static void ipw_read_eeprom(struct ipw_priv *priv) +{ + int i; + __le16 *eeprom = (__le16 *) priv->eeprom; + + IPW_DEBUG_TRACE(">>\n"); + + /* read entire contents of eeprom into private buffer */ + for (i = 0; i < 128; i++) + eeprom[i] = cpu_to_le16(eeprom_read_u16(priv, (u8) i)); + + IPW_DEBUG_TRACE("<<\n"); +} + +/* + * Either the device driver (i.e. the host) or the firmware can + * load eeprom data into the designated region in SRAM. If neither + * happens then the FW will shutdown with a fatal error. + * + * In order to signal the FW to load the EEPROM, the EEPROM_LOAD_DISABLE + * bit needs region of shared SRAM needs to be non-zero. + */ +static void ipw_eeprom_init_sram(struct ipw_priv *priv) +{ + int i; + + IPW_DEBUG_TRACE(">>\n"); + + /* + If the data looks correct, then copy it to our private + copy. Otherwise let the firmware know to perform the operation + on its own. + */ + if (priv->eeprom[EEPROM_VERSION] != 0) { + IPW_DEBUG_INFO("Writing EEPROM data into SRAM\n"); + + /* write the eeprom data to sram */ + for (i = 0; i < IPW_EEPROM_IMAGE_SIZE; i++) + ipw_write8(priv, IPW_EEPROM_DATA + i, priv->eeprom[i]); + + /* Do not load eeprom data on fatal error or suspend */ + ipw_write32(priv, IPW_EEPROM_LOAD_DISABLE, 0); + } else { + IPW_DEBUG_INFO("Enabling FW initializationg of SRAM\n"); + + /* Load eeprom data on fatal error or suspend */ + ipw_write32(priv, IPW_EEPROM_LOAD_DISABLE, 1); + } + + IPW_DEBUG_TRACE("<<\n"); +} + +static void ipw_zero_memory(struct ipw_priv *priv, u32 start, u32 count) +{ + count >>= 2; + if (!count) + return; + _ipw_write32(priv, IPW_AUTOINC_ADDR, start); + while (count--) + _ipw_write32(priv, IPW_AUTOINC_DATA, 0); +} + +static inline void ipw_fw_dma_reset_command_blocks(struct ipw_priv *priv) +{ + ipw_zero_memory(priv, IPW_SHARED_SRAM_DMA_CONTROL, + CB_NUMBER_OF_ELEMENTS_SMALL * + sizeof(struct command_block)); +} + +static int ipw_fw_dma_enable(struct ipw_priv *priv) +{ /* start dma engine but no transfers yet */ + + IPW_DEBUG_FW(">> :\n"); + + /* Start the dma */ + ipw_fw_dma_reset_command_blocks(priv); + + /* Write CB base address */ + ipw_write_reg32(priv, IPW_DMA_I_CB_BASE, IPW_SHARED_SRAM_DMA_CONTROL); + + IPW_DEBUG_FW("<< :\n"); + return 0; +} + +static void ipw_fw_dma_abort(struct ipw_priv *priv) +{ + u32 control = 0; + + IPW_DEBUG_FW(">> :\n"); + + /* set the Stop and Abort bit */ + control = DMA_CONTROL_SMALL_CB_CONST_VALUE | DMA_CB_STOP_AND_ABORT; + ipw_write_reg32(priv, IPW_DMA_I_DMA_CONTROL, control); + priv->sram_desc.last_cb_index = 0; + + IPW_DEBUG_FW("<<\n"); +} + +static int ipw_fw_dma_write_command_block(struct ipw_priv *priv, int index, + struct command_block *cb) +{ + u32 address = + IPW_SHARED_SRAM_DMA_CONTROL + + (sizeof(struct command_block) * index); + IPW_DEBUG_FW(">> :\n"); + + ipw_write_indirect(priv, address, (u8 *) cb, + (int)sizeof(struct command_block)); + + IPW_DEBUG_FW("<< :\n"); + return 0; + +} + +static int ipw_fw_dma_kick(struct ipw_priv *priv) +{ + u32 control = 0; + u32 index = 0; + + IPW_DEBUG_FW(">> :\n"); + + for (index = 0; index < priv->sram_desc.last_cb_index; index++) + ipw_fw_dma_write_command_block(priv, index, + &priv->sram_desc.cb_list[index]); + + /* Enable the DMA in the CSR register */ + ipw_clear_bit(priv, IPW_RESET_REG, + IPW_RESET_REG_MASTER_DISABLED | + IPW_RESET_REG_STOP_MASTER); + + /* Set the Start bit. */ + control = DMA_CONTROL_SMALL_CB_CONST_VALUE | DMA_CB_START; + ipw_write_reg32(priv, IPW_DMA_I_DMA_CONTROL, control); + + IPW_DEBUG_FW("<< :\n"); + return 0; +} + +static void ipw_fw_dma_dump_command_block(struct ipw_priv *priv) +{ + u32 address; + u32 register_value = 0; + u32 cb_fields_address = 0; + + IPW_DEBUG_FW(">> :\n"); + address = ipw_read_reg32(priv, IPW_DMA_I_CURRENT_CB); + IPW_DEBUG_FW_INFO("Current CB is 0x%x\n", address); + + /* Read the DMA Controlor register */ + register_value = ipw_read_reg32(priv, IPW_DMA_I_DMA_CONTROL); + IPW_DEBUG_FW_INFO("IPW_DMA_I_DMA_CONTROL is 0x%x\n", register_value); + + /* Print the CB values */ + cb_fields_address = address; + register_value = ipw_read_reg32(priv, cb_fields_address); + IPW_DEBUG_FW_INFO("Current CB Control Field is 0x%x\n", register_value); + + cb_fields_address += sizeof(u32); + register_value = ipw_read_reg32(priv, cb_fields_address); + IPW_DEBUG_FW_INFO("Current CB Source Field is 0x%x\n", register_value); + + cb_fields_address += sizeof(u32); + register_value = ipw_read_reg32(priv, cb_fields_address); + IPW_DEBUG_FW_INFO("Current CB Destination Field is 0x%x\n", + register_value); + + cb_fields_address += sizeof(u32); + register_value = ipw_read_reg32(priv, cb_fields_address); + IPW_DEBUG_FW_INFO("Current CB Status Field is 0x%x\n", register_value); + + IPW_DEBUG_FW(">> :\n"); +} + +static int ipw_fw_dma_command_block_index(struct ipw_priv *priv) +{ + u32 current_cb_address = 0; + u32 current_cb_index = 0; + + IPW_DEBUG_FW("<< :\n"); + current_cb_address = ipw_read_reg32(priv, IPW_DMA_I_CURRENT_CB); + + current_cb_index = (current_cb_address - IPW_SHARED_SRAM_DMA_CONTROL) / + sizeof(struct command_block); + + IPW_DEBUG_FW_INFO("Current CB index 0x%x address = 0x%X\n", + current_cb_index, current_cb_address); + + IPW_DEBUG_FW(">> :\n"); + return current_cb_index; + +} + +static int ipw_fw_dma_add_command_block(struct ipw_priv *priv, + u32 src_address, + u32 dest_address, + u32 length, + int interrupt_enabled, int is_last) +{ + + u32 control = CB_VALID | CB_SRC_LE | CB_DEST_LE | CB_SRC_AUTOINC | + CB_SRC_IO_GATED | CB_DEST_AUTOINC | CB_SRC_SIZE_LONG | + CB_DEST_SIZE_LONG; + struct command_block *cb; + u32 last_cb_element = 0; + + IPW_DEBUG_FW_INFO("src_address=0x%x dest_address=0x%x length=0x%x\n", + src_address, dest_address, length); + + if (priv->sram_desc.last_cb_index >= CB_NUMBER_OF_ELEMENTS_SMALL) + return -1; + + last_cb_element = priv->sram_desc.last_cb_index; + cb = &priv->sram_desc.cb_list[last_cb_element]; + priv->sram_desc.last_cb_index++; + + /* Calculate the new CB control word */ + if (interrupt_enabled) + control |= CB_INT_ENABLED; + + if (is_last) + control |= CB_LAST_VALID; + + control |= length; + + /* Calculate the CB Element's checksum value */ + cb->status = control ^ src_address ^ dest_address; + + /* Copy the Source and Destination addresses */ + cb->dest_addr = dest_address; + cb->source_addr = src_address; + + /* Copy the Control Word last */ + cb->control = control; + + return 0; +} + +static int ipw_fw_dma_add_buffer(struct ipw_priv *priv, dma_addr_t *src_address, + int nr, u32 dest_address, u32 len) +{ + int ret, i; + u32 size; + + IPW_DEBUG_FW(">>\n"); + IPW_DEBUG_FW_INFO("nr=%d dest_address=0x%x len=0x%x\n", + nr, dest_address, len); + + for (i = 0; i < nr; i++) { + size = min_t(u32, len - i * CB_MAX_LENGTH, CB_MAX_LENGTH); + ret = ipw_fw_dma_add_command_block(priv, src_address[i], + dest_address + + i * CB_MAX_LENGTH, size, + 0, 0); + if (ret) { + IPW_DEBUG_FW_INFO(": Failed\n"); + return -1; + } else + IPW_DEBUG_FW_INFO(": Added new cb\n"); + } + + IPW_DEBUG_FW("<<\n"); + return 0; +} + +static int ipw_fw_dma_wait(struct ipw_priv *priv) +{ + u32 current_index = 0, previous_index; + u32 watchdog = 0; + + IPW_DEBUG_FW(">> :\n"); + + current_index = ipw_fw_dma_command_block_index(priv); + IPW_DEBUG_FW_INFO("sram_desc.last_cb_index:0x%08X\n", + (int)priv->sram_desc.last_cb_index); + + while (current_index < priv->sram_desc.last_cb_index) { + udelay(50); + previous_index = current_index; + current_index = ipw_fw_dma_command_block_index(priv); + + if (previous_index < current_index) { + watchdog = 0; + continue; + } + if (++watchdog > 400) { + IPW_DEBUG_FW_INFO("Timeout\n"); + ipw_fw_dma_dump_command_block(priv); + ipw_fw_dma_abort(priv); + return -1; + } + } + + ipw_fw_dma_abort(priv); + + /*Disable the DMA in the CSR register */ + ipw_set_bit(priv, IPW_RESET_REG, + IPW_RESET_REG_MASTER_DISABLED | IPW_RESET_REG_STOP_MASTER); + + IPW_DEBUG_FW("<< dmaWaitSync\n"); + return 0; +} + +static void ipw_remove_current_network(struct ipw_priv *priv) +{ + struct list_head *element, *safe; + struct libipw_network *network = NULL; + unsigned long flags; + + spin_lock_irqsave(&priv->ieee->lock, flags); + list_for_each_safe(element, safe, &priv->ieee->network_list) { + network = list_entry(element, struct libipw_network, list); + if (ether_addr_equal(network->bssid, priv->bssid)) { + list_del(element); + list_add_tail(&network->list, + &priv->ieee->network_free_list); + } + } + spin_unlock_irqrestore(&priv->ieee->lock, flags); +} + +/** + * Check that card is still alive. + * Reads debug register from domain0. + * If card is present, pre-defined value should + * be found there. + * + * @param priv + * @return 1 if card is present, 0 otherwise + */ +static inline int ipw_alive(struct ipw_priv *priv) +{ + return ipw_read32(priv, 0x90) == 0xd55555d5; +} + +/* timeout in msec, attempted in 10-msec quanta */ +static int ipw_poll_bit(struct ipw_priv *priv, u32 addr, u32 mask, + int timeout) +{ + int i = 0; + + do { + if ((ipw_read32(priv, addr) & mask) == mask) + return i; + mdelay(10); + i += 10; + } while (i < timeout); + + return -ETIME; +} + +/* These functions load the firmware and micro code for the operation of + * the ipw hardware. It assumes the buffer has all the bits for the + * image and the caller is handling the memory allocation and clean up. + */ + +static int ipw_stop_master(struct ipw_priv *priv) +{ + int rc; + + IPW_DEBUG_TRACE(">>\n"); + /* stop master. typical delay - 0 */ + ipw_set_bit(priv, IPW_RESET_REG, IPW_RESET_REG_STOP_MASTER); + + /* timeout is in msec, polled in 10-msec quanta */ + rc = ipw_poll_bit(priv, IPW_RESET_REG, + IPW_RESET_REG_MASTER_DISABLED, 100); + if (rc < 0) { + IPW_ERROR("wait for stop master failed after 100ms\n"); + return -1; + } + + IPW_DEBUG_INFO("stop master %dms\n", rc); + + return rc; +} + +static void ipw_arc_release(struct ipw_priv *priv) +{ + IPW_DEBUG_TRACE(">>\n"); + mdelay(5); + + ipw_clear_bit(priv, IPW_RESET_REG, CBD_RESET_REG_PRINCETON_RESET); + + /* no one knows timing, for safety add some delay */ + mdelay(5); +} + +struct fw_chunk { + __le32 address; + __le32 length; +}; + +static int ipw_load_ucode(struct ipw_priv *priv, u8 * data, size_t len) +{ + int rc = 0, i, addr; + u8 cr = 0; + __le16 *image; + + image = (__le16 *) data; + + IPW_DEBUG_TRACE(">>\n"); + + rc = ipw_stop_master(priv); + + if (rc < 0) + return rc; + + for (addr = IPW_SHARED_LOWER_BOUND; + addr < IPW_REGISTER_DOMAIN1_END; addr += 4) { + ipw_write32(priv, addr, 0); + } + + /* no ucode (yet) */ + memset(&priv->dino_alive, 0, sizeof(priv->dino_alive)); + /* destroy DMA queues */ + /* reset sequence */ + + ipw_write_reg32(priv, IPW_MEM_HALT_AND_RESET, IPW_BIT_HALT_RESET_ON); + ipw_arc_release(priv); + ipw_write_reg32(priv, IPW_MEM_HALT_AND_RESET, IPW_BIT_HALT_RESET_OFF); + mdelay(1); + + /* reset PHY */ + ipw_write_reg32(priv, IPW_INTERNAL_CMD_EVENT, IPW_BASEBAND_POWER_DOWN); + mdelay(1); + + ipw_write_reg32(priv, IPW_INTERNAL_CMD_EVENT, 0); + mdelay(1); + + /* enable ucode store */ + ipw_write_reg8(priv, IPW_BASEBAND_CONTROL_STATUS, 0x0); + ipw_write_reg8(priv, IPW_BASEBAND_CONTROL_STATUS, DINO_ENABLE_CS); + mdelay(1); + + /* write ucode */ + /** + * @bug + * Do NOT set indirect address register once and then + * store data to indirect data register in the loop. + * It seems very reasonable, but in this case DINO do not + * accept ucode. It is essential to set address each time. + */ + /* load new ipw uCode */ + for (i = 0; i < len / 2; i++) + ipw_write_reg16(priv, IPW_BASEBAND_CONTROL_STORE, + le16_to_cpu(image[i])); + + /* enable DINO */ + ipw_write_reg8(priv, IPW_BASEBAND_CONTROL_STATUS, 0); + ipw_write_reg8(priv, IPW_BASEBAND_CONTROL_STATUS, DINO_ENABLE_SYSTEM); + + /* this is where the igx / win driver deveates from the VAP driver. */ + + /* wait for alive response */ + for (i = 0; i < 100; i++) { + /* poll for incoming data */ + cr = ipw_read_reg8(priv, IPW_BASEBAND_CONTROL_STATUS); + if (cr & DINO_RXFIFO_DATA) + break; + mdelay(1); + } + + if (cr & DINO_RXFIFO_DATA) { + /* alive_command_responce size is NOT multiple of 4 */ + __le32 response_buffer[(sizeof(priv->dino_alive) + 3) / 4]; + + for (i = 0; i < ARRAY_SIZE(response_buffer); i++) + response_buffer[i] = + cpu_to_le32(ipw_read_reg32(priv, + IPW_BASEBAND_RX_FIFO_READ)); + memcpy(&priv->dino_alive, response_buffer, + sizeof(priv->dino_alive)); + if (priv->dino_alive.alive_command == 1 + && priv->dino_alive.ucode_valid == 1) { + rc = 0; + IPW_DEBUG_INFO + ("Microcode OK, rev. %d (0x%x) dev. %d (0x%x) " + "of %02d/%02d/%02d %02d:%02d\n", + priv->dino_alive.software_revision, + priv->dino_alive.software_revision, + priv->dino_alive.device_identifier, + priv->dino_alive.device_identifier, + priv->dino_alive.time_stamp[0], + priv->dino_alive.time_stamp[1], + priv->dino_alive.time_stamp[2], + priv->dino_alive.time_stamp[3], + priv->dino_alive.time_stamp[4]); + } else { + IPW_DEBUG_INFO("Microcode is not alive\n"); + rc = -EINVAL; + } + } else { + IPW_DEBUG_INFO("No alive response from DINO\n"); + rc = -ETIME; + } + + /* disable DINO, otherwise for some reason + firmware have problem getting alive resp. */ + ipw_write_reg8(priv, IPW_BASEBAND_CONTROL_STATUS, 0); + + return rc; +} + +static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len) +{ + int ret = -1; + int offset = 0; + struct fw_chunk *chunk; + int total_nr = 0; + int i; + struct dma_pool *pool; + void **virts; + dma_addr_t *phys; + + IPW_DEBUG_TRACE("<< :\n"); + + virts = kmalloc_array(CB_NUMBER_OF_ELEMENTS_SMALL, sizeof(void *), + GFP_KERNEL); + if (!virts) + return -ENOMEM; + + phys = kmalloc_array(CB_NUMBER_OF_ELEMENTS_SMALL, sizeof(dma_addr_t), + GFP_KERNEL); + if (!phys) { + kfree(virts); + return -ENOMEM; + } + pool = dma_pool_create("ipw2200", &priv->pci_dev->dev, CB_MAX_LENGTH, 0, + 0); + if (!pool) { + IPW_ERROR("dma_pool_create failed\n"); + kfree(phys); + kfree(virts); + return -ENOMEM; + } + + /* Start the Dma */ + ret = ipw_fw_dma_enable(priv); + + /* the DMA is already ready this would be a bug. */ + BUG_ON(priv->sram_desc.last_cb_index > 0); + + do { + u32 chunk_len; + u8 *start; + int size; + int nr = 0; + + chunk = (struct fw_chunk *)(data + offset); + offset += sizeof(struct fw_chunk); + chunk_len = le32_to_cpu(chunk->length); + start = data + offset; + + nr = (chunk_len + CB_MAX_LENGTH - 1) / CB_MAX_LENGTH; + for (i = 0; i < nr; i++) { + virts[total_nr] = dma_pool_alloc(pool, GFP_KERNEL, + &phys[total_nr]); + if (!virts[total_nr]) { + ret = -ENOMEM; + goto out; + } + size = min_t(u32, chunk_len - i * CB_MAX_LENGTH, + CB_MAX_LENGTH); + memcpy(virts[total_nr], start, size); + start += size; + total_nr++; + /* We don't support fw chunk larger than 64*8K */ + BUG_ON(total_nr > CB_NUMBER_OF_ELEMENTS_SMALL); + } + + /* build DMA packet and queue up for sending */ + /* dma to chunk->address, the chunk->length bytes from data + + * offeset*/ + /* Dma loading */ + ret = ipw_fw_dma_add_buffer(priv, &phys[total_nr - nr], + nr, le32_to_cpu(chunk->address), + chunk_len); + if (ret) { + IPW_DEBUG_INFO("dmaAddBuffer Failed\n"); + goto out; + } + + offset += chunk_len; + } while (offset < len); + + /* Run the DMA and wait for the answer */ + ret = ipw_fw_dma_kick(priv); + if (ret) { + IPW_ERROR("dmaKick Failed\n"); + goto out; + } + + ret = ipw_fw_dma_wait(priv); + if (ret) { + IPW_ERROR("dmaWaitSync Failed\n"); + goto out; + } + out: + for (i = 0; i < total_nr; i++) + dma_pool_free(pool, virts[i], phys[i]); + + dma_pool_destroy(pool); + kfree(phys); + kfree(virts); + + return ret; +} + +/* stop nic */ +static int ipw_stop_nic(struct ipw_priv *priv) +{ + int rc = 0; + + /* stop */ + ipw_write32(priv, IPW_RESET_REG, IPW_RESET_REG_STOP_MASTER); + + rc = ipw_poll_bit(priv, IPW_RESET_REG, + IPW_RESET_REG_MASTER_DISABLED, 500); + if (rc < 0) { + IPW_ERROR("wait for reg master disabled failed after 500ms\n"); + return rc; + } + + ipw_set_bit(priv, IPW_RESET_REG, CBD_RESET_REG_PRINCETON_RESET); + + return rc; +} + +static void ipw_start_nic(struct ipw_priv *priv) +{ + IPW_DEBUG_TRACE(">>\n"); + + /* prvHwStartNic release ARC */ + ipw_clear_bit(priv, IPW_RESET_REG, + IPW_RESET_REG_MASTER_DISABLED | + IPW_RESET_REG_STOP_MASTER | + CBD_RESET_REG_PRINCETON_RESET); + + /* enable power management */ + ipw_set_bit(priv, IPW_GP_CNTRL_RW, + IPW_GP_CNTRL_BIT_HOST_ALLOWS_STANDBY); + + IPW_DEBUG_TRACE("<<\n"); +} + +static int ipw_init_nic(struct ipw_priv *priv) +{ + int rc; + + IPW_DEBUG_TRACE(">>\n"); + /* reset */ + /*prvHwInitNic */ + /* set "initialization complete" bit to move adapter to D0 state */ + ipw_set_bit(priv, IPW_GP_CNTRL_RW, IPW_GP_CNTRL_BIT_INIT_DONE); + + /* low-level PLL activation */ + ipw_write32(priv, IPW_READ_INT_REGISTER, + IPW_BIT_INT_HOST_SRAM_READ_INT_REGISTER); + + /* wait for clock stabilization */ + rc = ipw_poll_bit(priv, IPW_GP_CNTRL_RW, + IPW_GP_CNTRL_BIT_CLOCK_READY, 250); + if (rc < 0) + IPW_DEBUG_INFO("FAILED wait for clock stablization\n"); + + /* assert SW reset */ + ipw_set_bit(priv, IPW_RESET_REG, IPW_RESET_REG_SW_RESET); + + udelay(10); + + /* set "initialization complete" bit to move adapter to D0 state */ + ipw_set_bit(priv, IPW_GP_CNTRL_RW, IPW_GP_CNTRL_BIT_INIT_DONE); + + IPW_DEBUG_TRACE(">>\n"); + return 0; +} + +/* Call this function from process context, it will sleep in request_firmware. + * Probe is an ok place to call this from. + */ +static int ipw_reset_nic(struct ipw_priv *priv) +{ + int rc = 0; + unsigned long flags; + + IPW_DEBUG_TRACE(">>\n"); + + rc = ipw_init_nic(priv); + + spin_lock_irqsave(&priv->lock, flags); + /* Clear the 'host command active' bit... */ + priv->status &= ~STATUS_HCMD_ACTIVE; + wake_up_interruptible(&priv->wait_command_queue); + priv->status &= ~(STATUS_SCANNING | STATUS_SCAN_ABORTING); + wake_up_interruptible(&priv->wait_state); + spin_unlock_irqrestore(&priv->lock, flags); + + IPW_DEBUG_TRACE("<<\n"); + return rc; +} + + +struct ipw_fw { + __le32 ver; + __le32 boot_size; + __le32 ucode_size; + __le32 fw_size; + u8 data[0]; +}; + +static int ipw_get_fw(struct ipw_priv *priv, + const struct firmware **raw, const char *name) +{ + struct ipw_fw *fw; + int rc; + + /* ask firmware_class module to get the boot firmware off disk */ + rc = request_firmware(raw, name, &priv->pci_dev->dev); + if (rc < 0) { + IPW_ERROR("%s request_firmware failed: Reason %d\n", name, rc); + return rc; + } + + if ((*raw)->size < sizeof(*fw)) { + IPW_ERROR("%s is too small (%zd)\n", name, (*raw)->size); + return -EINVAL; + } + + fw = (void *)(*raw)->data; + + if ((*raw)->size < sizeof(*fw) + le32_to_cpu(fw->boot_size) + + le32_to_cpu(fw->ucode_size) + le32_to_cpu(fw->fw_size)) { + IPW_ERROR("%s is too small or corrupt (%zd)\n", + name, (*raw)->size); + return -EINVAL; + } + + IPW_DEBUG_INFO("Read firmware '%s' image v%d.%d (%zd bytes)\n", + name, + le32_to_cpu(fw->ver) >> 16, + le32_to_cpu(fw->ver) & 0xff, + (*raw)->size - sizeof(*fw)); + return 0; +} + +#define IPW_RX_BUF_SIZE (3000) + +static void ipw_rx_queue_reset(struct ipw_priv *priv, + struct ipw_rx_queue *rxq) +{ + unsigned long flags; + int i; + + spin_lock_irqsave(&rxq->lock, flags); + + INIT_LIST_HEAD(&rxq->rx_free); + INIT_LIST_HEAD(&rxq->rx_used); + + /* Fill the rx_used queue with _all_ of the Rx buffers */ + for (i = 0; i < RX_FREE_BUFFERS + RX_QUEUE_SIZE; i++) { + /* In the reset function, these buffers may have been allocated + * to an SKB, so we need to unmap and free potential storage */ + if (rxq->pool[i].skb != NULL) { + pci_unmap_single(priv->pci_dev, rxq->pool[i].dma_addr, + IPW_RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + dev_kfree_skb(rxq->pool[i].skb); + rxq->pool[i].skb = NULL; + } + list_add_tail(&rxq->pool[i].list, &rxq->rx_used); + } + + /* Set us so that we have processed and used all buffers, but have + * not restocked the Rx queue with fresh buffers */ + rxq->read = rxq->write = 0; + rxq->free_count = 0; + spin_unlock_irqrestore(&rxq->lock, flags); +} + +#ifdef CONFIG_PM +static int fw_loaded = 0; +static const struct firmware *raw = NULL; + +static void free_firmware(void) +{ + if (fw_loaded) { + release_firmware(raw); + raw = NULL; + fw_loaded = 0; + } +} +#else +#define free_firmware() do {} while (0) +#endif + +static int ipw_load(struct ipw_priv *priv) +{ +#ifndef CONFIG_PM + const struct firmware *raw = NULL; +#endif + struct ipw_fw *fw; + u8 *boot_img, *ucode_img, *fw_img; + u8 *name = NULL; + int rc = 0, retries = 3; + + switch (priv->ieee->iw_mode) { + case IW_MODE_ADHOC: + name = "ipw2200-ibss.fw"; + break; +#ifdef CONFIG_IPW2200_MONITOR + case IW_MODE_MONITOR: + name = "ipw2200-sniffer.fw"; + break; +#endif + case IW_MODE_INFRA: + name = "ipw2200-bss.fw"; + break; + } + + if (!name) { + rc = -EINVAL; + goto error; + } + +#ifdef CONFIG_PM + if (!fw_loaded) { +#endif + rc = ipw_get_fw(priv, &raw, name); + if (rc < 0) + goto error; +#ifdef CONFIG_PM + } +#endif + + fw = (void *)raw->data; + boot_img = &fw->data[0]; + ucode_img = &fw->data[le32_to_cpu(fw->boot_size)]; + fw_img = &fw->data[le32_to_cpu(fw->boot_size) + + le32_to_cpu(fw->ucode_size)]; + + if (!priv->rxq) + priv->rxq = ipw_rx_queue_alloc(priv); + else + ipw_rx_queue_reset(priv, priv->rxq); + if (!priv->rxq) { + IPW_ERROR("Unable to initialize Rx queue\n"); + rc = -ENOMEM; + goto error; + } + + retry: + /* Ensure interrupts are disabled */ + ipw_write32(priv, IPW_INTA_MASK_R, ~IPW_INTA_MASK_ALL); + priv->status &= ~STATUS_INT_ENABLED; + + /* ack pending interrupts */ + ipw_write32(priv, IPW_INTA_RW, IPW_INTA_MASK_ALL); + + ipw_stop_nic(priv); + + rc = ipw_reset_nic(priv); + if (rc < 0) { + IPW_ERROR("Unable to reset NIC\n"); + goto error; + } + + ipw_zero_memory(priv, IPW_NIC_SRAM_LOWER_BOUND, + IPW_NIC_SRAM_UPPER_BOUND - IPW_NIC_SRAM_LOWER_BOUND); + + /* DMA the initial boot firmware into the device */ + rc = ipw_load_firmware(priv, boot_img, le32_to_cpu(fw->boot_size)); + if (rc < 0) { + IPW_ERROR("Unable to load boot firmware: %d\n", rc); + goto error; + } + + /* kick start the device */ + ipw_start_nic(priv); + + /* wait for the device to finish its initial startup sequence */ + rc = ipw_poll_bit(priv, IPW_INTA_RW, + IPW_INTA_BIT_FW_INITIALIZATION_DONE, 500); + if (rc < 0) { + IPW_ERROR("device failed to boot initial fw image\n"); + goto error; + } + IPW_DEBUG_INFO("initial device response after %dms\n", rc); + + /* ack fw init done interrupt */ + ipw_write32(priv, IPW_INTA_RW, IPW_INTA_BIT_FW_INITIALIZATION_DONE); + + /* DMA the ucode into the device */ + rc = ipw_load_ucode(priv, ucode_img, le32_to_cpu(fw->ucode_size)); + if (rc < 0) { + IPW_ERROR("Unable to load ucode: %d\n", rc); + goto error; + } + + /* stop nic */ + ipw_stop_nic(priv); + + /* DMA bss firmware into the device */ + rc = ipw_load_firmware(priv, fw_img, le32_to_cpu(fw->fw_size)); + if (rc < 0) { + IPW_ERROR("Unable to load firmware: %d\n", rc); + goto error; + } +#ifdef CONFIG_PM + fw_loaded = 1; +#endif + + ipw_write32(priv, IPW_EEPROM_LOAD_DISABLE, 0); + + rc = ipw_queue_reset(priv); + if (rc < 0) { + IPW_ERROR("Unable to initialize queues\n"); + goto error; + } + + /* Ensure interrupts are disabled */ + ipw_write32(priv, IPW_INTA_MASK_R, ~IPW_INTA_MASK_ALL); + /* ack pending interrupts */ + ipw_write32(priv, IPW_INTA_RW, IPW_INTA_MASK_ALL); + + /* kick start the device */ + ipw_start_nic(priv); + + if (ipw_read32(priv, IPW_INTA_RW) & IPW_INTA_BIT_PARITY_ERROR) { + if (retries > 0) { + IPW_WARNING("Parity error. Retrying init.\n"); + retries--; + goto retry; + } + + IPW_ERROR("TODO: Handle parity error -- schedule restart?\n"); + rc = -EIO; + goto error; + } + + /* wait for the device */ + rc = ipw_poll_bit(priv, IPW_INTA_RW, + IPW_INTA_BIT_FW_INITIALIZATION_DONE, 500); + if (rc < 0) { + IPW_ERROR("device failed to start within 500ms\n"); + goto error; + } + IPW_DEBUG_INFO("device response after %dms\n", rc); + + /* ack fw init done interrupt */ + ipw_write32(priv, IPW_INTA_RW, IPW_INTA_BIT_FW_INITIALIZATION_DONE); + + /* read eeprom data */ + priv->eeprom_delay = 1; + ipw_read_eeprom(priv); + /* initialize the eeprom region of sram */ + ipw_eeprom_init_sram(priv); + + /* enable interrupts */ + ipw_enable_interrupts(priv); + + /* Ensure our queue has valid packets */ + ipw_rx_queue_replenish(priv); + + ipw_write32(priv, IPW_RX_READ_INDEX, priv->rxq->read); + + /* ack pending interrupts */ + ipw_write32(priv, IPW_INTA_RW, IPW_INTA_MASK_ALL); + +#ifndef CONFIG_PM + release_firmware(raw); +#endif + return 0; + + error: + if (priv->rxq) { + ipw_rx_queue_free(priv, priv->rxq); + priv->rxq = NULL; + } + ipw_tx_queue_free(priv); + release_firmware(raw); +#ifdef CONFIG_PM + fw_loaded = 0; + raw = NULL; +#endif + + return rc; +} + +/** + * DMA services + * + * Theory of operation + * + * A queue is a circular buffers with 'Read' and 'Write' pointers. + * 2 empty entries always kept in the buffer to protect from overflow. + * + * For Tx queue, there are low mark and high mark limits. If, after queuing + * the packet for Tx, free space become < low mark, Tx queue stopped. When + * reclaiming packets (on 'tx done IRQ), if free space become > high mark, + * Tx queue resumed. + * + * The IPW operates with six queues, one receive queue in the device's + * sram, one transmit queue for sending commands to the device firmware, + * and four transmit queues for data. + * + * The four transmit queues allow for performing quality of service (qos) + * transmissions as per the 802.11 protocol. Currently Linux does not + * provide a mechanism to the user for utilizing prioritized queues, so + * we only utilize the first data transmit queue (queue1). + */ + +/** + * Driver allocates buffers of this size for Rx + */ + +/** + * ipw_rx_queue_space - Return number of free slots available in queue. + */ +static int ipw_rx_queue_space(const struct ipw_rx_queue *q) +{ + int s = q->read - q->write; + if (s <= 0) + s += RX_QUEUE_SIZE; + /* keep some buffer to not confuse full and empty queue */ + s -= 2; + if (s < 0) + s = 0; + return s; +} + +static inline int ipw_tx_queue_space(const struct clx2_queue *q) +{ + int s = q->last_used - q->first_empty; + if (s <= 0) + s += q->n_bd; + s -= 2; /* keep some reserve to not confuse empty and full situations */ + if (s < 0) + s = 0; + return s; +} + +static inline int ipw_queue_inc_wrap(int index, int n_bd) +{ + return (++index == n_bd) ? 0 : index; +} + +/** + * Initialize common DMA queue structure + * + * @param q queue to init + * @param count Number of BD's to allocate. Should be power of 2 + * @param read_register Address for 'read' register + * (not offset within BAR, full address) + * @param write_register Address for 'write' register + * (not offset within BAR, full address) + * @param base_register Address for 'base' register + * (not offset within BAR, full address) + * @param size Address for 'size' register + * (not offset within BAR, full address) + */ +static void ipw_queue_init(struct ipw_priv *priv, struct clx2_queue *q, + int count, u32 read, u32 write, u32 base, u32 size) +{ + q->n_bd = count; + + q->low_mark = q->n_bd / 4; + if (q->low_mark < 4) + q->low_mark = 4; + + q->high_mark = q->n_bd / 8; + if (q->high_mark < 2) + q->high_mark = 2; + + q->first_empty = q->last_used = 0; + q->reg_r = read; + q->reg_w = write; + + ipw_write32(priv, base, q->dma_addr); + ipw_write32(priv, size, count); + ipw_write32(priv, read, 0); + ipw_write32(priv, write, 0); + + _ipw_read32(priv, 0x90); +} + +static int ipw_queue_tx_init(struct ipw_priv *priv, + struct clx2_tx_queue *q, + int count, u32 read, u32 write, u32 base, u32 size) +{ + struct pci_dev *dev = priv->pci_dev; + + q->txb = kmalloc_array(count, sizeof(q->txb[0]), GFP_KERNEL); + if (!q->txb) { + IPW_ERROR("vmalloc for auxiliary BD structures failed\n"); + return -ENOMEM; + } + + q->bd = + pci_alloc_consistent(dev, sizeof(q->bd[0]) * count, &q->q.dma_addr); + if (!q->bd) { + IPW_ERROR("pci_alloc_consistent(%zd) failed\n", + sizeof(q->bd[0]) * count); + kfree(q->txb); + q->txb = NULL; + return -ENOMEM; + } + + ipw_queue_init(priv, &q->q, count, read, write, base, size); + return 0; +} + +/** + * Free one TFD, those at index [txq->q.last_used]. + * Do NOT advance any indexes + * + * @param dev + * @param txq + */ +static void ipw_queue_tx_free_tfd(struct ipw_priv *priv, + struct clx2_tx_queue *txq) +{ + struct tfd_frame *bd = &txq->bd[txq->q.last_used]; + struct pci_dev *dev = priv->pci_dev; + int i; + + /* classify bd */ + if (bd->control_flags.message_type == TX_HOST_COMMAND_TYPE) + /* nothing to cleanup after for host commands */ + return; + + /* sanity check */ + if (le32_to_cpu(bd->u.data.num_chunks) > NUM_TFD_CHUNKS) { + IPW_ERROR("Too many chunks: %i\n", + le32_to_cpu(bd->u.data.num_chunks)); + /** @todo issue fatal error, it is quite serious situation */ + return; + } + + /* unmap chunks if any */ + for (i = 0; i < le32_to_cpu(bd->u.data.num_chunks); i++) { + pci_unmap_single(dev, le32_to_cpu(bd->u.data.chunk_ptr[i]), + le16_to_cpu(bd->u.data.chunk_len[i]), + PCI_DMA_TODEVICE); + if (txq->txb[txq->q.last_used]) { + libipw_txb_free(txq->txb[txq->q.last_used]); + txq->txb[txq->q.last_used] = NULL; + } + } +} + +/** + * Deallocate DMA queue. + * + * Empty queue by removing and destroying all BD's. + * Free all buffers. + * + * @param dev + * @param q + */ +static void ipw_queue_tx_free(struct ipw_priv *priv, struct clx2_tx_queue *txq) +{ + struct clx2_queue *q = &txq->q; + struct pci_dev *dev = priv->pci_dev; + + if (q->n_bd == 0) + return; + + /* first, empty all BD's */ + for (; q->first_empty != q->last_used; + q->last_used = ipw_queue_inc_wrap(q->last_used, q->n_bd)) { + ipw_queue_tx_free_tfd(priv, txq); + } + + /* free buffers belonging to queue itself */ + pci_free_consistent(dev, sizeof(txq->bd[0]) * q->n_bd, txq->bd, + q->dma_addr); + kfree(txq->txb); + + /* 0 fill whole structure */ + memset(txq, 0, sizeof(*txq)); +} + +/** + * Destroy all DMA queues and structures + * + * @param priv + */ +static void ipw_tx_queue_free(struct ipw_priv *priv) +{ + /* Tx CMD queue */ + ipw_queue_tx_free(priv, &priv->txq_cmd); + + /* Tx queues */ + ipw_queue_tx_free(priv, &priv->txq[0]); + ipw_queue_tx_free(priv, &priv->txq[1]); + ipw_queue_tx_free(priv, &priv->txq[2]); + ipw_queue_tx_free(priv, &priv->txq[3]); +} + +static void ipw_create_bssid(struct ipw_priv *priv, u8 * bssid) +{ + /* First 3 bytes are manufacturer */ + bssid[0] = priv->mac_addr[0]; + bssid[1] = priv->mac_addr[1]; + bssid[2] = priv->mac_addr[2]; + + /* Last bytes are random */ + get_random_bytes(&bssid[3], ETH_ALEN - 3); + + bssid[0] &= 0xfe; /* clear multicast bit */ + bssid[0] |= 0x02; /* set local assignment bit (IEEE802) */ +} + +static u8 ipw_add_station(struct ipw_priv *priv, u8 * bssid) +{ + struct ipw_station_entry entry; + int i; + + for (i = 0; i < priv->num_stations; i++) { + if (ether_addr_equal(priv->stations[i], bssid)) { + /* Another node is active in network */ + priv->missed_adhoc_beacons = 0; + if (!(priv->config & CFG_STATIC_CHANNEL)) + /* when other nodes drop out, we drop out */ + priv->config &= ~CFG_ADHOC_PERSIST; + + return i; + } + } + + if (i == MAX_STATIONS) + return IPW_INVALID_STATION; + + IPW_DEBUG_SCAN("Adding AdHoc station: %pM\n", bssid); + + entry.reserved = 0; + entry.support_mode = 0; + memcpy(entry.mac_addr, bssid, ETH_ALEN); + memcpy(priv->stations[i], bssid, ETH_ALEN); + ipw_write_direct(priv, IPW_STATION_TABLE_LOWER + i * sizeof(entry), + &entry, sizeof(entry)); + priv->num_stations++; + + return i; +} + +static u8 ipw_find_station(struct ipw_priv *priv, u8 * bssid) +{ + int i; + + for (i = 0; i < priv->num_stations; i++) + if (ether_addr_equal(priv->stations[i], bssid)) + return i; + + return IPW_INVALID_STATION; +} + +static void ipw_send_disassociate(struct ipw_priv *priv, int quiet) +{ + int err; + + if (priv->status & STATUS_ASSOCIATING) { + IPW_DEBUG_ASSOC("Disassociating while associating.\n"); + schedule_work(&priv->disassociate); + return; + } + + if (!(priv->status & STATUS_ASSOCIATED)) { + IPW_DEBUG_ASSOC("Disassociating while not associated.\n"); + return; + } + + IPW_DEBUG_ASSOC("Disassociation attempt from %pM " + "on channel %d.\n", + priv->assoc_request.bssid, + priv->assoc_request.channel); + + priv->status &= ~(STATUS_ASSOCIATING | STATUS_ASSOCIATED); + priv->status |= STATUS_DISASSOCIATING; + + if (quiet) + priv->assoc_request.assoc_type = HC_DISASSOC_QUIET; + else + priv->assoc_request.assoc_type = HC_DISASSOCIATE; + + err = ipw_send_associate(priv, &priv->assoc_request); + if (err) { + IPW_DEBUG_HC("Attempt to send [dis]associate command " + "failed.\n"); + return; + } + +} + +static int ipw_disassociate(void *data) +{ + struct ipw_priv *priv = data; + if (!(priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING))) + return 0; + ipw_send_disassociate(data, 0); + netif_carrier_off(priv->net_dev); + return 1; +} + +static void ipw_bg_disassociate(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, disassociate); + mutex_lock(&priv->mutex); + ipw_disassociate(priv); + mutex_unlock(&priv->mutex); +} + +static void ipw_system_config(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, system_config); + +#ifdef CONFIG_IPW2200_PROMISCUOUS + if (priv->prom_net_dev && netif_running(priv->prom_net_dev)) { + priv->sys_config.accept_all_data_frames = 1; + priv->sys_config.accept_non_directed_frames = 1; + priv->sys_config.accept_all_mgmt_bcpr = 1; + priv->sys_config.accept_all_mgmt_frames = 1; + } +#endif + + ipw_send_system_config(priv); +} + +struct ipw_status_code { + u16 status; + const char *reason; +}; + +static const struct ipw_status_code ipw_status_codes[] = { + {0x00, "Successful"}, + {0x01, "Unspecified failure"}, + {0x0A, "Cannot support all requested capabilities in the " + "Capability information field"}, + {0x0B, "Reassociation denied due to inability to confirm that " + "association exists"}, + {0x0C, "Association denied due to reason outside the scope of this " + "standard"}, + {0x0D, + "Responding station does not support the specified authentication " + "algorithm"}, + {0x0E, + "Received an Authentication frame with authentication sequence " + "transaction sequence number out of expected sequence"}, + {0x0F, "Authentication rejected because of challenge failure"}, + {0x10, "Authentication rejected due to timeout waiting for next " + "frame in sequence"}, + {0x11, "Association denied because AP is unable to handle additional " + "associated stations"}, + {0x12, + "Association denied due to requesting station not supporting all " + "of the datarates in the BSSBasicServiceSet Parameter"}, + {0x13, + "Association denied due to requesting station not supporting " + "short preamble operation"}, + {0x14, + "Association denied due to requesting station not supporting " + "PBCC encoding"}, + {0x15, + "Association denied due to requesting station not supporting " + "channel agility"}, + {0x19, + "Association denied due to requesting station not supporting " + "short slot operation"}, + {0x1A, + "Association denied due to requesting station not supporting " + "DSSS-OFDM operation"}, + {0x28, "Invalid Information Element"}, + {0x29, "Group Cipher is not valid"}, + {0x2A, "Pairwise Cipher is not valid"}, + {0x2B, "AKMP is not valid"}, + {0x2C, "Unsupported RSN IE version"}, + {0x2D, "Invalid RSN IE Capabilities"}, + {0x2E, "Cipher suite is rejected per security policy"}, +}; + +static const char *ipw_get_status_code(u16 status) +{ + int i; + for (i = 0; i < ARRAY_SIZE(ipw_status_codes); i++) + if (ipw_status_codes[i].status == (status & 0xff)) + return ipw_status_codes[i].reason; + return "Unknown status value."; +} + +static inline void average_init(struct average *avg) +{ + memset(avg, 0, sizeof(*avg)); +} + +#define DEPTH_RSSI 8 +#define DEPTH_NOISE 16 +static s16 exponential_average(s16 prev_avg, s16 val, u8 depth) +{ + return ((depth-1)*prev_avg + val)/depth; +} + +static void average_add(struct average *avg, s16 val) +{ + avg->sum -= avg->entries[avg->pos]; + avg->sum += val; + avg->entries[avg->pos++] = val; + if (unlikely(avg->pos == AVG_ENTRIES)) { + avg->init = 1; + avg->pos = 0; + } +} + +static s16 average_value(struct average *avg) +{ + if (!unlikely(avg->init)) { + if (avg->pos) + return avg->sum / avg->pos; + return 0; + } + + return avg->sum / AVG_ENTRIES; +} + +static void ipw_reset_stats(struct ipw_priv *priv) +{ + u32 len = sizeof(u32); + + priv->quality = 0; + + average_init(&priv->average_missed_beacons); + priv->exp_avg_rssi = -60; + priv->exp_avg_noise = -85 + 0x100; + + priv->last_rate = 0; + priv->last_missed_beacons = 0; + priv->last_rx_packets = 0; + priv->last_tx_packets = 0; + priv->last_tx_failures = 0; + + /* Firmware managed, reset only when NIC is restarted, so we have to + * normalize on the current value */ + ipw_get_ordinal(priv, IPW_ORD_STAT_RX_ERR_CRC, + &priv->last_rx_err, &len); + ipw_get_ordinal(priv, IPW_ORD_STAT_TX_FAILURE, + &priv->last_tx_failures, &len); + + /* Driver managed, reset with each association */ + priv->missed_adhoc_beacons = 0; + priv->missed_beacons = 0; + priv->tx_packets = 0; + priv->rx_packets = 0; + +} + +static u32 ipw_get_max_rate(struct ipw_priv *priv) +{ + u32 i = 0x80000000; + u32 mask = priv->rates_mask; + /* If currently associated in B mode, restrict the maximum + * rate match to B rates */ + if (priv->assoc_request.ieee_mode == IPW_B_MODE) + mask &= LIBIPW_CCK_RATES_MASK; + + /* TODO: Verify that the rate is supported by the current rates + * list. */ + + while (i && !(mask & i)) + i >>= 1; + switch (i) { + case LIBIPW_CCK_RATE_1MB_MASK: + return 1000000; + case LIBIPW_CCK_RATE_2MB_MASK: + return 2000000; + case LIBIPW_CCK_RATE_5MB_MASK: + return 5500000; + case LIBIPW_OFDM_RATE_6MB_MASK: + return 6000000; + case LIBIPW_OFDM_RATE_9MB_MASK: + return 9000000; + case LIBIPW_CCK_RATE_11MB_MASK: + return 11000000; + case LIBIPW_OFDM_RATE_12MB_MASK: + return 12000000; + case LIBIPW_OFDM_RATE_18MB_MASK: + return 18000000; + case LIBIPW_OFDM_RATE_24MB_MASK: + return 24000000; + case LIBIPW_OFDM_RATE_36MB_MASK: + return 36000000; + case LIBIPW_OFDM_RATE_48MB_MASK: + return 48000000; + case LIBIPW_OFDM_RATE_54MB_MASK: + return 54000000; + } + + if (priv->ieee->mode == IEEE_B) + return 11000000; + else + return 54000000; +} + +static u32 ipw_get_current_rate(struct ipw_priv *priv) +{ + u32 rate, len = sizeof(rate); + int err; + + if (!(priv->status & STATUS_ASSOCIATED)) + return 0; + + if (priv->tx_packets > IPW_REAL_RATE_RX_PACKET_THRESHOLD) { + err = ipw_get_ordinal(priv, IPW_ORD_STAT_TX_CURR_RATE, &rate, + &len); + if (err) { + IPW_DEBUG_INFO("failed querying ordinals.\n"); + return 0; + } + } else + return ipw_get_max_rate(priv); + + switch (rate) { + case IPW_TX_RATE_1MB: + return 1000000; + case IPW_TX_RATE_2MB: + return 2000000; + case IPW_TX_RATE_5MB: + return 5500000; + case IPW_TX_RATE_6MB: + return 6000000; + case IPW_TX_RATE_9MB: + return 9000000; + case IPW_TX_RATE_11MB: + return 11000000; + case IPW_TX_RATE_12MB: + return 12000000; + case IPW_TX_RATE_18MB: + return 18000000; + case IPW_TX_RATE_24MB: + return 24000000; + case IPW_TX_RATE_36MB: + return 36000000; + case IPW_TX_RATE_48MB: + return 48000000; + case IPW_TX_RATE_54MB: + return 54000000; + } + + return 0; +} + +#define IPW_STATS_INTERVAL (2 * HZ) +static void ipw_gather_stats(struct ipw_priv *priv) +{ + u32 rx_err, rx_err_delta, rx_packets_delta; + u32 tx_failures, tx_failures_delta, tx_packets_delta; + u32 missed_beacons_percent, missed_beacons_delta; + u32 quality = 0; + u32 len = sizeof(u32); + s16 rssi; + u32 beacon_quality, signal_quality, tx_quality, rx_quality, + rate_quality; + u32 max_rate; + + if (!(priv->status & STATUS_ASSOCIATED)) { + priv->quality = 0; + return; + } + + /* Update the statistics */ + ipw_get_ordinal(priv, IPW_ORD_STAT_MISSED_BEACONS, + &priv->missed_beacons, &len); + missed_beacons_delta = priv->missed_beacons - priv->last_missed_beacons; + priv->last_missed_beacons = priv->missed_beacons; + if (priv->assoc_request.beacon_interval) { + missed_beacons_percent = missed_beacons_delta * + (HZ * le16_to_cpu(priv->assoc_request.beacon_interval)) / + (IPW_STATS_INTERVAL * 10); + } else { + missed_beacons_percent = 0; + } + average_add(&priv->average_missed_beacons, missed_beacons_percent); + + ipw_get_ordinal(priv, IPW_ORD_STAT_RX_ERR_CRC, &rx_err, &len); + rx_err_delta = rx_err - priv->last_rx_err; + priv->last_rx_err = rx_err; + + ipw_get_ordinal(priv, IPW_ORD_STAT_TX_FAILURE, &tx_failures, &len); + tx_failures_delta = tx_failures - priv->last_tx_failures; + priv->last_tx_failures = tx_failures; + + rx_packets_delta = priv->rx_packets - priv->last_rx_packets; + priv->last_rx_packets = priv->rx_packets; + + tx_packets_delta = priv->tx_packets - priv->last_tx_packets; + priv->last_tx_packets = priv->tx_packets; + + /* Calculate quality based on the following: + * + * Missed beacon: 100% = 0, 0% = 70% missed + * Rate: 60% = 1Mbs, 100% = Max + * Rx and Tx errors represent a straight % of total Rx/Tx + * RSSI: 100% = > -50, 0% = < -80 + * Rx errors: 100% = 0, 0% = 50% missed + * + * The lowest computed quality is used. + * + */ +#define BEACON_THRESHOLD 5 + beacon_quality = 100 - missed_beacons_percent; + if (beacon_quality < BEACON_THRESHOLD) + beacon_quality = 0; + else + beacon_quality = (beacon_quality - BEACON_THRESHOLD) * 100 / + (100 - BEACON_THRESHOLD); + IPW_DEBUG_STATS("Missed beacon: %3d%% (%d%%)\n", + beacon_quality, missed_beacons_percent); + + priv->last_rate = ipw_get_current_rate(priv); + max_rate = ipw_get_max_rate(priv); + rate_quality = priv->last_rate * 40 / max_rate + 60; + IPW_DEBUG_STATS("Rate quality : %3d%% (%dMbs)\n", + rate_quality, priv->last_rate / 1000000); + + if (rx_packets_delta > 100 && rx_packets_delta + rx_err_delta) + rx_quality = 100 - (rx_err_delta * 100) / + (rx_packets_delta + rx_err_delta); + else + rx_quality = 100; + IPW_DEBUG_STATS("Rx quality : %3d%% (%u errors, %u packets)\n", + rx_quality, rx_err_delta, rx_packets_delta); + + if (tx_packets_delta > 100 && tx_packets_delta + tx_failures_delta) + tx_quality = 100 - (tx_failures_delta * 100) / + (tx_packets_delta + tx_failures_delta); + else + tx_quality = 100; + IPW_DEBUG_STATS("Tx quality : %3d%% (%u errors, %u packets)\n", + tx_quality, tx_failures_delta, tx_packets_delta); + + rssi = priv->exp_avg_rssi; + signal_quality = + (100 * + (priv->ieee->perfect_rssi - priv->ieee->worst_rssi) * + (priv->ieee->perfect_rssi - priv->ieee->worst_rssi) - + (priv->ieee->perfect_rssi - rssi) * + (15 * (priv->ieee->perfect_rssi - priv->ieee->worst_rssi) + + 62 * (priv->ieee->perfect_rssi - rssi))) / + ((priv->ieee->perfect_rssi - priv->ieee->worst_rssi) * + (priv->ieee->perfect_rssi - priv->ieee->worst_rssi)); + if (signal_quality > 100) + signal_quality = 100; + else if (signal_quality < 1) + signal_quality = 0; + + IPW_DEBUG_STATS("Signal level : %3d%% (%d dBm)\n", + signal_quality, rssi); + + quality = min(rx_quality, signal_quality); + quality = min(tx_quality, quality); + quality = min(rate_quality, quality); + quality = min(beacon_quality, quality); + if (quality == beacon_quality) + IPW_DEBUG_STATS("Quality (%d%%): Clamped to missed beacons.\n", + quality); + if (quality == rate_quality) + IPW_DEBUG_STATS("Quality (%d%%): Clamped to rate quality.\n", + quality); + if (quality == tx_quality) + IPW_DEBUG_STATS("Quality (%d%%): Clamped to Tx quality.\n", + quality); + if (quality == rx_quality) + IPW_DEBUG_STATS("Quality (%d%%): Clamped to Rx quality.\n", + quality); + if (quality == signal_quality) + IPW_DEBUG_STATS("Quality (%d%%): Clamped to signal quality.\n", + quality); + + priv->quality = quality; + + schedule_delayed_work(&priv->gather_stats, IPW_STATS_INTERVAL); +} + +static void ipw_bg_gather_stats(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, gather_stats.work); + mutex_lock(&priv->mutex); + ipw_gather_stats(priv); + mutex_unlock(&priv->mutex); +} + +/* Missed beacon behavior: + * 1st missed -> roaming_threshold, just wait, don't do any scan/roam. + * roaming_threshold -> disassociate_threshold, scan and roam for better signal. + * Above disassociate threshold, give up and stop scanning. + * Roaming is disabled if disassociate_threshold <= roaming_threshold */ +static void ipw_handle_missed_beacon(struct ipw_priv *priv, + int missed_count) +{ + priv->notif_missed_beacons = missed_count; + + if (missed_count > priv->disassociate_threshold && + priv->status & STATUS_ASSOCIATED) { + /* If associated and we've hit the missed + * beacon threshold, disassociate, turn + * off roaming, and abort any active scans */ + IPW_DEBUG(IPW_DL_INFO | IPW_DL_NOTIF | + IPW_DL_STATE | IPW_DL_ASSOC, + "Missed beacon: %d - disassociate\n", missed_count); + priv->status &= ~STATUS_ROAMING; + if (priv->status & STATUS_SCANNING) { + IPW_DEBUG(IPW_DL_INFO | IPW_DL_NOTIF | + IPW_DL_STATE, + "Aborting scan with missed beacon.\n"); + schedule_work(&priv->abort_scan); + } + + schedule_work(&priv->disassociate); + return; + } + + if (priv->status & STATUS_ROAMING) { + /* If we are currently roaming, then just + * print a debug statement... */ + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE, + "Missed beacon: %d - roam in progress\n", + missed_count); + return; + } + + if (roaming && + (missed_count > priv->roaming_threshold && + missed_count <= priv->disassociate_threshold)) { + /* If we are not already roaming, set the ROAM + * bit in the status and kick off a scan. + * This can happen several times before we reach + * disassociate_threshold. */ + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE, + "Missed beacon: %d - initiate " + "roaming\n", missed_count); + if (!(priv->status & STATUS_ROAMING)) { + priv->status |= STATUS_ROAMING; + if (!(priv->status & STATUS_SCANNING)) + schedule_delayed_work(&priv->request_scan, 0); + } + return; + } + + if (priv->status & STATUS_SCANNING && + missed_count > IPW_MB_SCAN_CANCEL_THRESHOLD) { + /* Stop scan to keep fw from getting + * stuck (only if we aren't roaming -- + * otherwise we'll never scan more than 2 or 3 + * channels..) */ + IPW_DEBUG(IPW_DL_INFO | IPW_DL_NOTIF | IPW_DL_STATE, + "Aborting scan with missed beacon.\n"); + schedule_work(&priv->abort_scan); + } + + IPW_DEBUG_NOTIF("Missed beacon: %d\n", missed_count); +} + +static void ipw_scan_event(struct work_struct *work) +{ + union iwreq_data wrqu; + + struct ipw_priv *priv = + container_of(work, struct ipw_priv, scan_event.work); + + wrqu.data.length = 0; + wrqu.data.flags = 0; + wireless_send_event(priv->net_dev, SIOCGIWSCAN, &wrqu, NULL); +} + +static void handle_scan_event(struct ipw_priv *priv) +{ + /* Only userspace-requested scan completion events go out immediately */ + if (!priv->user_requested_scan) { + schedule_delayed_work(&priv->scan_event, + round_jiffies_relative(msecs_to_jiffies(4000))); + } else { + priv->user_requested_scan = 0; + mod_delayed_work(system_wq, &priv->scan_event, 0); + } +} + +/** + * Handle host notification packet. + * Called from interrupt routine + */ +static void ipw_rx_notification(struct ipw_priv *priv, + struct ipw_rx_notification *notif) +{ + u16 size = le16_to_cpu(notif->size); + + IPW_DEBUG_NOTIF("type = %i (%d bytes)\n", notif->subtype, size); + + switch (notif->subtype) { + case HOST_NOTIFICATION_STATUS_ASSOCIATED:{ + struct notif_association *assoc = ¬if->u.assoc; + + switch (assoc->state) { + case CMAS_ASSOCIATED:{ + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, + "associated: '%*pE' %pM\n", + priv->essid_len, priv->essid, + priv->bssid); + + switch (priv->ieee->iw_mode) { + case IW_MODE_INFRA: + memcpy(priv->ieee->bssid, + priv->bssid, ETH_ALEN); + break; + + case IW_MODE_ADHOC: + memcpy(priv->ieee->bssid, + priv->bssid, ETH_ALEN); + + /* clear out the station table */ + priv->num_stations = 0; + + IPW_DEBUG_ASSOC + ("queueing adhoc check\n"); + schedule_delayed_work( + &priv->adhoc_check, + le16_to_cpu(priv-> + assoc_request. + beacon_interval)); + break; + } + + priv->status &= ~STATUS_ASSOCIATING; + priv->status |= STATUS_ASSOCIATED; + schedule_work(&priv->system_config); + +#ifdef CONFIG_IPW2200_QOS +#define IPW_GET_PACKET_STYPE(x) WLAN_FC_GET_STYPE( \ + le16_to_cpu(((struct ieee80211_hdr *)(x))->frame_control)) + if ((priv->status & STATUS_AUTH) && + (IPW_GET_PACKET_STYPE(¬if->u.raw) + == IEEE80211_STYPE_ASSOC_RESP)) { + if ((sizeof + (struct + libipw_assoc_response) + <= size) + && (size <= 2314)) { + struct + libipw_rx_stats + stats = { + .len = size - 1, + }; + + IPW_DEBUG_QOS + ("QoS Associate " + "size %d\n", size); + libipw_rx_mgt(priv-> + ieee, + (struct + libipw_hdr_4addr + *) + ¬if->u.raw, &stats); + } + } +#endif + + schedule_work(&priv->link_up); + + break; + } + + case CMAS_AUTHENTICATED:{ + if (priv-> + status & (STATUS_ASSOCIATED | + STATUS_AUTH)) { + struct notif_authenticate *auth + = ¬if->u.auth; + IPW_DEBUG(IPW_DL_NOTIF | + IPW_DL_STATE | + IPW_DL_ASSOC, + "deauthenticated: '%*pE' %pM: (0x%04X) - %s\n", + priv->essid_len, + priv->essid, + priv->bssid, + le16_to_cpu(auth->status), + ipw_get_status_code + (le16_to_cpu + (auth->status))); + + priv->status &= + ~(STATUS_ASSOCIATING | + STATUS_AUTH | + STATUS_ASSOCIATED); + + schedule_work(&priv->link_down); + break; + } + + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, + "authenticated: '%*pE' %pM\n", + priv->essid_len, priv->essid, + priv->bssid); + break; + } + + case CMAS_INIT:{ + if (priv->status & STATUS_AUTH) { + struct + libipw_assoc_response + *resp; + resp = + (struct + libipw_assoc_response + *)¬if->u.raw; + IPW_DEBUG(IPW_DL_NOTIF | + IPW_DL_STATE | + IPW_DL_ASSOC, + "association failed (0x%04X): %s\n", + le16_to_cpu(resp->status), + ipw_get_status_code + (le16_to_cpu + (resp->status))); + } + + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, + "disassociated: '%*pE' %pM\n", + priv->essid_len, priv->essid, + priv->bssid); + + priv->status &= + ~(STATUS_DISASSOCIATING | + STATUS_ASSOCIATING | + STATUS_ASSOCIATED | STATUS_AUTH); + if (priv->assoc_network + && (priv->assoc_network-> + capability & + WLAN_CAPABILITY_IBSS)) + ipw_remove_current_network + (priv); + + schedule_work(&priv->link_down); + + break; + } + + case CMAS_RX_ASSOC_RESP: + break; + + default: + IPW_ERROR("assoc: unknown (%d)\n", + assoc->state); + break; + } + + break; + } + + case HOST_NOTIFICATION_STATUS_AUTHENTICATE:{ + struct notif_authenticate *auth = ¬if->u.auth; + switch (auth->state) { + case CMAS_AUTHENTICATED: + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE, + "authenticated: '%*pE' %pM\n", + priv->essid_len, priv->essid, + priv->bssid); + priv->status |= STATUS_AUTH; + break; + + case CMAS_INIT: + if (priv->status & STATUS_AUTH) { + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, + "authentication failed (0x%04X): %s\n", + le16_to_cpu(auth->status), + ipw_get_status_code(le16_to_cpu + (auth-> + status))); + } + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, + "deauthenticated: '%*pE' %pM\n", + priv->essid_len, priv->essid, + priv->bssid); + + priv->status &= ~(STATUS_ASSOCIATING | + STATUS_AUTH | + STATUS_ASSOCIATED); + + schedule_work(&priv->link_down); + break; + + case CMAS_TX_AUTH_SEQ_1: + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, "AUTH_SEQ_1\n"); + break; + case CMAS_RX_AUTH_SEQ_2: + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, "AUTH_SEQ_2\n"); + break; + case CMAS_AUTH_SEQ_1_PASS: + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, "AUTH_SEQ_1_PASS\n"); + break; + case CMAS_AUTH_SEQ_1_FAIL: + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, "AUTH_SEQ_1_FAIL\n"); + break; + case CMAS_TX_AUTH_SEQ_3: + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, "AUTH_SEQ_3\n"); + break; + case CMAS_RX_AUTH_SEQ_4: + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, "RX_AUTH_SEQ_4\n"); + break; + case CMAS_AUTH_SEQ_2_PASS: + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, "AUTH_SEQ_2_PASS\n"); + break; + case CMAS_AUTH_SEQ_2_FAIL: + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, "AUT_SEQ_2_FAIL\n"); + break; + case CMAS_TX_ASSOC: + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, "TX_ASSOC\n"); + break; + case CMAS_RX_ASSOC_RESP: + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, "RX_ASSOC_RESP\n"); + + break; + case CMAS_ASSOCIATED: + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | + IPW_DL_ASSOC, "ASSOCIATED\n"); + break; + default: + IPW_DEBUG_NOTIF("auth: failure - %d\n", + auth->state); + break; + } + break; + } + + case HOST_NOTIFICATION_STATUS_SCAN_CHANNEL_RESULT:{ + struct notif_channel_result *x = + ¬if->u.channel_result; + + if (size == sizeof(*x)) { + IPW_DEBUG_SCAN("Scan result for channel %d\n", + x->channel_num); + } else { + IPW_DEBUG_SCAN("Scan result of wrong size %d " + "(should be %zd)\n", + size, sizeof(*x)); + } + break; + } + + case HOST_NOTIFICATION_STATUS_SCAN_COMPLETED:{ + struct notif_scan_complete *x = ¬if->u.scan_complete; + if (size == sizeof(*x)) { + IPW_DEBUG_SCAN + ("Scan completed: type %d, %d channels, " + "%d status\n", x->scan_type, + x->num_channels, x->status); + } else { + IPW_ERROR("Scan completed of wrong size %d " + "(should be %zd)\n", + size, sizeof(*x)); + } + + priv->status &= + ~(STATUS_SCANNING | STATUS_SCAN_ABORTING); + + wake_up_interruptible(&priv->wait_state); + cancel_delayed_work(&priv->scan_check); + + if (priv->status & STATUS_EXIT_PENDING) + break; + + priv->ieee->scans++; + +#ifdef CONFIG_IPW2200_MONITOR + if (priv->ieee->iw_mode == IW_MODE_MONITOR) { + priv->status |= STATUS_SCAN_FORCED; + schedule_delayed_work(&priv->request_scan, 0); + break; + } + priv->status &= ~STATUS_SCAN_FORCED; +#endif /* CONFIG_IPW2200_MONITOR */ + + /* Do queued direct scans first */ + if (priv->status & STATUS_DIRECT_SCAN_PENDING) + schedule_delayed_work(&priv->request_direct_scan, 0); + + if (!(priv->status & (STATUS_ASSOCIATED | + STATUS_ASSOCIATING | + STATUS_ROAMING | + STATUS_DISASSOCIATING))) + schedule_work(&priv->associate); + else if (priv->status & STATUS_ROAMING) { + if (x->status == SCAN_COMPLETED_STATUS_COMPLETE) + /* If a scan completed and we are in roam mode, then + * the scan that completed was the one requested as a + * result of entering roam... so, schedule the + * roam work */ + schedule_work(&priv->roam); + else + /* Don't schedule if we aborted the scan */ + priv->status &= ~STATUS_ROAMING; + } else if (priv->status & STATUS_SCAN_PENDING) + schedule_delayed_work(&priv->request_scan, 0); + else if (priv->config & CFG_BACKGROUND_SCAN + && priv->status & STATUS_ASSOCIATED) + schedule_delayed_work(&priv->request_scan, + round_jiffies_relative(HZ)); + + /* Send an empty event to user space. + * We don't send the received data on the event because + * it would require us to do complex transcoding, and + * we want to minimise the work done in the irq handler + * Use a request to extract the data. + * Also, we generate this even for any scan, regardless + * on how the scan was initiated. User space can just + * sync on periodic scan to get fresh data... + * Jean II */ + if (x->status == SCAN_COMPLETED_STATUS_COMPLETE) + handle_scan_event(priv); + break; + } + + case HOST_NOTIFICATION_STATUS_FRAG_LENGTH:{ + struct notif_frag_length *x = ¬if->u.frag_len; + + if (size == sizeof(*x)) + IPW_ERROR("Frag length: %d\n", + le16_to_cpu(x->frag_length)); + else + IPW_ERROR("Frag length of wrong size %d " + "(should be %zd)\n", + size, sizeof(*x)); + break; + } + + case HOST_NOTIFICATION_STATUS_LINK_DETERIORATION:{ + struct notif_link_deterioration *x = + ¬if->u.link_deterioration; + + if (size == sizeof(*x)) { + IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE, + "link deterioration: type %d, cnt %d\n", + x->silence_notification_type, + x->silence_count); + memcpy(&priv->last_link_deterioration, x, + sizeof(*x)); + } else { + IPW_ERROR("Link Deterioration of wrong size %d " + "(should be %zd)\n", + size, sizeof(*x)); + } + break; + } + + case HOST_NOTIFICATION_DINO_CONFIG_RESPONSE:{ + IPW_ERROR("Dino config\n"); + if (priv->hcmd + && priv->hcmd->cmd != HOST_CMD_DINO_CONFIG) + IPW_ERROR("Unexpected DINO_CONFIG_RESPONSE\n"); + + break; + } + + case HOST_NOTIFICATION_STATUS_BEACON_STATE:{ + struct notif_beacon_state *x = ¬if->u.beacon_state; + if (size != sizeof(*x)) { + IPW_ERROR + ("Beacon state of wrong size %d (should " + "be %zd)\n", size, sizeof(*x)); + break; + } + + if (le32_to_cpu(x->state) == + HOST_NOTIFICATION_STATUS_BEACON_MISSING) + ipw_handle_missed_beacon(priv, + le32_to_cpu(x-> + number)); + + break; + } + + case HOST_NOTIFICATION_STATUS_TGI_TX_KEY:{ + struct notif_tgi_tx_key *x = ¬if->u.tgi_tx_key; + if (size == sizeof(*x)) { + IPW_ERROR("TGi Tx Key: state 0x%02x sec type " + "0x%02x station %d\n", + x->key_state, x->security_type, + x->station_index); + break; + } + + IPW_ERROR + ("TGi Tx Key of wrong size %d (should be %zd)\n", + size, sizeof(*x)); + break; + } + + case HOST_NOTIFICATION_CALIB_KEEP_RESULTS:{ + struct notif_calibration *x = ¬if->u.calibration; + + if (size == sizeof(*x)) { + memcpy(&priv->calib, x, sizeof(*x)); + IPW_DEBUG_INFO("TODO: Calibration\n"); + break; + } + + IPW_ERROR + ("Calibration of wrong size %d (should be %zd)\n", + size, sizeof(*x)); + break; + } + + case HOST_NOTIFICATION_NOISE_STATS:{ + if (size == sizeof(u32)) { + priv->exp_avg_noise = + exponential_average(priv->exp_avg_noise, + (u8) (le32_to_cpu(notif->u.noise.value) & 0xff), + DEPTH_NOISE); + break; + } + + IPW_ERROR + ("Noise stat is wrong size %d (should be %zd)\n", + size, sizeof(u32)); + break; + } + + default: + IPW_DEBUG_NOTIF("Unknown notification: " + "subtype=%d,flags=0x%2x,size=%d\n", + notif->subtype, notif->flags, size); + } +} + +/** + * Destroys all DMA structures and initialise them again + * + * @param priv + * @return error code + */ +static int ipw_queue_reset(struct ipw_priv *priv) +{ + int rc = 0; + /** @todo customize queue sizes */ + int nTx = 64, nTxCmd = 8; + ipw_tx_queue_free(priv); + /* Tx CMD queue */ + rc = ipw_queue_tx_init(priv, &priv->txq_cmd, nTxCmd, + IPW_TX_CMD_QUEUE_READ_INDEX, + IPW_TX_CMD_QUEUE_WRITE_INDEX, + IPW_TX_CMD_QUEUE_BD_BASE, + IPW_TX_CMD_QUEUE_BD_SIZE); + if (rc) { + IPW_ERROR("Tx Cmd queue init failed\n"); + goto error; + } + /* Tx queue(s) */ + rc = ipw_queue_tx_init(priv, &priv->txq[0], nTx, + IPW_TX_QUEUE_0_READ_INDEX, + IPW_TX_QUEUE_0_WRITE_INDEX, + IPW_TX_QUEUE_0_BD_BASE, IPW_TX_QUEUE_0_BD_SIZE); + if (rc) { + IPW_ERROR("Tx 0 queue init failed\n"); + goto error; + } + rc = ipw_queue_tx_init(priv, &priv->txq[1], nTx, + IPW_TX_QUEUE_1_READ_INDEX, + IPW_TX_QUEUE_1_WRITE_INDEX, + IPW_TX_QUEUE_1_BD_BASE, IPW_TX_QUEUE_1_BD_SIZE); + if (rc) { + IPW_ERROR("Tx 1 queue init failed\n"); + goto error; + } + rc = ipw_queue_tx_init(priv, &priv->txq[2], nTx, + IPW_TX_QUEUE_2_READ_INDEX, + IPW_TX_QUEUE_2_WRITE_INDEX, + IPW_TX_QUEUE_2_BD_BASE, IPW_TX_QUEUE_2_BD_SIZE); + if (rc) { + IPW_ERROR("Tx 2 queue init failed\n"); + goto error; + } + rc = ipw_queue_tx_init(priv, &priv->txq[3], nTx, + IPW_TX_QUEUE_3_READ_INDEX, + IPW_TX_QUEUE_3_WRITE_INDEX, + IPW_TX_QUEUE_3_BD_BASE, IPW_TX_QUEUE_3_BD_SIZE); + if (rc) { + IPW_ERROR("Tx 3 queue init failed\n"); + goto error; + } + /* statistics */ + priv->rx_bufs_min = 0; + priv->rx_pend_max = 0; + return rc; + + error: + ipw_tx_queue_free(priv); + return rc; +} + +/** + * Reclaim Tx queue entries no more used by NIC. + * + * When FW advances 'R' index, all entries between old and + * new 'R' index need to be reclaimed. As result, some free space + * forms. If there is enough free space (> low mark), wake Tx queue. + * + * @note Need to protect against garbage in 'R' index + * @param priv + * @param txq + * @param qindex + * @return Number of used entries remains in the queue + */ +static int ipw_queue_tx_reclaim(struct ipw_priv *priv, + struct clx2_tx_queue *txq, int qindex) +{ + u32 hw_tail; + int used; + struct clx2_queue *q = &txq->q; + + hw_tail = ipw_read32(priv, q->reg_r); + if (hw_tail >= q->n_bd) { + IPW_ERROR + ("Read index for DMA queue (%d) is out of range [0-%d)\n", + hw_tail, q->n_bd); + goto done; + } + for (; q->last_used != hw_tail; + q->last_used = ipw_queue_inc_wrap(q->last_used, q->n_bd)) { + ipw_queue_tx_free_tfd(priv, txq); + priv->tx_packets++; + } + done: + if ((ipw_tx_queue_space(q) > q->low_mark) && + (qindex >= 0)) + netif_wake_queue(priv->net_dev); + used = q->first_empty - q->last_used; + if (used < 0) + used += q->n_bd; + + return used; +} + +static int ipw_queue_tx_hcmd(struct ipw_priv *priv, int hcmd, void *buf, + int len, int sync) +{ + struct clx2_tx_queue *txq = &priv->txq_cmd; + struct clx2_queue *q = &txq->q; + struct tfd_frame *tfd; + + if (ipw_tx_queue_space(q) < (sync ? 1 : 2)) { + IPW_ERROR("No space for Tx\n"); + return -EBUSY; + } + + tfd = &txq->bd[q->first_empty]; + txq->txb[q->first_empty] = NULL; + + memset(tfd, 0, sizeof(*tfd)); + tfd->control_flags.message_type = TX_HOST_COMMAND_TYPE; + tfd->control_flags.control_bits = TFD_NEED_IRQ_MASK; + priv->hcmd_seq++; + tfd->u.cmd.index = hcmd; + tfd->u.cmd.length = len; + memcpy(tfd->u.cmd.payload, buf, len); + q->first_empty = ipw_queue_inc_wrap(q->first_empty, q->n_bd); + ipw_write32(priv, q->reg_w, q->first_empty); + _ipw_read32(priv, 0x90); + + return 0; +} + +/* + * Rx theory of operation + * + * The host allocates 32 DMA target addresses and passes the host address + * to the firmware at register IPW_RFDS_TABLE_LOWER + N * RFD_SIZE where N is + * 0 to 31 + * + * Rx Queue Indexes + * The host/firmware share two index registers for managing the Rx buffers. + * + * The READ index maps to the first position that the firmware may be writing + * to -- the driver can read up to (but not including) this position and get + * good data. + * The READ index is managed by the firmware once the card is enabled. + * + * The WRITE index maps to the last position the driver has read from -- the + * position preceding WRITE is the last slot the firmware can place a packet. + * + * The queue is empty (no good data) if WRITE = READ - 1, and is full if + * WRITE = READ. + * + * During initialization the host sets up the READ queue position to the first + * INDEX position, and WRITE to the last (READ - 1 wrapped) + * + * When the firmware places a packet in a buffer it will advance the READ index + * and fire the RX interrupt. The driver can then query the READ index and + * process as many packets as possible, moving the WRITE index forward as it + * resets the Rx queue buffers with new memory. + * + * The management in the driver is as follows: + * + A list of pre-allocated SKBs is stored in ipw->rxq->rx_free. When + * ipw->rxq->free_count drops to or below RX_LOW_WATERMARK, work is scheduled + * to replensish the ipw->rxq->rx_free. + * + In ipw_rx_queue_replenish (scheduled) if 'processed' != 'read' then the + * ipw->rxq is replenished and the READ INDEX is updated (updating the + * 'processed' and 'read' driver indexes as well) + * + A received packet is processed and handed to the kernel network stack, + * detached from the ipw->rxq. The driver 'processed' index is updated. + * + The Host/Firmware ipw->rxq is replenished at tasklet time from the rx_free + * list. If there are no allocated buffers in ipw->rxq->rx_free, the READ + * INDEX is not incremented and ipw->status(RX_STALLED) is set. If there + * were enough free buffers and RX_STALLED is set it is cleared. + * + * + * Driver sequence: + * + * ipw_rx_queue_alloc() Allocates rx_free + * ipw_rx_queue_replenish() Replenishes rx_free list from rx_used, and calls + * ipw_rx_queue_restock + * ipw_rx_queue_restock() Moves available buffers from rx_free into Rx + * queue, updates firmware pointers, and updates + * the WRITE index. If insufficient rx_free buffers + * are available, schedules ipw_rx_queue_replenish + * + * -- enable interrupts -- + * ISR - ipw_rx() Detach ipw_rx_mem_buffers from pool up to the + * READ INDEX, detaching the SKB from the pool. + * Moves the packet buffer from queue to rx_used. + * Calls ipw_rx_queue_restock to refill any empty + * slots. + * ... + * + */ + +/* + * If there are slots in the RX queue that need to be restocked, + * and we have free pre-allocated buffers, fill the ranks as much + * as we can pulling from rx_free. + * + * This moves the 'write' index forward to catch up with 'processed', and + * also updates the memory address in the firmware to reference the new + * target buffer. + */ +static void ipw_rx_queue_restock(struct ipw_priv *priv) +{ + struct ipw_rx_queue *rxq = priv->rxq; + struct list_head *element; + struct ipw_rx_mem_buffer *rxb; + unsigned long flags; + int write; + + spin_lock_irqsave(&rxq->lock, flags); + write = rxq->write; + while ((ipw_rx_queue_space(rxq) > 0) && (rxq->free_count)) { + element = rxq->rx_free.next; + rxb = list_entry(element, struct ipw_rx_mem_buffer, list); + list_del(element); + + ipw_write32(priv, IPW_RFDS_TABLE_LOWER + rxq->write * RFD_SIZE, + rxb->dma_addr); + rxq->queue[rxq->write] = rxb; + rxq->write = (rxq->write + 1) % RX_QUEUE_SIZE; + rxq->free_count--; + } + spin_unlock_irqrestore(&rxq->lock, flags); + + /* If the pre-allocated buffer pool is dropping low, schedule to + * refill it */ + if (rxq->free_count <= RX_LOW_WATERMARK) + schedule_work(&priv->rx_replenish); + + /* If we've added more space for the firmware to place data, tell it */ + if (write != rxq->write) + ipw_write32(priv, IPW_RX_WRITE_INDEX, rxq->write); +} + +/* + * Move all used packet from rx_used to rx_free, allocating a new SKB for each. + * Also restock the Rx queue via ipw_rx_queue_restock. + * + * This is called as a scheduled work item (except for during initialization) + */ +static void ipw_rx_queue_replenish(void *data) +{ + struct ipw_priv *priv = data; + struct ipw_rx_queue *rxq = priv->rxq; + struct list_head *element; + struct ipw_rx_mem_buffer *rxb; + unsigned long flags; + + spin_lock_irqsave(&rxq->lock, flags); + while (!list_empty(&rxq->rx_used)) { + element = rxq->rx_used.next; + rxb = list_entry(element, struct ipw_rx_mem_buffer, list); + rxb->skb = alloc_skb(IPW_RX_BUF_SIZE, GFP_ATOMIC); + if (!rxb->skb) { + printk(KERN_CRIT "%s: Can not allocate SKB buffers.\n", + priv->net_dev->name); + /* We don't reschedule replenish work here -- we will + * call the restock method and if it still needs + * more buffers it will schedule replenish */ + break; + } + list_del(element); + + rxb->dma_addr = + pci_map_single(priv->pci_dev, rxb->skb->data, + IPW_RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + + list_add_tail(&rxb->list, &rxq->rx_free); + rxq->free_count++; + } + spin_unlock_irqrestore(&rxq->lock, flags); + + ipw_rx_queue_restock(priv); +} + +static void ipw_bg_rx_queue_replenish(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, rx_replenish); + mutex_lock(&priv->mutex); + ipw_rx_queue_replenish(priv); + mutex_unlock(&priv->mutex); +} + +/* Assumes that the skb field of the buffers in 'pool' is kept accurate. + * If an SKB has been detached, the POOL needs to have its SKB set to NULL + * This free routine walks the list of POOL entries and if SKB is set to + * non NULL it is unmapped and freed + */ +static void ipw_rx_queue_free(struct ipw_priv *priv, struct ipw_rx_queue *rxq) +{ + int i; + + if (!rxq) + return; + + for (i = 0; i < RX_QUEUE_SIZE + RX_FREE_BUFFERS; i++) { + if (rxq->pool[i].skb != NULL) { + pci_unmap_single(priv->pci_dev, rxq->pool[i].dma_addr, + IPW_RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + dev_kfree_skb(rxq->pool[i].skb); + } + } + + kfree(rxq); +} + +static struct ipw_rx_queue *ipw_rx_queue_alloc(struct ipw_priv *priv) +{ + struct ipw_rx_queue *rxq; + int i; + + rxq = kzalloc(sizeof(*rxq), GFP_KERNEL); + if (unlikely(!rxq)) { + IPW_ERROR("memory allocation failed\n"); + return NULL; + } + spin_lock_init(&rxq->lock); + INIT_LIST_HEAD(&rxq->rx_free); + INIT_LIST_HEAD(&rxq->rx_used); + + /* Fill the rx_used queue with _all_ of the Rx buffers */ + for (i = 0; i < RX_FREE_BUFFERS + RX_QUEUE_SIZE; i++) + list_add_tail(&rxq->pool[i].list, &rxq->rx_used); + + /* Set us so that we have processed and used all buffers, but have + * not restocked the Rx queue with fresh buffers */ + rxq->read = rxq->write = 0; + rxq->free_count = 0; + + return rxq; +} + +static int ipw_is_rate_in_mask(struct ipw_priv *priv, int ieee_mode, u8 rate) +{ + rate &= ~LIBIPW_BASIC_RATE_MASK; + if (ieee_mode == IEEE_A) { + switch (rate) { + case LIBIPW_OFDM_RATE_6MB: + return priv->rates_mask & LIBIPW_OFDM_RATE_6MB_MASK ? + 1 : 0; + case LIBIPW_OFDM_RATE_9MB: + return priv->rates_mask & LIBIPW_OFDM_RATE_9MB_MASK ? + 1 : 0; + case LIBIPW_OFDM_RATE_12MB: + return priv-> + rates_mask & LIBIPW_OFDM_RATE_12MB_MASK ? 1 : 0; + case LIBIPW_OFDM_RATE_18MB: + return priv-> + rates_mask & LIBIPW_OFDM_RATE_18MB_MASK ? 1 : 0; + case LIBIPW_OFDM_RATE_24MB: + return priv-> + rates_mask & LIBIPW_OFDM_RATE_24MB_MASK ? 1 : 0; + case LIBIPW_OFDM_RATE_36MB: + return priv-> + rates_mask & LIBIPW_OFDM_RATE_36MB_MASK ? 1 : 0; + case LIBIPW_OFDM_RATE_48MB: + return priv-> + rates_mask & LIBIPW_OFDM_RATE_48MB_MASK ? 1 : 0; + case LIBIPW_OFDM_RATE_54MB: + return priv-> + rates_mask & LIBIPW_OFDM_RATE_54MB_MASK ? 1 : 0; + default: + return 0; + } + } + + /* B and G mixed */ + switch (rate) { + case LIBIPW_CCK_RATE_1MB: + return priv->rates_mask & LIBIPW_CCK_RATE_1MB_MASK ? 1 : 0; + case LIBIPW_CCK_RATE_2MB: + return priv->rates_mask & LIBIPW_CCK_RATE_2MB_MASK ? 1 : 0; + case LIBIPW_CCK_RATE_5MB: + return priv->rates_mask & LIBIPW_CCK_RATE_5MB_MASK ? 1 : 0; + case LIBIPW_CCK_RATE_11MB: + return priv->rates_mask & LIBIPW_CCK_RATE_11MB_MASK ? 1 : 0; + } + + /* If we are limited to B modulations, bail at this point */ + if (ieee_mode == IEEE_B) + return 0; + + /* G */ + switch (rate) { + case LIBIPW_OFDM_RATE_6MB: + return priv->rates_mask & LIBIPW_OFDM_RATE_6MB_MASK ? 1 : 0; + case LIBIPW_OFDM_RATE_9MB: + return priv->rates_mask & LIBIPW_OFDM_RATE_9MB_MASK ? 1 : 0; + case LIBIPW_OFDM_RATE_12MB: + return priv->rates_mask & LIBIPW_OFDM_RATE_12MB_MASK ? 1 : 0; + case LIBIPW_OFDM_RATE_18MB: + return priv->rates_mask & LIBIPW_OFDM_RATE_18MB_MASK ? 1 : 0; + case LIBIPW_OFDM_RATE_24MB: + return priv->rates_mask & LIBIPW_OFDM_RATE_24MB_MASK ? 1 : 0; + case LIBIPW_OFDM_RATE_36MB: + return priv->rates_mask & LIBIPW_OFDM_RATE_36MB_MASK ? 1 : 0; + case LIBIPW_OFDM_RATE_48MB: + return priv->rates_mask & LIBIPW_OFDM_RATE_48MB_MASK ? 1 : 0; + case LIBIPW_OFDM_RATE_54MB: + return priv->rates_mask & LIBIPW_OFDM_RATE_54MB_MASK ? 1 : 0; + } + + return 0; +} + +static int ipw_compatible_rates(struct ipw_priv *priv, + const struct libipw_network *network, + struct ipw_supported_rates *rates) +{ + int num_rates, i; + + memset(rates, 0, sizeof(*rates)); + num_rates = min(network->rates_len, (u8) IPW_MAX_RATES); + rates->num_rates = 0; + for (i = 0; i < num_rates; i++) { + if (!ipw_is_rate_in_mask(priv, network->mode, + network->rates[i])) { + + if (network->rates[i] & LIBIPW_BASIC_RATE_MASK) { + IPW_DEBUG_SCAN("Adding masked mandatory " + "rate %02X\n", + network->rates[i]); + rates->supported_rates[rates->num_rates++] = + network->rates[i]; + continue; + } + + IPW_DEBUG_SCAN("Rate %02X masked : 0x%08X\n", + network->rates[i], priv->rates_mask); + continue; + } + + rates->supported_rates[rates->num_rates++] = network->rates[i]; + } + + num_rates = min(network->rates_ex_len, + (u8) (IPW_MAX_RATES - num_rates)); + for (i = 0; i < num_rates; i++) { + if (!ipw_is_rate_in_mask(priv, network->mode, + network->rates_ex[i])) { + if (network->rates_ex[i] & LIBIPW_BASIC_RATE_MASK) { + IPW_DEBUG_SCAN("Adding masked mandatory " + "rate %02X\n", + network->rates_ex[i]); + rates->supported_rates[rates->num_rates++] = + network->rates[i]; + continue; + } + + IPW_DEBUG_SCAN("Rate %02X masked : 0x%08X\n", + network->rates_ex[i], priv->rates_mask); + continue; + } + + rates->supported_rates[rates->num_rates++] = + network->rates_ex[i]; + } + + return 1; +} + +static void ipw_copy_rates(struct ipw_supported_rates *dest, + const struct ipw_supported_rates *src) +{ + u8 i; + for (i = 0; i < src->num_rates; i++) + dest->supported_rates[i] = src->supported_rates[i]; + dest->num_rates = src->num_rates; +} + +/* TODO: Look at sniffed packets in the air to determine if the basic rate + * mask should ever be used -- right now all callers to add the scan rates are + * set with the modulation = CCK, so BASIC_RATE_MASK is never set... */ +static void ipw_add_cck_scan_rates(struct ipw_supported_rates *rates, + u8 modulation, u32 rate_mask) +{ + u8 basic_mask = (LIBIPW_OFDM_MODULATION == modulation) ? + LIBIPW_BASIC_RATE_MASK : 0; + + if (rate_mask & LIBIPW_CCK_RATE_1MB_MASK) + rates->supported_rates[rates->num_rates++] = + LIBIPW_BASIC_RATE_MASK | LIBIPW_CCK_RATE_1MB; + + if (rate_mask & LIBIPW_CCK_RATE_2MB_MASK) + rates->supported_rates[rates->num_rates++] = + LIBIPW_BASIC_RATE_MASK | LIBIPW_CCK_RATE_2MB; + + if (rate_mask & LIBIPW_CCK_RATE_5MB_MASK) + rates->supported_rates[rates->num_rates++] = basic_mask | + LIBIPW_CCK_RATE_5MB; + + if (rate_mask & LIBIPW_CCK_RATE_11MB_MASK) + rates->supported_rates[rates->num_rates++] = basic_mask | + LIBIPW_CCK_RATE_11MB; +} + +static void ipw_add_ofdm_scan_rates(struct ipw_supported_rates *rates, + u8 modulation, u32 rate_mask) +{ + u8 basic_mask = (LIBIPW_OFDM_MODULATION == modulation) ? + LIBIPW_BASIC_RATE_MASK : 0; + + if (rate_mask & LIBIPW_OFDM_RATE_6MB_MASK) + rates->supported_rates[rates->num_rates++] = basic_mask | + LIBIPW_OFDM_RATE_6MB; + + if (rate_mask & LIBIPW_OFDM_RATE_9MB_MASK) + rates->supported_rates[rates->num_rates++] = + LIBIPW_OFDM_RATE_9MB; + + if (rate_mask & LIBIPW_OFDM_RATE_12MB_MASK) + rates->supported_rates[rates->num_rates++] = basic_mask | + LIBIPW_OFDM_RATE_12MB; + + if (rate_mask & LIBIPW_OFDM_RATE_18MB_MASK) + rates->supported_rates[rates->num_rates++] = + LIBIPW_OFDM_RATE_18MB; + + if (rate_mask & LIBIPW_OFDM_RATE_24MB_MASK) + rates->supported_rates[rates->num_rates++] = basic_mask | + LIBIPW_OFDM_RATE_24MB; + + if (rate_mask & LIBIPW_OFDM_RATE_36MB_MASK) + rates->supported_rates[rates->num_rates++] = + LIBIPW_OFDM_RATE_36MB; + + if (rate_mask & LIBIPW_OFDM_RATE_48MB_MASK) + rates->supported_rates[rates->num_rates++] = + LIBIPW_OFDM_RATE_48MB; + + if (rate_mask & LIBIPW_OFDM_RATE_54MB_MASK) + rates->supported_rates[rates->num_rates++] = + LIBIPW_OFDM_RATE_54MB; +} + +struct ipw_network_match { + struct libipw_network *network; + struct ipw_supported_rates rates; +}; + +static int ipw_find_adhoc_network(struct ipw_priv *priv, + struct ipw_network_match *match, + struct libipw_network *network, + int roaming) +{ + struct ipw_supported_rates rates; + + /* Verify that this network's capability is compatible with the + * current mode (AdHoc or Infrastructure) */ + if ((priv->ieee->iw_mode == IW_MODE_ADHOC && + !(network->capability & WLAN_CAPABILITY_IBSS))) { + IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded due to capability mismatch.\n", + network->ssid_len, network->ssid, + network->bssid); + return 0; + } + + if (unlikely(roaming)) { + /* If we are roaming, then ensure check if this is a valid + * network to try and roam to */ + if ((network->ssid_len != match->network->ssid_len) || + memcmp(network->ssid, match->network->ssid, + network->ssid_len)) { + IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of non-network ESSID.\n", + network->ssid_len, network->ssid, + network->bssid); + return 0; + } + } else { + /* If an ESSID has been configured then compare the broadcast + * ESSID to ours */ + if ((priv->config & CFG_STATIC_ESSID) && + ((network->ssid_len != priv->essid_len) || + memcmp(network->ssid, priv->essid, + min(network->ssid_len, priv->essid_len)))) { + IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of ESSID mismatch: '%*pE'.\n", + network->ssid_len, network->ssid, + network->bssid, priv->essid_len, + priv->essid); + return 0; + } + } + + /* If the old network rate is better than this one, don't bother + * testing everything else. */ + + if (network->time_stamp[0] < match->network->time_stamp[0]) { + IPW_DEBUG_MERGE("Network '%*pE excluded because newer than current network.\n", + match->network->ssid_len, match->network->ssid); + return 0; + } else if (network->time_stamp[1] < match->network->time_stamp[1]) { + IPW_DEBUG_MERGE("Network '%*pE excluded because newer than current network.\n", + match->network->ssid_len, match->network->ssid); + return 0; + } + + /* Now go through and see if the requested network is valid... */ + if (priv->ieee->scan_age != 0 && + time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) { + IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of age: %ums.\n", + network->ssid_len, network->ssid, + network->bssid, + jiffies_to_msecs(jiffies - + network->last_scanned)); + return 0; + } + + if ((priv->config & CFG_STATIC_CHANNEL) && + (network->channel != priv->channel)) { + IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of channel mismatch: %d != %d.\n", + network->ssid_len, network->ssid, + network->bssid, + network->channel, priv->channel); + return 0; + } + + /* Verify privacy compatibility */ + if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != + ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { + IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of privacy mismatch: %s != %s.\n", + network->ssid_len, network->ssid, + network->bssid, + priv-> + capability & CAP_PRIVACY_ON ? "on" : "off", + network-> + capability & WLAN_CAPABILITY_PRIVACY ? "on" : + "off"); + return 0; + } + + if (ether_addr_equal(network->bssid, priv->bssid)) { + IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of the same BSSID match: %pM.\n", + network->ssid_len, network->ssid, + network->bssid, priv->bssid); + return 0; + } + + /* Filter out any incompatible freq / mode combinations */ + if (!libipw_is_valid_mode(priv->ieee, network->mode)) { + IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of invalid frequency/mode combination.\n", + network->ssid_len, network->ssid, + network->bssid); + return 0; + } + + /* Ensure that the rates supported by the driver are compatible with + * this AP, including verification of basic rates (mandatory) */ + if (!ipw_compatible_rates(priv, network, &rates)) { + IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because configured rate mask excludes AP mandatory rate.\n", + network->ssid_len, network->ssid, + network->bssid); + return 0; + } + + if (rates.num_rates == 0) { + IPW_DEBUG_MERGE("Network '%*pE (%pM)' excluded because of no compatible rates.\n", + network->ssid_len, network->ssid, + network->bssid); + return 0; + } + + /* TODO: Perform any further minimal comparititive tests. We do not + * want to put too much policy logic here; intelligent scan selection + * should occur within a generic IEEE 802.11 user space tool. */ + + /* Set up 'new' AP to this network */ + ipw_copy_rates(&match->rates, &rates); + match->network = network; + IPW_DEBUG_MERGE("Network '%*pE (%pM)' is a viable match.\n", + network->ssid_len, network->ssid, network->bssid); + + return 1; +} + +static void ipw_merge_adhoc_network(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, merge_networks); + struct libipw_network *network = NULL; + struct ipw_network_match match = { + .network = priv->assoc_network + }; + + if ((priv->status & STATUS_ASSOCIATED) && + (priv->ieee->iw_mode == IW_MODE_ADHOC)) { + /* First pass through ROAM process -- look for a better + * network */ + unsigned long flags; + + spin_lock_irqsave(&priv->ieee->lock, flags); + list_for_each_entry(network, &priv->ieee->network_list, list) { + if (network != priv->assoc_network) + ipw_find_adhoc_network(priv, &match, network, + 1); + } + spin_unlock_irqrestore(&priv->ieee->lock, flags); + + if (match.network == priv->assoc_network) { + IPW_DEBUG_MERGE("No better ADHOC in this network to " + "merge to.\n"); + return; + } + + mutex_lock(&priv->mutex); + if ((priv->ieee->iw_mode == IW_MODE_ADHOC)) { + IPW_DEBUG_MERGE("remove network %*pE\n", + priv->essid_len, priv->essid); + ipw_remove_current_network(priv); + } + + ipw_disassociate(priv); + priv->assoc_network = match.network; + mutex_unlock(&priv->mutex); + return; + } +} + +static int ipw_best_network(struct ipw_priv *priv, + struct ipw_network_match *match, + struct libipw_network *network, int roaming) +{ + struct ipw_supported_rates rates; + + /* Verify that this network's capability is compatible with the + * current mode (AdHoc or Infrastructure) */ + if ((priv->ieee->iw_mode == IW_MODE_INFRA && + !(network->capability & WLAN_CAPABILITY_ESS)) || + (priv->ieee->iw_mode == IW_MODE_ADHOC && + !(network->capability & WLAN_CAPABILITY_IBSS))) { + IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded due to capability mismatch.\n", + network->ssid_len, network->ssid, + network->bssid); + return 0; + } + + if (unlikely(roaming)) { + /* If we are roaming, then ensure check if this is a valid + * network to try and roam to */ + if ((network->ssid_len != match->network->ssid_len) || + memcmp(network->ssid, match->network->ssid, + network->ssid_len)) { + IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of non-network ESSID.\n", + network->ssid_len, network->ssid, + network->bssid); + return 0; + } + } else { + /* If an ESSID has been configured then compare the broadcast + * ESSID to ours */ + if ((priv->config & CFG_STATIC_ESSID) && + ((network->ssid_len != priv->essid_len) || + memcmp(network->ssid, priv->essid, + min(network->ssid_len, priv->essid_len)))) { + IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of ESSID mismatch: '%*pE'.\n", + network->ssid_len, network->ssid, + network->bssid, priv->essid_len, + priv->essid); + return 0; + } + } + + /* If the old network rate is better than this one, don't bother + * testing everything else. */ + if (match->network && match->network->stats.rssi > network->stats.rssi) { + IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because '%*pE (%pM)' has a stronger signal.\n", + network->ssid_len, network->ssid, + network->bssid, match->network->ssid_len, + match->network->ssid, match->network->bssid); + return 0; + } + + /* If this network has already had an association attempt within the + * last 3 seconds, do not try and associate again... */ + if (network->last_associate && + time_after(network->last_associate + (HZ * 3UL), jiffies)) { + IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of storming (%ums since last assoc attempt).\n", + network->ssid_len, network->ssid, + network->bssid, + jiffies_to_msecs(jiffies - + network->last_associate)); + return 0; + } + + /* Now go through and see if the requested network is valid... */ + if (priv->ieee->scan_age != 0 && + time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) { + IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of age: %ums.\n", + network->ssid_len, network->ssid, + network->bssid, + jiffies_to_msecs(jiffies - + network->last_scanned)); + return 0; + } + + if ((priv->config & CFG_STATIC_CHANNEL) && + (network->channel != priv->channel)) { + IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of channel mismatch: %d != %d.\n", + network->ssid_len, network->ssid, + network->bssid, + network->channel, priv->channel); + return 0; + } + + /* Verify privacy compatibility */ + if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != + ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { + IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of privacy mismatch: %s != %s.\n", + network->ssid_len, network->ssid, + network->bssid, + priv->capability & CAP_PRIVACY_ON ? "on" : + "off", + network->capability & + WLAN_CAPABILITY_PRIVACY ? "on" : "off"); + return 0; + } + + if ((priv->config & CFG_STATIC_BSSID) && + !ether_addr_equal(network->bssid, priv->bssid)) { + IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of BSSID mismatch: %pM.\n", + network->ssid_len, network->ssid, + network->bssid, priv->bssid); + return 0; + } + + /* Filter out any incompatible freq / mode combinations */ + if (!libipw_is_valid_mode(priv->ieee, network->mode)) { + IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of invalid frequency/mode combination.\n", + network->ssid_len, network->ssid, + network->bssid); + return 0; + } + + /* Filter out invalid channel in current GEO */ + if (!libipw_is_valid_channel(priv->ieee, network->channel)) { + IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of invalid channel in current GEO\n", + network->ssid_len, network->ssid, + network->bssid); + return 0; + } + + /* Ensure that the rates supported by the driver are compatible with + * this AP, including verification of basic rates (mandatory) */ + if (!ipw_compatible_rates(priv, network, &rates)) { + IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because configured rate mask excludes AP mandatory rate.\n", + network->ssid_len, network->ssid, + network->bssid); + return 0; + } + + if (rates.num_rates == 0) { + IPW_DEBUG_ASSOC("Network '%*pE (%pM)' excluded because of no compatible rates.\n", + network->ssid_len, network->ssid, + network->bssid); + return 0; + } + + /* TODO: Perform any further minimal comparititive tests. We do not + * want to put too much policy logic here; intelligent scan selection + * should occur within a generic IEEE 802.11 user space tool. */ + + /* Set up 'new' AP to this network */ + ipw_copy_rates(&match->rates, &rates); + match->network = network; + + IPW_DEBUG_ASSOC("Network '%*pE (%pM)' is a viable match.\n", + network->ssid_len, network->ssid, network->bssid); + + return 1; +} + +static void ipw_adhoc_create(struct ipw_priv *priv, + struct libipw_network *network) +{ + const struct libipw_geo *geo = libipw_get_geo(priv->ieee); + int i; + + /* + * For the purposes of scanning, we can set our wireless mode + * to trigger scans across combinations of bands, but when it + * comes to creating a new ad-hoc network, we have tell the FW + * exactly which band to use. + * + * We also have the possibility of an invalid channel for the + * chossen band. Attempting to create a new ad-hoc network + * with an invalid channel for wireless mode will trigger a + * FW fatal error. + * + */ + switch (libipw_is_valid_channel(priv->ieee, priv->channel)) { + case LIBIPW_52GHZ_BAND: + network->mode = IEEE_A; + i = libipw_channel_to_index(priv->ieee, priv->channel); + BUG_ON(i == -1); + if (geo->a[i].flags & LIBIPW_CH_PASSIVE_ONLY) { + IPW_WARNING("Overriding invalid channel\n"); + priv->channel = geo->a[0].channel; + } + break; + + case LIBIPW_24GHZ_BAND: + if (priv->ieee->mode & IEEE_G) + network->mode = IEEE_G; + else + network->mode = IEEE_B; + i = libipw_channel_to_index(priv->ieee, priv->channel); + BUG_ON(i == -1); + if (geo->bg[i].flags & LIBIPW_CH_PASSIVE_ONLY) { + IPW_WARNING("Overriding invalid channel\n"); + priv->channel = geo->bg[0].channel; + } + break; + + default: + IPW_WARNING("Overriding invalid channel\n"); + if (priv->ieee->mode & IEEE_A) { + network->mode = IEEE_A; + priv->channel = geo->a[0].channel; + } else if (priv->ieee->mode & IEEE_G) { + network->mode = IEEE_G; + priv->channel = geo->bg[0].channel; + } else { + network->mode = IEEE_B; + priv->channel = geo->bg[0].channel; + } + break; + } + + network->channel = priv->channel; + priv->config |= CFG_ADHOC_PERSIST; + ipw_create_bssid(priv, network->bssid); + network->ssid_len = priv->essid_len; + memcpy(network->ssid, priv->essid, priv->essid_len); + memset(&network->stats, 0, sizeof(network->stats)); + network->capability = WLAN_CAPABILITY_IBSS; + if (!(priv->config & CFG_PREAMBLE_LONG)) + network->capability |= WLAN_CAPABILITY_SHORT_PREAMBLE; + if (priv->capability & CAP_PRIVACY_ON) + network->capability |= WLAN_CAPABILITY_PRIVACY; + network->rates_len = min(priv->rates.num_rates, MAX_RATES_LENGTH); + memcpy(network->rates, priv->rates.supported_rates, network->rates_len); + network->rates_ex_len = priv->rates.num_rates - network->rates_len; + memcpy(network->rates_ex, + &priv->rates.supported_rates[network->rates_len], + network->rates_ex_len); + network->last_scanned = 0; + network->flags = 0; + network->last_associate = 0; + network->time_stamp[0] = 0; + network->time_stamp[1] = 0; + network->beacon_interval = 100; /* Default */ + network->listen_interval = 10; /* Default */ + network->atim_window = 0; /* Default */ + network->wpa_ie_len = 0; + network->rsn_ie_len = 0; +} + +static void ipw_send_tgi_tx_key(struct ipw_priv *priv, int type, int index) +{ + struct ipw_tgi_tx_key key; + + if (!(priv->ieee->sec.flags & (1 << index))) + return; + + key.key_id = index; + memcpy(key.key, priv->ieee->sec.keys[index], SCM_TEMPORAL_KEY_LENGTH); + key.security_type = type; + key.station_index = 0; /* always 0 for BSS */ + key.flags = 0; + /* 0 for new key; previous value of counter (after fatal error) */ + key.tx_counter[0] = cpu_to_le32(0); + key.tx_counter[1] = cpu_to_le32(0); + + ipw_send_cmd_pdu(priv, IPW_CMD_TGI_TX_KEY, sizeof(key), &key); +} + +static void ipw_send_wep_keys(struct ipw_priv *priv, int type) +{ + struct ipw_wep_key key; + int i; + + key.cmd_id = DINO_CMD_WEP_KEY; + key.seq_num = 0; + + /* Note: AES keys cannot be set for multiple times. + * Only set it at the first time. */ + for (i = 0; i < 4; i++) { + key.key_index = i | type; + if (!(priv->ieee->sec.flags & (1 << i))) { + key.key_size = 0; + continue; + } + + key.key_size = priv->ieee->sec.key_sizes[i]; + memcpy(key.key, priv->ieee->sec.keys[i], key.key_size); + + ipw_send_cmd_pdu(priv, IPW_CMD_WEP_KEY, sizeof(key), &key); + } +} + +static void ipw_set_hw_decrypt_unicast(struct ipw_priv *priv, int level) +{ + if (priv->ieee->host_encrypt) + return; + + switch (level) { + case SEC_LEVEL_3: + priv->sys_config.disable_unicast_decryption = 0; + priv->ieee->host_decrypt = 0; + break; + case SEC_LEVEL_2: + priv->sys_config.disable_unicast_decryption = 1; + priv->ieee->host_decrypt = 1; + break; + case SEC_LEVEL_1: + priv->sys_config.disable_unicast_decryption = 0; + priv->ieee->host_decrypt = 0; + break; + case SEC_LEVEL_0: + priv->sys_config.disable_unicast_decryption = 1; + break; + default: + break; + } +} + +static void ipw_set_hw_decrypt_multicast(struct ipw_priv *priv, int level) +{ + if (priv->ieee->host_encrypt) + return; + + switch (level) { + case SEC_LEVEL_3: + priv->sys_config.disable_multicast_decryption = 0; + break; + case SEC_LEVEL_2: + priv->sys_config.disable_multicast_decryption = 1; + break; + case SEC_LEVEL_1: + priv->sys_config.disable_multicast_decryption = 0; + break; + case SEC_LEVEL_0: + priv->sys_config.disable_multicast_decryption = 1; + break; + default: + break; + } +} + +static void ipw_set_hwcrypto_keys(struct ipw_priv *priv) +{ + switch (priv->ieee->sec.level) { + case SEC_LEVEL_3: + if (priv->ieee->sec.flags & SEC_ACTIVE_KEY) + ipw_send_tgi_tx_key(priv, + DCT_FLAG_EXT_SECURITY_CCM, + priv->ieee->sec.active_key); + + if (!priv->ieee->host_mc_decrypt) + ipw_send_wep_keys(priv, DCW_WEP_KEY_SEC_TYPE_CCM); + break; + case SEC_LEVEL_2: + if (priv->ieee->sec.flags & SEC_ACTIVE_KEY) + ipw_send_tgi_tx_key(priv, + DCT_FLAG_EXT_SECURITY_TKIP, + priv->ieee->sec.active_key); + break; + case SEC_LEVEL_1: + ipw_send_wep_keys(priv, DCW_WEP_KEY_SEC_TYPE_WEP); + ipw_set_hw_decrypt_unicast(priv, priv->ieee->sec.level); + ipw_set_hw_decrypt_multicast(priv, priv->ieee->sec.level); + break; + case SEC_LEVEL_0: + default: + break; + } +} + +static void ipw_adhoc_check(void *data) +{ + struct ipw_priv *priv = data; + + if (priv->missed_adhoc_beacons++ > priv->disassociate_threshold && + !(priv->config & CFG_ADHOC_PERSIST)) { + IPW_DEBUG(IPW_DL_INFO | IPW_DL_NOTIF | + IPW_DL_STATE | IPW_DL_ASSOC, + "Missed beacon: %d - disassociate\n", + priv->missed_adhoc_beacons); + ipw_remove_current_network(priv); + ipw_disassociate(priv); + return; + } + + schedule_delayed_work(&priv->adhoc_check, + le16_to_cpu(priv->assoc_request.beacon_interval)); +} + +static void ipw_bg_adhoc_check(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, adhoc_check.work); + mutex_lock(&priv->mutex); + ipw_adhoc_check(priv); + mutex_unlock(&priv->mutex); +} + +static void ipw_debug_config(struct ipw_priv *priv) +{ + IPW_DEBUG_INFO("Scan completed, no valid APs matched " + "[CFG 0x%08X]\n", priv->config); + if (priv->config & CFG_STATIC_CHANNEL) + IPW_DEBUG_INFO("Channel locked to %d\n", priv->channel); + else + IPW_DEBUG_INFO("Channel unlocked.\n"); + if (priv->config & CFG_STATIC_ESSID) + IPW_DEBUG_INFO("ESSID locked to '%*pE'\n", + priv->essid_len, priv->essid); + else + IPW_DEBUG_INFO("ESSID unlocked.\n"); + if (priv->config & CFG_STATIC_BSSID) + IPW_DEBUG_INFO("BSSID locked to %pM\n", priv->bssid); + else + IPW_DEBUG_INFO("BSSID unlocked.\n"); + if (priv->capability & CAP_PRIVACY_ON) + IPW_DEBUG_INFO("PRIVACY on\n"); + else + IPW_DEBUG_INFO("PRIVACY off\n"); + IPW_DEBUG_INFO("RATE MASK: 0x%08X\n", priv->rates_mask); +} + +static void ipw_set_fixed_rate(struct ipw_priv *priv, int mode) +{ + /* TODO: Verify that this works... */ + struct ipw_fixed_rate fr; + u32 reg; + u16 mask = 0; + u16 new_tx_rates = priv->rates_mask; + + /* Identify 'current FW band' and match it with the fixed + * Tx rates */ + + switch (priv->ieee->freq_band) { + case LIBIPW_52GHZ_BAND: /* A only */ + /* IEEE_A */ + if (priv->rates_mask & ~LIBIPW_OFDM_RATES_MASK) { + /* Invalid fixed rate mask */ + IPW_DEBUG_WX + ("invalid fixed rate mask in ipw_set_fixed_rate\n"); + new_tx_rates = 0; + break; + } + + new_tx_rates >>= LIBIPW_OFDM_SHIFT_MASK_A; + break; + + default: /* 2.4Ghz or Mixed */ + /* IEEE_B */ + if (mode == IEEE_B) { + if (new_tx_rates & ~LIBIPW_CCK_RATES_MASK) { + /* Invalid fixed rate mask */ + IPW_DEBUG_WX + ("invalid fixed rate mask in ipw_set_fixed_rate\n"); + new_tx_rates = 0; + } + break; + } + + /* IEEE_G */ + if (new_tx_rates & ~(LIBIPW_CCK_RATES_MASK | + LIBIPW_OFDM_RATES_MASK)) { + /* Invalid fixed rate mask */ + IPW_DEBUG_WX + ("invalid fixed rate mask in ipw_set_fixed_rate\n"); + new_tx_rates = 0; + break; + } + + if (LIBIPW_OFDM_RATE_6MB_MASK & new_tx_rates) { + mask |= (LIBIPW_OFDM_RATE_6MB_MASK >> 1); + new_tx_rates &= ~LIBIPW_OFDM_RATE_6MB_MASK; + } + + if (LIBIPW_OFDM_RATE_9MB_MASK & new_tx_rates) { + mask |= (LIBIPW_OFDM_RATE_9MB_MASK >> 1); + new_tx_rates &= ~LIBIPW_OFDM_RATE_9MB_MASK; + } + + if (LIBIPW_OFDM_RATE_12MB_MASK & new_tx_rates) { + mask |= (LIBIPW_OFDM_RATE_12MB_MASK >> 1); + new_tx_rates &= ~LIBIPW_OFDM_RATE_12MB_MASK; + } + + new_tx_rates |= mask; + break; + } + + fr.tx_rates = cpu_to_le16(new_tx_rates); + + reg = ipw_read32(priv, IPW_MEM_FIXED_OVERRIDE); + ipw_write_reg32(priv, reg, *(u32 *) & fr); +} + +static void ipw_abort_scan(struct ipw_priv *priv) +{ + int err; + + if (priv->status & STATUS_SCAN_ABORTING) { + IPW_DEBUG_HC("Ignoring concurrent scan abort request.\n"); + return; + } + priv->status |= STATUS_SCAN_ABORTING; + + err = ipw_send_scan_abort(priv); + if (err) + IPW_DEBUG_HC("Request to abort scan failed.\n"); +} + +static void ipw_add_scan_channels(struct ipw_priv *priv, + struct ipw_scan_request_ext *scan, + int scan_type) +{ + int channel_index = 0; + const struct libipw_geo *geo; + int i; + + geo = libipw_get_geo(priv->ieee); + + if (priv->ieee->freq_band & LIBIPW_52GHZ_BAND) { + int start = channel_index; + for (i = 0; i < geo->a_channels; i++) { + if ((priv->status & STATUS_ASSOCIATED) && + geo->a[i].channel == priv->channel) + continue; + channel_index++; + scan->channels_list[channel_index] = geo->a[i].channel; + ipw_set_scan_type(scan, channel_index, + geo->a[i]. + flags & LIBIPW_CH_PASSIVE_ONLY ? + IPW_SCAN_PASSIVE_FULL_DWELL_SCAN : + scan_type); + } + + if (start != channel_index) { + scan->channels_list[start] = (u8) (IPW_A_MODE << 6) | + (channel_index - start); + channel_index++; + } + } + + if (priv->ieee->freq_band & LIBIPW_24GHZ_BAND) { + int start = channel_index; + if (priv->config & CFG_SPEED_SCAN) { + int index; + u8 channels[LIBIPW_24GHZ_CHANNELS] = { + /* nop out the list */ + [0] = 0 + }; + + u8 channel; + while (channel_index < IPW_SCAN_CHANNELS - 1) { + channel = + priv->speed_scan[priv->speed_scan_pos]; + if (channel == 0) { + priv->speed_scan_pos = 0; + channel = priv->speed_scan[0]; + } + if ((priv->status & STATUS_ASSOCIATED) && + channel == priv->channel) { + priv->speed_scan_pos++; + continue; + } + + /* If this channel has already been + * added in scan, break from loop + * and this will be the first channel + * in the next scan. + */ + if (channels[channel - 1] != 0) + break; + + channels[channel - 1] = 1; + priv->speed_scan_pos++; + channel_index++; + scan->channels_list[channel_index] = channel; + index = + libipw_channel_to_index(priv->ieee, channel); + ipw_set_scan_type(scan, channel_index, + geo->bg[index]. + flags & + LIBIPW_CH_PASSIVE_ONLY ? + IPW_SCAN_PASSIVE_FULL_DWELL_SCAN + : scan_type); + } + } else { + for (i = 0; i < geo->bg_channels; i++) { + if ((priv->status & STATUS_ASSOCIATED) && + geo->bg[i].channel == priv->channel) + continue; + channel_index++; + scan->channels_list[channel_index] = + geo->bg[i].channel; + ipw_set_scan_type(scan, channel_index, + geo->bg[i]. + flags & + LIBIPW_CH_PASSIVE_ONLY ? + IPW_SCAN_PASSIVE_FULL_DWELL_SCAN + : scan_type); + } + } + + if (start != channel_index) { + scan->channels_list[start] = (u8) (IPW_B_MODE << 6) | + (channel_index - start); + } + } +} + +static int ipw_passive_dwell_time(struct ipw_priv *priv) +{ + /* staying on passive channels longer than the DTIM interval during a + * scan, while associated, causes the firmware to cancel the scan + * without notification. Hence, don't stay on passive channels longer + * than the beacon interval. + */ + if (priv->status & STATUS_ASSOCIATED + && priv->assoc_network->beacon_interval > 10) + return priv->assoc_network->beacon_interval - 10; + else + return 120; +} + +static int ipw_request_scan_helper(struct ipw_priv *priv, int type, int direct) +{ + struct ipw_scan_request_ext scan; + int err = 0, scan_type; + + if (!(priv->status & STATUS_INIT) || + (priv->status & STATUS_EXIT_PENDING)) + return 0; + + mutex_lock(&priv->mutex); + + if (direct && (priv->direct_scan_ssid_len == 0)) { + IPW_DEBUG_HC("Direct scan requested but no SSID to scan for\n"); + priv->status &= ~STATUS_DIRECT_SCAN_PENDING; + goto done; + } + + if (priv->status & STATUS_SCANNING) { + IPW_DEBUG_HC("Concurrent scan requested. Queuing.\n"); + priv->status |= direct ? STATUS_DIRECT_SCAN_PENDING : + STATUS_SCAN_PENDING; + goto done; + } + + if (!(priv->status & STATUS_SCAN_FORCED) && + priv->status & STATUS_SCAN_ABORTING) { + IPW_DEBUG_HC("Scan request while abort pending. Queuing.\n"); + priv->status |= direct ? STATUS_DIRECT_SCAN_PENDING : + STATUS_SCAN_PENDING; + goto done; + } + + if (priv->status & STATUS_RF_KILL_MASK) { + IPW_DEBUG_HC("Queuing scan due to RF Kill activation\n"); + priv->status |= direct ? STATUS_DIRECT_SCAN_PENDING : + STATUS_SCAN_PENDING; + goto done; + } + + memset(&scan, 0, sizeof(scan)); + scan.full_scan_index = cpu_to_le32(libipw_get_scans(priv->ieee)); + + if (type == IW_SCAN_TYPE_PASSIVE) { + IPW_DEBUG_WX("use passive scanning\n"); + scan_type = IPW_SCAN_PASSIVE_FULL_DWELL_SCAN; + scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = + cpu_to_le16(ipw_passive_dwell_time(priv)); + ipw_add_scan_channels(priv, &scan, scan_type); + goto send_request; + } + + /* Use active scan by default. */ + if (priv->config & CFG_SPEED_SCAN) + scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN] = + cpu_to_le16(30); + else + scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_SCAN] = + cpu_to_le16(20); + + scan.dwell_time[IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN] = + cpu_to_le16(20); + + scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = + cpu_to_le16(ipw_passive_dwell_time(priv)); + scan.dwell_time[IPW_SCAN_ACTIVE_DIRECT_SCAN] = cpu_to_le16(20); + +#ifdef CONFIG_IPW2200_MONITOR + if (priv->ieee->iw_mode == IW_MODE_MONITOR) { + u8 channel; + u8 band = 0; + + switch (libipw_is_valid_channel(priv->ieee, priv->channel)) { + case LIBIPW_52GHZ_BAND: + band = (u8) (IPW_A_MODE << 6) | 1; + channel = priv->channel; + break; + + case LIBIPW_24GHZ_BAND: + band = (u8) (IPW_B_MODE << 6) | 1; + channel = priv->channel; + break; + + default: + band = (u8) (IPW_B_MODE << 6) | 1; + channel = 9; + break; + } + + scan.channels_list[0] = band; + scan.channels_list[1] = channel; + ipw_set_scan_type(&scan, 1, IPW_SCAN_PASSIVE_FULL_DWELL_SCAN); + + /* NOTE: The card will sit on this channel for this time + * period. Scan aborts are timing sensitive and frequently + * result in firmware restarts. As such, it is best to + * set a small dwell_time here and just keep re-issuing + * scans. Otherwise fast channel hopping will not actually + * hop channels. + * + * TODO: Move SPEED SCAN support to all modes and bands */ + scan.dwell_time[IPW_SCAN_PASSIVE_FULL_DWELL_SCAN] = + cpu_to_le16(2000); + } else { +#endif /* CONFIG_IPW2200_MONITOR */ + /* Honor direct scans first, otherwise if we are roaming make + * this a direct scan for the current network. Finally, + * ensure that every other scan is a fast channel hop scan */ + if (direct) { + err = ipw_send_ssid(priv, priv->direct_scan_ssid, + priv->direct_scan_ssid_len); + if (err) { + IPW_DEBUG_HC("Attempt to send SSID command " + "failed\n"); + goto done; + } + + scan_type = IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN; + } else if ((priv->status & STATUS_ROAMING) + || (!(priv->status & STATUS_ASSOCIATED) + && (priv->config & CFG_STATIC_ESSID) + && (le32_to_cpu(scan.full_scan_index) % 2))) { + err = ipw_send_ssid(priv, priv->essid, priv->essid_len); + if (err) { + IPW_DEBUG_HC("Attempt to send SSID command " + "failed.\n"); + goto done; + } + + scan_type = IPW_SCAN_ACTIVE_BROADCAST_AND_DIRECT_SCAN; + } else + scan_type = IPW_SCAN_ACTIVE_BROADCAST_SCAN; + + ipw_add_scan_channels(priv, &scan, scan_type); +#ifdef CONFIG_IPW2200_MONITOR + } +#endif + +send_request: + err = ipw_send_scan_request_ext(priv, &scan); + if (err) { + IPW_DEBUG_HC("Sending scan command failed: %08X\n", err); + goto done; + } + + priv->status |= STATUS_SCANNING; + if (direct) { + priv->status &= ~STATUS_DIRECT_SCAN_PENDING; + priv->direct_scan_ssid_len = 0; + } else + priv->status &= ~STATUS_SCAN_PENDING; + + schedule_delayed_work(&priv->scan_check, IPW_SCAN_CHECK_WATCHDOG); +done: + mutex_unlock(&priv->mutex); + return err; +} + +static void ipw_request_passive_scan(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, request_passive_scan.work); + ipw_request_scan_helper(priv, IW_SCAN_TYPE_PASSIVE, 0); +} + +static void ipw_request_scan(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, request_scan.work); + ipw_request_scan_helper(priv, IW_SCAN_TYPE_ACTIVE, 0); +} + +static void ipw_request_direct_scan(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, request_direct_scan.work); + ipw_request_scan_helper(priv, IW_SCAN_TYPE_ACTIVE, 1); +} + +static void ipw_bg_abort_scan(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, abort_scan); + mutex_lock(&priv->mutex); + ipw_abort_scan(priv); + mutex_unlock(&priv->mutex); +} + +static int ipw_wpa_enable(struct ipw_priv *priv, int value) +{ + /* This is called when wpa_supplicant loads and closes the driver + * interface. */ + priv->ieee->wpa_enabled = value; + return 0; +} + +static int ipw_wpa_set_auth_algs(struct ipw_priv *priv, int value) +{ + struct libipw_device *ieee = priv->ieee; + struct libipw_security sec = { + .flags = SEC_AUTH_MODE, + }; + int ret = 0; + + if (value & IW_AUTH_ALG_SHARED_KEY) { + sec.auth_mode = WLAN_AUTH_SHARED_KEY; + ieee->open_wep = 0; + } else if (value & IW_AUTH_ALG_OPEN_SYSTEM) { + sec.auth_mode = WLAN_AUTH_OPEN; + ieee->open_wep = 1; + } else if (value & IW_AUTH_ALG_LEAP) { + sec.auth_mode = WLAN_AUTH_LEAP; + ieee->open_wep = 1; + } else + return -EINVAL; + + if (ieee->set_security) + ieee->set_security(ieee->dev, &sec); + else + ret = -EOPNOTSUPP; + + return ret; +} + +static void ipw_wpa_assoc_frame(struct ipw_priv *priv, char *wpa_ie, + int wpa_ie_len) +{ + /* make sure WPA is enabled */ + ipw_wpa_enable(priv, 1); +} + +static int ipw_set_rsn_capa(struct ipw_priv *priv, + char *capabilities, int length) +{ + IPW_DEBUG_HC("HOST_CMD_RSN_CAPABILITIES\n"); + + return ipw_send_cmd_pdu(priv, IPW_CMD_RSN_CAPABILITIES, length, + capabilities); +} + +/* + * WE-18 support + */ + +/* SIOCSIWGENIE */ +static int ipw_wx_set_genie(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + struct libipw_device *ieee = priv->ieee; + u8 *buf; + int err = 0; + + if (wrqu->data.length > MAX_WPA_IE_LEN || + (wrqu->data.length && extra == NULL)) + return -EINVAL; + + if (wrqu->data.length) { + buf = kmemdup(extra, wrqu->data.length, GFP_KERNEL); + if (buf == NULL) { + err = -ENOMEM; + goto out; + } + + kfree(ieee->wpa_ie); + ieee->wpa_ie = buf; + ieee->wpa_ie_len = wrqu->data.length; + } else { + kfree(ieee->wpa_ie); + ieee->wpa_ie = NULL; + ieee->wpa_ie_len = 0; + } + + ipw_wpa_assoc_frame(priv, ieee->wpa_ie, ieee->wpa_ie_len); + out: + return err; +} + +/* SIOCGIWGENIE */ +static int ipw_wx_get_genie(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + struct libipw_device *ieee = priv->ieee; + int err = 0; + + if (ieee->wpa_ie_len == 0 || ieee->wpa_ie == NULL) { + wrqu->data.length = 0; + goto out; + } + + if (wrqu->data.length < ieee->wpa_ie_len) { + err = -E2BIG; + goto out; + } + + wrqu->data.length = ieee->wpa_ie_len; + memcpy(extra, ieee->wpa_ie, ieee->wpa_ie_len); + + out: + return err; +} + +static int wext_cipher2level(int cipher) +{ + switch (cipher) { + case IW_AUTH_CIPHER_NONE: + return SEC_LEVEL_0; + case IW_AUTH_CIPHER_WEP40: + case IW_AUTH_CIPHER_WEP104: + return SEC_LEVEL_1; + case IW_AUTH_CIPHER_TKIP: + return SEC_LEVEL_2; + case IW_AUTH_CIPHER_CCMP: + return SEC_LEVEL_3; + default: + return -1; + } +} + +/* SIOCSIWAUTH */ +static int ipw_wx_set_auth(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + struct libipw_device *ieee = priv->ieee; + struct iw_param *param = &wrqu->param; + struct lib80211_crypt_data *crypt; + unsigned long flags; + int ret = 0; + + switch (param->flags & IW_AUTH_INDEX) { + case IW_AUTH_WPA_VERSION: + break; + case IW_AUTH_CIPHER_PAIRWISE: + ipw_set_hw_decrypt_unicast(priv, + wext_cipher2level(param->value)); + break; + case IW_AUTH_CIPHER_GROUP: + ipw_set_hw_decrypt_multicast(priv, + wext_cipher2level(param->value)); + break; + case IW_AUTH_KEY_MGMT: + /* + * ipw2200 does not use these parameters + */ + break; + + case IW_AUTH_TKIP_COUNTERMEASURES: + crypt = priv->ieee->crypt_info.crypt[priv->ieee->crypt_info.tx_keyidx]; + if (!crypt || !crypt->ops->set_flags || !crypt->ops->get_flags) + break; + + flags = crypt->ops->get_flags(crypt->priv); + + if (param->value) + flags |= IEEE80211_CRYPTO_TKIP_COUNTERMEASURES; + else + flags &= ~IEEE80211_CRYPTO_TKIP_COUNTERMEASURES; + + crypt->ops->set_flags(flags, crypt->priv); + + break; + + case IW_AUTH_DROP_UNENCRYPTED:{ + /* HACK: + * + * wpa_supplicant calls set_wpa_enabled when the driver + * is loaded and unloaded, regardless of if WPA is being + * used. No other calls are made which can be used to + * determine if encryption will be used or not prior to + * association being expected. If encryption is not being + * used, drop_unencrypted is set to false, else true -- we + * can use this to determine if the CAP_PRIVACY_ON bit should + * be set. + */ + struct libipw_security sec = { + .flags = SEC_ENABLED, + .enabled = param->value, + }; + priv->ieee->drop_unencrypted = param->value; + /* We only change SEC_LEVEL for open mode. Others + * are set by ipw_wpa_set_encryption. + */ + if (!param->value) { + sec.flags |= SEC_LEVEL; + sec.level = SEC_LEVEL_0; + } else { + sec.flags |= SEC_LEVEL; + sec.level = SEC_LEVEL_1; + } + if (priv->ieee->set_security) + priv->ieee->set_security(priv->ieee->dev, &sec); + break; + } + + case IW_AUTH_80211_AUTH_ALG: + ret = ipw_wpa_set_auth_algs(priv, param->value); + break; + + case IW_AUTH_WPA_ENABLED: + ret = ipw_wpa_enable(priv, param->value); + ipw_disassociate(priv); + break; + + case IW_AUTH_RX_UNENCRYPTED_EAPOL: + ieee->ieee802_1x = param->value; + break; + + case IW_AUTH_PRIVACY_INVOKED: + ieee->privacy_invoked = param->value; + break; + + default: + return -EOPNOTSUPP; + } + return ret; +} + +/* SIOCGIWAUTH */ +static int ipw_wx_get_auth(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + struct libipw_device *ieee = priv->ieee; + struct lib80211_crypt_data *crypt; + struct iw_param *param = &wrqu->param; + + switch (param->flags & IW_AUTH_INDEX) { + case IW_AUTH_WPA_VERSION: + case IW_AUTH_CIPHER_PAIRWISE: + case IW_AUTH_CIPHER_GROUP: + case IW_AUTH_KEY_MGMT: + /* + * wpa_supplicant will control these internally + */ + return -EOPNOTSUPP; + + case IW_AUTH_TKIP_COUNTERMEASURES: + crypt = priv->ieee->crypt_info.crypt[priv->ieee->crypt_info.tx_keyidx]; + if (!crypt || !crypt->ops->get_flags) + break; + + param->value = (crypt->ops->get_flags(crypt->priv) & + IEEE80211_CRYPTO_TKIP_COUNTERMEASURES) ? 1 : 0; + + break; + + case IW_AUTH_DROP_UNENCRYPTED: + param->value = ieee->drop_unencrypted; + break; + + case IW_AUTH_80211_AUTH_ALG: + param->value = ieee->sec.auth_mode; + break; + + case IW_AUTH_WPA_ENABLED: + param->value = ieee->wpa_enabled; + break; + + case IW_AUTH_RX_UNENCRYPTED_EAPOL: + param->value = ieee->ieee802_1x; + break; + + case IW_AUTH_ROAMING_CONTROL: + case IW_AUTH_PRIVACY_INVOKED: + param->value = ieee->privacy_invoked; + break; + + default: + return -EOPNOTSUPP; + } + return 0; +} + +/* SIOCSIWENCODEEXT */ +static int ipw_wx_set_encodeext(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; + + if (hwcrypto) { + if (ext->alg == IW_ENCODE_ALG_TKIP) { + /* IPW HW can't build TKIP MIC, + host decryption still needed */ + if (ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY) + priv->ieee->host_mc_decrypt = 1; + else { + priv->ieee->host_encrypt = 0; + priv->ieee->host_encrypt_msdu = 1; + priv->ieee->host_decrypt = 1; + } + } else { + priv->ieee->host_encrypt = 0; + priv->ieee->host_encrypt_msdu = 0; + priv->ieee->host_decrypt = 0; + priv->ieee->host_mc_decrypt = 0; + } + } + + return libipw_wx_set_encodeext(priv->ieee, info, wrqu, extra); +} + +/* SIOCGIWENCODEEXT */ +static int ipw_wx_get_encodeext(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + return libipw_wx_get_encodeext(priv->ieee, info, wrqu, extra); +} + +/* SIOCSIWMLME */ +static int ipw_wx_set_mlme(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + struct iw_mlme *mlme = (struct iw_mlme *)extra; + __le16 reason; + + reason = cpu_to_le16(mlme->reason_code); + + switch (mlme->cmd) { + case IW_MLME_DEAUTH: + /* silently ignore */ + break; + + case IW_MLME_DISASSOC: + ipw_disassociate(priv); + break; + + default: + return -EOPNOTSUPP; + } + return 0; +} + +#ifdef CONFIG_IPW2200_QOS + +/* QoS */ +/* +* get the modulation type of the current network or +* the card current mode +*/ +static u8 ipw_qos_current_mode(struct ipw_priv * priv) +{ + u8 mode = 0; + + if (priv->status & STATUS_ASSOCIATED) { + unsigned long flags; + + spin_lock_irqsave(&priv->ieee->lock, flags); + mode = priv->assoc_network->mode; + spin_unlock_irqrestore(&priv->ieee->lock, flags); + } else { + mode = priv->ieee->mode; + } + IPW_DEBUG_QOS("QoS network/card mode %d\n", mode); + return mode; +} + +/* +* Handle management frame beacon and probe response +*/ +static int ipw_qos_handle_probe_response(struct ipw_priv *priv, + int active_network, + struct libipw_network *network) +{ + u32 size = sizeof(struct libipw_qos_parameters); + + if (network->capability & WLAN_CAPABILITY_IBSS) + network->qos_data.active = network->qos_data.supported; + + if (network->flags & NETWORK_HAS_QOS_MASK) { + if (active_network && + (network->flags & NETWORK_HAS_QOS_PARAMETERS)) + network->qos_data.active = network->qos_data.supported; + + if ((network->qos_data.active == 1) && (active_network == 1) && + (network->flags & NETWORK_HAS_QOS_PARAMETERS) && + (network->qos_data.old_param_count != + network->qos_data.param_count)) { + network->qos_data.old_param_count = + network->qos_data.param_count; + schedule_work(&priv->qos_activate); + IPW_DEBUG_QOS("QoS parameters change call " + "qos_activate\n"); + } + } else { + if ((priv->ieee->mode == IEEE_B) || (network->mode == IEEE_B)) + memcpy(&network->qos_data.parameters, + &def_parameters_CCK, size); + else + memcpy(&network->qos_data.parameters, + &def_parameters_OFDM, size); + + if ((network->qos_data.active == 1) && (active_network == 1)) { + IPW_DEBUG_QOS("QoS was disabled call qos_activate\n"); + schedule_work(&priv->qos_activate); + } + + network->qos_data.active = 0; + network->qos_data.supported = 0; + } + if ((priv->status & STATUS_ASSOCIATED) && + (priv->ieee->iw_mode == IW_MODE_ADHOC) && (active_network == 0)) { + if (!ether_addr_equal(network->bssid, priv->bssid)) + if (network->capability & WLAN_CAPABILITY_IBSS) + if ((network->ssid_len == + priv->assoc_network->ssid_len) && + !memcmp(network->ssid, + priv->assoc_network->ssid, + network->ssid_len)) { + schedule_work(&priv->merge_networks); + } + } + + return 0; +} + +/* +* This function set up the firmware to support QoS. It sends +* IPW_CMD_QOS_PARAMETERS and IPW_CMD_WME_INFO +*/ +static int ipw_qos_activate(struct ipw_priv *priv, + struct libipw_qos_data *qos_network_data) +{ + int err; + struct libipw_qos_parameters qos_parameters[QOS_QOS_SETS]; + struct libipw_qos_parameters *active_one = NULL; + u32 size = sizeof(struct libipw_qos_parameters); + u32 burst_duration; + int i; + u8 type; + + type = ipw_qos_current_mode(priv); + + active_one = &(qos_parameters[QOS_PARAM_SET_DEF_CCK]); + memcpy(active_one, priv->qos_data.def_qos_parm_CCK, size); + active_one = &(qos_parameters[QOS_PARAM_SET_DEF_OFDM]); + memcpy(active_one, priv->qos_data.def_qos_parm_OFDM, size); + + if (qos_network_data == NULL) { + if (type == IEEE_B) { + IPW_DEBUG_QOS("QoS activate network mode %d\n", type); + active_one = &def_parameters_CCK; + } else + active_one = &def_parameters_OFDM; + + memcpy(&qos_parameters[QOS_PARAM_SET_ACTIVE], active_one, size); + burst_duration = ipw_qos_get_burst_duration(priv); + for (i = 0; i < QOS_QUEUE_NUM; i++) + qos_parameters[QOS_PARAM_SET_ACTIVE].tx_op_limit[i] = + cpu_to_le16(burst_duration); + } else if (priv->ieee->iw_mode == IW_MODE_ADHOC) { + if (type == IEEE_B) { + IPW_DEBUG_QOS("QoS activate IBSS network mode %d\n", + type); + if (priv->qos_data.qos_enable == 0) + active_one = &def_parameters_CCK; + else + active_one = priv->qos_data.def_qos_parm_CCK; + } else { + if (priv->qos_data.qos_enable == 0) + active_one = &def_parameters_OFDM; + else + active_one = priv->qos_data.def_qos_parm_OFDM; + } + memcpy(&qos_parameters[QOS_PARAM_SET_ACTIVE], active_one, size); + } else { + unsigned long flags; + int active; + + spin_lock_irqsave(&priv->ieee->lock, flags); + active_one = &(qos_network_data->parameters); + qos_network_data->old_param_count = + qos_network_data->param_count; + memcpy(&qos_parameters[QOS_PARAM_SET_ACTIVE], active_one, size); + active = qos_network_data->supported; + spin_unlock_irqrestore(&priv->ieee->lock, flags); + + if (active == 0) { + burst_duration = ipw_qos_get_burst_duration(priv); + for (i = 0; i < QOS_QUEUE_NUM; i++) + qos_parameters[QOS_PARAM_SET_ACTIVE]. + tx_op_limit[i] = cpu_to_le16(burst_duration); + } + } + + IPW_DEBUG_QOS("QoS sending IPW_CMD_QOS_PARAMETERS\n"); + err = ipw_send_qos_params_command(priv, &qos_parameters[0]); + if (err) + IPW_DEBUG_QOS("QoS IPW_CMD_QOS_PARAMETERS failed\n"); + + return err; +} + +/* +* send IPW_CMD_WME_INFO to the firmware +*/ +static int ipw_qos_set_info_element(struct ipw_priv *priv) +{ + int ret = 0; + struct libipw_qos_information_element qos_info; + + if (priv == NULL) + return -1; + + qos_info.elementID = QOS_ELEMENT_ID; + qos_info.length = sizeof(struct libipw_qos_information_element) - 2; + + qos_info.version = QOS_VERSION_1; + qos_info.ac_info = 0; + + memcpy(qos_info.qui, qos_oui, QOS_OUI_LEN); + qos_info.qui_type = QOS_OUI_TYPE; + qos_info.qui_subtype = QOS_OUI_INFO_SUB_TYPE; + + ret = ipw_send_qos_info_command(priv, &qos_info); + if (ret != 0) { + IPW_DEBUG_QOS("QoS error calling ipw_send_qos_info_command\n"); + } + return ret; +} + +/* +* Set the QoS parameter with the association request structure +*/ +static int ipw_qos_association(struct ipw_priv *priv, + struct libipw_network *network) +{ + int err = 0; + struct libipw_qos_data *qos_data = NULL; + struct libipw_qos_data ibss_data = { + .supported = 1, + .active = 1, + }; + + switch (priv->ieee->iw_mode) { + case IW_MODE_ADHOC: + BUG_ON(!(network->capability & WLAN_CAPABILITY_IBSS)); + + qos_data = &ibss_data; + break; + + case IW_MODE_INFRA: + qos_data = &network->qos_data; + break; + + default: + BUG(); + break; + } + + err = ipw_qos_activate(priv, qos_data); + if (err) { + priv->assoc_request.policy_support &= ~HC_QOS_SUPPORT_ASSOC; + return err; + } + + if (priv->qos_data.qos_enable && qos_data->supported) { + IPW_DEBUG_QOS("QoS will be enabled for this association\n"); + priv->assoc_request.policy_support |= HC_QOS_SUPPORT_ASSOC; + return ipw_qos_set_info_element(priv); + } + + return 0; +} + +/* +* handling the beaconing responses. if we get different QoS setting +* off the network from the associated setting, adjust the QoS +* setting +*/ +static int ipw_qos_association_resp(struct ipw_priv *priv, + struct libipw_network *network) +{ + int ret = 0; + unsigned long flags; + u32 size = sizeof(struct libipw_qos_parameters); + int set_qos_param = 0; + + if ((priv == NULL) || (network == NULL) || + (priv->assoc_network == NULL)) + return ret; + + if (!(priv->status & STATUS_ASSOCIATED)) + return ret; + + if ((priv->ieee->iw_mode != IW_MODE_INFRA)) + return ret; + + spin_lock_irqsave(&priv->ieee->lock, flags); + if (network->flags & NETWORK_HAS_QOS_PARAMETERS) { + memcpy(&priv->assoc_network->qos_data, &network->qos_data, + sizeof(struct libipw_qos_data)); + priv->assoc_network->qos_data.active = 1; + if ((network->qos_data.old_param_count != + network->qos_data.param_count)) { + set_qos_param = 1; + network->qos_data.old_param_count = + network->qos_data.param_count; + } + + } else { + if ((network->mode == IEEE_B) || (priv->ieee->mode == IEEE_B)) + memcpy(&priv->assoc_network->qos_data.parameters, + &def_parameters_CCK, size); + else + memcpy(&priv->assoc_network->qos_data.parameters, + &def_parameters_OFDM, size); + priv->assoc_network->qos_data.active = 0; + priv->assoc_network->qos_data.supported = 0; + set_qos_param = 1; + } + + spin_unlock_irqrestore(&priv->ieee->lock, flags); + + if (set_qos_param == 1) + schedule_work(&priv->qos_activate); + + return ret; +} + +static u32 ipw_qos_get_burst_duration(struct ipw_priv *priv) +{ + u32 ret = 0; + + if (!priv) + return 0; + + if (!(priv->ieee->modulation & LIBIPW_OFDM_MODULATION)) + ret = priv->qos_data.burst_duration_CCK; + else + ret = priv->qos_data.burst_duration_OFDM; + + return ret; +} + +/* +* Initialize the setting of QoS global +*/ +static void ipw_qos_init(struct ipw_priv *priv, int enable, + int burst_enable, u32 burst_duration_CCK, + u32 burst_duration_OFDM) +{ + priv->qos_data.qos_enable = enable; + + if (priv->qos_data.qos_enable) { + priv->qos_data.def_qos_parm_CCK = &def_qos_parameters_CCK; + priv->qos_data.def_qos_parm_OFDM = &def_qos_parameters_OFDM; + IPW_DEBUG_QOS("QoS is enabled\n"); + } else { + priv->qos_data.def_qos_parm_CCK = &def_parameters_CCK; + priv->qos_data.def_qos_parm_OFDM = &def_parameters_OFDM; + IPW_DEBUG_QOS("QoS is not enabled\n"); + } + + priv->qos_data.burst_enable = burst_enable; + + if (burst_enable) { + priv->qos_data.burst_duration_CCK = burst_duration_CCK; + priv->qos_data.burst_duration_OFDM = burst_duration_OFDM; + } else { + priv->qos_data.burst_duration_CCK = 0; + priv->qos_data.burst_duration_OFDM = 0; + } +} + +/* +* map the packet priority to the right TX Queue +*/ +static int ipw_get_tx_queue_number(struct ipw_priv *priv, u16 priority) +{ + if (priority > 7 || !priv->qos_data.qos_enable) + priority = 0; + + return from_priority_to_tx_queue[priority] - 1; +} + +static int ipw_is_qos_active(struct net_device *dev, + struct sk_buff *skb) +{ + struct ipw_priv *priv = libipw_priv(dev); + struct libipw_qos_data *qos_data = NULL; + int active, supported; + u8 *daddr = skb->data + ETH_ALEN; + int unicast = !is_multicast_ether_addr(daddr); + + if (!(priv->status & STATUS_ASSOCIATED)) + return 0; + + qos_data = &priv->assoc_network->qos_data; + + if (priv->ieee->iw_mode == IW_MODE_ADHOC) { + if (unicast == 0) + qos_data->active = 0; + else + qos_data->active = qos_data->supported; + } + active = qos_data->active; + supported = qos_data->supported; + IPW_DEBUG_QOS("QoS %d network is QoS active %d supported %d " + "unicast %d\n", + priv->qos_data.qos_enable, active, supported, unicast); + if (active && priv->qos_data.qos_enable) + return 1; + + return 0; + +} +/* +* add QoS parameter to the TX command +*/ +static int ipw_qos_set_tx_queue_command(struct ipw_priv *priv, + u16 priority, + struct tfd_data *tfd) +{ + int tx_queue_id = 0; + + + tx_queue_id = from_priority_to_tx_queue[priority] - 1; + tfd->tx_flags_ext |= DCT_FLAG_EXT_QOS_ENABLED; + + if (priv->qos_data.qos_no_ack_mask & (1UL << tx_queue_id)) { + tfd->tx_flags &= ~DCT_FLAG_ACK_REQD; + tfd->tfd.tfd_26.mchdr.qos_ctrl |= cpu_to_le16(CTRL_QOS_NO_ACK); + } + return 0; +} + +/* +* background support to run QoS activate functionality +*/ +static void ipw_bg_qos_activate(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, qos_activate); + + mutex_lock(&priv->mutex); + + if (priv->status & STATUS_ASSOCIATED) + ipw_qos_activate(priv, &(priv->assoc_network->qos_data)); + + mutex_unlock(&priv->mutex); +} + +static int ipw_handle_probe_response(struct net_device *dev, + struct libipw_probe_response *resp, + struct libipw_network *network) +{ + struct ipw_priv *priv = libipw_priv(dev); + int active_network = ((priv->status & STATUS_ASSOCIATED) && + (network == priv->assoc_network)); + + ipw_qos_handle_probe_response(priv, active_network, network); + + return 0; +} + +static int ipw_handle_beacon(struct net_device *dev, + struct libipw_beacon *resp, + struct libipw_network *network) +{ + struct ipw_priv *priv = libipw_priv(dev); + int active_network = ((priv->status & STATUS_ASSOCIATED) && + (network == priv->assoc_network)); + + ipw_qos_handle_probe_response(priv, active_network, network); + + return 0; +} + +static int ipw_handle_assoc_response(struct net_device *dev, + struct libipw_assoc_response *resp, + struct libipw_network *network) +{ + struct ipw_priv *priv = libipw_priv(dev); + ipw_qos_association_resp(priv, network); + return 0; +} + +static int ipw_send_qos_params_command(struct ipw_priv *priv, struct libipw_qos_parameters + *qos_param) +{ + return ipw_send_cmd_pdu(priv, IPW_CMD_QOS_PARAMETERS, + sizeof(*qos_param) * 3, qos_param); +} + +static int ipw_send_qos_info_command(struct ipw_priv *priv, struct libipw_qos_information_element + *qos_param) +{ + return ipw_send_cmd_pdu(priv, IPW_CMD_WME_INFO, sizeof(*qos_param), + qos_param); +} + +#endif /* CONFIG_IPW2200_QOS */ + +static int ipw_associate_network(struct ipw_priv *priv, + struct libipw_network *network, + struct ipw_supported_rates *rates, int roaming) +{ + int err; + + if (priv->config & CFG_FIXED_RATE) + ipw_set_fixed_rate(priv, network->mode); + + if (!(priv->config & CFG_STATIC_ESSID)) { + priv->essid_len = min(network->ssid_len, + (u8) IW_ESSID_MAX_SIZE); + memcpy(priv->essid, network->ssid, priv->essid_len); + } + + network->last_associate = jiffies; + + memset(&priv->assoc_request, 0, sizeof(priv->assoc_request)); + priv->assoc_request.channel = network->channel; + priv->assoc_request.auth_key = 0; + + if ((priv->capability & CAP_PRIVACY_ON) && + (priv->ieee->sec.auth_mode == WLAN_AUTH_SHARED_KEY)) { + priv->assoc_request.auth_type = AUTH_SHARED_KEY; + priv->assoc_request.auth_key = priv->ieee->sec.active_key; + + if (priv->ieee->sec.level == SEC_LEVEL_1) + ipw_send_wep_keys(priv, DCW_WEP_KEY_SEC_TYPE_WEP); + + } else if ((priv->capability & CAP_PRIVACY_ON) && + (priv->ieee->sec.auth_mode == WLAN_AUTH_LEAP)) + priv->assoc_request.auth_type = AUTH_LEAP; + else + priv->assoc_request.auth_type = AUTH_OPEN; + + if (priv->ieee->wpa_ie_len) { + priv->assoc_request.policy_support = cpu_to_le16(0x02); /* RSN active */ + ipw_set_rsn_capa(priv, priv->ieee->wpa_ie, + priv->ieee->wpa_ie_len); + } + + /* + * It is valid for our ieee device to support multiple modes, but + * when it comes to associating to a given network we have to choose + * just one mode. + */ + if (network->mode & priv->ieee->mode & IEEE_A) + priv->assoc_request.ieee_mode = IPW_A_MODE; + else if (network->mode & priv->ieee->mode & IEEE_G) + priv->assoc_request.ieee_mode = IPW_G_MODE; + else if (network->mode & priv->ieee->mode & IEEE_B) + priv->assoc_request.ieee_mode = IPW_B_MODE; + + priv->assoc_request.capability = cpu_to_le16(network->capability); + if ((network->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) + && !(priv->config & CFG_PREAMBLE_LONG)) { + priv->assoc_request.preamble_length = DCT_FLAG_SHORT_PREAMBLE; + } else { + priv->assoc_request.preamble_length = DCT_FLAG_LONG_PREAMBLE; + + /* Clear the short preamble if we won't be supporting it */ + priv->assoc_request.capability &= + ~cpu_to_le16(WLAN_CAPABILITY_SHORT_PREAMBLE); + } + + /* Clear capability bits that aren't used in Ad Hoc */ + if (priv->ieee->iw_mode == IW_MODE_ADHOC) + priv->assoc_request.capability &= + ~cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME); + + IPW_DEBUG_ASSOC("%ssociation attempt: '%*pE', channel %d, 802.11%c [%d], %s[:%s], enc=%s%s%s%c%c\n", + roaming ? "Rea" : "A", + priv->essid_len, priv->essid, + network->channel, + ipw_modes[priv->assoc_request.ieee_mode], + rates->num_rates, + (priv->assoc_request.preamble_length == + DCT_FLAG_LONG_PREAMBLE) ? "long" : "short", + network->capability & + WLAN_CAPABILITY_SHORT_PREAMBLE ? "short" : "long", + priv->capability & CAP_PRIVACY_ON ? "on " : "off", + priv->capability & CAP_PRIVACY_ON ? + (priv->capability & CAP_SHARED_KEY ? "(shared)" : + "(open)") : "", + priv->capability & CAP_PRIVACY_ON ? " key=" : "", + priv->capability & CAP_PRIVACY_ON ? + '1' + priv->ieee->sec.active_key : '.', + priv->capability & CAP_PRIVACY_ON ? '.' : ' '); + + priv->assoc_request.beacon_interval = cpu_to_le16(network->beacon_interval); + if ((priv->ieee->iw_mode == IW_MODE_ADHOC) && + (network->time_stamp[0] == 0) && (network->time_stamp[1] == 0)) { + priv->assoc_request.assoc_type = HC_IBSS_START; + priv->assoc_request.assoc_tsf_msw = 0; + priv->assoc_request.assoc_tsf_lsw = 0; + } else { + if (unlikely(roaming)) + priv->assoc_request.assoc_type = HC_REASSOCIATE; + else + priv->assoc_request.assoc_type = HC_ASSOCIATE; + priv->assoc_request.assoc_tsf_msw = cpu_to_le32(network->time_stamp[1]); + priv->assoc_request.assoc_tsf_lsw = cpu_to_le32(network->time_stamp[0]); + } + + memcpy(priv->assoc_request.bssid, network->bssid, ETH_ALEN); + + if (priv->ieee->iw_mode == IW_MODE_ADHOC) { + eth_broadcast_addr(priv->assoc_request.dest); + priv->assoc_request.atim_window = cpu_to_le16(network->atim_window); + } else { + memcpy(priv->assoc_request.dest, network->bssid, ETH_ALEN); + priv->assoc_request.atim_window = 0; + } + + priv->assoc_request.listen_interval = cpu_to_le16(network->listen_interval); + + err = ipw_send_ssid(priv, priv->essid, priv->essid_len); + if (err) { + IPW_DEBUG_HC("Attempt to send SSID command failed.\n"); + return err; + } + + rates->ieee_mode = priv->assoc_request.ieee_mode; + rates->purpose = IPW_RATE_CONNECT; + ipw_send_supported_rates(priv, rates); + + if (priv->assoc_request.ieee_mode == IPW_G_MODE) + priv->sys_config.dot11g_auto_detection = 1; + else + priv->sys_config.dot11g_auto_detection = 0; + + if (priv->ieee->iw_mode == IW_MODE_ADHOC) + priv->sys_config.answer_broadcast_ssid_probe = 1; + else + priv->sys_config.answer_broadcast_ssid_probe = 0; + + err = ipw_send_system_config(priv); + if (err) { + IPW_DEBUG_HC("Attempt to send sys config command failed.\n"); + return err; + } + + IPW_DEBUG_ASSOC("Association sensitivity: %d\n", network->stats.rssi); + err = ipw_set_sensitivity(priv, network->stats.rssi + IPW_RSSI_TO_DBM); + if (err) { + IPW_DEBUG_HC("Attempt to send associate command failed.\n"); + return err; + } + + /* + * If preemption is enabled, it is possible for the association + * to complete before we return from ipw_send_associate. Therefore + * we have to be sure and update our priviate data first. + */ + priv->channel = network->channel; + memcpy(priv->bssid, network->bssid, ETH_ALEN); + priv->status |= STATUS_ASSOCIATING; + priv->status &= ~STATUS_SECURITY_UPDATED; + + priv->assoc_network = network; + +#ifdef CONFIG_IPW2200_QOS + ipw_qos_association(priv, network); +#endif + + err = ipw_send_associate(priv, &priv->assoc_request); + if (err) { + IPW_DEBUG_HC("Attempt to send associate command failed.\n"); + return err; + } + + IPW_DEBUG(IPW_DL_STATE, "associating: '%*pE' %pM\n", + priv->essid_len, priv->essid, priv->bssid); + + return 0; +} + +static void ipw_roam(void *data) +{ + struct ipw_priv *priv = data; + struct libipw_network *network = NULL; + struct ipw_network_match match = { + .network = priv->assoc_network + }; + + /* The roaming process is as follows: + * + * 1. Missed beacon threshold triggers the roaming process by + * setting the status ROAM bit and requesting a scan. + * 2. When the scan completes, it schedules the ROAM work + * 3. The ROAM work looks at all of the known networks for one that + * is a better network than the currently associated. If none + * found, the ROAM process is over (ROAM bit cleared) + * 4. If a better network is found, a disassociation request is + * sent. + * 5. When the disassociation completes, the roam work is again + * scheduled. The second time through, the driver is no longer + * associated, and the newly selected network is sent an + * association request. + * 6. At this point ,the roaming process is complete and the ROAM + * status bit is cleared. + */ + + /* If we are no longer associated, and the roaming bit is no longer + * set, then we are not actively roaming, so just return */ + if (!(priv->status & (STATUS_ASSOCIATED | STATUS_ROAMING))) + return; + + if (priv->status & STATUS_ASSOCIATED) { + /* First pass through ROAM process -- look for a better + * network */ + unsigned long flags; + u8 rssi = priv->assoc_network->stats.rssi; + priv->assoc_network->stats.rssi = -128; + spin_lock_irqsave(&priv->ieee->lock, flags); + list_for_each_entry(network, &priv->ieee->network_list, list) { + if (network != priv->assoc_network) + ipw_best_network(priv, &match, network, 1); + } + spin_unlock_irqrestore(&priv->ieee->lock, flags); + priv->assoc_network->stats.rssi = rssi; + + if (match.network == priv->assoc_network) { + IPW_DEBUG_ASSOC("No better APs in this network to " + "roam to.\n"); + priv->status &= ~STATUS_ROAMING; + ipw_debug_config(priv); + return; + } + + ipw_send_disassociate(priv, 1); + priv->assoc_network = match.network; + + return; + } + + /* Second pass through ROAM process -- request association */ + ipw_compatible_rates(priv, priv->assoc_network, &match.rates); + ipw_associate_network(priv, priv->assoc_network, &match.rates, 1); + priv->status &= ~STATUS_ROAMING; +} + +static void ipw_bg_roam(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, roam); + mutex_lock(&priv->mutex); + ipw_roam(priv); + mutex_unlock(&priv->mutex); +} + +static int ipw_associate(void *data) +{ + struct ipw_priv *priv = data; + + struct libipw_network *network = NULL; + struct ipw_network_match match = { + .network = NULL + }; + struct ipw_supported_rates *rates; + struct list_head *element; + unsigned long flags; + + if (priv->ieee->iw_mode == IW_MODE_MONITOR) { + IPW_DEBUG_ASSOC("Not attempting association (monitor mode)\n"); + return 0; + } + + if (priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING)) { + IPW_DEBUG_ASSOC("Not attempting association (already in " + "progress)\n"); + return 0; + } + + if (priv->status & STATUS_DISASSOCIATING) { + IPW_DEBUG_ASSOC("Not attempting association (in disassociating)\n"); + schedule_work(&priv->associate); + return 0; + } + + if (!ipw_is_init(priv) || (priv->status & STATUS_SCANNING)) { + IPW_DEBUG_ASSOC("Not attempting association (scanning or not " + "initialized)\n"); + return 0; + } + + if (!(priv->config & CFG_ASSOCIATE) && + !(priv->config & (CFG_STATIC_ESSID | CFG_STATIC_BSSID))) { + IPW_DEBUG_ASSOC("Not attempting association (associate=0)\n"); + return 0; + } + + /* Protect our use of the network_list */ + spin_lock_irqsave(&priv->ieee->lock, flags); + list_for_each_entry(network, &priv->ieee->network_list, list) + ipw_best_network(priv, &match, network, 0); + + network = match.network; + rates = &match.rates; + + if (network == NULL && + priv->ieee->iw_mode == IW_MODE_ADHOC && + priv->config & CFG_ADHOC_CREATE && + priv->config & CFG_STATIC_ESSID && + priv->config & CFG_STATIC_CHANNEL) { + /* Use oldest network if the free list is empty */ + if (list_empty(&priv->ieee->network_free_list)) { + struct libipw_network *oldest = NULL; + struct libipw_network *target; + + list_for_each_entry(target, &priv->ieee->network_list, list) { + if ((oldest == NULL) || + (target->last_scanned < oldest->last_scanned)) + oldest = target; + } + + /* If there are no more slots, expire the oldest */ + list_del(&oldest->list); + target = oldest; + IPW_DEBUG_ASSOC("Expired '%*pE' (%pM) from network list.\n", + target->ssid_len, target->ssid, + target->bssid); + list_add_tail(&target->list, + &priv->ieee->network_free_list); + } + + element = priv->ieee->network_free_list.next; + network = list_entry(element, struct libipw_network, list); + ipw_adhoc_create(priv, network); + rates = &priv->rates; + list_del(element); + list_add_tail(&network->list, &priv->ieee->network_list); + } + spin_unlock_irqrestore(&priv->ieee->lock, flags); + + /* If we reached the end of the list, then we don't have any valid + * matching APs */ + if (!network) { + ipw_debug_config(priv); + + if (!(priv->status & STATUS_SCANNING)) { + if (!(priv->config & CFG_SPEED_SCAN)) + schedule_delayed_work(&priv->request_scan, + SCAN_INTERVAL); + else + schedule_delayed_work(&priv->request_scan, 0); + } + + return 0; + } + + ipw_associate_network(priv, network, rates, 0); + + return 1; +} + +static void ipw_bg_associate(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, associate); + mutex_lock(&priv->mutex); + ipw_associate(priv); + mutex_unlock(&priv->mutex); +} + +static void ipw_rebuild_decrypted_skb(struct ipw_priv *priv, + struct sk_buff *skb) +{ + struct ieee80211_hdr *hdr; + u16 fc; + + hdr = (struct ieee80211_hdr *)skb->data; + fc = le16_to_cpu(hdr->frame_control); + if (!(fc & IEEE80211_FCTL_PROTECTED)) + return; + + fc &= ~IEEE80211_FCTL_PROTECTED; + hdr->frame_control = cpu_to_le16(fc); + switch (priv->ieee->sec.level) { + case SEC_LEVEL_3: + /* Remove CCMP HDR */ + memmove(skb->data + LIBIPW_3ADDR_LEN, + skb->data + LIBIPW_3ADDR_LEN + 8, + skb->len - LIBIPW_3ADDR_LEN - 8); + skb_trim(skb, skb->len - 16); /* CCMP_HDR_LEN + CCMP_MIC_LEN */ + break; + case SEC_LEVEL_2: + break; + case SEC_LEVEL_1: + /* Remove IV */ + memmove(skb->data + LIBIPW_3ADDR_LEN, + skb->data + LIBIPW_3ADDR_LEN + 4, + skb->len - LIBIPW_3ADDR_LEN - 4); + skb_trim(skb, skb->len - 8); /* IV + ICV */ + break; + case SEC_LEVEL_0: + break; + default: + printk(KERN_ERR "Unknown security level %d\n", + priv->ieee->sec.level); + break; + } +} + +static void ipw_handle_data_packet(struct ipw_priv *priv, + struct ipw_rx_mem_buffer *rxb, + struct libipw_rx_stats *stats) +{ + struct net_device *dev = priv->net_dev; + struct libipw_hdr_4addr *hdr; + struct ipw_rx_packet *pkt = (struct ipw_rx_packet *)rxb->skb->data; + + /* We received data from the HW, so stop the watchdog */ + netif_trans_update(dev); + + /* We only process data packets if the + * interface is open */ + if (unlikely((le16_to_cpu(pkt->u.frame.length) + IPW_RX_FRAME_SIZE) > + skb_tailroom(rxb->skb))) { + dev->stats.rx_errors++; + priv->wstats.discard.misc++; + IPW_DEBUG_DROP("Corruption detected! Oh no!\n"); + return; + } else if (unlikely(!netif_running(priv->net_dev))) { + dev->stats.rx_dropped++; + priv->wstats.discard.misc++; + IPW_DEBUG_DROP("Dropping packet while interface is not up.\n"); + return; + } + + /* Advance skb->data to the start of the actual payload */ + skb_reserve(rxb->skb, offsetof(struct ipw_rx_packet, u.frame.data)); + + /* Set the size of the skb to the size of the frame */ + skb_put(rxb->skb, le16_to_cpu(pkt->u.frame.length)); + + IPW_DEBUG_RX("Rx packet of %d bytes.\n", rxb->skb->len); + + /* HW decrypt will not clear the WEP bit, MIC, PN, etc. */ + hdr = (struct libipw_hdr_4addr *)rxb->skb->data; + if (priv->ieee->iw_mode != IW_MODE_MONITOR && + (is_multicast_ether_addr(hdr->addr1) ? + !priv->ieee->host_mc_decrypt : !priv->ieee->host_decrypt)) + ipw_rebuild_decrypted_skb(priv, rxb->skb); + + if (!libipw_rx(priv->ieee, rxb->skb, stats)) + dev->stats.rx_errors++; + else { /* libipw_rx succeeded, so it now owns the SKB */ + rxb->skb = NULL; + __ipw_led_activity_on(priv); + } +} + +#ifdef CONFIG_IPW2200_RADIOTAP +static void ipw_handle_data_packet_monitor(struct ipw_priv *priv, + struct ipw_rx_mem_buffer *rxb, + struct libipw_rx_stats *stats) +{ + struct net_device *dev = priv->net_dev; + struct ipw_rx_packet *pkt = (struct ipw_rx_packet *)rxb->skb->data; + struct ipw_rx_frame *frame = &pkt->u.frame; + + /* initial pull of some data */ + u16 received_channel = frame->received_channel; + u8 antennaAndPhy = frame->antennaAndPhy; + s8 antsignal = frame->rssi_dbm - IPW_RSSI_TO_DBM; /* call it signed anyhow */ + u16 pktrate = frame->rate; + + /* Magic struct that slots into the radiotap header -- no reason + * to build this manually element by element, we can write it much + * more efficiently than we can parse it. ORDER MATTERS HERE */ + struct ipw_rt_hdr *ipw_rt; + + unsigned short len = le16_to_cpu(pkt->u.frame.length); + + /* We received data from the HW, so stop the watchdog */ + netif_trans_update(dev); + + /* We only process data packets if the + * interface is open */ + if (unlikely((le16_to_cpu(pkt->u.frame.length) + IPW_RX_FRAME_SIZE) > + skb_tailroom(rxb->skb))) { + dev->stats.rx_errors++; + priv->wstats.discard.misc++; + IPW_DEBUG_DROP("Corruption detected! Oh no!\n"); + return; + } else if (unlikely(!netif_running(priv->net_dev))) { + dev->stats.rx_dropped++; + priv->wstats.discard.misc++; + IPW_DEBUG_DROP("Dropping packet while interface is not up.\n"); + return; + } + + /* Libpcap 0.9.3+ can handle variable length radiotap, so we'll use + * that now */ + if (len > IPW_RX_BUF_SIZE - sizeof(struct ipw_rt_hdr)) { + /* FIXME: Should alloc bigger skb instead */ + dev->stats.rx_dropped++; + priv->wstats.discard.misc++; + IPW_DEBUG_DROP("Dropping too large packet in monitor\n"); + return; + } + + /* copy the frame itself */ + memmove(rxb->skb->data + sizeof(struct ipw_rt_hdr), + rxb->skb->data + IPW_RX_FRAME_SIZE, len); + + ipw_rt = (struct ipw_rt_hdr *)rxb->skb->data; + + ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION; + ipw_rt->rt_hdr.it_pad = 0; /* always good to zero */ + ipw_rt->rt_hdr.it_len = cpu_to_le16(sizeof(struct ipw_rt_hdr)); /* total header+data */ + + /* Big bitfield of all the fields we provide in radiotap */ + ipw_rt->rt_hdr.it_present = cpu_to_le32( + (1 << IEEE80211_RADIOTAP_TSFT) | + (1 << IEEE80211_RADIOTAP_FLAGS) | + (1 << IEEE80211_RADIOTAP_RATE) | + (1 << IEEE80211_RADIOTAP_CHANNEL) | + (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | + (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | + (1 << IEEE80211_RADIOTAP_ANTENNA)); + + /* Zero the flags, we'll add to them as we go */ + ipw_rt->rt_flags = 0; + ipw_rt->rt_tsf = (u64)(frame->parent_tsf[3] << 24 | + frame->parent_tsf[2] << 16 | + frame->parent_tsf[1] << 8 | + frame->parent_tsf[0]); + + /* Convert signal to DBM */ + ipw_rt->rt_dbmsignal = antsignal; + ipw_rt->rt_dbmnoise = (s8) le16_to_cpu(frame->noise); + + /* Convert the channel data and set the flags */ + ipw_rt->rt_channel = cpu_to_le16(ieee80211chan2mhz(received_channel)); + if (received_channel > 14) { /* 802.11a */ + ipw_rt->rt_chbitmask = + cpu_to_le16((IEEE80211_CHAN_OFDM | IEEE80211_CHAN_5GHZ)); + } else if (antennaAndPhy & 32) { /* 802.11b */ + ipw_rt->rt_chbitmask = + cpu_to_le16((IEEE80211_CHAN_CCK | IEEE80211_CHAN_2GHZ)); + } else { /* 802.11g */ + ipw_rt->rt_chbitmask = + cpu_to_le16(IEEE80211_CHAN_OFDM | IEEE80211_CHAN_2GHZ); + } + + /* set the rate in multiples of 500k/s */ + switch (pktrate) { + case IPW_TX_RATE_1MB: + ipw_rt->rt_rate = 2; + break; + case IPW_TX_RATE_2MB: + ipw_rt->rt_rate = 4; + break; + case IPW_TX_RATE_5MB: + ipw_rt->rt_rate = 10; + break; + case IPW_TX_RATE_6MB: + ipw_rt->rt_rate = 12; + break; + case IPW_TX_RATE_9MB: + ipw_rt->rt_rate = 18; + break; + case IPW_TX_RATE_11MB: + ipw_rt->rt_rate = 22; + break; + case IPW_TX_RATE_12MB: + ipw_rt->rt_rate = 24; + break; + case IPW_TX_RATE_18MB: + ipw_rt->rt_rate = 36; + break; + case IPW_TX_RATE_24MB: + ipw_rt->rt_rate = 48; + break; + case IPW_TX_RATE_36MB: + ipw_rt->rt_rate = 72; + break; + case IPW_TX_RATE_48MB: + ipw_rt->rt_rate = 96; + break; + case IPW_TX_RATE_54MB: + ipw_rt->rt_rate = 108; + break; + default: + ipw_rt->rt_rate = 0; + break; + } + + /* antenna number */ + ipw_rt->rt_antenna = (antennaAndPhy & 3); /* Is this right? */ + + /* set the preamble flag if we have it */ + if ((antennaAndPhy & 64)) + ipw_rt->rt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; + + /* Set the size of the skb to the size of the frame */ + skb_put(rxb->skb, len + sizeof(struct ipw_rt_hdr)); + + IPW_DEBUG_RX("Rx packet of %d bytes.\n", rxb->skb->len); + + if (!libipw_rx(priv->ieee, rxb->skb, stats)) + dev->stats.rx_errors++; + else { /* libipw_rx succeeded, so it now owns the SKB */ + rxb->skb = NULL; + /* no LED during capture */ + } +} +#endif + +#ifdef CONFIG_IPW2200_PROMISCUOUS +#define libipw_is_probe_response(fc) \ + ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT && \ + (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP ) + +#define libipw_is_management(fc) \ + ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) + +#define libipw_is_control(fc) \ + ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) + +#define libipw_is_data(fc) \ + ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) + +#define libipw_is_assoc_request(fc) \ + ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_ASSOC_REQ) + +#define libipw_is_reassoc_request(fc) \ + ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_REASSOC_REQ) + +static void ipw_handle_promiscuous_rx(struct ipw_priv *priv, + struct ipw_rx_mem_buffer *rxb, + struct libipw_rx_stats *stats) +{ + struct net_device *dev = priv->prom_net_dev; + struct ipw_rx_packet *pkt = (struct ipw_rx_packet *)rxb->skb->data; + struct ipw_rx_frame *frame = &pkt->u.frame; + struct ipw_rt_hdr *ipw_rt; + + /* First cache any information we need before we overwrite + * the information provided in the skb from the hardware */ + struct ieee80211_hdr *hdr; + u16 channel = frame->received_channel; + u8 phy_flags = frame->antennaAndPhy; + s8 signal = frame->rssi_dbm - IPW_RSSI_TO_DBM; + s8 noise = (s8) le16_to_cpu(frame->noise); + u8 rate = frame->rate; + unsigned short len = le16_to_cpu(pkt->u.frame.length); + struct sk_buff *skb; + int hdr_only = 0; + u16 filter = priv->prom_priv->filter; + + /* If the filter is set to not include Rx frames then return */ + if (filter & IPW_PROM_NO_RX) + return; + + /* We received data from the HW, so stop the watchdog */ + netif_trans_update(dev); + + if (unlikely((len + IPW_RX_FRAME_SIZE) > skb_tailroom(rxb->skb))) { + dev->stats.rx_errors++; + IPW_DEBUG_DROP("Corruption detected! Oh no!\n"); + return; + } + + /* We only process data packets if the interface is open */ + if (unlikely(!netif_running(dev))) { + dev->stats.rx_dropped++; + IPW_DEBUG_DROP("Dropping packet while interface is not up.\n"); + return; + } + + /* Libpcap 0.9.3+ can handle variable length radiotap, so we'll use + * that now */ + if (len > IPW_RX_BUF_SIZE - sizeof(struct ipw_rt_hdr)) { + /* FIXME: Should alloc bigger skb instead */ + dev->stats.rx_dropped++; + IPW_DEBUG_DROP("Dropping too large packet in monitor\n"); + return; + } + + hdr = (void *)rxb->skb->data + IPW_RX_FRAME_SIZE; + if (libipw_is_management(le16_to_cpu(hdr->frame_control))) { + if (filter & IPW_PROM_NO_MGMT) + return; + if (filter & IPW_PROM_MGMT_HEADER_ONLY) + hdr_only = 1; + } else if (libipw_is_control(le16_to_cpu(hdr->frame_control))) { + if (filter & IPW_PROM_NO_CTL) + return; + if (filter & IPW_PROM_CTL_HEADER_ONLY) + hdr_only = 1; + } else if (libipw_is_data(le16_to_cpu(hdr->frame_control))) { + if (filter & IPW_PROM_NO_DATA) + return; + if (filter & IPW_PROM_DATA_HEADER_ONLY) + hdr_only = 1; + } + + /* Copy the SKB since this is for the promiscuous side */ + skb = skb_copy(rxb->skb, GFP_ATOMIC); + if (skb == NULL) { + IPW_ERROR("skb_clone failed for promiscuous copy.\n"); + return; + } + + /* copy the frame data to write after where the radiotap header goes */ + ipw_rt = (void *)skb->data; + + if (hdr_only) + len = libipw_get_hdrlen(le16_to_cpu(hdr->frame_control)); + + memcpy(ipw_rt->payload, hdr, len); + + ipw_rt->rt_hdr.it_version = PKTHDR_RADIOTAP_VERSION; + ipw_rt->rt_hdr.it_pad = 0; /* always good to zero */ + ipw_rt->rt_hdr.it_len = cpu_to_le16(sizeof(*ipw_rt)); /* total header+data */ + + /* Set the size of the skb to the size of the frame */ + skb_put(skb, sizeof(*ipw_rt) + len); + + /* Big bitfield of all the fields we provide in radiotap */ + ipw_rt->rt_hdr.it_present = cpu_to_le32( + (1 << IEEE80211_RADIOTAP_TSFT) | + (1 << IEEE80211_RADIOTAP_FLAGS) | + (1 << IEEE80211_RADIOTAP_RATE) | + (1 << IEEE80211_RADIOTAP_CHANNEL) | + (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) | + (1 << IEEE80211_RADIOTAP_DBM_ANTNOISE) | + (1 << IEEE80211_RADIOTAP_ANTENNA)); + + /* Zero the flags, we'll add to them as we go */ + ipw_rt->rt_flags = 0; + ipw_rt->rt_tsf = (u64)(frame->parent_tsf[3] << 24 | + frame->parent_tsf[2] << 16 | + frame->parent_tsf[1] << 8 | + frame->parent_tsf[0]); + + /* Convert to DBM */ + ipw_rt->rt_dbmsignal = signal; + ipw_rt->rt_dbmnoise = noise; + + /* Convert the channel data and set the flags */ + ipw_rt->rt_channel = cpu_to_le16(ieee80211chan2mhz(channel)); + if (channel > 14) { /* 802.11a */ + ipw_rt->rt_chbitmask = + cpu_to_le16((IEEE80211_CHAN_OFDM | IEEE80211_CHAN_5GHZ)); + } else if (phy_flags & (1 << 5)) { /* 802.11b */ + ipw_rt->rt_chbitmask = + cpu_to_le16((IEEE80211_CHAN_CCK | IEEE80211_CHAN_2GHZ)); + } else { /* 802.11g */ + ipw_rt->rt_chbitmask = + cpu_to_le16(IEEE80211_CHAN_OFDM | IEEE80211_CHAN_2GHZ); + } + + /* set the rate in multiples of 500k/s */ + switch (rate) { + case IPW_TX_RATE_1MB: + ipw_rt->rt_rate = 2; + break; + case IPW_TX_RATE_2MB: + ipw_rt->rt_rate = 4; + break; + case IPW_TX_RATE_5MB: + ipw_rt->rt_rate = 10; + break; + case IPW_TX_RATE_6MB: + ipw_rt->rt_rate = 12; + break; + case IPW_TX_RATE_9MB: + ipw_rt->rt_rate = 18; + break; + case IPW_TX_RATE_11MB: + ipw_rt->rt_rate = 22; + break; + case IPW_TX_RATE_12MB: + ipw_rt->rt_rate = 24; + break; + case IPW_TX_RATE_18MB: + ipw_rt->rt_rate = 36; + break; + case IPW_TX_RATE_24MB: + ipw_rt->rt_rate = 48; + break; + case IPW_TX_RATE_36MB: + ipw_rt->rt_rate = 72; + break; + case IPW_TX_RATE_48MB: + ipw_rt->rt_rate = 96; + break; + case IPW_TX_RATE_54MB: + ipw_rt->rt_rate = 108; + break; + default: + ipw_rt->rt_rate = 0; + break; + } + + /* antenna number */ + ipw_rt->rt_antenna = (phy_flags & 3); + + /* set the preamble flag if we have it */ + if (phy_flags & (1 << 6)) + ipw_rt->rt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; + + IPW_DEBUG_RX("Rx packet of %d bytes.\n", skb->len); + + if (!libipw_rx(priv->prom_priv->ieee, skb, stats)) { + dev->stats.rx_errors++; + dev_kfree_skb_any(skb); + } +} +#endif + +static int is_network_packet(struct ipw_priv *priv, + struct libipw_hdr_4addr *header) +{ + /* Filter incoming packets to determine if they are targeted toward + * this network, discarding packets coming from ourselves */ + switch (priv->ieee->iw_mode) { + case IW_MODE_ADHOC: /* Header: Dest. | Source | BSSID */ + /* packets from our adapter are dropped (echo) */ + if (ether_addr_equal(header->addr2, priv->net_dev->dev_addr)) + return 0; + + /* {broad,multi}cast packets to our BSSID go through */ + if (is_multicast_ether_addr(header->addr1)) + return ether_addr_equal(header->addr3, priv->bssid); + + /* packets to our adapter go through */ + return ether_addr_equal(header->addr1, + priv->net_dev->dev_addr); + + case IW_MODE_INFRA: /* Header: Dest. | BSSID | Source */ + /* packets from our adapter are dropped (echo) */ + if (ether_addr_equal(header->addr3, priv->net_dev->dev_addr)) + return 0; + + /* {broad,multi}cast packets to our BSS go through */ + if (is_multicast_ether_addr(header->addr1)) + return ether_addr_equal(header->addr2, priv->bssid); + + /* packets to our adapter go through */ + return ether_addr_equal(header->addr1, + priv->net_dev->dev_addr); + } + + return 1; +} + +#define IPW_PACKET_RETRY_TIME HZ + +static int is_duplicate_packet(struct ipw_priv *priv, + struct libipw_hdr_4addr *header) +{ + u16 sc = le16_to_cpu(header->seq_ctl); + u16 seq = WLAN_GET_SEQ_SEQ(sc); + u16 frag = WLAN_GET_SEQ_FRAG(sc); + u16 *last_seq, *last_frag; + unsigned long *last_time; + + switch (priv->ieee->iw_mode) { + case IW_MODE_ADHOC: + { + struct list_head *p; + struct ipw_ibss_seq *entry = NULL; + u8 *mac = header->addr2; + int index = mac[5] % IPW_IBSS_MAC_HASH_SIZE; + + list_for_each(p, &priv->ibss_mac_hash[index]) { + entry = + list_entry(p, struct ipw_ibss_seq, list); + if (ether_addr_equal(entry->mac, mac)) + break; + } + if (p == &priv->ibss_mac_hash[index]) { + entry = kmalloc(sizeof(*entry), GFP_ATOMIC); + if (!entry) { + IPW_ERROR + ("Cannot malloc new mac entry\n"); + return 0; + } + memcpy(entry->mac, mac, ETH_ALEN); + entry->seq_num = seq; + entry->frag_num = frag; + entry->packet_time = jiffies; + list_add(&entry->list, + &priv->ibss_mac_hash[index]); + return 0; + } + last_seq = &entry->seq_num; + last_frag = &entry->frag_num; + last_time = &entry->packet_time; + break; + } + case IW_MODE_INFRA: + last_seq = &priv->last_seq_num; + last_frag = &priv->last_frag_num; + last_time = &priv->last_packet_time; + break; + default: + return 0; + } + if ((*last_seq == seq) && + time_after(*last_time + IPW_PACKET_RETRY_TIME, jiffies)) { + if (*last_frag == frag) + goto drop; + if (*last_frag + 1 != frag) + /* out-of-order fragment */ + goto drop; + } else + *last_seq = seq; + + *last_frag = frag; + *last_time = jiffies; + return 0; + + drop: + /* Comment this line now since we observed the card receives + * duplicate packets but the FCTL_RETRY bit is not set in the + * IBSS mode with fragmentation enabled. + BUG_ON(!(le16_to_cpu(header->frame_control) & IEEE80211_FCTL_RETRY)); */ + return 1; +} + +static void ipw_handle_mgmt_packet(struct ipw_priv *priv, + struct ipw_rx_mem_buffer *rxb, + struct libipw_rx_stats *stats) +{ + struct sk_buff *skb = rxb->skb; + struct ipw_rx_packet *pkt = (struct ipw_rx_packet *)skb->data; + struct libipw_hdr_4addr *header = (struct libipw_hdr_4addr *) + (skb->data + IPW_RX_FRAME_SIZE); + + libipw_rx_mgt(priv->ieee, header, stats); + + if (priv->ieee->iw_mode == IW_MODE_ADHOC && + ((WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl)) == + IEEE80211_STYPE_PROBE_RESP) || + (WLAN_FC_GET_STYPE(le16_to_cpu(header->frame_ctl)) == + IEEE80211_STYPE_BEACON))) { + if (ether_addr_equal(header->addr3, priv->bssid)) + ipw_add_station(priv, header->addr2); + } + + if (priv->config & CFG_NET_STATS) { + IPW_DEBUG_HC("sending stat packet\n"); + + /* Set the size of the skb to the size of the full + * ipw header and 802.11 frame */ + skb_put(skb, le16_to_cpu(pkt->u.frame.length) + + IPW_RX_FRAME_SIZE); + + /* Advance past the ipw packet header to the 802.11 frame */ + skb_pull(skb, IPW_RX_FRAME_SIZE); + + /* Push the libipw_rx_stats before the 802.11 frame */ + memcpy(skb_push(skb, sizeof(*stats)), stats, sizeof(*stats)); + + skb->dev = priv->ieee->dev; + + /* Point raw at the libipw_stats */ + skb_reset_mac_header(skb); + + skb->pkt_type = PACKET_OTHERHOST; + skb->protocol = cpu_to_be16(ETH_P_80211_STATS); + memset(skb->cb, 0, sizeof(rxb->skb->cb)); + netif_rx(skb); + rxb->skb = NULL; + } +} + +/* + * Main entry function for receiving a packet with 80211 headers. This + * should be called when ever the FW has notified us that there is a new + * skb in the receive queue. + */ +static void ipw_rx(struct ipw_priv *priv) +{ + struct ipw_rx_mem_buffer *rxb; + struct ipw_rx_packet *pkt; + struct libipw_hdr_4addr *header; + u32 r, w, i; + u8 network_packet; + u8 fill_rx = 0; + + r = ipw_read32(priv, IPW_RX_READ_INDEX); + w = ipw_read32(priv, IPW_RX_WRITE_INDEX); + i = priv->rxq->read; + + if (ipw_rx_queue_space (priv->rxq) > (RX_QUEUE_SIZE / 2)) + fill_rx = 1; + + while (i != r) { + rxb = priv->rxq->queue[i]; + if (unlikely(rxb == NULL)) { + printk(KERN_CRIT "Queue not allocated!\n"); + break; + } + priv->rxq->queue[i] = NULL; + + pci_dma_sync_single_for_cpu(priv->pci_dev, rxb->dma_addr, + IPW_RX_BUF_SIZE, + PCI_DMA_FROMDEVICE); + + pkt = (struct ipw_rx_packet *)rxb->skb->data; + IPW_DEBUG_RX("Packet: type=%02X seq=%02X bits=%02X\n", + pkt->header.message_type, + pkt->header.rx_seq_num, pkt->header.control_bits); + + switch (pkt->header.message_type) { + case RX_FRAME_TYPE: /* 802.11 frame */ { + struct libipw_rx_stats stats = { + .rssi = pkt->u.frame.rssi_dbm - + IPW_RSSI_TO_DBM, + .signal = + pkt->u.frame.rssi_dbm - + IPW_RSSI_TO_DBM + 0x100, + .noise = + le16_to_cpu(pkt->u.frame.noise), + .rate = pkt->u.frame.rate, + .mac_time = jiffies, + .received_channel = + pkt->u.frame.received_channel, + .freq = + (pkt->u.frame. + control & (1 << 0)) ? + LIBIPW_24GHZ_BAND : + LIBIPW_52GHZ_BAND, + .len = le16_to_cpu(pkt->u.frame.length), + }; + + if (stats.rssi != 0) + stats.mask |= LIBIPW_STATMASK_RSSI; + if (stats.signal != 0) + stats.mask |= LIBIPW_STATMASK_SIGNAL; + if (stats.noise != 0) + stats.mask |= LIBIPW_STATMASK_NOISE; + if (stats.rate != 0) + stats.mask |= LIBIPW_STATMASK_RATE; + + priv->rx_packets++; + +#ifdef CONFIG_IPW2200_PROMISCUOUS + if (priv->prom_net_dev && netif_running(priv->prom_net_dev)) + ipw_handle_promiscuous_rx(priv, rxb, &stats); +#endif + +#ifdef CONFIG_IPW2200_MONITOR + if (priv->ieee->iw_mode == IW_MODE_MONITOR) { +#ifdef CONFIG_IPW2200_RADIOTAP + + ipw_handle_data_packet_monitor(priv, + rxb, + &stats); +#else + ipw_handle_data_packet(priv, rxb, + &stats); +#endif + break; + } +#endif + + header = + (struct libipw_hdr_4addr *)(rxb->skb-> + data + + IPW_RX_FRAME_SIZE); + /* TODO: Check Ad-Hoc dest/source and make sure + * that we are actually parsing these packets + * correctly -- we should probably use the + * frame control of the packet and disregard + * the current iw_mode */ + + network_packet = + is_network_packet(priv, header); + if (network_packet && priv->assoc_network) { + priv->assoc_network->stats.rssi = + stats.rssi; + priv->exp_avg_rssi = + exponential_average(priv->exp_avg_rssi, + stats.rssi, DEPTH_RSSI); + } + + IPW_DEBUG_RX("Frame: len=%u\n", + le16_to_cpu(pkt->u.frame.length)); + + if (le16_to_cpu(pkt->u.frame.length) < + libipw_get_hdrlen(le16_to_cpu( + header->frame_ctl))) { + IPW_DEBUG_DROP + ("Received packet is too small. " + "Dropping.\n"); + priv->net_dev->stats.rx_errors++; + priv->wstats.discard.misc++; + break; + } + + switch (WLAN_FC_GET_TYPE + (le16_to_cpu(header->frame_ctl))) { + + case IEEE80211_FTYPE_MGMT: + ipw_handle_mgmt_packet(priv, rxb, + &stats); + break; + + case IEEE80211_FTYPE_CTL: + break; + + case IEEE80211_FTYPE_DATA: + if (unlikely(!network_packet || + is_duplicate_packet(priv, + header))) + { + IPW_DEBUG_DROP("Dropping: " + "%pM, " + "%pM, " + "%pM\n", + header->addr1, + header->addr2, + header->addr3); + break; + } + + ipw_handle_data_packet(priv, rxb, + &stats); + + break; + } + break; + } + + case RX_HOST_NOTIFICATION_TYPE:{ + IPW_DEBUG_RX + ("Notification: subtype=%02X flags=%02X size=%d\n", + pkt->u.notification.subtype, + pkt->u.notification.flags, + le16_to_cpu(pkt->u.notification.size)); + ipw_rx_notification(priv, &pkt->u.notification); + break; + } + + default: + IPW_DEBUG_RX("Bad Rx packet of type %d\n", + pkt->header.message_type); + break; + } + + /* For now we just don't re-use anything. We can tweak this + * later to try and re-use notification packets and SKBs that + * fail to Rx correctly */ + if (rxb->skb != NULL) { + dev_kfree_skb_any(rxb->skb); + rxb->skb = NULL; + } + + pci_unmap_single(priv->pci_dev, rxb->dma_addr, + IPW_RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + list_add_tail(&rxb->list, &priv->rxq->rx_used); + + i = (i + 1) % RX_QUEUE_SIZE; + + /* If there are a lot of unsued frames, restock the Rx queue + * so the ucode won't assert */ + if (fill_rx) { + priv->rxq->read = i; + ipw_rx_queue_replenish(priv); + } + } + + /* Backtrack one entry */ + priv->rxq->read = i; + ipw_rx_queue_restock(priv); +} + +#define DEFAULT_RTS_THRESHOLD 2304U +#define MIN_RTS_THRESHOLD 1U +#define MAX_RTS_THRESHOLD 2304U +#define DEFAULT_BEACON_INTERVAL 100U +#define DEFAULT_SHORT_RETRY_LIMIT 7U +#define DEFAULT_LONG_RETRY_LIMIT 4U + +/** + * ipw_sw_reset + * @option: options to control different reset behaviour + * 0 = reset everything except the 'disable' module_param + * 1 = reset everything and print out driver info (for probe only) + * 2 = reset everything + */ +static int ipw_sw_reset(struct ipw_priv *priv, int option) +{ + int band, modulation; + int old_mode = priv->ieee->iw_mode; + + /* Initialize module parameter values here */ + priv->config = 0; + + /* We default to disabling the LED code as right now it causes + * too many systems to lock up... */ + if (!led_support) + priv->config |= CFG_NO_LED; + + if (associate) + priv->config |= CFG_ASSOCIATE; + else + IPW_DEBUG_INFO("Auto associate disabled.\n"); + + if (auto_create) + priv->config |= CFG_ADHOC_CREATE; + else + IPW_DEBUG_INFO("Auto adhoc creation disabled.\n"); + + priv->config &= ~CFG_STATIC_ESSID; + priv->essid_len = 0; + memset(priv->essid, 0, IW_ESSID_MAX_SIZE); + + if (disable && option) { + priv->status |= STATUS_RF_KILL_SW; + IPW_DEBUG_INFO("Radio disabled.\n"); + } + + if (default_channel != 0) { + priv->config |= CFG_STATIC_CHANNEL; + priv->channel = default_channel; + IPW_DEBUG_INFO("Bind to static channel %d\n", default_channel); + /* TODO: Validate that provided channel is in range */ + } +#ifdef CONFIG_IPW2200_QOS + ipw_qos_init(priv, qos_enable, qos_burst_enable, + burst_duration_CCK, burst_duration_OFDM); +#endif /* CONFIG_IPW2200_QOS */ + + switch (network_mode) { + case 1: + priv->ieee->iw_mode = IW_MODE_ADHOC; + priv->net_dev->type = ARPHRD_ETHER; + + break; +#ifdef CONFIG_IPW2200_MONITOR + case 2: + priv->ieee->iw_mode = IW_MODE_MONITOR; +#ifdef CONFIG_IPW2200_RADIOTAP + priv->net_dev->type = ARPHRD_IEEE80211_RADIOTAP; +#else + priv->net_dev->type = ARPHRD_IEEE80211; +#endif + break; +#endif + default: + case 0: + priv->net_dev->type = ARPHRD_ETHER; + priv->ieee->iw_mode = IW_MODE_INFRA; + break; + } + + if (hwcrypto) { + priv->ieee->host_encrypt = 0; + priv->ieee->host_encrypt_msdu = 0; + priv->ieee->host_decrypt = 0; + priv->ieee->host_mc_decrypt = 0; + } + IPW_DEBUG_INFO("Hardware crypto [%s]\n", hwcrypto ? "on" : "off"); + + /* IPW2200/2915 is abled to do hardware fragmentation. */ + priv->ieee->host_open_frag = 0; + + if ((priv->pci_dev->device == 0x4223) || + (priv->pci_dev->device == 0x4224)) { + if (option == 1) + printk(KERN_INFO DRV_NAME + ": Detected Intel PRO/Wireless 2915ABG Network " + "Connection\n"); + priv->ieee->abg_true = 1; + band = LIBIPW_52GHZ_BAND | LIBIPW_24GHZ_BAND; + modulation = LIBIPW_OFDM_MODULATION | + LIBIPW_CCK_MODULATION; + priv->adapter = IPW_2915ABG; + priv->ieee->mode = IEEE_A | IEEE_G | IEEE_B; + } else { + if (option == 1) + printk(KERN_INFO DRV_NAME + ": Detected Intel PRO/Wireless 2200BG Network " + "Connection\n"); + + priv->ieee->abg_true = 0; + band = LIBIPW_24GHZ_BAND; + modulation = LIBIPW_OFDM_MODULATION | + LIBIPW_CCK_MODULATION; + priv->adapter = IPW_2200BG; + priv->ieee->mode = IEEE_G | IEEE_B; + } + + priv->ieee->freq_band = band; + priv->ieee->modulation = modulation; + + priv->rates_mask = LIBIPW_DEFAULT_RATES_MASK; + + priv->disassociate_threshold = IPW_MB_DISASSOCIATE_THRESHOLD_DEFAULT; + priv->roaming_threshold = IPW_MB_ROAMING_THRESHOLD_DEFAULT; + + priv->rts_threshold = DEFAULT_RTS_THRESHOLD; + priv->short_retry_limit = DEFAULT_SHORT_RETRY_LIMIT; + priv->long_retry_limit = DEFAULT_LONG_RETRY_LIMIT; + + /* If power management is turned on, default to AC mode */ + priv->power_mode = IPW_POWER_AC; + priv->tx_power = IPW_TX_POWER_DEFAULT; + + return old_mode == priv->ieee->iw_mode; +} + +/* + * This file defines the Wireless Extension handlers. It does not + * define any methods of hardware manipulation and relies on the + * functions defined in ipw_main to provide the HW interaction. + * + * The exception to this is the use of the ipw_get_ordinal() + * function used to poll the hardware vs. making unnecessary calls. + * + */ + +static int ipw_set_channel(struct ipw_priv *priv, u8 channel) +{ + if (channel == 0) { + IPW_DEBUG_INFO("Setting channel to ANY (0)\n"); + priv->config &= ~CFG_STATIC_CHANNEL; + IPW_DEBUG_ASSOC("Attempting to associate with new " + "parameters.\n"); + ipw_associate(priv); + return 0; + } + + priv->config |= CFG_STATIC_CHANNEL; + + if (priv->channel == channel) { + IPW_DEBUG_INFO("Request to set channel to current value (%d)\n", + channel); + return 0; + } + + IPW_DEBUG_INFO("Setting channel to %i\n", (int)channel); + priv->channel = channel; + +#ifdef CONFIG_IPW2200_MONITOR + if (priv->ieee->iw_mode == IW_MODE_MONITOR) { + int i; + if (priv->status & STATUS_SCANNING) { + IPW_DEBUG_SCAN("Scan abort triggered due to " + "channel change.\n"); + ipw_abort_scan(priv); + } + + for (i = 1000; i && (priv->status & STATUS_SCANNING); i--) + udelay(10); + + if (priv->status & STATUS_SCANNING) + IPW_DEBUG_SCAN("Still scanning...\n"); + else + IPW_DEBUG_SCAN("Took %dms to abort current scan\n", + 1000 - i); + + return 0; + } +#endif /* CONFIG_IPW2200_MONITOR */ + + /* Network configuration changed -- force [re]association */ + IPW_DEBUG_ASSOC("[re]association triggered due to channel change.\n"); + if (!ipw_disassociate(priv)) + ipw_associate(priv); + + return 0; +} + +static int ipw_wx_set_freq(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + const struct libipw_geo *geo = libipw_get_geo(priv->ieee); + struct iw_freq *fwrq = &wrqu->freq; + int ret = 0, i; + u8 channel, flags; + int band; + + if (fwrq->m == 0) { + IPW_DEBUG_WX("SET Freq/Channel -> any\n"); + mutex_lock(&priv->mutex); + ret = ipw_set_channel(priv, 0); + mutex_unlock(&priv->mutex); + return ret; + } + /* if setting by freq convert to channel */ + if (fwrq->e == 1) { + channel = libipw_freq_to_channel(priv->ieee, fwrq->m); + if (channel == 0) + return -EINVAL; + } else + channel = fwrq->m; + + if (!(band = libipw_is_valid_channel(priv->ieee, channel))) + return -EINVAL; + + if (priv->ieee->iw_mode == IW_MODE_ADHOC) { + i = libipw_channel_to_index(priv->ieee, channel); + if (i == -1) + return -EINVAL; + + flags = (band == LIBIPW_24GHZ_BAND) ? + geo->bg[i].flags : geo->a[i].flags; + if (flags & LIBIPW_CH_PASSIVE_ONLY) { + IPW_DEBUG_WX("Invalid Ad-Hoc channel for 802.11a\n"); + return -EINVAL; + } + } + + IPW_DEBUG_WX("SET Freq/Channel -> %d\n", fwrq->m); + mutex_lock(&priv->mutex); + ret = ipw_set_channel(priv, channel); + mutex_unlock(&priv->mutex); + return ret; +} + +static int ipw_wx_get_freq(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + + wrqu->freq.e = 0; + + /* If we are associated, trying to associate, or have a statically + * configured CHANNEL then return that; otherwise return ANY */ + mutex_lock(&priv->mutex); + if (priv->config & CFG_STATIC_CHANNEL || + priv->status & (STATUS_ASSOCIATING | STATUS_ASSOCIATED)) { + int i; + + i = libipw_channel_to_index(priv->ieee, priv->channel); + BUG_ON(i == -1); + wrqu->freq.e = 1; + + switch (libipw_is_valid_channel(priv->ieee, priv->channel)) { + case LIBIPW_52GHZ_BAND: + wrqu->freq.m = priv->ieee->geo.a[i].freq * 100000; + break; + + case LIBIPW_24GHZ_BAND: + wrqu->freq.m = priv->ieee->geo.bg[i].freq * 100000; + break; + + default: + BUG(); + } + } else + wrqu->freq.m = 0; + + mutex_unlock(&priv->mutex); + IPW_DEBUG_WX("GET Freq/Channel -> %d\n", priv->channel); + return 0; +} + +static int ipw_wx_set_mode(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + int err = 0; + + IPW_DEBUG_WX("Set MODE: %d\n", wrqu->mode); + + switch (wrqu->mode) { +#ifdef CONFIG_IPW2200_MONITOR + case IW_MODE_MONITOR: +#endif + case IW_MODE_ADHOC: + case IW_MODE_INFRA: + break; + case IW_MODE_AUTO: + wrqu->mode = IW_MODE_INFRA; + break; + default: + return -EINVAL; + } + if (wrqu->mode == priv->ieee->iw_mode) + return 0; + + mutex_lock(&priv->mutex); + + ipw_sw_reset(priv, 0); + +#ifdef CONFIG_IPW2200_MONITOR + if (priv->ieee->iw_mode == IW_MODE_MONITOR) + priv->net_dev->type = ARPHRD_ETHER; + + if (wrqu->mode == IW_MODE_MONITOR) +#ifdef CONFIG_IPW2200_RADIOTAP + priv->net_dev->type = ARPHRD_IEEE80211_RADIOTAP; +#else + priv->net_dev->type = ARPHRD_IEEE80211; +#endif +#endif /* CONFIG_IPW2200_MONITOR */ + + /* Free the existing firmware and reset the fw_loaded + * flag so ipw_load() will bring in the new firmware */ + free_firmware(); + + priv->ieee->iw_mode = wrqu->mode; + + schedule_work(&priv->adapter_restart); + mutex_unlock(&priv->mutex); + return err; +} + +static int ipw_wx_get_mode(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + mutex_lock(&priv->mutex); + wrqu->mode = priv->ieee->iw_mode; + IPW_DEBUG_WX("Get MODE -> %d\n", wrqu->mode); + mutex_unlock(&priv->mutex); + return 0; +} + +/* Values are in microsecond */ +static const s32 timeout_duration[] = { + 350000, + 250000, + 75000, + 37000, + 25000, +}; + +static const s32 period_duration[] = { + 400000, + 700000, + 1000000, + 1000000, + 1000000 +}; + +static int ipw_wx_get_range(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + struct iw_range *range = (struct iw_range *)extra; + const struct libipw_geo *geo = libipw_get_geo(priv->ieee); + int i = 0, j; + + wrqu->data.length = sizeof(*range); + memset(range, 0, sizeof(*range)); + + /* 54Mbs == ~27 Mb/s real (802.11g) */ + range->throughput = 27 * 1000 * 1000; + + range->max_qual.qual = 100; + /* TODO: Find real max RSSI and stick here */ + range->max_qual.level = 0; + range->max_qual.noise = 0; + range->max_qual.updated = 7; /* Updated all three */ + + range->avg_qual.qual = 70; + /* TODO: Find real 'good' to 'bad' threshold value for RSSI */ + range->avg_qual.level = 0; /* FIXME to real average level */ + range->avg_qual.noise = 0; + range->avg_qual.updated = 7; /* Updated all three */ + mutex_lock(&priv->mutex); + range->num_bitrates = min(priv->rates.num_rates, (u8) IW_MAX_BITRATES); + + for (i = 0; i < range->num_bitrates; i++) + range->bitrate[i] = (priv->rates.supported_rates[i] & 0x7F) * + 500000; + + range->max_rts = DEFAULT_RTS_THRESHOLD; + range->min_frag = MIN_FRAG_THRESHOLD; + range->max_frag = MAX_FRAG_THRESHOLD; + + range->encoding_size[0] = 5; + range->encoding_size[1] = 13; + range->num_encoding_sizes = 2; + range->max_encoding_tokens = WEP_KEYS; + + /* Set the Wireless Extension versions */ + range->we_version_compiled = WIRELESS_EXT; + range->we_version_source = 18; + + i = 0; + if (priv->ieee->mode & (IEEE_B | IEEE_G)) { + for (j = 0; j < geo->bg_channels && i < IW_MAX_FREQUENCIES; j++) { + if ((priv->ieee->iw_mode == IW_MODE_ADHOC) && + (geo->bg[j].flags & LIBIPW_CH_PASSIVE_ONLY)) + continue; + + range->freq[i].i = geo->bg[j].channel; + range->freq[i].m = geo->bg[j].freq * 100000; + range->freq[i].e = 1; + i++; + } + } + + if (priv->ieee->mode & IEEE_A) { + for (j = 0; j < geo->a_channels && i < IW_MAX_FREQUENCIES; j++) { + if ((priv->ieee->iw_mode == IW_MODE_ADHOC) && + (geo->a[j].flags & LIBIPW_CH_PASSIVE_ONLY)) + continue; + + range->freq[i].i = geo->a[j].channel; + range->freq[i].m = geo->a[j].freq * 100000; + range->freq[i].e = 1; + i++; + } + } + + range->num_channels = i; + range->num_frequency = i; + + mutex_unlock(&priv->mutex); + + /* Event capability (kernel + driver) */ + range->event_capa[0] = (IW_EVENT_CAPA_K_0 | + IW_EVENT_CAPA_MASK(SIOCGIWTHRSPY) | + IW_EVENT_CAPA_MASK(SIOCGIWAP) | + IW_EVENT_CAPA_MASK(SIOCGIWSCAN)); + range->event_capa[1] = IW_EVENT_CAPA_K_1; + + range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 | + IW_ENC_CAPA_CIPHER_TKIP | IW_ENC_CAPA_CIPHER_CCMP; + + range->scan_capa = IW_SCAN_CAPA_ESSID | IW_SCAN_CAPA_TYPE; + + IPW_DEBUG_WX("GET Range\n"); + return 0; +} + +static int ipw_wx_set_wap(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + + if (wrqu->ap_addr.sa_family != ARPHRD_ETHER) + return -EINVAL; + mutex_lock(&priv->mutex); + if (is_broadcast_ether_addr(wrqu->ap_addr.sa_data) || + is_zero_ether_addr(wrqu->ap_addr.sa_data)) { + /* we disable mandatory BSSID association */ + IPW_DEBUG_WX("Setting AP BSSID to ANY\n"); + priv->config &= ~CFG_STATIC_BSSID; + IPW_DEBUG_ASSOC("Attempting to associate with new " + "parameters.\n"); + ipw_associate(priv); + mutex_unlock(&priv->mutex); + return 0; + } + + priv->config |= CFG_STATIC_BSSID; + if (ether_addr_equal(priv->bssid, wrqu->ap_addr.sa_data)) { + IPW_DEBUG_WX("BSSID set to current BSSID.\n"); + mutex_unlock(&priv->mutex); + return 0; + } + + IPW_DEBUG_WX("Setting mandatory BSSID to %pM\n", + wrqu->ap_addr.sa_data); + + memcpy(priv->bssid, wrqu->ap_addr.sa_data, ETH_ALEN); + + /* Network configuration changed -- force [re]association */ + IPW_DEBUG_ASSOC("[re]association triggered due to BSSID change.\n"); + if (!ipw_disassociate(priv)) + ipw_associate(priv); + + mutex_unlock(&priv->mutex); + return 0; +} + +static int ipw_wx_get_wap(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + + /* If we are associated, trying to associate, or have a statically + * configured BSSID then return that; otherwise return ANY */ + mutex_lock(&priv->mutex); + if (priv->config & CFG_STATIC_BSSID || + priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING)) { + wrqu->ap_addr.sa_family = ARPHRD_ETHER; + memcpy(wrqu->ap_addr.sa_data, priv->bssid, ETH_ALEN); + } else + eth_zero_addr(wrqu->ap_addr.sa_data); + + IPW_DEBUG_WX("Getting WAP BSSID: %pM\n", + wrqu->ap_addr.sa_data); + mutex_unlock(&priv->mutex); + return 0; +} + +static int ipw_wx_set_essid(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + int length; + + mutex_lock(&priv->mutex); + + if (!wrqu->essid.flags) + { + IPW_DEBUG_WX("Setting ESSID to ANY\n"); + ipw_disassociate(priv); + priv->config &= ~CFG_STATIC_ESSID; + ipw_associate(priv); + mutex_unlock(&priv->mutex); + return 0; + } + + length = min((int)wrqu->essid.length, IW_ESSID_MAX_SIZE); + + priv->config |= CFG_STATIC_ESSID; + + if (priv->essid_len == length && !memcmp(priv->essid, extra, length) + && (priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING))) { + IPW_DEBUG_WX("ESSID set to current ESSID.\n"); + mutex_unlock(&priv->mutex); + return 0; + } + + IPW_DEBUG_WX("Setting ESSID: '%*pE' (%d)\n", length, extra, length); + + priv->essid_len = length; + memcpy(priv->essid, extra, priv->essid_len); + + /* Network configuration changed -- force [re]association */ + IPW_DEBUG_ASSOC("[re]association triggered due to ESSID change.\n"); + if (!ipw_disassociate(priv)) + ipw_associate(priv); + + mutex_unlock(&priv->mutex); + return 0; +} + +static int ipw_wx_get_essid(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + + /* If we are associated, trying to associate, or have a statically + * configured ESSID then return that; otherwise return ANY */ + mutex_lock(&priv->mutex); + if (priv->config & CFG_STATIC_ESSID || + priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING)) { + IPW_DEBUG_WX("Getting essid: '%*pE'\n", + priv->essid_len, priv->essid); + memcpy(extra, priv->essid, priv->essid_len); + wrqu->essid.length = priv->essid_len; + wrqu->essid.flags = 1; /* active */ + } else { + IPW_DEBUG_WX("Getting essid: ANY\n"); + wrqu->essid.length = 0; + wrqu->essid.flags = 0; /* active */ + } + mutex_unlock(&priv->mutex); + return 0; +} + +static int ipw_wx_set_nick(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + + IPW_DEBUG_WX("Setting nick to '%s'\n", extra); + if (wrqu->data.length > IW_ESSID_MAX_SIZE) + return -E2BIG; + mutex_lock(&priv->mutex); + wrqu->data.length = min_t(size_t, wrqu->data.length, sizeof(priv->nick)); + memset(priv->nick, 0, sizeof(priv->nick)); + memcpy(priv->nick, extra, wrqu->data.length); + IPW_DEBUG_TRACE("<<\n"); + mutex_unlock(&priv->mutex); + return 0; + +} + +static int ipw_wx_get_nick(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + IPW_DEBUG_WX("Getting nick\n"); + mutex_lock(&priv->mutex); + wrqu->data.length = strlen(priv->nick); + memcpy(extra, priv->nick, wrqu->data.length); + wrqu->data.flags = 1; /* active */ + mutex_unlock(&priv->mutex); + return 0; +} + +static int ipw_wx_set_sens(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + int err = 0; + + IPW_DEBUG_WX("Setting roaming threshold to %d\n", wrqu->sens.value); + IPW_DEBUG_WX("Setting disassociate threshold to %d\n", 3*wrqu->sens.value); + mutex_lock(&priv->mutex); + + if (wrqu->sens.fixed == 0) + { + priv->roaming_threshold = IPW_MB_ROAMING_THRESHOLD_DEFAULT; + priv->disassociate_threshold = IPW_MB_DISASSOCIATE_THRESHOLD_DEFAULT; + goto out; + } + if ((wrqu->sens.value > IPW_MB_ROAMING_THRESHOLD_MAX) || + (wrqu->sens.value < IPW_MB_ROAMING_THRESHOLD_MIN)) { + err = -EINVAL; + goto out; + } + + priv->roaming_threshold = wrqu->sens.value; + priv->disassociate_threshold = 3*wrqu->sens.value; + out: + mutex_unlock(&priv->mutex); + return err; +} + +static int ipw_wx_get_sens(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + mutex_lock(&priv->mutex); + wrqu->sens.fixed = 1; + wrqu->sens.value = priv->roaming_threshold; + mutex_unlock(&priv->mutex); + + IPW_DEBUG_WX("GET roaming threshold -> %s %d\n", + wrqu->power.disabled ? "OFF" : "ON", wrqu->power.value); + + return 0; +} + +static int ipw_wx_set_rate(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + /* TODO: We should use semaphores or locks for access to priv */ + struct ipw_priv *priv = libipw_priv(dev); + u32 target_rate = wrqu->bitrate.value; + u32 fixed, mask; + + /* value = -1, fixed = 0 means auto only, so we should use all rates offered by AP */ + /* value = X, fixed = 1 means only rate X */ + /* value = X, fixed = 0 means all rates lower equal X */ + + if (target_rate == -1) { + fixed = 0; + mask = LIBIPW_DEFAULT_RATES_MASK; + /* Now we should reassociate */ + goto apply; + } + + mask = 0; + fixed = wrqu->bitrate.fixed; + + if (target_rate == 1000000 || !fixed) + mask |= LIBIPW_CCK_RATE_1MB_MASK; + if (target_rate == 1000000) + goto apply; + + if (target_rate == 2000000 || !fixed) + mask |= LIBIPW_CCK_RATE_2MB_MASK; + if (target_rate == 2000000) + goto apply; + + if (target_rate == 5500000 || !fixed) + mask |= LIBIPW_CCK_RATE_5MB_MASK; + if (target_rate == 5500000) + goto apply; + + if (target_rate == 6000000 || !fixed) + mask |= LIBIPW_OFDM_RATE_6MB_MASK; + if (target_rate == 6000000) + goto apply; + + if (target_rate == 9000000 || !fixed) + mask |= LIBIPW_OFDM_RATE_9MB_MASK; + if (target_rate == 9000000) + goto apply; + + if (target_rate == 11000000 || !fixed) + mask |= LIBIPW_CCK_RATE_11MB_MASK; + if (target_rate == 11000000) + goto apply; + + if (target_rate == 12000000 || !fixed) + mask |= LIBIPW_OFDM_RATE_12MB_MASK; + if (target_rate == 12000000) + goto apply; + + if (target_rate == 18000000 || !fixed) + mask |= LIBIPW_OFDM_RATE_18MB_MASK; + if (target_rate == 18000000) + goto apply; + + if (target_rate == 24000000 || !fixed) + mask |= LIBIPW_OFDM_RATE_24MB_MASK; + if (target_rate == 24000000) + goto apply; + + if (target_rate == 36000000 || !fixed) + mask |= LIBIPW_OFDM_RATE_36MB_MASK; + if (target_rate == 36000000) + goto apply; + + if (target_rate == 48000000 || !fixed) + mask |= LIBIPW_OFDM_RATE_48MB_MASK; + if (target_rate == 48000000) + goto apply; + + if (target_rate == 54000000 || !fixed) + mask |= LIBIPW_OFDM_RATE_54MB_MASK; + if (target_rate == 54000000) + goto apply; + + IPW_DEBUG_WX("invalid rate specified, returning error\n"); + return -EINVAL; + + apply: + IPW_DEBUG_WX("Setting rate mask to 0x%08X [%s]\n", + mask, fixed ? "fixed" : "sub-rates"); + mutex_lock(&priv->mutex); + if (mask == LIBIPW_DEFAULT_RATES_MASK) { + priv->config &= ~CFG_FIXED_RATE; + ipw_set_fixed_rate(priv, priv->ieee->mode); + } else + priv->config |= CFG_FIXED_RATE; + + if (priv->rates_mask == mask) { + IPW_DEBUG_WX("Mask set to current mask.\n"); + mutex_unlock(&priv->mutex); + return 0; + } + + priv->rates_mask = mask; + + /* Network configuration changed -- force [re]association */ + IPW_DEBUG_ASSOC("[re]association triggered due to rates change.\n"); + if (!ipw_disassociate(priv)) + ipw_associate(priv); + + mutex_unlock(&priv->mutex); + return 0; +} + +static int ipw_wx_get_rate(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + mutex_lock(&priv->mutex); + wrqu->bitrate.value = priv->last_rate; + wrqu->bitrate.fixed = (priv->config & CFG_FIXED_RATE) ? 1 : 0; + mutex_unlock(&priv->mutex); + IPW_DEBUG_WX("GET Rate -> %d\n", wrqu->bitrate.value); + return 0; +} + +static int ipw_wx_set_rts(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + mutex_lock(&priv->mutex); + if (wrqu->rts.disabled || !wrqu->rts.fixed) + priv->rts_threshold = DEFAULT_RTS_THRESHOLD; + else { + if (wrqu->rts.value < MIN_RTS_THRESHOLD || + wrqu->rts.value > MAX_RTS_THRESHOLD) { + mutex_unlock(&priv->mutex); + return -EINVAL; + } + priv->rts_threshold = wrqu->rts.value; + } + + ipw_send_rts_threshold(priv, priv->rts_threshold); + mutex_unlock(&priv->mutex); + IPW_DEBUG_WX("SET RTS Threshold -> %d\n", priv->rts_threshold); + return 0; +} + +static int ipw_wx_get_rts(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + mutex_lock(&priv->mutex); + wrqu->rts.value = priv->rts_threshold; + wrqu->rts.fixed = 0; /* no auto select */ + wrqu->rts.disabled = (wrqu->rts.value == DEFAULT_RTS_THRESHOLD); + mutex_unlock(&priv->mutex); + IPW_DEBUG_WX("GET RTS Threshold -> %d\n", wrqu->rts.value); + return 0; +} + +static int ipw_wx_set_txpow(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + int err = 0; + + mutex_lock(&priv->mutex); + if (ipw_radio_kill_sw(priv, wrqu->power.disabled)) { + err = -EINPROGRESS; + goto out; + } + + if (!wrqu->power.fixed) + wrqu->power.value = IPW_TX_POWER_DEFAULT; + + if (wrqu->power.flags != IW_TXPOW_DBM) { + err = -EINVAL; + goto out; + } + + if ((wrqu->power.value > IPW_TX_POWER_MAX) || + (wrqu->power.value < IPW_TX_POWER_MIN)) { + err = -EINVAL; + goto out; + } + + priv->tx_power = wrqu->power.value; + err = ipw_set_tx_power(priv); + out: + mutex_unlock(&priv->mutex); + return err; +} + +static int ipw_wx_get_txpow(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + mutex_lock(&priv->mutex); + wrqu->power.value = priv->tx_power; + wrqu->power.fixed = 1; + wrqu->power.flags = IW_TXPOW_DBM; + wrqu->power.disabled = (priv->status & STATUS_RF_KILL_MASK) ? 1 : 0; + mutex_unlock(&priv->mutex); + + IPW_DEBUG_WX("GET TX Power -> %s %d\n", + wrqu->power.disabled ? "OFF" : "ON", wrqu->power.value); + + return 0; +} + +static int ipw_wx_set_frag(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + mutex_lock(&priv->mutex); + if (wrqu->frag.disabled || !wrqu->frag.fixed) + priv->ieee->fts = DEFAULT_FTS; + else { + if (wrqu->frag.value < MIN_FRAG_THRESHOLD || + wrqu->frag.value > MAX_FRAG_THRESHOLD) { + mutex_unlock(&priv->mutex); + return -EINVAL; + } + + priv->ieee->fts = wrqu->frag.value & ~0x1; + } + + ipw_send_frag_threshold(priv, wrqu->frag.value); + mutex_unlock(&priv->mutex); + IPW_DEBUG_WX("SET Frag Threshold -> %d\n", wrqu->frag.value); + return 0; +} + +static int ipw_wx_get_frag(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + mutex_lock(&priv->mutex); + wrqu->frag.value = priv->ieee->fts; + wrqu->frag.fixed = 0; /* no auto select */ + wrqu->frag.disabled = (wrqu->frag.value == DEFAULT_FTS); + mutex_unlock(&priv->mutex); + IPW_DEBUG_WX("GET Frag Threshold -> %d\n", wrqu->frag.value); + + return 0; +} + +static int ipw_wx_set_retry(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + + if (wrqu->retry.flags & IW_RETRY_LIFETIME || wrqu->retry.disabled) + return -EINVAL; + + if (!(wrqu->retry.flags & IW_RETRY_LIMIT)) + return 0; + + if (wrqu->retry.value < 0 || wrqu->retry.value >= 255) + return -EINVAL; + + mutex_lock(&priv->mutex); + if (wrqu->retry.flags & IW_RETRY_SHORT) + priv->short_retry_limit = (u8) wrqu->retry.value; + else if (wrqu->retry.flags & IW_RETRY_LONG) + priv->long_retry_limit = (u8) wrqu->retry.value; + else { + priv->short_retry_limit = (u8) wrqu->retry.value; + priv->long_retry_limit = (u8) wrqu->retry.value; + } + + ipw_send_retry_limit(priv, priv->short_retry_limit, + priv->long_retry_limit); + mutex_unlock(&priv->mutex); + IPW_DEBUG_WX("SET retry limit -> short:%d long:%d\n", + priv->short_retry_limit, priv->long_retry_limit); + return 0; +} + +static int ipw_wx_get_retry(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + + mutex_lock(&priv->mutex); + wrqu->retry.disabled = 0; + + if ((wrqu->retry.flags & IW_RETRY_TYPE) == IW_RETRY_LIFETIME) { + mutex_unlock(&priv->mutex); + return -EINVAL; + } + + if (wrqu->retry.flags & IW_RETRY_LONG) { + wrqu->retry.flags = IW_RETRY_LIMIT | IW_RETRY_LONG; + wrqu->retry.value = priv->long_retry_limit; + } else if (wrqu->retry.flags & IW_RETRY_SHORT) { + wrqu->retry.flags = IW_RETRY_LIMIT | IW_RETRY_SHORT; + wrqu->retry.value = priv->short_retry_limit; + } else { + wrqu->retry.flags = IW_RETRY_LIMIT; + wrqu->retry.value = priv->short_retry_limit; + } + mutex_unlock(&priv->mutex); + + IPW_DEBUG_WX("GET retry -> %d\n", wrqu->retry.value); + + return 0; +} + +static int ipw_wx_set_scan(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + struct iw_scan_req *req = (struct iw_scan_req *)extra; + struct delayed_work *work = NULL; + + mutex_lock(&priv->mutex); + + priv->user_requested_scan = 1; + + if (wrqu->data.length == sizeof(struct iw_scan_req)) { + if (wrqu->data.flags & IW_SCAN_THIS_ESSID) { + int len = min((int)req->essid_len, + (int)sizeof(priv->direct_scan_ssid)); + memcpy(priv->direct_scan_ssid, req->essid, len); + priv->direct_scan_ssid_len = len; + work = &priv->request_direct_scan; + } else if (req->scan_type == IW_SCAN_TYPE_PASSIVE) { + work = &priv->request_passive_scan; + } + } else { + /* Normal active broadcast scan */ + work = &priv->request_scan; + } + + mutex_unlock(&priv->mutex); + + IPW_DEBUG_WX("Start scan\n"); + + schedule_delayed_work(work, 0); + + return 0; +} + +static int ipw_wx_get_scan(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + return libipw_wx_get_scan(priv->ieee, info, wrqu, extra); +} + +static int ipw_wx_set_encode(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *key) +{ + struct ipw_priv *priv = libipw_priv(dev); + int ret; + u32 cap = priv->capability; + + mutex_lock(&priv->mutex); + ret = libipw_wx_set_encode(priv->ieee, info, wrqu, key); + + /* In IBSS mode, we need to notify the firmware to update + * the beacon info after we changed the capability. */ + if (cap != priv->capability && + priv->ieee->iw_mode == IW_MODE_ADHOC && + priv->status & STATUS_ASSOCIATED) + ipw_disassociate(priv); + + mutex_unlock(&priv->mutex); + return ret; +} + +static int ipw_wx_get_encode(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *key) +{ + struct ipw_priv *priv = libipw_priv(dev); + return libipw_wx_get_encode(priv->ieee, info, wrqu, key); +} + +static int ipw_wx_set_power(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + int err; + mutex_lock(&priv->mutex); + if (wrqu->power.disabled) { + priv->power_mode = IPW_POWER_LEVEL(priv->power_mode); + err = ipw_send_power_mode(priv, IPW_POWER_MODE_CAM); + if (err) { + IPW_DEBUG_WX("failed setting power mode.\n"); + mutex_unlock(&priv->mutex); + return err; + } + IPW_DEBUG_WX("SET Power Management Mode -> off\n"); + mutex_unlock(&priv->mutex); + return 0; + } + + switch (wrqu->power.flags & IW_POWER_MODE) { + case IW_POWER_ON: /* If not specified */ + case IW_POWER_MODE: /* If set all mask */ + case IW_POWER_ALL_R: /* If explicitly state all */ + break; + default: /* Otherwise we don't support it */ + IPW_DEBUG_WX("SET PM Mode: %X not supported.\n", + wrqu->power.flags); + mutex_unlock(&priv->mutex); + return -EOPNOTSUPP; + } + + /* If the user hasn't specified a power management mode yet, default + * to BATTERY */ + if (IPW_POWER_LEVEL(priv->power_mode) == IPW_POWER_AC) + priv->power_mode = IPW_POWER_ENABLED | IPW_POWER_BATTERY; + else + priv->power_mode = IPW_POWER_ENABLED | priv->power_mode; + + err = ipw_send_power_mode(priv, IPW_POWER_LEVEL(priv->power_mode)); + if (err) { + IPW_DEBUG_WX("failed setting power mode.\n"); + mutex_unlock(&priv->mutex); + return err; + } + + IPW_DEBUG_WX("SET Power Management Mode -> 0x%02X\n", priv->power_mode); + mutex_unlock(&priv->mutex); + return 0; +} + +static int ipw_wx_get_power(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + mutex_lock(&priv->mutex); + if (!(priv->power_mode & IPW_POWER_ENABLED)) + wrqu->power.disabled = 1; + else + wrqu->power.disabled = 0; + + mutex_unlock(&priv->mutex); + IPW_DEBUG_WX("GET Power Management Mode -> %02X\n", priv->power_mode); + + return 0; +} + +static int ipw_wx_set_powermode(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + int mode = *(int *)extra; + int err; + + mutex_lock(&priv->mutex); + if ((mode < 1) || (mode > IPW_POWER_LIMIT)) + mode = IPW_POWER_AC; + + if (IPW_POWER_LEVEL(priv->power_mode) != mode) { + err = ipw_send_power_mode(priv, mode); + if (err) { + IPW_DEBUG_WX("failed setting power mode.\n"); + mutex_unlock(&priv->mutex); + return err; + } + priv->power_mode = IPW_POWER_ENABLED | mode; + } + mutex_unlock(&priv->mutex); + return 0; +} + +#define MAX_WX_STRING 80 +static int ipw_wx_get_powermode(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + int level = IPW_POWER_LEVEL(priv->power_mode); + char *p = extra; + + p += snprintf(p, MAX_WX_STRING, "Power save level: %d ", level); + + switch (level) { + case IPW_POWER_AC: + p += snprintf(p, MAX_WX_STRING - (p - extra), "(AC)"); + break; + case IPW_POWER_BATTERY: + p += snprintf(p, MAX_WX_STRING - (p - extra), "(BATTERY)"); + break; + default: + p += snprintf(p, MAX_WX_STRING - (p - extra), + "(Timeout %dms, Period %dms)", + timeout_duration[level - 1] / 1000, + period_duration[level - 1] / 1000); + } + + if (!(priv->power_mode & IPW_POWER_ENABLED)) + p += snprintf(p, MAX_WX_STRING - (p - extra), " OFF"); + + wrqu->data.length = p - extra + 1; + + return 0; +} + +static int ipw_wx_set_wireless_mode(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + int mode = *(int *)extra; + u8 band = 0, modulation = 0; + + if (mode == 0 || mode & ~IEEE_MODE_MASK) { + IPW_WARNING("Attempt to set invalid wireless mode: %d\n", mode); + return -EINVAL; + } + mutex_lock(&priv->mutex); + if (priv->adapter == IPW_2915ABG) { + priv->ieee->abg_true = 1; + if (mode & IEEE_A) { + band |= LIBIPW_52GHZ_BAND; + modulation |= LIBIPW_OFDM_MODULATION; + } else + priv->ieee->abg_true = 0; + } else { + if (mode & IEEE_A) { + IPW_WARNING("Attempt to set 2200BG into " + "802.11a mode\n"); + mutex_unlock(&priv->mutex); + return -EINVAL; + } + + priv->ieee->abg_true = 0; + } + + if (mode & IEEE_B) { + band |= LIBIPW_24GHZ_BAND; + modulation |= LIBIPW_CCK_MODULATION; + } else + priv->ieee->abg_true = 0; + + if (mode & IEEE_G) { + band |= LIBIPW_24GHZ_BAND; + modulation |= LIBIPW_OFDM_MODULATION; + } else + priv->ieee->abg_true = 0; + + priv->ieee->mode = mode; + priv->ieee->freq_band = band; + priv->ieee->modulation = modulation; + init_supported_rates(priv, &priv->rates); + + /* Network configuration changed -- force [re]association */ + IPW_DEBUG_ASSOC("[re]association triggered due to mode change.\n"); + if (!ipw_disassociate(priv)) { + ipw_send_supported_rates(priv, &priv->rates); + ipw_associate(priv); + } + + /* Update the band LEDs */ + ipw_led_band_on(priv); + + IPW_DEBUG_WX("PRIV SET MODE: %c%c%c\n", + mode & IEEE_A ? 'a' : '.', + mode & IEEE_B ? 'b' : '.', mode & IEEE_G ? 'g' : '.'); + mutex_unlock(&priv->mutex); + return 0; +} + +static int ipw_wx_get_wireless_mode(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + mutex_lock(&priv->mutex); + switch (priv->ieee->mode) { + case IEEE_A: + strncpy(extra, "802.11a (1)", MAX_WX_STRING); + break; + case IEEE_B: + strncpy(extra, "802.11b (2)", MAX_WX_STRING); + break; + case IEEE_A | IEEE_B: + strncpy(extra, "802.11ab (3)", MAX_WX_STRING); + break; + case IEEE_G: + strncpy(extra, "802.11g (4)", MAX_WX_STRING); + break; + case IEEE_A | IEEE_G: + strncpy(extra, "802.11ag (5)", MAX_WX_STRING); + break; + case IEEE_B | IEEE_G: + strncpy(extra, "802.11bg (6)", MAX_WX_STRING); + break; + case IEEE_A | IEEE_B | IEEE_G: + strncpy(extra, "802.11abg (7)", MAX_WX_STRING); + break; + default: + strncpy(extra, "unknown", MAX_WX_STRING); + break; + } + extra[MAX_WX_STRING - 1] = '\0'; + + IPW_DEBUG_WX("PRIV GET MODE: %s\n", extra); + + wrqu->data.length = strlen(extra) + 1; + mutex_unlock(&priv->mutex); + + return 0; +} + +static int ipw_wx_set_preamble(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + int mode = *(int *)extra; + mutex_lock(&priv->mutex); + /* Switching from SHORT -> LONG requires a disassociation */ + if (mode == 1) { + if (!(priv->config & CFG_PREAMBLE_LONG)) { + priv->config |= CFG_PREAMBLE_LONG; + + /* Network configuration changed -- force [re]association */ + IPW_DEBUG_ASSOC + ("[re]association triggered due to preamble change.\n"); + if (!ipw_disassociate(priv)) + ipw_associate(priv); + } + goto done; + } + + if (mode == 0) { + priv->config &= ~CFG_PREAMBLE_LONG; + goto done; + } + mutex_unlock(&priv->mutex); + return -EINVAL; + + done: + mutex_unlock(&priv->mutex); + return 0; +} + +static int ipw_wx_get_preamble(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + mutex_lock(&priv->mutex); + if (priv->config & CFG_PREAMBLE_LONG) + snprintf(wrqu->name, IFNAMSIZ, "long (1)"); + else + snprintf(wrqu->name, IFNAMSIZ, "auto (0)"); + mutex_unlock(&priv->mutex); + return 0; +} + +#ifdef CONFIG_IPW2200_MONITOR +static int ipw_wx_set_monitor(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + int *parms = (int *)extra; + int enable = (parms[0] > 0); + mutex_lock(&priv->mutex); + IPW_DEBUG_WX("SET MONITOR: %d %d\n", enable, parms[1]); + if (enable) { + if (priv->ieee->iw_mode != IW_MODE_MONITOR) { +#ifdef CONFIG_IPW2200_RADIOTAP + priv->net_dev->type = ARPHRD_IEEE80211_RADIOTAP; +#else + priv->net_dev->type = ARPHRD_IEEE80211; +#endif + schedule_work(&priv->adapter_restart); + } + + ipw_set_channel(priv, parms[1]); + } else { + if (priv->ieee->iw_mode != IW_MODE_MONITOR) { + mutex_unlock(&priv->mutex); + return 0; + } + priv->net_dev->type = ARPHRD_ETHER; + schedule_work(&priv->adapter_restart); + } + mutex_unlock(&priv->mutex); + return 0; +} + +#endif /* CONFIG_IPW2200_MONITOR */ + +static int ipw_wx_reset(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + IPW_DEBUG_WX("RESET\n"); + schedule_work(&priv->adapter_restart); + return 0; +} + +static int ipw_wx_sw_reset(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + struct ipw_priv *priv = libipw_priv(dev); + union iwreq_data wrqu_sec = { + .encoding = { + .flags = IW_ENCODE_DISABLED, + }, + }; + int ret; + + IPW_DEBUG_WX("SW_RESET\n"); + + mutex_lock(&priv->mutex); + + ret = ipw_sw_reset(priv, 2); + if (!ret) { + free_firmware(); + ipw_adapter_restart(priv); + } + + /* The SW reset bit might have been toggled on by the 'disable' + * module parameter, so take appropriate action */ + ipw_radio_kill_sw(priv, priv->status & STATUS_RF_KILL_SW); + + mutex_unlock(&priv->mutex); + libipw_wx_set_encode(priv->ieee, info, &wrqu_sec, NULL); + mutex_lock(&priv->mutex); + + if (!(priv->status & STATUS_RF_KILL_MASK)) { + /* Configuration likely changed -- force [re]association */ + IPW_DEBUG_ASSOC("[re]association triggered due to sw " + "reset.\n"); + if (!ipw_disassociate(priv)) + ipw_associate(priv); + } + + mutex_unlock(&priv->mutex); + + return 0; +} + +/* Rebase the WE IOCTLs to zero for the handler array */ +static iw_handler ipw_wx_handlers[] = { + IW_HANDLER(SIOCGIWNAME, (iw_handler)cfg80211_wext_giwname), + IW_HANDLER(SIOCSIWFREQ, ipw_wx_set_freq), + IW_HANDLER(SIOCGIWFREQ, ipw_wx_get_freq), + IW_HANDLER(SIOCSIWMODE, ipw_wx_set_mode), + IW_HANDLER(SIOCGIWMODE, ipw_wx_get_mode), + IW_HANDLER(SIOCSIWSENS, ipw_wx_set_sens), + IW_HANDLER(SIOCGIWSENS, ipw_wx_get_sens), + IW_HANDLER(SIOCGIWRANGE, ipw_wx_get_range), + IW_HANDLER(SIOCSIWAP, ipw_wx_set_wap), + IW_HANDLER(SIOCGIWAP, ipw_wx_get_wap), + IW_HANDLER(SIOCSIWSCAN, ipw_wx_set_scan), + IW_HANDLER(SIOCGIWSCAN, ipw_wx_get_scan), + IW_HANDLER(SIOCSIWESSID, ipw_wx_set_essid), + IW_HANDLER(SIOCGIWESSID, ipw_wx_get_essid), + IW_HANDLER(SIOCSIWNICKN, ipw_wx_set_nick), + IW_HANDLER(SIOCGIWNICKN, ipw_wx_get_nick), + IW_HANDLER(SIOCSIWRATE, ipw_wx_set_rate), + IW_HANDLER(SIOCGIWRATE, ipw_wx_get_rate), + IW_HANDLER(SIOCSIWRTS, ipw_wx_set_rts), + IW_HANDLER(SIOCGIWRTS, ipw_wx_get_rts), + IW_HANDLER(SIOCSIWFRAG, ipw_wx_set_frag), + IW_HANDLER(SIOCGIWFRAG, ipw_wx_get_frag), + IW_HANDLER(SIOCSIWTXPOW, ipw_wx_set_txpow), + IW_HANDLER(SIOCGIWTXPOW, ipw_wx_get_txpow), + IW_HANDLER(SIOCSIWRETRY, ipw_wx_set_retry), + IW_HANDLER(SIOCGIWRETRY, ipw_wx_get_retry), + IW_HANDLER(SIOCSIWENCODE, ipw_wx_set_encode), + IW_HANDLER(SIOCGIWENCODE, ipw_wx_get_encode), + IW_HANDLER(SIOCSIWPOWER, ipw_wx_set_power), + IW_HANDLER(SIOCGIWPOWER, ipw_wx_get_power), + IW_HANDLER(SIOCSIWSPY, iw_handler_set_spy), + IW_HANDLER(SIOCGIWSPY, iw_handler_get_spy), + IW_HANDLER(SIOCSIWTHRSPY, iw_handler_set_thrspy), + IW_HANDLER(SIOCGIWTHRSPY, iw_handler_get_thrspy), + IW_HANDLER(SIOCSIWGENIE, ipw_wx_set_genie), + IW_HANDLER(SIOCGIWGENIE, ipw_wx_get_genie), + IW_HANDLER(SIOCSIWMLME, ipw_wx_set_mlme), + IW_HANDLER(SIOCSIWAUTH, ipw_wx_set_auth), + IW_HANDLER(SIOCGIWAUTH, ipw_wx_get_auth), + IW_HANDLER(SIOCSIWENCODEEXT, ipw_wx_set_encodeext), + IW_HANDLER(SIOCGIWENCODEEXT, ipw_wx_get_encodeext), +}; + +enum { + IPW_PRIV_SET_POWER = SIOCIWFIRSTPRIV, + IPW_PRIV_GET_POWER, + IPW_PRIV_SET_MODE, + IPW_PRIV_GET_MODE, + IPW_PRIV_SET_PREAMBLE, + IPW_PRIV_GET_PREAMBLE, + IPW_PRIV_RESET, + IPW_PRIV_SW_RESET, +#ifdef CONFIG_IPW2200_MONITOR + IPW_PRIV_SET_MONITOR, +#endif +}; + +static struct iw_priv_args ipw_priv_args[] = { + { + .cmd = IPW_PRIV_SET_POWER, + .set_args = IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + .name = "set_power"}, + { + .cmd = IPW_PRIV_GET_POWER, + .get_args = IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | MAX_WX_STRING, + .name = "get_power"}, + { + .cmd = IPW_PRIV_SET_MODE, + .set_args = IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + .name = "set_mode"}, + { + .cmd = IPW_PRIV_GET_MODE, + .get_args = IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | MAX_WX_STRING, + .name = "get_mode"}, + { + .cmd = IPW_PRIV_SET_PREAMBLE, + .set_args = IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + .name = "set_preamble"}, + { + .cmd = IPW_PRIV_GET_PREAMBLE, + .get_args = IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_FIXED | IFNAMSIZ, + .name = "get_preamble"}, + { + IPW_PRIV_RESET, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 0, 0, "reset"}, + { + IPW_PRIV_SW_RESET, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 0, 0, "sw_reset"}, +#ifdef CONFIG_IPW2200_MONITOR + { + IPW_PRIV_SET_MONITOR, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2, 0, "monitor"}, +#endif /* CONFIG_IPW2200_MONITOR */ +}; + +static iw_handler ipw_priv_handler[] = { + ipw_wx_set_powermode, + ipw_wx_get_powermode, + ipw_wx_set_wireless_mode, + ipw_wx_get_wireless_mode, + ipw_wx_set_preamble, + ipw_wx_get_preamble, + ipw_wx_reset, + ipw_wx_sw_reset, +#ifdef CONFIG_IPW2200_MONITOR + ipw_wx_set_monitor, +#endif +}; + +static const struct iw_handler_def ipw_wx_handler_def = { + .standard = ipw_wx_handlers, + .num_standard = ARRAY_SIZE(ipw_wx_handlers), + .num_private = ARRAY_SIZE(ipw_priv_handler), + .num_private_args = ARRAY_SIZE(ipw_priv_args), + .private = ipw_priv_handler, + .private_args = ipw_priv_args, + .get_wireless_stats = ipw_get_wireless_stats, +}; + +/* + * Get wireless statistics. + * Called by /proc/net/wireless + * Also called by SIOCGIWSTATS + */ +static struct iw_statistics *ipw_get_wireless_stats(struct net_device *dev) +{ + struct ipw_priv *priv = libipw_priv(dev); + struct iw_statistics *wstats; + + wstats = &priv->wstats; + + /* if hw is disabled, then ipw_get_ordinal() can't be called. + * netdev->get_wireless_stats seems to be called before fw is + * initialized. STATUS_ASSOCIATED will only be set if the hw is up + * and associated; if not associcated, the values are all meaningless + * anyway, so set them all to NULL and INVALID */ + if (!(priv->status & STATUS_ASSOCIATED)) { + wstats->miss.beacon = 0; + wstats->discard.retries = 0; + wstats->qual.qual = 0; + wstats->qual.level = 0; + wstats->qual.noise = 0; + wstats->qual.updated = 7; + wstats->qual.updated |= IW_QUAL_NOISE_INVALID | + IW_QUAL_QUAL_INVALID | IW_QUAL_LEVEL_INVALID; + return wstats; + } + + wstats->qual.qual = priv->quality; + wstats->qual.level = priv->exp_avg_rssi; + wstats->qual.noise = priv->exp_avg_noise; + wstats->qual.updated = IW_QUAL_QUAL_UPDATED | IW_QUAL_LEVEL_UPDATED | + IW_QUAL_NOISE_UPDATED | IW_QUAL_DBM; + + wstats->miss.beacon = average_value(&priv->average_missed_beacons); + wstats->discard.retries = priv->last_tx_failures; + wstats->discard.code = priv->ieee->ieee_stats.rx_discards_undecryptable; + +/* if (ipw_get_ordinal(priv, IPW_ORD_STAT_TX_RETRY, &tx_retry, &len)) + goto fail_get_ordinal; + wstats->discard.retries += tx_retry; */ + + return wstats; +} + +/* net device stuff */ + +static void init_sys_config(struct ipw_sys_config *sys_config) +{ + memset(sys_config, 0, sizeof(struct ipw_sys_config)); + sys_config->bt_coexistence = 0; + sys_config->answer_broadcast_ssid_probe = 0; + sys_config->accept_all_data_frames = 0; + sys_config->accept_non_directed_frames = 1; + sys_config->exclude_unicast_unencrypted = 0; + sys_config->disable_unicast_decryption = 1; + sys_config->exclude_multicast_unencrypted = 0; + sys_config->disable_multicast_decryption = 1; + if (antenna < CFG_SYS_ANTENNA_BOTH || antenna > CFG_SYS_ANTENNA_B) + antenna = CFG_SYS_ANTENNA_BOTH; + sys_config->antenna_diversity = antenna; + sys_config->pass_crc_to_host = 0; /* TODO: See if 1 gives us FCS */ + sys_config->dot11g_auto_detection = 0; + sys_config->enable_cts_to_self = 0; + sys_config->bt_coexist_collision_thr = 0; + sys_config->pass_noise_stats_to_host = 1; /* 1 -- fix for 256 */ + sys_config->silence_threshold = 0x1e; +} + +static int ipw_net_open(struct net_device *dev) +{ + IPW_DEBUG_INFO("dev->open\n"); + netif_start_queue(dev); + return 0; +} + +static int ipw_net_stop(struct net_device *dev) +{ + IPW_DEBUG_INFO("dev->close\n"); + netif_stop_queue(dev); + return 0; +} + +/* +todo: + +modify to send one tfd per fragment instead of using chunking. otherwise +we need to heavily modify the libipw_skb_to_txb. +*/ + +static int ipw_tx_skb(struct ipw_priv *priv, struct libipw_txb *txb, + int pri) +{ + struct libipw_hdr_3addrqos *hdr = (struct libipw_hdr_3addrqos *) + txb->fragments[0]->data; + int i = 0; + struct tfd_frame *tfd; +#ifdef CONFIG_IPW2200_QOS + int tx_id = ipw_get_tx_queue_number(priv, pri); + struct clx2_tx_queue *txq = &priv->txq[tx_id]; +#else + struct clx2_tx_queue *txq = &priv->txq[0]; +#endif + struct clx2_queue *q = &txq->q; + u8 id, hdr_len, unicast; + int fc; + + if (!(priv->status & STATUS_ASSOCIATED)) + goto drop; + + hdr_len = libipw_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); + switch (priv->ieee->iw_mode) { + case IW_MODE_ADHOC: + unicast = !is_multicast_ether_addr(hdr->addr1); + id = ipw_find_station(priv, hdr->addr1); + if (id == IPW_INVALID_STATION) { + id = ipw_add_station(priv, hdr->addr1); + if (id == IPW_INVALID_STATION) { + IPW_WARNING("Attempt to send data to " + "invalid cell: %pM\n", + hdr->addr1); + goto drop; + } + } + break; + + case IW_MODE_INFRA: + default: + unicast = !is_multicast_ether_addr(hdr->addr3); + id = 0; + break; + } + + tfd = &txq->bd[q->first_empty]; + txq->txb[q->first_empty] = txb; + memset(tfd, 0, sizeof(*tfd)); + tfd->u.data.station_number = id; + + tfd->control_flags.message_type = TX_FRAME_TYPE; + tfd->control_flags.control_bits = TFD_NEED_IRQ_MASK; + + tfd->u.data.cmd_id = DINO_CMD_TX; + tfd->u.data.len = cpu_to_le16(txb->payload_size); + + if (priv->assoc_request.ieee_mode == IPW_B_MODE) + tfd->u.data.tx_flags_ext |= DCT_FLAG_EXT_MODE_CCK; + else + tfd->u.data.tx_flags_ext |= DCT_FLAG_EXT_MODE_OFDM; + + if (priv->assoc_request.preamble_length == DCT_FLAG_SHORT_PREAMBLE) + tfd->u.data.tx_flags |= DCT_FLAG_SHORT_PREAMBLE; + + fc = le16_to_cpu(hdr->frame_ctl); + hdr->frame_ctl = cpu_to_le16(fc & ~IEEE80211_FCTL_MOREFRAGS); + + memcpy(&tfd->u.data.tfd.tfd_24.mchdr, hdr, hdr_len); + + if (likely(unicast)) + tfd->u.data.tx_flags |= DCT_FLAG_ACK_REQD; + + if (txb->encrypted && !priv->ieee->host_encrypt) { + switch (priv->ieee->sec.level) { + case SEC_LEVEL_3: + tfd->u.data.tfd.tfd_24.mchdr.frame_ctl |= + cpu_to_le16(IEEE80211_FCTL_PROTECTED); + /* XXX: ACK flag must be set for CCMP even if it + * is a multicast/broadcast packet, because CCMP + * group communication encrypted by GTK is + * actually done by the AP. */ + if (!unicast) + tfd->u.data.tx_flags |= DCT_FLAG_ACK_REQD; + + tfd->u.data.tx_flags &= ~DCT_FLAG_NO_WEP; + tfd->u.data.tx_flags_ext |= DCT_FLAG_EXT_SECURITY_CCM; + tfd->u.data.key_index = 0; + tfd->u.data.key_index |= DCT_WEP_INDEX_USE_IMMEDIATE; + break; + case SEC_LEVEL_2: + tfd->u.data.tfd.tfd_24.mchdr.frame_ctl |= + cpu_to_le16(IEEE80211_FCTL_PROTECTED); + tfd->u.data.tx_flags &= ~DCT_FLAG_NO_WEP; + tfd->u.data.tx_flags_ext |= DCT_FLAG_EXT_SECURITY_TKIP; + tfd->u.data.key_index = DCT_WEP_INDEX_USE_IMMEDIATE; + break; + case SEC_LEVEL_1: + tfd->u.data.tfd.tfd_24.mchdr.frame_ctl |= + cpu_to_le16(IEEE80211_FCTL_PROTECTED); + tfd->u.data.key_index = priv->ieee->crypt_info.tx_keyidx; + if (priv->ieee->sec.key_sizes[priv->ieee->crypt_info.tx_keyidx] <= + 40) + tfd->u.data.key_index |= DCT_WEP_KEY_64Bit; + else + tfd->u.data.key_index |= DCT_WEP_KEY_128Bit; + break; + case SEC_LEVEL_0: + break; + default: + printk(KERN_ERR "Unknown security level %d\n", + priv->ieee->sec.level); + break; + } + } else + /* No hardware encryption */ + tfd->u.data.tx_flags |= DCT_FLAG_NO_WEP; + +#ifdef CONFIG_IPW2200_QOS + if (fc & IEEE80211_STYPE_QOS_DATA) + ipw_qos_set_tx_queue_command(priv, pri, &(tfd->u.data)); +#endif /* CONFIG_IPW2200_QOS */ + + /* payload */ + tfd->u.data.num_chunks = cpu_to_le32(min((u8) (NUM_TFD_CHUNKS - 2), + txb->nr_frags)); + IPW_DEBUG_FRAG("%i fragments being sent as %i chunks.\n", + txb->nr_frags, le32_to_cpu(tfd->u.data.num_chunks)); + for (i = 0; i < le32_to_cpu(tfd->u.data.num_chunks); i++) { + IPW_DEBUG_FRAG("Adding fragment %i of %i (%d bytes).\n", + i, le32_to_cpu(tfd->u.data.num_chunks), + txb->fragments[i]->len - hdr_len); + IPW_DEBUG_TX("Dumping TX packet frag %i of %i (%d bytes):\n", + i, tfd->u.data.num_chunks, + txb->fragments[i]->len - hdr_len); + printk_buf(IPW_DL_TX, txb->fragments[i]->data + hdr_len, + txb->fragments[i]->len - hdr_len); + + tfd->u.data.chunk_ptr[i] = + cpu_to_le32(pci_map_single + (priv->pci_dev, + txb->fragments[i]->data + hdr_len, + txb->fragments[i]->len - hdr_len, + PCI_DMA_TODEVICE)); + tfd->u.data.chunk_len[i] = + cpu_to_le16(txb->fragments[i]->len - hdr_len); + } + + if (i != txb->nr_frags) { + struct sk_buff *skb; + u16 remaining_bytes = 0; + int j; + + for (j = i; j < txb->nr_frags; j++) + remaining_bytes += txb->fragments[j]->len - hdr_len; + + printk(KERN_INFO "Trying to reallocate for %d bytes\n", + remaining_bytes); + skb = alloc_skb(remaining_bytes, GFP_ATOMIC); + if (skb != NULL) { + tfd->u.data.chunk_len[i] = cpu_to_le16(remaining_bytes); + for (j = i; j < txb->nr_frags; j++) { + int size = txb->fragments[j]->len - hdr_len; + + printk(KERN_INFO "Adding frag %d %d...\n", + j, size); + skb_put_data(skb, + txb->fragments[j]->data + hdr_len, + size); + } + dev_kfree_skb_any(txb->fragments[i]); + txb->fragments[i] = skb; + tfd->u.data.chunk_ptr[i] = + cpu_to_le32(pci_map_single + (priv->pci_dev, skb->data, + remaining_bytes, + PCI_DMA_TODEVICE)); + + le32_add_cpu(&tfd->u.data.num_chunks, 1); + } + } + + /* kick DMA */ + q->first_empty = ipw_queue_inc_wrap(q->first_empty, q->n_bd); + ipw_write32(priv, q->reg_w, q->first_empty); + + if (ipw_tx_queue_space(q) < q->high_mark) + netif_stop_queue(priv->net_dev); + + return NETDEV_TX_OK; + + drop: + IPW_DEBUG_DROP("Silently dropping Tx packet.\n"); + libipw_txb_free(txb); + return NETDEV_TX_OK; +} + +static int ipw_net_is_queue_full(struct net_device *dev, int pri) +{ + struct ipw_priv *priv = libipw_priv(dev); +#ifdef CONFIG_IPW2200_QOS + int tx_id = ipw_get_tx_queue_number(priv, pri); + struct clx2_tx_queue *txq = &priv->txq[tx_id]; +#else + struct clx2_tx_queue *txq = &priv->txq[0]; +#endif /* CONFIG_IPW2200_QOS */ + + if (ipw_tx_queue_space(&txq->q) < txq->q.high_mark) + return 1; + + return 0; +} + +#ifdef CONFIG_IPW2200_PROMISCUOUS +static void ipw_handle_promiscuous_tx(struct ipw_priv *priv, + struct libipw_txb *txb) +{ + struct libipw_rx_stats dummystats; + struct ieee80211_hdr *hdr; + u8 n; + u16 filter = priv->prom_priv->filter; + int hdr_only = 0; + + if (filter & IPW_PROM_NO_TX) + return; + + memset(&dummystats, 0, sizeof(dummystats)); + + /* Filtering of fragment chains is done against the first fragment */ + hdr = (void *)txb->fragments[0]->data; + if (libipw_is_management(le16_to_cpu(hdr->frame_control))) { + if (filter & IPW_PROM_NO_MGMT) + return; + if (filter & IPW_PROM_MGMT_HEADER_ONLY) + hdr_only = 1; + } else if (libipw_is_control(le16_to_cpu(hdr->frame_control))) { + if (filter & IPW_PROM_NO_CTL) + return; + if (filter & IPW_PROM_CTL_HEADER_ONLY) + hdr_only = 1; + } else if (libipw_is_data(le16_to_cpu(hdr->frame_control))) { + if (filter & IPW_PROM_NO_DATA) + return; + if (filter & IPW_PROM_DATA_HEADER_ONLY) + hdr_only = 1; + } + + for(n=0; nnr_frags; ++n) { + struct sk_buff *src = txb->fragments[n]; + struct sk_buff *dst; + struct ieee80211_radiotap_header *rt_hdr; + int len; + + if (hdr_only) { + hdr = (void *)src->data; + len = libipw_get_hdrlen(le16_to_cpu(hdr->frame_control)); + } else + len = src->len; + + dst = alloc_skb(len + sizeof(*rt_hdr) + sizeof(u16)*2, GFP_ATOMIC); + if (!dst) + continue; + + rt_hdr = skb_put(dst, sizeof(*rt_hdr)); + + rt_hdr->it_version = PKTHDR_RADIOTAP_VERSION; + rt_hdr->it_pad = 0; + rt_hdr->it_present = 0; /* after all, it's just an idea */ + rt_hdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_CHANNEL); + + *(__le16*)skb_put(dst, sizeof(u16)) = cpu_to_le16( + ieee80211chan2mhz(priv->channel)); + if (priv->channel > 14) /* 802.11a */ + *(__le16*)skb_put(dst, sizeof(u16)) = + cpu_to_le16(IEEE80211_CHAN_OFDM | + IEEE80211_CHAN_5GHZ); + else if (priv->ieee->mode == IEEE_B) /* 802.11b */ + *(__le16*)skb_put(dst, sizeof(u16)) = + cpu_to_le16(IEEE80211_CHAN_CCK | + IEEE80211_CHAN_2GHZ); + else /* 802.11g */ + *(__le16*)skb_put(dst, sizeof(u16)) = + cpu_to_le16(IEEE80211_CHAN_OFDM | + IEEE80211_CHAN_2GHZ); + + rt_hdr->it_len = cpu_to_le16(dst->len); + + skb_copy_from_linear_data(src, skb_put(dst, len), len); + + if (!libipw_rx(priv->prom_priv->ieee, dst, &dummystats)) + dev_kfree_skb_any(dst); + } +} +#endif + +static netdev_tx_t ipw_net_hard_start_xmit(struct libipw_txb *txb, + struct net_device *dev, int pri) +{ + struct ipw_priv *priv = libipw_priv(dev); + unsigned long flags; + netdev_tx_t ret; + + IPW_DEBUG_TX("dev->xmit(%d bytes)\n", txb->payload_size); + spin_lock_irqsave(&priv->lock, flags); + +#ifdef CONFIG_IPW2200_PROMISCUOUS + if (rtap_iface && netif_running(priv->prom_net_dev)) + ipw_handle_promiscuous_tx(priv, txb); +#endif + + ret = ipw_tx_skb(priv, txb, pri); + if (ret == NETDEV_TX_OK) + __ipw_led_activity_on(priv); + spin_unlock_irqrestore(&priv->lock, flags); + + return ret; +} + +static void ipw_net_set_multicast_list(struct net_device *dev) +{ + +} + +static int ipw_net_set_mac_address(struct net_device *dev, void *p) +{ + struct ipw_priv *priv = libipw_priv(dev); + struct sockaddr *addr = p; + + if (!is_valid_ether_addr(addr->sa_data)) + return -EADDRNOTAVAIL; + mutex_lock(&priv->mutex); + priv->config |= CFG_CUSTOM_MAC; + memcpy(priv->mac_addr, addr->sa_data, ETH_ALEN); + printk(KERN_INFO "%s: Setting MAC to %pM\n", + priv->net_dev->name, priv->mac_addr); + schedule_work(&priv->adapter_restart); + mutex_unlock(&priv->mutex); + return 0; +} + +static void ipw_ethtool_get_drvinfo(struct net_device *dev, + struct ethtool_drvinfo *info) +{ + struct ipw_priv *p = libipw_priv(dev); + char vers[64]; + char date[32]; + u32 len; + + strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); + strlcpy(info->version, DRV_VERSION, sizeof(info->version)); + + len = sizeof(vers); + ipw_get_ordinal(p, IPW_ORD_STAT_FW_VERSION, vers, &len); + len = sizeof(date); + ipw_get_ordinal(p, IPW_ORD_STAT_FW_DATE, date, &len); + + snprintf(info->fw_version, sizeof(info->fw_version), "%s (%s)", + vers, date); + strlcpy(info->bus_info, pci_name(p->pci_dev), + sizeof(info->bus_info)); +} + +static u32 ipw_ethtool_get_link(struct net_device *dev) +{ + struct ipw_priv *priv = libipw_priv(dev); + return (priv->status & STATUS_ASSOCIATED) != 0; +} + +static int ipw_ethtool_get_eeprom_len(struct net_device *dev) +{ + return IPW_EEPROM_IMAGE_SIZE; +} + +static int ipw_ethtool_get_eeprom(struct net_device *dev, + struct ethtool_eeprom *eeprom, u8 * bytes) +{ + struct ipw_priv *p = libipw_priv(dev); + + if (eeprom->offset + eeprom->len > IPW_EEPROM_IMAGE_SIZE) + return -EINVAL; + mutex_lock(&p->mutex); + memcpy(bytes, &p->eeprom[eeprom->offset], eeprom->len); + mutex_unlock(&p->mutex); + return 0; +} + +static int ipw_ethtool_set_eeprom(struct net_device *dev, + struct ethtool_eeprom *eeprom, u8 * bytes) +{ + struct ipw_priv *p = libipw_priv(dev); + int i; + + if (eeprom->offset + eeprom->len > IPW_EEPROM_IMAGE_SIZE) + return -EINVAL; + mutex_lock(&p->mutex); + memcpy(&p->eeprom[eeprom->offset], bytes, eeprom->len); + for (i = 0; i < IPW_EEPROM_IMAGE_SIZE; i++) + ipw_write8(p, i + IPW_EEPROM_DATA, p->eeprom[i]); + mutex_unlock(&p->mutex); + return 0; +} + +static const struct ethtool_ops ipw_ethtool_ops = { + .get_link = ipw_ethtool_get_link, + .get_drvinfo = ipw_ethtool_get_drvinfo, + .get_eeprom_len = ipw_ethtool_get_eeprom_len, + .get_eeprom = ipw_ethtool_get_eeprom, + .set_eeprom = ipw_ethtool_set_eeprom, +}; + +static irqreturn_t ipw_isr(int irq, void *data) +{ + struct ipw_priv *priv = data; + u32 inta, inta_mask; + + if (!priv) + return IRQ_NONE; + + spin_lock(&priv->irq_lock); + + if (!(priv->status & STATUS_INT_ENABLED)) { + /* IRQ is disabled */ + goto none; + } + + inta = ipw_read32(priv, IPW_INTA_RW); + inta_mask = ipw_read32(priv, IPW_INTA_MASK_R); + + if (inta == 0xFFFFFFFF) { + /* Hardware disappeared */ + IPW_WARNING("IRQ INTA == 0xFFFFFFFF\n"); + goto none; + } + + if (!(inta & (IPW_INTA_MASK_ALL & inta_mask))) { + /* Shared interrupt */ + goto none; + } + + /* tell the device to stop sending interrupts */ + __ipw_disable_interrupts(priv); + + /* ack current interrupts */ + inta &= (IPW_INTA_MASK_ALL & inta_mask); + ipw_write32(priv, IPW_INTA_RW, inta); + + /* Cache INTA value for our tasklet */ + priv->isr_inta = inta; + + tasklet_schedule(&priv->irq_tasklet); + + spin_unlock(&priv->irq_lock); + + return IRQ_HANDLED; + none: + spin_unlock(&priv->irq_lock); + return IRQ_NONE; +} + +static void ipw_rf_kill(void *adapter) +{ + struct ipw_priv *priv = adapter; + unsigned long flags; + + spin_lock_irqsave(&priv->lock, flags); + + if (rf_kill_active(priv)) { + IPW_DEBUG_RF_KILL("RF Kill active, rescheduling GPIO check\n"); + schedule_delayed_work(&priv->rf_kill, 2 * HZ); + goto exit_unlock; + } + + /* RF Kill is now disabled, so bring the device back up */ + + if (!(priv->status & STATUS_RF_KILL_MASK)) { + IPW_DEBUG_RF_KILL("HW RF Kill no longer active, restarting " + "device\n"); + + /* we can not do an adapter restart while inside an irq lock */ + schedule_work(&priv->adapter_restart); + } else + IPW_DEBUG_RF_KILL("HW RF Kill deactivated. SW RF Kill still " + "enabled\n"); + + exit_unlock: + spin_unlock_irqrestore(&priv->lock, flags); +} + +static void ipw_bg_rf_kill(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, rf_kill.work); + mutex_lock(&priv->mutex); + ipw_rf_kill(priv); + mutex_unlock(&priv->mutex); +} + +static void ipw_link_up(struct ipw_priv *priv) +{ + priv->last_seq_num = -1; + priv->last_frag_num = -1; + priv->last_packet_time = 0; + + netif_carrier_on(priv->net_dev); + + cancel_delayed_work(&priv->request_scan); + cancel_delayed_work(&priv->request_direct_scan); + cancel_delayed_work(&priv->request_passive_scan); + cancel_delayed_work(&priv->scan_event); + ipw_reset_stats(priv); + /* Ensure the rate is updated immediately */ + priv->last_rate = ipw_get_current_rate(priv); + ipw_gather_stats(priv); + ipw_led_link_up(priv); + notify_wx_assoc_event(priv); + + if (priv->config & CFG_BACKGROUND_SCAN) + schedule_delayed_work(&priv->request_scan, HZ); +} + +static void ipw_bg_link_up(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, link_up); + mutex_lock(&priv->mutex); + ipw_link_up(priv); + mutex_unlock(&priv->mutex); +} + +static void ipw_link_down(struct ipw_priv *priv) +{ + ipw_led_link_down(priv); + netif_carrier_off(priv->net_dev); + notify_wx_assoc_event(priv); + + /* Cancel any queued work ... */ + cancel_delayed_work(&priv->request_scan); + cancel_delayed_work(&priv->request_direct_scan); + cancel_delayed_work(&priv->request_passive_scan); + cancel_delayed_work(&priv->adhoc_check); + cancel_delayed_work(&priv->gather_stats); + + ipw_reset_stats(priv); + + if (!(priv->status & STATUS_EXIT_PENDING)) { + /* Queue up another scan... */ + schedule_delayed_work(&priv->request_scan, 0); + } else + cancel_delayed_work(&priv->scan_event); +} + +static void ipw_bg_link_down(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, link_down); + mutex_lock(&priv->mutex); + ipw_link_down(priv); + mutex_unlock(&priv->mutex); +} + +static int ipw_setup_deferred_work(struct ipw_priv *priv) +{ + int ret = 0; + + init_waitqueue_head(&priv->wait_command_queue); + init_waitqueue_head(&priv->wait_state); + + INIT_DELAYED_WORK(&priv->adhoc_check, ipw_bg_adhoc_check); + INIT_WORK(&priv->associate, ipw_bg_associate); + INIT_WORK(&priv->disassociate, ipw_bg_disassociate); + INIT_WORK(&priv->system_config, ipw_system_config); + INIT_WORK(&priv->rx_replenish, ipw_bg_rx_queue_replenish); + INIT_WORK(&priv->adapter_restart, ipw_bg_adapter_restart); + INIT_DELAYED_WORK(&priv->rf_kill, ipw_bg_rf_kill); + INIT_WORK(&priv->up, ipw_bg_up); + INIT_WORK(&priv->down, ipw_bg_down); + INIT_DELAYED_WORK(&priv->request_scan, ipw_request_scan); + INIT_DELAYED_WORK(&priv->request_direct_scan, ipw_request_direct_scan); + INIT_DELAYED_WORK(&priv->request_passive_scan, ipw_request_passive_scan); + INIT_DELAYED_WORK(&priv->scan_event, ipw_scan_event); + INIT_DELAYED_WORK(&priv->gather_stats, ipw_bg_gather_stats); + INIT_WORK(&priv->abort_scan, ipw_bg_abort_scan); + INIT_WORK(&priv->roam, ipw_bg_roam); + INIT_DELAYED_WORK(&priv->scan_check, ipw_bg_scan_check); + INIT_WORK(&priv->link_up, ipw_bg_link_up); + INIT_WORK(&priv->link_down, ipw_bg_link_down); + INIT_DELAYED_WORK(&priv->led_link_on, ipw_bg_led_link_on); + INIT_DELAYED_WORK(&priv->led_link_off, ipw_bg_led_link_off); + INIT_DELAYED_WORK(&priv->led_act_off, ipw_bg_led_activity_off); + INIT_WORK(&priv->merge_networks, ipw_merge_adhoc_network); + +#ifdef CONFIG_IPW2200_QOS + INIT_WORK(&priv->qos_activate, ipw_bg_qos_activate); +#endif /* CONFIG_IPW2200_QOS */ + + tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) + ipw_irq_tasklet, (unsigned long)priv); + + return ret; +} + +static void shim__set_security(struct net_device *dev, + struct libipw_security *sec) +{ + struct ipw_priv *priv = libipw_priv(dev); + int i; + for (i = 0; i < 4; i++) { + if (sec->flags & (1 << i)) { + priv->ieee->sec.encode_alg[i] = sec->encode_alg[i]; + priv->ieee->sec.key_sizes[i] = sec->key_sizes[i]; + if (sec->key_sizes[i] == 0) + priv->ieee->sec.flags &= ~(1 << i); + else { + memcpy(priv->ieee->sec.keys[i], sec->keys[i], + sec->key_sizes[i]); + priv->ieee->sec.flags |= (1 << i); + } + priv->status |= STATUS_SECURITY_UPDATED; + } else if (sec->level != SEC_LEVEL_1) + priv->ieee->sec.flags &= ~(1 << i); + } + + if (sec->flags & SEC_ACTIVE_KEY) { + if (sec->active_key <= 3) { + priv->ieee->sec.active_key = sec->active_key; + priv->ieee->sec.flags |= SEC_ACTIVE_KEY; + } else + priv->ieee->sec.flags &= ~SEC_ACTIVE_KEY; + priv->status |= STATUS_SECURITY_UPDATED; + } else + priv->ieee->sec.flags &= ~SEC_ACTIVE_KEY; + + if ((sec->flags & SEC_AUTH_MODE) && + (priv->ieee->sec.auth_mode != sec->auth_mode)) { + priv->ieee->sec.auth_mode = sec->auth_mode; + priv->ieee->sec.flags |= SEC_AUTH_MODE; + if (sec->auth_mode == WLAN_AUTH_SHARED_KEY) + priv->capability |= CAP_SHARED_KEY; + else + priv->capability &= ~CAP_SHARED_KEY; + priv->status |= STATUS_SECURITY_UPDATED; + } + + if (sec->flags & SEC_ENABLED && priv->ieee->sec.enabled != sec->enabled) { + priv->ieee->sec.flags |= SEC_ENABLED; + priv->ieee->sec.enabled = sec->enabled; + priv->status |= STATUS_SECURITY_UPDATED; + if (sec->enabled) + priv->capability |= CAP_PRIVACY_ON; + else + priv->capability &= ~CAP_PRIVACY_ON; + } + + if (sec->flags & SEC_ENCRYPT) + priv->ieee->sec.encrypt = sec->encrypt; + + if (sec->flags & SEC_LEVEL && priv->ieee->sec.level != sec->level) { + priv->ieee->sec.level = sec->level; + priv->ieee->sec.flags |= SEC_LEVEL; + priv->status |= STATUS_SECURITY_UPDATED; + } + + if (!priv->ieee->host_encrypt && (sec->flags & SEC_ENCRYPT)) + ipw_set_hwcrypto_keys(priv); + + /* To match current functionality of ipw2100 (which works well w/ + * various supplicants, we don't force a disassociate if the + * privacy capability changes ... */ +#if 0 + if ((priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING)) && + (((priv->assoc_request.capability & + cpu_to_le16(WLAN_CAPABILITY_PRIVACY)) && !sec->enabled) || + (!(priv->assoc_request.capability & + cpu_to_le16(WLAN_CAPABILITY_PRIVACY)) && sec->enabled))) { + IPW_DEBUG_ASSOC("Disassociating due to capability " + "change.\n"); + ipw_disassociate(priv); + } +#endif +} + +static int init_supported_rates(struct ipw_priv *priv, + struct ipw_supported_rates *rates) +{ + /* TODO: Mask out rates based on priv->rates_mask */ + + memset(rates, 0, sizeof(*rates)); + /* configure supported rates */ + switch (priv->ieee->freq_band) { + case LIBIPW_52GHZ_BAND: + rates->ieee_mode = IPW_A_MODE; + rates->purpose = IPW_RATE_CAPABILITIES; + ipw_add_ofdm_scan_rates(rates, LIBIPW_CCK_MODULATION, + LIBIPW_OFDM_DEFAULT_RATES_MASK); + break; + + default: /* Mixed or 2.4Ghz */ + rates->ieee_mode = IPW_G_MODE; + rates->purpose = IPW_RATE_CAPABILITIES; + ipw_add_cck_scan_rates(rates, LIBIPW_CCK_MODULATION, + LIBIPW_CCK_DEFAULT_RATES_MASK); + if (priv->ieee->modulation & LIBIPW_OFDM_MODULATION) { + ipw_add_ofdm_scan_rates(rates, LIBIPW_CCK_MODULATION, + LIBIPW_OFDM_DEFAULT_RATES_MASK); + } + break; + } + + return 0; +} + +static int ipw_config(struct ipw_priv *priv) +{ + /* This is only called from ipw_up, which resets/reloads the firmware + so, we don't need to first disable the card before we configure + it */ + if (ipw_set_tx_power(priv)) + goto error; + + /* initialize adapter address */ + if (ipw_send_adapter_address(priv, priv->net_dev->dev_addr)) + goto error; + + /* set basic system config settings */ + init_sys_config(&priv->sys_config); + + /* Support Bluetooth if we have BT h/w on board, and user wants to. + * Does not support BT priority yet (don't abort or defer our Tx) */ + if (bt_coexist) { + unsigned char bt_caps = priv->eeprom[EEPROM_SKU_CAPABILITY]; + + if (bt_caps & EEPROM_SKU_CAP_BT_CHANNEL_SIG) + priv->sys_config.bt_coexistence + |= CFG_BT_COEXISTENCE_SIGNAL_CHNL; + if (bt_caps & EEPROM_SKU_CAP_BT_OOB) + priv->sys_config.bt_coexistence + |= CFG_BT_COEXISTENCE_OOB; + } + +#ifdef CONFIG_IPW2200_PROMISCUOUS + if (priv->prom_net_dev && netif_running(priv->prom_net_dev)) { + priv->sys_config.accept_all_data_frames = 1; + priv->sys_config.accept_non_directed_frames = 1; + priv->sys_config.accept_all_mgmt_bcpr = 1; + priv->sys_config.accept_all_mgmt_frames = 1; + } +#endif + + if (priv->ieee->iw_mode == IW_MODE_ADHOC) + priv->sys_config.answer_broadcast_ssid_probe = 1; + else + priv->sys_config.answer_broadcast_ssid_probe = 0; + + if (ipw_send_system_config(priv)) + goto error; + + init_supported_rates(priv, &priv->rates); + if (ipw_send_supported_rates(priv, &priv->rates)) + goto error; + + /* Set request-to-send threshold */ + if (priv->rts_threshold) { + if (ipw_send_rts_threshold(priv, priv->rts_threshold)) + goto error; + } +#ifdef CONFIG_IPW2200_QOS + IPW_DEBUG_QOS("QoS: call ipw_qos_activate\n"); + ipw_qos_activate(priv, NULL); +#endif /* CONFIG_IPW2200_QOS */ + + if (ipw_set_random_seed(priv)) + goto error; + + /* final state transition to the RUN state */ + if (ipw_send_host_complete(priv)) + goto error; + + priv->status |= STATUS_INIT; + + ipw_led_init(priv); + ipw_led_radio_on(priv); + priv->notif_missed_beacons = 0; + + /* Set hardware WEP key if it is configured. */ + if ((priv->capability & CAP_PRIVACY_ON) && + (priv->ieee->sec.level == SEC_LEVEL_1) && + !(priv->ieee->host_encrypt || priv->ieee->host_decrypt)) + ipw_set_hwcrypto_keys(priv); + + return 0; + + error: + return -EIO; +} + +/* + * NOTE: + * + * These tables have been tested in conjunction with the + * Intel PRO/Wireless 2200BG and 2915ABG Network Connection Adapters. + * + * Altering this values, using it on other hardware, or in geographies + * not intended for resale of the above mentioned Intel adapters has + * not been tested. + * + * Remember to update the table in README.ipw2200 when changing this + * table. + * + */ +static const struct libipw_geo ipw_geos[] = { + { /* Restricted */ + "---", + .bg_channels = 11, + .bg = {{2412, 1}, {2417, 2}, {2422, 3}, + {2427, 4}, {2432, 5}, {2437, 6}, + {2442, 7}, {2447, 8}, {2452, 9}, + {2457, 10}, {2462, 11}}, + }, + + { /* Custom US/Canada */ + "ZZF", + .bg_channels = 11, + .bg = {{2412, 1}, {2417, 2}, {2422, 3}, + {2427, 4}, {2432, 5}, {2437, 6}, + {2442, 7}, {2447, 8}, {2452, 9}, + {2457, 10}, {2462, 11}}, + .a_channels = 8, + .a = {{5180, 36}, + {5200, 40}, + {5220, 44}, + {5240, 48}, + {5260, 52, LIBIPW_CH_PASSIVE_ONLY}, + {5280, 56, LIBIPW_CH_PASSIVE_ONLY}, + {5300, 60, LIBIPW_CH_PASSIVE_ONLY}, + {5320, 64, LIBIPW_CH_PASSIVE_ONLY}}, + }, + + { /* Rest of World */ + "ZZD", + .bg_channels = 13, + .bg = {{2412, 1}, {2417, 2}, {2422, 3}, + {2427, 4}, {2432, 5}, {2437, 6}, + {2442, 7}, {2447, 8}, {2452, 9}, + {2457, 10}, {2462, 11}, {2467, 12}, + {2472, 13}}, + }, + + { /* Custom USA & Europe & High */ + "ZZA", + .bg_channels = 11, + .bg = {{2412, 1}, {2417, 2}, {2422, 3}, + {2427, 4}, {2432, 5}, {2437, 6}, + {2442, 7}, {2447, 8}, {2452, 9}, + {2457, 10}, {2462, 11}}, + .a_channels = 13, + .a = {{5180, 36}, + {5200, 40}, + {5220, 44}, + {5240, 48}, + {5260, 52, LIBIPW_CH_PASSIVE_ONLY}, + {5280, 56, LIBIPW_CH_PASSIVE_ONLY}, + {5300, 60, LIBIPW_CH_PASSIVE_ONLY}, + {5320, 64, LIBIPW_CH_PASSIVE_ONLY}, + {5745, 149}, + {5765, 153}, + {5785, 157}, + {5805, 161}, + {5825, 165}}, + }, + + { /* Custom NA & Europe */ + "ZZB", + .bg_channels = 11, + .bg = {{2412, 1}, {2417, 2}, {2422, 3}, + {2427, 4}, {2432, 5}, {2437, 6}, + {2442, 7}, {2447, 8}, {2452, 9}, + {2457, 10}, {2462, 11}}, + .a_channels = 13, + .a = {{5180, 36}, + {5200, 40}, + {5220, 44}, + {5240, 48}, + {5260, 52, LIBIPW_CH_PASSIVE_ONLY}, + {5280, 56, LIBIPW_CH_PASSIVE_ONLY}, + {5300, 60, LIBIPW_CH_PASSIVE_ONLY}, + {5320, 64, LIBIPW_CH_PASSIVE_ONLY}, + {5745, 149, LIBIPW_CH_PASSIVE_ONLY}, + {5765, 153, LIBIPW_CH_PASSIVE_ONLY}, + {5785, 157, LIBIPW_CH_PASSIVE_ONLY}, + {5805, 161, LIBIPW_CH_PASSIVE_ONLY}, + {5825, 165, LIBIPW_CH_PASSIVE_ONLY}}, + }, + + { /* Custom Japan */ + "ZZC", + .bg_channels = 11, + .bg = {{2412, 1}, {2417, 2}, {2422, 3}, + {2427, 4}, {2432, 5}, {2437, 6}, + {2442, 7}, {2447, 8}, {2452, 9}, + {2457, 10}, {2462, 11}}, + .a_channels = 4, + .a = {{5170, 34}, {5190, 38}, + {5210, 42}, {5230, 46}}, + }, + + { /* Custom */ + "ZZM", + .bg_channels = 11, + .bg = {{2412, 1}, {2417, 2}, {2422, 3}, + {2427, 4}, {2432, 5}, {2437, 6}, + {2442, 7}, {2447, 8}, {2452, 9}, + {2457, 10}, {2462, 11}}, + }, + + { /* Europe */ + "ZZE", + .bg_channels = 13, + .bg = {{2412, 1}, {2417, 2}, {2422, 3}, + {2427, 4}, {2432, 5}, {2437, 6}, + {2442, 7}, {2447, 8}, {2452, 9}, + {2457, 10}, {2462, 11}, {2467, 12}, + {2472, 13}}, + .a_channels = 19, + .a = {{5180, 36}, + {5200, 40}, + {5220, 44}, + {5240, 48}, + {5260, 52, LIBIPW_CH_PASSIVE_ONLY}, + {5280, 56, LIBIPW_CH_PASSIVE_ONLY}, + {5300, 60, LIBIPW_CH_PASSIVE_ONLY}, + {5320, 64, LIBIPW_CH_PASSIVE_ONLY}, + {5500, 100, LIBIPW_CH_PASSIVE_ONLY}, + {5520, 104, LIBIPW_CH_PASSIVE_ONLY}, + {5540, 108, LIBIPW_CH_PASSIVE_ONLY}, + {5560, 112, LIBIPW_CH_PASSIVE_ONLY}, + {5580, 116, LIBIPW_CH_PASSIVE_ONLY}, + {5600, 120, LIBIPW_CH_PASSIVE_ONLY}, + {5620, 124, LIBIPW_CH_PASSIVE_ONLY}, + {5640, 128, LIBIPW_CH_PASSIVE_ONLY}, + {5660, 132, LIBIPW_CH_PASSIVE_ONLY}, + {5680, 136, LIBIPW_CH_PASSIVE_ONLY}, + {5700, 140, LIBIPW_CH_PASSIVE_ONLY}}, + }, + + { /* Custom Japan */ + "ZZJ", + .bg_channels = 14, + .bg = {{2412, 1}, {2417, 2}, {2422, 3}, + {2427, 4}, {2432, 5}, {2437, 6}, + {2442, 7}, {2447, 8}, {2452, 9}, + {2457, 10}, {2462, 11}, {2467, 12}, + {2472, 13}, {2484, 14, LIBIPW_CH_B_ONLY}}, + .a_channels = 4, + .a = {{5170, 34}, {5190, 38}, + {5210, 42}, {5230, 46}}, + }, + + { /* Rest of World */ + "ZZR", + .bg_channels = 14, + .bg = {{2412, 1}, {2417, 2}, {2422, 3}, + {2427, 4}, {2432, 5}, {2437, 6}, + {2442, 7}, {2447, 8}, {2452, 9}, + {2457, 10}, {2462, 11}, {2467, 12}, + {2472, 13}, {2484, 14, LIBIPW_CH_B_ONLY | + LIBIPW_CH_PASSIVE_ONLY}}, + }, + + { /* High Band */ + "ZZH", + .bg_channels = 13, + .bg = {{2412, 1}, {2417, 2}, {2422, 3}, + {2427, 4}, {2432, 5}, {2437, 6}, + {2442, 7}, {2447, 8}, {2452, 9}, + {2457, 10}, {2462, 11}, + {2467, 12, LIBIPW_CH_PASSIVE_ONLY}, + {2472, 13, LIBIPW_CH_PASSIVE_ONLY}}, + .a_channels = 4, + .a = {{5745, 149}, {5765, 153}, + {5785, 157}, {5805, 161}}, + }, + + { /* Custom Europe */ + "ZZG", + .bg_channels = 13, + .bg = {{2412, 1}, {2417, 2}, {2422, 3}, + {2427, 4}, {2432, 5}, {2437, 6}, + {2442, 7}, {2447, 8}, {2452, 9}, + {2457, 10}, {2462, 11}, + {2467, 12}, {2472, 13}}, + .a_channels = 4, + .a = {{5180, 36}, {5200, 40}, + {5220, 44}, {5240, 48}}, + }, + + { /* Europe */ + "ZZK", + .bg_channels = 13, + .bg = {{2412, 1}, {2417, 2}, {2422, 3}, + {2427, 4}, {2432, 5}, {2437, 6}, + {2442, 7}, {2447, 8}, {2452, 9}, + {2457, 10}, {2462, 11}, + {2467, 12, LIBIPW_CH_PASSIVE_ONLY}, + {2472, 13, LIBIPW_CH_PASSIVE_ONLY}}, + .a_channels = 24, + .a = {{5180, 36, LIBIPW_CH_PASSIVE_ONLY}, + {5200, 40, LIBIPW_CH_PASSIVE_ONLY}, + {5220, 44, LIBIPW_CH_PASSIVE_ONLY}, + {5240, 48, LIBIPW_CH_PASSIVE_ONLY}, + {5260, 52, LIBIPW_CH_PASSIVE_ONLY}, + {5280, 56, LIBIPW_CH_PASSIVE_ONLY}, + {5300, 60, LIBIPW_CH_PASSIVE_ONLY}, + {5320, 64, LIBIPW_CH_PASSIVE_ONLY}, + {5500, 100, LIBIPW_CH_PASSIVE_ONLY}, + {5520, 104, LIBIPW_CH_PASSIVE_ONLY}, + {5540, 108, LIBIPW_CH_PASSIVE_ONLY}, + {5560, 112, LIBIPW_CH_PASSIVE_ONLY}, + {5580, 116, LIBIPW_CH_PASSIVE_ONLY}, + {5600, 120, LIBIPW_CH_PASSIVE_ONLY}, + {5620, 124, LIBIPW_CH_PASSIVE_ONLY}, + {5640, 128, LIBIPW_CH_PASSIVE_ONLY}, + {5660, 132, LIBIPW_CH_PASSIVE_ONLY}, + {5680, 136, LIBIPW_CH_PASSIVE_ONLY}, + {5700, 140, LIBIPW_CH_PASSIVE_ONLY}, + {5745, 149, LIBIPW_CH_PASSIVE_ONLY}, + {5765, 153, LIBIPW_CH_PASSIVE_ONLY}, + {5785, 157, LIBIPW_CH_PASSIVE_ONLY}, + {5805, 161, LIBIPW_CH_PASSIVE_ONLY}, + {5825, 165, LIBIPW_CH_PASSIVE_ONLY}}, + }, + + { /* Europe */ + "ZZL", + .bg_channels = 11, + .bg = {{2412, 1}, {2417, 2}, {2422, 3}, + {2427, 4}, {2432, 5}, {2437, 6}, + {2442, 7}, {2447, 8}, {2452, 9}, + {2457, 10}, {2462, 11}}, + .a_channels = 13, + .a = {{5180, 36, LIBIPW_CH_PASSIVE_ONLY}, + {5200, 40, LIBIPW_CH_PASSIVE_ONLY}, + {5220, 44, LIBIPW_CH_PASSIVE_ONLY}, + {5240, 48, LIBIPW_CH_PASSIVE_ONLY}, + {5260, 52, LIBIPW_CH_PASSIVE_ONLY}, + {5280, 56, LIBIPW_CH_PASSIVE_ONLY}, + {5300, 60, LIBIPW_CH_PASSIVE_ONLY}, + {5320, 64, LIBIPW_CH_PASSIVE_ONLY}, + {5745, 149, LIBIPW_CH_PASSIVE_ONLY}, + {5765, 153, LIBIPW_CH_PASSIVE_ONLY}, + {5785, 157, LIBIPW_CH_PASSIVE_ONLY}, + {5805, 161, LIBIPW_CH_PASSIVE_ONLY}, + {5825, 165, LIBIPW_CH_PASSIVE_ONLY}}, + } +}; + +static void ipw_set_geo(struct ipw_priv *priv) +{ + int j; + + for (j = 0; j < ARRAY_SIZE(ipw_geos); j++) { + if (!memcmp(&priv->eeprom[EEPROM_COUNTRY_CODE], + ipw_geos[j].name, 3)) + break; + } + + if (j == ARRAY_SIZE(ipw_geos)) { + IPW_WARNING("SKU [%c%c%c] not recognized.\n", + priv->eeprom[EEPROM_COUNTRY_CODE + 0], + priv->eeprom[EEPROM_COUNTRY_CODE + 1], + priv->eeprom[EEPROM_COUNTRY_CODE + 2]); + j = 0; + } + + libipw_set_geo(priv->ieee, &ipw_geos[j]); +} + +#define MAX_HW_RESTARTS 5 +static int ipw_up(struct ipw_priv *priv) +{ + int rc, i; + + /* Age scan list entries found before suspend */ + if (priv->suspend_time) { + libipw_networks_age(priv->ieee, priv->suspend_time); + priv->suspend_time = 0; + } + + if (priv->status & STATUS_EXIT_PENDING) + return -EIO; + + if (cmdlog && !priv->cmdlog) { + priv->cmdlog = kcalloc(cmdlog, sizeof(*priv->cmdlog), + GFP_KERNEL); + if (priv->cmdlog == NULL) { + IPW_ERROR("Error allocating %d command log entries.\n", + cmdlog); + return -ENOMEM; + } else { + priv->cmdlog_len = cmdlog; + } + } + + for (i = 0; i < MAX_HW_RESTARTS; i++) { + /* Load the microcode, firmware, and eeprom. + * Also start the clocks. */ + rc = ipw_load(priv); + if (rc) { + IPW_ERROR("Unable to load firmware: %d\n", rc); + return rc; + } + + ipw_init_ordinals(priv); + if (!(priv->config & CFG_CUSTOM_MAC)) + eeprom_parse_mac(priv, priv->mac_addr); + memcpy(priv->net_dev->dev_addr, priv->mac_addr, ETH_ALEN); + + ipw_set_geo(priv); + + if (priv->status & STATUS_RF_KILL_SW) { + IPW_WARNING("Radio disabled by module parameter.\n"); + return 0; + } else if (rf_kill_active(priv)) { + IPW_WARNING("Radio Frequency Kill Switch is On:\n" + "Kill switch must be turned off for " + "wireless networking to work.\n"); + schedule_delayed_work(&priv->rf_kill, 2 * HZ); + return 0; + } + + rc = ipw_config(priv); + if (!rc) { + IPW_DEBUG_INFO("Configured device on count %i\n", i); + + /* If configure to try and auto-associate, kick + * off a scan. */ + schedule_delayed_work(&priv->request_scan, 0); + + return 0; + } + + IPW_DEBUG_INFO("Device configuration failed: 0x%08X\n", rc); + IPW_DEBUG_INFO("Failed to config device on retry %d of %d\n", + i, MAX_HW_RESTARTS); + + /* We had an error bringing up the hardware, so take it + * all the way back down so we can try again */ + ipw_down(priv); + } + + /* tried to restart and config the device for as long as our + * patience could withstand */ + IPW_ERROR("Unable to initialize device after %d attempts.\n", i); + + return -EIO; +} + +static void ipw_bg_up(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, up); + mutex_lock(&priv->mutex); + ipw_up(priv); + mutex_unlock(&priv->mutex); +} + +static void ipw_deinit(struct ipw_priv *priv) +{ + int i; + + if (priv->status & STATUS_SCANNING) { + IPW_DEBUG_INFO("Aborting scan during shutdown.\n"); + ipw_abort_scan(priv); + } + + if (priv->status & STATUS_ASSOCIATED) { + IPW_DEBUG_INFO("Disassociating during shutdown.\n"); + ipw_disassociate(priv); + } + + ipw_led_shutdown(priv); + + /* Wait up to 1s for status to change to not scanning and not + * associated (disassociation can take a while for a ful 802.11 + * exchange */ + for (i = 1000; i && (priv->status & + (STATUS_DISASSOCIATING | + STATUS_ASSOCIATED | STATUS_SCANNING)); i--) + udelay(10); + + if (priv->status & (STATUS_DISASSOCIATING | + STATUS_ASSOCIATED | STATUS_SCANNING)) + IPW_DEBUG_INFO("Still associated or scanning...\n"); + else + IPW_DEBUG_INFO("Took %dms to de-init\n", 1000 - i); + + /* Attempt to disable the card */ + ipw_send_card_disable(priv, 0); + + priv->status &= ~STATUS_INIT; +} + +static void ipw_down(struct ipw_priv *priv) +{ + int exit_pending = priv->status & STATUS_EXIT_PENDING; + + priv->status |= STATUS_EXIT_PENDING; + + if (ipw_is_init(priv)) + ipw_deinit(priv); + + /* Wipe out the EXIT_PENDING status bit if we are not actually + * exiting the module */ + if (!exit_pending) + priv->status &= ~STATUS_EXIT_PENDING; + + /* tell the device to stop sending interrupts */ + ipw_disable_interrupts(priv); + + /* Clear all bits but the RF Kill */ + priv->status &= STATUS_RF_KILL_MASK | STATUS_EXIT_PENDING; + netif_carrier_off(priv->net_dev); + + ipw_stop_nic(priv); + + ipw_led_radio_off(priv); +} + +static void ipw_bg_down(struct work_struct *work) +{ + struct ipw_priv *priv = + container_of(work, struct ipw_priv, down); + mutex_lock(&priv->mutex); + ipw_down(priv); + mutex_unlock(&priv->mutex); +} + +static int ipw_wdev_init(struct net_device *dev) +{ + int i, rc = 0; + struct ipw_priv *priv = libipw_priv(dev); + const struct libipw_geo *geo = libipw_get_geo(priv->ieee); + struct wireless_dev *wdev = &priv->ieee->wdev; + + memcpy(wdev->wiphy->perm_addr, priv->mac_addr, ETH_ALEN); + + /* fill-out priv->ieee->bg_band */ + if (geo->bg_channels) { + struct ieee80211_supported_band *bg_band = &priv->ieee->bg_band; + + bg_band->band = NL80211_BAND_2GHZ; + bg_band->n_channels = geo->bg_channels; + bg_band->channels = kcalloc(geo->bg_channels, + sizeof(struct ieee80211_channel), + GFP_KERNEL); + if (!bg_band->channels) { + rc = -ENOMEM; + goto out; + } + /* translate geo->bg to bg_band.channels */ + for (i = 0; i < geo->bg_channels; i++) { + bg_band->channels[i].band = NL80211_BAND_2GHZ; + bg_band->channels[i].center_freq = geo->bg[i].freq; + bg_band->channels[i].hw_value = geo->bg[i].channel; + bg_band->channels[i].max_power = geo->bg[i].max_power; + if (geo->bg[i].flags & LIBIPW_CH_PASSIVE_ONLY) + bg_band->channels[i].flags |= + IEEE80211_CHAN_NO_IR; + if (geo->bg[i].flags & LIBIPW_CH_NO_IBSS) + bg_band->channels[i].flags |= + IEEE80211_CHAN_NO_IR; + if (geo->bg[i].flags & LIBIPW_CH_RADAR_DETECT) + bg_band->channels[i].flags |= + IEEE80211_CHAN_RADAR; + /* No equivalent for LIBIPW_CH_80211H_RULES, + LIBIPW_CH_UNIFORM_SPREADING, or + LIBIPW_CH_B_ONLY... */ + } + /* point at bitrate info */ + bg_band->bitrates = ipw2200_bg_rates; + bg_band->n_bitrates = ipw2200_num_bg_rates; + + wdev->wiphy->bands[NL80211_BAND_2GHZ] = bg_band; + } + + /* fill-out priv->ieee->a_band */ + if (geo->a_channels) { + struct ieee80211_supported_band *a_band = &priv->ieee->a_band; + + a_band->band = NL80211_BAND_5GHZ; + a_band->n_channels = geo->a_channels; + a_band->channels = kcalloc(geo->a_channels, + sizeof(struct ieee80211_channel), + GFP_KERNEL); + if (!a_band->channels) { + rc = -ENOMEM; + goto out; + } + /* translate geo->a to a_band.channels */ + for (i = 0; i < geo->a_channels; i++) { + a_band->channels[i].band = NL80211_BAND_5GHZ; + a_band->channels[i].center_freq = geo->a[i].freq; + a_band->channels[i].hw_value = geo->a[i].channel; + a_band->channels[i].max_power = geo->a[i].max_power; + if (geo->a[i].flags & LIBIPW_CH_PASSIVE_ONLY) + a_band->channels[i].flags |= + IEEE80211_CHAN_NO_IR; + if (geo->a[i].flags & LIBIPW_CH_NO_IBSS) + a_band->channels[i].flags |= + IEEE80211_CHAN_NO_IR; + if (geo->a[i].flags & LIBIPW_CH_RADAR_DETECT) + a_band->channels[i].flags |= + IEEE80211_CHAN_RADAR; + /* No equivalent for LIBIPW_CH_80211H_RULES, + LIBIPW_CH_UNIFORM_SPREADING, or + LIBIPW_CH_B_ONLY... */ + } + /* point at bitrate info */ + a_band->bitrates = ipw2200_a_rates; + a_band->n_bitrates = ipw2200_num_a_rates; + + wdev->wiphy->bands[NL80211_BAND_5GHZ] = a_band; + } + + wdev->wiphy->cipher_suites = ipw_cipher_suites; + wdev->wiphy->n_cipher_suites = ARRAY_SIZE(ipw_cipher_suites); + + set_wiphy_dev(wdev->wiphy, &priv->pci_dev->dev); + + /* With that information in place, we can now register the wiphy... */ + if (wiphy_register(wdev->wiphy)) + rc = -EIO; +out: + return rc; +} + +/* PCI driver stuff */ +static const struct pci_device_id card_ids[] = { + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2701, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2702, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2711, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2712, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2721, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2722, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2731, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2732, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2741, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x103c, 0x2741, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2742, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2751, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2752, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2753, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2754, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2761, 0, 0, 0}, + {PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, 0x2762, 0, 0, 0}, + {PCI_VDEVICE(INTEL, 0x104f), 0}, + {PCI_VDEVICE(INTEL, 0x4220), 0}, /* BG */ + {PCI_VDEVICE(INTEL, 0x4221), 0}, /* BG */ + {PCI_VDEVICE(INTEL, 0x4223), 0}, /* ABG */ + {PCI_VDEVICE(INTEL, 0x4224), 0}, /* ABG */ + + /* required last entry */ + {0,} +}; + +MODULE_DEVICE_TABLE(pci, card_ids); + +static struct attribute *ipw_sysfs_entries[] = { + &dev_attr_rf_kill.attr, + &dev_attr_direct_dword.attr, + &dev_attr_indirect_byte.attr, + &dev_attr_indirect_dword.attr, + &dev_attr_mem_gpio_reg.attr, + &dev_attr_command_event_reg.attr, + &dev_attr_nic_type.attr, + &dev_attr_status.attr, + &dev_attr_cfg.attr, + &dev_attr_error.attr, + &dev_attr_event_log.attr, + &dev_attr_cmd_log.attr, + &dev_attr_eeprom_delay.attr, + &dev_attr_ucode_version.attr, + &dev_attr_rtc.attr, + &dev_attr_scan_age.attr, + &dev_attr_led.attr, + &dev_attr_speed_scan.attr, + &dev_attr_net_stats.attr, + &dev_attr_channels.attr, +#ifdef CONFIG_IPW2200_PROMISCUOUS + &dev_attr_rtap_iface.attr, + &dev_attr_rtap_filter.attr, +#endif + NULL +}; + +static const struct attribute_group ipw_attribute_group = { + .name = NULL, /* put in device directory */ + .attrs = ipw_sysfs_entries, +}; + +#ifdef CONFIG_IPW2200_PROMISCUOUS +static int ipw_prom_open(struct net_device *dev) +{ + struct ipw_prom_priv *prom_priv = libipw_priv(dev); + struct ipw_priv *priv = prom_priv->priv; + + IPW_DEBUG_INFO("prom dev->open\n"); + netif_carrier_off(dev); + + if (priv->ieee->iw_mode != IW_MODE_MONITOR) { + priv->sys_config.accept_all_data_frames = 1; + priv->sys_config.accept_non_directed_frames = 1; + priv->sys_config.accept_all_mgmt_bcpr = 1; + priv->sys_config.accept_all_mgmt_frames = 1; + + ipw_send_system_config(priv); + } + + return 0; +} + +static int ipw_prom_stop(struct net_device *dev) +{ + struct ipw_prom_priv *prom_priv = libipw_priv(dev); + struct ipw_priv *priv = prom_priv->priv; + + IPW_DEBUG_INFO("prom dev->stop\n"); + + if (priv->ieee->iw_mode != IW_MODE_MONITOR) { + priv->sys_config.accept_all_data_frames = 0; + priv->sys_config.accept_non_directed_frames = 0; + priv->sys_config.accept_all_mgmt_bcpr = 0; + priv->sys_config.accept_all_mgmt_frames = 0; + + ipw_send_system_config(priv); + } + + return 0; +} + +static netdev_tx_t ipw_prom_hard_start_xmit(struct sk_buff *skb, + struct net_device *dev) +{ + IPW_DEBUG_INFO("prom dev->xmit\n"); + dev_kfree_skb(skb); + return NETDEV_TX_OK; +} + +static const struct net_device_ops ipw_prom_netdev_ops = { + .ndo_open = ipw_prom_open, + .ndo_stop = ipw_prom_stop, + .ndo_start_xmit = ipw_prom_hard_start_xmit, + .ndo_set_mac_address = eth_mac_addr, + .ndo_validate_addr = eth_validate_addr, +}; + +static int ipw_prom_alloc(struct ipw_priv *priv) +{ + int rc = 0; + + if (priv->prom_net_dev) + return -EPERM; + + priv->prom_net_dev = alloc_libipw(sizeof(struct ipw_prom_priv), 1); + if (priv->prom_net_dev == NULL) + return -ENOMEM; + + priv->prom_priv = libipw_priv(priv->prom_net_dev); + priv->prom_priv->ieee = netdev_priv(priv->prom_net_dev); + priv->prom_priv->priv = priv; + + strcpy(priv->prom_net_dev->name, "rtap%d"); + memcpy(priv->prom_net_dev->dev_addr, priv->mac_addr, ETH_ALEN); + + priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP; + priv->prom_net_dev->netdev_ops = &ipw_prom_netdev_ops; + + priv->prom_net_dev->min_mtu = 68; + priv->prom_net_dev->max_mtu = LIBIPW_DATA_LEN; + + priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR; + SET_NETDEV_DEV(priv->prom_net_dev, &priv->pci_dev->dev); + + rc = register_netdev(priv->prom_net_dev); + if (rc) { + free_libipw(priv->prom_net_dev, 1); + priv->prom_net_dev = NULL; + return rc; + } + + return 0; +} + +static void ipw_prom_free(struct ipw_priv *priv) +{ + if (!priv->prom_net_dev) + return; + + unregister_netdev(priv->prom_net_dev); + free_libipw(priv->prom_net_dev, 1); + + priv->prom_net_dev = NULL; +} + +#endif + +static const struct net_device_ops ipw_netdev_ops = { + .ndo_open = ipw_net_open, + .ndo_stop = ipw_net_stop, + .ndo_set_rx_mode = ipw_net_set_multicast_list, + .ndo_set_mac_address = ipw_net_set_mac_address, + .ndo_start_xmit = libipw_xmit, + .ndo_validate_addr = eth_validate_addr, +}; + +static int ipw_pci_probe(struct pci_dev *pdev, + const struct pci_device_id *ent) +{ + int err = 0; + struct net_device *net_dev; + void __iomem *base; + u32 length, val; + struct ipw_priv *priv; + int i; + + net_dev = alloc_libipw(sizeof(struct ipw_priv), 0); + if (net_dev == NULL) { + err = -ENOMEM; + goto out; + } + + priv = libipw_priv(net_dev); + priv->ieee = netdev_priv(net_dev); + + priv->net_dev = net_dev; + priv->pci_dev = pdev; + ipw_debug_level = debug; + spin_lock_init(&priv->irq_lock); + spin_lock_init(&priv->lock); + for (i = 0; i < IPW_IBSS_MAC_HASH_SIZE; i++) + INIT_LIST_HEAD(&priv->ibss_mac_hash[i]); + + mutex_init(&priv->mutex); + if (pci_enable_device(pdev)) { + err = -ENODEV; + goto out_free_libipw; + } + + pci_set_master(pdev); + + err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); + if (!err) + err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); + if (err) { + printk(KERN_WARNING DRV_NAME ": No suitable DMA available.\n"); + goto out_pci_disable_device; + } + + pci_set_drvdata(pdev, priv); + + err = pci_request_regions(pdev, DRV_NAME); + if (err) + goto out_pci_disable_device; + + /* We disable the RETRY_TIMEOUT register (0x41) to keep + * PCI Tx retries from interfering with C3 CPU state */ + pci_read_config_dword(pdev, 0x40, &val); + if ((val & 0x0000ff00) != 0) + pci_write_config_dword(pdev, 0x40, val & 0xffff00ff); + + length = pci_resource_len(pdev, 0); + priv->hw_len = length; + + base = pci_ioremap_bar(pdev, 0); + if (!base) { + err = -ENODEV; + goto out_pci_release_regions; + } + + priv->hw_base = base; + IPW_DEBUG_INFO("pci_resource_len = 0x%08x\n", length); + IPW_DEBUG_INFO("pci_resource_base = %p\n", base); + + err = ipw_setup_deferred_work(priv); + if (err) { + IPW_ERROR("Unable to setup deferred work\n"); + goto out_iounmap; + } + + ipw_sw_reset(priv, 1); + + err = request_irq(pdev->irq, ipw_isr, IRQF_SHARED, DRV_NAME, priv); + if (err) { + IPW_ERROR("Error allocating IRQ %d\n", pdev->irq); + goto out_iounmap; + } + + SET_NETDEV_DEV(net_dev, &pdev->dev); + + mutex_lock(&priv->mutex); + + priv->ieee->hard_start_xmit = ipw_net_hard_start_xmit; + priv->ieee->set_security = shim__set_security; + priv->ieee->is_queue_full = ipw_net_is_queue_full; + +#ifdef CONFIG_IPW2200_QOS + priv->ieee->is_qos_active = ipw_is_qos_active; + priv->ieee->handle_probe_response = ipw_handle_beacon; + priv->ieee->handle_beacon = ipw_handle_probe_response; + priv->ieee->handle_assoc_response = ipw_handle_assoc_response; +#endif /* CONFIG_IPW2200_QOS */ + + priv->ieee->perfect_rssi = -20; + priv->ieee->worst_rssi = -85; + + net_dev->netdev_ops = &ipw_netdev_ops; + priv->wireless_data.spy_data = &priv->ieee->spy_data; + net_dev->wireless_data = &priv->wireless_data; + net_dev->wireless_handlers = &ipw_wx_handler_def; + net_dev->ethtool_ops = &ipw_ethtool_ops; + + net_dev->min_mtu = 68; + net_dev->max_mtu = LIBIPW_DATA_LEN; + + err = sysfs_create_group(&pdev->dev.kobj, &ipw_attribute_group); + if (err) { + IPW_ERROR("failed to create sysfs device attributes\n"); + mutex_unlock(&priv->mutex); + goto out_release_irq; + } + + if (ipw_up(priv)) { + mutex_unlock(&priv->mutex); + err = -EIO; + goto out_remove_sysfs; + } + + mutex_unlock(&priv->mutex); + + err = ipw_wdev_init(net_dev); + if (err) { + IPW_ERROR("failed to register wireless device\n"); + goto out_remove_sysfs; + } + + err = register_netdev(net_dev); + if (err) { + IPW_ERROR("failed to register network device\n"); + goto out_unregister_wiphy; + } + +#ifdef CONFIG_IPW2200_PROMISCUOUS + if (rtap_iface) { + err = ipw_prom_alloc(priv); + if (err) { + IPW_ERROR("Failed to register promiscuous network " + "device (error %d).\n", err); + unregister_netdev(priv->net_dev); + goto out_unregister_wiphy; + } + } +#endif + + printk(KERN_INFO DRV_NAME ": Detected geography %s (%d 802.11bg " + "channels, %d 802.11a channels)\n", + priv->ieee->geo.name, priv->ieee->geo.bg_channels, + priv->ieee->geo.a_channels); + + return 0; + + out_unregister_wiphy: + wiphy_unregister(priv->ieee->wdev.wiphy); + kfree(priv->ieee->a_band.channels); + kfree(priv->ieee->bg_band.channels); + out_remove_sysfs: + sysfs_remove_group(&pdev->dev.kobj, &ipw_attribute_group); + out_release_irq: + free_irq(pdev->irq, priv); + out_iounmap: + iounmap(priv->hw_base); + out_pci_release_regions: + pci_release_regions(pdev); + out_pci_disable_device: + pci_disable_device(pdev); + out_free_libipw: + free_libipw(priv->net_dev, 0); + out: + return err; +} + +static void ipw_pci_remove(struct pci_dev *pdev) +{ + struct ipw_priv *priv = pci_get_drvdata(pdev); + struct list_head *p, *q; + int i; + + if (!priv) + return; + + mutex_lock(&priv->mutex); + + priv->status |= STATUS_EXIT_PENDING; + ipw_down(priv); + sysfs_remove_group(&pdev->dev.kobj, &ipw_attribute_group); + + mutex_unlock(&priv->mutex); + + unregister_netdev(priv->net_dev); + + if (priv->rxq) { + ipw_rx_queue_free(priv, priv->rxq); + priv->rxq = NULL; + } + ipw_tx_queue_free(priv); + + if (priv->cmdlog) { + kfree(priv->cmdlog); + priv->cmdlog = NULL; + } + + /* make sure all works are inactive */ + cancel_delayed_work_sync(&priv->adhoc_check); + cancel_work_sync(&priv->associate); + cancel_work_sync(&priv->disassociate); + cancel_work_sync(&priv->system_config); + cancel_work_sync(&priv->rx_replenish); + cancel_work_sync(&priv->adapter_restart); + cancel_delayed_work_sync(&priv->rf_kill); + cancel_work_sync(&priv->up); + cancel_work_sync(&priv->down); + cancel_delayed_work_sync(&priv->request_scan); + cancel_delayed_work_sync(&priv->request_direct_scan); + cancel_delayed_work_sync(&priv->request_passive_scan); + cancel_delayed_work_sync(&priv->scan_event); + cancel_delayed_work_sync(&priv->gather_stats); + cancel_work_sync(&priv->abort_scan); + cancel_work_sync(&priv->roam); + cancel_delayed_work_sync(&priv->scan_check); + cancel_work_sync(&priv->link_up); + cancel_work_sync(&priv->link_down); + cancel_delayed_work_sync(&priv->led_link_on); + cancel_delayed_work_sync(&priv->led_link_off); + cancel_delayed_work_sync(&priv->led_act_off); + cancel_work_sync(&priv->merge_networks); + + /* Free MAC hash list for ADHOC */ + for (i = 0; i < IPW_IBSS_MAC_HASH_SIZE; i++) { + list_for_each_safe(p, q, &priv->ibss_mac_hash[i]) { + list_del(p); + kfree(list_entry(p, struct ipw_ibss_seq, list)); + } + } + + kfree(priv->error); + priv->error = NULL; + +#ifdef CONFIG_IPW2200_PROMISCUOUS + ipw_prom_free(priv); +#endif + + free_irq(pdev->irq, priv); + iounmap(priv->hw_base); + pci_release_regions(pdev); + pci_disable_device(pdev); + /* wiphy_unregister needs to be here, before free_libipw */ + wiphy_unregister(priv->ieee->wdev.wiphy); + kfree(priv->ieee->a_band.channels); + kfree(priv->ieee->bg_band.channels); + free_libipw(priv->net_dev, 0); + free_firmware(); +} + +#ifdef CONFIG_PM +static int ipw_pci_suspend(struct pci_dev *pdev, pm_message_t state) +{ + struct ipw_priv *priv = pci_get_drvdata(pdev); + struct net_device *dev = priv->net_dev; + + printk(KERN_INFO "%s: Going into suspend...\n", dev->name); + + /* Take down the device; powers it off, etc. */ + ipw_down(priv); + + /* Remove the PRESENT state of the device */ + netif_device_detach(dev); + + pci_save_state(pdev); + pci_disable_device(pdev); + pci_set_power_state(pdev, pci_choose_state(pdev, state)); + + priv->suspend_at = ktime_get_boottime_seconds(); + + return 0; +} + +static int ipw_pci_resume(struct pci_dev *pdev) +{ + struct ipw_priv *priv = pci_get_drvdata(pdev); + struct net_device *dev = priv->net_dev; + int err; + u32 val; + + printk(KERN_INFO "%s: Coming out of suspend...\n", dev->name); + + pci_set_power_state(pdev, PCI_D0); + err = pci_enable_device(pdev); + if (err) { + printk(KERN_ERR "%s: pci_enable_device failed on resume\n", + dev->name); + return err; + } + pci_restore_state(pdev); + + /* + * Suspend/Resume resets the PCI configuration space, so we have to + * re-disable the RETRY_TIMEOUT register (0x41) to keep PCI Tx retries + * from interfering with C3 CPU state. pci_restore_state won't help + * here since it only restores the first 64 bytes pci config header. + */ + pci_read_config_dword(pdev, 0x40, &val); + if ((val & 0x0000ff00) != 0) + pci_write_config_dword(pdev, 0x40, val & 0xffff00ff); + + /* Set the device back into the PRESENT state; this will also wake + * the queue of needed */ + netif_device_attach(dev); + + priv->suspend_time = ktime_get_boottime_seconds() - priv->suspend_at; + + /* Bring the device back up */ + schedule_work(&priv->up); + + return 0; +} +#endif + +static void ipw_pci_shutdown(struct pci_dev *pdev) +{ + struct ipw_priv *priv = pci_get_drvdata(pdev); + + /* Take down the device; powers it off, etc. */ + ipw_down(priv); + + pci_disable_device(pdev); +} + +/* driver initialization stuff */ +static struct pci_driver ipw_driver = { + .name = DRV_NAME, + .id_table = card_ids, + .probe = ipw_pci_probe, + .remove = ipw_pci_remove, +#ifdef CONFIG_PM + .suspend = ipw_pci_suspend, + .resume = ipw_pci_resume, +#endif + .shutdown = ipw_pci_shutdown, +}; + +static int __init ipw_init(void) +{ + int ret; + + printk(KERN_INFO DRV_NAME ": " DRV_DESCRIPTION ", " DRV_VERSION "\n"); + printk(KERN_INFO DRV_NAME ": " DRV_COPYRIGHT "\n"); + + ret = pci_register_driver(&ipw_driver); + if (ret) { + IPW_ERROR("Unable to initialize PCI module\n"); + return ret; + } + + ret = driver_create_file(&ipw_driver.driver, &driver_attr_debug_level); + if (ret) { + IPW_ERROR("Unable to create driver sysfs file\n"); + pci_unregister_driver(&ipw_driver); + return ret; + } + + return ret; +} + +static void __exit ipw_exit(void) +{ + driver_remove_file(&ipw_driver.driver, &driver_attr_debug_level); + pci_unregister_driver(&ipw_driver); +} + +module_param(disable, int, 0444); +MODULE_PARM_DESC(disable, "manually disable the radio (default 0 [radio on])"); + +module_param(associate, int, 0444); +MODULE_PARM_DESC(associate, "auto associate when scanning (default off)"); + +module_param(auto_create, int, 0444); +MODULE_PARM_DESC(auto_create, "auto create adhoc network (default on)"); + +module_param_named(led, led_support, int, 0444); +MODULE_PARM_DESC(led, "enable led control on some systems (default 1 on)"); + +module_param(debug, int, 0444); +MODULE_PARM_DESC(debug, "debug output mask"); + +module_param_named(channel, default_channel, int, 0444); +MODULE_PARM_DESC(channel, "channel to limit associate to (default 0 [ANY])"); + +#ifdef CONFIG_IPW2200_PROMISCUOUS +module_param(rtap_iface, int, 0444); +MODULE_PARM_DESC(rtap_iface, "create the rtap interface (1 - create, default 0)"); +#endif + +#ifdef CONFIG_IPW2200_QOS +module_param(qos_enable, int, 0444); +MODULE_PARM_DESC(qos_enable, "enable all QoS functionalities"); + +module_param(qos_burst_enable, int, 0444); +MODULE_PARM_DESC(qos_burst_enable, "enable QoS burst mode"); + +module_param(qos_no_ack_mask, int, 0444); +MODULE_PARM_DESC(qos_no_ack_mask, "mask Tx_Queue to no ack"); + +module_param(burst_duration_CCK, int, 0444); +MODULE_PARM_DESC(burst_duration_CCK, "set CCK burst value"); + +module_param(burst_duration_OFDM, int, 0444); +MODULE_PARM_DESC(burst_duration_OFDM, "set OFDM burst value"); +#endif /* CONFIG_IPW2200_QOS */ + +#ifdef CONFIG_IPW2200_MONITOR +module_param_named(mode, network_mode, int, 0444); +MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS,2=Monitor)"); +#else +module_param_named(mode, network_mode, int, 0444); +MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS)"); +#endif + +module_param(bt_coexist, int, 0444); +MODULE_PARM_DESC(bt_coexist, "enable bluetooth coexistence (default off)"); + +module_param(hwcrypto, int, 0444); +MODULE_PARM_DESC(hwcrypto, "enable hardware crypto (default off)"); + +module_param(cmdlog, int, 0444); +MODULE_PARM_DESC(cmdlog, + "allocate a ring buffer for logging firmware commands"); + +module_param(roaming, int, 0444); +MODULE_PARM_DESC(roaming, "enable roaming support (default on)"); + +module_param(antenna, int, 0444); +MODULE_PARM_DESC(antenna, "select antenna 1=Main, 3=Aux, default 0 [both], 2=slow_diversity (choose the one with lower background noise)"); + +module_exit(ipw_exit); +module_init(ipw_init); \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/intel/ipw2x00/ipw2200.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/intel/ipw2x00/ipw2200.c.yml new file mode 100644 index 00000000000..a401fc84233 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/intel/ipw2x00/ipw2200.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2003 - 2006 Intel Corporation + - Copyright 2000, Axis Communications AB Ethereal + - Copyright 1998 Gerald Combs + - Copyright (c) 2003-2006 Intel Corporation +holders: + - Intel Corporation + - Axis Communications AB Ethereal + - Gerald Combs + - Intel Corporation diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/intel/ipw2x00/libipw.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/intel/ipw2x00/libipw.h new file mode 100644 index 00000000000..f2119dac6f7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/intel/ipw2x00/libipw.h @@ -0,0 +1,14 @@ +* remains copyright by the original authors + * + * Portions of the merged code are based on Host AP (software wireless + + + * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen + * + * Copyright (c) 2002-2003, Jouni Malinen + * + * Adaption to a generic IEEE 802.11 stack by James Ketrenos + * + * Copyright (c) 2004-2005, Intel Corporation + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/intel/ipw2x00/libipw.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/intel/ipw2x00/libipw.h.yml new file mode 100644 index 00000000000..9d66d5c55c6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/net/wireless/intel/ipw2x00/libipw.h.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyright by the original + - Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen + - Copyright (c) 2002-2003, Jouni Malinen + - Copyright (c) 2004-2005, Intel Corporation +holders: + - the original + - SSH Communications Security Corp and Jouni Malinen + - Jouni Malinen + - Intel Corporation +authors: + - James Ketrenos diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/parisc/iosapic_private.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/parisc/iosapic_private.h new file mode 100644 index 00000000000..8f28eda5eb1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/parisc/iosapic_private.h @@ -0,0 +1,5 @@ +* Copyright (C) 2000 Hewlett Packard (Grant Grundler) + * Copyright (C) 2000,2003 Grant Grundler (grundler at parisc-linux.org) + * Copyright (C) 2002 Matthew Wilcox (willy at parisc-linux.org) + * + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/parisc/iosapic_private.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/parisc/iosapic_private.h.yml new file mode 100644 index 00000000000..13962021281 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/parisc/iosapic_private.h.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000 Hewlett Packard (Grant Grundler) + - Copyright (c) 2000,2003 Grant Grundler (grundler at parisc-linux.org) + - Copyright (c) 2002 Matthew Wilcox (willy at parisc-linux.org) +holders: + - Hewlett Packard (Grant Grundler) + - Grant Grundler grundler at + - Matthew Wilcox willy at diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/parport/ieee1284_ops.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/parport/ieee1284_ops.c new file mode 100644 index 00000000000..c8b5dc08450 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/parport/ieee1284_ops.c @@ -0,0 +1,4 @@ +* Author: Tim Waugh + * Fixed AUTOFD polarity in ecp_forward_to_reverse(). Fred Barnes, 1999 + * Software emulated EPP fixes, Fred Barnes, 04/2001. + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/parport/ieee1284_ops.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/parport/ieee1284_ops.c.yml new file mode 100644 index 00000000000..ddb1f03ef63 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/parport/ieee1284_ops.c.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - Tim Waugh diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/controller/dwc/pci-imx6.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/controller/dwc/pci-imx6.c new file mode 100644 index 00000000000..6e63734907c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/controller/dwc/pci-imx6.c @@ -0,0 +1,5 @@ +* Copyright (C) 2013 Kosagi + * http://www.kosagi.com + * + * Author: Sean Cross + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/controller/dwc/pci-imx6.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/controller/dwc/pci-imx6.c.yml new file mode 100644 index 00000000000..de6b1dfb929 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/controller/dwc/pci-imx6.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2013 Kosagi http://www.kosagi.com +holders: + - Kosagi +authors: + - Sean Cross diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/mmap.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/mmap.c new file mode 100644 index 00000000000..ff800217c05 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/mmap.c @@ -0,0 +1,4 @@ +* Copyright © 2017 Amazon.com, Inc. or its affiliates. + * + * Author: David Woodhouse + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/mmap.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/mmap.c.yml new file mode 100644 index 00000000000..8bda8dab4ee --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/mmap.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2017 Amazon.com, Inc. +holders: + - Amazon.com, Inc. +authors: + - David Woodhouse diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/probe.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/probe.c new file mode 100644 index 00000000000..b11cc44f548 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/probe.c @@ -0,0 +1,3 @@ +* created by an SR-IOV device. Walk up to the first bridge device + * found or derive the domain from the host bridge. + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/probe.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/probe.c.yml new file mode 100644 index 00000000000..2b467366caf --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pci/probe.c.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - an SR-IOV device. Walk diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pcmcia/pxa2xx_stargate2.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pcmcia/pxa2xx_stargate2.c new file mode 100644 index 00000000000..977ef079f3b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pcmcia/pxa2xx_stargate2.c @@ -0,0 +1,5 @@ +* Author: Ed C. Epp + * Copyright: Intel Corp 2005 + * Jonathan Cameron 2009 + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pcmcia/pxa2xx_stargate2.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pcmcia/pxa2xx_stargate2.c.yml new file mode 100644 index 00000000000..36432b2def6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/pcmcia/pxa2xx_stargate2.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright Intel Corp 2005 Jonathan Cameron +holders: + - Intel Corp Jonathan Cameron +authors: + - Ed C. Epp diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/power/reset/axxia-reset.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/power/reset/axxia-reset.c new file mode 100644 index 00000000000..454f62ab44a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/power/reset/axxia-reset.c @@ -0,0 +1,3 @@ +* Copyright (C) 2014 LSI + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/power/reset/axxia-reset.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/power/reset/axxia-reset.c.yml new file mode 100644 index 00000000000..eb91f65eebf --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/power/reset/axxia-reset.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2014 LSI +holders: + - LSI diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/regulator/pbias-regulator.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/regulator/pbias-regulator.c new file mode 100644 index 00000000000..94833d263b1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/regulator/pbias-regulator.c @@ -0,0 +1,4 @@ +* Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/ + * Author: Balaji T K + * + * This program is free software; you can redistribute it and/or \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/regulator/pbias-regulator.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/regulator/pbias-regulator.c.yml new file mode 100644 index 00000000000..0071fa22a88 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/regulator/pbias-regulator.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2014 Texas Instruments Incorporated - http://www.ti.com +holders: + - Texas Instruments Incorporated +authors: + - Balaji T diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/scsi/scsi_debug.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/scsi/scsi_debug.c new file mode 100644 index 00000000000..a36a219b9b0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/scsi/scsi_debug.c @@ -0,0 +1,9 @@ +* Copyright (C) 1992 Eric Youngdale + * Simulate a host adapter with 2 disks attached. Do a lot of checking + * to make sure that we are not getting blocks mixed up, and PANIC if + * anything out of the ordinary is seen. + + + * Copyright (C) 2001 - 2018 Douglas Gilbert + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/scsi/scsi_debug.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/scsi/scsi_debug.c.yml new file mode 100644 index 00000000000..8dc69490e26 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/scsi/scsi_debug.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1992 Eric Youngdale Simulate + - Copyright (c) 2001 - 2018 Douglas Gilbert +holders: + - Eric Youngdale Simulate + - Douglas Gilbert diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/scsi/scsi_transport_fc.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/scsi/scsi_transport_fc.c new file mode 100644 index 00000000000..1b35bda9e8a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/scsi/scsi_transport_fc.c @@ -0,0 +1,14 @@ +* Copyright (c) 2003 Silicon Graphics, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + + + * Copyright (C) 2004-2007 James Smart, Emulex Corporation + * Rewrite for host, target, device, and remote port attributes, + * statistics, and service functions... + * Add vports, etc + + +/* Original Author: Martin Hicks */ +MODULE_AUTHOR("James Smart"); +MODULE_DESCRIPTION("FC Transport Attributes"); \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/scsi/scsi_transport_fc.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/scsi/scsi_transport_fc.c.yml new file mode 100644 index 00000000000..40c633300a5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/scsi/scsi_transport_fc.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2003 Silicon Graphics, Inc. + - Copyright (c) 2004-2007 James Smart, Emulex Corporation Rewrite +holders: + - Silicon Graphics, Inc. + - James Smart, Emulex Corporation Rewrite +authors: + - Martin Hicks diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/8255.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/8255.c new file mode 100644 index 00000000000..adda66a9b52 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/8255.c @@ -0,0 +1,8 @@ +* Copyright (C) 1998 David A. Schleef + */ + + + * Author: ds + * Status: works + * Updated: Fri, 7 Jun 2002 12:56:45 -0700 + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/8255.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/8255.c.yml new file mode 100644 index 00000000000..db18c772ee2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/8255.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998 David A. Schleef +holders: + - David A. Schleef +authors: + - ds Status diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/aio_aio12_8.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/aio_aio12_8.c new file mode 100644 index 00000000000..2b1f5abc762 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/aio_aio12_8.c @@ -0,0 +1,8 @@ +* Copyright (C) 2006 C&C Technologies, Inc. + */ + + + * Author: Pablo Mejia + * Devices: [Access I/O] PC-104 AIO12-8 (aio_aio12_8), + * [Access I/O] PC-104 AI12-8 (aio_ai12_8), + * [Access I/O] PC-104 AO12-4 (aio_ao12_4) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/aio_aio12_8.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/aio_aio12_8.c.yml new file mode 100644 index 00000000000..c0dbeb58353 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/aio_aio12_8.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006 C&C Technologies, Inc. +holders: + - C&C Technologies, Inc. +authors: + - Pablo Mejia Devices Access diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/comedi_parport.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/comedi_parport.c new file mode 100644 index 00000000000..0fd6d6196b1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/comedi_parport.c @@ -0,0 +1,8 @@ +* Copyright (C) 1998,2001 David A. Schleef + */ + + + * Author: ds + * Status: works in immediate mode + * Devices: [standard] parallel port (comedi_parport) + * Updated: Tue, 30 Apr 2002 21:11:45 -0700 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/comedi_parport.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/comedi_parport.c.yml new file mode 100644 index 00000000000..f14f9957b16 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/comedi_parport.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998,2001 David A. Schleef +holders: + - David A. Schleef +authors: + - ds Status diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/comedi_test.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/comedi_test.c new file mode 100644 index 00000000000..df293391cc8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/comedi_test.c @@ -0,0 +1,14 @@ +* Copyright (C) 2002 Joachim Wuttke + * Copyright (C) 2002 Frank Mori Hess + * + * COMEDI - Linux Control and Measurement Device Interface + * Copyright (C) 2000 David A. Schleef + */ + + + * Author: Joachim Wuttke , Frank Mori Hess + * , ds + * Devices: + * Status: works + * Updated: Sat, 16 Mar 2002 17:34:48 -0800 + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/comedi_test.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/comedi_test.c.yml new file mode 100644 index 00000000000..3c9e3e1bea0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/comedi_test.c.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2002 Joachim Wuttke + - Copyright (c) 2002 Frank Mori Hess + - Copyright (c) 2000 David A. Schleef +holders: + - Joachim Wuttke + - Frank Mori Hess + - David A. Schleef +authors: + - Joachim Wuttke , Frank Mori Hess + , ds Devices Status diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/das08_isa.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/das08_isa.c new file mode 100644 index 00000000000..fdcc9c78d46 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/das08_isa.c @@ -0,0 +1,9 @@ +* Copyright (C) 2000 David A. Schleef + * Copyright (C) 2001,2002,2003 Frank Mori Hess + * Copyright (C) 2004 Salvador E. Tropea + */ + + + * Author: Warren Jasper, ds, Frank Hess + * Updated: Fri, 31 Aug 2012 19:19:06 +0100 + * Status: works \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/das08_isa.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/das08_isa.c.yml new file mode 100644 index 00000000000..43d930d0b90 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/das08_isa.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000 David A. Schleef + - Copyright (c) 2001,2002,2003 Frank Mori Hess + - Copyright (c) 2004 Salvador E. Tropea +holders: + - David A. Schleef + - Frank Mori Hess + - Salvador E. Tropea +authors: + - Warren Jasper, ds, Frank Hess diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/das08_pci.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/das08_pci.c new file mode 100644 index 00000000000..fdcc9c78d46 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/das08_pci.c @@ -0,0 +1,9 @@ +* Copyright (C) 2000 David A. Schleef + * Copyright (C) 2001,2002,2003 Frank Mori Hess + * Copyright (C) 2004 Salvador E. Tropea + */ + + + * Author: Warren Jasper, ds, Frank Hess + * Updated: Fri, 31 Aug 2012 19:19:06 +0100 + * Status: works \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/das08_pci.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/das08_pci.c.yml new file mode 100644 index 00000000000..43d930d0b90 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/das08_pci.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000 David A. Schleef + - Copyright (c) 2001,2002,2003 Frank Mori Hess + - Copyright (c) 2004 Salvador E. Tropea +holders: + - David A. Schleef + - Frank Mori Hess + - Salvador E. Tropea +authors: + - Warren Jasper, ds, Frank Hess diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2801.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2801.c new file mode 100644 index 00000000000..ecda5b5a424 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2801.c @@ -0,0 +1,5 @@ +* Author: ds + * Status: works + * Devices: [Data Translation] DT2801 (dt2801), DT2801-A, DT2801/5716A, + * DT2805, DT2805/5716A, DT2808, DT2818, DT2809, DT01-EZ + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2801.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2801.c.yml new file mode 100644 index 00000000000..069ee4bd043 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2801.c.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - ds Status works Devices Data Translation DT2801 diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2811.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2811.c new file mode 100644 index 00000000000..a8536a0ecc7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2811.c @@ -0,0 +1,8 @@ +* Copyright (C) David A. Schleef + */ + + + * Author: ds + * Devices: [Data Translation] DT2811-PGL (dt2811-pgl), DT2811-PGH (dt2811-pgh) + * Status: works + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2811.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2811.c.yml new file mode 100644 index 00000000000..bfd8b86d35b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2811.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) David A. Schleef +holders: + - David A. Schleef +authors: + - ds Devices Data Translation diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2814.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2814.c new file mode 100644 index 00000000000..c7d2d7d9afa --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2814.c @@ -0,0 +1,10 @@ +* Copyright (C) 1998 David A. Schleef + */ +/* + + + * Author: ds + * Status: complete + * Devices: [Data Translation] DT2814 (dt2814) + * + * Configuration options: \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2814.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2814.c.yml new file mode 100644 index 00000000000..5551b169ddc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2814.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998 David A. Schleef +holders: + - David A. Schleef +authors: + - ds Status complete Devices Data Translation DT2814 diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2815.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2815.c new file mode 100644 index 00000000000..f12f462413b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2815.c @@ -0,0 +1,9 @@ +* Copyright (C) 1999 Anders Blomdell + */ +/* + + + * Author: ds + * Status: mostly complete, untested + * Devices: [Data Translation] DT2815 (dt2815) + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2815.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2815.c.yml new file mode 100644 index 00000000000..5c7e87719d3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2815.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999 Anders Blomdell +holders: + - Anders Blomdell +authors: + - ds Status diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2817.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2817.c new file mode 100644 index 00000000000..bd1667663ff --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2817.c @@ -0,0 +1,10 @@ +* Copyright (C) 1998 David A. Schleef + */ +/* + + + * Author: ds + * Status: complete + * Devices: [Data Translation] DT2817 (dt2817) + * + * A very simple digital I/O card. Four banks of 8 lines, each bank \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2817.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2817.c.yml new file mode 100644 index 00000000000..a58cda3fc42 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt2817.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998 David A. Schleef +holders: + - David A. Schleef +authors: + - ds Status complete Devices Data Translation DT2817 diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt282x.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt282x.c new file mode 100644 index 00000000000..fe358176897 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt282x.c @@ -0,0 +1,8 @@ +* Copyright (C) 1997-8 David A. Schleef + */ + + + * Author: ds + * Devices: [Data Translation] DT2821 (dt2821), DT2821-F-16SE (dt2821-f), + * DT2821-F-8DI (dt2821-f), DT2821-G-16SE (dt2821-g), + * DT2821-G-8DI (dt2821-g), DT2823 (dt2823), DT2824-PGH (dt2824-pgh), \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt282x.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt282x.c.yml new file mode 100644 index 00000000000..38c625789e6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/dt282x.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1997-8 David A. Schleef +holders: + - David A. Schleef +authors: + - ds Devices diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_atmio.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_atmio.c new file mode 100644 index 00000000000..26e2e36af7b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_atmio.c @@ -0,0 +1,13 @@ +* Copyright (C) 1997-2001 David A. Schleef + */ + + + * Author: ds + * Devices: [National Instruments] AT-MIO-16E-1 (ni_atmio), + * AT-MIO-16E-2, AT-MIO-16E-10, AT-MIO-16DE-10, AT-MIO-64E-3, + * AT-MIO-16XE-50, AT-MIO-16XE-10, AT-AI-16XE-10 + + + * Interrupt support added by Truxton Fulton + * + * References for specifications: \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_atmio.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_atmio.c.yml new file mode 100644 index 00000000000..8f95ad9dbc8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_atmio.c.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1997-2001 David A. Schleef +holders: + - David A. Schleef +authors: + - ds Devices National Instruments + - Truxton Fulton diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_mio_cs.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_mio_cs.c new file mode 100644 index 00000000000..53b68d47912 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_mio_cs.c @@ -0,0 +1,8 @@ +* Copyright (C) 1997-2000 David A. Schleef + */ + + + * Author: ds + * Status: works + * Devices: [National Instruments] DAQCard-AI-16XE-50 (ni_mio_cs), + * DAQCard-AI-16E-4, DAQCard-6062E, DAQCard-6024E, DAQCard-6036E \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_mio_cs.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_mio_cs.c.yml new file mode 100644 index 00000000000..2174c40d703 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_mio_cs.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1997-2000 David A. Schleef +holders: + - David A. Schleef +authors: + - ds Status diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_pcidio.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_pcidio.c new file mode 100644 index 00000000000..fb0dd967e59 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_pcidio.c @@ -0,0 +1,8 @@ +* Copyright (C) 1999,2002 David A. Schleef + */ + + + * Author: ds + * Status: works + * Devices: [National Instruments] PCI-DIO-32HS (ni_pcidio) + * [National Instruments] PXI-6533, PCI-6533 (pxi-6533) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_pcidio.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_pcidio.c.yml new file mode 100644 index 00000000000..b5219f4369a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_pcidio.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999,2002 David A. Schleef +holders: + - David A. Schleef +authors: + - ds Status diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_pcimio.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_pcimio.c new file mode 100644 index 00000000000..866f69a878a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_pcimio.c @@ -0,0 +1,9 @@ +* Copyright (C) 1997-8 David A. Schleef + */ + + + * Author: ds, John Hallen, Frank Mori Hess, Rolf Mueller, Herbert Peremans, + * Herman Bruyninckx, Terry Barnaby + * Status: works + * Devices: [National Instruments] PCI-MIO-16XE-50 (ni_pcimio), + * PCI-MIO-16XE-10, PXI-6030E, PCI-MIO-16E-1, PCI-MIO-16E-4, PCI-6014, \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_pcimio.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_pcimio.c.yml new file mode 100644 index 00000000000..c8c50d39773 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/ni_pcimio.c.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1997-8 David A. Schleef +holders: + - David A. Schleef +authors: + - ds, John Hallen, Frank Mori Hess, Rolf Mueller, Herbert Peremans, Herman Bruyninckx, Terry + Barnaby Status diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/pcmad.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/pcmad.c new file mode 100644 index 00000000000..57f4058db95 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/pcmad.c @@ -0,0 +1,8 @@ +* Copyright (C) 2000,2001 David A. Schleef + */ + + + * Author: ds + * Status: untested + * + * This driver was written on a bet that I couldn't write a driver \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/pcmad.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/pcmad.c.yml new file mode 100644 index 00000000000..308d45cc255 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/comedi/drivers/pcmad.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000,2001 David A. Schleef +holders: + - David A. Schleef +authors: + - ds Status diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8192e/rtllib.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8192e/rtllib.h new file mode 100644 index 00000000000..2f6a2ce5b49 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8192e/rtllib.h @@ -0,0 +1,17 @@ +* remains copyright by the original authors + * + * Portions of the merged code are based on Host AP (software wireless + + + * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen + * + * Copyright (c) 2002-2003, Jouni Malinen + * + * Adaption to a generic IEEE 802.11 stack by James Ketrenos + * + * Copyright (c) 2004, Intel Corporation + * + * Modified for Realtek's wi-fi cards by Andrea Merello + * + * + * This program is free software; you can redistribute it and/or modify \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8192e/rtllib.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8192e/rtllib.h.yml new file mode 100644 index 00000000000..d1a1aaa587b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8192e/rtllib.h.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyright by the original + - Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen + - Copyright (c) 2002-2003, Jouni Malinen + - Copyright (c) 2004, Intel Corporation +holders: + - the original + - SSH Communications Security Corp and Jouni Malinen + - Jouni Malinen + - Intel Corporation +authors: + - James Ketrenos + - Andrea Merello diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8192u/ieee80211/ieee80211.h new file mode 100644 index 00000000000..49adb5c0a8f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8192u/ieee80211/ieee80211.h @@ -0,0 +1,2453 @@ +/* + * Merged with mainline ieee80211.h in Aug 2004. Original ieee802_11 + * remains copyright by the original authors + * + * Portions of the merged code are based on Host AP (software wireless + * LAN access point) driver for Intersil Prism2/2.5/3. + * + * Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen + * + * Copyright (c) 2002-2003, Jouni Malinen + * + * Adaption to a generic IEEE 802.11 stack by James Ketrenos + * + * Copyright (c) 2004, Intel Corporation + * + * Modified for Realtek's wi-fi cards by Andrea Merello + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. See README and COPYING for + * more details. + */ +#ifndef IEEE80211_H +#define IEEE80211_H +#include /* ETH_ALEN */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "rtl819x_HT.h" +#include "rtl819x_BA.h" +#include "rtl819x_TS.h" + + +#ifndef IW_MODE_MONITOR +#define IW_MODE_MONITOR 6 +#endif + +#ifndef IWEVCUSTOM +#define IWEVCUSTOM 0x8c02 +#endif + +#define KEY_TYPE_NA 0x0 +#define KEY_TYPE_WEP40 0x1 +#define KEY_TYPE_TKIP 0x2 +#define KEY_TYPE_CCMP 0x4 +#define KEY_TYPE_WEP104 0x5 + +/* added for rtl819x tx procedure */ +#define MAX_QUEUE_SIZE 0x10 + +// +// 8190 queue mapping +// +#define BK_QUEUE 0 +#define BE_QUEUE 1 +#define VI_QUEUE 2 +#define VO_QUEUE 3 +#define HCCA_QUEUE 4 +#define TXCMD_QUEUE 5 +#define MGNT_QUEUE 6 +#define HIGH_QUEUE 7 +#define BEACON_QUEUE 8 + +#define LOW_QUEUE BE_QUEUE +#define NORMAL_QUEUE MGNT_QUEUE + +//added by amy for ps +#define SWRF_TIMEOUT 50 + +//added by amy for LEAP related +#define IE_CISCO_FLAG_POSITION 0x08 // Flag byte: byte 8, numbered from 0. +#define SUPPORT_CKIP_MIC 0x08 // bit3 +#define SUPPORT_CKIP_PK 0x10 // bit4 +/* defined for skb cb field */ +/* At most 28 byte */ +struct cb_desc { + /* Tx Desc Related flags (8-9) */ + u8 bLastIniPkt:1; + u8 bCmdOrInit:1; + u8 bFirstSeg:1; + u8 bLastSeg:1; + u8 bEncrypt:1; + u8 bTxDisableRateFallBack:1; + u8 bTxUseDriverAssingedRate:1; + u8 bHwSec:1; //indicate whether use Hw security. WB + + u8 reserved1; + + /* Tx Firmware Relaged flags (10-11)*/ + u8 bCTSEnable:1; + u8 bRTSEnable:1; + u8 bUseShortGI:1; + u8 bUseShortPreamble:1; + u8 bTxEnableFwCalcDur:1; + u8 bAMPDUEnable:1; + u8 bRTSSTBC:1; + u8 RTSSC:1; + + u8 bRTSBW:1; + u8 bPacketBW:1; + u8 bRTSUseShortPreamble:1; + u8 bRTSUseShortGI:1; + u8 bMulticast:1; + u8 bBroadcast:1; + //u8 reserved2:2; + u8 drv_agg_enable:1; + u8 reserved2:1; + + /* Tx Desc related element(12-19) */ + u8 rata_index; + u8 queue_index; + //u8 reserved3; + //u8 reserved4; + u16 txbuf_size; + //u8 reserved5; + u8 RATRIndex; + u8 reserved6; + u8 reserved7; + u8 reserved8; + + /* Tx firmware related element(20-27) */ + u8 data_rate; + u8 rts_rate; + u8 ampdu_factor; + u8 ampdu_density; + //u8 reserved9; + //u8 reserved10; + //u8 reserved11; + u8 DrvAggrNum; + u16 pkt_size; + u8 reserved12; +}; + +/*--------------------------Define -------------------------------------------*/ +#define MGN_1M 0x02 +#define MGN_2M 0x04 +#define MGN_5_5M 0x0b +#define MGN_11M 0x16 + +#define MGN_6M 0x0c +#define MGN_9M 0x12 +#define MGN_12M 0x18 +#define MGN_18M 0x24 +#define MGN_24M 0x30 +#define MGN_36M 0x48 +#define MGN_48M 0x60 +#define MGN_54M 0x6c + +#define MGN_MCS0 0x80 +#define MGN_MCS1 0x81 +#define MGN_MCS2 0x82 +#define MGN_MCS3 0x83 +#define MGN_MCS4 0x84 +#define MGN_MCS5 0x85 +#define MGN_MCS6 0x86 +#define MGN_MCS7 0x87 +#define MGN_MCS8 0x88 +#define MGN_MCS9 0x89 +#define MGN_MCS10 0x8a +#define MGN_MCS11 0x8b +#define MGN_MCS12 0x8c +#define MGN_MCS13 0x8d +#define MGN_MCS14 0x8e +#define MGN_MCS15 0x8f + +#define aSifsTime ((priv->ieee80211->current_network.mode == IEEE_A || \ + priv->ieee80211->current_network.mode == IEEE_N_24G || \ + priv->ieee80211->current_network.mode == IEEE_N_5G) ? \ + 16 : 10) + +#define MGMT_QUEUE_NUM 5 + +#define IEEE_CMD_SET_WPA_PARAM 1 +#define IEEE_CMD_SET_WPA_IE 2 +#define IEEE_CMD_SET_ENCRYPTION 3 +#define IEEE_CMD_MLME 4 + +#define IEEE_PARAM_WPA_ENABLED 1 +#define IEEE_PARAM_TKIP_COUNTERMEASURES 2 +#define IEEE_PARAM_DROP_UNENCRYPTED 3 +#define IEEE_PARAM_PRIVACY_INVOKED 4 +#define IEEE_PARAM_AUTH_ALGS 5 +#define IEEE_PARAM_IEEE_802_1X 6 +//It should consistent with the driver_XXX.c +// David, 2006.9.26 +#define IEEE_PARAM_WPAX_SELECT 7 +//Added for notify the encryption type selection +// David, 2006.9.26 +#define IEEE_PROTO_WPA 1 +#define IEEE_PROTO_RSN 2 +//Added for notify the encryption type selection +// David, 2006.9.26 +#define IEEE_WPAX_USEGROUP 0 +#define IEEE_WPAX_WEP40 1 +#define IEEE_WPAX_TKIP 2 +#define IEEE_WPAX_WRAP 3 +#define IEEE_WPAX_CCMP 4 +#define IEEE_WPAX_WEP104 5 + +#define IEEE_KEY_MGMT_IEEE8021X 1 +#define IEEE_KEY_MGMT_PSK 2 + +#define IEEE_MLME_STA_DEAUTH 1 +#define IEEE_MLME_STA_DISASSOC 2 + + +#define IEEE_CRYPT_ERR_UNKNOWN_ALG 2 +#define IEEE_CRYPT_ERR_UNKNOWN_ADDR 3 +#define IEEE_CRYPT_ERR_CRYPT_INIT_FAILED 4 +#define IEEE_CRYPT_ERR_KEY_SET_FAILED 5 +#define IEEE_CRYPT_ERR_TX_KEY_SET_FAILED 6 +#define IEEE_CRYPT_ERR_CARD_CONF_FAILED 7 + + +#define IEEE_CRYPT_ALG_NAME_LEN 16 + +#define MAX_IE_LEN 0xff + +// added for kernel conflict +#define ieee80211_crypt_deinit_entries ieee80211_crypt_deinit_entries_rsl +#define ieee80211_crypt_deinit_handler ieee80211_crypt_deinit_handler_rsl +#define ieee80211_crypt_delayed_deinit ieee80211_crypt_delayed_deinit_rsl +#define ieee80211_register_crypto_ops ieee80211_register_crypto_ops_rsl +#define ieee80211_unregister_crypto_ops ieee80211_unregister_crypto_ops_rsl +#define ieee80211_get_crypto_ops ieee80211_get_crypto_ops_rsl + +#define ieee80211_ccmp_null ieee80211_ccmp_null_rsl + +#define ieee80211_tkip_null ieee80211_tkip_null_rsl + +#define free_ieee80211 free_ieee80211_rsl +#define alloc_ieee80211 alloc_ieee80211_rsl + +#define ieee80211_rx ieee80211_rx_rsl +#define ieee80211_rx_mgt ieee80211_rx_mgt_rsl + +#define ieee80211_get_beacon ieee80211_get_beacon_rsl +#define ieee80211_wake_queue ieee80211_wake_queue_rsl +#define ieee80211_stop_queue ieee80211_stop_queue_rsl +#define ieee80211_reset_queue ieee80211_reset_queue_rsl +#define ieee80211_softmac_stop_protocol ieee80211_softmac_stop_protocol_rsl +#define ieee80211_softmac_start_protocol ieee80211_softmac_start_protocol_rsl +#define ieee80211_is_shortslot ieee80211_is_shortslot_rsl +#define ieee80211_is_54g ieee80211_is_54g_rsl +#define ieee80211_wpa_supplicant_ioctl ieee80211_wpa_supplicant_ioctl_rsl +#define ieee80211_ps_tx_ack ieee80211_ps_tx_ack_rsl +#define ieee80211_softmac_xmit ieee80211_softmac_xmit_rsl +#define ieee80211_stop_send_beacons ieee80211_stop_send_beacons_rsl +#define notify_wx_assoc_event notify_wx_assoc_event_rsl +#define SendDisassociation SendDisassociation_rsl +#define ieee80211_disassociate ieee80211_disassociate_rsl +#define ieee80211_start_send_beacons ieee80211_start_send_beacons_rsl +#define ieee80211_stop_scan ieee80211_stop_scan_rsl +#define ieee80211_send_probe_requests ieee80211_send_probe_requests_rsl +#define ieee80211_softmac_scan_syncro ieee80211_softmac_scan_syncro_rsl +#define ieee80211_start_scan_syncro ieee80211_start_scan_syncro_rsl + +#define ieee80211_wx_get_essid ieee80211_wx_get_essid_rsl +#define ieee80211_wx_set_essid ieee80211_wx_set_essid_rsl +#define ieee80211_wx_set_rate ieee80211_wx_set_rate_rsl +#define ieee80211_wx_get_rate ieee80211_wx_get_rate_rsl +#define ieee80211_wx_set_wap ieee80211_wx_set_wap_rsl +#define ieee80211_wx_get_wap ieee80211_wx_get_wap_rsl +#define ieee80211_wx_set_mode ieee80211_wx_set_mode_rsl +#define ieee80211_wx_get_mode ieee80211_wx_get_mode_rsl +#define ieee80211_wx_set_scan ieee80211_wx_set_scan_rsl +#define ieee80211_wx_get_freq ieee80211_wx_get_freq_rsl +#define ieee80211_wx_set_freq ieee80211_wx_set_freq_rsl +#define ieee80211_wx_set_rawtx ieee80211_wx_set_rawtx_rsl +#define ieee80211_wx_get_name ieee80211_wx_get_name_rsl +#define ieee80211_wx_set_power ieee80211_wx_set_power_rsl +#define ieee80211_wx_get_power ieee80211_wx_get_power_rsl +#define ieee80211_wlan_frequencies ieee80211_wlan_frequencies_rsl +#define ieee80211_wx_set_rts ieee80211_wx_set_rts_rsl +#define ieee80211_wx_get_rts ieee80211_wx_get_rts_rsl + +#define ieee80211_txb_free ieee80211_txb_free_rsl + +#define ieee80211_wx_set_gen_ie ieee80211_wx_set_gen_ie_rsl +#define ieee80211_wx_get_scan ieee80211_wx_get_scan_rsl +#define ieee80211_wx_set_encode ieee80211_wx_set_encode_rsl +#define ieee80211_wx_get_encode ieee80211_wx_get_encode_rsl +#define ieee80211_wx_set_mlme ieee80211_wx_set_mlme_rsl +#define ieee80211_wx_set_auth ieee80211_wx_set_auth_rsl +#define ieee80211_wx_set_encode_ext ieee80211_wx_set_encode_ext_rsl +#define ieee80211_wx_get_encode_ext ieee80211_wx_get_encode_ext_rsl + + +typedef struct ieee_param { + u32 cmd; + u8 sta_addr[ETH_ALEN]; + union { + struct { + u8 name; + u32 value; + } wpa_param; + struct { + u32 len; + u8 reserved[32]; + u8 data[0]; + } wpa_ie; + struct{ + int command; + int reason_code; + } mlme; + struct { + u8 alg[IEEE_CRYPT_ALG_NAME_LEN]; + u8 set_tx; + u32 err; + u8 idx; + u8 seq[8]; /* sequence counter (set: RX, get: TX) */ + u16 key_len; + u8 key[0]; + } crypt; + } u; +} ieee_param; + + +// linux under 2.6.9 release may not support it, so modify it for common use +#define IEEE80211_DATA_LEN 2304 +/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section + * 6.2.1.1.2. + * + * The figure in section 7.1.2 suggests a body size of up to 2312 + * bytes is allowed, which is a bit confusing, I suspect this + * represents the 2304 bytes of real data, plus a possible 8 bytes of + * WEP IV and ICV. (this interpretation suggested by Ramiro Barreiro) + */ +#define IEEE80211_1ADDR_LEN 10 +#define IEEE80211_2ADDR_LEN 16 +#define IEEE80211_3ADDR_LEN 24 +#define IEEE80211_4ADDR_LEN 30 +#define IEEE80211_FCS_LEN 4 +#define IEEE80211_HLEN (IEEE80211_4ADDR_LEN) +#define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN) +#define IEEE80211_MGMT_HDR_LEN 24 +#define IEEE80211_DATA_HDR3_LEN 24 +#define IEEE80211_DATA_HDR4_LEN 30 + +#define MIN_FRAG_THRESHOLD 256U +#define MAX_FRAG_THRESHOLD 2346U + + +/* Frame control field constants */ +#define IEEE80211_FCTL_VERS 0x0003 +#define IEEE80211_FCTL_FTYPE 0x000c +#define IEEE80211_FCTL_STYPE 0x00f0 +#define IEEE80211_FCTL_FRAMETYPE 0x00fc +#define IEEE80211_FCTL_TODS 0x0100 +#define IEEE80211_FCTL_FROMDS 0x0200 +#define IEEE80211_FCTL_DSTODS 0x0300 //added by david +#define IEEE80211_FCTL_MOREFRAGS 0x0400 +#define IEEE80211_FCTL_RETRY 0x0800 +#define IEEE80211_FCTL_PM 0x1000 +#define IEEE80211_FCTL_MOREDATA 0x2000 +#define IEEE80211_FCTL_WEP 0x4000 +#define IEEE80211_FCTL_ORDER 0x8000 + +#define IEEE80211_FTYPE_MGMT 0x0000 +#define IEEE80211_FTYPE_CTL 0x0004 +#define IEEE80211_FTYPE_DATA 0x0008 + +/* management */ +#define IEEE80211_STYPE_ASSOC_REQ 0x0000 +#define IEEE80211_STYPE_ASSOC_RESP 0x0010 +#define IEEE80211_STYPE_REASSOC_REQ 0x0020 +#define IEEE80211_STYPE_REASSOC_RESP 0x0030 +#define IEEE80211_STYPE_PROBE_REQ 0x0040 +#define IEEE80211_STYPE_PROBE_RESP 0x0050 +#define IEEE80211_STYPE_BEACON 0x0080 +#define IEEE80211_STYPE_ATIM 0x0090 +#define IEEE80211_STYPE_DISASSOC 0x00A0 +#define IEEE80211_STYPE_AUTH 0x00B0 +#define IEEE80211_STYPE_DEAUTH 0x00C0 +#define IEEE80211_STYPE_MANAGE_ACT 0x00D0 + +/* control */ +#define IEEE80211_STYPE_PSPOLL 0x00A0 +#define IEEE80211_STYPE_RTS 0x00B0 +#define IEEE80211_STYPE_CTS 0x00C0 +#define IEEE80211_STYPE_ACK 0x00D0 +#define IEEE80211_STYPE_CFEND 0x00E0 +#define IEEE80211_STYPE_CFENDACK 0x00F0 +#define IEEE80211_STYPE_BLOCKACK 0x0094 + +/* data */ +#define IEEE80211_STYPE_DATA 0x0000 +#define IEEE80211_STYPE_DATA_CFACK 0x0010 +#define IEEE80211_STYPE_DATA_CFPOLL 0x0020 +#define IEEE80211_STYPE_DATA_CFACKPOLL 0x0030 +#define IEEE80211_STYPE_NULLFUNC 0x0040 +#define IEEE80211_STYPE_CFACK 0x0050 +#define IEEE80211_STYPE_CFPOLL 0x0060 +#define IEEE80211_STYPE_CFACKPOLL 0x0070 +#define IEEE80211_STYPE_QOS_DATA 0x0080 //added for WMM 2006/8/2 +#define IEEE80211_STYPE_QOS_NULL 0x00C0 + +#define IEEE80211_SCTL_FRAG 0x000F +#define IEEE80211_SCTL_SEQ 0xFFF0 + +/* QOS control */ +#define IEEE80211_QCTL_TID 0x000F + +#define FC_QOS_BIT BIT(7) +#define IsDataFrame(pdu) (((pdu[0] & 0x0C) == 0x08) ? true : false) +#define IsLegacyDataFrame(pdu) (IsDataFrame(pdu) && (!(pdu[0] & FC_QOS_BIT))) +//added by wb. Is this right? +#define IsQoSDataFrame(pframe) ((*(u16 *)pframe & (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA)) == (IEEE80211_STYPE_QOS_DATA | IEEE80211_FTYPE_DATA)) +#define Frame_Order(pframe) (*(u16 *)pframe & IEEE80211_FCTL_ORDER) +#define SN_LESS(a, b) (((a - b) & 0x800) != 0) +#define SN_EQUAL(a, b) (a == b) +#define MAX_DEV_ADDR_SIZE 8 +typedef enum _ACT_CATEGORY { + ACT_CAT_QOS = 1, + ACT_CAT_DLS = 2, + ACT_CAT_BA = 3, + ACT_CAT_HT = 7, + ACT_CAT_WMM = 17, +} ACT_CATEGORY, *PACT_CATEGORY; + +typedef enum _TS_ACTION { + ACT_ADDTSREQ = 0, + ACT_ADDTSRSP = 1, + ACT_DELTS = 2, + ACT_SCHEDULE = 3, +} TS_ACTION, *PTS_ACTION; + +typedef enum _BA_ACTION { + ACT_ADDBAREQ = 0, + ACT_ADDBARSP = 1, + ACT_DELBA = 2, +} BA_ACTION, *PBA_ACTION; + +typedef enum _InitialGainOpType { + IG_Backup = 0, + IG_Restore, + IG_Max +} InitialGainOpType; + +/* debug macros */ +#define CONFIG_IEEE80211_DEBUG +#ifdef CONFIG_IEEE80211_DEBUG +extern u32 ieee80211_debug_level; +#define IEEE80211_DEBUG(level, fmt, args...) \ +do { if (ieee80211_debug_level & (level)) \ + printk(KERN_DEBUG "ieee80211: " fmt, ## args); } while (0) +//wb added to debug out data buf +//if you want print DATA buffer related BA, please set ieee80211_debug_level to DATA|BA +#define IEEE80211_DEBUG_DATA(level, data, datalen) \ + do { if ((ieee80211_debug_level & (level)) == (level)) \ + { \ + int i; \ + u8 *pdata = (u8 *) data; \ + printk(KERN_DEBUG "ieee80211: %s()\n", __func__); \ + for (i = 0; i < (int)(datalen); i++) \ + { \ + printk("%2x ", pdata[i]); \ + if ((i + 1) % 16 == 0) printk("\n"); \ + } \ + printk("\n"); \ + } \ + } while (0) +#else +#define IEEE80211_DEBUG (level, fmt, args...) do {} while (0) +#define IEEE80211_DEBUG_DATA (level, data, datalen) do {} while(0) +#endif /* CONFIG_IEEE80211_DEBUG */ + +/* debug macros not dependent on CONFIG_IEEE80211_DEBUG */ + +/* + * To use the debug system; + * + * If you are defining a new debug classification, simply add it to the #define + * list here in the form of: + * + * #define IEEE80211_DL_xxxx VALUE + * + * shifting value to the left one bit from the previous entry. xxxx should be + * the name of the classification (for example, WEP) + * + * You then need to either add a IEEE80211_xxxx_DEBUG() macro definition for your + * classification, or use IEEE80211_DEBUG(IEEE80211_DL_xxxx, ...) whenever you want + * to send output to that classification. + * + * To add your debug level to the list of levels seen when you perform + * + * % cat /proc/net/ipw/debug_level + * + * you simply need to add your entry to the ipw_debug_levels array. + * + * If you do not see debug_level in /proc/net/ipw then you do not have + * CONFIG_IEEE80211_DEBUG defined in your kernel configuration + * + */ + +#define IEEE80211_DL_INFO (1<<0) +#define IEEE80211_DL_WX (1<<1) +#define IEEE80211_DL_SCAN (1<<2) +#define IEEE80211_DL_STATE (1<<3) +#define IEEE80211_DL_MGMT (1<<4) +#define IEEE80211_DL_FRAG (1<<5) +#define IEEE80211_DL_EAP (1<<6) +#define IEEE80211_DL_DROP (1<<7) + +#define IEEE80211_DL_TX (1<<8) +#define IEEE80211_DL_RX (1<<9) + +#define IEEE80211_DL_HT (1<<10) //HT +#define IEEE80211_DL_BA (1<<11) //ba +#define IEEE80211_DL_TS (1<<12) //TS +#define IEEE80211_DL_QOS (1<<13) +#define IEEE80211_DL_REORDER (1<<14) +#define IEEE80211_DL_IOT (1<<15) +#define IEEE80211_DL_IPS (1<<16) +#define IEEE80211_DL_TRACE (1<<29) //trace function, need to user net_ratelimit() together in order not to print too much to the screen +#define IEEE80211_DL_DATA (1<<30) //use this flag to control whether print data buf out. +#define IEEE80211_DL_ERR (1<<31) //always open +#define IEEE80211_ERROR(f, a...) printk(KERN_ERR "ieee80211: " f, ## a) +#define IEEE80211_WARNING(f, a...) printk(KERN_WARNING "ieee80211: " f, ## a) +#define IEEE80211_DEBUG_INFO(f, a...) IEEE80211_DEBUG(IEEE80211_DL_INFO, f, ## a) + +#define IEEE80211_DEBUG_WX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_WX, f, ## a) +#define IEEE80211_DEBUG_SCAN(f, a...) IEEE80211_DEBUG(IEEE80211_DL_SCAN, f, ## a) +#define IEEE80211_DEBUG_STATE(f, a...) IEEE80211_DEBUG(IEEE80211_DL_STATE, f, ## a) +#define IEEE80211_DEBUG_MGMT(f, a...) IEEE80211_DEBUG(IEEE80211_DL_MGMT, f, ## a) +#define IEEE80211_DEBUG_FRAG(f, a...) IEEE80211_DEBUG(IEEE80211_DL_FRAG, f, ## a) +#define IEEE80211_DEBUG_EAP(f, a...) IEEE80211_DEBUG(IEEE80211_DL_EAP, f, ## a) +#define IEEE80211_DEBUG_DROP(f, a...) IEEE80211_DEBUG(IEEE80211_DL_DROP, f, ## a) +#define IEEE80211_DEBUG_TX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_TX, f, ## a) +#define IEEE80211_DEBUG_RX(f, a...) IEEE80211_DEBUG(IEEE80211_DL_RX, f, ## a) +#define IEEE80211_DEBUG_QOS(f, a...) IEEE80211_DEBUG(IEEE80211_DL_QOS, f, ## a) + +#include /* ARPHRD_ETHER */ + +#ifndef WIRELESS_SPY +#define WIRELESS_SPY // enable iwspy support +#endif +#include // new driver API + +#ifndef ETH_P_PAE +#define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ +#endif /* ETH_P_PAE */ + +#define ETH_P_PREAUTH 0x88C7 /* IEEE 802.11i pre-authentication */ + +#ifndef ETH_P_80211_RAW +#define ETH_P_80211_RAW (ETH_P_ECONET + 1) +#endif + +/* IEEE 802.11 defines */ + +#define P80211_OUI_LEN 3 + +struct ieee80211_snap_hdr { + + u8 dsap; /* always 0xAA */ + u8 ssap; /* always 0xAA */ + u8 ctrl; /* always 0x03 */ + u8 oui[P80211_OUI_LEN]; /* organizational universal id */ + +} __packed; + +#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr) + +#define WLAN_FC_GET_VERS(fc) ((fc) & IEEE80211_FCTL_VERS) +#define WLAN_FC_GET_TYPE(fc) ((fc) & IEEE80211_FCTL_FTYPE) +#define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE) + +#define WLAN_FC_GET_FRAMETYPE(fc) ((fc) & IEEE80211_FCTL_FRAMETYPE) +#define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG) +#define WLAN_GET_SEQ_SEQ(seq) (((seq) & IEEE80211_SCTL_SEQ) >> 4) + +#define WLAN_CAPABILITY_BSS (1<<0) +#define WLAN_CAPABILITY_IBSS (1<<1) +#define WLAN_CAPABILITY_CF_POLLABLE (1<<2) +#define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3) +#define WLAN_CAPABILITY_PRIVACY (1<<4) +#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5) +#define WLAN_CAPABILITY_PBCC (1<<6) +#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7) +#define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8) +#define WLAN_CAPABILITY_QOS (1<<9) +#define WLAN_CAPABILITY_SHORT_SLOT (1<<10) +#define WLAN_CAPABILITY_DSSS_OFDM (1<<13) + +/* 802.11g ERP information element */ +#define WLAN_ERP_NON_ERP_PRESENT (1<<0) +#define WLAN_ERP_USE_PROTECTION (1<<1) +#define WLAN_ERP_BARKER_PREAMBLE (1<<2) + +#define IEEE80211_STATMASK_SIGNAL (1<<0) +#define IEEE80211_STATMASK_RSSI (1<<1) +#define IEEE80211_STATMASK_NOISE (1<<2) +#define IEEE80211_STATMASK_RATE (1<<3) +#define IEEE80211_STATMASK_WEMASK 0x7 + +#define IEEE80211_CCK_MODULATION (1<<0) +#define IEEE80211_OFDM_MODULATION (1<<1) + +#define IEEE80211_24GHZ_BAND (1<<0) +#define IEEE80211_52GHZ_BAND (1<<1) + +#define IEEE80211_CCK_RATE_LEN 4 +#define IEEE80211_CCK_RATE_1MB 0x02 +#define IEEE80211_CCK_RATE_2MB 0x04 +#define IEEE80211_CCK_RATE_5MB 0x0B +#define IEEE80211_CCK_RATE_11MB 0x16 +#define IEEE80211_OFDM_RATE_LEN 8 +#define IEEE80211_OFDM_RATE_6MB 0x0C +#define IEEE80211_OFDM_RATE_9MB 0x12 +#define IEEE80211_OFDM_RATE_12MB 0x18 +#define IEEE80211_OFDM_RATE_18MB 0x24 +#define IEEE80211_OFDM_RATE_24MB 0x30 +#define IEEE80211_OFDM_RATE_36MB 0x48 +#define IEEE80211_OFDM_RATE_48MB 0x60 +#define IEEE80211_OFDM_RATE_54MB 0x6C +#define IEEE80211_BASIC_RATE_MASK 0x80 + +#define IEEE80211_CCK_RATE_1MB_MASK (1<<0) +#define IEEE80211_CCK_RATE_2MB_MASK (1<<1) +#define IEEE80211_CCK_RATE_5MB_MASK (1<<2) +#define IEEE80211_CCK_RATE_11MB_MASK (1<<3) +#define IEEE80211_OFDM_RATE_6MB_MASK (1<<4) +#define IEEE80211_OFDM_RATE_9MB_MASK (1<<5) +#define IEEE80211_OFDM_RATE_12MB_MASK (1<<6) +#define IEEE80211_OFDM_RATE_18MB_MASK (1<<7) +#define IEEE80211_OFDM_RATE_24MB_MASK (1<<8) +#define IEEE80211_OFDM_RATE_36MB_MASK (1<<9) +#define IEEE80211_OFDM_RATE_48MB_MASK (1<<10) +#define IEEE80211_OFDM_RATE_54MB_MASK (1<<11) + +#define IEEE80211_CCK_RATES_MASK 0x0000000F +#define IEEE80211_CCK_BASIC_RATES_MASK (IEEE80211_CCK_RATE_1MB_MASK | \ + IEEE80211_CCK_RATE_2MB_MASK) +#define IEEE80211_CCK_DEFAULT_RATES_MASK (IEEE80211_CCK_BASIC_RATES_MASK | \ + IEEE80211_CCK_RATE_5MB_MASK | \ + IEEE80211_CCK_RATE_11MB_MASK) + +#define IEEE80211_OFDM_RATES_MASK 0x00000FF0 +#define IEEE80211_OFDM_BASIC_RATES_MASK (IEEE80211_OFDM_RATE_6MB_MASK | \ + IEEE80211_OFDM_RATE_12MB_MASK | \ + IEEE80211_OFDM_RATE_24MB_MASK) +#define IEEE80211_OFDM_DEFAULT_RATES_MASK (IEEE80211_OFDM_BASIC_RATES_MASK | \ + IEEE80211_OFDM_RATE_9MB_MASK | \ + IEEE80211_OFDM_RATE_18MB_MASK | \ + IEEE80211_OFDM_RATE_36MB_MASK | \ + IEEE80211_OFDM_RATE_48MB_MASK | \ + IEEE80211_OFDM_RATE_54MB_MASK) +#define IEEE80211_DEFAULT_RATES_MASK (IEEE80211_OFDM_DEFAULT_RATES_MASK | \ + IEEE80211_CCK_DEFAULT_RATES_MASK) + +#define IEEE80211_NUM_OFDM_RATES 8 +#define IEEE80211_NUM_CCK_RATES 4 +#define IEEE80211_OFDM_SHIFT_MASK_A 4 + + +/* this is stolen and modified from the madwifi driver*/ +#define IEEE80211_FC0_TYPE_MASK 0x0c +#define IEEE80211_FC0_TYPE_DATA 0x08 +#define IEEE80211_FC0_SUBTYPE_MASK 0xB0 +#define IEEE80211_FC0_SUBTYPE_QOS 0x80 + +#define IEEE80211_QOS_HAS_SEQ(fc) \ + (((fc) & (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_MASK)) == \ + (IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_QOS)) + +/* this is stolen from ipw2200 driver */ +#define IEEE_IBSS_MAC_HASH_SIZE 31 +struct ieee_ibss_seq { + u8 mac[ETH_ALEN]; + u16 seq_num[17]; + u16 frag_num[17]; + unsigned long packet_time[17]; + struct list_head list; +}; + +/* NOTE: This data is for statistical purposes; not all hardware provides this + * information for frames received. Not setting these will not cause + * any adverse affects. + */ +struct ieee80211_rx_stats { + u32 mac_time[2]; + s8 rssi; + u8 signal; + u8 noise; + u16 rate; /* in 100 kbps */ + u8 received_channel; + u8 control; + u8 mask; + u8 freq; + u16 len; + u64 tsf; + u32 beacon_time; + u8 nic_type; + u16 Length; + // u8 DataRate; // In 0.5 Mbps + u8 SignalQuality; // in 0-100 index. + s32 RecvSignalPower; // Real power in dBm for this packet, no beautification and aggregation. + s8 RxPower; // in dBm Translate from PWdB + u8 SignalStrength; // in 0-100 index. + u16 bHwError:1; + u16 bCRC:1; + u16 bICV:1; + u16 bShortPreamble:1; + u16 Antenna:1; //for rtl8185 + u16 Decrypted:1; //for rtl8185, rtl8187 + u16 Wakeup:1; //for rtl8185 + u16 Reserved0:1; //for rtl8185 + u8 AGC; + u32 TimeStampLow; + u32 TimeStampHigh; + bool bShift; + bool bIsQosData; // Added by Annie, 2005-12-22. + u8 UserPriority; + + //1!!!!!!!!!!!!!!!!!!!!!!!!!!! + //1Attention Please!!!<11n or 8190 specific code should be put below this line> + //1!!!!!!!!!!!!!!!!!!!!!!!!!!! + + u8 RxDrvInfoSize; + u8 RxBufShift; + bool bIsAMPDU; + bool bFirstMPDU; + bool bContainHTC; + bool RxIs40MHzPacket; + u32 RxPWDBAll; + u8 RxMIMOSignalStrength[4]; // in 0~100 index + s8 RxMIMOSignalQuality[2]; + bool bPacketMatchBSSID; + bool bIsCCK; + bool bPacketToSelf; + //added by amy + u8 *virtual_address; + u16 packetlength; // Total packet length: Must equal to sum of all FragLength + u16 fraglength; // FragLength should equal to PacketLength in non-fragment case + u16 fragoffset; // Data offset for this fragment + u16 ntotalfrag; + bool bisrxaggrsubframe; + bool bPacketBeacon; //cosa add for rssi + bool bToSelfBA; //cosa add for rssi + s8 cck_adc_pwdb[4]; //cosa add for rx path selection + u16 Seq_Num; + +}; + +/* IEEE 802.11 requires that STA supports concurrent reception of at least + * three fragmented frames. This define can be increased to support more + * concurrent frames, but it should be noted that each entry can consume about + * 2 kB of RAM and increasing cache size will slow down frame reassembly. + */ +#define IEEE80211_FRAG_CACHE_LEN 4 + +struct ieee80211_frag_entry { + unsigned long first_frag_time; + unsigned int seq; + unsigned int last_frag; + struct sk_buff *skb; + u8 src_addr[ETH_ALEN]; + u8 dst_addr[ETH_ALEN]; +}; + +struct ieee80211_stats { + unsigned int tx_unicast_frames; + unsigned int tx_multicast_frames; + unsigned int tx_fragments; + unsigned int tx_unicast_octets; + unsigned int tx_multicast_octets; + unsigned int tx_deferred_transmissions; + unsigned int tx_single_retry_frames; + unsigned int tx_multiple_retry_frames; + unsigned int tx_retry_limit_exceeded; + unsigned int tx_discards; + unsigned int rx_unicast_frames; + unsigned int rx_multicast_frames; + unsigned int rx_fragments; + unsigned int rx_unicast_octets; + unsigned int rx_multicast_octets; + unsigned int rx_fcs_errors; + unsigned int rx_discards_no_buffer; + unsigned int tx_discards_wrong_sa; + unsigned int rx_discards_undecryptable; + unsigned int rx_message_in_msg_fragments; + unsigned int rx_message_in_bad_msg_fragments; +}; + +struct ieee80211_device; + +#include "ieee80211_crypt.h" + +#define SEC_KEY_1 (1<<0) +#define SEC_KEY_2 (1<<1) +#define SEC_KEY_3 (1<<2) +#define SEC_KEY_4 (1<<3) +#define SEC_ACTIVE_KEY (1<<4) +#define SEC_AUTH_MODE (1<<5) +#define SEC_UNICAST_GROUP (1<<6) +#define SEC_LEVEL (1<<7) +#define SEC_ENABLED (1<<8) +#define SEC_ENCRYPT (1<<9) + +#define SEC_LEVEL_0 0 /* None */ +#define SEC_LEVEL_1 1 /* WEP 40 and 104 bit */ +#define SEC_LEVEL_2 2 /* Level 1 + TKIP */ +#define SEC_LEVEL_2_CKIP 3 /* Level 1 + CKIP */ +#define SEC_LEVEL_3 4 /* Level 2 + CCMP */ + +#define SEC_ALG_NONE 0 +#define SEC_ALG_WEP 1 +#define SEC_ALG_TKIP 2 +#define SEC_ALG_CCMP 3 + +#define WEP_KEYS 4 +#define WEP_KEY_LEN 13 +#define SCM_KEY_LEN 32 +#define SCM_TEMPORAL_KEY_LENGTH 16 + +struct ieee80211_security { + u16 active_key:2, + enabled:1, + auth_algo:4, + unicast_uses_group:1, + encrypt:1; + u8 auth_mode; + u8 key_sizes[WEP_KEYS]; + u8 keys[WEP_KEYS][SCM_KEY_LEN]; + u8 level; + u16 flags; +} __packed; + + +/* + * 802.11 data frame from AP + * ,-------------------------------------------------------------------. + * Bytes | 2 | 2 | 6 | 6 | 6 | 2 | 0..2312 | 4 | + * |------|------|---------|---------|---------|------|---------|------| + * Desc. | ctrl | dura | DA/RA | TA | SA | Sequ | frame | fcs | + * | | tion | (BSSID) | | | ence | data | | + * `-------------------------------------------------------------------' + * Total: 28-2340 bytes + */ + +/* Management Frame Information Element Types */ +enum ieee80211_mfie { + MFIE_TYPE_SSID = 0, + MFIE_TYPE_RATES = 1, + MFIE_TYPE_FH_SET = 2, + MFIE_TYPE_DS_SET = 3, + MFIE_TYPE_CF_SET = 4, + MFIE_TYPE_TIM = 5, + MFIE_TYPE_IBSS_SET = 6, + MFIE_TYPE_COUNTRY = 7, + MFIE_TYPE_HOP_PARAMS = 8, + MFIE_TYPE_HOP_TABLE = 9, + MFIE_TYPE_REQUEST = 10, + MFIE_TYPE_CHALLENGE = 16, + MFIE_TYPE_POWER_CONSTRAINT = 32, + MFIE_TYPE_POWER_CAPABILITY = 33, + MFIE_TYPE_TPC_REQUEST = 34, + MFIE_TYPE_TPC_REPORT = 35, + MFIE_TYPE_SUPP_CHANNELS = 36, + MFIE_TYPE_CSA = 37, + MFIE_TYPE_MEASURE_REQUEST = 38, + MFIE_TYPE_MEASURE_REPORT = 39, + MFIE_TYPE_QUIET = 40, + MFIE_TYPE_IBSS_DFS = 41, + MFIE_TYPE_ERP = 42, + MFIE_TYPE_RSN = 48, + MFIE_TYPE_RATES_EX = 50, + MFIE_TYPE_HT_CAP = 45, + MFIE_TYPE_HT_INFO = 61, + MFIE_TYPE_AIRONET = 133, + MFIE_TYPE_GENERIC = 221, + MFIE_TYPE_QOS_PARAMETER = 222, +}; + +/* Minimal header; can be used for passing 802.11 frames with sufficient + * information to determine what type of underlying data type is actually + * stored in the data. + */ +struct rtl_80211_hdr { + __le16 frame_ctl; + __le16 duration_id; + u8 payload[0]; +} __packed; + +struct rtl_80211_hdr_1addr { + __le16 frame_ctl; + __le16 duration_id; + u8 addr1[ETH_ALEN]; + u8 payload[0]; +} __packed; + +struct rtl_80211_hdr_2addr { + __le16 frame_ctl; + __le16 duration_id; + u8 addr1[ETH_ALEN]; + u8 addr2[ETH_ALEN]; + u8 payload[0]; +} __packed; + +struct rtl_80211_hdr_3addr { + __le16 frame_ctl; + __le16 duration_id; + u8 addr1[ETH_ALEN]; + u8 addr2[ETH_ALEN]; + u8 addr3[ETH_ALEN]; + __le16 seq_ctl; + u8 payload[0]; +} __packed; + +struct rtl_80211_hdr_4addr { + __le16 frame_ctl; + __le16 duration_id; + u8 addr1[ETH_ALEN]; + u8 addr2[ETH_ALEN]; + u8 addr3[ETH_ALEN]; + __le16 seq_ctl; + u8 addr4[ETH_ALEN]; + u8 payload[0]; +} __packed; + +struct rtl_80211_hdr_3addrqos { + __le16 frame_ctl; + __le16 duration_id; + u8 addr1[ETH_ALEN]; + u8 addr2[ETH_ALEN]; + u8 addr3[ETH_ALEN]; + __le16 seq_ctl; + u8 payload[0]; + __le16 qos_ctl; +} __packed; + +struct rtl_80211_hdr_4addrqos { + __le16 frame_ctl; + __le16 duration_id; + u8 addr1[ETH_ALEN]; + u8 addr2[ETH_ALEN]; + u8 addr3[ETH_ALEN]; + __le16 seq_ctl; + u8 addr4[ETH_ALEN]; + u8 payload[0]; + __le16 qos_ctl; +} __packed; + +struct ieee80211_info_element { + u8 id; + u8 len; + u8 data[0]; +} __packed; + +struct ieee80211_authentication { + struct rtl_80211_hdr_3addr header; + __le16 algorithm; + __le16 transaction; + __le16 status; + /*challenge*/ + struct ieee80211_info_element info_element[0]; +} __packed; + +struct ieee80211_disassoc { + struct rtl_80211_hdr_3addr header; + __le16 reason; +} __packed; + +struct ieee80211_probe_request { + struct rtl_80211_hdr_3addr header; + /* SSID, supported rates */ + struct ieee80211_info_element info_element[0]; +} __packed; + +struct ieee80211_probe_response { + struct rtl_80211_hdr_3addr header; + __le32 time_stamp[2]; + __le16 beacon_interval; + __le16 capability; + /* SSID, supported rates, FH params, DS params, + * CF params, IBSS params, TIM (if beacon), RSN + */ + struct ieee80211_info_element info_element[0]; +} __packed; + +/* Alias beacon for probe_response */ +#define ieee80211_beacon ieee80211_probe_response + +struct ieee80211_assoc_request_frame { + struct rtl_80211_hdr_3addr header; + __le16 capability; + __le16 listen_interval; + /* SSID, supported rates, RSN */ + struct ieee80211_info_element info_element[0]; +} __packed; + +struct ieee80211_reassoc_request_frame { + struct rtl_80211_hdr_3addr header; + __le16 capability; + __le16 listen_interval; + u8 current_ap[ETH_ALEN]; + /* SSID, supported rates, RSN */ + struct ieee80211_info_element info_element[0]; +} __packed; + +struct ieee80211_assoc_response_frame { + struct rtl_80211_hdr_3addr header; + __le16 capability; + __le16 status; + __le16 aid; + struct ieee80211_info_element info_element[0]; /* supported rates */ +} __packed; + +struct ieee80211_txb { + u8 nr_frags; + u8 encrypted; + u8 queue_index; + u8 rts_included; + u16 reserved; + __le16 frag_size; + __le16 payload_size; + struct sk_buff *fragments[0]; +}; + +#define MAX_TX_AGG_COUNT 16 +struct ieee80211_drv_agg_txb { + u8 nr_drv_agg_frames; + struct sk_buff *tx_agg_frames[MAX_TX_AGG_COUNT]; +} __packed; + +#define MAX_SUBFRAME_COUNT 64 +struct ieee80211_rxb { + u8 nr_subframes; + struct sk_buff *subframes[MAX_SUBFRAME_COUNT]; + u8 dst[ETH_ALEN]; + u8 src[ETH_ALEN]; +} __packed; + +typedef union _frameqos { + u16 shortdata; + u8 chardata[2]; + struct { + u16 tid:4; + u16 eosp:1; + u16 ack_policy:2; + u16 reserved:1; + u16 txop:8; + } field; +} frameqos, *pframeqos; + +/* SWEEP TABLE ENTRIES NUMBER*/ +#define MAX_SWEEP_TAB_ENTRIES 42 +#define MAX_SWEEP_TAB_ENTRIES_PER_PACKET 7 +/* MAX_RATES_LENGTH needs to be 12. The spec says 8, and many APs + * only use 8, and then use extended rates for the remaining supported + * rates. Other APs, however, stick all of their supported rates on the + * main rates information element... + */ +#define MAX_RATES_LENGTH ((u8)12) +#define MAX_RATES_EX_LENGTH ((u8)16) +#define MAX_NETWORK_COUNT 128 + +#define MAX_CHANNEL_NUMBER 161 +#define IEEE80211_SOFTMAC_SCAN_TIME 100 +//(HZ / 2) +#define IEEE80211_SOFTMAC_ASSOC_RETRY_TIME (HZ * 2) + +#define CRC_LENGTH 4U + +#define MAX_WPA_IE_LEN 64 + +#define NETWORK_EMPTY_ESSID (1<<0) +#define NETWORK_HAS_OFDM (1<<1) +#define NETWORK_HAS_CCK (1<<2) + +/* QoS structure */ +#define NETWORK_HAS_QOS_PARAMETERS (1<<3) +#define NETWORK_HAS_QOS_INFORMATION (1<<4) +#define NETWORK_HAS_QOS_MASK (NETWORK_HAS_QOS_PARAMETERS | \ + NETWORK_HAS_QOS_INFORMATION) +/* 802.11h */ +#define NETWORK_HAS_POWER_CONSTRAINT (1<<5) +#define NETWORK_HAS_CSA (1<<6) +#define NETWORK_HAS_QUIET (1<<7) +#define NETWORK_HAS_IBSS_DFS (1<<8) +#define NETWORK_HAS_TPC_REPORT (1<<9) + +#define NETWORK_HAS_ERP_VALUE (1<<10) + +#define QOS_QUEUE_NUM 4 +#define QOS_OUI_LEN 3 +#define QOS_OUI_TYPE 2 +#define QOS_ELEMENT_ID 221 +#define QOS_OUI_INFO_SUB_TYPE 0 +#define QOS_OUI_PARAM_SUB_TYPE 1 +#define QOS_VERSION_1 1 +#define QOS_AIFSN_MIN_VALUE 2 +struct ieee80211_qos_information_element { + u8 elementID; + u8 length; + u8 qui[QOS_OUI_LEN]; + u8 qui_type; + u8 qui_subtype; + u8 version; + u8 ac_info; +} __packed; + +struct ieee80211_qos_ac_parameter { + u8 aci_aifsn; + u8 ecw_min_max; + __le16 tx_op_limit; +} __packed; + +struct ieee80211_qos_parameter_info { + struct ieee80211_qos_information_element info_element; + u8 reserved; + struct ieee80211_qos_ac_parameter ac_params_record[QOS_QUEUE_NUM]; +} __packed; + +struct ieee80211_qos_parameters { + __le16 cw_min[QOS_QUEUE_NUM]; + __le16 cw_max[QOS_QUEUE_NUM]; + u8 aifs[QOS_QUEUE_NUM]; + u8 flag[QOS_QUEUE_NUM]; + __le16 tx_op_limit[QOS_QUEUE_NUM]; +} __packed; + +struct ieee80211_qos_data { + struct ieee80211_qos_parameters parameters; + int active; + int supported; + u8 param_count; + u8 old_param_count; +}; + +struct ieee80211_tim_parameters { + u8 tim_count; + u8 tim_period; +} __packed; + +//#else +struct ieee80211_wmm_ts_info { + u8 ac_dir_tid; + u8 ac_up_psb; + u8 reserved; +} __packed; + +struct ieee80211_wmm_tspec_elem { + struct ieee80211_wmm_ts_info ts_info; + u16 norm_msdu_size; + u16 max_msdu_size; + u32 min_serv_inter; + u32 max_serv_inter; + u32 inact_inter; + u32 suspen_inter; + u32 serv_start_time; + u32 min_data_rate; + u32 mean_data_rate; + u32 peak_data_rate; + u32 max_burst_size; + u32 delay_bound; + u32 min_phy_rate; + u16 surp_band_allow; + u16 medium_time; +} __packed; +enum eap_type { + EAP_PACKET = 0, + EAPOL_START, + EAPOL_LOGOFF, + EAPOL_KEY, + EAPOL_ENCAP_ASF_ALERT +}; + +static const char *eap_types[] = { + [EAP_PACKET] = "EAP-Packet", + [EAPOL_START] = "EAPOL-Start", + [EAPOL_LOGOFF] = "EAPOL-Logoff", + [EAPOL_KEY] = "EAPOL-Key", + [EAPOL_ENCAP_ASF_ALERT] = "EAPOL-Encap-ASF-Alert" +}; + +static inline const char *eap_get_type(int type) +{ + return ((u32)type >= ARRAY_SIZE(eap_types)) ? "Unknown" : eap_types[type]; +} +//added by amy for reorder +static inline u8 Frame_QoSTID(u8 *buf) +{ + struct rtl_80211_hdr_3addr *hdr; + u16 fc; + hdr = (struct rtl_80211_hdr_3addr *)buf; + fc = le16_to_cpu(hdr->frame_ctl); + return (u8)((frameqos *)(buf + (((fc & IEEE80211_FCTL_TODS) && (fc & IEEE80211_FCTL_FROMDS)) ? 30 : 24)))->field.tid; +} + +//added by amy for reorder + +struct eapol { + u8 snap[6]; + u16 ethertype; + u8 version; + u8 type; + u16 length; +} __packed; + +struct ieee80211_softmac_stats { + unsigned int rx_ass_ok; + unsigned int rx_ass_err; + unsigned int rx_probe_rq; + unsigned int tx_probe_rs; + unsigned int tx_beacons; + unsigned int rx_auth_rq; + unsigned int rx_auth_rs_ok; + unsigned int rx_auth_rs_err; + unsigned int tx_auth_rq; + unsigned int no_auth_rs; + unsigned int no_ass_rs; + unsigned int tx_ass_rq; + unsigned int rx_ass_rq; + unsigned int tx_probe_rq; + unsigned int reassoc; + unsigned int swtxstop; + unsigned int swtxawake; + unsigned char CurrentShowTxate; + unsigned char last_packet_rate; + unsigned int txretrycount; +}; + +#define BEACON_PROBE_SSID_ID_POSITION 12 + +struct ieee80211_info_element_hdr { + u8 id; + u8 len; +} __packed; + +/* + * These are the data types that can make up management packets + * + u16 auth_algorithm; + u16 auth_sequence; + u16 beacon_interval; + u16 capability; + u8 current_ap[ETH_ALEN]; + u16 listen_interval; + struct { + u16 association_id:14, reserved:2; + } __packed; + u32 time_stamp[2]; + u16 reason; + u16 status; +*/ + +#define IEEE80211_DEFAULT_TX_ESSID "Penguin" +#define IEEE80211_DEFAULT_BASIC_RATE 2 //1Mbps + +enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame}; +#define MAX_SP_Len (WMM_all_frame << 4) +#define IEEE80211_QOS_TID 0x0f +#define QOS_CTL_NOTCONTAIN_ACK (0x01 << 5) + +#define IEEE80211_DTIM_MBCAST 4 +#define IEEE80211_DTIM_UCAST 2 +#define IEEE80211_DTIM_VALID 1 +#define IEEE80211_DTIM_INVALID 0 + +#define IEEE80211_PS_DISABLED 0 +#define IEEE80211_PS_UNICAST IEEE80211_DTIM_UCAST +#define IEEE80211_PS_MBCAST IEEE80211_DTIM_MBCAST + +//added by David for QoS 2006/6/30 +//#define WMM_Hang_8187 +#ifdef WMM_Hang_8187 +#undef WMM_Hang_8187 +#endif + +#define WME_AC_BK 0x00 +#define WME_AC_BE 0x01 +#define WME_AC_VI 0x02 +#define WME_AC_VO 0x03 +#define WME_ACI_MASK 0x03 +#define WME_AIFSN_MASK 0x03 +#define WME_AC_PRAM_LEN 16 + +#define MAX_RECEIVE_BUFFER_SIZE 9100 + +//UP Mapping to AC, using in MgntQuery_SequenceNumber() and maybe for DSCP +//#define UP2AC(up) ((up<3) ? ((up==0)?1:0) : (up>>1)) +#define UP2AC(up) ( \ + ((up) < 1) ? WME_AC_BE : \ + ((up) < 3) ? WME_AC_BK : \ + ((up) < 4) ? WME_AC_BE : \ + ((up) < 6) ? WME_AC_VI : \ + WME_AC_VO) +//AC Mapping to UP, using in Tx part for selecting the corresponding TX queue +#define AC2UP(_ac) ( \ + ((_ac) == WME_AC_VO) ? 6 : \ + ((_ac) == WME_AC_VI) ? 5 : \ + ((_ac) == WME_AC_BK) ? 1 : \ + 0) + +#define ETHER_ADDR_LEN 6 /* length of an Ethernet address */ +#define ETHERNET_HEADER_SIZE 14 /* length of two Ethernet address plus ether type*/ + +struct ether_header { + u8 ether_dhost[ETHER_ADDR_LEN]; + u8 ether_shost[ETHER_ADDR_LEN]; + u16 ether_type; +} __packed; + +#ifndef ETHERTYPE_PAE +#define ETHERTYPE_PAE 0x888e /* EAPOL PAE/802.1x */ +#endif +#ifndef ETHERTYPE_IP +#define ETHERTYPE_IP 0x0800 /* IP protocol */ +#endif + +typedef enum _erp_t { + ERP_NonERPpresent = 0x01, + ERP_UseProtection = 0x02, + ERP_BarkerPreambleMode = 0x04, +} erp_t; + + +struct ieee80211_network { + /* These entries are used to identify a unique network */ + u8 bssid[ETH_ALEN]; + u8 channel; + /* Ensure null-terminated for any debug msgs */ + u8 ssid[IW_ESSID_MAX_SIZE + 1]; + u8 ssid_len; + struct ieee80211_qos_data qos_data; + + //added by amy for LEAP + bool bWithAironetIE; + bool bCkipSupported; + bool bCcxRmEnable; + u16 CcxRmState[2]; + // CCXv4 S59, MBSSID. + bool bMBssidValid; + u8 MBssidMask; + u8 MBssid[6]; + // CCX 2 S38, WLAN Device Version Number element. Annie, 2006-08-20. + bool bWithCcxVerNum; + u8 BssCcxVerNumber; + /* These are network statistics */ + struct ieee80211_rx_stats stats; + u16 capability; + u8 rates[MAX_RATES_LENGTH]; + u8 rates_len; + u8 rates_ex[MAX_RATES_EX_LENGTH]; + u8 rates_ex_len; + unsigned long last_scanned; + u8 mode; + u32 flags; + u32 last_associate; + u32 time_stamp[2]; + u16 beacon_interval; + u16 listen_interval; + u16 atim_window; + u8 erp_value; + u8 wpa_ie[MAX_WPA_IE_LEN]; + size_t wpa_ie_len; + u8 rsn_ie[MAX_WPA_IE_LEN]; + size_t rsn_ie_len; + + struct ieee80211_tim_parameters tim; + u8 dtim_period; + u8 dtim_data; + u32 last_dtim_sta_time[2]; + + //appeded for QoS + u8 wmm_info; + struct ieee80211_wmm_ac_param wmm_param[4]; + u8 QoS_Enable; +#ifdef THOMAS_TURBO + u8 Turbo_Enable;//enable turbo mode, added by thomas +#endif + u16 CountryIeLen; + u8 CountryIeBuf[MAX_IE_LEN]; + // HT Related, by amy, 2008.04.29 + BSS_HT bssht; + // Add to handle broadcom AP management frame CCK rate. + bool broadcom_cap_exist; + bool ralink_cap_exist; + bool atheros_cap_exist; + bool cisco_cap_exist; + bool unknown_cap_exist; +// u8 berp_info; + bool berp_info_valid; + bool buseprotection; + //put at the end of the structure. + struct list_head list; +}; + +enum ieee80211_state { + + /* the card is not linked at all */ + IEEE80211_NOLINK = 0, + + /* IEEE80211_ASSOCIATING* are for BSS client mode + * the driver shall not perform RX filtering unless + * the state is LINKED. + * The driver shall just check for the state LINKED and + * defaults to NOLINK for ALL the other states (including + * LINKED_SCANNING) + */ + + /* the association procedure will start (wq scheduling)*/ + IEEE80211_ASSOCIATING, + IEEE80211_ASSOCIATING_RETRY, + + /* the association procedure is sending AUTH request*/ + IEEE80211_ASSOCIATING_AUTHENTICATING, + + /* the association procedure has successfully authentcated + * and is sending association request + */ + IEEE80211_ASSOCIATING_AUTHENTICATED, + + /* the link is ok. the card associated to a BSS or linked + * to a ibss cell or acting as an AP and creating the bss + */ + IEEE80211_LINKED, + + /* same as LINKED, but the driver shall apply RX filter + * rules as we are in NO_LINK mode. As the card is still + * logically linked, but it is doing a syncro site survey + * then it will be back to LINKED state. + */ + IEEE80211_LINKED_SCANNING, + +}; + +#define DEFAULT_MAX_SCAN_AGE (15 * HZ) +#define DEFAULT_FTS 2346 + +#define CFG_IEEE80211_RESERVE_FCS (1<<0) +#define CFG_IEEE80211_COMPUTE_FCS (1<<1) +#define CFG_IEEE80211_RTS (1<<2) + +#define IEEE80211_24GHZ_MIN_CHANNEL 1 +#define IEEE80211_24GHZ_MAX_CHANNEL 14 +#define IEEE80211_24GHZ_CHANNELS (IEEE80211_24GHZ_MAX_CHANNEL - \ + IEEE80211_24GHZ_MIN_CHANNEL + 1) + +#define IEEE80211_52GHZ_MIN_CHANNEL 34 +#define IEEE80211_52GHZ_MAX_CHANNEL 165 +#define IEEE80211_52GHZ_CHANNELS (IEEE80211_52GHZ_MAX_CHANNEL - \ + IEEE80211_52GHZ_MIN_CHANNEL + 1) + + +struct tx_pending { + int frag; + struct ieee80211_txb *txb; +}; + +typedef struct _bandwidth_autoswitch { + long threshold_20Mhzto40Mhz; + long threshold_40Mhzto20Mhz; + bool bforced_tx20Mhz; + bool bautoswitch_enable; +} bandwidth_autoswitch, *pbandwidth_autoswitch; + + +//added by amy for order + +#define REORDER_WIN_SIZE 128 +#define REORDER_ENTRY_NUM 128 +typedef struct _RX_REORDER_ENTRY { + struct list_head List; + u16 SeqNum; + struct ieee80211_rxb *prxb; +} RX_REORDER_ENTRY, *PRX_REORDER_ENTRY; +//added by amy for order +typedef enum _Fsync_State { + Default_Fsync, + HW_Fsync, + SW_Fsync +} Fsync_State; + +// Power save mode configured. +typedef enum _RT_PS_MODE { + eActive, // Active/Continuous access. + eMaxPs, // Max power save mode. + eFastPs // Fast power save mode. +} RT_PS_MODE; + +typedef enum _IPS_CALLBACK_FUNCION { + IPS_CALLBACK_NONE = 0, + IPS_CALLBACK_MGNT_LINK_REQUEST = 1, + IPS_CALLBACK_JOIN_REQUEST = 2, +} IPS_CALLBACK_FUNCION; + +typedef enum _RT_JOIN_ACTION { + RT_JOIN_INFRA = 1, + RT_JOIN_IBSS = 2, + RT_START_IBSS = 3, + RT_NO_ACTION = 4, +} RT_JOIN_ACTION; + +typedef struct _IbssParms { + u16 atimWin; +} IbssParms, *PIbssParms; +#define MAX_NUM_RATES 264 // Max num of support rates element: 8, Max num of ext. support rate: 255. 061122, by rcnjko. + +// RF state. +typedef enum _RT_RF_POWER_STATE { + eRfOn, + eRfSleep, + eRfOff +} RT_RF_POWER_STATE; + +typedef struct _RT_POWER_SAVE_CONTROL { + + // + // Inactive Power Save(IPS) : Disable RF when disconnected + // + bool bInactivePs; + bool bIPSModeBackup; + bool bSwRfProcessing; + RT_RF_POWER_STATE eInactivePowerState; + struct work_struct InactivePsWorkItem; + struct timer_list InactivePsTimer; + + // Return point for join action + IPS_CALLBACK_FUNCION ReturnPoint; + + // Recored Parameters for rescheduled JoinRequest + bool bTmpBssDesc; + RT_JOIN_ACTION tmpJoinAction; + struct ieee80211_network tmpBssDesc; + + // Recored Parameters for rescheduled MgntLinkRequest + bool bTmpScanOnly; + bool bTmpActiveScan; + bool bTmpFilterHiddenAP; + bool bTmpUpdateParms; + u8 tmpSsidBuf[33]; + struct octet_string tmpSsid2Scan; + bool bTmpSsid2Scan; + u8 tmpNetworkType; + u8 tmpChannelNumber; + u16 tmpBcnPeriod; + u8 tmpDtimPeriod; + u16 tmpmCap; + struct octet_string tmpSuppRateSet; + u8 tmpSuppRateBuf[MAX_NUM_RATES]; + bool bTmpSuppRate; + IbssParms tmpIbpm; + bool bTmpIbpm; + + // + // Leisre Poswer Save : Disable RF if connected but traffic is not busy + // + bool bLeisurePs; + +} RT_POWER_SAVE_CONTROL, *PRT_POWER_SAVE_CONTROL; + +typedef u32 RT_RF_CHANGE_SOURCE; +#define RF_CHANGE_BY_SW BIT(31) +#define RF_CHANGE_BY_HW BIT(30) +#define RF_CHANGE_BY_PS BIT(29) +#define RF_CHANGE_BY_IPS BIT(28) +#define RF_CHANGE_BY_INIT 0 // Do not change the RFOff reason. Defined by Bruce, 2008-01-17. + +typedef enum { + COUNTRY_CODE_FCC = 0, + COUNTRY_CODE_IC = 1, + COUNTRY_CODE_ETSI = 2, + COUNTRY_CODE_SPAIN = 3, + COUNTRY_CODE_FRANCE = 4, + COUNTRY_CODE_MKK = 5, + COUNTRY_CODE_MKK1 = 6, + COUNTRY_CODE_ISRAEL = 7, + COUNTRY_CODE_TELEC, + COUNTRY_CODE_MIC, + COUNTRY_CODE_GLOBAL_DOMAIN +} country_code_type_t; + +#define RT_MAX_LD_SLOT_NUM 10 +typedef struct _RT_LINK_DETECT_T { + + u32 NumRecvBcnInPeriod; + u32 NumRecvDataInPeriod; + + u32 RxBcnNum[RT_MAX_LD_SLOT_NUM]; // number of Rx beacon / CheckForHang_period to determine link status + u32 RxDataNum[RT_MAX_LD_SLOT_NUM]; // number of Rx data / CheckForHang_period to determine link status + u16 SlotNum; // number of CheckForHang period to determine link status + u16 SlotIndex; + + u32 NumTxOkInPeriod; + u32 NumRxOkInPeriod; + bool bBusyTraffic; +} RT_LINK_DETECT_T, *PRT_LINK_DETECT_T; + + +struct ieee80211_device { + struct net_device *dev; + struct ieee80211_security sec; + + //hw security related +// u8 hwsec_support; //support? + u8 hwsec_active; //hw security active. + bool is_silent_reset; + bool ieee_up; + //added by amy + bool bSupportRemoteWakeUp; + RT_PS_MODE dot11PowerSaveMode; // Power save mode configured. + bool actscanning; + bool beinretry; + RT_RF_POWER_STATE eRFPowerState; + RT_RF_CHANGE_SOURCE RfOffReason; + bool is_set_key; + //11n spec related I wonder if These info structure need to be moved out of ieee80211_device + + //11n HT below + PRT_HIGH_THROUGHPUT pHTInfo; + //struct timer_list SwBwTimer; +// spinlock_t chnlop_spinlock; + spinlock_t bw_spinlock; + + spinlock_t reorder_spinlock; + // for HT operation rate set. we use this one for HT data rate to separate different descriptors + //the way fill this is the same as in the IE + u8 Regdot11HTOperationalRateSet[16]; //use RATR format + u8 dot11HTOperationalRateSet[16]; //use RATR format + u8 RegHTSuppRateSet[16]; + u8 HTCurrentOperaRate; + u8 HTHighestOperaRate; + //wb added for rate operation mode to firmware + u8 bTxDisableRateFallBack; + u8 bTxUseDriverAssingedRate; + atomic_t atm_chnlop; + atomic_t atm_swbw; +// u8 HTHighestOperaRate; +// u8 HTCurrentOperaRate; + + // 802.11e and WMM Traffic Stream Info (TX) + struct list_head Tx_TS_Admit_List; + struct list_head Tx_TS_Pending_List; + struct list_head Tx_TS_Unused_List; + struct tx_ts_record TxTsRecord[TOTAL_TS_NUM]; + // 802.11e and WMM Traffic Stream Info (RX) + struct list_head Rx_TS_Admit_List; + struct list_head Rx_TS_Pending_List; + struct list_head Rx_TS_Unused_List; + struct rx_ts_record RxTsRecord[TOTAL_TS_NUM]; +//#ifdef TO_DO_LIST + RX_REORDER_ENTRY RxReorderEntry[128]; + struct list_head RxReorder_Unused_List; +//#endif + // Qos related. Added by Annie, 2005-11-01. +// PSTA_QOS pStaQos; + u8 ForcedPriority; // Force per-packet priority 1~7. (default: 0, not to force it.) + + + /* Bookkeeping structures */ + struct net_device_stats stats; + struct ieee80211_stats ieee_stats; + struct ieee80211_softmac_stats softmac_stats; + + /* Probe / Beacon management */ + struct list_head network_free_list; + struct list_head network_list; + struct ieee80211_network *networks; + int scans; + int scan_age; + + int iw_mode; /* operating mode (IW_MODE_*) */ + struct iw_spy_data spy_data; + + spinlock_t lock; + spinlock_t wpax_suitlist_lock; + + int tx_headroom; /* Set to size of any additional room needed at front + * of allocated Tx SKBs + */ + u32 config; + + /* WEP and other encryption related settings at the device level */ + int open_wep; /* Set to 1 to allow unencrypted frames */ + int auth_mode; + int reset_on_keychange; /* Set to 1 if the HW needs to be reset on + * WEP key changes + */ + + /* If the host performs {en,de}cryption, then set to 1 */ + int host_encrypt; + int host_encrypt_msdu; + int host_decrypt; + /* host performs multicast decryption */ + int host_mc_decrypt; + + /* host should strip IV and ICV from protected frames */ + /* meaningful only when hardware decryption is being used */ + int host_strip_iv_icv; + + int host_open_frag; + int host_build_iv; + int ieee802_1x; /* is IEEE 802.1X used */ + + /* WPA data */ + bool bHalfWirelessN24GMode; + int wpa_enabled; + int drop_unencrypted; + int tkip_countermeasures; + int privacy_invoked; + size_t wpa_ie_len; + u8 *wpa_ie; + u8 ap_mac_addr[6]; + u16 pairwise_key_type; + u16 group_key_type; + struct list_head crypt_deinit_list; + struct ieee80211_crypt_data *crypt[WEP_KEYS]; + int tx_keyidx; /* default TX key index (crypt[tx_keyidx]) */ + struct timer_list crypt_deinit_timer; + int crypt_quiesced; + + int bcrx_sta_key; /* use individual keys to override default keys even + * with RX of broad/multicast frames + */ + + /* Fragmentation structures */ + // each streaming contain a entry + struct ieee80211_frag_entry frag_cache[17][IEEE80211_FRAG_CACHE_LEN]; + unsigned int frag_next_idx[17]; + u16 fts; /* Fragmentation Threshold */ +#define DEFAULT_RTS_THRESHOLD 2346U +#define MIN_RTS_THRESHOLD 1 +#define MAX_RTS_THRESHOLD 2346U + u16 rts; /* RTS threshold */ + + /* Association info */ + u8 bssid[ETH_ALEN]; + + /* This stores infos for the current network. + * Either the network we are associated in INFRASTRUCTURE + * or the network that we are creating in MASTER mode. + * ad-hoc is a mixture ;-). + * Note that in infrastructure mode, even when not associated, + * fields bssid and essid may be valid (if wpa_set and essid_set + * are true) as thy carry the value set by the user via iwconfig + */ + struct ieee80211_network current_network; + + enum ieee80211_state state; + + int short_slot; + int reg_mode; + int mode; /* A, B, G */ + int modulation; /* CCK, OFDM */ + int freq_band; /* 2.4Ghz, 5.2Ghz, Mixed */ + int abg_true; /* ABG flag */ + + /* used for forcing the ibss workqueue to terminate + * without wait for the syncro scan to terminate + */ + short sync_scan_hurryup; + + int perfect_rssi; + int worst_rssi; + + u16 prev_seq_ctl; /* used to drop duplicate frames */ + + /* map of allowed channels. 0 is dummy */ + // FIXME: remember to default to a basic channel plan depending of the PHY type + void *pDot11dInfo; + bool bGlobalDomain; + int rate; /* current rate */ + int basic_rate; + //FIXME: pleace callback, see if redundant with softmac_features + short active_scan; + + /* this contains flags for selectively enable softmac support */ + u16 softmac_features; + + /* if the sequence control field is not filled by HW */ + u16 seq_ctrl[5]; + + /* association procedure transaction sequence number */ + u16 associate_seq; + + /* AID for RTXed association responses */ + u16 assoc_id; + + /* power save mode related*/ + short ps; + short sta_sleep; + int ps_timeout; + int ps_period; + struct tasklet_struct ps_task; + u32 ps_th; + u32 ps_tl; + + short raw_tx; + /* used if IEEE_SOFTMAC_TX_QUEUE is set */ + short queue_stop; + short scanning; + short proto_started; + + struct mutex wx_mutex; + struct mutex scan_mutex; + + spinlock_t mgmt_tx_lock; + spinlock_t beacon_lock; + + short beacon_txing; + + short wap_set; + short ssid_set; + + u8 wpax_type_set; //{added by David, 2006.9.28} + u32 wpax_type_notify; //{added by David, 2006.9.26} + + /* QoS related flag */ + s8 init_wmmparam_flag; + /* set on initialization */ + u8 qos_support; + + /* for discarding duplicated packets in IBSS */ + struct list_head ibss_mac_hash[IEEE_IBSS_MAC_HASH_SIZE]; + + /* for discarding duplicated packets in BSS */ + u16 last_rxseq_num[17]; /* rx seq previous per-tid */ + u16 last_rxfrag_num[17];/* tx frag previous per-tid */ + unsigned long last_packet_time[17]; + + /* for PS mode */ + unsigned long last_rx_ps_time; + + /* used if IEEE_SOFTMAC_SINGLE_QUEUE is set */ + struct sk_buff *mgmt_queue_ring[MGMT_QUEUE_NUM]; + int mgmt_queue_head; + int mgmt_queue_tail; +//{ added for rtl819x +#define IEEE80211_QUEUE_LIMIT 128 + u8 AsocRetryCount; + unsigned int hw_header; + struct sk_buff_head skb_waitQ[MAX_QUEUE_SIZE]; + struct sk_buff_head skb_aggQ[MAX_QUEUE_SIZE]; + struct sk_buff_head skb_drv_aggQ[MAX_QUEUE_SIZE]; + u32 sta_edca_param[4]; + bool aggregation; + // Enable/Disable Rx immediate BA capability. + bool enable_rx_imm_BA; + bool bibsscoordinator; + + //+by amy for DM ,080515 + //Dynamic Tx power for near/far range enable/Disable , by amy , 2008-05-15 + bool bdynamic_txpower_enable; + + bool bCTSToSelfEnable; + u8 CTSToSelfTH; + + u32 fsync_time_interval; + u32 fsync_rate_bitmap; + u8 fsync_rssi_threshold; + bool bfsync_enable; + + u8 fsync_multiple_timeinterval; // FsyncMultipleTimeInterval * FsyncTimeInterval + u32 fsync_firstdiff_ratethreshold; // low threshold + u32 fsync_seconddiff_ratethreshold; // decrease threshold + Fsync_State fsync_state; + bool bis_any_nonbepkts; + //20Mhz 40Mhz AutoSwitch Threshold + bandwidth_autoswitch bandwidth_auto_switch; + //for txpower tracking + bool FwRWRF; + + //added by amy for AP roaming + RT_LINK_DETECT_T LinkDetectInfo; + //added by amy for ps + RT_POWER_SAVE_CONTROL PowerSaveControl; +//} + /* used if IEEE_SOFTMAC_TX_QUEUE is set */ + struct tx_pending tx_pending; + + /* used if IEEE_SOFTMAC_ASSOCIATE is set */ + struct timer_list associate_timer; + + /* used if IEEE_SOFTMAC_BEACONS is set */ + struct timer_list beacon_timer; + struct work_struct associate_complete_wq; + struct work_struct associate_procedure_wq; + struct delayed_work softmac_scan_wq; + struct delayed_work associate_retry_wq; + struct delayed_work start_ibss_wq; + struct work_struct wx_sync_scan_wq; + struct workqueue_struct *wq; + // Qos related. Added by Annie, 2005-11-01. + //STA_QOS StaQos; + + //u32 STA_EDCA_PARAM[4]; + //CHANNEL_ACCESS_SETTING ChannelAccessSetting; + + struct ieee80211_rxb *stats_IndicateArray[REORDER_WIN_SIZE]; + + /* Callback functions */ + void (*set_security)(struct net_device *dev, + struct ieee80211_security *sec); + + /* Used to TX data frame by using txb structs. + * this is not used if in the softmac_features + * is set the flag IEEE_SOFTMAC_TX_QUEUE + */ + int (*hard_start_xmit)(struct ieee80211_txb *txb, + struct net_device *dev); + + int (*reset_port)(struct net_device *dev); + int (*is_queue_full)(struct net_device *dev, int pri); + + int (*handle_management)(struct net_device *dev, + struct ieee80211_network *network, u16 type); + int (*is_qos_active)(struct net_device *dev, struct sk_buff *skb); + + /* Softmac-generated frames (management) are TXed via this + * callback if the flag IEEE_SOFTMAC_SINGLE_QUEUE is + * not set. As some cards may have different HW queues that + * one might want to use for data and management frames + * the option to have two callbacks might be useful. + * This function can't sleep. + */ + int (*softmac_hard_start_xmit)(struct sk_buff *skb, + struct net_device *dev); + + /* used instead of hard_start_xmit (not softmac_hard_start_xmit) + * if the IEEE_SOFTMAC_TX_QUEUE feature is used to TX data + * frames. I the option IEEE_SOFTMAC_SINGLE_QUEUE is also set + * then also management frames are sent via this callback. + * This function can't sleep. + */ + void (*softmac_data_hard_start_xmit)(struct sk_buff *skb, + struct net_device *dev, int rate); + + /* stops the HW queue for DATA frames. Useful to avoid + * waste time to TX data frame when we are reassociating + * This function can sleep. + */ + void (*data_hard_stop)(struct net_device *dev); + + /* OK this is complementar to data_poll_hard_stop */ + void (*data_hard_resume)(struct net_device *dev); + + /* ask to the driver to retune the radio . + * This function can sleep. the driver should ensure + * the radio has been switched before return. + */ + void (*set_chan)(struct net_device *dev, short ch); + + /* These are not used if the ieee stack takes care of + * scanning (IEEE_SOFTMAC_SCAN feature set). + * In this case only the set_chan is used. + * + * The syncro version is similar to the start_scan but + * does not return until all channels has been scanned. + * this is called in user context and should sleep, + * it is called in a work_queue when switching to ad-hoc mode + * or in behalf of iwlist scan when the card is associated + * and root user ask for a scan. + * the function stop_scan should stop both the syncro and + * background scanning and can sleep. + * The function start_scan should initiate the background + * scanning and can't sleep. + */ + void (*scan_syncro)(struct net_device *dev); + void (*start_scan)(struct net_device *dev); + void (*stop_scan)(struct net_device *dev); + + /* indicate the driver that the link state is changed + * for example it may indicate the card is associated now. + * Driver might be interested in this to apply RX filter + * rules or simply light the LINK led + */ + void (*link_change)(struct net_device *dev); + + /* these two function indicates to the HW when to start + * and stop to send beacons. This is used when the + * IEEE_SOFTMAC_BEACONS is not set. For now the + * stop_send_bacons is NOT guaranteed to be called only + * after start_send_beacons. + */ + void (*start_send_beacons)(struct net_device *dev, u16 tx_rate); + void (*stop_send_beacons)(struct net_device *dev); + + /* power save mode related */ + void (*sta_wake_up)(struct net_device *dev); + void (*ps_request_tx_ack)(struct net_device *dev); + void (*enter_sleep_state)(struct net_device *dev, u32 th, u32 tl); + short (*ps_is_queue_empty)(struct net_device *dev); + int (*handle_beacon)(struct net_device *dev, struct ieee80211_beacon *beacon, struct ieee80211_network *network); + int (*handle_assoc_response)(struct net_device *dev, struct ieee80211_assoc_response_frame *resp, struct ieee80211_network *network); + + + /* check whether Tx hw resource available */ + short (*check_nic_enough_desc)(struct net_device *dev, int queue_index); + //added by wb for HT related +// void (*SwChnlByTimerHandler)(struct net_device *dev, int channel); + void (*SetBWModeHandler)(struct net_device *dev, enum ht_channel_width Bandwidth, enum ht_extension_chan_offset Offset); +// void (*UpdateHalRATRTableHandler)(struct net_device* dev, u8* pMcsRate); + bool (*GetNmodeSupportBySecCfg)(struct net_device *dev); + void (*SetWirelessMode)(struct net_device *dev, u8 wireless_mode); + bool (*GetHalfNmodeSupportByAPsHandler)(struct net_device *dev); + void (*InitialGainHandler)(struct net_device *dev, u8 Operation); + + /* This must be the last item so that it points to the data + * allocated beyond this structure by alloc_ieee80211 + */ + u8 priv[0]; +}; + +#define IEEE_A (1<<0) +#define IEEE_B (1<<1) +#define IEEE_G (1<<2) +#define IEEE_N_24G (1<<4) +#define IEEE_N_5G (1<<5) +#define IEEE_MODE_MASK (IEEE_A | IEEE_B | IEEE_G) + +/* Generate a 802.11 header */ + +/* Uses the channel change callback directly + * instead of [start/stop] scan callbacks + */ +#define IEEE_SOFTMAC_SCAN (1<<2) + +/* Perform authentication and association handshake */ +#define IEEE_SOFTMAC_ASSOCIATE (1<<3) + +/* Generate probe requests */ +#define IEEE_SOFTMAC_PROBERQ (1<<4) + +/* Generate respones to probe requests */ +#define IEEE_SOFTMAC_PROBERS (1<<5) + +/* The ieee802.11 stack will manages the netif queue + * wake/stop for the driver, taking care of 802.11 + * fragmentation. See softmac.c for details. + */ +#define IEEE_SOFTMAC_TX_QUEUE (1<<7) + +/* Uses only the softmac_data_hard_start_xmit + * even for TX management frames. + */ +#define IEEE_SOFTMAC_SINGLE_QUEUE (1<<8) + +/* Generate beacons. The stack will enqueue beacons + * to the card + */ +#define IEEE_SOFTMAC_BEACONS (1<<6) + +static inline void *ieee80211_priv(struct net_device *dev) +{ + return ((struct ieee80211_device *)netdev_priv(dev))->priv; +} + +static inline int ieee80211_is_empty_essid(const char *essid, int essid_len) +{ + /* Single white space is for Linksys APs */ + if (essid_len == 1 && essid[0] == ' ') + return 1; + + /* Otherwise, if the entire essid is 0, we assume it is hidden */ + while (essid_len) { + essid_len--; + if (essid[essid_len] != '\0') + return 0; + } + + return 1; +} + +static inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode) +{ + /* + * It is possible for both access points and our device to support + * combinations of modes, so as long as there is one valid combination + * of ap/device supported modes, then return success + * + */ + if ((mode & IEEE_A) && + (ieee->modulation & IEEE80211_OFDM_MODULATION) && + (ieee->freq_band & IEEE80211_52GHZ_BAND)) + return 1; + + if ((mode & IEEE_G) && + (ieee->modulation & IEEE80211_OFDM_MODULATION) && + (ieee->freq_band & IEEE80211_24GHZ_BAND)) + return 1; + + if ((mode & IEEE_B) && + (ieee->modulation & IEEE80211_CCK_MODULATION) && + (ieee->freq_band & IEEE80211_24GHZ_BAND)) + return 1; + + return 0; +} + +static inline int ieee80211_get_hdrlen(u16 fc) +{ + int hdrlen = IEEE80211_3ADDR_LEN; + + switch (WLAN_FC_GET_TYPE(fc)) { + case IEEE80211_FTYPE_DATA: + if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS)) + hdrlen = IEEE80211_4ADDR_LEN; /* Addr4 */ + if (IEEE80211_QOS_HAS_SEQ(fc)) + hdrlen += 2; /* QOS ctrl*/ + break; + case IEEE80211_FTYPE_CTL: + switch (WLAN_FC_GET_STYPE(fc)) { + case IEEE80211_STYPE_CTS: + case IEEE80211_STYPE_ACK: + hdrlen = IEEE80211_1ADDR_LEN; + break; + default: + hdrlen = IEEE80211_2ADDR_LEN; + break; + } + break; + } + + return hdrlen; +} + +static inline u8 *ieee80211_get_payload(struct rtl_80211_hdr *hdr) +{ + switch (ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl))) { + case IEEE80211_1ADDR_LEN: + return ((struct rtl_80211_hdr_1addr *)hdr)->payload; + case IEEE80211_2ADDR_LEN: + return ((struct rtl_80211_hdr_2addr *)hdr)->payload; + case IEEE80211_3ADDR_LEN: + return ((struct rtl_80211_hdr_3addr *)hdr)->payload; + case IEEE80211_4ADDR_LEN: + return ((struct rtl_80211_hdr_4addr *)hdr)->payload; + } + return NULL; +} + +static inline int ieee80211_is_ofdm_rate(u8 rate) +{ + switch (rate & ~IEEE80211_BASIC_RATE_MASK) { + case IEEE80211_OFDM_RATE_6MB: + case IEEE80211_OFDM_RATE_9MB: + case IEEE80211_OFDM_RATE_12MB: + case IEEE80211_OFDM_RATE_18MB: + case IEEE80211_OFDM_RATE_24MB: + case IEEE80211_OFDM_RATE_36MB: + case IEEE80211_OFDM_RATE_48MB: + case IEEE80211_OFDM_RATE_54MB: + return 1; + } + return 0; +} + +static inline int ieee80211_is_cck_rate(u8 rate) +{ + switch (rate & ~IEEE80211_BASIC_RATE_MASK) { + case IEEE80211_CCK_RATE_1MB: + case IEEE80211_CCK_RATE_2MB: + case IEEE80211_CCK_RATE_5MB: + case IEEE80211_CCK_RATE_11MB: + return 1; + } + return 0; +} + + +/* ieee80211.c */ +void free_ieee80211(struct net_device *dev); +struct net_device *alloc_ieee80211(int sizeof_priv); + +int ieee80211_set_encryption(struct ieee80211_device *ieee); + +/* ieee80211_tx.c */ + +int ieee80211_encrypt_fragment(struct ieee80211_device *ieee, + struct sk_buff *frag, int hdr_len); + +int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); +void ieee80211_txb_free(struct ieee80211_txb *txb); + + +/* ieee80211_rx.c */ +int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, + struct ieee80211_rx_stats *rx_stats); +void ieee80211_rx_mgt(struct ieee80211_device *ieee, + struct rtl_80211_hdr_4addr *header, + struct ieee80211_rx_stats *stats); + +/* ieee80211_wx.c */ +int ieee80211_wx_get_scan(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *key); +int ieee80211_wx_set_encode(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *key); +int ieee80211_wx_get_encode(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *key); +int ieee80211_wx_get_encode_ext(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra); +int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra); +int ieee80211_wx_set_auth(struct ieee80211_device *ieee, + struct iw_request_info *info, + struct iw_param *data, char *extra); +int ieee80211_wx_set_mlme(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra); +int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len); + +/* ieee80211_softmac.c */ +short ieee80211_is_54g(const struct ieee80211_network *net); +short ieee80211_is_shortslot(const struct ieee80211_network *net); +int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, + struct sk_buff *skb, + struct ieee80211_rx_stats *rx_stats, + u16 type, u16 stype); +void ieee80211_softmac_new_net(struct ieee80211_device *ieee, + struct ieee80211_network *net); + +void SendDisassociation(struct ieee80211_device *ieee, u8 *asSta, u8 asRsn); +void ieee80211_softmac_xmit(struct ieee80211_txb *txb, + struct ieee80211_device *ieee); + +void ieee80211_stop_send_beacons(struct ieee80211_device *ieee); +void notify_wx_assoc_event(struct ieee80211_device *ieee); +void ieee80211_softmac_check_all_nets(struct ieee80211_device *ieee); +void ieee80211_start_bss(struct ieee80211_device *ieee); +void ieee80211_start_master_bss(struct ieee80211_device *ieee); +void ieee80211_start_ibss(struct ieee80211_device *ieee); +void ieee80211_softmac_init(struct ieee80211_device *ieee); +void ieee80211_softmac_free(struct ieee80211_device *ieee); +void ieee80211_associate_abort(struct ieee80211_device *ieee); +void ieee80211_disassociate(struct ieee80211_device *ieee); +void ieee80211_stop_scan(struct ieee80211_device *ieee); +void ieee80211_start_scan_syncro(struct ieee80211_device *ieee); +void ieee80211_check_all_nets(struct ieee80211_device *ieee); +void ieee80211_start_protocol(struct ieee80211_device *ieee); +void ieee80211_stop_protocol(struct ieee80211_device *ieee); +void ieee80211_softmac_start_protocol(struct ieee80211_device *ieee); +void ieee80211_softmac_stop_protocol(struct ieee80211_device *ieee); +void ieee80211_reset_queue(struct ieee80211_device *ieee); +void ieee80211_wake_queue(struct ieee80211_device *ieee); +void ieee80211_stop_queue(struct ieee80211_device *ieee); +struct sk_buff *ieee80211_get_beacon(struct ieee80211_device *ieee); +void ieee80211_start_send_beacons(struct ieee80211_device *ieee); +void ieee80211_stop_send_beacons(struct ieee80211_device *ieee); +int ieee80211_wpa_supplicant_ioctl(struct ieee80211_device *ieee, + struct iw_point *p); +void notify_wx_assoc_event(struct ieee80211_device *ieee); +void ieee80211_ps_tx_ack(struct ieee80211_device *ieee, short success); + +void softmac_mgmt_xmit(struct sk_buff *skb, struct ieee80211_device *ieee); + +/* ieee80211_crypt_ccmp&tkip&wep.c */ +void ieee80211_tkip_null(void); + +int ieee80211_crypto_init(void); +void ieee80211_crypto_deinit(void); +int ieee80211_crypto_tkip_init(void); +void ieee80211_crypto_tkip_exit(void); +int ieee80211_crypto_ccmp_init(void); +void ieee80211_crypto_ccmp_exit(void); +int ieee80211_crypto_wep_init(void); +void ieee80211_crypto_wep_exit(void); + +/* ieee80211_softmac_wx.c */ + +int ieee80211_wx_get_wap(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *ext); + +int ieee80211_wx_set_wap(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *awrq, + char *extra); + +int ieee80211_wx_get_essid(struct ieee80211_device *ieee, + struct iw_request_info *a, + union iwreq_data *wrqu, char *b); + +int ieee80211_wx_set_rate(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra); + +int ieee80211_wx_get_rate(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra); + +int ieee80211_wx_set_mode(struct ieee80211_device *ieee, + struct iw_request_info *a, + union iwreq_data *wrqu, char *b); + +int ieee80211_wx_set_scan(struct ieee80211_device *ieee, + struct iw_request_info *a, + union iwreq_data *wrqu, char *b); + +int ieee80211_wx_set_essid(struct ieee80211_device *ieee, + struct iw_request_info *a, + union iwreq_data *wrqu, char *extra); + +int ieee80211_wx_get_mode(struct ieee80211_device *ieee, + struct iw_request_info *a, + union iwreq_data *wrqu, char *b); + +int ieee80211_wx_set_freq(struct ieee80211_device *ieee, + struct iw_request_info *a, + union iwreq_data *wrqu, char *b); + +int ieee80211_wx_get_freq(struct ieee80211_device *ieee, + struct iw_request_info *a, + union iwreq_data *wrqu, char *b); + +/* ieee80211_module.c */ +int ieee80211_debug_init(void); +void ieee80211_debug_exit(void); + +//extern void ieee80211_wx_sync_scan_wq(struct ieee80211_device *ieee); +void ieee80211_wx_sync_scan_wq(struct work_struct *work); + + +int ieee80211_wx_set_rawtx(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra); + +int ieee80211_wx_get_name(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra); + +int ieee80211_wx_set_power(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra); + +int ieee80211_wx_get_power(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra); + +int ieee80211_wx_set_rts(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra); + +int ieee80211_wx_get_rts(struct ieee80211_device *ieee, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra); +//HT +#define MAX_RECEIVE_BUFFER_SIZE 9100 // +void HTDebugHTCapability(u8 *CapIE, u8 *TitleString); +void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString); + +void HTSetConnectBwMode(struct ieee80211_device *ieee, + enum ht_channel_width Bandwidth, enum ht_extension_chan_offset Offset); +void HTUpdateDefaultSetting(struct ieee80211_device *ieee); +void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, + u8 *len, u8 isEncrypt); +void HTConstructInfoElement(struct ieee80211_device *ieee, u8 *posHTInfo, + u8 *len, u8 isEncrypt); +void HTConstructRT2RTAggElement(struct ieee80211_device *ieee, u8 *posRT2RTAgg, + u8 *len); +void HTOnAssocRsp(struct ieee80211_device *ieee); +void HTInitializeHTInfo(struct ieee80211_device *ieee); +void HTInitializeBssDesc(PBSS_HT pBssHT); +void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee, + struct ieee80211_network *pNetwork); +void HTUpdateSelfAndPeerSetting(struct ieee80211_device *ieee, + struct ieee80211_network *pNetwork); +u8 HTGetHighestMCSRate(struct ieee80211_device *ieee, + u8 *pMCSRateSet, u8 *pMCSFilter); +extern u8 MCS_FILTER_ALL[]; +extern u16 MCS_DATA_RATE[2][2][77]; +u8 HTCCheck(struct ieee80211_device *ieee, u8 *pFrame); +//extern void HTSetConnectBwModeCallback(unsigned long data); +void HTResetIOTSetting(PRT_HIGH_THROUGHPUT pHTInfo); +bool IsHTHalfNmodeAPs(struct ieee80211_device *ieee); +u16 HTHalfMcsToDataRate(struct ieee80211_device *ieee, u8 nMcsRate); +u16 HTMcsToDataRate(struct ieee80211_device *ieee, u8 nMcsRate); +u16 TxCountToDataRate(struct ieee80211_device *ieee, u8 nDataRate); +//function in BAPROC.c +int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb); +int ieee80211_rx_ADDBARsp(struct ieee80211_device *ieee, struct sk_buff *skb); +int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb); +void TsInitAddBA(struct ieee80211_device *ieee, struct tx_ts_record *pTS, + u8 Policy, u8 bOverwritePending); +void TsInitDelBA(struct ieee80211_device *ieee, + struct ts_common_info *pTsCommonInfo, enum tr_select TxRxSelect); +void BaSetupTimeOut(struct timer_list *t); +void TxBaInactTimeout(struct timer_list *t); +void RxBaInactTimeout(struct timer_list *t); +void ResetBaEntry(PBA_RECORD pBA); +//function in TS.c +bool GetTs( + struct ieee80211_device *ieee, + struct ts_common_info **ppTS, + u8 *Addr, + u8 TID, + enum tr_select TxRxSelect, //Rx:1, Tx:0 + bool bAddNewTs + ); +void TSInitialize(struct ieee80211_device *ieee); +void TsStartAddBaProcess(struct ieee80211_device *ieee, struct tx_ts_record *pTxTS); +void RemovePeerTS(struct ieee80211_device *ieee, u8 *Addr); +void RemoveAllTS(struct ieee80211_device *ieee); +void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee); + +extern const long ieee80211_wlan_frequencies[]; + +static inline void ieee80211_increment_scans(struct ieee80211_device *ieee) +{ + ieee->scans++; +} + +static inline int ieee80211_get_scans(struct ieee80211_device *ieee) +{ + return ieee->scans; +} + +static inline const char *escape_essid(const char *essid, u8 essid_len) +{ + static char escaped[IW_ESSID_MAX_SIZE * 2 + 1]; + + if (ieee80211_is_empty_essid(essid, essid_len)) { + memcpy(escaped, "", sizeof("")); + return escaped; + } + + snprintf(escaped, sizeof(escaped), "%*pEn", essid_len, essid); + return escaped; +} + +/* For the function is more related to hardware setting, it's better to use the + * ieee handler to refer to it. + */ +short check_nic_enough_desc(struct net_device *dev, int queue_index); +int ieee80211_data_xmit(struct sk_buff *skb, struct net_device *dev); +int ieee80211_parse_info_param(struct ieee80211_device *ieee, + struct ieee80211_info_element *info_element, + u16 length, + struct ieee80211_network *network, + struct ieee80211_rx_stats *stats); + +void ieee80211_indicate_packets(struct ieee80211_device *ieee, + struct ieee80211_rxb **prxbIndicateArray, + u8 index); +#define RT_ASOC_RETRY_LIMIT 5 +#endif /* IEEE80211_H */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8192u/ieee80211/ieee80211.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8192u/ieee80211/ieee80211.h.yml new file mode 100644 index 00000000000..d1a1aaa587b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8192u/ieee80211/ieee80211.h.yml @@ -0,0 +1,17 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyright by the original + - Copyright (c) 2001-2002, SSH Communications Security Corp and Jouni Malinen + - Copyright (c) 2002-2003, Jouni Malinen + - Copyright (c) 2004, Intel Corporation +holders: + - the original + - SSH Communications Security Corp and Jouni Malinen + - Jouni Malinen + - Intel Corporation +authors: + - James Ketrenos + - Andrea Merello diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8723bs/hal/sdio_ops.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8723bs/hal/sdio_ops.c new file mode 100644 index 00000000000..34e8a7d5e53 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8723bs/hal/sdio_ops.c @@ -0,0 +1,8 @@ +* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved. + * + *******************************************************************************/ + + +/* Created by Roger, 2011.08.03. */ +/* */ +void InitSysInterrupt8723BSdio(struct adapter *adapter) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8723bs/hal/sdio_ops.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8723bs/hal/sdio_ops.c.yml new file mode 100644 index 00000000000..2f4970266ad --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtl8723bs/hal/sdio_ops.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2007 - 2012 Realtek Corporation +holders: + - Realtek Corporation +authors: + - Roger diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_sdio.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_sdio.c new file mode 100644 index 00000000000..bee71578d26 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_sdio.c @@ -0,0 +1,21 @@ +* Copyright(c) 2016 Realtek Corporation. + * + * Contact Information: + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : Ivan + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_sdio.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_sdio.c.yml new file mode 100644 index 00000000000..24c22fbae0c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_sdio.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2016 Realtek Corporation +holders: + - Realtek Corporation +authors: + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang Return + - Ivan Return diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_usb.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_usb.c new file mode 100644 index 00000000000..0c490259086 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_usb.c @@ -0,0 +1,21 @@ +* Copyright(c) 2016 Realtek Corporation. + * + * Contact Information: + + + * Author : KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : Ivan + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_usb.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_usb.c.yml new file mode 100644 index 00000000000..0001503be50 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_8822b/halmac_api_8822b_usb.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2016 Realtek Corporation +holders: + - Realtek Corporation +authors: + - KaiYuan Chang Return + - KaiYuan Chang Return + - Ivan Return diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c new file mode 100644 index 00000000000..efb38eb47ba --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c @@ -0,0 +1,5970 @@ +// SPDX-License-Identifier: GPL-2.0 +/****************************************************************************** + * + * Copyright(c) 2016 Realtek Corporation. + * + * Contact Information: + * wlanfae + * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, + * Hsinchu 300, Taiwan. + * + * Larry Finger + * + *****************************************************************************/ +#include "halmac_88xx_cfg.h" + +/** + * halmac_init_adapter_para_88xx() - int halmac adapter + * @halmac_adapter + * + * SD1 internal use + * + * Author : KaiYuan Chang/Ivan Lin + * Return : void + */ +void halmac_init_adapter_para_88xx(struct halmac_adapter *halmac_adapter) +{ + halmac_adapter->api_record.array_wptr = 0; + halmac_adapter->hal_adapter_backup = halmac_adapter; + halmac_adapter->hal_efuse_map = (u8 *)NULL; + halmac_adapter->hal_efuse_map_valid = false; + halmac_adapter->efuse_end = 0; + halmac_adapter->hal_mac_addr[0].address_l_h.address_low = 0; + halmac_adapter->hal_mac_addr[0].address_l_h.address_high = 0; + halmac_adapter->hal_mac_addr[1].address_l_h.address_low = 0; + halmac_adapter->hal_mac_addr[1].address_l_h.address_high = 0; + halmac_adapter->hal_bss_addr[0].address_l_h.address_low = 0; + halmac_adapter->hal_bss_addr[0].address_l_h.address_high = 0; + halmac_adapter->hal_bss_addr[1].address_l_h.address_low = 0; + halmac_adapter->hal_bss_addr[1].address_l_h.address_high = 0; + + halmac_adapter->low_clk = false; + halmac_adapter->max_download_size = HALMAC_FW_MAX_DL_SIZE_88XX; + + /* Init LPS Option */ + halmac_adapter->fwlps_option.mode = 0x01; /*0:Active 1:LPS 2:WMMPS*/ + halmac_adapter->fwlps_option.awake_interval = 1; + halmac_adapter->fwlps_option.enter_32K = 1; + halmac_adapter->fwlps_option.clk_request = 0; + halmac_adapter->fwlps_option.rlbm = 0; + halmac_adapter->fwlps_option.smart_ps = 0; + halmac_adapter->fwlps_option.awake_interval = 1; + halmac_adapter->fwlps_option.all_queue_uapsd = 0; + halmac_adapter->fwlps_option.pwr_state = 0; + halmac_adapter->fwlps_option.low_pwr_rx_beacon = 0; + halmac_adapter->fwlps_option.ant_auto_switch = 0; + halmac_adapter->fwlps_option.ps_allow_bt_high_priority = 0; + halmac_adapter->fwlps_option.protect_bcn = 0; + halmac_adapter->fwlps_option.silence_period = 0; + halmac_adapter->fwlps_option.fast_bt_connect = 0; + halmac_adapter->fwlps_option.two_antenna_en = 0; + halmac_adapter->fwlps_option.adopt_user_setting = 1; + halmac_adapter->fwlps_option.drv_bcn_early_shift = 0; + + halmac_adapter->config_para_info.cfg_para_buf = NULL; + halmac_adapter->config_para_info.para_buf_w = NULL; + halmac_adapter->config_para_info.para_num = 0; + halmac_adapter->config_para_info.full_fifo_mode = false; + halmac_adapter->config_para_info.para_buf_size = 0; + halmac_adapter->config_para_info.avai_para_buf_size = 0; + halmac_adapter->config_para_info.offset_accumulation = 0; + halmac_adapter->config_para_info.value_accumulation = 0; + halmac_adapter->config_para_info.datapack_segment = 0; + + halmac_adapter->ch_sw_info.ch_info_buf = NULL; + halmac_adapter->ch_sw_info.ch_info_buf_w = NULL; + halmac_adapter->ch_sw_info.extra_info_en = 0; + halmac_adapter->ch_sw_info.buf_size = 0; + halmac_adapter->ch_sw_info.avai_buf_size = 0; + halmac_adapter->ch_sw_info.total_size = 0; + halmac_adapter->ch_sw_info.ch_num = 0; + + halmac_adapter->drv_info_size = 0; + + memset(halmac_adapter->api_record.api_array, HALMAC_API_STUFF, + sizeof(halmac_adapter->api_record.api_array)); + + halmac_adapter->txff_allocation.tx_fifo_pg_num = 0; + halmac_adapter->txff_allocation.ac_q_pg_num = 0; + halmac_adapter->txff_allocation.rsvd_pg_bndy = 0; + halmac_adapter->txff_allocation.rsvd_drv_pg_bndy = 0; + halmac_adapter->txff_allocation.rsvd_h2c_extra_info_pg_bndy = 0; + halmac_adapter->txff_allocation.rsvd_h2c_queue_pg_bndy = 0; + halmac_adapter->txff_allocation.rsvd_cpu_instr_pg_bndy = 0; + halmac_adapter->txff_allocation.rsvd_fw_txbuff_pg_bndy = 0; + halmac_adapter->txff_allocation.pub_queue_pg_num = 0; + halmac_adapter->txff_allocation.high_queue_pg_num = 0; + halmac_adapter->txff_allocation.low_queue_pg_num = 0; + halmac_adapter->txff_allocation.normal_queue_pg_num = 0; + halmac_adapter->txff_allocation.extra_queue_pg_num = 0; + + halmac_adapter->txff_allocation.la_mode = HALMAC_LA_MODE_DISABLE; + halmac_adapter->txff_allocation.rx_fifo_expanding_mode = + HALMAC_RX_FIFO_EXPANDING_MODE_DISABLE; + + halmac_init_adapter_dynamic_para_88xx(halmac_adapter); + halmac_init_state_machine_88xx(halmac_adapter); +} + +/** + * halmac_init_adapter_dynamic_para_88xx() - int halmac adapter + * @halmac_adapter + * + * SD1 internal use + * + * Author : KaiYuan Chang/Ivan Lin + * Return : void + */ +void halmac_init_adapter_dynamic_para_88xx( + struct halmac_adapter *halmac_adapter) +{ + halmac_adapter->h2c_packet_seq = 0; + halmac_adapter->h2c_buf_free_space = 0; + halmac_adapter->gen_info_valid = false; +} + +/** + * halmac_init_state_machine_88xx() - init halmac software state machine + * @halmac_adapter + * + * SD1 internal use. + * + * Author : KaiYuan Chang/Ivan Lin + * Return : void + */ +void halmac_init_state_machine_88xx(struct halmac_adapter *halmac_adapter) +{ + struct halmac_state *state = &halmac_adapter->halmac_state; + + halmac_init_offload_feature_state_machine_88xx(halmac_adapter); + + state->api_state = HALMAC_API_STATE_INIT; + + state->dlfw_state = HALMAC_DLFW_NONE; + state->mac_power = HALMAC_MAC_POWER_OFF; + state->ps_state = HALMAC_PS_STATE_UNDEFINE; +} + +/** + * halmac_mount_api_88xx() - attach functions to function pointer + * @halmac_adapter + * + * SD1 internal use + * + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + */ +enum halmac_ret_status +halmac_mount_api_88xx(struct halmac_adapter *halmac_adapter) +{ + void *driver_adapter = halmac_adapter->driver_adapter; + struct halmac_api *halmac_api = (struct halmac_api *)NULL; + + halmac_adapter->halmac_api = + kzalloc(sizeof(struct halmac_api), GFP_KERNEL); + if (!halmac_adapter->halmac_api) + return HALMAC_RET_MALLOC_FAIL; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + HALMAC_SVN_VER_88XX "\n"); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "HALMAC_MAJOR_VER_88XX = %x\n", HALMAC_MAJOR_VER_88XX); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "HALMAC_PROTOTYPE_88XX = %x\n", + HALMAC_PROTOTYPE_VER_88XX); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "HALMAC_MINOR_VER_88XX = %x\n", HALMAC_MINOR_VER_88XX); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "HALMAC_PATCH_VER_88XX = %x\n", HALMAC_PATCH_VER_88XX); + + /* Mount function pointer */ + halmac_api->halmac_download_firmware = halmac_download_firmware_88xx; + halmac_api->halmac_free_download_firmware = + halmac_free_download_firmware_88xx; + halmac_api->halmac_get_fw_version = halmac_get_fw_version_88xx; + halmac_api->halmac_cfg_mac_addr = halmac_cfg_mac_addr_88xx; + halmac_api->halmac_cfg_bssid = halmac_cfg_bssid_88xx; + halmac_api->halmac_cfg_multicast_addr = halmac_cfg_multicast_addr_88xx; + halmac_api->halmac_pre_init_system_cfg = + halmac_pre_init_system_cfg_88xx; + halmac_api->halmac_init_system_cfg = halmac_init_system_cfg_88xx; + halmac_api->halmac_init_edca_cfg = halmac_init_edca_cfg_88xx; + halmac_api->halmac_cfg_operation_mode = halmac_cfg_operation_mode_88xx; + halmac_api->halmac_cfg_ch_bw = halmac_cfg_ch_bw_88xx; + halmac_api->halmac_cfg_bw = halmac_cfg_bw_88xx; + halmac_api->halmac_init_wmac_cfg = halmac_init_wmac_cfg_88xx; + halmac_api->halmac_init_mac_cfg = halmac_init_mac_cfg_88xx; + halmac_api->halmac_init_sdio_cfg = halmac_init_sdio_cfg_88xx; + halmac_api->halmac_init_usb_cfg = halmac_init_usb_cfg_88xx; + halmac_api->halmac_init_pcie_cfg = halmac_init_pcie_cfg_88xx; + halmac_api->halmac_deinit_sdio_cfg = halmac_deinit_sdio_cfg_88xx; + halmac_api->halmac_deinit_usb_cfg = halmac_deinit_usb_cfg_88xx; + halmac_api->halmac_deinit_pcie_cfg = halmac_deinit_pcie_cfg_88xx; + halmac_api->halmac_dump_efuse_map = halmac_dump_efuse_map_88xx; + halmac_api->halmac_dump_efuse_map_bt = halmac_dump_efuse_map_bt_88xx; + halmac_api->halmac_write_efuse_bt = halmac_write_efuse_bt_88xx; + halmac_api->halmac_dump_logical_efuse_map = + halmac_dump_logical_efuse_map_88xx; + halmac_api->halmac_pg_efuse_by_map = halmac_pg_efuse_by_map_88xx; + halmac_api->halmac_get_efuse_size = halmac_get_efuse_size_88xx; + halmac_api->halmac_get_efuse_available_size = + halmac_get_efuse_available_size_88xx; + halmac_api->halmac_get_c2h_info = halmac_get_c2h_info_88xx; + + halmac_api->halmac_get_logical_efuse_size = + halmac_get_logical_efuse_size_88xx; + + halmac_api->halmac_write_logical_efuse = + halmac_write_logical_efuse_88xx; + halmac_api->halmac_read_logical_efuse = halmac_read_logical_efuse_88xx; + + halmac_api->halmac_cfg_fwlps_option = halmac_cfg_fwlps_option_88xx; + halmac_api->halmac_cfg_fwips_option = halmac_cfg_fwips_option_88xx; + halmac_api->halmac_enter_wowlan = halmac_enter_wowlan_88xx; + halmac_api->halmac_leave_wowlan = halmac_leave_wowlan_88xx; + halmac_api->halmac_enter_ps = halmac_enter_ps_88xx; + halmac_api->halmac_leave_ps = halmac_leave_ps_88xx; + halmac_api->halmac_h2c_lb = halmac_h2c_lb_88xx; + halmac_api->halmac_debug = halmac_debug_88xx; + halmac_api->halmac_cfg_parameter = halmac_cfg_parameter_88xx; + halmac_api->halmac_update_datapack = halmac_update_datapack_88xx; + halmac_api->halmac_run_datapack = halmac_run_datapack_88xx; + halmac_api->halmac_cfg_drv_info = halmac_cfg_drv_info_88xx; + halmac_api->halmac_send_bt_coex = halmac_send_bt_coex_88xx; + halmac_api->halmac_verify_platform_api = + halmac_verify_platform_api_88xx; + halmac_api->halmac_update_packet = halmac_update_packet_88xx; + halmac_api->halmac_bcn_ie_filter = halmac_bcn_ie_filter_88xx; + halmac_api->halmac_cfg_txbf = halmac_cfg_txbf_88xx; + halmac_api->halmac_cfg_mumimo = halmac_cfg_mumimo_88xx; + halmac_api->halmac_cfg_sounding = halmac_cfg_sounding_88xx; + halmac_api->halmac_del_sounding = halmac_del_sounding_88xx; + halmac_api->halmac_su_bfer_entry_init = halmac_su_bfer_entry_init_88xx; + halmac_api->halmac_su_bfee_entry_init = halmac_su_bfee_entry_init_88xx; + halmac_api->halmac_mu_bfer_entry_init = halmac_mu_bfer_entry_init_88xx; + halmac_api->halmac_mu_bfee_entry_init = halmac_mu_bfee_entry_init_88xx; + halmac_api->halmac_su_bfer_entry_del = halmac_su_bfer_entry_del_88xx; + halmac_api->halmac_su_bfee_entry_del = halmac_su_bfee_entry_del_88xx; + halmac_api->halmac_mu_bfer_entry_del = halmac_mu_bfer_entry_del_88xx; + halmac_api->halmac_mu_bfee_entry_del = halmac_mu_bfee_entry_del_88xx; + + halmac_api->halmac_add_ch_info = halmac_add_ch_info_88xx; + halmac_api->halmac_add_extra_ch_info = halmac_add_extra_ch_info_88xx; + halmac_api->halmac_ctrl_ch_switch = halmac_ctrl_ch_switch_88xx; + halmac_api->halmac_p2pps = halmac_p2pps_88xx; + halmac_api->halmac_clear_ch_info = halmac_clear_ch_info_88xx; + halmac_api->halmac_send_general_info = halmac_send_general_info_88xx; + + halmac_api->halmac_start_iqk = halmac_start_iqk_88xx; + halmac_api->halmac_ctrl_pwr_tracking = halmac_ctrl_pwr_tracking_88xx; + halmac_api->halmac_psd = halmac_psd_88xx; + halmac_api->halmac_cfg_la_mode = halmac_cfg_la_mode_88xx; + halmac_api->halmac_cfg_rx_fifo_expanding_mode = + halmac_cfg_rx_fifo_expanding_mode_88xx; + + halmac_api->halmac_config_security = halmac_config_security_88xx; + halmac_api->halmac_get_used_cam_entry_num = + halmac_get_used_cam_entry_num_88xx; + halmac_api->halmac_read_cam_entry = halmac_read_cam_entry_88xx; + halmac_api->halmac_write_cam = halmac_write_cam_88xx; + halmac_api->halmac_clear_cam_entry = halmac_clear_cam_entry_88xx; + + halmac_api->halmac_get_hw_value = halmac_get_hw_value_88xx; + halmac_api->halmac_set_hw_value = halmac_set_hw_value_88xx; + + halmac_api->halmac_cfg_drv_rsvd_pg_num = + halmac_cfg_drv_rsvd_pg_num_88xx; + halmac_api->halmac_get_chip_version = halmac_get_chip_version_88xx; + + halmac_api->halmac_query_status = halmac_query_status_88xx; + halmac_api->halmac_reset_feature = halmac_reset_feature_88xx; + halmac_api->halmac_check_fw_status = halmac_check_fw_status_88xx; + halmac_api->halmac_dump_fw_dmem = halmac_dump_fw_dmem_88xx; + halmac_api->halmac_cfg_max_dl_size = halmac_cfg_max_dl_size_88xx; + + halmac_api->halmac_dump_fifo = halmac_dump_fifo_88xx; + halmac_api->halmac_get_fifo_size = halmac_get_fifo_size_88xx; + + halmac_api->halmac_chk_txdesc = halmac_chk_txdesc_88xx; + halmac_api->halmac_dl_drv_rsvd_page = halmac_dl_drv_rsvd_page_88xx; + halmac_api->halmac_cfg_csi_rate = halmac_cfg_csi_rate_88xx; + + halmac_api->halmac_sdio_cmd53_4byte = halmac_sdio_cmd53_4byte_88xx; + halmac_api->halmac_txfifo_is_empty = halmac_txfifo_is_empty_88xx; + + if (halmac_adapter->halmac_interface == HALMAC_INTERFACE_SDIO) { + halmac_api->halmac_cfg_rx_aggregation = + halmac_cfg_rx_aggregation_88xx_sdio; + halmac_api->halmac_init_interface_cfg = + halmac_init_sdio_cfg_88xx; + halmac_api->halmac_deinit_interface_cfg = + halmac_deinit_sdio_cfg_88xx; + halmac_api->halmac_reg_read_8 = halmac_reg_read_8_sdio_88xx; + halmac_api->halmac_reg_write_8 = halmac_reg_write_8_sdio_88xx; + halmac_api->halmac_reg_read_16 = halmac_reg_read_16_sdio_88xx; + halmac_api->halmac_reg_write_16 = halmac_reg_write_16_sdio_88xx; + halmac_api->halmac_reg_read_32 = halmac_reg_read_32_sdio_88xx; + halmac_api->halmac_reg_write_32 = halmac_reg_write_32_sdio_88xx; + halmac_api->halmac_reg_read_indirect_32 = + halmac_reg_read_indirect_32_sdio_88xx; + halmac_api->halmac_reg_sdio_cmd53_read_n = + halmac_reg_read_nbyte_sdio_88xx; + } else if (halmac_adapter->halmac_interface == HALMAC_INTERFACE_USB) { + halmac_api->halmac_cfg_rx_aggregation = + halmac_cfg_rx_aggregation_88xx_usb; + halmac_api->halmac_init_interface_cfg = + halmac_init_usb_cfg_88xx; + halmac_api->halmac_deinit_interface_cfg = + halmac_deinit_usb_cfg_88xx; + halmac_api->halmac_reg_read_8 = halmac_reg_read_8_usb_88xx; + halmac_api->halmac_reg_write_8 = halmac_reg_write_8_usb_88xx; + halmac_api->halmac_reg_read_16 = halmac_reg_read_16_usb_88xx; + halmac_api->halmac_reg_write_16 = halmac_reg_write_16_usb_88xx; + halmac_api->halmac_reg_read_32 = halmac_reg_read_32_usb_88xx; + halmac_api->halmac_reg_write_32 = halmac_reg_write_32_usb_88xx; + } else if (halmac_adapter->halmac_interface == HALMAC_INTERFACE_PCIE) { + halmac_api->halmac_cfg_rx_aggregation = + halmac_cfg_rx_aggregation_88xx_pcie; + halmac_api->halmac_init_interface_cfg = + halmac_init_pcie_cfg_88xx; + halmac_api->halmac_deinit_interface_cfg = + halmac_deinit_pcie_cfg_88xx; + halmac_api->halmac_reg_read_8 = halmac_reg_read_8_pcie_88xx; + halmac_api->halmac_reg_write_8 = halmac_reg_write_8_pcie_88xx; + halmac_api->halmac_reg_read_16 = halmac_reg_read_16_pcie_88xx; + halmac_api->halmac_reg_write_16 = halmac_reg_write_16_pcie_88xx; + halmac_api->halmac_reg_read_32 = halmac_reg_read_32_pcie_88xx; + halmac_api->halmac_reg_write_32 = halmac_reg_write_32_pcie_88xx; + } else { + pr_err("Set halmac io function Error!!\n"); + } + + halmac_api->halmac_set_bulkout_num = halmac_set_bulkout_num_88xx; + halmac_api->halmac_get_sdio_tx_addr = halmac_get_sdio_tx_addr_88xx; + halmac_api->halmac_get_usb_bulkout_id = halmac_get_usb_bulkout_id_88xx; + halmac_api->halmac_timer_2s = halmac_timer_2s_88xx; + halmac_api->halmac_fill_txdesc_checksum = + halmac_fill_txdesc_check_sum_88xx; + + if (halmac_adapter->chip_id == HALMAC_CHIP_ID_8822B) { + /*mount 8822b function and data*/ + halmac_mount_api_8822b(halmac_adapter); + + } else if (halmac_adapter->chip_id == HALMAC_CHIP_ID_8821C) { + } else if (halmac_adapter->chip_id == HALMAC_CHIP_ID_8814B) { + } else if (halmac_adapter->chip_id == HALMAC_CHIP_ID_8197F) { + } else { + pr_err("Chip ID undefine!!\n"); + return HALMAC_RET_CHIP_NOT_SUPPORT; + } + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_download_firmware_88xx() - download Firmware + * @halmac_adapter : the adapter of halmac + * @hamacl_fw : firmware bin + * @halmac_fw_size : firmware size + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_download_firmware_88xx(struct halmac_adapter *halmac_adapter, + u8 *hamacl_fw, u32 halmac_fw_size) +{ + u8 value8; + u8 *file_ptr; + u32 dest; + u16 value16; + u32 restore_index = 0; + u32 halmac_h2c_ver = 0, fw_h2c_ver = 0; + u32 iram_pkt_size, dmem_pkt_size, eram_pkt_size = 0; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + struct halmac_restore_info restore_info[DLFW_RESTORE_REG_NUM_88XX]; + u32 temp; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_DOWNLOAD_FIRMWARE); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>\n", __func__); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s start!!\n", __func__); + + if (halmac_fw_size > HALMAC_FW_SIZE_MAX_88XX || + halmac_fw_size < HALMAC_FWHDR_SIZE_88XX) { + pr_err("FW size error!\n"); + return HALMAC_RET_FW_SIZE_ERR; + } + + fw_h2c_ver = le32_to_cpu( + *((__le32 *) + (hamacl_fw + HALMAC_FWHDR_OFFSET_H2C_FORMAT_VER_88XX))); + halmac_h2c_ver = H2C_FORMAT_VERSION; + HALMAC_RT_TRACE( + driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "halmac h2c/c2h format = %x, fw h2c/c2h format = %x!!\n", + halmac_h2c_ver, fw_h2c_ver); + if (fw_h2c_ver != halmac_h2c_ver) + HALMAC_RT_TRACE( + driver_adapter, HALMAC_MSG_INIT, DBG_WARNING, + "[WARN]H2C/C2H version between HALMAC and FW is compatible!!\n"); + + halmac_adapter->halmac_state.dlfw_state = HALMAC_DLFW_NONE; + + value8 = HALMAC_REG_READ_8(halmac_adapter, REG_SYS_FUNC_EN + 1); + value8 = (u8)(value8 & ~(BIT(2))); + HALMAC_REG_WRITE_8(halmac_adapter, REG_SYS_FUNC_EN + 1, + value8); /* Disable CPU reset */ + + value8 = HALMAC_REG_READ_8(halmac_adapter, REG_RSV_CTRL + 1); + value8 = (u8)(value8 & ~(BIT(0))); + HALMAC_REG_WRITE_8(halmac_adapter, REG_RSV_CTRL + 1, value8); + + restore_info[restore_index].length = 1; + restore_info[restore_index].mac_register = REG_TXDMA_PQ_MAP + 1; + restore_info[restore_index].value = + HALMAC_REG_READ_8(halmac_adapter, REG_TXDMA_PQ_MAP + 1); + restore_index++; + value8 = HALMAC_DMA_MAPPING_HIGH << 6; + HALMAC_REG_WRITE_8(halmac_adapter, REG_TXDMA_PQ_MAP + 1, + value8); /* set HIQ to hi priority */ + + /* DLFW only use HIQ, map HIQ to hi priority */ + halmac_adapter->halmac_ptcl_queue[HALMAC_PTCL_QUEUE_HI] = + HALMAC_DMA_MAPPING_HIGH; + restore_info[restore_index].length = 1; + restore_info[restore_index].mac_register = REG_CR; + restore_info[restore_index].value = + HALMAC_REG_READ_8(halmac_adapter, REG_CR); + restore_index++; + restore_info[restore_index].length = 4; + restore_info[restore_index].mac_register = REG_H2CQ_CSR; + restore_info[restore_index].value = BIT(31); + restore_index++; + value8 = BIT_HCI_TXDMA_EN | BIT_TXDMA_EN; + HALMAC_REG_WRITE_8(halmac_adapter, REG_CR, value8); + HALMAC_REG_WRITE_32(halmac_adapter, REG_H2CQ_CSR, BIT(31)); + + /* Config hi priority queue and public priority queue page number + * (only for DLFW) + */ + restore_info[restore_index].length = 2; + restore_info[restore_index].mac_register = REG_FIFOPAGE_INFO_1; + restore_info[restore_index].value = + HALMAC_REG_READ_16(halmac_adapter, REG_FIFOPAGE_INFO_1); + restore_index++; + restore_info[restore_index].length = 4; + restore_info[restore_index].mac_register = REG_RQPN_CTRL_2; + restore_info[restore_index].value = + HALMAC_REG_READ_32(halmac_adapter, REG_RQPN_CTRL_2) | BIT(31); + restore_index++; + HALMAC_REG_WRITE_16(halmac_adapter, REG_FIFOPAGE_INFO_1, 0x200); + HALMAC_REG_WRITE_32(halmac_adapter, REG_RQPN_CTRL_2, + restore_info[restore_index - 1].value); + + if (halmac_adapter->halmac_interface == HALMAC_INTERFACE_SDIO) { + HALMAC_REG_READ_32(halmac_adapter, REG_SDIO_FREE_TXPG); + HALMAC_REG_WRITE_32(halmac_adapter, REG_SDIO_TX_CTRL, + 0x00000000); + } + + halmac_adapter->fw_version.version = le16_to_cpu( + *((__le16 *)(hamacl_fw + HALMAC_FWHDR_OFFSET_VERSION_88XX))); + halmac_adapter->fw_version.sub_version = + *(hamacl_fw + HALMAC_FWHDR_OFFSET_SUBVERSION_88XX); + halmac_adapter->fw_version.sub_index = + *(hamacl_fw + HALMAC_FWHDR_OFFSET_SUBINDEX_88XX); + halmac_adapter->fw_version.h2c_version = (u16)fw_h2c_ver; + + dmem_pkt_size = le32_to_cpu(*((__le32 *)(hamacl_fw + + HALMAC_FWHDR_OFFSET_DMEM_SIZE_88XX))); + iram_pkt_size = le32_to_cpu(*((__le32 *)(hamacl_fw + + HALMAC_FWHDR_OFFSET_IRAM_SIZE_88XX))); + if (((*(hamacl_fw + HALMAC_FWHDR_OFFSET_MEM_USAGE_88XX)) & BIT(4)) != 0) + eram_pkt_size = + le32_to_cpu(*((__le32 *)(hamacl_fw + + HALMAC_FWHDR_OFFSET_ERAM_SIZE_88XX))); + + dmem_pkt_size += HALMAC_FW_CHKSUM_DUMMY_SIZE_88XX; + iram_pkt_size += HALMAC_FW_CHKSUM_DUMMY_SIZE_88XX; + if (eram_pkt_size != 0) + eram_pkt_size += HALMAC_FW_CHKSUM_DUMMY_SIZE_88XX; + + if (halmac_fw_size != (HALMAC_FWHDR_SIZE_88XX + dmem_pkt_size + + iram_pkt_size + eram_pkt_size)) { + pr_err("FW size mismatch the real fw size!\n"); + goto DLFW_FAIL; + } + + value8 = HALMAC_REG_READ_8(halmac_adapter, REG_CR + 1); + restore_info[restore_index].length = 1; + restore_info[restore_index].mac_register = REG_CR + 1; + restore_info[restore_index].value = value8; + restore_index++; + value8 = (u8)(value8 | BIT(0)); + HALMAC_REG_WRITE_8(halmac_adapter, REG_CR + 1, + value8); /* Enable SW TX beacon */ + + value8 = HALMAC_REG_READ_8(halmac_adapter, REG_BCN_CTRL); + restore_info[restore_index].length = 1; + restore_info[restore_index].mac_register = REG_BCN_CTRL; + restore_info[restore_index].value = value8; + restore_index++; + value8 = (u8)((value8 & (~BIT(3))) | BIT(4)); + HALMAC_REG_WRITE_8(halmac_adapter, REG_BCN_CTRL, + value8); /* Disable beacon related functions */ + + value8 = HALMAC_REG_READ_8(halmac_adapter, REG_FWHW_TXQ_CTRL + 2); + restore_info[restore_index].length = 1; + restore_info[restore_index].mac_register = REG_FWHW_TXQ_CTRL + 2; + restore_info[restore_index].value = value8; + restore_index++; + value8 = (u8)(value8 & ~(BIT(6))); + HALMAC_REG_WRITE_8(halmac_adapter, REG_FWHW_TXQ_CTRL + 2, + value8); /* Disable ptcl tx bcnq */ + + restore_info[restore_index].length = 2; + restore_info[restore_index].mac_register = REG_FIFOPAGE_CTRL_2; + restore_info[restore_index].value = + HALMAC_REG_READ_16(halmac_adapter, REG_FIFOPAGE_CTRL_2) | + BIT(15); + restore_index++; + value16 = 0x8000; + HALMAC_REG_WRITE_16(halmac_adapter, REG_FIFOPAGE_CTRL_2, + value16); /* Set beacon header to 0 */ + + value16 = (u16)(HALMAC_REG_READ_16(halmac_adapter, REG_MCUFW_CTRL) & + 0x3800); + value16 |= BIT(0); + HALMAC_REG_WRITE_16(halmac_adapter, REG_MCUFW_CTRL, + value16); /* MCU/FW setting */ + + value8 = HALMAC_REG_READ_8(halmac_adapter, REG_CPU_DMEM_CON + 2); + value8 &= ~(BIT(0)); + HALMAC_REG_WRITE_8(halmac_adapter, REG_CPU_DMEM_CON + 2, value8); + value8 |= BIT(0); + HALMAC_REG_WRITE_8(halmac_adapter, REG_CPU_DMEM_CON + 2, value8); + + /* Download to DMEM */ + file_ptr = hamacl_fw + HALMAC_FWHDR_SIZE_88XX; + temp = le32_to_cpu(*((__le32 *)(hamacl_fw + + HALMAC_FWHDR_OFFSET_DMEM_ADDR_88XX))) & + ~(BIT(31)); + if (halmac_dlfw_to_mem_88xx(halmac_adapter, file_ptr, temp, + dmem_pkt_size) != HALMAC_RET_SUCCESS) + goto DLFW_END; + + /* Download to IMEM */ + file_ptr = hamacl_fw + HALMAC_FWHDR_SIZE_88XX + dmem_pkt_size; + temp = le32_to_cpu(*((__le32 *)(hamacl_fw + + HALMAC_FWHDR_OFFSET_IRAM_ADDR_88XX))) & + ~(BIT(31)); + if (halmac_dlfw_to_mem_88xx(halmac_adapter, file_ptr, temp, + iram_pkt_size) != HALMAC_RET_SUCCESS) + goto DLFW_END; + + /* Download to EMEM */ + if (eram_pkt_size != 0) { + file_ptr = hamacl_fw + HALMAC_FWHDR_SIZE_88XX + dmem_pkt_size + + iram_pkt_size; + dest = le32_to_cpu((*((__le32 *)(hamacl_fw + + HALMAC_FWHDR_OFFSET_EMEM_ADDR_88XX)))) & + ~(BIT(31)); + if (halmac_dlfw_to_mem_88xx(halmac_adapter, file_ptr, dest, + eram_pkt_size) != + HALMAC_RET_SUCCESS) + goto DLFW_END; + } + + halmac_init_offload_feature_state_machine_88xx(halmac_adapter); +DLFW_END: + + halmac_restore_mac_register_88xx(halmac_adapter, restore_info, + DLFW_RESTORE_REG_NUM_88XX); + + if (halmac_dlfw_end_flow_88xx(halmac_adapter) != HALMAC_RET_SUCCESS) + goto DLFW_FAIL; + + halmac_adapter->halmac_state.dlfw_state = HALMAC_DLFW_DONE; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; + +DLFW_FAIL: + + /* Disable FWDL_EN */ + HALMAC_REG_WRITE_8( + halmac_adapter, REG_MCUFW_CTRL, + (u8)(HALMAC_REG_READ_8(halmac_adapter, REG_MCUFW_CTRL) & + ~(BIT(0)))); + + return HALMAC_RET_DLFW_FAIL; +} + +/** + * halmac_free_download_firmware_88xx() - download specific memory firmware + * @halmac_adapter + * @dlfw_mem : memory selection + * @hamacl_fw : firmware bin + * @halmac_fw_size : firmware size + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + */ +enum halmac_ret_status +halmac_free_download_firmware_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_dlfw_mem dlfw_mem, u8 *hamacl_fw, + u32 halmac_fw_size) +{ + u8 tx_pause_backup; + u8 *file_ptr; + u32 dest; + u16 bcn_head_backup; + u32 iram_pkt_size, dmem_pkt_size, eram_pkt_size = 0; + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_DLFW_FAIL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "[TRACE]%s ==========>\n", __func__); + + if (halmac_fw_size > HALMAC_FW_SIZE_MAX_88XX || + halmac_fw_size < HALMAC_FWHDR_SIZE_88XX) { + pr_err("[ERR]FW size error!\n"); + return HALMAC_RET_FW_SIZE_ERR; + } + + dmem_pkt_size = + le32_to_cpu(*(__le32 *)(hamacl_fw + + HALMAC_FWHDR_OFFSET_DMEM_SIZE_88XX)); + iram_pkt_size = + le32_to_cpu(*(__le32 *)(hamacl_fw + + HALMAC_FWHDR_OFFSET_IRAM_SIZE_88XX)); + if (((*(hamacl_fw + HALMAC_FWHDR_OFFSET_MEM_USAGE_88XX)) & BIT(4)) != 0) + eram_pkt_size = + le32_to_cpu(*(__le32 *)(hamacl_fw + + HALMAC_FWHDR_OFFSET_ERAM_SIZE_88XX)); + + dmem_pkt_size += HALMAC_FW_CHKSUM_DUMMY_SIZE_88XX; + iram_pkt_size += HALMAC_FW_CHKSUM_DUMMY_SIZE_88XX; + if (eram_pkt_size != 0) + eram_pkt_size += HALMAC_FW_CHKSUM_DUMMY_SIZE_88XX; + + if (halmac_fw_size != (HALMAC_FWHDR_SIZE_88XX + dmem_pkt_size + + iram_pkt_size + eram_pkt_size)) { + pr_err("[ERR]FW size mismatch the real fw size!\n"); + return HALMAC_RET_DLFW_FAIL; + } + + tx_pause_backup = HALMAC_REG_READ_8(halmac_adapter, REG_TXPAUSE); + HALMAC_REG_WRITE_8(halmac_adapter, REG_TXPAUSE, + tx_pause_backup | BIT(7)); + + bcn_head_backup = + HALMAC_REG_READ_16(halmac_adapter, REG_FIFOPAGE_CTRL_2) | + BIT(15); + HALMAC_REG_WRITE_16(halmac_adapter, REG_FIFOPAGE_CTRL_2, 0x8000); + + if (eram_pkt_size != 0) { + file_ptr = hamacl_fw + HALMAC_FWHDR_SIZE_88XX + dmem_pkt_size + + iram_pkt_size; + dest = le32_to_cpu(*((__le32 *)(hamacl_fw + + HALMAC_FWHDR_OFFSET_EMEM_ADDR_88XX))) & + ~(BIT(31)); + status = halmac_dlfw_to_mem_88xx(halmac_adapter, file_ptr, dest, + eram_pkt_size); + if (status != HALMAC_RET_SUCCESS) + goto DL_FREE_FW_END; + } + + status = halmac_free_dl_fw_end_flow_88xx(halmac_adapter); + +DL_FREE_FW_END: + HALMAC_REG_WRITE_8(halmac_adapter, REG_TXPAUSE, tx_pause_backup); + HALMAC_REG_WRITE_16(halmac_adapter, REG_FIFOPAGE_CTRL_2, + bcn_head_backup); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "[TRACE]%s <==========\n", __func__); + + return status; +} + +/** + * halmac_get_fw_version_88xx() - get FW version + * @halmac_adapter : the adapter of halmac + * @fw_version : fw version info + * Author : Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_get_fw_version_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_fw_version *fw_version) +{ + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_adapter->halmac_state.dlfw_state == 0) + return HALMAC_RET_DLFW_FAIL; + + fw_version->version = halmac_adapter->fw_version.version; + fw_version->sub_version = halmac_adapter->fw_version.sub_version; + fw_version->sub_index = halmac_adapter->fw_version.sub_index; + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_cfg_mac_addr_88xx() - config mac address + * @halmac_adapter : the adapter of halmac + * @halmac_port :0 for port0, 1 for port1, 2 for port2, 3 for port3, 4 for port4 + * @hal_address : mac address + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_cfg_mac_addr_88xx(struct halmac_adapter *halmac_adapter, u8 halmac_port, + union halmac_wlan_addr *hal_address) +{ + u16 mac_address_H; + u32 mac_address_L; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "[TRACE]%s ==========>\n", __func__); + + if (halmac_port >= HALMAC_PORTIDMAX) { + pr_err("[ERR]port index > 5\n"); + return HALMAC_RET_PORT_NOT_SUPPORT; + } + + mac_address_L = le32_to_cpu(hal_address->address_l_h.le_address_low); + mac_address_H = le16_to_cpu(hal_address->address_l_h.le_address_high); + + halmac_adapter->hal_mac_addr[halmac_port].address_l_h.address_low = + mac_address_L; + halmac_adapter->hal_mac_addr[halmac_port].address_l_h.address_high = + mac_address_H; + + switch (halmac_port) { + case HALMAC_PORTID0: + HALMAC_REG_WRITE_32(halmac_adapter, REG_MACID, mac_address_L); + HALMAC_REG_WRITE_16(halmac_adapter, REG_MACID + 4, + mac_address_H); + break; + + case HALMAC_PORTID1: + HALMAC_REG_WRITE_32(halmac_adapter, REG_MACID1, mac_address_L); + HALMAC_REG_WRITE_16(halmac_adapter, REG_MACID1 + 4, + mac_address_H); + break; + + case HALMAC_PORTID2: + HALMAC_REG_WRITE_32(halmac_adapter, REG_MACID2, mac_address_L); + HALMAC_REG_WRITE_16(halmac_adapter, REG_MACID2 + 4, + mac_address_H); + break; + + case HALMAC_PORTID3: + HALMAC_REG_WRITE_32(halmac_adapter, REG_MACID3, mac_address_L); + HALMAC_REG_WRITE_16(halmac_adapter, REG_MACID3 + 4, + mac_address_H); + break; + + case HALMAC_PORTID4: + HALMAC_REG_WRITE_32(halmac_adapter, REG_MACID4, mac_address_L); + HALMAC_REG_WRITE_16(halmac_adapter, REG_MACID4 + 4, + mac_address_H); + break; + + default: + + break; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "[TRACE]%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_cfg_bssid_88xx() - config BSSID + * @halmac_adapter : the adapter of halmac + * @halmac_port :0 for port0, 1 for port1, 2 for port2, 3 for port3, 4 for port4 + * @hal_address : bssid + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_cfg_bssid_88xx(struct halmac_adapter *halmac_adapter, u8 halmac_port, + union halmac_wlan_addr *hal_address) +{ + u16 bssid_address_H; + u32 bssid_address_L; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "[TRACE]%s ==========>\n", __func__); + + if (halmac_port >= HALMAC_PORTIDMAX) { + pr_err("[ERR]port index > 5\n"); + return HALMAC_RET_PORT_NOT_SUPPORT; + } + + bssid_address_L = le32_to_cpu(hal_address->address_l_h.le_address_low); + bssid_address_H = le16_to_cpu(hal_address->address_l_h.le_address_high); + + halmac_adapter->hal_bss_addr[halmac_port].address_l_h.address_low = + bssid_address_L; + halmac_adapter->hal_bss_addr[halmac_port].address_l_h.address_high = + bssid_address_H; + + switch (halmac_port) { + case HALMAC_PORTID0: + HALMAC_REG_WRITE_32(halmac_adapter, REG_BSSID, bssid_address_L); + HALMAC_REG_WRITE_16(halmac_adapter, REG_BSSID + 4, + bssid_address_H); + break; + + case HALMAC_PORTID1: + HALMAC_REG_WRITE_32(halmac_adapter, REG_BSSID1, + bssid_address_L); + HALMAC_REG_WRITE_16(halmac_adapter, REG_BSSID1 + 4, + bssid_address_H); + break; + + case HALMAC_PORTID2: + HALMAC_REG_WRITE_32(halmac_adapter, REG_BSSID2, + bssid_address_L); + HALMAC_REG_WRITE_16(halmac_adapter, REG_BSSID2 + 4, + bssid_address_H); + break; + + case HALMAC_PORTID3: + HALMAC_REG_WRITE_32(halmac_adapter, REG_BSSID3, + bssid_address_L); + HALMAC_REG_WRITE_16(halmac_adapter, REG_BSSID3 + 4, + bssid_address_H); + break; + + case HALMAC_PORTID4: + HALMAC_REG_WRITE_32(halmac_adapter, REG_BSSID4, + bssid_address_L); + HALMAC_REG_WRITE_16(halmac_adapter, REG_BSSID4 + 4, + bssid_address_H); + break; + + default: + + break; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "[TRACE]%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_cfg_multicast_addr_88xx() - config multicast address + * @halmac_adapter : the adapter of halmac + * @hal_address : multicast address + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_cfg_multicast_addr_88xx(struct halmac_adapter *halmac_adapter, + union halmac_wlan_addr *hal_address) +{ + u16 address_H; + u32 address_L; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_CFG_MULTICAST_ADDR); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>\n", __func__); + + address_L = le32_to_cpu(hal_address->address_l_h.le_address_low); + address_H = le16_to_cpu(hal_address->address_l_h.le_address_high); + + HALMAC_REG_WRITE_32(halmac_adapter, REG_MAR, address_L); + HALMAC_REG_WRITE_16(halmac_adapter, REG_MAR + 4, address_H); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_pre_init_system_cfg_88xx() - pre-init system config + * @halmac_adapter : the adapter of halmac + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_pre_init_system_cfg_88xx(struct halmac_adapter *halmac_adapter) +{ + u32 value32, counter; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + bool enable_bb; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_PRE_INIT_SYSTEM_CFG); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "halmac_pre_init_system_cfg ==========>\n"); + + if (halmac_adapter->halmac_interface == HALMAC_INTERFACE_SDIO) { + HALMAC_REG_WRITE_8( + halmac_adapter, REG_SDIO_HSUS_CTRL, + HALMAC_REG_READ_8(halmac_adapter, REG_SDIO_HSUS_CTRL) & + ~(BIT(0))); + counter = 10000; + while (!(HALMAC_REG_READ_8(halmac_adapter, REG_SDIO_HSUS_CTRL) & + 0x02)) { + counter--; + if (counter == 0) + return HALMAC_RET_SDIO_LEAVE_SUSPEND_FAIL; + } + } else if (halmac_adapter->halmac_interface == HALMAC_INTERFACE_USB) { + if (HALMAC_REG_READ_8(halmac_adapter, REG_SYS_CFG2 + 3) == + 0x20) /* usb3.0 */ + HALMAC_REG_WRITE_8( + halmac_adapter, 0xFE5B, + HALMAC_REG_READ_8(halmac_adapter, 0xFE5B) | + BIT(4)); + } + + /* Config PIN Mux */ + value32 = HALMAC_REG_READ_32(halmac_adapter, REG_PAD_CTRL1); + value32 = value32 & (~(BIT(28) | BIT(29))); + value32 = value32 | BIT(28) | BIT(29); + HALMAC_REG_WRITE_32(halmac_adapter, REG_PAD_CTRL1, value32); + + value32 = HALMAC_REG_READ_32(halmac_adapter, REG_LED_CFG); + value32 = value32 & (~(BIT(25) | BIT(26))); + HALMAC_REG_WRITE_32(halmac_adapter, REG_LED_CFG, value32); + + value32 = HALMAC_REG_READ_32(halmac_adapter, REG_GPIO_MUXCFG); + value32 = value32 & (~(BIT(2))); + value32 = value32 | BIT(2); + HALMAC_REG_WRITE_32(halmac_adapter, REG_GPIO_MUXCFG, value32); + + enable_bb = false; + halmac_set_hw_value_88xx(halmac_adapter, HALMAC_HW_EN_BB_RF, + &enable_bb); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "halmac_pre_init_system_cfg <==========\n"); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_init_system_cfg_88xx() - init system config + * @halmac_adapter : the adapter of halmac + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_init_system_cfg_88xx(struct halmac_adapter *halmac_adapter) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_INIT_SYSTEM_CFG); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "halmac_init_system_cfg ==========>\n"); + + HALMAC_REG_WRITE_8(halmac_adapter, REG_SYS_FUNC_EN + 1, + HALMAC_FUNCTION_ENABLE_88XX); + HALMAC_REG_WRITE_32( + halmac_adapter, REG_SYS_SDIO_CTRL, + (u32)(HALMAC_REG_READ_32(halmac_adapter, REG_SYS_SDIO_CTRL) | + BIT_LTE_MUX_CTRL_PATH)); + HALMAC_REG_WRITE_32( + halmac_adapter, REG_CPU_DMEM_CON, + (u32)(HALMAC_REG_READ_32(halmac_adapter, REG_CPU_DMEM_CON) | + BIT_WL_PLATFORM_RST)); + + /* halmac_api->halmac_init_h2c(halmac_adapter); */ + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "halmac_init_system_cfg <==========\n"); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_init_edca_cfg_88xx() - init EDCA config + * @halmac_adapter : the adapter of halmac + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_init_edca_cfg_88xx(struct halmac_adapter *halmac_adapter) +{ + u8 value8; + u32 value32; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_INIT_EDCA_CFG); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>\n", __func__); + + /* Clear TX pause */ + HALMAC_REG_WRITE_16(halmac_adapter, REG_TXPAUSE, 0x0000); + + HALMAC_REG_WRITE_8(halmac_adapter, REG_SLOT, HALMAC_SLOT_TIME_88XX); + HALMAC_REG_WRITE_8(halmac_adapter, REG_PIFS, HALMAC_PIFS_TIME_88XX); + value32 = HALMAC_SIFS_CCK_CTX_88XX | + (HALMAC_SIFS_OFDM_CTX_88XX << BIT_SHIFT_SIFS_OFDM_CTX) | + (HALMAC_SIFS_CCK_TRX_88XX << BIT_SHIFT_SIFS_CCK_TRX) | + (HALMAC_SIFS_OFDM_TRX_88XX << BIT_SHIFT_SIFS_OFDM_TRX); + HALMAC_REG_WRITE_32(halmac_adapter, REG_SIFS, value32); + + HALMAC_REG_WRITE_32( + halmac_adapter, REG_EDCA_VO_PARAM, + HALMAC_REG_READ_32(halmac_adapter, REG_EDCA_VO_PARAM) & 0xFFFF); + HALMAC_REG_WRITE_16(halmac_adapter, REG_EDCA_VO_PARAM + 2, + HALMAC_VO_TXOP_LIMIT_88XX); + HALMAC_REG_WRITE_16(halmac_adapter, REG_EDCA_VI_PARAM + 2, + HALMAC_VI_TXOP_LIMIT_88XX); + + HALMAC_REG_WRITE_32(halmac_adapter, REG_RD_NAV_NXT, + HALMAC_RDG_NAV_88XX | (HALMAC_TXOP_NAV_88XX << 16)); + HALMAC_REG_WRITE_16(halmac_adapter, REG_RXTSF_OFFSET_CCK, + HALMAC_CCK_RX_TSF_88XX | + (HALMAC_OFDM_RX_TSF_88XX) << 8); + + value8 = HALMAC_REG_READ_8(halmac_adapter, REG_RD_CTRL + 1); + value8 |= + (BIT_VOQ_RD_INIT_EN | BIT_VIQ_RD_INIT_EN | BIT_BEQ_RD_INIT_EN); + HALMAC_REG_WRITE_8(halmac_adapter, REG_RD_CTRL + 1, value8); + + /* Set beacon cotnrol - enable TSF and other related functions */ + HALMAC_REG_WRITE_8( + halmac_adapter, REG_BCN_CTRL, + (u8)(HALMAC_REG_READ_8(halmac_adapter, REG_BCN_CTRL) | + BIT_EN_BCN_FUNCTION)); + + /* Set send beacon related registers */ + HALMAC_REG_WRITE_32(halmac_adapter, REG_TBTT_PROHIBIT, + HALMAC_TBTT_PROHIBIT_88XX | + (HALMAC_TBTT_HOLD_TIME_88XX + << BIT_SHIFT_TBTT_HOLD_TIME_AP)); + HALMAC_REG_WRITE_8(halmac_adapter, REG_DRVERLYINT, + HALMAC_DRIVER_EARLY_INT_88XX); + HALMAC_REG_WRITE_8(halmac_adapter, REG_BCNDMATIM, + HALMAC_BEACON_DMA_TIM_88XX); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_init_wmac_cfg_88xx() - init wmac config + * @halmac_adapter : the adapter of halmac + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_init_wmac_cfg_88xx(struct halmac_adapter *halmac_adapter) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_INIT_WMAC_CFG); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>\n", __func__); + + HALMAC_REG_WRITE_32(halmac_adapter, REG_RXFLTMAP0, + HALMAC_RX_FILTER0_88XX); + HALMAC_REG_WRITE_16(halmac_adapter, REG_RXFLTMAP, + HALMAC_RX_FILTER_88XX); + + HALMAC_REG_WRITE_32(halmac_adapter, REG_RCR, HALMAC_RCR_CONFIG_88XX); + + HALMAC_REG_WRITE_8( + halmac_adapter, REG_TCR + 1, + (u8)(HALMAC_REG_READ_8(halmac_adapter, REG_TCR + 1) | 0x30)); + HALMAC_REG_WRITE_8(halmac_adapter, REG_TCR + 2, 0x30); + HALMAC_REG_WRITE_8(halmac_adapter, REG_TCR + 1, 0x00); + + HALMAC_REG_WRITE_32(halmac_adapter, REG_WMAC_OPTION_FUNCTION + 8, + 0x30810041); + HALMAC_REG_WRITE_32(halmac_adapter, REG_WMAC_OPTION_FUNCTION + 4, + 0x50802080); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_init_mac_cfg_88xx() - config page1~page7 register + * @halmac_adapter : the adapter of halmac + * @mode : trx mode + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_init_mac_cfg_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_trx_mode mode) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_INIT_MAC_CFG); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>mode = %d\n", __func__, + mode); + + status = halmac_api->halmac_init_trx_cfg(halmac_adapter, mode); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_init_trx_cfg error = %x\n", status); + return status; + } + status = halmac_api->halmac_init_protocol_cfg(halmac_adapter); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_init_protocol_cfg_88xx error = %x\n", status); + return status; + } + + status = halmac_init_edca_cfg_88xx(halmac_adapter); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_init_edca_cfg_88xx error = %x\n", status); + return status; + } + + status = halmac_init_wmac_cfg_88xx(halmac_adapter); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_init_wmac_cfg_88xx error = %x\n", status); + return status; + } + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s <==========\n", __func__); + + return status; +} + +/** + * halmac_cfg_operation_mode_88xx() - config operation mode + * @halmac_adapter : the adapter of halmac + * @wireless_mode : 802.11 standard(b/g/n/ac) + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_cfg_operation_mode_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_wireless_mode wireless_mode) +{ + void *driver_adapter = NULL; + enum halmac_wireless_mode wireless_mode_local = + HALMAC_WIRELESS_MODE_UNDEFINE; + + wireless_mode_local = wireless_mode; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_CFG_OPERATION_MODE); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE( + driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>wireless_mode = %d\n", __func__, + wireless_mode); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_cfg_ch_bw_88xx() - config channel & bandwidth + * @halmac_adapter : the adapter of halmac + * @channel : WLAN channel, support 2.4G & 5G + * @pri_ch_idx : primary channel index, idx1, idx2, idx3, idx4 + * @bw : band width, 20, 40, 80, 160, 5 ,10 + * Author : KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_cfg_ch_bw_88xx(struct halmac_adapter *halmac_adapter, u8 channel, + enum halmac_pri_ch_idx pri_ch_idx, enum halmac_bw bw) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CFG_CH_BW); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>ch = %d, idx=%d, bw=%d\n", __func__, + channel, pri_ch_idx, bw); + + halmac_cfg_pri_ch_idx_88xx(halmac_adapter, pri_ch_idx); + + halmac_cfg_bw_88xx(halmac_adapter, bw); + + halmac_cfg_ch_88xx(halmac_adapter, channel); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status halmac_cfg_ch_88xx(struct halmac_adapter *halmac_adapter, + u8 channel) +{ + u8 value8; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CFG_CH_BW); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>ch = %d\n", __func__, channel); + + value8 = HALMAC_REG_READ_8(halmac_adapter, REG_CCK_CHECK); + value8 = value8 & (~(BIT(7))); + + if (channel > 35) + value8 = value8 | BIT(7); + + HALMAC_REG_WRITE_8(halmac_adapter, REG_CCK_CHECK, value8); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_cfg_pri_ch_idx_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_pri_ch_idx pri_ch_idx) +{ + u8 txsc_40 = 0, txsc_20 = 0; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CFG_CH_BW); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========> idx=%d\n", __func__, + pri_ch_idx); + + txsc_20 = pri_ch_idx; + if (txsc_20 == HALMAC_CH_IDX_1 || txsc_20 == HALMAC_CH_IDX_3) + txsc_40 = 9; + else + txsc_40 = 10; + + HALMAC_REG_WRITE_8(halmac_adapter, REG_DATA_SC, + BIT_TXSC_20M(txsc_20) | BIT_TXSC_40M(txsc_40)); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_cfg_bw_88xx() - config bandwidth + * @halmac_adapter : the adapter of halmac + * @bw : band width, 20, 40, 80, 160, 5 ,10 + * Author : KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status halmac_cfg_bw_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_bw bw) +{ + u32 value32; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CFG_BW); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>bw=%d\n", __func__, bw); + + /* RF mode */ + value32 = HALMAC_REG_READ_32(halmac_adapter, REG_WMAC_TRXPTCL_CTL); + value32 = value32 & (~(BIT(7) | BIT(8))); + + switch (bw) { + case HALMAC_BW_80: + value32 = value32 | BIT(7); + break; + case HALMAC_BW_40: + value32 = value32 | BIT(8); + break; + case HALMAC_BW_20: + case HALMAC_BW_10: + case HALMAC_BW_5: + break; + default: + pr_err("%s switch case not support\n", __func__); + break; + } + HALMAC_REG_WRITE_32(halmac_adapter, REG_WMAC_TRXPTCL_CTL, value32); + + /* MAC CLK */ + value32 = HALMAC_REG_READ_32(halmac_adapter, REG_AFE_CTRL1); + value32 = (value32 & (~(BIT(20) | BIT(21)))) | + (HALMAC_MAC_CLOCK_HW_DEF_80M << BIT_SHIFT_MAC_CLK_SEL); + HALMAC_REG_WRITE_32(halmac_adapter, REG_AFE_CTRL1, value32); + + HALMAC_REG_WRITE_8(halmac_adapter, REG_USTIME_TSF, + HALMAC_MAC_CLOCK_88XX); + HALMAC_REG_WRITE_8(halmac_adapter, REG_USTIME_EDCA, + HALMAC_MAC_CLOCK_88XX); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_dump_efuse_map_88xx() - dump "physical" efuse map + * @halmac_adapter : the adapter of halmac + * @cfg : dump efuse method + * Author : Ivan Lin/KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_dump_efuse_map_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_efuse_read_cfg cfg) +{ + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + enum halmac_cmd_process_status *process_status = + &halmac_adapter->halmac_state.efuse_state_set.process_status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_DUMP_EFUSE_MAP); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>cfg=%d\n", __func__, cfg); + + if (*process_status == HALMAC_CMD_PROCESS_SENDING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Wait event(dump efuse)...\n"); + return HALMAC_RET_BUSY_STATE; + } + + if (halmac_query_efuse_curr_state_88xx(halmac_adapter) != + HALMAC_EFUSE_CMD_CONSTRUCT_IDLE) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Not idle state(dump efuse)...\n"); + return HALMAC_RET_ERROR_STATE; + } + + if (halmac_adapter->halmac_state.mac_power == HALMAC_MAC_POWER_OFF) + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_WARNING, + "[WARN]Dump efuse in suspend mode\n"); + + *process_status = HALMAC_CMD_PROCESS_IDLE; + halmac_adapter->event_trigger.physical_efuse_map = 1; + + status = halmac_func_switch_efuse_bank_88xx(halmac_adapter, + HALMAC_EFUSE_BANK_WIFI); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_func_switch_efuse_bank error = %x\n", status); + return status; + } + + status = halmac_dump_efuse_88xx(halmac_adapter, cfg); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_read_efuse error = %x\n", status); + return status; + } + + if (halmac_adapter->hal_efuse_map_valid) { + *process_status = HALMAC_CMD_PROCESS_DONE; + + PLATFORM_EVENT_INDICATION( + driver_adapter, HALMAC_FEATURE_DUMP_PHYSICAL_EFUSE, + *process_status, halmac_adapter->hal_efuse_map, + halmac_adapter->hw_config_info.efuse_size); + halmac_adapter->event_trigger.physical_efuse_map = 0; + } + + if (halmac_transition_efuse_state_88xx( + halmac_adapter, HALMAC_EFUSE_CMD_CONSTRUCT_IDLE) != + HALMAC_RET_SUCCESS) + return HALMAC_RET_ERROR_STATE; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_dump_efuse_map_bt_88xx() - dump "BT physical" efuse map + * @halmac_adapter : the adapter of halmac + * @halmac_efuse_bank : bt efuse bank + * @bt_efuse_map_size : bt efuse map size. get from halmac_get_efuse_size API + * @bt_efuse_map : bt efuse map + * Author : Soar / Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_dump_efuse_map_bt_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_efuse_bank halmac_efuse_bank, + u32 bt_efuse_map_size, u8 *bt_efuse_map) +{ + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + enum halmac_cmd_process_status *process_status = + &halmac_adapter->halmac_state.efuse_state_set.process_status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_DUMP_EFUSE_MAP_BT); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>\n", __func__); + + if (halmac_adapter->hw_config_info.bt_efuse_size != bt_efuse_map_size) + return HALMAC_RET_EFUSE_SIZE_INCORRECT; + + if ((halmac_efuse_bank >= HALMAC_EFUSE_BANK_MAX) || + halmac_efuse_bank == HALMAC_EFUSE_BANK_WIFI) { + pr_err("Undefined BT bank\n"); + return HALMAC_RET_EFUSE_BANK_INCORRECT; + } + + if (*process_status == HALMAC_CMD_PROCESS_SENDING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Wait event(dump efuse)...\n"); + return HALMAC_RET_BUSY_STATE; + } + + if (halmac_query_efuse_curr_state_88xx(halmac_adapter) != + HALMAC_EFUSE_CMD_CONSTRUCT_IDLE) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Not idle state(dump efuse)...\n"); + return HALMAC_RET_ERROR_STATE; + } + + status = halmac_func_switch_efuse_bank_88xx(halmac_adapter, + halmac_efuse_bank); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_func_switch_efuse_bank error = %x\n", status); + return status; + } + + status = halmac_read_hw_efuse_88xx(halmac_adapter, 0, bt_efuse_map_size, + bt_efuse_map); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_read_hw_efuse_88xx error = %x\n", status); + return status; + } + + if (halmac_transition_efuse_state_88xx( + halmac_adapter, HALMAC_EFUSE_CMD_CONSTRUCT_IDLE) != + HALMAC_RET_SUCCESS) + return HALMAC_RET_ERROR_STATE; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_write_efuse_bt_88xx() - write "BT physical" efuse offset + * @halmac_adapter : the adapter of halmac + * @halmac_offset : offset + * @halmac_value : Write value + * @bt_efuse_map : bt efuse map + * Author : Soar + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_write_efuse_bt_88xx(struct halmac_adapter *halmac_adapter, + u32 halmac_offset, u8 halmac_value, + enum halmac_efuse_bank halmac_efuse_bank) +{ + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + enum halmac_cmd_process_status *process_status = + &halmac_adapter->halmac_state.efuse_state_set.process_status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_WRITE_EFUSE_BT); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s ==========>\n", __func__); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "offset : %X value : %X Bank : %X\n", halmac_offset, + halmac_value, halmac_efuse_bank); + + if (*process_status == HALMAC_CMD_PROCESS_SENDING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Wait/Rcvd event(dump efuse)...\n"); + return HALMAC_RET_BUSY_STATE; + } + + if (halmac_query_efuse_curr_state_88xx(halmac_adapter) != + HALMAC_EFUSE_CMD_CONSTRUCT_IDLE) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Not idle state(dump efuse)...\n"); + return HALMAC_RET_ERROR_STATE; + } + + if (halmac_offset >= halmac_adapter->hw_config_info.efuse_size) { + pr_err("Offset is too large\n"); + return HALMAC_RET_EFUSE_SIZE_INCORRECT; + } + + if (halmac_efuse_bank > HALMAC_EFUSE_BANK_MAX || + halmac_efuse_bank == HALMAC_EFUSE_BANK_WIFI) { + pr_err("Undefined BT bank\n"); + return HALMAC_RET_EFUSE_BANK_INCORRECT; + } + + status = halmac_func_switch_efuse_bank_88xx(halmac_adapter, + halmac_efuse_bank); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_func_switch_efuse_bank error = %x\n", status); + return status; + } + + status = halmac_func_write_efuse_88xx(halmac_adapter, halmac_offset, + halmac_value); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_func_write_efuse error = %x\n", status); + return status; + } + + if (halmac_transition_efuse_state_88xx( + halmac_adapter, HALMAC_EFUSE_CMD_CONSTRUCT_IDLE) != + HALMAC_RET_SUCCESS) + return HALMAC_RET_ERROR_STATE; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_get_efuse_available_size_88xx() - get efuse available size + * @halmac_adapter : the adapter of halmac + * @halmac_size : physical efuse available size + * Author : Soar + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_get_efuse_available_size_88xx(struct halmac_adapter *halmac_adapter, + u32 *halmac_size) +{ + enum halmac_ret_status status; + void *driver_adapter = NULL; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s ==========>\n", __func__); + + status = halmac_dump_logical_efuse_map_88xx(halmac_adapter, + HALMAC_EFUSE_R_DRV); + + if (status != HALMAC_RET_SUCCESS) + return status; + + *halmac_size = halmac_adapter->hw_config_info.efuse_size - + HALMAC_PROTECTED_EFUSE_SIZE_88XX - + halmac_adapter->efuse_end; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_get_efuse_size_88xx() - get "physical" efuse size + * @halmac_adapter : the adapter of halmac + * @halmac_size : physical efuse size + * Author : Ivan Lin/KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_get_efuse_size_88xx(struct halmac_adapter *halmac_adapter, + u32 *halmac_size) +{ + void *driver_adapter = NULL; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_GET_EFUSE_SIZE); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s ==========>\n", __func__); + + *halmac_size = halmac_adapter->hw_config_info.efuse_size; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_get_logical_efuse_size_88xx() - get "logical" efuse size + * @halmac_adapter : the adapter of halmac + * @halmac_size : logical efuse size + * Author : Ivan Lin/KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_get_logical_efuse_size_88xx(struct halmac_adapter *halmac_adapter, + u32 *halmac_size) +{ + void *driver_adapter = NULL; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_GET_LOGICAL_EFUSE_SIZE); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s ==========>\n", __func__); + + *halmac_size = halmac_adapter->hw_config_info.eeprom_size; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_dump_logical_efuse_map_88xx() - dump "logical" efuse map + * @halmac_adapter : the adapter of halmac + * @cfg : dump efuse method + * Author : Soar + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_dump_logical_efuse_map_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_efuse_read_cfg cfg) +{ + u8 *eeprom_map = NULL; + u32 eeprom_size = halmac_adapter->hw_config_info.eeprom_size; + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + enum halmac_cmd_process_status *process_status = + &halmac_adapter->halmac_state.efuse_state_set.process_status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_DUMP_LOGICAL_EFUSE_MAP); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s ==========>cfg = %d\n", __func__, cfg); + + if (*process_status == HALMAC_CMD_PROCESS_SENDING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Wait/Rcvd event(dump efuse)...\n"); + return HALMAC_RET_BUSY_STATE; + } + + if (halmac_query_efuse_curr_state_88xx(halmac_adapter) != + HALMAC_EFUSE_CMD_CONSTRUCT_IDLE) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Not idle state(dump efuse)...\n"); + return HALMAC_RET_ERROR_STATE; + } + + if (halmac_adapter->halmac_state.mac_power == HALMAC_MAC_POWER_OFF) + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_WARNING, + "[WARN]Dump logical efuse in suspend mode\n"); + + *process_status = HALMAC_CMD_PROCESS_IDLE; + halmac_adapter->event_trigger.logical_efuse_map = 1; + + status = halmac_func_switch_efuse_bank_88xx(halmac_adapter, + HALMAC_EFUSE_BANK_WIFI); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_func_switch_efuse_bank error = %x\n", status); + return status; + } + + status = halmac_dump_efuse_88xx(halmac_adapter, cfg); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_eeprom_parser_88xx error = %x\n", status); + return status; + } + + if (halmac_adapter->hal_efuse_map_valid) { + *process_status = HALMAC_CMD_PROCESS_DONE; + + eeprom_map = kzalloc(eeprom_size, GFP_KERNEL); + if (!eeprom_map) { + /* out of memory */ + return HALMAC_RET_MALLOC_FAIL; + } + memset(eeprom_map, 0xFF, eeprom_size); + + if (halmac_eeprom_parser_88xx(halmac_adapter, + halmac_adapter->hal_efuse_map, + eeprom_map) != HALMAC_RET_SUCCESS) { + kfree(eeprom_map); + return HALMAC_RET_EEPROM_PARSING_FAIL; + } + + PLATFORM_EVENT_INDICATION( + driver_adapter, HALMAC_FEATURE_DUMP_LOGICAL_EFUSE, + *process_status, eeprom_map, eeprom_size); + halmac_adapter->event_trigger.logical_efuse_map = 0; + + kfree(eeprom_map); + } + + if (halmac_transition_efuse_state_88xx( + halmac_adapter, HALMAC_EFUSE_CMD_CONSTRUCT_IDLE) != + HALMAC_RET_SUCCESS) + return HALMAC_RET_ERROR_STATE; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_read_logical_efuse_88xx() - read logical efuse map 1 byte + * @halmac_adapter : the adapter of halmac + * @halmac_offset : offset + * @value : 1 byte efuse value + * Author : Soar + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_read_logical_efuse_88xx(struct halmac_adapter *halmac_adapter, + u32 halmac_offset, u8 *value) +{ + u8 *eeprom_map = NULL; + u32 eeprom_size = halmac_adapter->hw_config_info.eeprom_size; + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + enum halmac_cmd_process_status *process_status = + &halmac_adapter->halmac_state.efuse_state_set.process_status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_READ_LOGICAL_EFUSE); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s ==========>\n", __func__); + + if (halmac_offset >= eeprom_size) { + pr_err("Offset is too large\n"); + return HALMAC_RET_EFUSE_SIZE_INCORRECT; + } + + if (*process_status == HALMAC_CMD_PROCESS_SENDING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Wait/Rcvd event(dump efuse)...\n"); + return HALMAC_RET_BUSY_STATE; + } + if (halmac_query_efuse_curr_state_88xx(halmac_adapter) != + HALMAC_EFUSE_CMD_CONSTRUCT_IDLE) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Not idle state(dump efuse)...\n"); + return HALMAC_RET_ERROR_STATE; + } + + status = halmac_func_switch_efuse_bank_88xx(halmac_adapter, + HALMAC_EFUSE_BANK_WIFI); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_func_switch_efuse_bank error = %x\n", status); + return status; + } + + eeprom_map = kzalloc(eeprom_size, GFP_KERNEL); + if (!eeprom_map) { + /* out of memory */ + return HALMAC_RET_MALLOC_FAIL; + } + memset(eeprom_map, 0xFF, eeprom_size); + + status = halmac_read_logical_efuse_map_88xx(halmac_adapter, eeprom_map); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_read_logical_efuse_map error = %x\n", status); + kfree(eeprom_map); + return status; + } + + *value = *(eeprom_map + halmac_offset); + + if (halmac_transition_efuse_state_88xx( + halmac_adapter, HALMAC_EFUSE_CMD_CONSTRUCT_IDLE) != + HALMAC_RET_SUCCESS) { + kfree(eeprom_map); + return HALMAC_RET_ERROR_STATE; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s <==========\n", __func__); + + kfree(eeprom_map); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_write_logical_efuse_88xx() - write "logical" efuse offset + * @halmac_adapter : the adapter of halmac + * @halmac_offset : offset + * @halmac_value : value + * Author : Soar + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_write_logical_efuse_88xx(struct halmac_adapter *halmac_adapter, + u32 halmac_offset, u8 halmac_value) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + enum halmac_cmd_process_status *process_status = + &halmac_adapter->halmac_state.efuse_state_set.process_status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_WRITE_LOGICAL_EFUSE); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s ==========>\n", __func__); + + if (halmac_offset >= halmac_adapter->hw_config_info.eeprom_size) { + pr_err("Offset is too large\n"); + return HALMAC_RET_EFUSE_SIZE_INCORRECT; + } + + if (*process_status == HALMAC_CMD_PROCESS_SENDING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Wait/Rcvd event(dump efuse)...\n"); + return HALMAC_RET_BUSY_STATE; + } + + if (halmac_query_efuse_curr_state_88xx(halmac_adapter) != + HALMAC_EFUSE_CMD_CONSTRUCT_IDLE) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Not idle state(dump efuse)...\n"); + return HALMAC_RET_ERROR_STATE; + } + + status = halmac_func_switch_efuse_bank_88xx(halmac_adapter, + HALMAC_EFUSE_BANK_WIFI); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_func_switch_efuse_bank error = %x\n", status); + return status; + } + + status = halmac_func_write_logical_efuse_88xx( + halmac_adapter, halmac_offset, halmac_value); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_write_logical_efuse error = %x\n", status); + return status; + } + + if (halmac_transition_efuse_state_88xx( + halmac_adapter, HALMAC_EFUSE_CMD_CONSTRUCT_IDLE) != + HALMAC_RET_SUCCESS) + return HALMAC_RET_ERROR_STATE; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_pg_efuse_by_map_88xx() - pg logical efuse by map + * @halmac_adapter : the adapter of halmac + * @pg_efuse_info : efuse map information + * @cfg : dump efuse method + * Author : Soar + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_pg_efuse_by_map_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_pg_efuse_info *pg_efuse_info, + enum halmac_efuse_read_cfg cfg) +{ + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + enum halmac_cmd_process_status *process_status = + &halmac_adapter->halmac_state.efuse_state_set.process_status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_PG_EFUSE_BY_MAP); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s ==========>\n", __func__); + + if (pg_efuse_info->efuse_map_size != + halmac_adapter->hw_config_info.eeprom_size) { + pr_err("efuse_map_size is incorrect, should be %d bytes\n", + halmac_adapter->hw_config_info.eeprom_size); + return HALMAC_RET_EFUSE_SIZE_INCORRECT; + } + + if ((pg_efuse_info->efuse_map_size & 0xF) > 0) { + pr_err("efuse_map_size should be multiple of 16\n"); + return HALMAC_RET_EFUSE_SIZE_INCORRECT; + } + + if (pg_efuse_info->efuse_mask_size != + pg_efuse_info->efuse_map_size >> 4) { + pr_err("efuse_mask_size is incorrect, should be %d bytes\n", + pg_efuse_info->efuse_map_size >> 4); + return HALMAC_RET_EFUSE_SIZE_INCORRECT; + } + + if (!pg_efuse_info->efuse_map) { + pr_err("efuse_map is NULL\n"); + return HALMAC_RET_NULL_POINTER; + } + + if (!pg_efuse_info->efuse_mask) { + pr_err("efuse_mask is NULL\n"); + return HALMAC_RET_NULL_POINTER; + } + + if (*process_status == HALMAC_CMD_PROCESS_SENDING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Wait/Rcvd event(dump efuse)...\n"); + return HALMAC_RET_BUSY_STATE; + } + + if (halmac_query_efuse_curr_state_88xx(halmac_adapter) != + HALMAC_EFUSE_CMD_CONSTRUCT_IDLE) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Not idle state(dump efuse)...\n"); + return HALMAC_RET_ERROR_STATE; + } + + status = halmac_func_switch_efuse_bank_88xx(halmac_adapter, + HALMAC_EFUSE_BANK_WIFI); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_func_switch_efuse_bank error = %x\n", status); + return status; + } + + status = halmac_func_pg_efuse_by_map_88xx(halmac_adapter, pg_efuse_info, + cfg); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_pg_efuse_by_map error = %x\n", status); + return status; + } + + if (halmac_transition_efuse_state_88xx( + halmac_adapter, HALMAC_EFUSE_CMD_CONSTRUCT_IDLE) != + HALMAC_RET_SUCCESS) + return HALMAC_RET_ERROR_STATE; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_EFUSE, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_get_c2h_info_88xx() - process halmac C2H packet + * @halmac_adapter : the adapter of halmac + * @halmac_buf : RX Packet pointer + * @halmac_size : RX Packet size + * Author : KaiYuan Chang/Ivan Lin + * + * Used to process c2h packet info from RX path. After receiving the packet, + * user need to call this api and pass the packet pointer. + * + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_get_c2h_info_88xx(struct halmac_adapter *halmac_adapter, u8 *halmac_buf, + u32 halmac_size) +{ + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_GET_C2H_INFO); + + driver_adapter = halmac_adapter->driver_adapter; + + /* Check if it is C2H packet */ + if (GET_RX_DESC_C2H(halmac_buf)) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "C2H packet, start parsing!\n"); + + status = halmac_parse_c2h_packet_88xx(halmac_adapter, + halmac_buf, halmac_size); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_parse_c2h_packet_88xx error = %x\n", + status); + return status; + } + } + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_cfg_fwlps_option_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_fwlps_option *lps_option) +{ + void *driver_adapter = NULL; + struct halmac_fwlps_option *hal_fwlps_option; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CFG_FWLPS_OPTION); + + driver_adapter = halmac_adapter->driver_adapter; + hal_fwlps_option = &halmac_adapter->fwlps_option; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_PWR, DBG_DMESG, + "%s ==========>\n", __func__); + + hal_fwlps_option->mode = lps_option->mode; + hal_fwlps_option->clk_request = lps_option->clk_request; + hal_fwlps_option->rlbm = lps_option->rlbm; + hal_fwlps_option->smart_ps = lps_option->smart_ps; + hal_fwlps_option->awake_interval = lps_option->awake_interval; + hal_fwlps_option->all_queue_uapsd = lps_option->all_queue_uapsd; + hal_fwlps_option->pwr_state = lps_option->pwr_state; + hal_fwlps_option->low_pwr_rx_beacon = lps_option->low_pwr_rx_beacon; + hal_fwlps_option->ant_auto_switch = lps_option->ant_auto_switch; + hal_fwlps_option->ps_allow_bt_high_priority = + lps_option->ps_allow_bt_high_priority; + hal_fwlps_option->protect_bcn = lps_option->protect_bcn; + hal_fwlps_option->silence_period = lps_option->silence_period; + hal_fwlps_option->fast_bt_connect = lps_option->fast_bt_connect; + hal_fwlps_option->two_antenna_en = lps_option->two_antenna_en; + hal_fwlps_option->adopt_user_setting = lps_option->adopt_user_setting; + hal_fwlps_option->drv_bcn_early_shift = lps_option->drv_bcn_early_shift; + hal_fwlps_option->enter_32K = lps_option->enter_32K; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_PWR, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_cfg_fwips_option_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_fwips_option *ips_option) +{ + void *driver_adapter = NULL; + struct halmac_fwips_option *ips_option_local; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CFG_FWIPS_OPTION); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_PWR, DBG_DMESG, + "%s ==========>\n", __func__); + + ips_option_local = ips_option; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_PWR, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_enter_wowlan_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_wowlan_option *wowlan_option) +{ + void *driver_adapter = NULL; + struct halmac_wowlan_option *wowlan_option_local; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_ENTER_WOWLAN); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_PWR, DBG_DMESG, + "%s ==========>\n", __func__); + + wowlan_option_local = wowlan_option; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_PWR, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_leave_wowlan_88xx(struct halmac_adapter *halmac_adapter) +{ + void *driver_adapter = NULL; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_LEAVE_WOWLAN); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_PWR, DBG_DMESG, + "%s ==========>\n", __func__); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_PWR, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_enter_ps_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_ps_state ps_state) +{ + u8 rpwm; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_ENTER_PS); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_PWR, DBG_DMESG, + "%s ==========>\n", __func__); + + if (ps_state == halmac_adapter->halmac_state.ps_state) { + pr_err("power state is already in PS State!!\n"); + return HALMAC_RET_SUCCESS; + } + + if (ps_state == HALMAC_PS_STATE_LPS) { + status = halmac_send_h2c_set_pwr_mode_88xx( + halmac_adapter, &halmac_adapter->fwlps_option); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_send_h2c_set_pwr_mode_88xx error = %x!!\n", + status); + return status; + } + } else if (ps_state == HALMAC_PS_STATE_IPS) { + } + + halmac_adapter->halmac_state.ps_state = ps_state; + + /* Enter 32K */ + if (halmac_adapter->halmac_interface == HALMAC_INTERFACE_SDIO) { + if (halmac_adapter->fwlps_option.enter_32K) { + rpwm = (u8)(((halmac_adapter->rpwm_record ^ (BIT(7))) | + (BIT(0))) & + 0x81); + HALMAC_REG_WRITE_8(halmac_adapter, REG_SDIO_HRPWM1, + rpwm); + halmac_adapter->low_clk = true; + } + } else if (halmac_adapter->halmac_interface == HALMAC_INTERFACE_USB) { + if (halmac_adapter->fwlps_option.enter_32K) { + rpwm = (u8)(((halmac_adapter->rpwm_record ^ (BIT(7))) | + (BIT(0))) & + 0x81); + HALMAC_REG_WRITE_8(halmac_adapter, 0xFE58, rpwm); + halmac_adapter->low_clk = true; + } + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_PWR, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_leave_ps_88xx(struct halmac_adapter *halmac_adapter) +{ + u8 rpwm, cpwm; + u32 counter; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + struct halmac_fwlps_option fw_lps_option; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_LEAVE_PS); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_PWR, DBG_DMESG, + "%s ==========>\n", __func__); + + if (halmac_adapter->halmac_state.ps_state == HALMAC_PS_STATE_ACT) { + pr_err("power state is already in active!!\n"); + return HALMAC_RET_SUCCESS; + } + + if (halmac_adapter->low_clk) { + cpwm = HALMAC_REG_READ_8(halmac_adapter, REG_SDIO_HRPWM1); + rpwm = (u8)( + ((halmac_adapter->rpwm_record ^ (BIT(7))) | (BIT(6))) & + 0xC0); + HALMAC_REG_WRITE_8(halmac_adapter, REG_SDIO_HRPWM1, rpwm); + + cpwm = (u8)((cpwm ^ BIT(7)) & BIT(7)); + counter = 100; + while (cpwm != + (HALMAC_REG_READ_8(halmac_adapter, REG_SDIO_HRPWM1) & + BIT(7))) { + usleep_range(50, 60); + counter--; + if (counter == 0) + return HALMAC_RET_CHANGE_PS_FAIL; + } + halmac_adapter->low_clk = false; + } + + memcpy(&fw_lps_option, &halmac_adapter->fwlps_option, + sizeof(struct halmac_fwlps_option)); + fw_lps_option.mode = 0; + + status = halmac_send_h2c_set_pwr_mode_88xx(halmac_adapter, + &fw_lps_option); + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_send_h2c_set_pwr_mode_88xx error!!=%x\n", + status); + return status; + } + + halmac_adapter->halmac_state.ps_state = HALMAC_PS_STATE_ACT; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_PWR, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * (debug API)halmac_h2c_lb_88xx() - send h2c loopback packet + * @halmac_adapter : the adapter of halmac + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status halmac_h2c_lb_88xx(struct halmac_adapter *halmac_adapter) +{ + void *driver_adapter = NULL; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_H2C_LB); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_debug_88xx() - dump information for debugging + * @halmac_adapter : the adapter of halmac + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status halmac_debug_88xx(struct halmac_adapter *halmac_adapter) +{ + u8 temp8 = 0; + u32 i = 0, temp32 = 0; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_DEBUG); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>\n", __func__); + + if (halmac_adapter->halmac_interface == HALMAC_INTERFACE_SDIO) { + /* Dump CCCR, it needs new platform api */ + + /*Dump SDIO Local Register, use CMD52*/ + for (i = 0x10250000; i < 0x102500ff; i++) { + temp8 = PLATFORM_SDIO_CMD52_READ(halmac_adapter, i); + HALMAC_RT_TRACE( + driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "halmac_debug: sdio[%x]=%x\n", i, temp8); + } + + /*Dump MAC Register*/ + for (i = 0x0000; i < 0x17ff; i++) { + temp8 = PLATFORM_SDIO_CMD52_READ(halmac_adapter, i); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, + DBG_DMESG, "halmac_debug: mac[%x]=%x\n", + i, temp8); + } + + /*Check RX Fifo status*/ + i = REG_RXFF_PTR_V1; + temp8 = PLATFORM_SDIO_CMD52_READ(halmac_adapter, i); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "halmac_debug: mac[%x]=%x\n", i, temp8); + i = REG_RXFF_WTR_V1; + temp8 = PLATFORM_SDIO_CMD52_READ(halmac_adapter, i); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "halmac_debug: mac[%x]=%x\n", i, temp8); + i = REG_RXFF_PTR_V1; + temp8 = PLATFORM_SDIO_CMD52_READ(halmac_adapter, i); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "halmac_debug: mac[%x]=%x\n", i, temp8); + i = REG_RXFF_WTR_V1; + temp8 = PLATFORM_SDIO_CMD52_READ(halmac_adapter, i); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "halmac_debug: mac[%x]=%x\n", i, temp8); + } else { + /*Dump MAC Register*/ + for (i = 0x0000; i < 0x17fc; i += 4) { + temp32 = HALMAC_REG_READ_32(halmac_adapter, i); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, + DBG_DMESG, "halmac_debug: mac[%x]=%x\n", + i, temp32); + } + + /*Check RX Fifo status*/ + i = REG_RXFF_PTR_V1; + temp32 = HALMAC_REG_READ_32(halmac_adapter, i); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "halmac_debug: mac[%x]=%x\n", i, temp32); + i = REG_RXFF_WTR_V1; + temp32 = HALMAC_REG_READ_32(halmac_adapter, i); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "halmac_debug: mac[%x]=%x\n", i, temp32); + i = REG_RXFF_PTR_V1; + temp32 = HALMAC_REG_READ_32(halmac_adapter, i); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "halmac_debug: mac[%x]=%x\n", i, temp32); + i = REG_RXFF_WTR_V1; + temp32 = HALMAC_REG_READ_32(halmac_adapter, i); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "halmac_debug: mac[%x]=%x\n", i, temp32); + } + + /* TODO: Add check register code, including MAC CLK, CPU CLK */ + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_cfg_parameter_88xx() - config parameter by FW + * @halmac_adapter : the adapter of halmac + * @para_info : cmd id, content + * @full_fifo : parameter information + * + * If msk_en = true, the format of array is {reg_info, mask, value}. + * If msk_en =_FAUSE, the format of array is {reg_info, value} + * The format of reg_info is + * reg_info[31]=rf_reg, 0: MAC_BB reg, 1: RF reg + * reg_info[27:24]=rf_path, 0: path_A, 1: path_B + * if rf_reg=0(MAC_BB reg), rf_path is meaningless. + * ref_info[15:0]=offset + * + * Example: msk_en = false + * {0x8100000a, 0x00001122} + * =>Set RF register, path_B, offset 0xA to 0x00001122 + * {0x00000824, 0x11224433} + * =>Set MAC_BB register, offset 0x800 to 0x11224433 + * + * Note : full fifo mode only for init flow + * + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_cfg_parameter_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_phy_parameter_info *para_info, + u8 full_fifo) +{ + void *driver_adapter = NULL; + enum halmac_ret_status ret_status = HALMAC_RET_SUCCESS; + enum halmac_cmd_process_status *process_status = + &halmac_adapter->halmac_state.cfg_para_state_set.process_status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + if (halmac_adapter->fw_version.h2c_version < 4) + return HALMAC_RET_FW_NO_SUPPORT; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CFG_PARAMETER); + + driver_adapter = halmac_adapter->driver_adapter; + + if (halmac_adapter->halmac_state.dlfw_state == HALMAC_DLFW_NONE) { + pr_err("%s Fail due to DLFW NONE!!\n", __func__); + return HALMAC_RET_DLFW_FAIL; + } + + if (*process_status == HALMAC_CMD_PROCESS_SENDING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Wait event(cfg para)...\n"); + return HALMAC_RET_BUSY_STATE; + } + + if (halmac_query_cfg_para_curr_state_88xx(halmac_adapter) != + HALMAC_CFG_PARA_CMD_CONSTRUCT_IDLE && + halmac_query_cfg_para_curr_state_88xx(halmac_adapter) != + HALMAC_CFG_PARA_CMD_CONSTRUCT_CONSTRUCTING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Not idle state(cfg para)...\n"); + return HALMAC_RET_BUSY_STATE; + } + + *process_status = HALMAC_CMD_PROCESS_IDLE; + + ret_status = halmac_send_h2c_phy_parameter_88xx(halmac_adapter, + para_info, full_fifo); + + if (ret_status != HALMAC_RET_SUCCESS) { + pr_err("halmac_send_h2c_phy_parameter_88xx Fail!! = %x\n", + ret_status); + return ret_status; + } + + return ret_status; +} + +/** + * halmac_update_packet_88xx() - send specific packet to FW + * @halmac_adapter : the adapter of halmac + * @pkt_id : packet id, to know the purpose of this packet + * @pkt : packet + * @pkt_size : packet size + * + * Note : TX_DESC is not included in the pkt + * + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_update_packet_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_packet_id pkt_id, u8 *pkt, u32 pkt_size) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + enum halmac_cmd_process_status *process_status = + &halmac_adapter->halmac_state.update_packet_set.process_status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + if (halmac_adapter->fw_version.h2c_version < 4) + return HALMAC_RET_FW_NO_SUPPORT; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_UPDATE_PACKET); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + if (*process_status == HALMAC_CMD_PROCESS_SENDING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Wait event(update_packet)...\n"); + return HALMAC_RET_BUSY_STATE; + } + + *process_status = HALMAC_CMD_PROCESS_SENDING; + + status = halmac_send_h2c_update_packet_88xx(halmac_adapter, pkt_id, pkt, + pkt_size); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_send_h2c_update_packet_88xx packet = %x, fail = %x!!\n", + pkt_id, status); + return status; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_bcn_ie_filter_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_bcn_ie_info *bcn_ie_info) +{ + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + if (halmac_adapter->fw_version.h2c_version < 4) + return HALMAC_RET_FW_NO_SUPPORT; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_BCN_IE_FILTER); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + status = halmac_send_h2c_update_bcn_parse_info_88xx(halmac_adapter, + bcn_ie_info); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_send_h2c_update_bcn_parse_info_88xx fail = %x\n", + status); + return status; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_update_datapack_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_data_type halmac_data_type, + struct halmac_phy_parameter_info *para_info) +{ + void *driver_adapter = NULL; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + if (halmac_adapter->fw_version.h2c_version < 4) + return HALMAC_RET_FW_NO_SUPPORT; + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "[TRACE]%s ==========>\n", __func__); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "[TRACE]%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_run_datapack_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_data_type halmac_data_type) +{ + void *driver_adapter = NULL; + enum halmac_ret_status ret_status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + if (halmac_adapter->fw_version.h2c_version < 4) + return HALMAC_RET_FW_NO_SUPPORT; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_RUN_DATAPACK); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + ret_status = halmac_send_h2c_run_datapack_88xx(halmac_adapter, + halmac_data_type); + + if (ret_status != HALMAC_RET_SUCCESS) { + pr_err("halmac_send_h2c_run_datapack_88xx Fail, datatype = %x, status = %x!!\n", + halmac_data_type, ret_status); + return ret_status; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "halmac_update_datapack_88xx <==========\n"); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_cfg_drv_info_88xx() - config driver info + * @halmac_adapter : the adapter of halmac + * @halmac_drv_info : driver information selection + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_cfg_drv_info_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_drv_info halmac_drv_info) +{ + u8 drv_info_size = 0; + u8 phy_status_en = 0; + u8 sniffer_en = 0; + u8 plcp_hdr_en = 0; + u32 value32; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CFG_DRV_INFO); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "halmac_cfg_drv_info = %d\n", halmac_drv_info); + + switch (halmac_drv_info) { + case HALMAC_DRV_INFO_NONE: + drv_info_size = 0; + phy_status_en = 0; + sniffer_en = 0; + plcp_hdr_en = 0; + break; + case HALMAC_DRV_INFO_PHY_STATUS: + drv_info_size = 4; + phy_status_en = 1; + sniffer_en = 0; + plcp_hdr_en = 0; + break; + case HALMAC_DRV_INFO_PHY_SNIFFER: + drv_info_size = 5; /* phy status 4byte, sniffer info 1byte */ + phy_status_en = 1; + sniffer_en = 1; + plcp_hdr_en = 0; + break; + case HALMAC_DRV_INFO_PHY_PLCP: + drv_info_size = 6; /* phy status 4byte, plcp header 2byte */ + phy_status_en = 1; + sniffer_en = 0; + plcp_hdr_en = 1; + break; + default: + status = HALMAC_RET_SW_CASE_NOT_SUPPORT; + pr_err("%s error = %x\n", __func__, status); + return status; + } + + if (halmac_adapter->txff_allocation.rx_fifo_expanding_mode != + HALMAC_RX_FIFO_EXPANDING_MODE_DISABLE) + drv_info_size = 0xF; + + HALMAC_REG_WRITE_8(halmac_adapter, REG_RX_DRVINFO_SZ, drv_info_size); + + halmac_adapter->drv_info_size = drv_info_size; + + value32 = HALMAC_REG_READ_32(halmac_adapter, REG_RCR); + value32 = (value32 & (~BIT_APP_PHYSTS)); + if (phy_status_en == 1) + value32 = value32 | BIT_APP_PHYSTS; + HALMAC_REG_WRITE_32(halmac_adapter, REG_RCR, value32); + + value32 = HALMAC_REG_READ_32(halmac_adapter, + REG_WMAC_OPTION_FUNCTION + 4); + value32 = (value32 & (~(BIT(8) | BIT(9)))); + if (sniffer_en == 1) + value32 = value32 | BIT(9); + if (plcp_hdr_en == 1) + value32 = value32 | BIT(8); + HALMAC_REG_WRITE_32(halmac_adapter, REG_WMAC_OPTION_FUNCTION + 4, + value32); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_send_bt_coex_88xx(struct halmac_adapter *halmac_adapter, u8 *bt_buf, + u32 bt_size, u8 ack) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + enum halmac_ret_status ret_status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_SEND_BT_COEX); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + ret_status = halmac_send_bt_coex_cmd_88xx(halmac_adapter, bt_buf, + bt_size, ack); + + if (ret_status != HALMAC_RET_SUCCESS) { + pr_err("halmac_send_bt_coex_cmd_88xx Fail = %x!!\n", + ret_status); + return ret_status; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * (debug API)halmac_verify_platform_api_88xx() - verify platform api + * @halmac_adapter : the adapter of halmac + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_verify_platform_api_88xx(struct halmac_adapter *halmac_adapter) +{ + void *driver_adapter = NULL; + enum halmac_ret_status ret_status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_VERIFY_PLATFORM_API); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + ret_status = halmac_verify_io_88xx(halmac_adapter); + + if (ret_status != HALMAC_RET_SUCCESS) + return ret_status; + + if (halmac_adapter->txff_allocation.la_mode != HALMAC_LA_MODE_FULL) + ret_status = halmac_verify_send_rsvd_page_88xx(halmac_adapter); + + if (ret_status != HALMAC_RET_SUCCESS) + return ret_status; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return ret_status; +} + +enum halmac_ret_status +halmac_send_original_h2c_88xx(struct halmac_adapter *halmac_adapter, + u8 *original_h2c, u16 *seq, u8 ack) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_SEND_ORIGINAL_H2C); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + status = halmac_func_send_original_h2c_88xx(halmac_adapter, + original_h2c, seq, ack); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_send_original_h2c FAIL = %x!!\n", status); + return status; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_timer_2s_88xx(struct halmac_adapter *halmac_adapter) +{ + void *driver_adapter = NULL; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>\n", __func__); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_fill_txdesc_check_sum_88xx() - fill in tx desc check sum + * @halmac_adapter : the adapter of halmac + * @cur_desc : tx desc packet + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_fill_txdesc_check_sum_88xx(struct halmac_adapter *halmac_adapter, + u8 *cur_desc) +{ + u16 chk_result = 0; + u16 *data = (u16 *)NULL; + u32 i; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_FILL_TXDESC_CHECKSUM); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + if (!cur_desc) { + pr_err("%s NULL PTR", __func__); + return HALMAC_RET_NULL_POINTER; + } + + SET_TX_DESC_TXDESC_CHECKSUM(cur_desc, 0x0000); + + data = (u16 *)(cur_desc); + + /* HW clculates only 32byte */ + for (i = 0; i < 8; i++) + chk_result ^= (*(data + 2 * i) ^ *(data + (2 * i + 1))); + + SET_TX_DESC_TXDESC_CHECKSUM(cur_desc, chk_result); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_dump_fifo_88xx() - dump fifo data + * @halmac_adapter : the adapter of halmac + * @halmac_fifo_sel : FIFO selection + * @halmac_start_addr : start address of selected FIFO + * @halmac_fifo_dump_size : dump size of selected FIFO + * @fifo_map : FIFO data + * + * Note : before dump fifo, user need to call halmac_get_fifo_size to + * get fifo size. Then input this size to halmac_dump_fifo. + * + * Author : Ivan Lin/KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_dump_fifo_88xx(struct halmac_adapter *halmac_adapter, + enum hal_fifo_sel halmac_fifo_sel, u32 halmac_start_addr, + u32 halmac_fifo_dump_size, u8 *fifo_map) +{ + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_DUMP_FIFO); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>\n", __func__); + + if (halmac_fifo_sel == HAL_FIFO_SEL_TX && + (halmac_start_addr + halmac_fifo_dump_size) > + halmac_adapter->hw_config_info.tx_fifo_size) { + pr_err("TX fifo dump size is too large\n"); + return HALMAC_RET_DUMP_FIFOSIZE_INCORRECT; + } + + if (halmac_fifo_sel == HAL_FIFO_SEL_RX && + (halmac_start_addr + halmac_fifo_dump_size) > + halmac_adapter->hw_config_info.rx_fifo_size) { + pr_err("RX fifo dump size is too large\n"); + return HALMAC_RET_DUMP_FIFOSIZE_INCORRECT; + } + + if ((halmac_fifo_dump_size & (4 - 1)) != 0) { + pr_err("halmac_fifo_dump_size shall 4byte align\n"); + return HALMAC_RET_DUMP_FIFOSIZE_INCORRECT; + } + + if (!fifo_map) { + pr_err("fifo_map address is NULL\n"); + return HALMAC_RET_NULL_POINTER; + } + + status = halmac_buffer_read_88xx(halmac_adapter, halmac_start_addr, + halmac_fifo_dump_size, halmac_fifo_sel, + fifo_map); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_buffer_read_88xx error = %x\n", status); + return status; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_get_fifo_size_88xx() - get fifo size + * @halmac_adapter : the adapter of halmac + * @halmac_fifo_sel : FIFO selection + * Author : Ivan Lin/KaiYuan Chang + * Return : u32 + * More details of status code can be found in prototype document + */ +u32 halmac_get_fifo_size_88xx(struct halmac_adapter *halmac_adapter, + enum hal_fifo_sel halmac_fifo_sel) +{ + u32 fifo_size = 0; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_GET_FIFO_SIZE); + + if (halmac_fifo_sel == HAL_FIFO_SEL_TX) + fifo_size = halmac_adapter->hw_config_info.tx_fifo_size; + else if (halmac_fifo_sel == HAL_FIFO_SEL_RX) + fifo_size = halmac_adapter->hw_config_info.rx_fifo_size; + else if (halmac_fifo_sel == HAL_FIFO_SEL_RSVD_PAGE) + fifo_size = + ((halmac_adapter->hw_config_info.tx_fifo_size >> 7) - + halmac_adapter->txff_allocation.rsvd_pg_bndy) + << 7; + else if (halmac_fifo_sel == HAL_FIFO_SEL_REPORT) + fifo_size = 65536; + else if (halmac_fifo_sel == HAL_FIFO_SEL_LLT) + fifo_size = 65536; + + return fifo_size; +} + +/** + * halmac_cfg_txbf_88xx() - enable/disable specific user's txbf + * @halmac_adapter : the adapter of halmac + * @userid : su bfee userid = 0 or 1 to apply TXBF + * @bw : the sounding bandwidth + * @txbf_en : 0: disable TXBF, 1: enable TXBF + * Author : chunchu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_cfg_txbf_88xx(struct halmac_adapter *halmac_adapter, u8 userid, + enum halmac_bw bw, u8 txbf_en) +{ + u16 temp42C = 0; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CFG_TXBF); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + if (txbf_en) { + switch (bw) { + case HALMAC_BW_80: + temp42C |= BIT_R_TXBF0_80M; + /* fall through */ + case HALMAC_BW_40: + temp42C |= BIT_R_TXBF0_40M; + /* fall through */ + case HALMAC_BW_20: + temp42C |= BIT_R_TXBF0_20M; + break; + default: + pr_err("%s invalid TXBF BW setting 0x%x of userid %d\n", + __func__, bw, userid); + return HALMAC_RET_INVALID_SOUNDING_SETTING; + } + } + + switch (userid) { + case 0: + temp42C |= + HALMAC_REG_READ_16(halmac_adapter, REG_TXBF_CTRL) & + ~(BIT_R_TXBF0_20M | BIT_R_TXBF0_40M | BIT_R_TXBF0_80M); + HALMAC_REG_WRITE_16(halmac_adapter, REG_TXBF_CTRL, temp42C); + break; + case 1: + temp42C |= + HALMAC_REG_READ_16(halmac_adapter, REG_TXBF_CTRL + 2) & + ~(BIT_R_TXBF0_20M | BIT_R_TXBF0_40M | BIT_R_TXBF0_80M); + HALMAC_REG_WRITE_16(halmac_adapter, REG_TXBF_CTRL + 2, temp42C); + break; + default: + pr_err("%s invalid userid %d\n", __func__, userid); + return HALMAC_RET_INVALID_SOUNDING_SETTING; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_SND, DBG_DMESG, + "%s, txbf_en = %x <==========\n", __func__, + txbf_en); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_cfg_mumimo_88xx() -config mumimo + * @halmac_adapter : the adapter of halmac + * @cfgmu : parameters to configure MU PPDU Tx/Rx + * Author : chunchu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_cfg_mumimo_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_cfg_mumimo_para *cfgmu) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + u8 i, idx, id0, id1, gid, mu_tab_sel; + u8 mu_tab_valid = 0; + u32 gid_valid[6] = {0}; + u8 temp14C0 = 0; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CFG_MUMIMO); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + if (cfgmu->role == HAL_BFEE) { + /*config MU BFEE*/ + temp14C0 = HALMAC_REG_READ_8(halmac_adapter, REG_MU_TX_CTL) & + ~BIT_MASK_R_MU_TABLE_VALID; + /*enable MU table 0 and 1, disable MU TX*/ + HALMAC_REG_WRITE_8(halmac_adapter, REG_MU_TX_CTL, + (temp14C0 | BIT(0) | BIT(1)) & ~(BIT(7))); + + /*config GID valid table and user position table*/ + mu_tab_sel = + HALMAC_REG_READ_8(halmac_adapter, REG_MU_TX_CTL + 1) & + ~(BIT(0) | BIT(1) | BIT(2)); + for (i = 0; i < 2; i++) { + HALMAC_REG_WRITE_8(halmac_adapter, REG_MU_TX_CTL + 1, + mu_tab_sel | i); + HALMAC_REG_WRITE_32(halmac_adapter, REG_MU_STA_GID_VLD, + cfgmu->given_gid_tab[i]); + HALMAC_REG_WRITE_32(halmac_adapter, + REG_MU_STA_USER_POS_INFO, + cfgmu->given_user_pos[i * 2]); + HALMAC_REG_WRITE_32(halmac_adapter, + REG_MU_STA_USER_POS_INFO + 4, + cfgmu->given_user_pos[i * 2 + 1]); + } + } else { + /*config MU BFER*/ + if (!cfgmu->mu_tx_en) { + HALMAC_REG_WRITE_8(halmac_adapter, REG_MU_TX_CTL, + HALMAC_REG_READ_8(halmac_adapter, + REG_MU_TX_CTL) & + ~(BIT(7))); + HALMAC_RT_TRACE( + driver_adapter, HALMAC_MSG_SND, DBG_DMESG, + "%s disable mu tx <==========\n", __func__); + return HALMAC_RET_SUCCESS; + } + + /*Transform BB grouping bitmap[14:0] to MAC GID_valid table*/ + for (idx = 0; idx < 15; idx++) { + if (idx < 5) { + /*group_bitmap bit0~4, MU_STA0 with MUSTA1~5*/ + id0 = 0; + id1 = (u8)(idx + 1); + } else if (idx < 9) { + /*group_bitmap bit5~8, MU_STA1 with MUSTA2~5*/ + id0 = 1; + id1 = (u8)(idx - 3); + } else if (idx < 12) { + /*group_bitmap bit9~11, MU_STA2 with MUSTA3~5*/ + id0 = 2; + id1 = (u8)(idx - 6); + } else if (idx < 14) { + /*group_bitmap bit12~13, MU_STA3 with MUSTA4~5*/ + id0 = 3; + id1 = (u8)(idx - 8); + } else { + /*group_bitmap bit14, MU_STA4 with MUSTA5*/ + id0 = 4; + id1 = (u8)(idx - 9); + } + if (cfgmu->grouping_bitmap & BIT(idx)) { + /*Pair 1*/ + gid = (idx << 1) + 1; + gid_valid[id0] |= (BIT(gid)); + gid_valid[id1] |= (BIT(gid)); + /*Pair 2*/ + gid += 1; + gid_valid[id0] |= (BIT(gid)); + gid_valid[id1] |= (BIT(gid)); + } else { + /*Pair 1*/ + gid = (idx << 1) + 1; + gid_valid[id0] &= ~(BIT(gid)); + gid_valid[id1] &= ~(BIT(gid)); + /*Pair 2*/ + gid += 1; + gid_valid[id0] &= ~(BIT(gid)); + gid_valid[id1] &= ~(BIT(gid)); + } + } + + /*set MU STA GID valid TABLE*/ + mu_tab_sel = + HALMAC_REG_READ_8(halmac_adapter, REG_MU_TX_CTL + 1) & + ~(BIT(0) | BIT(1) | BIT(2)); + for (idx = 0; idx < 6; idx++) { + HALMAC_REG_WRITE_8(halmac_adapter, REG_MU_TX_CTL + 1, + idx | mu_tab_sel); + HALMAC_REG_WRITE_32(halmac_adapter, REG_MU_STA_GID_VLD, + gid_valid[idx]); + } + + /*To validate the sounding successful MU STA and enable MU TX*/ + for (i = 0; i < 6; i++) { + if (cfgmu->sounding_sts[i]) + mu_tab_valid |= BIT(i); + } + HALMAC_REG_WRITE_8(halmac_adapter, REG_MU_TX_CTL, + mu_tab_valid | BIT(7)); + } + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_SND, DBG_DMESG, + "%s <==========\n", __func__); + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_cfg_sounding_88xx() - configure general sounding + * @halmac_adapter : the adapter of halmac + * @role : driver's role, BFer or BFee + * @datarate : set ndpa tx rate if driver is BFer, or set csi response rate + * if driver is BFee + * Author : chunchu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_cfg_sounding_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_snd_role role, + enum halmac_data_rate datarate) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CFG_SOUNDING); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + switch (role) { + case HAL_BFER: + HALMAC_REG_WRITE_32( + halmac_adapter, REG_TXBF_CTRL, + HALMAC_REG_READ_32(halmac_adapter, REG_TXBF_CTRL) | + BIT_R_ENABLE_NDPA | BIT_USE_NDPA_PARAMETER | + BIT_R_EN_NDPA_INT | BIT_DIS_NDP_BFEN); + HALMAC_REG_WRITE_8(halmac_adapter, REG_NDPA_RATE, datarate); + HALMAC_REG_WRITE_8( + halmac_adapter, REG_NDPA_OPT_CTRL, + HALMAC_REG_READ_8(halmac_adapter, REG_NDPA_OPT_CTRL) & + (~(BIT(0) | BIT(1)))); + /*service file length 2 bytes; fix non-STA1 csi start offset */ + HALMAC_REG_WRITE_8(halmac_adapter, REG_SND_PTCL_CTRL + 1, + 0x2 | BIT(7)); + HALMAC_REG_WRITE_8(halmac_adapter, REG_SND_PTCL_CTRL + 2, 0x2); + break; + case HAL_BFEE: + HALMAC_REG_WRITE_8(halmac_adapter, REG_SND_PTCL_CTRL, 0xDB); + HALMAC_REG_WRITE_8(halmac_adapter, REG_SND_PTCL_CTRL + 3, 0x50); + /*use ndpa rx rate to decide csi rate*/ + HALMAC_REG_WRITE_8(halmac_adapter, REG_BBPSF_CTRL + 3, + HALMAC_OFDM54 | BIT(6)); + HALMAC_REG_WRITE_16( + halmac_adapter, REG_RRSR, + HALMAC_REG_READ_16(halmac_adapter, REG_RRSR) | + BIT(datarate)); + /*RXFF do not accept BF Rpt Poll, avoid CSI crc error*/ + HALMAC_REG_WRITE_8( + halmac_adapter, REG_RXFLTMAP1, + HALMAC_REG_READ_8(halmac_adapter, REG_RXFLTMAP1) & + (~(BIT(4)))); + /*FWFF do not accept BF Rpt Poll, avoid CSI crc error*/ + HALMAC_REG_WRITE_8( + halmac_adapter, REG_RXFLTMAP4, + HALMAC_REG_READ_8(halmac_adapter, REG_RXFLTMAP4) & + (~(BIT(4)))); + break; + default: + pr_err("%s invalid role\n", __func__); + return HALMAC_RET_INVALID_SOUNDING_SETTING; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_SND, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_del_sounding_88xx() - reset general sounding + * @halmac_adapter : the adapter of halmac + * @role : driver's role, BFer or BFee + * Author : chunchu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_del_sounding_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_snd_role role) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_DEL_SOUNDING); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + switch (role) { + case HAL_BFER: + HALMAC_REG_WRITE_8(halmac_adapter, REG_TXBF_CTRL + 3, 0); + break; + case HAL_BFEE: + HALMAC_REG_WRITE_8(halmac_adapter, REG_SND_PTCL_CTRL, 0); + break; + default: + pr_err("%s invalid role\n", __func__); + return HALMAC_RET_INVALID_SOUNDING_SETTING; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_SND, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_su_bfee_entry_init_88xx() - config SU beamformee's registers + * @halmac_adapter : the adapter of halmac + * @userid : SU bfee userid = 0 or 1 to be added + * @paid : partial AID of this bfee + * Author : chunchu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_su_bfee_entry_init_88xx(struct halmac_adapter *halmac_adapter, u8 userid, + u16 paid) +{ + u16 temp42C = 0; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_SU_BFEE_ENTRY_INIT); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + switch (userid) { + case 0: + temp42C = HALMAC_REG_READ_16(halmac_adapter, REG_TXBF_CTRL) & + ~(BIT_MASK_R_TXBF0_AID | BIT_R_TXBF0_20M | + BIT_R_TXBF0_40M | BIT_R_TXBF0_80M); + HALMAC_REG_WRITE_16(halmac_adapter, REG_TXBF_CTRL, + temp42C | paid); + HALMAC_REG_WRITE_16(halmac_adapter, REG_ASSOCIATED_BFMEE_SEL, + paid); + break; + case 1: + temp42C = + HALMAC_REG_READ_16(halmac_adapter, REG_TXBF_CTRL + 2) & + ~(BIT_MASK_R_TXBF1_AID | BIT_R_TXBF0_20M | + BIT_R_TXBF0_40M | BIT_R_TXBF0_80M); + HALMAC_REG_WRITE_16(halmac_adapter, REG_TXBF_CTRL + 2, + temp42C | paid); + HALMAC_REG_WRITE_16(halmac_adapter, + REG_ASSOCIATED_BFMEE_SEL + 2, + paid | BIT(9)); + break; + default: + pr_err("%s invalid userid %d\n", __func__, + userid); + return HALMAC_RET_INVALID_SOUNDING_SETTING; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_SND, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_su_bfee_entry_init_88xx() - config SU beamformer's registers + * @halmac_adapter : the adapter of halmac + * @su_bfer_init : parameters to configure SU BFER entry + * Author : chunchu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_su_bfer_entry_init_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_su_bfer_init_para *su_bfer_init) +{ + u16 mac_address_H; + u32 mac_address_L; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_SU_BFER_ENTRY_INIT); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + /* mac_address_L = bfer_address.address_l_h.address_low; */ + /* mac_address_H = bfer_address.address_l_h.address_high; */ + + mac_address_L = le32_to_cpu( + su_bfer_init->bfer_address.address_l_h.le_address_low); + mac_address_H = le16_to_cpu( + su_bfer_init->bfer_address.address_l_h.le_address_high); + + switch (su_bfer_init->userid) { + case 0: + HALMAC_REG_WRITE_32(halmac_adapter, REG_ASSOCIATED_BFMER0_INFO, + mac_address_L); + HALMAC_REG_WRITE_16(halmac_adapter, + REG_ASSOCIATED_BFMER0_INFO + 4, + mac_address_H); + HALMAC_REG_WRITE_16(halmac_adapter, + REG_ASSOCIATED_BFMER0_INFO + 6, + su_bfer_init->paid); + HALMAC_REG_WRITE_16(halmac_adapter, REG_TX_CSI_RPT_PARAM_BW20, + su_bfer_init->csi_para); + break; + case 1: + HALMAC_REG_WRITE_32(halmac_adapter, REG_ASSOCIATED_BFMER1_INFO, + mac_address_L); + HALMAC_REG_WRITE_16(halmac_adapter, + REG_ASSOCIATED_BFMER1_INFO + 4, + mac_address_H); + HALMAC_REG_WRITE_16(halmac_adapter, + REG_ASSOCIATED_BFMER1_INFO + 6, + su_bfer_init->paid); + HALMAC_REG_WRITE_16(halmac_adapter, + REG_TX_CSI_RPT_PARAM_BW20 + 2, + su_bfer_init->csi_para); + break; + default: + pr_err("%s invalid userid %d\n", __func__, + su_bfer_init->userid); + return HALMAC_RET_INVALID_SOUNDING_SETTING; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_SND, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_mu_bfee_entry_init_88xx() - config MU beamformee's registers + * @halmac_adapter : the adapter of halmac + * @mu_bfee_init : parameters to configure MU BFEE entry + * Author : chunchu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_mu_bfee_entry_init_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_mu_bfee_init_para *mu_bfee_init) +{ + u16 temp168X = 0, temp14C0; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_MU_BFEE_ENTRY_INIT); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + temp168X |= mu_bfee_init->paid | BIT(9); + HALMAC_REG_WRITE_16(halmac_adapter, (0x1680 + mu_bfee_init->userid * 2), + temp168X); + + temp14C0 = HALMAC_REG_READ_16(halmac_adapter, REG_MU_TX_CTL) & + ~(BIT(8) | BIT(9) | BIT(10)); + HALMAC_REG_WRITE_16(halmac_adapter, REG_MU_TX_CTL, + temp14C0 | ((mu_bfee_init->userid - 2) << 8)); + HALMAC_REG_WRITE_32(halmac_adapter, REG_MU_STA_GID_VLD, 0); + HALMAC_REG_WRITE_32(halmac_adapter, REG_MU_STA_USER_POS_INFO, + mu_bfee_init->user_position_l); + HALMAC_REG_WRITE_32(halmac_adapter, REG_MU_STA_USER_POS_INFO + 4, + mu_bfee_init->user_position_h); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_SND, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_mu_bfer_entry_init_88xx() - config MU beamformer's registers + * @halmac_adapter : the adapter of halmac + * @mu_bfer_init : parameters to configure MU BFER entry + * Author : chunchu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_mu_bfer_entry_init_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_mu_bfer_init_para *mu_bfer_init) +{ + u16 temp1680 = 0; + u16 mac_address_H; + u32 mac_address_L; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_MU_BFER_ENTRY_INIT); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + mac_address_L = + le32_to_cpu(mu_bfer_init->bfer_address.address_l_h.le_address_low); + mac_address_H = + le16_to_cpu(mu_bfer_init->bfer_address.address_l_h.le_address_high); + + HALMAC_REG_WRITE_32(halmac_adapter, REG_ASSOCIATED_BFMER0_INFO, + mac_address_L); + HALMAC_REG_WRITE_16(halmac_adapter, REG_ASSOCIATED_BFMER0_INFO + 4, + mac_address_H); + HALMAC_REG_WRITE_16(halmac_adapter, REG_ASSOCIATED_BFMER0_INFO + 6, + mu_bfer_init->paid); + HALMAC_REG_WRITE_16(halmac_adapter, REG_TX_CSI_RPT_PARAM_BW20, + mu_bfer_init->csi_para); + + temp1680 = HALMAC_REG_READ_16(halmac_adapter, 0x1680) & 0xC000; + temp1680 |= mu_bfer_init->my_aid | (mu_bfer_init->csi_length_sel << 12); + HALMAC_REG_WRITE_16(halmac_adapter, 0x1680, temp1680); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_SND, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_su_bfee_entry_del_88xx() - reset SU beamformee's registers + * @halmac_adapter : the adapter of halmac + * @userid : the SU BFee userid to be deleted + * Author : chunchu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_su_bfee_entry_del_88xx(struct halmac_adapter *halmac_adapter, u8 userid) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_SU_BFEE_ENTRY_DEL); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + switch (userid) { + case 0: + HALMAC_REG_WRITE_16( + halmac_adapter, REG_TXBF_CTRL, + HALMAC_REG_READ_16(halmac_adapter, REG_TXBF_CTRL) & + ~(BIT_MASK_R_TXBF0_AID | BIT_R_TXBF0_20M | + BIT_R_TXBF0_40M | BIT_R_TXBF0_80M)); + HALMAC_REG_WRITE_16(halmac_adapter, REG_ASSOCIATED_BFMEE_SEL, + 0); + break; + case 1: + HALMAC_REG_WRITE_16( + halmac_adapter, REG_TXBF_CTRL + 2, + HALMAC_REG_READ_16(halmac_adapter, REG_TXBF_CTRL + 2) & + ~(BIT_MASK_R_TXBF1_AID | BIT_R_TXBF0_20M | + BIT_R_TXBF0_40M | BIT_R_TXBF0_80M)); + HALMAC_REG_WRITE_16(halmac_adapter, + REG_ASSOCIATED_BFMEE_SEL + 2, 0); + break; + default: + pr_err("%s invalid userid %d\n", __func__, + userid); + return HALMAC_RET_INVALID_SOUNDING_SETTING; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_SND, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_su_bfee_entry_del_88xx() - reset SU beamformer's registers + * @halmac_adapter : the adapter of halmac + * @userid : the SU BFer userid to be deleted + * Author : chunchu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_su_bfer_entry_del_88xx(struct halmac_adapter *halmac_adapter, u8 userid) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_SU_BFER_ENTRY_DEL); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + switch (userid) { + case 0: + HALMAC_REG_WRITE_32(halmac_adapter, REG_ASSOCIATED_BFMER0_INFO, + 0); + HALMAC_REG_WRITE_32(halmac_adapter, + REG_ASSOCIATED_BFMER0_INFO + 4, 0); + break; + case 1: + HALMAC_REG_WRITE_32(halmac_adapter, REG_ASSOCIATED_BFMER1_INFO, + 0); + HALMAC_REG_WRITE_32(halmac_adapter, + REG_ASSOCIATED_BFMER1_INFO + 4, 0); + break; + default: + pr_err("%s invalid userid %d\n", __func__, + userid); + return HALMAC_RET_INVALID_SOUNDING_SETTING; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_SND, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_mu_bfee_entry_del_88xx() - reset MU beamformee's registers + * @halmac_adapter : the adapter of halmac + * @userid : the MU STA userid to be deleted + * Author : chunchu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_mu_bfee_entry_del_88xx(struct halmac_adapter *halmac_adapter, u8 userid) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_MU_BFEE_ENTRY_DEL); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_REG_WRITE_16(halmac_adapter, 0x1680 + userid * 2, 0); + HALMAC_REG_WRITE_8(halmac_adapter, REG_MU_TX_CTL, + HALMAC_REG_READ_8(halmac_adapter, REG_MU_TX_CTL) & + ~(BIT(userid - 2))); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_SND, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_mu_bfer_entry_del_88xx() -reset MU beamformer's registers + * @halmac_adapter : the adapter of halmac + * Author : chunchu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_mu_bfer_entry_del_88xx(struct halmac_adapter *halmac_adapter) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_MU_BFER_ENTRY_DEL); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_REG_WRITE_32(halmac_adapter, REG_ASSOCIATED_BFMER0_INFO, 0); + HALMAC_REG_WRITE_32(halmac_adapter, REG_ASSOCIATED_BFMER0_INFO + 4, 0); + HALMAC_REG_WRITE_16(halmac_adapter, 0x1680, 0); + HALMAC_REG_WRITE_8(halmac_adapter, REG_MU_TX_CTL, 0); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_SND, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_add_ch_info_88xx() -add channel information + * @halmac_adapter : the adapter of halmac + * @ch_info : channel information + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_add_ch_info_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_ch_info *ch_info) +{ + void *driver_adapter = NULL; + struct halmac_cs_info *ch_sw_info; + enum halmac_scan_cmd_construct_state state_scan; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + driver_adapter = halmac_adapter->driver_adapter; + ch_sw_info = &halmac_adapter->ch_sw_info; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "[TRACE]%s ==========>\n", __func__); + + if (halmac_adapter->halmac_state.dlfw_state != HALMAC_GEN_INFO_SENT) { + pr_err("[ERR]%s: gen_info is not send to FW!!!!\n", __func__); + return HALMAC_RET_GEN_INFO_NOT_SENT; + } + + state_scan = halmac_query_scan_curr_state_88xx(halmac_adapter); + if (state_scan != HALMAC_SCAN_CMD_CONSTRUCT_BUFFER_CLEARED && + state_scan != HALMAC_SCAN_CMD_CONSTRUCT_CONSTRUCTING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_WARNING, + "[WARN]Scan machine fail(add ch info)...\n"); + return HALMAC_RET_ERROR_STATE; + } + + if (!ch_sw_info->ch_info_buf) { + ch_sw_info->ch_info_buf = + kzalloc(HALMAC_EXTRA_INFO_BUFF_SIZE_88XX, GFP_KERNEL); + if (!ch_sw_info->ch_info_buf) + return HALMAC_RET_NULL_POINTER; + ch_sw_info->ch_info_buf_w = ch_sw_info->ch_info_buf; + ch_sw_info->buf_size = HALMAC_EXTRA_INFO_BUFF_SIZE_88XX; + ch_sw_info->avai_buf_size = HALMAC_EXTRA_INFO_BUFF_SIZE_88XX; + ch_sw_info->total_size = 0; + ch_sw_info->extra_info_en = 0; + ch_sw_info->ch_num = 0; + } + + if (ch_sw_info->extra_info_en == 1) { + pr_err("[ERR]%s: construct sequence wrong!!\n", __func__); + return HALMAC_RET_CH_SW_SEQ_WRONG; + } + + if (ch_sw_info->avai_buf_size < 4) { + pr_err("[ERR]%s: no available buffer!!\n", __func__); + return HALMAC_RET_CH_SW_NO_BUF; + } + + if (halmac_transition_scan_state_88xx( + halmac_adapter, HALMAC_SCAN_CMD_CONSTRUCT_CONSTRUCTING) != + HALMAC_RET_SUCCESS) + return HALMAC_RET_ERROR_STATE; + + CHANNEL_INFO_SET_CHANNEL(ch_sw_info->ch_info_buf_w, ch_info->channel); + CHANNEL_INFO_SET_PRI_CH_IDX(ch_sw_info->ch_info_buf_w, + ch_info->pri_ch_idx); + CHANNEL_INFO_SET_BANDWIDTH(ch_sw_info->ch_info_buf_w, ch_info->bw); + CHANNEL_INFO_SET_TIMEOUT(ch_sw_info->ch_info_buf_w, ch_info->timeout); + CHANNEL_INFO_SET_ACTION_ID(ch_sw_info->ch_info_buf_w, + ch_info->action_id); + CHANNEL_INFO_SET_CH_EXTRA_INFO(ch_sw_info->ch_info_buf_w, + ch_info->extra_info); + + ch_sw_info->avai_buf_size = ch_sw_info->avai_buf_size - 4; + ch_sw_info->total_size = ch_sw_info->total_size + 4; + ch_sw_info->ch_num++; + ch_sw_info->extra_info_en = ch_info->extra_info; + ch_sw_info->ch_info_buf_w = ch_sw_info->ch_info_buf_w + 4; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "[TRACE]%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_add_extra_ch_info_88xx() -add extra channel information + * @halmac_adapter : the adapter of halmac + * @ch_extra_info : extra channel information + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_add_extra_ch_info_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_ch_extra_info *ch_extra_info) +{ + void *driver_adapter = NULL; + struct halmac_cs_info *ch_sw_info; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_ADD_EXTRA_CH_INFO); + + driver_adapter = halmac_adapter->driver_adapter; + ch_sw_info = &halmac_adapter->ch_sw_info; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + if (!ch_sw_info->ch_info_buf) { + pr_err("%s: NULL==ch_sw_info->ch_info_buf!!\n", __func__); + return HALMAC_RET_CH_SW_SEQ_WRONG; + } + + if (ch_sw_info->extra_info_en == 0) { + pr_err("%s: construct sequence wrong!!\n", __func__); + return HALMAC_RET_CH_SW_SEQ_WRONG; + } + + if (ch_sw_info->avai_buf_size < + (u32)(ch_extra_info->extra_info_size + 2)) { + /* +2: ch_extra_info_id, ch_extra_info, ch_extra_info_size + * are totally 2Byte + */ + pr_err("%s: no available buffer!!\n", __func__); + return HALMAC_RET_CH_SW_NO_BUF; + } + + if (halmac_query_scan_curr_state_88xx(halmac_adapter) != + HALMAC_SCAN_CMD_CONSTRUCT_CONSTRUCTING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Scan machine fail(add extra ch info)...\n"); + return HALMAC_RET_ERROR_STATE; + } + + if (halmac_transition_scan_state_88xx( + halmac_adapter, HALMAC_SCAN_CMD_CONSTRUCT_CONSTRUCTING) != + HALMAC_RET_SUCCESS) + return HALMAC_RET_ERROR_STATE; + + CH_EXTRA_INFO_SET_CH_EXTRA_INFO_ID(ch_sw_info->ch_info_buf_w, + ch_extra_info->extra_action_id); + CH_EXTRA_INFO_SET_CH_EXTRA_INFO(ch_sw_info->ch_info_buf_w, + ch_extra_info->extra_info); + CH_EXTRA_INFO_SET_CH_EXTRA_INFO_SIZE(ch_sw_info->ch_info_buf_w, + ch_extra_info->extra_info_size); + memcpy(ch_sw_info->ch_info_buf_w + 2, ch_extra_info->extra_info_data, + ch_extra_info->extra_info_size); + + ch_sw_info->avai_buf_size = ch_sw_info->avai_buf_size - + (2 + ch_extra_info->extra_info_size); + ch_sw_info->total_size = + ch_sw_info->total_size + (2 + ch_extra_info->extra_info_size); + ch_sw_info->extra_info_en = ch_extra_info->extra_info; + ch_sw_info->ch_info_buf_w = ch_sw_info->ch_info_buf_w + + (2 + ch_extra_info->extra_info_size); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_ctrl_ch_switch_88xx() -send channel switch cmd + * @halmac_adapter : the adapter of halmac + * @cs_option : channel switch config + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_ctrl_ch_switch_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_ch_switch_option *cs_option) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + enum halmac_scan_cmd_construct_state state_scan; + enum halmac_cmd_process_status *process_status = + &halmac_adapter->halmac_state.scan_state_set.process_status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + if (halmac_adapter->fw_version.h2c_version < 4) + return HALMAC_RET_FW_NO_SUPPORT; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CTRL_CH_SWITCH); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s cs_option->switch_en = %d==========>\n", __func__, + cs_option->switch_en); + + if (!cs_option->switch_en) + *process_status = HALMAC_CMD_PROCESS_IDLE; + + if (*process_status == HALMAC_CMD_PROCESS_SENDING || + *process_status == HALMAC_CMD_PROCESS_RCVD) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Wait event(ctrl ch switch)...\n"); + return HALMAC_RET_BUSY_STATE; + } + + state_scan = halmac_query_scan_curr_state_88xx(halmac_adapter); + if (cs_option->switch_en) { + if (state_scan != HALMAC_SCAN_CMD_CONSTRUCT_CONSTRUCTING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, + DBG_DMESG, + "%s(on) invalid in state %x\n", + __func__, state_scan); + return HALMAC_RET_ERROR_STATE; + } + } else { + if (state_scan != HALMAC_SCAN_CMD_CONSTRUCT_BUFFER_CLEARED) { + HALMAC_RT_TRACE( + driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s(off) invalid in state %x\n", __func__, + state_scan); + return HALMAC_RET_ERROR_STATE; + } + } + + status = halmac_func_ctrl_ch_switch_88xx(halmac_adapter, cs_option); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_ctrl_ch_switch FAIL = %x!!\n", status); + return status; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_clear_ch_info_88xx() -clear channel information + * @halmac_adapter : the adapter of halmac + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_clear_ch_info_88xx(struct halmac_adapter *halmac_adapter) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CLEAR_CH_INFO); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + if (halmac_query_scan_curr_state_88xx(halmac_adapter) == + HALMAC_SCAN_CMD_CONSTRUCT_H2C_SENT) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Scan machine fail(clear ch info)...\n"); + return HALMAC_RET_ERROR_STATE; + } + + if (halmac_transition_scan_state_88xx( + halmac_adapter, HALMAC_SCAN_CMD_CONSTRUCT_BUFFER_CLEARED) != + HALMAC_RET_SUCCESS) + return HALMAC_RET_ERROR_STATE; + + kfree(halmac_adapter->ch_sw_info.ch_info_buf); + halmac_adapter->ch_sw_info.ch_info_buf = NULL; + halmac_adapter->ch_sw_info.ch_info_buf_w = NULL; + halmac_adapter->ch_sw_info.extra_info_en = 0; + halmac_adapter->ch_sw_info.buf_size = 0; + halmac_adapter->ch_sw_info.avai_buf_size = 0; + halmac_adapter->ch_sw_info.total_size = 0; + halmac_adapter->ch_sw_info.ch_num = 0; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status halmac_p2pps_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_p2pps *p2p_ps) +{ + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + if (halmac_adapter->fw_version.h2c_version < 6) + return HALMAC_RET_FW_NO_SUPPORT; + + driver_adapter = halmac_adapter->driver_adapter; + + status = halmac_func_p2pps_88xx(halmac_adapter, p2p_ps); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("[ERR]halmac_p2pps FAIL = %x!!\n", status); + return status; + } + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_func_p2pps_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_p2pps *p2p_ps) +{ + u8 h2c_buff[HALMAC_H2C_CMD_SIZE_88XX] = {0}; + u16 h2c_seq_mum = 0; + void *driver_adapter = halmac_adapter->driver_adapter; + struct halmac_api *halmac_api; + struct halmac_h2c_header_info h2c_header_info; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "[TRACE]halmac_p2pps !!\n"); + + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + P2PPS_SET_OFFLOAD_EN(h2c_buff, p2p_ps->offload_en); + P2PPS_SET_ROLE(h2c_buff, p2p_ps->role); + P2PPS_SET_CTWINDOW_EN(h2c_buff, p2p_ps->ctwindow_en); + P2PPS_SET_NOA_EN(h2c_buff, p2p_ps->noa_en); + P2PPS_SET_NOA_SEL(h2c_buff, p2p_ps->noa_sel); + P2PPS_SET_ALLSTASLEEP(h2c_buff, p2p_ps->all_sta_sleep); + P2PPS_SET_DISCOVERY(h2c_buff, p2p_ps->discovery); + P2PPS_SET_P2P_PORT_ID(h2c_buff, p2p_ps->p2p_port_id); + P2PPS_SET_P2P_GROUP(h2c_buff, p2p_ps->p2p_group); + P2PPS_SET_P2P_MACID(h2c_buff, p2p_ps->p2p_macid); + + P2PPS_SET_CTWINDOW_LENGTH(h2c_buff, p2p_ps->ctwindow_length); + + P2PPS_SET_NOA_DURATION_PARA(h2c_buff, p2p_ps->noa_duration_para); + P2PPS_SET_NOA_INTERVAL_PARA(h2c_buff, p2p_ps->noa_interval_para); + P2PPS_SET_NOA_START_TIME_PARA(h2c_buff, p2p_ps->noa_start_time_para); + P2PPS_SET_NOA_COUNT_PARA(h2c_buff, p2p_ps->noa_count_para); + + h2c_header_info.sub_cmd_id = SUB_CMD_ID_P2PPS; + h2c_header_info.content_size = 24; + h2c_header_info.ack = false; + halmac_set_fw_offload_h2c_header_88xx(halmac_adapter, h2c_buff, + &h2c_header_info, &h2c_seq_mum); + + status = halmac_send_h2c_pkt_88xx(halmac_adapter, h2c_buff, + HALMAC_H2C_CMD_SIZE_88XX, false); + + if (status != HALMAC_RET_SUCCESS) + pr_err("[ERR]halmac_send_h2c_p2pps_88xx Fail = %x!!\n", status); + + return status; +} + +/** + * halmac_send_general_info_88xx() -send general information to FW + * @halmac_adapter : the adapter of halmac + * @general_info : general information + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_send_general_info_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_general_info *general_info) +{ + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + if (halmac_adapter->fw_version.h2c_version < 4) + return HALMAC_RET_FW_NO_SUPPORT; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_SEND_GENERAL_INFO); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + if (halmac_adapter->halmac_state.dlfw_state == HALMAC_DLFW_NONE) { + pr_err("%s Fail due to DLFW NONE!!\n", __func__); + return HALMAC_RET_DLFW_FAIL; + } + + status = halmac_func_send_general_info_88xx(halmac_adapter, + general_info); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_send_general_info error = %x\n", status); + return status; + } + + if (halmac_adapter->halmac_state.dlfw_state == HALMAC_DLFW_DONE) + halmac_adapter->halmac_state.dlfw_state = HALMAC_GEN_INFO_SENT; + + halmac_adapter->gen_info_valid = true; + memcpy(&halmac_adapter->general_info, general_info, + sizeof(struct halmac_general_info)); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_start_iqk_88xx() -trigger FW IQK + * @halmac_adapter : the adapter of halmac + * @iqk_para : IQK parameter + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_start_iqk_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_iqk_para_ *iqk_para) +{ + u8 h2c_buff[HALMAC_H2C_CMD_SIZE_88XX] = {0}; + u16 h2c_seq_num = 0; + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + struct halmac_h2c_header_info h2c_header_info; + enum halmac_cmd_process_status *process_status = + &halmac_adapter->halmac_state.iqk_set.process_status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_START_IQK); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + if (*process_status == HALMAC_CMD_PROCESS_SENDING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Wait event(iqk)...\n"); + return HALMAC_RET_BUSY_STATE; + } + + *process_status = HALMAC_CMD_PROCESS_SENDING; + + IQK_SET_CLEAR(h2c_buff, iqk_para->clear); + IQK_SET_SEGMENT_IQK(h2c_buff, iqk_para->segment_iqk); + + h2c_header_info.sub_cmd_id = SUB_CMD_ID_IQK; + h2c_header_info.content_size = 1; + h2c_header_info.ack = true; + halmac_set_fw_offload_h2c_header_88xx(halmac_adapter, h2c_buff, + &h2c_header_info, &h2c_seq_num); + + halmac_adapter->halmac_state.iqk_set.seq_num = h2c_seq_num; + + status = halmac_send_h2c_pkt_88xx(halmac_adapter, h2c_buff, + HALMAC_H2C_CMD_SIZE_88XX, true); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_send_h2c_pkt_88xx Fail = %x!!\n", status); + return status; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_ctrl_pwr_tracking_88xx() -trigger FW power tracking + * @halmac_adapter : the adapter of halmac + * @pwr_tracking_opt : power tracking option + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status halmac_ctrl_pwr_tracking_88xx( + struct halmac_adapter *halmac_adapter, + struct halmac_pwr_tracking_option *pwr_tracking_opt) +{ + u8 h2c_buff[HALMAC_H2C_CMD_SIZE_88XX] = {0}; + u16 h2c_seq_mum = 0; + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + struct halmac_h2c_header_info h2c_header_info; + enum halmac_cmd_process_status *process_status = + &halmac_adapter->halmac_state.power_tracking_set.process_status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CTRL_PWR_TRACKING); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "halmac_start_iqk_88xx ==========>\n"); + + if (*process_status == HALMAC_CMD_PROCESS_SENDING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Wait event(pwr tracking)...\n"); + return HALMAC_RET_BUSY_STATE; + } + + *process_status = HALMAC_CMD_PROCESS_SENDING; + + POWER_TRACKING_SET_TYPE(h2c_buff, pwr_tracking_opt->type); + POWER_TRACKING_SET_BBSWING_INDEX(h2c_buff, + pwr_tracking_opt->bbswing_index); + POWER_TRACKING_SET_ENABLE_A( + h2c_buff, + pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_A].enable); + POWER_TRACKING_SET_TX_PWR_INDEX_A( + h2c_buff, pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_A] + .tx_pwr_index); + POWER_TRACKING_SET_PWR_TRACKING_OFFSET_VALUE_A( + h2c_buff, pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_A] + .pwr_tracking_offset_value); + POWER_TRACKING_SET_TSSI_VALUE_A( + h2c_buff, pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_A] + .tssi_value); + POWER_TRACKING_SET_ENABLE_B( + h2c_buff, + pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_B].enable); + POWER_TRACKING_SET_TX_PWR_INDEX_B( + h2c_buff, pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_B] + .tx_pwr_index); + POWER_TRACKING_SET_PWR_TRACKING_OFFSET_VALUE_B( + h2c_buff, pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_B] + .pwr_tracking_offset_value); + POWER_TRACKING_SET_TSSI_VALUE_B( + h2c_buff, pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_B] + .tssi_value); + POWER_TRACKING_SET_ENABLE_C( + h2c_buff, + pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_C].enable); + POWER_TRACKING_SET_TX_PWR_INDEX_C( + h2c_buff, pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_C] + .tx_pwr_index); + POWER_TRACKING_SET_PWR_TRACKING_OFFSET_VALUE_C( + h2c_buff, pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_C] + .pwr_tracking_offset_value); + POWER_TRACKING_SET_TSSI_VALUE_C( + h2c_buff, pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_C] + .tssi_value); + POWER_TRACKING_SET_ENABLE_D( + h2c_buff, + pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_D].enable); + POWER_TRACKING_SET_TX_PWR_INDEX_D( + h2c_buff, pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_D] + .tx_pwr_index); + POWER_TRACKING_SET_PWR_TRACKING_OFFSET_VALUE_D( + h2c_buff, pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_D] + .pwr_tracking_offset_value); + POWER_TRACKING_SET_TSSI_VALUE_D( + h2c_buff, pwr_tracking_opt->pwr_tracking_para[HALMAC_RF_PATH_D] + .tssi_value); + + h2c_header_info.sub_cmd_id = SUB_CMD_ID_POWER_TRACKING; + h2c_header_info.content_size = 20; + h2c_header_info.ack = true; + halmac_set_fw_offload_h2c_header_88xx(halmac_adapter, h2c_buff, + &h2c_header_info, &h2c_seq_mum); + + halmac_adapter->halmac_state.power_tracking_set.seq_num = h2c_seq_mum; + + status = halmac_send_h2c_pkt_88xx(halmac_adapter, h2c_buff, + HALMAC_H2C_CMD_SIZE_88XX, true); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_send_h2c_pkt_88xx Fail = %x!!\n", status); + return status; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "halmac_start_iqk_88xx <==========\n"); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_query_status_88xx() -query the offload feature status + * @halmac_adapter : the adapter of halmac + * @feature_id : feature_id + * @process_status : feature_status + * @data : data buffer + * @size : data size + * + * Note : + * If user wants to know the data size, use can allocate zero + * size buffer first. If this size less than the data size, halmac + * will return HALMAC_RET_BUFFER_TOO_SMALL. User need to + * re-allocate data buffer with correct data size. + * + * Author : Ivan Lin/KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_query_status_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_feature_id feature_id, + enum halmac_cmd_process_status *process_status, + u8 *data, u32 *size) +{ + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_QUERY_STATE); + + driver_adapter = halmac_adapter->driver_adapter; + + if (!process_status) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "null pointer!!\n"); + return HALMAC_RET_NULL_POINTER; + } + + switch (feature_id) { + case HALMAC_FEATURE_CFG_PARA: + status = halmac_query_cfg_para_status_88xx( + halmac_adapter, process_status, data, size); + break; + case HALMAC_FEATURE_DUMP_PHYSICAL_EFUSE: + status = halmac_query_dump_physical_efuse_status_88xx( + halmac_adapter, process_status, data, size); + break; + case HALMAC_FEATURE_DUMP_LOGICAL_EFUSE: + status = halmac_query_dump_logical_efuse_status_88xx( + halmac_adapter, process_status, data, size); + break; + case HALMAC_FEATURE_CHANNEL_SWITCH: + status = halmac_query_channel_switch_status_88xx( + halmac_adapter, process_status, data, size); + break; + case HALMAC_FEATURE_UPDATE_PACKET: + status = halmac_query_update_packet_status_88xx( + halmac_adapter, process_status, data, size); + break; + case HALMAC_FEATURE_IQK: + status = halmac_query_iqk_status_88xx( + halmac_adapter, process_status, data, size); + break; + case HALMAC_FEATURE_POWER_TRACKING: + status = halmac_query_power_tracking_status_88xx( + halmac_adapter, process_status, data, size); + break; + case HALMAC_FEATURE_PSD: + status = halmac_query_psd_status_88xx( + halmac_adapter, process_status, data, size); + break; + default: + pr_err("%s invalid feature id %d\n", __func__, + feature_id); + return HALMAC_RET_INVALID_FEATURE_ID; + } + + return status; +} + +/** + * halmac_reset_feature_88xx() -reset async api cmd status + * @halmac_adapter : the adapter of halmac + * @feature_id : feature_id + * Author : Ivan Lin/KaiYuan Chang + * Return : enum halmac_ret_status. + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_reset_feature_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_feature_id feature_id) +{ + void *driver_adapter = NULL; + struct halmac_state *state = &halmac_adapter->halmac_state; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_RESET_FEATURE); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + switch (feature_id) { + case HALMAC_FEATURE_CFG_PARA: + state->cfg_para_state_set.process_status = + HALMAC_CMD_PROCESS_IDLE; + state->cfg_para_state_set.cfg_para_cmd_construct_state = + HALMAC_CFG_PARA_CMD_CONSTRUCT_IDLE; + break; + case HALMAC_FEATURE_DUMP_PHYSICAL_EFUSE: + case HALMAC_FEATURE_DUMP_LOGICAL_EFUSE: + state->efuse_state_set.process_status = HALMAC_CMD_PROCESS_IDLE; + state->efuse_state_set.efuse_cmd_construct_state = + HALMAC_EFUSE_CMD_CONSTRUCT_IDLE; + break; + case HALMAC_FEATURE_CHANNEL_SWITCH: + state->scan_state_set.process_status = HALMAC_CMD_PROCESS_IDLE; + state->scan_state_set.scan_cmd_construct_state = + HALMAC_SCAN_CMD_CONSTRUCT_IDLE; + break; + case HALMAC_FEATURE_UPDATE_PACKET: + state->update_packet_set.process_status = + HALMAC_CMD_PROCESS_IDLE; + break; + case HALMAC_FEATURE_ALL: + state->cfg_para_state_set.process_status = + HALMAC_CMD_PROCESS_IDLE; + state->cfg_para_state_set.cfg_para_cmd_construct_state = + HALMAC_CFG_PARA_CMD_CONSTRUCT_IDLE; + state->efuse_state_set.process_status = HALMAC_CMD_PROCESS_IDLE; + state->efuse_state_set.efuse_cmd_construct_state = + HALMAC_EFUSE_CMD_CONSTRUCT_IDLE; + state->scan_state_set.process_status = HALMAC_CMD_PROCESS_IDLE; + state->scan_state_set.scan_cmd_construct_state = + HALMAC_SCAN_CMD_CONSTRUCT_IDLE; + state->update_packet_set.process_status = + HALMAC_CMD_PROCESS_IDLE; + break; + default: + pr_err("%s invalid feature id %d\n", __func__, + feature_id); + return HALMAC_RET_INVALID_FEATURE_ID; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_check_fw_status_88xx() -check fw status + * @halmac_adapter : the adapter of halmac + * @fw_status : fw status + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_check_fw_status_88xx(struct halmac_adapter *halmac_adapter, + bool *fw_status) +{ + u32 value32 = 0, value32_backup = 0, i = 0; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CHECK_FW_STATUS); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + value32 = PLATFORM_REG_READ_32(driver_adapter, REG_FW_DBG6); + + if (value32 != 0) { + pr_err("halmac_check_fw_status REG_FW_DBG6 !=0\n"); + *fw_status = false; + return status; + } + + value32_backup = PLATFORM_REG_READ_32(driver_adapter, REG_FW_DBG7); + + for (i = 0; i <= 10; i++) { + value32 = PLATFORM_REG_READ_32(driver_adapter, REG_FW_DBG7); + if (value32_backup != value32) + break; + + if (i == 10) { + pr_err("halmac_check_fw_status Polling FW PC fail\n"); + *fw_status = false; + return status; + } + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return status; +} + +enum halmac_ret_status +halmac_dump_fw_dmem_88xx(struct halmac_adapter *halmac_adapter, u8 *dmem, + u32 *size) +{ + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_DUMP_FW_DMEM); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return status; +} + +/** + * halmac_cfg_max_dl_size_88xx() - config max download FW size + * @halmac_adapter : the adapter of halmac + * @size : max download fw size + * + * Halmac uses this setting to set max packet size for + * download FW. + * If user has not called this API, halmac use default + * setting for download FW + * Note1 : size need multiple of 2 + * Note2 : max size is 31K + * + * Author : Ivan Lin/KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_cfg_max_dl_size_88xx(struct halmac_adapter *halmac_adapter, u32 size) +{ + void *driver_adapter = NULL; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CFG_MAX_DL_SIZE); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_FW, DBG_DMESG, + "%s ==========>\n", __func__); + + if (size > HALMAC_FW_CFG_MAX_DL_SIZE_MAX_88XX) { + pr_err("size > HALMAC_FW_CFG_MAX_DL_SIZE_MAX!\n"); + return HALMAC_RET_CFG_DLFW_SIZE_FAIL; + } + + if ((size & (2 - 1)) != 0) { + pr_err("size is not power of 2!\n"); + return HALMAC_RET_CFG_DLFW_SIZE_FAIL; + } + + halmac_adapter->max_download_size = size; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_FW, DBG_DMESG, + "Cfg max size is : %X\n", size); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_FW, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_psd_88xx() - trigger fw psd + * @halmac_adapter : the adapter of halmac + * @start_psd : start PSD + * @end_psd : end PSD + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status halmac_psd_88xx(struct halmac_adapter *halmac_adapter, + u16 start_psd, u16 end_psd) +{ + u8 h2c_buff[HALMAC_H2C_CMD_SIZE_88XX] = {0}; + u16 h2c_seq_mum = 0; + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + struct halmac_h2c_header_info h2c_header_info; + enum halmac_cmd_process_status *process_status = + &halmac_adapter->halmac_state.psd_set.process_status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + if (halmac_fw_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_NO_DLFW; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_PSD); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + if (*process_status == HALMAC_CMD_PROCESS_SENDING) { + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "Wait event(psd)...\n"); + return HALMAC_RET_BUSY_STATE; + } + + kfree(halmac_adapter->halmac_state.psd_set.data); + halmac_adapter->halmac_state.psd_set.data = (u8 *)NULL; + + halmac_adapter->halmac_state.psd_set.data_size = 0; + halmac_adapter->halmac_state.psd_set.segment_size = 0; + + *process_status = HALMAC_CMD_PROCESS_SENDING; + + PSD_SET_START_PSD(h2c_buff, start_psd); + PSD_SET_END_PSD(h2c_buff, end_psd); + + h2c_header_info.sub_cmd_id = SUB_CMD_ID_PSD; + h2c_header_info.content_size = 4; + h2c_header_info.ack = true; + halmac_set_fw_offload_h2c_header_88xx(halmac_adapter, h2c_buff, + &h2c_header_info, &h2c_seq_mum); + + status = halmac_send_h2c_pkt_88xx(halmac_adapter, h2c_buff, + HALMAC_H2C_CMD_SIZE_88XX, true); + + if (status != HALMAC_RET_SUCCESS) { + pr_err("halmac_send_h2c_pkt_88xx Fail = %x!!\n", status); + return status; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_cfg_la_mode_88xx() - config la mode + * @halmac_adapter : the adapter of halmac + * @la_mode : + * disable : no TXFF space reserved for LA debug + * partial : partial TXFF space is reserved for LA debug + * full : all TXFF space is reserved for LA debug + * Author : KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_cfg_la_mode_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_la_mode la_mode) +{ + void *driver_adapter = NULL; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CFG_LA_MODE); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>la_mode = %d\n", __func__, + la_mode); + + halmac_adapter->txff_allocation.la_mode = la_mode; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_cfg_rx_fifo_expanding_mode_88xx() - rx fifo expanding + * @halmac_adapter : the adapter of halmac + * @la_mode : + * disable : normal mode + * 1 block : Rx FIFO + 1 FIFO block; Tx fifo - 1 FIFO block + * 2 block : Rx FIFO + 2 FIFO block; Tx fifo - 2 FIFO block + * 3 block : Rx FIFO + 3 FIFO block; Tx fifo - 3 FIFO block + * Author : Soar + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status halmac_cfg_rx_fifo_expanding_mode_88xx( + struct halmac_adapter *halmac_adapter, + enum halmac_rx_fifo_expanding_mode rx_fifo_expanding_mode) +{ + void *driver_adapter = NULL; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_CFG_RX_FIFO_EXPANDING_MODE); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE( + driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>rx_fifo_expanding_mode = %d\n", __func__, + rx_fifo_expanding_mode); + + halmac_adapter->txff_allocation.rx_fifo_expanding_mode = + rx_fifo_expanding_mode; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_config_security_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_security_setting *sec_setting) +{ + struct halmac_api *halmac_api; + void *driver_adapter = NULL; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_COMMON, DBG_DMESG, + "%s ==========>\n", __func__); + + HALMAC_REG_WRITE_16(halmac_adapter, REG_CR, + (u16)(HALMAC_REG_READ_16(halmac_adapter, REG_CR) | + BIT_MAC_SEC_EN)); + + if (sec_setting->tx_encryption == 1) + HALMAC_REG_WRITE_8( + halmac_adapter, REG_SECCFG, + HALMAC_REG_READ_8(halmac_adapter, REG_SECCFG) | BIT(2)); + else + HALMAC_REG_WRITE_8( + halmac_adapter, REG_SECCFG, + HALMAC_REG_READ_8(halmac_adapter, REG_SECCFG) & + ~(BIT(2))); + + if (sec_setting->rx_decryption == 1) + HALMAC_REG_WRITE_8( + halmac_adapter, REG_SECCFG, + HALMAC_REG_READ_8(halmac_adapter, REG_SECCFG) | BIT(3)); + else + HALMAC_REG_WRITE_8( + halmac_adapter, REG_SECCFG, + HALMAC_REG_READ_8(halmac_adapter, REG_SECCFG) & + ~(BIT(3))); + + if (sec_setting->bip_enable == 1) { + if (halmac_adapter->chip_id == HALMAC_CHIP_ID_8822B) + return HALMAC_RET_BIP_NO_SUPPORT; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_COMMON, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +u8 halmac_get_used_cam_entry_num_88xx(struct halmac_adapter *halmac_adapter, + enum hal_security_type sec_type) +{ + u8 entry_num; + void *driver_adapter = NULL; + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_COMMON, DBG_DMESG, + "%s ==========>\n", __func__); + + switch (sec_type) { + case HAL_SECURITY_TYPE_WEP40: + case HAL_SECURITY_TYPE_WEP104: + case HAL_SECURITY_TYPE_TKIP: + case HAL_SECURITY_TYPE_AES128: + case HAL_SECURITY_TYPE_GCMP128: + case HAL_SECURITY_TYPE_GCMSMS4: + case HAL_SECURITY_TYPE_BIP: + entry_num = 1; + break; + case HAL_SECURITY_TYPE_WAPI: + case HAL_SECURITY_TYPE_AES256: + case HAL_SECURITY_TYPE_GCMP256: + entry_num = 2; + break; + default: + entry_num = 0; + break; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_COMMON, DBG_DMESG, + "%s <==========\n", __func__); + + return entry_num; +} + +enum halmac_ret_status +halmac_write_cam_88xx(struct halmac_adapter *halmac_adapter, u32 entry_index, + struct halmac_cam_entry_info *cam_entry_info) +{ + u32 i; + u32 command = 0x80010000; + struct halmac_api *halmac_api; + void *driver_adapter = NULL; + struct halmac_cam_entry_format *cam_entry_format = NULL; + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_COMMON, DBG_DMESG, + "[TRACE]%s ==========>\n", __func__); + + if (entry_index >= halmac_adapter->hw_config_info.cam_entry_num) + return HALMAC_RET_ENTRY_INDEX_ERROR; + + if (cam_entry_info->key_id > 3) + return HALMAC_RET_FAIL; + + cam_entry_format = kzalloc(sizeof(*cam_entry_format), GFP_KERNEL); + if (!cam_entry_format) + return HALMAC_RET_NULL_POINTER; + + cam_entry_format->key_id = cam_entry_info->key_id; + cam_entry_format->valid = cam_entry_info->valid; + memcpy(cam_entry_format->mac_address, cam_entry_info->mac_address, 6); + memcpy(cam_entry_format->key, cam_entry_info->key, 16); + + switch (cam_entry_info->security_type) { + case HAL_SECURITY_TYPE_NONE: + cam_entry_format->type = 0; + break; + case HAL_SECURITY_TYPE_WEP40: + cam_entry_format->type = 1; + break; + case HAL_SECURITY_TYPE_WEP104: + cam_entry_format->type = 5; + break; + case HAL_SECURITY_TYPE_TKIP: + cam_entry_format->type = 2; + break; + case HAL_SECURITY_TYPE_AES128: + cam_entry_format->type = 4; + break; + case HAL_SECURITY_TYPE_WAPI: + cam_entry_format->type = 6; + break; + case HAL_SECURITY_TYPE_AES256: + cam_entry_format->type = 4; + cam_entry_format->ext_sectype = 1; + break; + case HAL_SECURITY_TYPE_GCMP128: + cam_entry_format->type = 7; + break; + case HAL_SECURITY_TYPE_GCMP256: + case HAL_SECURITY_TYPE_GCMSMS4: + cam_entry_format->type = 7; + cam_entry_format->ext_sectype = 1; + break; + case HAL_SECURITY_TYPE_BIP: + cam_entry_format->type = cam_entry_info->unicast == 1 ? 4 : 0; + cam_entry_format->mgnt = 1; + cam_entry_format->grp = cam_entry_info->unicast == 1 ? 0 : 1; + break; + default: + kfree(cam_entry_format); + return HALMAC_RET_FAIL; + } + + for (i = 0; i < 8; i++) { + HALMAC_REG_WRITE_32(halmac_adapter, REG_CAMWRITE, + *((u32 *)cam_entry_format + i)); + HALMAC_REG_WRITE_32(halmac_adapter, REG_CAMCMD, + command | ((entry_index << 3) + i)); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_COMMON, DBG_DMESG, + "[TRACE]1 - CAM entry format : %X\n", + *((u32 *)cam_entry_format + i)); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_COMMON, DBG_DMESG, + "[TRACE]1 - REG_CAMCMD : %X\n", + command | ((entry_index << 3) + i)); + } + + if (cam_entry_info->security_type == HAL_SECURITY_TYPE_WAPI || + cam_entry_info->security_type == HAL_SECURITY_TYPE_AES256 || + cam_entry_info->security_type == HAL_SECURITY_TYPE_GCMP256 || + cam_entry_info->security_type == HAL_SECURITY_TYPE_GCMSMS4) { + cam_entry_format->mic = 1; + memcpy(cam_entry_format->key, cam_entry_info->key_ext, 16); + + for (i = 0; i < 8; i++) { + HALMAC_REG_WRITE_32(halmac_adapter, REG_CAMWRITE, + *((u32 *)cam_entry_format + i)); + HALMAC_REG_WRITE_32( + halmac_adapter, REG_CAMCMD, + command | (((entry_index + 1) << 3) + i)); + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_COMMON, + DBG_DMESG, + "[TRACE]2 - CAM entry format : %X\n", + *((u32 *)cam_entry_format + i)); + HALMAC_RT_TRACE( + driver_adapter, HALMAC_MSG_COMMON, DBG_DMESG, + "[TRACE]2 - REG_CAMCMD : %X\n", + command | (((entry_index + 1) << 3) + i)); + } + } + + kfree(cam_entry_format); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_COMMON, DBG_DMESG, + "[TRACE]%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_read_cam_entry_88xx(struct halmac_adapter *halmac_adapter, + u32 entry_index, + struct halmac_cam_entry_format *content) +{ + u32 i; + u32 command = 0x80000000; + struct halmac_api *halmac_api; + void *driver_adapter = NULL; + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_COMMON, DBG_DMESG, + "%s ==========>\n", __func__); + + if (entry_index >= halmac_adapter->hw_config_info.cam_entry_num) + return HALMAC_RET_ENTRY_INDEX_ERROR; + + for (i = 0; i < 8; i++) { + HALMAC_REG_WRITE_32(halmac_adapter, REG_CAMCMD, + command | ((entry_index << 3) + i)); + *((u32 *)content + i) = + HALMAC_REG_READ_32(halmac_adapter, REG_CAMREAD); + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_COMMON, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_clear_cam_entry_88xx(struct halmac_adapter *halmac_adapter, + u32 entry_index) +{ + u32 i; + u32 command = 0x80010000; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + struct halmac_cam_entry_format *cam_entry_format; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "[TRACE]halmac_clear_security_cam_88xx ==========>\n"); + + if (entry_index >= halmac_adapter->hw_config_info.cam_entry_num) + return HALMAC_RET_ENTRY_INDEX_ERROR; + + cam_entry_format = kzalloc(sizeof(*cam_entry_format), GFP_KERNEL); + if (!cam_entry_format) + return HALMAC_RET_NULL_POINTER; + + for (i = 0; i < 8; i++) { + HALMAC_REG_WRITE_32(halmac_adapter, REG_CAMWRITE, + *((u32 *)cam_entry_format + i)); + HALMAC_REG_WRITE_32(halmac_adapter, REG_CAMCMD, + command | ((entry_index << 3) + i)); + } + + kfree(cam_entry_format); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "[TRACE]halmac_clear_security_cam_88xx <==========\n"); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_get_hw_value_88xx() -get hw config value + * @halmac_adapter : the adapter of halmac + * @hw_id : hw id for driver to query + * @pvalue : hw value, reference table to get data type + * Author : KaiYuan Chang / Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_get_hw_value_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_hw_id hw_id, void *pvalue) +{ + void *driver_adapter = NULL; + enum halmac_ret_status status = HALMAC_RET_SUCCESS; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_GET_HW_VALUE); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + if (!pvalue) { + pr_err("%s (!pvalue)==========>\n", __func__); + return HALMAC_RET_NULL_POINTER; + } + + switch (hw_id) { + case HALMAC_HW_RQPN_MAPPING: + ((struct halmac_rqpn_map *)pvalue)->dma_map_vo = + halmac_adapter->halmac_ptcl_queue[HALMAC_PTCL_QUEUE_VO]; + ((struct halmac_rqpn_map *)pvalue)->dma_map_vi = + halmac_adapter->halmac_ptcl_queue[HALMAC_PTCL_QUEUE_VI]; + ((struct halmac_rqpn_map *)pvalue)->dma_map_be = + halmac_adapter->halmac_ptcl_queue[HALMAC_PTCL_QUEUE_BE]; + ((struct halmac_rqpn_map *)pvalue)->dma_map_bk = + halmac_adapter->halmac_ptcl_queue[HALMAC_PTCL_QUEUE_BK]; + ((struct halmac_rqpn_map *)pvalue)->dma_map_mg = + halmac_adapter->halmac_ptcl_queue[HALMAC_PTCL_QUEUE_MG]; + ((struct halmac_rqpn_map *)pvalue)->dma_map_hi = + halmac_adapter->halmac_ptcl_queue[HALMAC_PTCL_QUEUE_HI]; + break; + case HALMAC_HW_EFUSE_SIZE: + *(u32 *)pvalue = halmac_adapter->hw_config_info.efuse_size; + break; + case HALMAC_HW_EEPROM_SIZE: + *(u32 *)pvalue = halmac_adapter->hw_config_info.eeprom_size; + break; + case HALMAC_HW_BT_BANK_EFUSE_SIZE: + *(u32 *)pvalue = halmac_adapter->hw_config_info.bt_efuse_size; + break; + case HALMAC_HW_BT_BANK1_EFUSE_SIZE: + case HALMAC_HW_BT_BANK2_EFUSE_SIZE: + *(u32 *)pvalue = 0; + break; + case HALMAC_HW_TXFIFO_SIZE: + *(u32 *)pvalue = halmac_adapter->hw_config_info.tx_fifo_size; + break; + case HALMAC_HW_RSVD_PG_BNDY: + *(u16 *)pvalue = + halmac_adapter->txff_allocation.rsvd_drv_pg_bndy; + break; + case HALMAC_HW_CAM_ENTRY_NUM: + *(u8 *)pvalue = halmac_adapter->hw_config_info.cam_entry_num; + break; + case HALMAC_HW_WLAN_EFUSE_AVAILABLE_SIZE: /*Remove later*/ + status = halmac_dump_logical_efuse_map_88xx(halmac_adapter, + HALMAC_EFUSE_R_DRV); + if (status != HALMAC_RET_SUCCESS) + return status; + *(u32 *)pvalue = halmac_adapter->hw_config_info.efuse_size - + HALMAC_PROTECTED_EFUSE_SIZE_88XX - + halmac_adapter->efuse_end; + break; + case HALMAC_HW_IC_VERSION: + *(u8 *)pvalue = halmac_adapter->chip_version; + break; + case HALMAC_HW_PAGE_SIZE: + *(u32 *)pvalue = halmac_adapter->hw_config_info.page_size; + break; + case HALMAC_HW_TX_AGG_ALIGN_SIZE: + *(u16 *)pvalue = halmac_adapter->hw_config_info.tx_align_size; + break; + case HALMAC_HW_RX_AGG_ALIGN_SIZE: + *(u8 *)pvalue = 8; + break; + case HALMAC_HW_DRV_INFO_SIZE: + *(u8 *)pvalue = halmac_adapter->drv_info_size; + break; + case HALMAC_HW_TXFF_ALLOCATION: + memcpy(pvalue, &halmac_adapter->txff_allocation, + sizeof(struct halmac_txff_allocation)); + break; + case HALMAC_HW_TX_DESC_SIZE: + *(u32 *)pvalue = halmac_adapter->hw_config_info.txdesc_size; + break; + case HALMAC_HW_RX_DESC_SIZE: + *(u32 *)pvalue = halmac_adapter->hw_config_info.rxdesc_size; + break; + default: + return HALMAC_RET_PARA_NOT_SUPPORT; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_set_hw_value_88xx() -set hw config value + * @halmac_adapter : the adapter of halmac + * @hw_id : hw id for driver to config + * @pvalue : hw value, reference table to get data type + * Author : KaiYuan Chang / Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_set_hw_value_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_hw_id hw_id, void *pvalue) +{ + void *driver_adapter = NULL; + enum halmac_ret_status status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_GET_HW_VALUE); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + + if (!pvalue) { + pr_err("%s (!pvalue)==========>\n", __func__); + return HALMAC_RET_NULL_POINTER; + } + + switch (hw_id) { + case HALMAC_HW_USB_MODE: + status = halmac_set_usb_mode_88xx( + halmac_adapter, *(enum halmac_usb_mode *)pvalue); + if (status != HALMAC_RET_SUCCESS) + return status; + break; + case HALMAC_HW_SEQ_EN: + break; + case HALMAC_HW_BANDWIDTH: + halmac_cfg_bw_88xx(halmac_adapter, *(enum halmac_bw *)pvalue); + break; + case HALMAC_HW_CHANNEL: + halmac_cfg_ch_88xx(halmac_adapter, *(u8 *)pvalue); + break; + case HALMAC_HW_PRI_CHANNEL_IDX: + halmac_cfg_pri_ch_idx_88xx(halmac_adapter, + *(enum halmac_pri_ch_idx *)pvalue); + break; + case HALMAC_HW_EN_BB_RF: + halmac_enable_bb_rf_88xx(halmac_adapter, *(u8 *)pvalue); + break; + case HALMAC_HW_SDIO_TX_PAGE_THRESHOLD: + halmac_config_sdio_tx_page_threshold_88xx( + halmac_adapter, + (struct halmac_tx_page_threshold_info *)pvalue); + break; + case HALMAC_HW_AMPDU_CONFIG: + halmac_config_ampdu_88xx(halmac_adapter, + (struct halmac_ampdu_config *)pvalue); + break; + default: + return HALMAC_RET_PARA_NOT_SUPPORT; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_cfg_drv_rsvd_pg_num_88xx() -config reserved page number for driver + * @halmac_adapter : the adapter of halmac + * @pg_num : page number + * Author : KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_cfg_drv_rsvd_pg_num_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_drv_rsvd_pg_num pg_num) +{ + void *driver_adapter = NULL; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, + HALMAC_API_CFG_DRV_RSVD_PG_NUM); + + driver_adapter = halmac_adapter->driver_adapter; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>pg_num = %d\n", __func__, + pg_num); + + switch (pg_num) { + case HALMAC_RSVD_PG_NUM16: + halmac_adapter->txff_allocation.rsvd_drv_pg_num = 16; + break; + case HALMAC_RSVD_PG_NUM24: + halmac_adapter->txff_allocation.rsvd_drv_pg_num = 24; + break; + case HALMAC_RSVD_PG_NUM32: + halmac_adapter->txff_allocation.rsvd_drv_pg_num = 32; + break; + } + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +enum halmac_ret_status +halmac_get_chip_version_88xx(struct halmac_adapter *halmac_adapter, + struct halmac_ver *version) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s ==========>\n", __func__); + version->major_ver = (u8)HALMAC_MAJOR_VER_88XX; + version->prototype_ver = (u8)HALMAC_PROTOTYPE_VER_88XX; + version->minor_ver = (u8)HALMAC_MINOR_VER_88XX; + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_H2C, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_chk_txdesc_88xx() -check if the tx packet format is incorrect + * @halmac_adapter : the adapter of halmac + * @halmac_buf : tx Packet buffer, tx desc is included + * @halmac_size : tx packet size + * Author : KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_chk_txdesc_88xx(struct halmac_adapter *halmac_adapter, u8 *halmac_buf, + u32 halmac_size) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>\n", __func__); + + if (GET_TX_DESC_BMC(halmac_buf)) + if (GET_TX_DESC_AGG_EN(halmac_buf)) + pr_err("TxDesc: Agg should not be set when BMC\n"); + + if (halmac_size < (GET_TX_DESC_TXPKTSIZE(halmac_buf) + + GET_TX_DESC_OFFSET(halmac_buf))) + pr_err("TxDesc: PktSize too small\n"); + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_dl_drv_rsvd_page_88xx() - download packet to rsvd page + * @halmac_adapter : the adapter of halmac + * @pg_offset : page offset of driver's rsvd page + * @halmac_buf : data to be downloaded, tx_desc is not included + * @halmac_size : data size to be downloaded + * Author : KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_dl_drv_rsvd_page_88xx(struct halmac_adapter *halmac_adapter, + u8 pg_offset, u8 *halmac_buf, u32 halmac_size) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + enum halmac_ret_status ret_status; + u16 drv_pg_bndy = 0; + u32 dl_pg_num = 0; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_DL_DRV_RSVD_PG); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s ==========>\n", __func__); + + /*check boundary and size valid*/ + dl_pg_num = halmac_size / halmac_adapter->hw_config_info.page_size + + ((halmac_size & + (halmac_adapter->hw_config_info.page_size - 1)) ? + 1 : + 0); + if (pg_offset + dl_pg_num > + halmac_adapter->txff_allocation.rsvd_drv_pg_num) { + pr_err("[ERROR] driver download offset or size error ==========>\n"); + return HALMAC_RET_DRV_DL_ERR; + } + + /*update to target download boundary*/ + drv_pg_bndy = + halmac_adapter->txff_allocation.rsvd_drv_pg_bndy + pg_offset; + HALMAC_REG_WRITE_16(halmac_adapter, REG_FIFOPAGE_CTRL_2, + (u16)(drv_pg_bndy & BIT_MASK_BCN_HEAD_1_V1)); + + ret_status = halmac_download_rsvd_page_88xx(halmac_adapter, halmac_buf, + halmac_size); + + /*restore to original bundary*/ + if (ret_status != HALMAC_RET_SUCCESS) { + pr_err("halmac_download_rsvd_page_88xx Fail = %x!!\n", + ret_status); + HALMAC_REG_WRITE_16( + halmac_adapter, REG_FIFOPAGE_CTRL_2, + (u16)(halmac_adapter->txff_allocation.rsvd_pg_bndy & + BIT_MASK_BCN_HEAD_1_V1)); + return ret_status; + } + + HALMAC_REG_WRITE_16(halmac_adapter, REG_FIFOPAGE_CTRL_2, + (u16)(halmac_adapter->txff_allocation.rsvd_pg_bndy & + BIT_MASK_BCN_HEAD_1_V1)); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_INIT, DBG_DMESG, + "%s < ==========\n", __func__); + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_cfg_csi_rate_88xx() - config CSI frame Tx rate + * @halmac_adapter : the adapter of halmac + * @rssi : rssi in decimal value + * @current_rate : current CSI frame rate + * @fixrate_en : enable to fix CSI frame in VHT rate, otherwise legacy OFDM rate + * @new_rate : API returns the final CSI frame rate + * Author : chunchu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_cfg_csi_rate_88xx(struct halmac_adapter *halmac_adapter, u8 rssi, + u8 current_rate, u8 fixrate_en, u8 *new_rate) +{ + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + u32 temp_csi_setting; + u16 current_rrsr; + enum halmac_ret_status ret_status; + + if (halmac_adapter_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_ADAPTER_INVALID; + + if (halmac_api_validate(halmac_adapter) != HALMAC_RET_SUCCESS) + return HALMAC_RET_API_INVALID; + + halmac_api_record_id_88xx(halmac_adapter, HALMAC_API_CFG_CSI_RATE); + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_SND, DBG_DMESG, + "<%s ==========>\n", __func__); + + temp_csi_setting = HALMAC_REG_READ_32(halmac_adapter, REG_BBPSF_CTRL) & + ~(BIT_MASK_WMAC_CSI_RATE << BIT_SHIFT_WMAC_CSI_RATE); + + current_rrsr = HALMAC_REG_READ_16(halmac_adapter, REG_RRSR); + + if (rssi >= 40) { + if (current_rate != HALMAC_OFDM54) { + HALMAC_REG_WRITE_16(halmac_adapter, REG_RRSR, + current_rrsr | BIT(HALMAC_OFDM54)); + HALMAC_REG_WRITE_32( + halmac_adapter, REG_BBPSF_CTRL, + temp_csi_setting | + BIT_WMAC_CSI_RATE(HALMAC_OFDM54)); + } + *new_rate = HALMAC_OFDM54; + ret_status = HALMAC_RET_SUCCESS; + } else { + if (current_rate != HALMAC_OFDM24) { + HALMAC_REG_WRITE_16(halmac_adapter, REG_RRSR, + current_rrsr & + ~(BIT(HALMAC_OFDM54))); + HALMAC_REG_WRITE_32( + halmac_adapter, REG_BBPSF_CTRL, + temp_csi_setting | + BIT_WMAC_CSI_RATE(HALMAC_OFDM24)); + } + *new_rate = HALMAC_OFDM24; + ret_status = HALMAC_RET_SUCCESS; + } + + return ret_status; +} + +/** + * halmac_sdio_cmd53_4byte_88xx() - cmd53 only for 4byte len register IO + * @halmac_adapter : the adapter of halmac + * @enable : 1->CMD53 only use in 4byte reg, 0 : No limitation + * Author : Ivan Lin/KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_sdio_cmd53_4byte_88xx(struct halmac_adapter *halmac_adapter, + enum halmac_sdio_cmd53_4byte_mode cmd53_4byte_mode) +{ + halmac_adapter->sdio_cmd53_4byte = cmd53_4byte_mode; + + return HALMAC_RET_SUCCESS; +} + +/** + * halmac_txfifo_is_empty_88xx() -check if txfifo is empty + * @halmac_adapter : the adapter of halmac + * Author : Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ +enum halmac_ret_status +halmac_txfifo_is_empty_88xx(struct halmac_adapter *halmac_adapter, u32 chk_num) +{ + u32 counter; + void *driver_adapter = NULL; + struct halmac_api *halmac_api; + + driver_adapter = halmac_adapter->driver_adapter; + halmac_api = (struct halmac_api *)halmac_adapter->halmac_api; + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_COMMON, DBG_DMESG, + "%s ==========>\n", __func__); + + counter = (chk_num <= 10) ? 10 : chk_num; + do { + if (HALMAC_REG_READ_8(halmac_adapter, REG_TXPKT_EMPTY) != 0xFF) + return HALMAC_RET_TXFIFO_NO_EMPTY; + + if ((HALMAC_REG_READ_8(halmac_adapter, REG_TXPKT_EMPTY + 1) & + 0x07) != 0x07) + return HALMAC_RET_TXFIFO_NO_EMPTY; + counter--; + + } while (counter != 0); + + HALMAC_RT_TRACE(driver_adapter, HALMAC_MSG_COMMON, DBG_DMESG, + "%s <==========\n", __func__); + + return HALMAC_RET_SUCCESS; +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c.yml new file mode 100644 index 00000000000..aef7df5ca48 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c.yml @@ -0,0 +1,71 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2016 Realtek Corporation +holders: + - Realtek Corporation +authors: + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang Return + - KaiYuan Chang Return + - Soar Return + - Soar Return + - Soar Return + - Soar Return + - Soar Return + - Soar Return + - KaiYuan Chang/Ivan Lin + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - chunchu Return + - chunchu Return + - chunchu Return + - chunchu Return + - chunchu Return + - chunchu Return + - chunchu Return + - chunchu Return + - chunchu Return + - chunchu Return + - chunchu Return + - chunchu Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang Return + - Soar Return + - KaiYuan Chang + - KaiYuan Chang + - KaiYuan Chang Return + - KaiYuan Chang Return + - KaiYuan Chang Return + - chunchu Return + - Ivan Lin Return diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_pcie.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_pcie.c new file mode 100644 index 00000000000..79ce3747221 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_pcie.c @@ -0,0 +1,63 @@ +* Copyright(c) 2016 Realtek Corporation. + * + * Contact Information: + + + * Author : KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : Soar Tu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_pcie.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_pcie.c.yml new file mode 100644 index 00000000000..e66041d27f4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_pcie.c.yml @@ -0,0 +1,19 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2016 Realtek Corporation +holders: + - Realtek Corporation +authors: + - KaiYuan Chang Return + - KaiYuan Chang Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - Soar Tu Return diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_sdio.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_sdio.c new file mode 100644 index 00000000000..3c195abd59b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_sdio.c @@ -0,0 +1,87 @@ +* Copyright(c) 2016 Realtek Corporation. + * + * Contact Information: + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : Soar + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : KaiYuan Chang/Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : Soar Tu + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : Ivan Lin + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ + + + * Author : Soar + * Return : enum halmac_ret_status + * More details of status code can be found in prototype document + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_sdio.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_sdio.c.yml new file mode 100644 index 00000000000..d5d16369a6d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx_sdio.c.yml @@ -0,0 +1,23 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2016 Realtek Corporation +holders: + - Realtek Corporation +authors: + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - KaiYuan Chang/Ivan Lin Return + - Soar Return + - KaiYuan Chang/Ivan Lin Return + - Soar Tu Return + - Ivan Lin Return + - Soar Return diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/thermal/fair_share.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/thermal/fair_share.c new file mode 100644 index 00000000000..4fadec9206c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/thermal/fair_share.c @@ -0,0 +1,4 @@ +* Copyright (C) 2012 Intel Corp + * Copyright (C) 2012 Durgadoss R + * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/thermal/fair_share.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/thermal/fair_share.c.yml new file mode 100644 index 00000000000..b55960b51c7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/thermal/fair_share.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2012 Intel Corp + - Copyright (c) 2012 Durgadoss R +holders: + - Intel Corp + - Durgadoss R diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/thermal/gov_bang_bang.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/thermal/gov_bang_bang.c new file mode 100644 index 00000000000..791299d3b12 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/thermal/gov_bang_bang.c @@ -0,0 +1,7 @@ +* Copyright (C) 2014 Peter Feuerer + * + * Based on step_wise.c with following Copyrights: + * Copyright (C) 2012 Intel Corp + * Copyright (C) 2012 Durgadoss R + * + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/thermal/gov_bang_bang.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/thermal/gov_bang_bang.c.yml new file mode 100644 index 00000000000..34306ff13af --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/thermal/gov_bang_bang.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2014 Peter Feuerer + - Copyrights Copyright (c) 2012 Intel Corp + - Copyright (c) 2012 Durgadoss R +holders: + - Peter Feuerer + - Intel Corp + - Durgadoss R diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/n_tty.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/n_tty.c new file mode 100644 index 00000000000..16d069caae1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/n_tty.c @@ -0,0 +1,2502 @@ +// SPDX-License-Identifier: GPL-1.0+ +/* + * n_tty.c --- implements the N_TTY line discipline. + * + * This code used to be in tty_io.c, but things are getting hairy + * enough that it made sense to split things off. (The N_TTY + * processing has changed so much that it's hardly recognizable, + * anyway...) + * + * Note that the open routine for N_TTY is guaranteed never to return + * an error. This is because Linux will fall back to setting a line + * to N_TTY if it can not switch to any other line discipline. + * + * Written by Theodore Ts'o, Copyright 1994. + * + * This file also contains code originally written by Linus Torvalds, + * Copyright 1991, 1992, 1993, and by Julian Cowley, Copyright 1994. + * + * Reduced memory usage for older ARM systems - Russell King. + * + * 2000/01/20 Fixed SMP locking on put_tty_queue using bits of + * the patch by Andrew J. Kroll + * who actually finally proved there really was a race. + * + * 2002/03/18 Implemented n_tty_wakeup to send SIGIO POLL_OUTs to + * waiting writing processes-Sapan Bhatia . + * Also fixed a bug in BLOCKING mode where n_tty_write returns + * EAGAIN + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* number of characters left in xmit buffer before select has we have room */ +#define WAKEUP_CHARS 256 + +/* + * This defines the low- and high-watermarks for throttling and + * unthrottling the TTY driver. These watermarks are used for + * controlling the space in the read buffer. + */ +#define TTY_THRESHOLD_THROTTLE 128 /* now based on remaining room */ +#define TTY_THRESHOLD_UNTHROTTLE 128 + +/* + * Special byte codes used in the echo buffer to represent operations + * or special handling of characters. Bytes in the echo buffer that + * are not part of such special blocks are treated as normal character + * codes. + */ +#define ECHO_OP_START 0xff +#define ECHO_OP_MOVE_BACK_COL 0x80 +#define ECHO_OP_SET_CANON_COL 0x81 +#define ECHO_OP_ERASE_TAB 0x82 + +#define ECHO_COMMIT_WATERMARK 256 +#define ECHO_BLOCK 256 +#define ECHO_DISCARD_WATERMARK N_TTY_BUF_SIZE - (ECHO_BLOCK + 32) + + +#undef N_TTY_TRACE +#ifdef N_TTY_TRACE +# define n_tty_trace(f, args...) trace_printk(f, ##args) +#else +# define n_tty_trace(f, args...) +#endif + +struct n_tty_data { + /* producer-published */ + size_t read_head; + size_t commit_head; + size_t canon_head; + size_t echo_head; + size_t echo_commit; + size_t echo_mark; + DECLARE_BITMAP(char_map, 256); + + /* private to n_tty_receive_overrun (single-threaded) */ + unsigned long overrun_time; + int num_overrun; + + /* non-atomic */ + bool no_room; + + /* must hold exclusive termios_rwsem to reset these */ + unsigned char lnext:1, erasing:1, raw:1, real_raw:1, icanon:1; + unsigned char push:1; + + /* shared by producer and consumer */ + char read_buf[N_TTY_BUF_SIZE]; + DECLARE_BITMAP(read_flags, N_TTY_BUF_SIZE); + unsigned char echo_buf[N_TTY_BUF_SIZE]; + + /* consumer-published */ + size_t read_tail; + size_t line_start; + + /* protected by output lock */ + unsigned int column; + unsigned int canon_column; + size_t echo_tail; + + struct mutex atomic_read_lock; + struct mutex output_lock; +}; + +#define MASK(x) ((x) & (N_TTY_BUF_SIZE - 1)) + +static inline size_t read_cnt(struct n_tty_data *ldata) +{ + return ldata->read_head - ldata->read_tail; +} + +static inline unsigned char read_buf(struct n_tty_data *ldata, size_t i) +{ + return ldata->read_buf[i & (N_TTY_BUF_SIZE - 1)]; +} + +static inline unsigned char *read_buf_addr(struct n_tty_data *ldata, size_t i) +{ + return &ldata->read_buf[i & (N_TTY_BUF_SIZE - 1)]; +} + +static inline unsigned char echo_buf(struct n_tty_data *ldata, size_t i) +{ + smp_rmb(); /* Matches smp_wmb() in add_echo_byte(). */ + return ldata->echo_buf[i & (N_TTY_BUF_SIZE - 1)]; +} + +static inline unsigned char *echo_buf_addr(struct n_tty_data *ldata, size_t i) +{ + return &ldata->echo_buf[i & (N_TTY_BUF_SIZE - 1)]; +} + +/* If we are not echoing the data, perhaps this is a secret so erase it */ +static void zero_buffer(struct tty_struct *tty, u8 *buffer, int size) +{ + bool icanon = !!L_ICANON(tty); + bool no_echo = !L_ECHO(tty); + + if (icanon && no_echo) + memset(buffer, 0x00, size); +} + +static int tty_copy_to_user(struct tty_struct *tty, void __user *to, + size_t tail, size_t n) +{ + struct n_tty_data *ldata = tty->disc_data; + size_t size = N_TTY_BUF_SIZE - tail; + void *from = read_buf_addr(ldata, tail); + int uncopied; + + if (n > size) { + tty_audit_add_data(tty, from, size); + uncopied = copy_to_user(to, from, size); + zero_buffer(tty, from, size - uncopied); + if (uncopied) + return uncopied; + to += size; + n -= size; + from = ldata->read_buf; + } + + tty_audit_add_data(tty, from, n); + uncopied = copy_to_user(to, from, n); + zero_buffer(tty, from, n - uncopied); + return uncopied; +} + +/** + * n_tty_kick_worker - start input worker (if required) + * @tty: terminal + * + * Re-schedules the flip buffer work if it may have stopped + * + * Caller holds exclusive termios_rwsem + * or + * n_tty_read()/consumer path: + * holds non-exclusive termios_rwsem + */ + +static void n_tty_kick_worker(struct tty_struct *tty) +{ + struct n_tty_data *ldata = tty->disc_data; + + /* Did the input worker stop? Restart it */ + if (unlikely(ldata->no_room)) { + ldata->no_room = 0; + + WARN_RATELIMIT(tty->port->itty == NULL, + "scheduling with invalid itty\n"); + /* see if ldisc has been killed - if so, this means that + * even though the ldisc has been halted and ->buf.work + * cancelled, ->buf.work is about to be rescheduled + */ + WARN_RATELIMIT(test_bit(TTY_LDISC_HALTED, &tty->flags), + "scheduling buffer work for halted ldisc\n"); + tty_buffer_restart_work(tty->port); + } +} + +static ssize_t chars_in_buffer(struct tty_struct *tty) +{ + struct n_tty_data *ldata = tty->disc_data; + ssize_t n = 0; + + if (!ldata->icanon) + n = ldata->commit_head - ldata->read_tail; + else + n = ldata->canon_head - ldata->read_tail; + return n; +} + +/** + * n_tty_write_wakeup - asynchronous I/O notifier + * @tty: tty device + * + * Required for the ptys, serial driver etc. since processes + * that attach themselves to the master and rely on ASYNC + * IO must be woken up + */ + +static void n_tty_write_wakeup(struct tty_struct *tty) +{ + clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); + kill_fasync(&tty->fasync, SIGIO, POLL_OUT); +} + +static void n_tty_check_throttle(struct tty_struct *tty) +{ + struct n_tty_data *ldata = tty->disc_data; + + /* + * Check the remaining room for the input canonicalization + * mode. We don't want to throttle the driver if we're in + * canonical mode and don't have a newline yet! + */ + if (ldata->icanon && ldata->canon_head == ldata->read_tail) + return; + + while (1) { + int throttled; + tty_set_flow_change(tty, TTY_THROTTLE_SAFE); + if (N_TTY_BUF_SIZE - read_cnt(ldata) >= TTY_THRESHOLD_THROTTLE) + break; + throttled = tty_throttle_safe(tty); + if (!throttled) + break; + } + __tty_set_flow_change(tty, 0); +} + +static void n_tty_check_unthrottle(struct tty_struct *tty) +{ + if (tty->driver->type == TTY_DRIVER_TYPE_PTY) { + if (chars_in_buffer(tty) > TTY_THRESHOLD_UNTHROTTLE) + return; + n_tty_kick_worker(tty); + tty_wakeup(tty->link); + return; + } + + /* If there is enough space in the read buffer now, let the + * low-level driver know. We use chars_in_buffer() to + * check the buffer, as it now knows about canonical mode. + * Otherwise, if the driver is throttled and the line is + * longer than TTY_THRESHOLD_UNTHROTTLE in canonical mode, + * we won't get any more characters. + */ + + while (1) { + int unthrottled; + tty_set_flow_change(tty, TTY_UNTHROTTLE_SAFE); + if (chars_in_buffer(tty) > TTY_THRESHOLD_UNTHROTTLE) + break; + n_tty_kick_worker(tty); + unthrottled = tty_unthrottle_safe(tty); + if (!unthrottled) + break; + } + __tty_set_flow_change(tty, 0); +} + +/** + * put_tty_queue - add character to tty + * @c: character + * @ldata: n_tty data + * + * Add a character to the tty read_buf queue. + * + * n_tty_receive_buf()/producer path: + * caller holds non-exclusive termios_rwsem + */ + +static inline void put_tty_queue(unsigned char c, struct n_tty_data *ldata) +{ + *read_buf_addr(ldata, ldata->read_head) = c; + ldata->read_head++; +} + +/** + * reset_buffer_flags - reset buffer state + * @tty: terminal to reset + * + * Reset the read buffer counters and clear the flags. + * Called from n_tty_open() and n_tty_flush_buffer(). + * + * Locking: caller holds exclusive termios_rwsem + * (or locking is not required) + */ + +static void reset_buffer_flags(struct n_tty_data *ldata) +{ + ldata->read_head = ldata->canon_head = ldata->read_tail = 0; + ldata->commit_head = 0; + ldata->line_start = 0; + + ldata->erasing = 0; + bitmap_zero(ldata->read_flags, N_TTY_BUF_SIZE); + ldata->push = 0; +} + +static void n_tty_packet_mode_flush(struct tty_struct *tty) +{ + unsigned long flags; + + if (tty->link->packet) { + spin_lock_irqsave(&tty->ctrl_lock, flags); + tty->ctrl_status |= TIOCPKT_FLUSHREAD; + spin_unlock_irqrestore(&tty->ctrl_lock, flags); + wake_up_interruptible(&tty->link->read_wait); + } +} + +/** + * n_tty_flush_buffer - clean input queue + * @tty: terminal device + * + * Flush the input buffer. Called when the tty layer wants the + * buffer flushed (eg at hangup) or when the N_TTY line discipline + * internally has to clean the pending queue (for example some signals). + * + * Holds termios_rwsem to exclude producer/consumer while + * buffer indices are reset. + * + * Locking: ctrl_lock, exclusive termios_rwsem + */ + +static void n_tty_flush_buffer(struct tty_struct *tty) +{ + down_write(&tty->termios_rwsem); + reset_buffer_flags(tty->disc_data); + n_tty_kick_worker(tty); + + if (tty->link) + n_tty_packet_mode_flush(tty); + up_write(&tty->termios_rwsem); +} + +/** + * is_utf8_continuation - utf8 multibyte check + * @c: byte to check + * + * Returns true if the utf8 character 'c' is a multibyte continuation + * character. We use this to correctly compute the on screen size + * of the character when printing + */ + +static inline int is_utf8_continuation(unsigned char c) +{ + return (c & 0xc0) == 0x80; +} + +/** + * is_continuation - multibyte check + * @c: byte to check + * + * Returns true if the utf8 character 'c' is a multibyte continuation + * character and the terminal is in unicode mode. + */ + +static inline int is_continuation(unsigned char c, struct tty_struct *tty) +{ + return I_IUTF8(tty) && is_utf8_continuation(c); +} + +/** + * do_output_char - output one character + * @c: character (or partial unicode symbol) + * @tty: terminal device + * @space: space available in tty driver write buffer + * + * This is a helper function that handles one output character + * (including special characters like TAB, CR, LF, etc.), + * doing OPOST processing and putting the results in the + * tty driver's write buffer. + * + * Note that Linux currently ignores TABDLY, CRDLY, VTDLY, FFDLY + * and NLDLY. They simply aren't relevant in the world today. + * If you ever need them, add them here. + * + * Returns the number of bytes of buffer space used or -1 if + * no space left. + * + * Locking: should be called under the output_lock to protect + * the column state and space left in the buffer + */ + +static int do_output_char(unsigned char c, struct tty_struct *tty, int space) +{ + struct n_tty_data *ldata = tty->disc_data; + int spaces; + + if (!space) + return -1; + + switch (c) { + case '\n': + if (O_ONLRET(tty)) + ldata->column = 0; + if (O_ONLCR(tty)) { + if (space < 2) + return -1; + ldata->canon_column = ldata->column = 0; + tty->ops->write(tty, "\r\n", 2); + return 2; + } + ldata->canon_column = ldata->column; + break; + case '\r': + if (O_ONOCR(tty) && ldata->column == 0) + return 0; + if (O_OCRNL(tty)) { + c = '\n'; + if (O_ONLRET(tty)) + ldata->canon_column = ldata->column = 0; + break; + } + ldata->canon_column = ldata->column = 0; + break; + case '\t': + spaces = 8 - (ldata->column & 7); + if (O_TABDLY(tty) == XTABS) { + if (space < spaces) + return -1; + ldata->column += spaces; + tty->ops->write(tty, " ", spaces); + return spaces; + } + ldata->column += spaces; + break; + case '\b': + if (ldata->column > 0) + ldata->column--; + break; + default: + if (!iscntrl(c)) { + if (O_OLCUC(tty)) + c = toupper(c); + if (!is_continuation(c, tty)) + ldata->column++; + } + break; + } + + tty_put_char(tty, c); + return 1; +} + +/** + * process_output - output post processor + * @c: character (or partial unicode symbol) + * @tty: terminal device + * + * Output one character with OPOST processing. + * Returns -1 when the output device is full and the character + * must be retried. + * + * Locking: output_lock to protect column state and space left + * (also, this is called from n_tty_write under the + * tty layer write lock) + */ + +static int process_output(unsigned char c, struct tty_struct *tty) +{ + struct n_tty_data *ldata = tty->disc_data; + int space, retval; + + mutex_lock(&ldata->output_lock); + + space = tty_write_room(tty); + retval = do_output_char(c, tty, space); + + mutex_unlock(&ldata->output_lock); + if (retval < 0) + return -1; + else + return 0; +} + +/** + * process_output_block - block post processor + * @tty: terminal device + * @buf: character buffer + * @nr: number of bytes to output + * + * Output a block of characters with OPOST processing. + * Returns the number of characters output. + * + * This path is used to speed up block console writes, among other + * things when processing blocks of output data. It handles only + * the simple cases normally found and helps to generate blocks of + * symbols for the console driver and thus improve performance. + * + * Locking: output_lock to protect column state and space left + * (also, this is called from n_tty_write under the + * tty layer write lock) + */ + +static ssize_t process_output_block(struct tty_struct *tty, + const unsigned char *buf, unsigned int nr) +{ + struct n_tty_data *ldata = tty->disc_data; + int space; + int i; + const unsigned char *cp; + + mutex_lock(&ldata->output_lock); + + space = tty_write_room(tty); + if (!space) { + mutex_unlock(&ldata->output_lock); + return 0; + } + if (nr > space) + nr = space; + + for (i = 0, cp = buf; i < nr; i++, cp++) { + unsigned char c = *cp; + + switch (c) { + case '\n': + if (O_ONLRET(tty)) + ldata->column = 0; + if (O_ONLCR(tty)) + goto break_out; + ldata->canon_column = ldata->column; + break; + case '\r': + if (O_ONOCR(tty) && ldata->column == 0) + goto break_out; + if (O_OCRNL(tty)) + goto break_out; + ldata->canon_column = ldata->column = 0; + break; + case '\t': + goto break_out; + case '\b': + if (ldata->column > 0) + ldata->column--; + break; + default: + if (!iscntrl(c)) { + if (O_OLCUC(tty)) + goto break_out; + if (!is_continuation(c, tty)) + ldata->column++; + } + break; + } + } +break_out: + i = tty->ops->write(tty, buf, i); + + mutex_unlock(&ldata->output_lock); + return i; +} + +/** + * process_echoes - write pending echo characters + * @tty: terminal device + * + * Write previously buffered echo (and other ldisc-generated) + * characters to the tty. + * + * Characters generated by the ldisc (including echoes) need to + * be buffered because the driver's write buffer can fill during + * heavy program output. Echoing straight to the driver will + * often fail under these conditions, causing lost characters and + * resulting mismatches of ldisc state information. + * + * Since the ldisc state must represent the characters actually sent + * to the driver at the time of the write, operations like certain + * changes in column state are also saved in the buffer and executed + * here. + * + * A circular fifo buffer is used so that the most recent characters + * are prioritized. Also, when control characters are echoed with a + * prefixed "^", the pair is treated atomically and thus not separated. + * + * Locking: callers must hold output_lock + */ + +static size_t __process_echoes(struct tty_struct *tty) +{ + struct n_tty_data *ldata = tty->disc_data; + int space, old_space; + size_t tail; + unsigned char c; + + old_space = space = tty_write_room(tty); + + tail = ldata->echo_tail; + while (MASK(ldata->echo_commit) != MASK(tail)) { + c = echo_buf(ldata, tail); + if (c == ECHO_OP_START) { + unsigned char op; + int no_space_left = 0; + + /* + * Since add_echo_byte() is called without holding + * output_lock, we might see only portion of multi-byte + * operation. + */ + if (MASK(ldata->echo_commit) == MASK(tail + 1)) + goto not_yet_stored; + /* + * If the buffer byte is the start of a multi-byte + * operation, get the next byte, which is either the + * op code or a control character value. + */ + op = echo_buf(ldata, tail + 1); + + switch (op) { + unsigned int num_chars, num_bs; + + case ECHO_OP_ERASE_TAB: + if (MASK(ldata->echo_commit) == MASK(tail + 2)) + goto not_yet_stored; + num_chars = echo_buf(ldata, tail + 2); + + /* + * Determine how many columns to go back + * in order to erase the tab. + * This depends on the number of columns + * used by other characters within the tab + * area. If this (modulo 8) count is from + * the start of input rather than from a + * previous tab, we offset by canon column. + * Otherwise, tab spacing is normal. + */ + if (!(num_chars & 0x80)) + num_chars += ldata->canon_column; + num_bs = 8 - (num_chars & 7); + + if (num_bs > space) { + no_space_left = 1; + break; + } + space -= num_bs; + while (num_bs--) { + tty_put_char(tty, '\b'); + if (ldata->column > 0) + ldata->column--; + } + tail += 3; + break; + + case ECHO_OP_SET_CANON_COL: + ldata->canon_column = ldata->column; + tail += 2; + break; + + case ECHO_OP_MOVE_BACK_COL: + if (ldata->column > 0) + ldata->column--; + tail += 2; + break; + + case ECHO_OP_START: + /* This is an escaped echo op start code */ + if (!space) { + no_space_left = 1; + break; + } + tty_put_char(tty, ECHO_OP_START); + ldata->column++; + space--; + tail += 2; + break; + + default: + /* + * If the op is not a special byte code, + * it is a ctrl char tagged to be echoed + * as "^X" (where X is the letter + * representing the control char). + * Note that we must ensure there is + * enough space for the whole ctrl pair. + * + */ + if (space < 2) { + no_space_left = 1; + break; + } + tty_put_char(tty, '^'); + tty_put_char(tty, op ^ 0100); + ldata->column += 2; + space -= 2; + tail += 2; + } + + if (no_space_left) + break; + } else { + if (O_OPOST(tty)) { + int retval = do_output_char(c, tty, space); + if (retval < 0) + break; + space -= retval; + } else { + if (!space) + break; + tty_put_char(tty, c); + space -= 1; + } + tail += 1; + } + } + + /* If the echo buffer is nearly full (so that the possibility exists + * of echo overrun before the next commit), then discard enough + * data at the tail to prevent a subsequent overrun */ + while (ldata->echo_commit > tail && + ldata->echo_commit - tail >= ECHO_DISCARD_WATERMARK) { + if (echo_buf(ldata, tail) == ECHO_OP_START) { + if (echo_buf(ldata, tail + 1) == ECHO_OP_ERASE_TAB) + tail += 3; + else + tail += 2; + } else + tail++; + } + + not_yet_stored: + ldata->echo_tail = tail; + return old_space - space; +} + +static void commit_echoes(struct tty_struct *tty) +{ + struct n_tty_data *ldata = tty->disc_data; + size_t nr, old, echoed; + size_t head; + + mutex_lock(&ldata->output_lock); + head = ldata->echo_head; + ldata->echo_mark = head; + old = ldata->echo_commit - ldata->echo_tail; + + /* Process committed echoes if the accumulated # of bytes + * is over the threshold (and try again each time another + * block is accumulated) */ + nr = head - ldata->echo_tail; + if (nr < ECHO_COMMIT_WATERMARK || + (nr % ECHO_BLOCK > old % ECHO_BLOCK)) { + mutex_unlock(&ldata->output_lock); + return; + } + + ldata->echo_commit = head; + echoed = __process_echoes(tty); + mutex_unlock(&ldata->output_lock); + + if (echoed && tty->ops->flush_chars) + tty->ops->flush_chars(tty); +} + +static void process_echoes(struct tty_struct *tty) +{ + struct n_tty_data *ldata = tty->disc_data; + size_t echoed; + + if (ldata->echo_mark == ldata->echo_tail) + return; + + mutex_lock(&ldata->output_lock); + ldata->echo_commit = ldata->echo_mark; + echoed = __process_echoes(tty); + mutex_unlock(&ldata->output_lock); + + if (echoed && tty->ops->flush_chars) + tty->ops->flush_chars(tty); +} + +/* NB: echo_mark and echo_head should be equivalent here */ +static void flush_echoes(struct tty_struct *tty) +{ + struct n_tty_data *ldata = tty->disc_data; + + if ((!L_ECHO(tty) && !L_ECHONL(tty)) || + ldata->echo_commit == ldata->echo_head) + return; + + mutex_lock(&ldata->output_lock); + ldata->echo_commit = ldata->echo_head; + __process_echoes(tty); + mutex_unlock(&ldata->output_lock); +} + +/** + * add_echo_byte - add a byte to the echo buffer + * @c: unicode byte to echo + * @ldata: n_tty data + * + * Add a character or operation byte to the echo buffer. + */ + +static inline void add_echo_byte(unsigned char c, struct n_tty_data *ldata) +{ + *echo_buf_addr(ldata, ldata->echo_head) = c; + smp_wmb(); /* Matches smp_rmb() in echo_buf(). */ + ldata->echo_head++; +} + +/** + * echo_move_back_col - add operation to move back a column + * @ldata: n_tty data + * + * Add an operation to the echo buffer to move back one column. + */ + +static void echo_move_back_col(struct n_tty_data *ldata) +{ + add_echo_byte(ECHO_OP_START, ldata); + add_echo_byte(ECHO_OP_MOVE_BACK_COL, ldata); +} + +/** + * echo_set_canon_col - add operation to set the canon column + * @ldata: n_tty data + * + * Add an operation to the echo buffer to set the canon column + * to the current column. + */ + +static void echo_set_canon_col(struct n_tty_data *ldata) +{ + add_echo_byte(ECHO_OP_START, ldata); + add_echo_byte(ECHO_OP_SET_CANON_COL, ldata); +} + +/** + * echo_erase_tab - add operation to erase a tab + * @num_chars: number of character columns already used + * @after_tab: true if num_chars starts after a previous tab + * @ldata: n_tty data + * + * Add an operation to the echo buffer to erase a tab. + * + * Called by the eraser function, which knows how many character + * columns have been used since either a previous tab or the start + * of input. This information will be used later, along with + * canon column (if applicable), to go back the correct number + * of columns. + */ + +static void echo_erase_tab(unsigned int num_chars, int after_tab, + struct n_tty_data *ldata) +{ + add_echo_byte(ECHO_OP_START, ldata); + add_echo_byte(ECHO_OP_ERASE_TAB, ldata); + + /* We only need to know this modulo 8 (tab spacing) */ + num_chars &= 7; + + /* Set the high bit as a flag if num_chars is after a previous tab */ + if (after_tab) + num_chars |= 0x80; + + add_echo_byte(num_chars, ldata); +} + +/** + * echo_char_raw - echo a character raw + * @c: unicode byte to echo + * @tty: terminal device + * + * Echo user input back onto the screen. This must be called only when + * L_ECHO(tty) is true. Called from the driver receive_buf path. + * + * This variant does not treat control characters specially. + */ + +static void echo_char_raw(unsigned char c, struct n_tty_data *ldata) +{ + if (c == ECHO_OP_START) { + add_echo_byte(ECHO_OP_START, ldata); + add_echo_byte(ECHO_OP_START, ldata); + } else { + add_echo_byte(c, ldata); + } +} + +/** + * echo_char - echo a character + * @c: unicode byte to echo + * @tty: terminal device + * + * Echo user input back onto the screen. This must be called only when + * L_ECHO(tty) is true. Called from the driver receive_buf path. + * + * This variant tags control characters to be echoed as "^X" + * (where X is the letter representing the control char). + */ + +static void echo_char(unsigned char c, struct tty_struct *tty) +{ + struct n_tty_data *ldata = tty->disc_data; + + if (c == ECHO_OP_START) { + add_echo_byte(ECHO_OP_START, ldata); + add_echo_byte(ECHO_OP_START, ldata); + } else { + if (L_ECHOCTL(tty) && iscntrl(c) && c != '\t') + add_echo_byte(ECHO_OP_START, ldata); + add_echo_byte(c, ldata); + } +} + +/** + * finish_erasing - complete erase + * @ldata: n_tty data + */ + +static inline void finish_erasing(struct n_tty_data *ldata) +{ + if (ldata->erasing) { + echo_char_raw('/', ldata); + ldata->erasing = 0; + } +} + +/** + * eraser - handle erase function + * @c: character input + * @tty: terminal device + * + * Perform erase and necessary output when an erase character is + * present in the stream from the driver layer. Handles the complexities + * of UTF-8 multibyte symbols. + * + * n_tty_receive_buf()/producer path: + * caller holds non-exclusive termios_rwsem + */ + +static void eraser(unsigned char c, struct tty_struct *tty) +{ + struct n_tty_data *ldata = tty->disc_data; + enum { ERASE, WERASE, KILL } kill_type; + size_t head; + size_t cnt; + int seen_alnums; + + if (ldata->read_head == ldata->canon_head) { + /* process_output('\a', tty); */ /* what do you think? */ + return; + } + if (c == ERASE_CHAR(tty)) + kill_type = ERASE; + else if (c == WERASE_CHAR(tty)) + kill_type = WERASE; + else { + if (!L_ECHO(tty)) { + ldata->read_head = ldata->canon_head; + return; + } + if (!L_ECHOK(tty) || !L_ECHOKE(tty) || !L_ECHOE(tty)) { + ldata->read_head = ldata->canon_head; + finish_erasing(ldata); + echo_char(KILL_CHAR(tty), tty); + /* Add a newline if ECHOK is on and ECHOKE is off. */ + if (L_ECHOK(tty)) + echo_char_raw('\n', ldata); + return; + } + kill_type = KILL; + } + + seen_alnums = 0; + while (MASK(ldata->read_head) != MASK(ldata->canon_head)) { + head = ldata->read_head; + + /* erase a single possibly multibyte character */ + do { + head--; + c = read_buf(ldata, head); + } while (is_continuation(c, tty) && + MASK(head) != MASK(ldata->canon_head)); + + /* do not partially erase */ + if (is_continuation(c, tty)) + break; + + if (kill_type == WERASE) { + /* Equivalent to BSD's ALTWERASE. */ + if (isalnum(c) || c == '_') + seen_alnums++; + else if (seen_alnums) + break; + } + cnt = ldata->read_head - head; + ldata->read_head = head; + if (L_ECHO(tty)) { + if (L_ECHOPRT(tty)) { + if (!ldata->erasing) { + echo_char_raw('\\', ldata); + ldata->erasing = 1; + } + /* if cnt > 1, output a multi-byte character */ + echo_char(c, tty); + while (--cnt > 0) { + head++; + echo_char_raw(read_buf(ldata, head), ldata); + echo_move_back_col(ldata); + } + } else if (kill_type == ERASE && !L_ECHOE(tty)) { + echo_char(ERASE_CHAR(tty), tty); + } else if (c == '\t') { + unsigned int num_chars = 0; + int after_tab = 0; + size_t tail = ldata->read_head; + + /* + * Count the columns used for characters + * since the start of input or after a + * previous tab. + * This info is used to go back the correct + * number of columns. + */ + while (MASK(tail) != MASK(ldata->canon_head)) { + tail--; + c = read_buf(ldata, tail); + if (c == '\t') { + after_tab = 1; + break; + } else if (iscntrl(c)) { + if (L_ECHOCTL(tty)) + num_chars += 2; + } else if (!is_continuation(c, tty)) { + num_chars++; + } + } + echo_erase_tab(num_chars, after_tab, ldata); + } else { + if (iscntrl(c) && L_ECHOCTL(tty)) { + echo_char_raw('\b', ldata); + echo_char_raw(' ', ldata); + echo_char_raw('\b', ldata); + } + if (!iscntrl(c) || L_ECHOCTL(tty)) { + echo_char_raw('\b', ldata); + echo_char_raw(' ', ldata); + echo_char_raw('\b', ldata); + } + } + } + if (kill_type == ERASE) + break; + } + if (ldata->read_head == ldata->canon_head && L_ECHO(tty)) + finish_erasing(ldata); +} + +/** + * isig - handle the ISIG optio + * @sig: signal + * @tty: terminal + * + * Called when a signal is being sent due to terminal input. + * Called from the driver receive_buf path so serialized. + * + * Performs input and output flush if !NOFLSH. In this context, the echo + * buffer is 'output'. The signal is processed first to alert any current + * readers or writers to discontinue and exit their i/o loops. + * + * Locking: ctrl_lock + */ + +static void __isig(int sig, struct tty_struct *tty) +{ + struct pid *tty_pgrp = tty_get_pgrp(tty); + if (tty_pgrp) { + kill_pgrp(tty_pgrp, sig, 1); + put_pid(tty_pgrp); + } +} + +static void isig(int sig, struct tty_struct *tty) +{ + struct n_tty_data *ldata = tty->disc_data; + + if (L_NOFLSH(tty)) { + /* signal only */ + __isig(sig, tty); + + } else { /* signal and flush */ + up_read(&tty->termios_rwsem); + down_write(&tty->termios_rwsem); + + __isig(sig, tty); + + /* clear echo buffer */ + mutex_lock(&ldata->output_lock); + ldata->echo_head = ldata->echo_tail = 0; + ldata->echo_mark = ldata->echo_commit = 0; + mutex_unlock(&ldata->output_lock); + + /* clear output buffer */ + tty_driver_flush_buffer(tty); + + /* clear input buffer */ + reset_buffer_flags(tty->disc_data); + + /* notify pty master of flush */ + if (tty->link) + n_tty_packet_mode_flush(tty); + + up_write(&tty->termios_rwsem); + down_read(&tty->termios_rwsem); + } +} + +/** + * n_tty_receive_break - handle break + * @tty: terminal + * + * An RS232 break event has been hit in the incoming bitstream. This + * can cause a variety of events depending upon the termios settings. + * + * n_tty_receive_buf()/producer path: + * caller holds non-exclusive termios_rwsem + * + * Note: may get exclusive termios_rwsem if flushing input buffer + */ + +static void n_tty_receive_break(struct tty_struct *tty) +{ + struct n_tty_data *ldata = tty->disc_data; + + if (I_IGNBRK(tty)) + return; + if (I_BRKINT(tty)) { + isig(SIGINT, tty); + return; + } + if (I_PARMRK(tty)) { + put_tty_queue('\377', ldata); + put_tty_queue('\0', ldata); + } + put_tty_queue('\0', ldata); +} + +/** + * n_tty_receive_overrun - handle overrun reporting + * @tty: terminal + * + * Data arrived faster than we could process it. While the tty + * driver has flagged this the bits that were missed are gone + * forever. + * + * Called from the receive_buf path so single threaded. Does not + * need locking as num_overrun and overrun_time are function + * private. + */ + +static void n_tty_receive_overrun(struct tty_struct *tty) +{ + struct n_tty_data *ldata = tty->disc_data; + + ldata->num_overrun++; + if (time_after(jiffies, ldata->overrun_time + HZ) || + time_after(ldata->overrun_time, jiffies)) { + tty_warn(tty, "%d input overrun(s)\n", ldata->num_overrun); + ldata->overrun_time = jiffies; + ldata->num_overrun = 0; + } +} + +/** + * n_tty_receive_parity_error - error notifier + * @tty: terminal device + * @c: character + * + * Process a parity error and queue the right data to indicate + * the error case if necessary. + * + * n_tty_receive_buf()/producer path: + * caller holds non-exclusive termios_rwsem + */ +static void n_tty_receive_parity_error(struct tty_struct *tty, unsigned char c) +{ + struct n_tty_data *ldata = tty->disc_data; + + if (I_INPCK(tty)) { + if (I_IGNPAR(tty)) + return; + if (I_PARMRK(tty)) { + put_tty_queue('\377', ldata); + put_tty_queue('\0', ldata); + put_tty_queue(c, ldata); + } else + put_tty_queue('\0', ldata); + } else + put_tty_queue(c, ldata); +} + +static void +n_tty_receive_signal_char(struct tty_struct *tty, int signal, unsigned char c) +{ + isig(signal, tty); + if (I_IXON(tty)) + start_tty(tty); + if (L_ECHO(tty)) { + echo_char(c, tty); + commit_echoes(tty); + } else + process_echoes(tty); + return; +} + +/** + * n_tty_receive_char - perform processing + * @tty: terminal device + * @c: character + * + * Process an individual character of input received from the driver. + * This is serialized with respect to itself by the rules for the + * driver above. + * + * n_tty_receive_buf()/producer path: + * caller holds non-exclusive termios_rwsem + * publishes canon_head if canonical mode is active + * + * Returns 1 if LNEXT was received, else returns 0 + */ + +static int +n_tty_receive_char_special(struct tty_struct *tty, unsigned char c) +{ + struct n_tty_data *ldata = tty->disc_data; + + if (I_IXON(tty)) { + if (c == START_CHAR(tty)) { + start_tty(tty); + process_echoes(tty); + return 0; + } + if (c == STOP_CHAR(tty)) { + stop_tty(tty); + return 0; + } + } + + if (L_ISIG(tty)) { + if (c == INTR_CHAR(tty)) { + n_tty_receive_signal_char(tty, SIGINT, c); + return 0; + } else if (c == QUIT_CHAR(tty)) { + n_tty_receive_signal_char(tty, SIGQUIT, c); + return 0; + } else if (c == SUSP_CHAR(tty)) { + n_tty_receive_signal_char(tty, SIGTSTP, c); + return 0; + } + } + + if (tty->stopped && !tty->flow_stopped && I_IXON(tty) && I_IXANY(tty)) { + start_tty(tty); + process_echoes(tty); + } + + if (c == '\r') { + if (I_IGNCR(tty)) + return 0; + if (I_ICRNL(tty)) + c = '\n'; + } else if (c == '\n' && I_INLCR(tty)) + c = '\r'; + + if (ldata->icanon) { + if (c == ERASE_CHAR(tty) || c == KILL_CHAR(tty) || + (c == WERASE_CHAR(tty) && L_IEXTEN(tty))) { + eraser(c, tty); + commit_echoes(tty); + return 0; + } + if (c == LNEXT_CHAR(tty) && L_IEXTEN(tty)) { + ldata->lnext = 1; + if (L_ECHO(tty)) { + finish_erasing(ldata); + if (L_ECHOCTL(tty)) { + echo_char_raw('^', ldata); + echo_char_raw('\b', ldata); + commit_echoes(tty); + } + } + return 1; + } + if (c == REPRINT_CHAR(tty) && L_ECHO(tty) && L_IEXTEN(tty)) { + size_t tail = ldata->canon_head; + + finish_erasing(ldata); + echo_char(c, tty); + echo_char_raw('\n', ldata); + while (MASK(tail) != MASK(ldata->read_head)) { + echo_char(read_buf(ldata, tail), tty); + tail++; + } + commit_echoes(tty); + return 0; + } + if (c == '\n') { + if (L_ECHO(tty) || L_ECHONL(tty)) { + echo_char_raw('\n', ldata); + commit_echoes(tty); + } + goto handle_newline; + } + if (c == EOF_CHAR(tty)) { + c = __DISABLED_CHAR; + goto handle_newline; + } + if ((c == EOL_CHAR(tty)) || + (c == EOL2_CHAR(tty) && L_IEXTEN(tty))) { + /* + * XXX are EOL_CHAR and EOL2_CHAR echoed?!? + */ + if (L_ECHO(tty)) { + /* Record the column of first canon char. */ + if (ldata->canon_head == ldata->read_head) + echo_set_canon_col(ldata); + echo_char(c, tty); + commit_echoes(tty); + } + /* + * XXX does PARMRK doubling happen for + * EOL_CHAR and EOL2_CHAR? + */ + if (c == (unsigned char) '\377' && I_PARMRK(tty)) + put_tty_queue(c, ldata); + +handle_newline: + set_bit(ldata->read_head & (N_TTY_BUF_SIZE - 1), ldata->read_flags); + put_tty_queue(c, ldata); + smp_store_release(&ldata->canon_head, ldata->read_head); + kill_fasync(&tty->fasync, SIGIO, POLL_IN); + wake_up_interruptible_poll(&tty->read_wait, EPOLLIN); + return 0; + } + } + + if (L_ECHO(tty)) { + finish_erasing(ldata); + if (c == '\n') + echo_char_raw('\n', ldata); + else { + /* Record the column of first canon char. */ + if (ldata->canon_head == ldata->read_head) + echo_set_canon_col(ldata); + echo_char(c, tty); + } + commit_echoes(tty); + } + + /* PARMRK doubling check */ + if (c == (unsigned char) '\377' && I_PARMRK(tty)) + put_tty_queue(c, ldata); + + put_tty_queue(c, ldata); + return 0; +} + +static inline void +n_tty_receive_char_inline(struct tty_struct *tty, unsigned char c) +{ + struct n_tty_data *ldata = tty->disc_data; + + if (tty->stopped && !tty->flow_stopped && I_IXON(tty) && I_IXANY(tty)) { + start_tty(tty); + process_echoes(tty); + } + if (L_ECHO(tty)) { + finish_erasing(ldata); + /* Record the column of first canon char. */ + if (ldata->canon_head == ldata->read_head) + echo_set_canon_col(ldata); + echo_char(c, tty); + commit_echoes(tty); + } + /* PARMRK doubling check */ + if (c == (unsigned char) '\377' && I_PARMRK(tty)) + put_tty_queue(c, ldata); + put_tty_queue(c, ldata); +} + +static void n_tty_receive_char(struct tty_struct *tty, unsigned char c) +{ + n_tty_receive_char_inline(tty, c); +} + +static inline void +n_tty_receive_char_fast(struct tty_struct *tty, unsigned char c) +{ + struct n_tty_data *ldata = tty->disc_data; + + if (tty->stopped && !tty->flow_stopped && I_IXON(tty) && I_IXANY(tty)) { + start_tty(tty); + process_echoes(tty); + } + if (L_ECHO(tty)) { + finish_erasing(ldata); + /* Record the column of first canon char. */ + if (ldata->canon_head == ldata->read_head) + echo_set_canon_col(ldata); + echo_char(c, tty); + commit_echoes(tty); + } + put_tty_queue(c, ldata); +} + +static void n_tty_receive_char_closing(struct tty_struct *tty, unsigned char c) +{ + if (I_ISTRIP(tty)) + c &= 0x7f; + if (I_IUCLC(tty) && L_IEXTEN(tty)) + c = tolower(c); + + if (I_IXON(tty)) { + if (c == STOP_CHAR(tty)) + stop_tty(tty); + else if (c == START_CHAR(tty) || + (tty->stopped && !tty->flow_stopped && I_IXANY(tty) && + c != INTR_CHAR(tty) && c != QUIT_CHAR(tty) && + c != SUSP_CHAR(tty))) { + start_tty(tty); + process_echoes(tty); + } + } +} + +static void +n_tty_receive_char_flagged(struct tty_struct *tty, unsigned char c, char flag) +{ + switch (flag) { + case TTY_BREAK: + n_tty_receive_break(tty); + break; + case TTY_PARITY: + case TTY_FRAME: + n_tty_receive_parity_error(tty, c); + break; + case TTY_OVERRUN: + n_tty_receive_overrun(tty); + break; + default: + tty_err(tty, "unknown flag %d\n", flag); + break; + } +} + +static void +n_tty_receive_char_lnext(struct tty_struct *tty, unsigned char c, char flag) +{ + struct n_tty_data *ldata = tty->disc_data; + + ldata->lnext = 0; + if (likely(flag == TTY_NORMAL)) { + if (I_ISTRIP(tty)) + c &= 0x7f; + if (I_IUCLC(tty) && L_IEXTEN(tty)) + c = tolower(c); + n_tty_receive_char(tty, c); + } else + n_tty_receive_char_flagged(tty, c, flag); +} + +static void +n_tty_receive_buf_real_raw(struct tty_struct *tty, const unsigned char *cp, + char *fp, int count) +{ + struct n_tty_data *ldata = tty->disc_data; + size_t n, head; + + head = ldata->read_head & (N_TTY_BUF_SIZE - 1); + n = min_t(size_t, count, N_TTY_BUF_SIZE - head); + memcpy(read_buf_addr(ldata, head), cp, n); + ldata->read_head += n; + cp += n; + count -= n; + + head = ldata->read_head & (N_TTY_BUF_SIZE - 1); + n = min_t(size_t, count, N_TTY_BUF_SIZE - head); + memcpy(read_buf_addr(ldata, head), cp, n); + ldata->read_head += n; +} + +static void +n_tty_receive_buf_raw(struct tty_struct *tty, const unsigned char *cp, + char *fp, int count) +{ + struct n_tty_data *ldata = tty->disc_data; + char flag = TTY_NORMAL; + + while (count--) { + if (fp) + flag = *fp++; + if (likely(flag == TTY_NORMAL)) + put_tty_queue(*cp++, ldata); + else + n_tty_receive_char_flagged(tty, *cp++, flag); + } +} + +static void +n_tty_receive_buf_closing(struct tty_struct *tty, const unsigned char *cp, + char *fp, int count) +{ + char flag = TTY_NORMAL; + + while (count--) { + if (fp) + flag = *fp++; + if (likely(flag == TTY_NORMAL)) + n_tty_receive_char_closing(tty, *cp++); + } +} + +static void +n_tty_receive_buf_standard(struct tty_struct *tty, const unsigned char *cp, + char *fp, int count) +{ + struct n_tty_data *ldata = tty->disc_data; + char flag = TTY_NORMAL; + + while (count--) { + if (fp) + flag = *fp++; + if (likely(flag == TTY_NORMAL)) { + unsigned char c = *cp++; + + if (I_ISTRIP(tty)) + c &= 0x7f; + if (I_IUCLC(tty) && L_IEXTEN(tty)) + c = tolower(c); + if (L_EXTPROC(tty)) { + put_tty_queue(c, ldata); + continue; + } + if (!test_bit(c, ldata->char_map)) + n_tty_receive_char_inline(tty, c); + else if (n_tty_receive_char_special(tty, c) && count) { + if (fp) + flag = *fp++; + n_tty_receive_char_lnext(tty, *cp++, flag); + count--; + } + } else + n_tty_receive_char_flagged(tty, *cp++, flag); + } +} + +static void +n_tty_receive_buf_fast(struct tty_struct *tty, const unsigned char *cp, + char *fp, int count) +{ + struct n_tty_data *ldata = tty->disc_data; + char flag = TTY_NORMAL; + + while (count--) { + if (fp) + flag = *fp++; + if (likely(flag == TTY_NORMAL)) { + unsigned char c = *cp++; + + if (!test_bit(c, ldata->char_map)) + n_tty_receive_char_fast(tty, c); + else if (n_tty_receive_char_special(tty, c) && count) { + if (fp) + flag = *fp++; + n_tty_receive_char_lnext(tty, *cp++, flag); + count--; + } + } else + n_tty_receive_char_flagged(tty, *cp++, flag); + } +} + +static void __receive_buf(struct tty_struct *tty, const unsigned char *cp, + char *fp, int count) +{ + struct n_tty_data *ldata = tty->disc_data; + bool preops = I_ISTRIP(tty) || (I_IUCLC(tty) && L_IEXTEN(tty)); + + if (ldata->real_raw) + n_tty_receive_buf_real_raw(tty, cp, fp, count); + else if (ldata->raw || (L_EXTPROC(tty) && !preops)) + n_tty_receive_buf_raw(tty, cp, fp, count); + else if (tty->closing && !L_EXTPROC(tty)) + n_tty_receive_buf_closing(tty, cp, fp, count); + else { + if (ldata->lnext) { + char flag = TTY_NORMAL; + + if (fp) + flag = *fp++; + n_tty_receive_char_lnext(tty, *cp++, flag); + count--; + } + + if (!preops && !I_PARMRK(tty)) + n_tty_receive_buf_fast(tty, cp, fp, count); + else + n_tty_receive_buf_standard(tty, cp, fp, count); + + flush_echoes(tty); + if (tty->ops->flush_chars) + tty->ops->flush_chars(tty); + } + + if (ldata->icanon && !L_EXTPROC(tty)) + return; + + /* publish read_head to consumer */ + smp_store_release(&ldata->commit_head, ldata->read_head); + + if (read_cnt(ldata)) { + kill_fasync(&tty->fasync, SIGIO, POLL_IN); + wake_up_interruptible_poll(&tty->read_wait, EPOLLIN); + } +} + +/** + * n_tty_receive_buf_common - process input + * @tty: device to receive input + * @cp: input chars + * @fp: flags for each char (if NULL, all chars are TTY_NORMAL) + * @count: number of input chars in @cp + * + * Called by the terminal driver when a block of characters has + * been received. This function must be called from soft contexts + * not from interrupt context. The driver is responsible for making + * calls one at a time and in order (or using flush_to_ldisc) + * + * Returns the # of input chars from @cp which were processed. + * + * In canonical mode, the maximum line length is 4096 chars (including + * the line termination char); lines longer than 4096 chars are + * truncated. After 4095 chars, input data is still processed but + * not stored. Overflow processing ensures the tty can always + * receive more input until at least one line can be read. + * + * In non-canonical mode, the read buffer will only accept 4095 chars; + * this provides the necessary space for a newline char if the input + * mode is switched to canonical. + * + * Note it is possible for the read buffer to _contain_ 4096 chars + * in non-canonical mode: the read buffer could already contain the + * maximum canon line of 4096 chars when the mode is switched to + * non-canonical. + * + * n_tty_receive_buf()/producer path: + * claims non-exclusive termios_rwsem + * publishes commit_head or canon_head + */ +static int +n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp, + char *fp, int count, int flow) +{ + struct n_tty_data *ldata = tty->disc_data; + int room, n, rcvd = 0, overflow; + + down_read(&tty->termios_rwsem); + + while (1) { + /* + * When PARMRK is set, each input char may take up to 3 chars + * in the read buf; reduce the buffer space avail by 3x + * + * If we are doing input canonicalization, and there are no + * pending newlines, let characters through without limit, so + * that erase characters will be handled. Other excess + * characters will be beeped. + * + * paired with store in *_copy_from_read_buf() -- guarantees + * the consumer has loaded the data in read_buf up to the new + * read_tail (so this producer will not overwrite unread data) + */ + size_t tail = smp_load_acquire(&ldata->read_tail); + + room = N_TTY_BUF_SIZE - (ldata->read_head - tail); + if (I_PARMRK(tty)) + room = (room + 2) / 3; + room--; + if (room <= 0) { + overflow = ldata->icanon && ldata->canon_head == tail; + if (overflow && room < 0) + ldata->read_head--; + room = overflow; + ldata->no_room = flow && !room; + } else + overflow = 0; + + n = min(count, room); + if (!n) + break; + + /* ignore parity errors if handling overflow */ + if (!overflow || !fp || *fp != TTY_PARITY) + __receive_buf(tty, cp, fp, n); + + cp += n; + if (fp) + fp += n; + count -= n; + rcvd += n; + } + + tty->receive_room = room; + + /* Unthrottle if handling overflow on pty */ + if (tty->driver->type == TTY_DRIVER_TYPE_PTY) { + if (overflow) { + tty_set_flow_change(tty, TTY_UNTHROTTLE_SAFE); + tty_unthrottle_safe(tty); + __tty_set_flow_change(tty, 0); + } + } else + n_tty_check_throttle(tty); + + up_read(&tty->termios_rwsem); + + return rcvd; +} + +static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp, + char *fp, int count) +{ + n_tty_receive_buf_common(tty, cp, fp, count, 0); +} + +static int n_tty_receive_buf2(struct tty_struct *tty, const unsigned char *cp, + char *fp, int count) +{ + return n_tty_receive_buf_common(tty, cp, fp, count, 1); +} + +/** + * n_tty_set_termios - termios data changed + * @tty: terminal + * @old: previous data + * + * Called by the tty layer when the user changes termios flags so + * that the line discipline can plan ahead. This function cannot sleep + * and is protected from re-entry by the tty layer. The user is + * guaranteed that this function will not be re-entered or in progress + * when the ldisc is closed. + * + * Locking: Caller holds tty->termios_rwsem + */ + +static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) +{ + struct n_tty_data *ldata = tty->disc_data; + + if (!old || (old->c_lflag ^ tty->termios.c_lflag) & (ICANON | EXTPROC)) { + bitmap_zero(ldata->read_flags, N_TTY_BUF_SIZE); + ldata->line_start = ldata->read_tail; + if (!L_ICANON(tty) || !read_cnt(ldata)) { + ldata->canon_head = ldata->read_tail; + ldata->push = 0; + } else { + set_bit((ldata->read_head - 1) & (N_TTY_BUF_SIZE - 1), + ldata->read_flags); + ldata->canon_head = ldata->read_head; + ldata->push = 1; + } + ldata->commit_head = ldata->read_head; + ldata->erasing = 0; + ldata->lnext = 0; + } + + ldata->icanon = (L_ICANON(tty) != 0); + + if (I_ISTRIP(tty) || I_IUCLC(tty) || I_IGNCR(tty) || + I_ICRNL(tty) || I_INLCR(tty) || L_ICANON(tty) || + I_IXON(tty) || L_ISIG(tty) || L_ECHO(tty) || + I_PARMRK(tty)) { + bitmap_zero(ldata->char_map, 256); + + if (I_IGNCR(tty) || I_ICRNL(tty)) + set_bit('\r', ldata->char_map); + if (I_INLCR(tty)) + set_bit('\n', ldata->char_map); + + if (L_ICANON(tty)) { + set_bit(ERASE_CHAR(tty), ldata->char_map); + set_bit(KILL_CHAR(tty), ldata->char_map); + set_bit(EOF_CHAR(tty), ldata->char_map); + set_bit('\n', ldata->char_map); + set_bit(EOL_CHAR(tty), ldata->char_map); + if (L_IEXTEN(tty)) { + set_bit(WERASE_CHAR(tty), ldata->char_map); + set_bit(LNEXT_CHAR(tty), ldata->char_map); + set_bit(EOL2_CHAR(tty), ldata->char_map); + if (L_ECHO(tty)) + set_bit(REPRINT_CHAR(tty), + ldata->char_map); + } + } + if (I_IXON(tty)) { + set_bit(START_CHAR(tty), ldata->char_map); + set_bit(STOP_CHAR(tty), ldata->char_map); + } + if (L_ISIG(tty)) { + set_bit(INTR_CHAR(tty), ldata->char_map); + set_bit(QUIT_CHAR(tty), ldata->char_map); + set_bit(SUSP_CHAR(tty), ldata->char_map); + } + clear_bit(__DISABLED_CHAR, ldata->char_map); + ldata->raw = 0; + ldata->real_raw = 0; + } else { + ldata->raw = 1; + if ((I_IGNBRK(tty) || (!I_BRKINT(tty) && !I_PARMRK(tty))) && + (I_IGNPAR(tty) || !I_INPCK(tty)) && + (tty->driver->flags & TTY_DRIVER_REAL_RAW)) + ldata->real_raw = 1; + else + ldata->real_raw = 0; + } + /* + * Fix tty hang when I_IXON(tty) is cleared, but the tty + * been stopped by STOP_CHAR(tty) before it. + */ + if (!I_IXON(tty) && old && (old->c_iflag & IXON) && !tty->flow_stopped) { + start_tty(tty); + process_echoes(tty); + } + + /* The termios change make the tty ready for I/O */ + wake_up_interruptible(&tty->write_wait); + wake_up_interruptible(&tty->read_wait); +} + +/** + * n_tty_close - close the ldisc for this tty + * @tty: device + * + * Called from the terminal layer when this line discipline is + * being shut down, either because of a close or becsuse of a + * discipline change. The function will not be called while other + * ldisc methods are in progress. + */ + +static void n_tty_close(struct tty_struct *tty) +{ + struct n_tty_data *ldata = tty->disc_data; + + if (tty->link) + n_tty_packet_mode_flush(tty); + + vfree(ldata); + tty->disc_data = NULL; +} + +/** + * n_tty_open - open an ldisc + * @tty: terminal to open + * + * Called when this line discipline is being attached to the + * terminal device. Can sleep. Called serialized so that no + * other events will occur in parallel. No further open will occur + * until a close. + */ + +static int n_tty_open(struct tty_struct *tty) +{ + struct n_tty_data *ldata; + + /* Currently a malloc failure here can panic */ + ldata = vzalloc(sizeof(*ldata)); + if (!ldata) + return -ENOMEM; + + ldata->overrun_time = jiffies; + mutex_init(&ldata->atomic_read_lock); + mutex_init(&ldata->output_lock); + + tty->disc_data = ldata; + tty->closing = 0; + /* indicate buffer work may resume */ + clear_bit(TTY_LDISC_HALTED, &tty->flags); + n_tty_set_termios(tty, NULL); + tty_unthrottle(tty); + return 0; +} + +static inline int input_available_p(struct tty_struct *tty, int poll) +{ + struct n_tty_data *ldata = tty->disc_data; + int amt = poll && !TIME_CHAR(tty) && MIN_CHAR(tty) ? MIN_CHAR(tty) : 1; + + if (ldata->icanon && !L_EXTPROC(tty)) + return ldata->canon_head != ldata->read_tail; + else + return ldata->commit_head - ldata->read_tail >= amt; +} + +/** + * copy_from_read_buf - copy read data directly + * @tty: terminal device + * @b: user data + * @nr: size of data + * + * Helper function to speed up n_tty_read. It is only called when + * ICANON is off; it copies characters straight from the tty queue to + * user space directly. It can be profitably called twice; once to + * drain the space from the tail pointer to the (physical) end of the + * buffer, and once to drain the space from the (physical) beginning of + * the buffer to head pointer. + * + * Called under the ldata->atomic_read_lock sem + * + * n_tty_read()/consumer path: + * caller holds non-exclusive termios_rwsem + * read_tail published + */ + +static int copy_from_read_buf(struct tty_struct *tty, + unsigned char __user **b, + size_t *nr) + +{ + struct n_tty_data *ldata = tty->disc_data; + int retval; + size_t n; + bool is_eof; + size_t head = smp_load_acquire(&ldata->commit_head); + size_t tail = ldata->read_tail & (N_TTY_BUF_SIZE - 1); + + retval = 0; + n = min(head - ldata->read_tail, N_TTY_BUF_SIZE - tail); + n = min(*nr, n); + if (n) { + unsigned char *from = read_buf_addr(ldata, tail); + retval = copy_to_user(*b, from, n); + n -= retval; + is_eof = n == 1 && *from == EOF_CHAR(tty); + tty_audit_add_data(tty, from, n); + zero_buffer(tty, from, n); + smp_store_release(&ldata->read_tail, ldata->read_tail + n); + /* Turn single EOF into zero-length read */ + if (L_EXTPROC(tty) && ldata->icanon && is_eof && + (head == ldata->read_tail)) + n = 0; + *b += n; + *nr -= n; + } + return retval; +} + +/** + * canon_copy_from_read_buf - copy read data in canonical mode + * @tty: terminal device + * @b: user data + * @nr: size of data + * + * Helper function for n_tty_read. It is only called when ICANON is on; + * it copies one line of input up to and including the line-delimiting + * character into the user-space buffer. + * + * NB: When termios is changed from non-canonical to canonical mode and + * the read buffer contains data, n_tty_set_termios() simulates an EOF + * push (as if C-d were input) _without_ the DISABLED_CHAR in the buffer. + * This causes data already processed as input to be immediately available + * as input although a newline has not been received. + * + * Called under the atomic_read_lock mutex + * + * n_tty_read()/consumer path: + * caller holds non-exclusive termios_rwsem + * read_tail published + */ + +static int canon_copy_from_read_buf(struct tty_struct *tty, + unsigned char __user **b, + size_t *nr) +{ + struct n_tty_data *ldata = tty->disc_data; + size_t n, size, more, c; + size_t eol; + size_t tail; + int ret, found = 0; + + /* N.B. avoid overrun if nr == 0 */ + if (!*nr) + return 0; + + n = min(*nr + 1, smp_load_acquire(&ldata->canon_head) - ldata->read_tail); + + tail = ldata->read_tail & (N_TTY_BUF_SIZE - 1); + size = min_t(size_t, tail + n, N_TTY_BUF_SIZE); + + n_tty_trace("%s: nr:%zu tail:%zu n:%zu size:%zu\n", + __func__, *nr, tail, n, size); + + eol = find_next_bit(ldata->read_flags, size, tail); + more = n - (size - tail); + if (eol == N_TTY_BUF_SIZE && more) { + /* scan wrapped without finding set bit */ + eol = find_next_bit(ldata->read_flags, more, 0); + found = eol != more; + } else + found = eol != size; + + n = eol - tail; + if (n > N_TTY_BUF_SIZE) + n += N_TTY_BUF_SIZE; + c = n + found; + + if (!found || read_buf(ldata, eol) != __DISABLED_CHAR) { + c = min(*nr, c); + n = c; + } + + n_tty_trace("%s: eol:%zu found:%d n:%zu c:%zu tail:%zu more:%zu\n", + __func__, eol, found, n, c, tail, more); + + ret = tty_copy_to_user(tty, *b, tail, n); + if (ret) + return -EFAULT; + *b += n; + *nr -= n; + + if (found) + clear_bit(eol, ldata->read_flags); + smp_store_release(&ldata->read_tail, ldata->read_tail + c); + + if (found) { + if (!ldata->push) + ldata->line_start = ldata->read_tail; + else + ldata->push = 0; + tty_audit_push(); + } + return 0; +} + +extern ssize_t redirected_tty_write(struct file *, const char __user *, + size_t, loff_t *); + +/** + * job_control - check job control + * @tty: tty + * @file: file handle + * + * Perform job control management checks on this file/tty descriptor + * and if appropriate send any needed signals and return a negative + * error code if action should be taken. + * + * Locking: redirected write test is safe + * current->signal->tty check is safe + * ctrl_lock to safely reference tty->pgrp + */ + +static int job_control(struct tty_struct *tty, struct file *file) +{ + /* Job control check -- must be done at start and after + every sleep (POSIX.1 7.1.1.4). */ + /* NOTE: not yet done after every sleep pending a thorough + check of the logic of this change. -- jlc */ + /* don't stop on /dev/console */ + if (file->f_op->write == redirected_tty_write) + return 0; + + return __tty_check_change(tty, SIGTTIN); +} + + +/** + * n_tty_read - read function for tty + * @tty: tty device + * @file: file object + * @buf: userspace buffer pointer + * @nr: size of I/O + * + * Perform reads for the line discipline. We are guaranteed that the + * line discipline will not be closed under us but we may get multiple + * parallel readers and must handle this ourselves. We may also get + * a hangup. Always called in user context, may sleep. + * + * This code must be sure never to sleep through a hangup. + * + * n_tty_read()/consumer path: + * claims non-exclusive termios_rwsem + * publishes read_tail + */ + +static ssize_t n_tty_read(struct tty_struct *tty, struct file *file, + unsigned char __user *buf, size_t nr) +{ + struct n_tty_data *ldata = tty->disc_data; + unsigned char __user *b = buf; + DEFINE_WAIT_FUNC(wait, woken_wake_function); + int c; + int minimum, time; + ssize_t retval = 0; + long timeout; + int packet; + size_t tail; + + c = job_control(tty, file); + if (c < 0) + return c; + + /* + * Internal serialization of reads. + */ + if (file->f_flags & O_NONBLOCK) { + if (!mutex_trylock(&ldata->atomic_read_lock)) + return -EAGAIN; + } else { + if (mutex_lock_interruptible(&ldata->atomic_read_lock)) + return -ERESTARTSYS; + } + + down_read(&tty->termios_rwsem); + + minimum = time = 0; + timeout = MAX_SCHEDULE_TIMEOUT; + if (!ldata->icanon) { + minimum = MIN_CHAR(tty); + if (minimum) { + time = (HZ / 10) * TIME_CHAR(tty); + } else { + timeout = (HZ / 10) * TIME_CHAR(tty); + minimum = 1; + } + } + + packet = tty->packet; + tail = ldata->read_tail; + + add_wait_queue(&tty->read_wait, &wait); + while (nr) { + /* First test for status change. */ + if (packet && tty->link->ctrl_status) { + unsigned char cs; + if (b != buf) + break; + spin_lock_irq(&tty->link->ctrl_lock); + cs = tty->link->ctrl_status; + tty->link->ctrl_status = 0; + spin_unlock_irq(&tty->link->ctrl_lock); + if (put_user(cs, b)) { + retval = -EFAULT; + break; + } + b++; + nr--; + break; + } + + if (!input_available_p(tty, 0)) { + up_read(&tty->termios_rwsem); + tty_buffer_flush_work(tty->port); + down_read(&tty->termios_rwsem); + if (!input_available_p(tty, 0)) { + if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) { + retval = -EIO; + break; + } + if (tty_hung_up_p(file)) + break; + /* + * Abort readers for ttys which never actually + * get hung up. See __tty_hangup(). + */ + if (test_bit(TTY_HUPPING, &tty->flags)) + break; + if (!timeout) + break; + if (file->f_flags & O_NONBLOCK) { + retval = -EAGAIN; + break; + } + if (signal_pending(current)) { + retval = -ERESTARTSYS; + break; + } + up_read(&tty->termios_rwsem); + + timeout = wait_woken(&wait, TASK_INTERRUPTIBLE, + timeout); + + down_read(&tty->termios_rwsem); + continue; + } + } + + if (ldata->icanon && !L_EXTPROC(tty)) { + retval = canon_copy_from_read_buf(tty, &b, &nr); + if (retval) + break; + } else { + int uncopied; + + /* Deal with packet mode. */ + if (packet && b == buf) { + if (put_user(TIOCPKT_DATA, b)) { + retval = -EFAULT; + break; + } + b++; + nr--; + } + + uncopied = copy_from_read_buf(tty, &b, &nr); + uncopied += copy_from_read_buf(tty, &b, &nr); + if (uncopied) { + retval = -EFAULT; + break; + } + } + + n_tty_check_unthrottle(tty); + + if (b - buf >= minimum) + break; + if (time) + timeout = time; + } + if (tail != ldata->read_tail) + n_tty_kick_worker(tty); + up_read(&tty->termios_rwsem); + + remove_wait_queue(&tty->read_wait, &wait); + mutex_unlock(&ldata->atomic_read_lock); + + if (b - buf) + retval = b - buf; + + return retval; +} + +/** + * n_tty_write - write function for tty + * @tty: tty device + * @file: file object + * @buf: userspace buffer pointer + * @nr: size of I/O + * + * Write function of the terminal device. This is serialized with + * respect to other write callers but not to termios changes, reads + * and other such events. Since the receive code will echo characters, + * thus calling driver write methods, the output_lock is used in + * the output processing functions called here as well as in the + * echo processing function to protect the column state and space + * left in the buffer. + * + * This code must be sure never to sleep through a hangup. + * + * Locking: output_lock to protect column state and space left + * (note that the process_output*() functions take this + * lock themselves) + */ + +static ssize_t n_tty_write(struct tty_struct *tty, struct file *file, + const unsigned char *buf, size_t nr) +{ + const unsigned char *b = buf; + DEFINE_WAIT_FUNC(wait, woken_wake_function); + int c; + ssize_t retval = 0; + + /* Job control check -- must be done at start (POSIX.1 7.1.1.4). */ + if (L_TOSTOP(tty) && file->f_op->write != redirected_tty_write) { + retval = tty_check_change(tty); + if (retval) + return retval; + } + + down_read(&tty->termios_rwsem); + + /* Write out any echoed characters that are still pending */ + process_echoes(tty); + + add_wait_queue(&tty->write_wait, &wait); + while (1) { + if (signal_pending(current)) { + retval = -ERESTARTSYS; + break; + } + if (tty_hung_up_p(file) || (tty->link && !tty->link->count)) { + retval = -EIO; + break; + } + if (O_OPOST(tty)) { + while (nr > 0) { + ssize_t num = process_output_block(tty, b, nr); + if (num < 0) { + if (num == -EAGAIN) + break; + retval = num; + goto break_out; + } + b += num; + nr -= num; + if (nr == 0) + break; + c = *b; + if (process_output(c, tty) < 0) + break; + b++; nr--; + } + if (tty->ops->flush_chars) + tty->ops->flush_chars(tty); + } else { + struct n_tty_data *ldata = tty->disc_data; + + while (nr > 0) { + mutex_lock(&ldata->output_lock); + c = tty->ops->write(tty, b, nr); + mutex_unlock(&ldata->output_lock); + if (c < 0) { + retval = c; + goto break_out; + } + if (!c) + break; + b += c; + nr -= c; + } + } + if (!nr) + break; + if (file->f_flags & O_NONBLOCK) { + retval = -EAGAIN; + break; + } + up_read(&tty->termios_rwsem); + + wait_woken(&wait, TASK_INTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT); + + down_read(&tty->termios_rwsem); + } +break_out: + remove_wait_queue(&tty->write_wait, &wait); + if (nr && tty->fasync) + set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); + up_read(&tty->termios_rwsem); + return (b - buf) ? b - buf : retval; +} + +/** + * n_tty_poll - poll method for N_TTY + * @tty: terminal device + * @file: file accessing it + * @wait: poll table + * + * Called when the line discipline is asked to poll() for data or + * for special events. This code is not serialized with respect to + * other events save open/close. + * + * This code must be sure never to sleep through a hangup. + * Called without the kernel lock held - fine + */ + +static __poll_t n_tty_poll(struct tty_struct *tty, struct file *file, + poll_table *wait) +{ + __poll_t mask = 0; + + poll_wait(file, &tty->read_wait, wait); + poll_wait(file, &tty->write_wait, wait); + if (input_available_p(tty, 1)) + mask |= EPOLLIN | EPOLLRDNORM; + else { + tty_buffer_flush_work(tty->port); + if (input_available_p(tty, 1)) + mask |= EPOLLIN | EPOLLRDNORM; + } + if (tty->packet && tty->link->ctrl_status) + mask |= EPOLLPRI | EPOLLIN | EPOLLRDNORM; + if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) + mask |= EPOLLHUP; + if (tty_hung_up_p(file)) + mask |= EPOLLHUP; + if (tty->ops->write && !tty_is_writelocked(tty) && + tty_chars_in_buffer(tty) < WAKEUP_CHARS && + tty_write_room(tty) > 0) + mask |= EPOLLOUT | EPOLLWRNORM; + return mask; +} + +static unsigned long inq_canon(struct n_tty_data *ldata) +{ + size_t nr, head, tail; + + if (ldata->canon_head == ldata->read_tail) + return 0; + head = ldata->canon_head; + tail = ldata->read_tail; + nr = head - tail; + /* Skip EOF-chars.. */ + while (MASK(head) != MASK(tail)) { + if (test_bit(tail & (N_TTY_BUF_SIZE - 1), ldata->read_flags) && + read_buf(ldata, tail) == __DISABLED_CHAR) + nr--; + tail++; + } + return nr; +} + +static int n_tty_ioctl(struct tty_struct *tty, struct file *file, + unsigned int cmd, unsigned long arg) +{ + struct n_tty_data *ldata = tty->disc_data; + int retval; + + switch (cmd) { + case TIOCOUTQ: + return put_user(tty_chars_in_buffer(tty), (int __user *) arg); + case TIOCINQ: + down_write(&tty->termios_rwsem); + if (L_ICANON(tty) && !L_EXTPROC(tty)) + retval = inq_canon(ldata); + else + retval = read_cnt(ldata); + up_write(&tty->termios_rwsem); + return put_user(retval, (unsigned int __user *) arg); + default: + return n_tty_ioctl_helper(tty, file, cmd, arg); + } +} + +static struct tty_ldisc_ops n_tty_ops = { + .magic = TTY_LDISC_MAGIC, + .name = "n_tty", + .open = n_tty_open, + .close = n_tty_close, + .flush_buffer = n_tty_flush_buffer, + .read = n_tty_read, + .write = n_tty_write, + .ioctl = n_tty_ioctl, + .set_termios = n_tty_set_termios, + .poll = n_tty_poll, + .receive_buf = n_tty_receive_buf, + .write_wakeup = n_tty_write_wakeup, + .receive_buf2 = n_tty_receive_buf2, +}; + +/** + * n_tty_inherit_ops - inherit N_TTY methods + * @ops: struct tty_ldisc_ops where to save N_TTY methods + * + * Enables a 'subclass' line discipline to 'inherit' N_TTY methods. + */ + +void n_tty_inherit_ops(struct tty_ldisc_ops *ops) +{ + *ops = n_tty_ops; + ops->owner = NULL; + ops->refcount = ops->flags = 0; +} +EXPORT_SYMBOL_GPL(n_tty_inherit_ops); + +void __init n_tty_init(void) +{ + tty_register_ldisc(N_TTY, &n_tty_ops); +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/n_tty.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/n_tty.c.yml new file mode 100644 index 00000000000..dd3f5b6c15c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/n_tty.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Theodore Ts'o, Copyright 1994 + - Linus Torvalds, Copyright 1991, 1992, 1993 + - Copyright 1994. Reduced +holders: + - Theodore Ts'o + - Linus Torvalds + - Reduced +authors: + - Andrew J. Kroll diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/nozomi.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/nozomi.c new file mode 100644 index 00000000000..e401a4dd28b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/nozomi.c @@ -0,0 +1,10 @@ +* Maintained by: Paul Hardwick (p.hardwick@option.com) + * + * Patches: + + + * Copyright (c) 2005,2006 Option Wireless Sweden AB + * Copyright (c) 2006 Sphere Systems Ltd + * Copyright (c) 2006 Option Wireless n/v + * All rights Reserved. + * \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/nozomi.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/nozomi.c.yml new file mode 100644 index 00000000000..0b8c0b71bbc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/nozomi.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005,2006 Option Wireless Sweden AB + - Copyright (c) 2006 Sphere Systems Ltd + - Copyright (c) 2006 Option Wireless n/v +holders: + - Option Wireless Sweden AB + - Sphere Systems Ltd + - Option Wireless n/v +authors: + - Paul Hardwick (p.hardwick@option.com) diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/serial/ifx6x60.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/serial/ifx6x60.c new file mode 100644 index 00000000000..0d81718f516 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/serial/ifx6x60.c @@ -0,0 +1,11 @@ +* Copyright (C) 2008 Option International + * Copyright (C) 2008 Filip Aben + * Denis Joseph Barrow + * Jan Dumon + * + * Copyright (C) 2009, 2010 Intel Corp + * Russ Gorby + * + * Driver modified by Intel from Option gtm501l_spi.c + * + * Notes \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/serial/ifx6x60.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/serial/ifx6x60.c.yml new file mode 100644 index 00000000000..c243c1649e1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/tty/serial/ifx6x60.c.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008 Option International + - Copyright (c) 2008 Filip Aben Denis Joseph Barrow + Jan Dumon + - Copyright (c) 2009, 2010 Intel Corp Russ Gorby +holders: + - Option International + - Filip Aben Denis Joseph Barrow Jan Dumon + - Intel Corp Russ Gorby +authors: + - Intel from Option diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/gadget/function/storage_common.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/gadget/function/storage_common.c new file mode 100644 index 00000000000..3aa81747f04 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/gadget/function/storage_common.c @@ -0,0 +1,4 @@ +* Copyright (C) 2003-2008 Alan Stern + * Copyeight (C) 2009 Samsung Electronics + * Author: Michal Nazarewicz (mina86@mina86.com) + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/gadget/function/storage_common.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/gadget/function/storage_common.c.yml new file mode 100644 index 00000000000..bd5bdd5202e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/gadget/function/storage_common.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2003-2008 Alan Stern Copyeight + - (c) 2009 Samsung Electronics +holders: + - Alan Stern Copyeight + - Samsung Electronics +authors: + - Michal Nazarewicz (mina86@mina86.com) diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/gadget/legacy/gmidi.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/gadget/legacy/gmidi.c new file mode 100644 index 00000000000..8caa69a5660 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/gadget/legacy/gmidi.c @@ -0,0 +1,11 @@ +* Copyright (C) 2006 Thumtronics Pty Ltd. + * Developed for Thumtronics by Grey Innovation + * Ben Williamson + * + * This code is based in part on: + + * Gadget Zero driver, Copyright (C) 2003-2004 David Brownell. + * USB Audio driver, Copyright (C) 2002 by Takashi Iwai. + * USB MIDI driver, Copyright (C) 2002-2005 Clemens Ladisch. + * + * Refer to the USB Device Class Definition for MIDI Devices: \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/gadget/legacy/gmidi.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/gadget/legacy/gmidi.c.yml new file mode 100644 index 00000000000..a7a0235169f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/gadget/legacy/gmidi.c.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006 Thumtronics Pty Ltd. + - Copyright (c) 2003-2004 David Brownell. USB Audio + - Copyright (c) 2002 by Takashi Iwai. USB + - Copyright (c) 2002-2005 Clemens Ladisch +holders: + - Thumtronics Pty Ltd. + - David Brownell. USB Audio + - Takashi Iwai. USB + - Clemens Ladisch +authors: + - Grey Innovation Ben Williamson diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/serial/spcp8x5.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/serial/spcp8x5.c new file mode 100644 index 00000000000..21766b97814 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/serial/spcp8x5.c @@ -0,0 +1,9 @@ +* Copyright (C) 2010-2013 Johan Hovold (jhovold@gmail.com) + * Copyright (C) 2006 Linxb (xubin.lin@worldplus.com.cn) + * Copyright (C) 2006 S1 Corp. + * + * Original driver for 2.6.10 pl2303 driver by + + * Changes for 2.6.20 by Harald Klein + */ +#include \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/serial/spcp8x5.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/serial/spcp8x5.c.yml new file mode 100644 index 00000000000..b56c1b9610e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/usb/serial/spcp8x5.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2010-2013 Johan Hovold (jhovold@gmail.com) + - Copyright (c) 2006 Linxb (xubin.lin@worldplus.com.cn) + - Copyright (c) 2006 S1 Corp. +holders: + - Johan Hovold + - Linxb + - S1 Corp. +authors: + - Harald Klein diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/core/cfbimgblt.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/core/cfbimgblt.c new file mode 100644 index 00000000000..9c1bd3c1e50 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/core/cfbimgblt.c @@ -0,0 +1,3 @@ +* Copyright (C) June 1999 James Simmons + * + * This file is subject to the terms and conditions of the GNU General Public \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/core/cfbimgblt.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/core/cfbimgblt.c.yml new file mode 100644 index 00000000000..8426bf4dc90 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/core/cfbimgblt.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) June 1999 James Simmons +holders: + - June James Simmons diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/core/sysimgblt.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/core/sysimgblt.c new file mode 100644 index 00000000000..c5fd0f9f924 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/core/sysimgblt.c @@ -0,0 +1,3 @@ +* Copyright (C) April 2007 Antonino Daplas + * + * This file is subject to the terms and conditions of the GNU General Public \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/core/sysimgblt.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/core/sysimgblt.c.yml new file mode 100644 index 00000000000..990fac4cb25 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/core/sysimgblt.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) April 2007 Antonino Daplas +holders: + - April Antonino Daplas diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/geode/lxfb_core.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/geode/lxfb_core.c new file mode 100644 index 00000000000..c14ca6a65fc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/geode/lxfb_core.c @@ -0,0 +1,4 @@ +* Copyright (C) 2007 Advanced Micro Devices, Inc. + * Built from gxfb (which is Copyright (C) 2006 Arcom Control Systems Ltd.) + * + * This program is free software; you can redistribute it and/or modify it \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/geode/lxfb_core.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/geode/lxfb_core.c.yml new file mode 100644 index 00000000000..c799c911190 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/geode/lxfb_core.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2007 Advanced Micro Devices, Inc. Built + - Copyright (c) 2006 Arcom Control Systems +holders: + - Advanced Micro Devices, Inc. Built + - Arcom Control Systems diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/tmiofb.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/tmiofb.c new file mode 100644 index 00000000000..90a62aeb41b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/tmiofb.c @@ -0,0 +1,5 @@ +* Copyright(C) 2005-2006 Chris Humbert + * Copyright(C) 2005 Dirk Opfer + * Copytight(C) 2007,2008 Dmitry Baryshkov + * + * Based on: \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/tmiofb.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/tmiofb.c.yml new file mode 100644 index 00000000000..dff32711aaf --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/video/fbdev/tmiofb.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005-2006 Chris Humbert + - Copyright (c) 2005 Dirk Opfer Copytight + - (c) 2007,2008 Dmitry Baryshkov +holders: + - Chris Humbert + - Dirk Opfer Copytight + - Dmitry Baryshkov diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/watchdog/jz4740_wdt.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/watchdog/jz4740_wdt.c new file mode 100644 index 00000000000..50ec3dc6d00 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/watchdog/jz4740_wdt.c @@ -0,0 +1,4 @@ +* Copyright (C) 2010, Paul Cercueil + * JZ4740 Watchdog driver + * + * This program is free software; you can redistribute it and/or modify it \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/watchdog/jz4740_wdt.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/watchdog/jz4740_wdt.c.yml new file mode 100644 index 00000000000..c808460a359 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/drivers/watchdog/jz4740_wdt.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2010, Paul Cercueil JZ4740 Watchdog +holders: + - Paul Cercueil JZ4740 Watchdog diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/exofs/ore_raid.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/exofs/ore_raid.c new file mode 100644 index 00000000000..74de9ac5082 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/exofs/ore_raid.c @@ -0,0 +1,9 @@ +* Copyright (C) 2011 + * Boaz Harrosh + * + * This file is part of the objects raid engine (ore). + + + * maintained by caller. Specificaly si->dev, si->obj_offset, ... + */ +static int _add_to_r4w(struct ore_io_state *ios, struct ore_striping_info *si, \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/exofs/ore_raid.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/exofs/ore_raid.c.yml new file mode 100644 index 00000000000..cbcbb17f014 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/exofs/ore_raid.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2011 Boaz Harrosh +holders: + - Boaz Harrosh +authors: + - caller. Specificaly diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/ext4/namei.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/ext4/namei.c new file mode 100644 index 00000000000..4f10f4beeed --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/ext4/namei.c @@ -0,0 +1,3895 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * linux/fs/ext4/namei.c + * + * Copyright (C) 1992, 1993, 1994, 1995 + * Remy Card (card@masi.ibp.fr) + * Laboratoire MASI - Institut Blaise Pascal + * Universite Pierre et Marie Curie (Paris VI) + * + * from + * + * linux/fs/minix/namei.c + * + * Copyright (C) 1991, 1992 Linus Torvalds + * + * Big-endian to little-endian byte-swapping/bitmaps by + * David S. Miller (davem@caip.rutgers.edu), 1995 + * Directory entry file type support and forward compatibility hooks + * for B-tree directories by Theodore Ts'o (tytso@mit.edu), 1998 + * Hash Tree Directory indexing (c) + * Daniel Phillips, 2001 + * Hash Tree Directory indexing porting + * Christopher Li, 2002 + * Hash Tree Directory indexing cleanup + * Theodore Ts'o, 2002 + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "ext4.h" +#include "ext4_jbd2.h" + +#include "xattr.h" +#include "acl.h" + +#include +/* + * define how far ahead to read directories while searching them. + */ +#define NAMEI_RA_CHUNKS 2 +#define NAMEI_RA_BLOCKS 4 +#define NAMEI_RA_SIZE (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS) + +static struct buffer_head *ext4_append(handle_t *handle, + struct inode *inode, + ext4_lblk_t *block) +{ + struct buffer_head *bh; + int err; + + if (unlikely(EXT4_SB(inode->i_sb)->s_max_dir_size_kb && + ((inode->i_size >> 10) >= + EXT4_SB(inode->i_sb)->s_max_dir_size_kb))) + return ERR_PTR(-ENOSPC); + + *block = inode->i_size >> inode->i_sb->s_blocksize_bits; + + bh = ext4_bread(handle, inode, *block, EXT4_GET_BLOCKS_CREATE); + if (IS_ERR(bh)) + return bh; + inode->i_size += inode->i_sb->s_blocksize; + EXT4_I(inode)->i_disksize = inode->i_size; + BUFFER_TRACE(bh, "get_write_access"); + err = ext4_journal_get_write_access(handle, bh); + if (err) { + brelse(bh); + ext4_std_error(inode->i_sb, err); + return ERR_PTR(err); + } + return bh; +} + +static int ext4_dx_csum_verify(struct inode *inode, + struct ext4_dir_entry *dirent); + +/* + * Hints to ext4_read_dirblock regarding whether we expect a directory + * block being read to be an index block, or a block containing + * directory entries (and if the latter, whether it was found via a + * logical block in an htree index block). This is used to control + * what sort of sanity checkinig ext4_read_dirblock() will do on the + * directory block read from the storage device. EITHER will means + * the caller doesn't know what kind of directory block will be read, + * so no specific verification will be done. + */ +typedef enum { + EITHER, INDEX, DIRENT, DIRENT_HTREE +} dirblock_type_t; + +#define ext4_read_dirblock(inode, block, type) \ + __ext4_read_dirblock((inode), (block), (type), __func__, __LINE__) + +static struct buffer_head *__ext4_read_dirblock(struct inode *inode, + ext4_lblk_t block, + dirblock_type_t type, + const char *func, + unsigned int line) +{ + struct buffer_head *bh; + struct ext4_dir_entry *dirent; + int is_dx_block = 0; + + bh = ext4_bread(NULL, inode, block, 0); + if (IS_ERR(bh)) { + __ext4_warning(inode->i_sb, func, line, + "inode #%lu: lblock %lu: comm %s: " + "error %ld reading directory block", + inode->i_ino, (unsigned long)block, + current->comm, PTR_ERR(bh)); + + return bh; + } + if (!bh && (type == INDEX || type == DIRENT_HTREE)) { + ext4_error_inode(inode, func, line, block, + "Directory hole found for htree %s block", + (type == INDEX) ? "index" : "leaf"); + return ERR_PTR(-EFSCORRUPTED); + } + if (!bh) + return NULL; + dirent = (struct ext4_dir_entry *) bh->b_data; + /* Determine whether or not we have an index block */ + if (is_dx(inode)) { + if (block == 0) + is_dx_block = 1; + else if (ext4_rec_len_from_disk(dirent->rec_len, + inode->i_sb->s_blocksize) == + inode->i_sb->s_blocksize) + is_dx_block = 1; + } + if (!is_dx_block && type == INDEX) { + ext4_error_inode(inode, func, line, block, + "directory leaf block found instead of index block"); + brelse(bh); + return ERR_PTR(-EFSCORRUPTED); + } + if (!ext4_has_metadata_csum(inode->i_sb) || + buffer_verified(bh)) + return bh; + + /* + * An empty leaf block can get mistaken for a index block; for + * this reason, we can only check the index checksum when the + * caller is sure it should be an index block. + */ + if (is_dx_block && type == INDEX) { + if (ext4_dx_csum_verify(inode, dirent)) + set_buffer_verified(bh); + else { + ext4_error_inode(inode, func, line, block, + "Directory index failed checksum"); + brelse(bh); + return ERR_PTR(-EFSBADCRC); + } + } + if (!is_dx_block) { + if (ext4_dirent_csum_verify(inode, dirent)) + set_buffer_verified(bh); + else { + ext4_error_inode(inode, func, line, block, + "Directory block failed checksum"); + brelse(bh); + return ERR_PTR(-EFSBADCRC); + } + } + return bh; +} + +#ifndef assert +#define assert(test) J_ASSERT(test) +#endif + +#ifdef DX_DEBUG +#define dxtrace(command) command +#else +#define dxtrace(command) +#endif + +struct fake_dirent +{ + __le32 inode; + __le16 rec_len; + u8 name_len; + u8 file_type; +}; + +struct dx_countlimit +{ + __le16 limit; + __le16 count; +}; + +struct dx_entry +{ + __le32 hash; + __le32 block; +}; + +/* + * dx_root_info is laid out so that if it should somehow get overlaid by a + * dirent the two low bits of the hash version will be zero. Therefore, the + * hash version mod 4 should never be 0. Sincerely, the paranoia department. + */ + +struct dx_root +{ + struct fake_dirent dot; + char dot_name[4]; + struct fake_dirent dotdot; + char dotdot_name[4]; + struct dx_root_info + { + __le32 reserved_zero; + u8 hash_version; + u8 info_length; /* 8 */ + u8 indirect_levels; + u8 unused_flags; + } + info; + struct dx_entry entries[0]; +}; + +struct dx_node +{ + struct fake_dirent fake; + struct dx_entry entries[0]; +}; + + +struct dx_frame +{ + struct buffer_head *bh; + struct dx_entry *entries; + struct dx_entry *at; +}; + +struct dx_map_entry +{ + u32 hash; + u16 offs; + u16 size; +}; + +/* + * This goes at the end of each htree block. + */ +struct dx_tail { + u32 dt_reserved; + __le32 dt_checksum; /* crc32c(uuid+inum+dirblock) */ +}; + +static inline ext4_lblk_t dx_get_block(struct dx_entry *entry); +static void dx_set_block(struct dx_entry *entry, ext4_lblk_t value); +static inline unsigned dx_get_hash(struct dx_entry *entry); +static void dx_set_hash(struct dx_entry *entry, unsigned value); +static unsigned dx_get_count(struct dx_entry *entries); +static unsigned dx_get_limit(struct dx_entry *entries); +static void dx_set_count(struct dx_entry *entries, unsigned value); +static void dx_set_limit(struct dx_entry *entries, unsigned value); +static unsigned dx_root_limit(struct inode *dir, unsigned infosize); +static unsigned dx_node_limit(struct inode *dir); +static struct dx_frame *dx_probe(struct ext4_filename *fname, + struct inode *dir, + struct dx_hash_info *hinfo, + struct dx_frame *frame); +static void dx_release(struct dx_frame *frames); +static int dx_make_map(struct inode *dir, struct ext4_dir_entry_2 *de, + unsigned blocksize, struct dx_hash_info *hinfo, + struct dx_map_entry map[]); +static void dx_sort_map(struct dx_map_entry *map, unsigned count); +static struct ext4_dir_entry_2 *dx_move_dirents(char *from, char *to, + struct dx_map_entry *offsets, int count, unsigned blocksize); +static struct ext4_dir_entry_2* dx_pack_dirents(char *base, unsigned blocksize); +static void dx_insert_block(struct dx_frame *frame, + u32 hash, ext4_lblk_t block); +static int ext4_htree_next_block(struct inode *dir, __u32 hash, + struct dx_frame *frame, + struct dx_frame *frames, + __u32 *start_hash); +static struct buffer_head * ext4_dx_find_entry(struct inode *dir, + struct ext4_filename *fname, + struct ext4_dir_entry_2 **res_dir); +static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname, + struct inode *dir, struct inode *inode); + +/* checksumming functions */ +void initialize_dirent_tail(struct ext4_dir_entry_tail *t, + unsigned int blocksize) +{ + memset(t, 0, sizeof(struct ext4_dir_entry_tail)); + t->det_rec_len = ext4_rec_len_to_disk( + sizeof(struct ext4_dir_entry_tail), blocksize); + t->det_reserved_ft = EXT4_FT_DIR_CSUM; +} + +/* Walk through a dirent block to find a checksum "dirent" at the tail */ +static struct ext4_dir_entry_tail *get_dirent_tail(struct inode *inode, + struct ext4_dir_entry *de) +{ + struct ext4_dir_entry_tail *t; + +#ifdef PARANOID + struct ext4_dir_entry *d, *top; + + d = de; + top = (struct ext4_dir_entry *)(((void *)de) + + (EXT4_BLOCK_SIZE(inode->i_sb) - + sizeof(struct ext4_dir_entry_tail))); + while (d < top && d->rec_len) + d = (struct ext4_dir_entry *)(((void *)d) + + le16_to_cpu(d->rec_len)); + + if (d != top) + return NULL; + + t = (struct ext4_dir_entry_tail *)d; +#else + t = EXT4_DIRENT_TAIL(de, EXT4_BLOCK_SIZE(inode->i_sb)); +#endif + + if (t->det_reserved_zero1 || + le16_to_cpu(t->det_rec_len) != sizeof(struct ext4_dir_entry_tail) || + t->det_reserved_zero2 || + t->det_reserved_ft != EXT4_FT_DIR_CSUM) + return NULL; + + return t; +} + +static __le32 ext4_dirent_csum(struct inode *inode, + struct ext4_dir_entry *dirent, int size) +{ + struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); + struct ext4_inode_info *ei = EXT4_I(inode); + __u32 csum; + + csum = ext4_chksum(sbi, ei->i_csum_seed, (__u8 *)dirent, size); + return cpu_to_le32(csum); +} + +#define warn_no_space_for_csum(inode) \ + __warn_no_space_for_csum((inode), __func__, __LINE__) + +static void __warn_no_space_for_csum(struct inode *inode, const char *func, + unsigned int line) +{ + __ext4_warning_inode(inode, func, line, + "No space for directory leaf checksum. Please run e2fsck -D."); +} + +int ext4_dirent_csum_verify(struct inode *inode, struct ext4_dir_entry *dirent) +{ + struct ext4_dir_entry_tail *t; + + if (!ext4_has_metadata_csum(inode->i_sb)) + return 1; + + t = get_dirent_tail(inode, dirent); + if (!t) { + warn_no_space_for_csum(inode); + return 0; + } + + if (t->det_checksum != ext4_dirent_csum(inode, dirent, + (void *)t - (void *)dirent)) + return 0; + + return 1; +} + +static void ext4_dirent_csum_set(struct inode *inode, + struct ext4_dir_entry *dirent) +{ + struct ext4_dir_entry_tail *t; + + if (!ext4_has_metadata_csum(inode->i_sb)) + return; + + t = get_dirent_tail(inode, dirent); + if (!t) { + warn_no_space_for_csum(inode); + return; + } + + t->det_checksum = ext4_dirent_csum(inode, dirent, + (void *)t - (void *)dirent); +} + +int ext4_handle_dirty_dirent_node(handle_t *handle, + struct inode *inode, + struct buffer_head *bh) +{ + ext4_dirent_csum_set(inode, (struct ext4_dir_entry *)bh->b_data); + return ext4_handle_dirty_metadata(handle, inode, bh); +} + +static struct dx_countlimit *get_dx_countlimit(struct inode *inode, + struct ext4_dir_entry *dirent, + int *offset) +{ + struct ext4_dir_entry *dp; + struct dx_root_info *root; + int count_offset; + + if (le16_to_cpu(dirent->rec_len) == EXT4_BLOCK_SIZE(inode->i_sb)) + count_offset = 8; + else if (le16_to_cpu(dirent->rec_len) == 12) { + dp = (struct ext4_dir_entry *)(((void *)dirent) + 12); + if (le16_to_cpu(dp->rec_len) != + EXT4_BLOCK_SIZE(inode->i_sb) - 12) + return NULL; + root = (struct dx_root_info *)(((void *)dp + 12)); + if (root->reserved_zero || + root->info_length != sizeof(struct dx_root_info)) + return NULL; + count_offset = 32; + } else + return NULL; + + if (offset) + *offset = count_offset; + return (struct dx_countlimit *)(((void *)dirent) + count_offset); +} + +static __le32 ext4_dx_csum(struct inode *inode, struct ext4_dir_entry *dirent, + int count_offset, int count, struct dx_tail *t) +{ + struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); + struct ext4_inode_info *ei = EXT4_I(inode); + __u32 csum; + int size; + __u32 dummy_csum = 0; + int offset = offsetof(struct dx_tail, dt_checksum); + + size = count_offset + (count * sizeof(struct dx_entry)); + csum = ext4_chksum(sbi, ei->i_csum_seed, (__u8 *)dirent, size); + csum = ext4_chksum(sbi, csum, (__u8 *)t, offset); + csum = ext4_chksum(sbi, csum, (__u8 *)&dummy_csum, sizeof(dummy_csum)); + + return cpu_to_le32(csum); +} + +static int ext4_dx_csum_verify(struct inode *inode, + struct ext4_dir_entry *dirent) +{ + struct dx_countlimit *c; + struct dx_tail *t; + int count_offset, limit, count; + + if (!ext4_has_metadata_csum(inode->i_sb)) + return 1; + + c = get_dx_countlimit(inode, dirent, &count_offset); + if (!c) { + EXT4_ERROR_INODE(inode, "dir seems corrupt? Run e2fsck -D."); + return 0; + } + limit = le16_to_cpu(c->limit); + count = le16_to_cpu(c->count); + if (count_offset + (limit * sizeof(struct dx_entry)) > + EXT4_BLOCK_SIZE(inode->i_sb) - sizeof(struct dx_tail)) { + warn_no_space_for_csum(inode); + return 0; + } + t = (struct dx_tail *)(((struct dx_entry *)c) + limit); + + if (t->dt_checksum != ext4_dx_csum(inode, dirent, count_offset, + count, t)) + return 0; + return 1; +} + +static void ext4_dx_csum_set(struct inode *inode, struct ext4_dir_entry *dirent) +{ + struct dx_countlimit *c; + struct dx_tail *t; + int count_offset, limit, count; + + if (!ext4_has_metadata_csum(inode->i_sb)) + return; + + c = get_dx_countlimit(inode, dirent, &count_offset); + if (!c) { + EXT4_ERROR_INODE(inode, "dir seems corrupt? Run e2fsck -D."); + return; + } + limit = le16_to_cpu(c->limit); + count = le16_to_cpu(c->count); + if (count_offset + (limit * sizeof(struct dx_entry)) > + EXT4_BLOCK_SIZE(inode->i_sb) - sizeof(struct dx_tail)) { + warn_no_space_for_csum(inode); + return; + } + t = (struct dx_tail *)(((struct dx_entry *)c) + limit); + + t->dt_checksum = ext4_dx_csum(inode, dirent, count_offset, count, t); +} + +static inline int ext4_handle_dirty_dx_node(handle_t *handle, + struct inode *inode, + struct buffer_head *bh) +{ + ext4_dx_csum_set(inode, (struct ext4_dir_entry *)bh->b_data); + return ext4_handle_dirty_metadata(handle, inode, bh); +} + +/* + * p is at least 6 bytes before the end of page + */ +static inline struct ext4_dir_entry_2 * +ext4_next_entry(struct ext4_dir_entry_2 *p, unsigned long blocksize) +{ + return (struct ext4_dir_entry_2 *)((char *)p + + ext4_rec_len_from_disk(p->rec_len, blocksize)); +} + +/* + * Future: use high four bits of block for coalesce-on-delete flags + * Mask them off for now. + */ + +static inline ext4_lblk_t dx_get_block(struct dx_entry *entry) +{ + return le32_to_cpu(entry->block) & 0x0fffffff; +} + +static inline void dx_set_block(struct dx_entry *entry, ext4_lblk_t value) +{ + entry->block = cpu_to_le32(value); +} + +static inline unsigned dx_get_hash(struct dx_entry *entry) +{ + return le32_to_cpu(entry->hash); +} + +static inline void dx_set_hash(struct dx_entry *entry, unsigned value) +{ + entry->hash = cpu_to_le32(value); +} + +static inline unsigned dx_get_count(struct dx_entry *entries) +{ + return le16_to_cpu(((struct dx_countlimit *) entries)->count); +} + +static inline unsigned dx_get_limit(struct dx_entry *entries) +{ + return le16_to_cpu(((struct dx_countlimit *) entries)->limit); +} + +static inline void dx_set_count(struct dx_entry *entries, unsigned value) +{ + ((struct dx_countlimit *) entries)->count = cpu_to_le16(value); +} + +static inline void dx_set_limit(struct dx_entry *entries, unsigned value) +{ + ((struct dx_countlimit *) entries)->limit = cpu_to_le16(value); +} + +static inline unsigned dx_root_limit(struct inode *dir, unsigned infosize) +{ + unsigned entry_space = dir->i_sb->s_blocksize - EXT4_DIR_REC_LEN(1) - + EXT4_DIR_REC_LEN(2) - infosize; + + if (ext4_has_metadata_csum(dir->i_sb)) + entry_space -= sizeof(struct dx_tail); + return entry_space / sizeof(struct dx_entry); +} + +static inline unsigned dx_node_limit(struct inode *dir) +{ + unsigned entry_space = dir->i_sb->s_blocksize - EXT4_DIR_REC_LEN(0); + + if (ext4_has_metadata_csum(dir->i_sb)) + entry_space -= sizeof(struct dx_tail); + return entry_space / sizeof(struct dx_entry); +} + +/* + * Debug + */ +#ifdef DX_DEBUG +static void dx_show_index(char * label, struct dx_entry *entries) +{ + int i, n = dx_get_count (entries); + printk(KERN_DEBUG "%s index", label); + for (i = 0; i < n; i++) { + printk(KERN_CONT " %x->%lu", + i ? dx_get_hash(entries + i) : 0, + (unsigned long)dx_get_block(entries + i)); + } + printk(KERN_CONT "\n"); +} + +struct stats +{ + unsigned names; + unsigned space; + unsigned bcount; +}; + +static struct stats dx_show_leaf(struct inode *dir, + struct dx_hash_info *hinfo, + struct ext4_dir_entry_2 *de, + int size, int show_names) +{ + unsigned names = 0, space = 0; + char *base = (char *) de; + struct dx_hash_info h = *hinfo; + + printk("names: "); + while ((char *) de < base + size) + { + if (de->inode) + { + if (show_names) + { +#ifdef CONFIG_EXT4_FS_ENCRYPTION + int len; + char *name; + struct fscrypt_str fname_crypto_str = + FSTR_INIT(NULL, 0); + int res = 0; + + name = de->name; + len = de->name_len; + if (ext4_encrypted_inode(dir)) + res = fscrypt_get_encryption_info(dir); + if (res) { + printk(KERN_WARNING "Error setting up" + " fname crypto: %d\n", res); + } + if (!fscrypt_has_encryption_key(dir)) { + /* Directory is not encrypted */ + ext4fs_dirhash(de->name, + de->name_len, &h); + printk("%*.s:(U)%x.%u ", len, + name, h.hash, + (unsigned) ((char *) de + - base)); + } else { + struct fscrypt_str de_name = + FSTR_INIT(name, len); + + /* Directory is encrypted */ + res = fscrypt_fname_alloc_buffer( + dir, len, + &fname_crypto_str); + if (res) + printk(KERN_WARNING "Error " + "allocating crypto " + "buffer--skipping " + "crypto\n"); + res = fscrypt_fname_disk_to_usr(dir, + 0, 0, &de_name, + &fname_crypto_str); + if (res) { + printk(KERN_WARNING "Error " + "converting filename " + "from disk to usr" + "\n"); + name = "??"; + len = 2; + } else { + name = fname_crypto_str.name; + len = fname_crypto_str.len; + } + ext4fs_dirhash(de->name, de->name_len, + &h); + printk("%*.s:(E)%x.%u ", len, name, + h.hash, (unsigned) ((char *) de + - base)); + fscrypt_fname_free_buffer( + &fname_crypto_str); + } +#else + int len = de->name_len; + char *name = de->name; + ext4fs_dirhash(de->name, de->name_len, &h); + printk("%*.s:%x.%u ", len, name, h.hash, + (unsigned) ((char *) de - base)); +#endif + } + space += EXT4_DIR_REC_LEN(de->name_len); + names++; + } + de = ext4_next_entry(de, size); + } + printk(KERN_CONT "(%i)\n", names); + return (struct stats) { names, space, 1 }; +} + +struct stats dx_show_entries(struct dx_hash_info *hinfo, struct inode *dir, + struct dx_entry *entries, int levels) +{ + unsigned blocksize = dir->i_sb->s_blocksize; + unsigned count = dx_get_count(entries), names = 0, space = 0, i; + unsigned bcount = 0; + struct buffer_head *bh; + printk("%i indexed blocks...\n", count); + for (i = 0; i < count; i++, entries++) + { + ext4_lblk_t block = dx_get_block(entries); + ext4_lblk_t hash = i ? dx_get_hash(entries): 0; + u32 range = i < count - 1? (dx_get_hash(entries + 1) - hash): ~hash; + struct stats stats; + printk("%s%3u:%03u hash %8x/%8x ",levels?"":" ", i, block, hash, range); + bh = ext4_bread(NULL,dir, block, 0); + if (!bh || IS_ERR(bh)) + continue; + stats = levels? + dx_show_entries(hinfo, dir, ((struct dx_node *) bh->b_data)->entries, levels - 1): + dx_show_leaf(dir, hinfo, (struct ext4_dir_entry_2 *) + bh->b_data, blocksize, 0); + names += stats.names; + space += stats.space; + bcount += stats.bcount; + brelse(bh); + } + if (bcount) + printk(KERN_DEBUG "%snames %u, fullness %u (%u%%)\n", + levels ? "" : " ", names, space/bcount, + (space/bcount)*100/blocksize); + return (struct stats) { names, space, bcount}; +} +#endif /* DX_DEBUG */ + +/* + * Probe for a directory leaf block to search. + * + * dx_probe can return ERR_BAD_DX_DIR, which means there was a format + * error in the directory index, and the caller should fall back to + * searching the directory normally. The callers of dx_probe **MUST** + * check for this error code, and make sure it never gets reflected + * back to userspace. + */ +static struct dx_frame * +dx_probe(struct ext4_filename *fname, struct inode *dir, + struct dx_hash_info *hinfo, struct dx_frame *frame_in) +{ + unsigned count, indirect; + struct dx_entry *at, *entries, *p, *q, *m; + struct dx_root *root; + struct dx_frame *frame = frame_in; + struct dx_frame *ret_err = ERR_PTR(ERR_BAD_DX_DIR); + u32 hash; + + memset(frame_in, 0, EXT4_HTREE_LEVEL * sizeof(frame_in[0])); + frame->bh = ext4_read_dirblock(dir, 0, INDEX); + if (IS_ERR(frame->bh)) + return (struct dx_frame *) frame->bh; + + root = (struct dx_root *) frame->bh->b_data; + if (root->info.hash_version != DX_HASH_TEA && + root->info.hash_version != DX_HASH_HALF_MD4 && + root->info.hash_version != DX_HASH_LEGACY) { + ext4_warning_inode(dir, "Unrecognised inode hash code %u", + root->info.hash_version); + goto fail; + } + if (fname) + hinfo = &fname->hinfo; + hinfo->hash_version = root->info.hash_version; + if (hinfo->hash_version <= DX_HASH_TEA) + hinfo->hash_version += EXT4_SB(dir->i_sb)->s_hash_unsigned; + hinfo->seed = EXT4_SB(dir->i_sb)->s_hash_seed; + if (fname && fname_name(fname)) + ext4fs_dirhash(fname_name(fname), fname_len(fname), hinfo); + hash = hinfo->hash; + + if (root->info.unused_flags & 1) { + ext4_warning_inode(dir, "Unimplemented hash flags: %#06x", + root->info.unused_flags); + goto fail; + } + + indirect = root->info.indirect_levels; + if (indirect >= ext4_dir_htree_level(dir->i_sb)) { + ext4_warning(dir->i_sb, + "Directory (ino: %lu) htree depth %#06x exceed" + "supported value", dir->i_ino, + ext4_dir_htree_level(dir->i_sb)); + if (ext4_dir_htree_level(dir->i_sb) < EXT4_HTREE_LEVEL) { + ext4_warning(dir->i_sb, "Enable large directory " + "feature to access it"); + } + goto fail; + } + + entries = (struct dx_entry *)(((char *)&root->info) + + root->info.info_length); + + if (dx_get_limit(entries) != dx_root_limit(dir, + root->info.info_length)) { + ext4_warning_inode(dir, "dx entry: limit %u != root limit %u", + dx_get_limit(entries), + dx_root_limit(dir, root->info.info_length)); + goto fail; + } + + dxtrace(printk("Look up %x", hash)); + while (1) { + count = dx_get_count(entries); + if (!count || count > dx_get_limit(entries)) { + ext4_warning_inode(dir, + "dx entry: count %u beyond limit %u", + count, dx_get_limit(entries)); + goto fail; + } + + p = entries + 1; + q = entries + count - 1; + while (p <= q) { + m = p + (q - p) / 2; + dxtrace(printk(KERN_CONT ".")); + if (dx_get_hash(m) > hash) + q = m - 1; + else + p = m + 1; + } + + if (0) { // linear search cross check + unsigned n = count - 1; + at = entries; + while (n--) + { + dxtrace(printk(KERN_CONT ",")); + if (dx_get_hash(++at) > hash) + { + at--; + break; + } + } + assert (at == p - 1); + } + + at = p - 1; + dxtrace(printk(KERN_CONT " %x->%u\n", + at == entries ? 0 : dx_get_hash(at), + dx_get_block(at))); + frame->entries = entries; + frame->at = at; + if (!indirect--) + return frame; + frame++; + frame->bh = ext4_read_dirblock(dir, dx_get_block(at), INDEX); + if (IS_ERR(frame->bh)) { + ret_err = (struct dx_frame *) frame->bh; + frame->bh = NULL; + goto fail; + } + entries = ((struct dx_node *) frame->bh->b_data)->entries; + + if (dx_get_limit(entries) != dx_node_limit(dir)) { + ext4_warning_inode(dir, + "dx entry: limit %u != node limit %u", + dx_get_limit(entries), dx_node_limit(dir)); + goto fail; + } + } +fail: + while (frame >= frame_in) { + brelse(frame->bh); + frame--; + } + + if (ret_err == ERR_PTR(ERR_BAD_DX_DIR)) + ext4_warning_inode(dir, + "Corrupt directory, running e2fsck is recommended"); + return ret_err; +} + +static void dx_release(struct dx_frame *frames) +{ + struct dx_root_info *info; + int i; + unsigned int indirect_levels; + + if (frames[0].bh == NULL) + return; + + info = &((struct dx_root *)frames[0].bh->b_data)->info; + /* save local copy, "info" may be freed after brelse() */ + indirect_levels = info->indirect_levels; + for (i = 0; i <= indirect_levels; i++) { + if (frames[i].bh == NULL) + break; + brelse(frames[i].bh); + frames[i].bh = NULL; + } +} + +/* + * This function increments the frame pointer to search the next leaf + * block, and reads in the necessary intervening nodes if the search + * should be necessary. Whether or not the search is necessary is + * controlled by the hash parameter. If the hash value is even, then + * the search is only continued if the next block starts with that + * hash value. This is used if we are searching for a specific file. + * + * If the hash value is HASH_NB_ALWAYS, then always go to the next block. + * + * This function returns 1 if the caller should continue to search, + * or 0 if it should not. If there is an error reading one of the + * index blocks, it will a negative error code. + * + * If start_hash is non-null, it will be filled in with the starting + * hash of the next page. + */ +static int ext4_htree_next_block(struct inode *dir, __u32 hash, + struct dx_frame *frame, + struct dx_frame *frames, + __u32 *start_hash) +{ + struct dx_frame *p; + struct buffer_head *bh; + int num_frames = 0; + __u32 bhash; + + p = frame; + /* + * Find the next leaf page by incrementing the frame pointer. + * If we run out of entries in the interior node, loop around and + * increment pointer in the parent node. When we break out of + * this loop, num_frames indicates the number of interior + * nodes need to be read. + */ + while (1) { + if (++(p->at) < p->entries + dx_get_count(p->entries)) + break; + if (p == frames) + return 0; + num_frames++; + p--; + } + + /* + * If the hash is 1, then continue only if the next page has a + * continuation hash of any value. This is used for readdir + * handling. Otherwise, check to see if the hash matches the + * desired contiuation hash. If it doesn't, return since + * there's no point to read in the successive index pages. + */ + bhash = dx_get_hash(p->at); + if (start_hash) + *start_hash = bhash; + if ((hash & 1) == 0) { + if ((bhash & ~1) != hash) + return 0; + } + /* + * If the hash is HASH_NB_ALWAYS, we always go to the next + * block so no check is necessary + */ + while (num_frames--) { + bh = ext4_read_dirblock(dir, dx_get_block(p->at), INDEX); + if (IS_ERR(bh)) + return PTR_ERR(bh); + p++; + brelse(p->bh); + p->bh = bh; + p->at = p->entries = ((struct dx_node *) bh->b_data)->entries; + } + return 1; +} + + +/* + * This function fills a red-black tree with information from a + * directory block. It returns the number directory entries loaded + * into the tree. If there is an error it is returned in err. + */ +static int htree_dirblock_to_tree(struct file *dir_file, + struct inode *dir, ext4_lblk_t block, + struct dx_hash_info *hinfo, + __u32 start_hash, __u32 start_minor_hash) +{ + struct buffer_head *bh; + struct ext4_dir_entry_2 *de, *top; + int err = 0, count = 0; + struct fscrypt_str fname_crypto_str = FSTR_INIT(NULL, 0), tmp_str; + + dxtrace(printk(KERN_INFO "In htree dirblock_to_tree: block %lu\n", + (unsigned long)block)); + bh = ext4_read_dirblock(dir, block, DIRENT_HTREE); + if (IS_ERR(bh)) + return PTR_ERR(bh); + + de = (struct ext4_dir_entry_2 *) bh->b_data; + top = (struct ext4_dir_entry_2 *) ((char *) de + + dir->i_sb->s_blocksize - + EXT4_DIR_REC_LEN(0)); +#ifdef CONFIG_EXT4_FS_ENCRYPTION + /* Check if the directory is encrypted */ + if (ext4_encrypted_inode(dir)) { + err = fscrypt_get_encryption_info(dir); + if (err < 0) { + brelse(bh); + return err; + } + err = fscrypt_fname_alloc_buffer(dir, EXT4_NAME_LEN, + &fname_crypto_str); + if (err < 0) { + brelse(bh); + return err; + } + } +#endif + for (; de < top; de = ext4_next_entry(de, dir->i_sb->s_blocksize)) { + if (ext4_check_dir_entry(dir, NULL, de, bh, + bh->b_data, bh->b_size, + (block<i_sb)) + + ((char *)de - bh->b_data))) { + /* silently ignore the rest of the block */ + break; + } + ext4fs_dirhash(de->name, de->name_len, hinfo); + if ((hinfo->hash < start_hash) || + ((hinfo->hash == start_hash) && + (hinfo->minor_hash < start_minor_hash))) + continue; + if (de->inode == 0) + continue; + if (!ext4_encrypted_inode(dir)) { + tmp_str.name = de->name; + tmp_str.len = de->name_len; + err = ext4_htree_store_dirent(dir_file, + hinfo->hash, hinfo->minor_hash, de, + &tmp_str); + } else { + int save_len = fname_crypto_str.len; + struct fscrypt_str de_name = FSTR_INIT(de->name, + de->name_len); + + /* Directory is encrypted */ + err = fscrypt_fname_disk_to_usr(dir, hinfo->hash, + hinfo->minor_hash, &de_name, + &fname_crypto_str); + if (err) { + count = err; + goto errout; + } + err = ext4_htree_store_dirent(dir_file, + hinfo->hash, hinfo->minor_hash, de, + &fname_crypto_str); + fname_crypto_str.len = save_len; + } + if (err != 0) { + count = err; + goto errout; + } + count++; + } +errout: + brelse(bh); +#ifdef CONFIG_EXT4_FS_ENCRYPTION + fscrypt_fname_free_buffer(&fname_crypto_str); +#endif + return count; +} + + +/* + * This function fills a red-black tree with information from a + * directory. We start scanning the directory in hash order, starting + * at start_hash and start_minor_hash. + * + * This function returns the number of entries inserted into the tree, + * or a negative error code. + */ +int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash, + __u32 start_minor_hash, __u32 *next_hash) +{ + struct dx_hash_info hinfo; + struct ext4_dir_entry_2 *de; + struct dx_frame frames[EXT4_HTREE_LEVEL], *frame; + struct inode *dir; + ext4_lblk_t block; + int count = 0; + int ret, err; + __u32 hashval; + struct fscrypt_str tmp_str; + + dxtrace(printk(KERN_DEBUG "In htree_fill_tree, start hash: %x:%x\n", + start_hash, start_minor_hash)); + dir = file_inode(dir_file); + if (!(ext4_test_inode_flag(dir, EXT4_INODE_INDEX))) { + hinfo.hash_version = EXT4_SB(dir->i_sb)->s_def_hash_version; + if (hinfo.hash_version <= DX_HASH_TEA) + hinfo.hash_version += + EXT4_SB(dir->i_sb)->s_hash_unsigned; + hinfo.seed = EXT4_SB(dir->i_sb)->s_hash_seed; + if (ext4_has_inline_data(dir)) { + int has_inline_data = 1; + count = htree_inlinedir_to_tree(dir_file, dir, 0, + &hinfo, start_hash, + start_minor_hash, + &has_inline_data); + if (has_inline_data) { + *next_hash = ~0; + return count; + } + } + count = htree_dirblock_to_tree(dir_file, dir, 0, &hinfo, + start_hash, start_minor_hash); + *next_hash = ~0; + return count; + } + hinfo.hash = start_hash; + hinfo.minor_hash = 0; + frame = dx_probe(NULL, dir, &hinfo, frames); + if (IS_ERR(frame)) + return PTR_ERR(frame); + + /* Add '.' and '..' from the htree header */ + if (!start_hash && !start_minor_hash) { + de = (struct ext4_dir_entry_2 *) frames[0].bh->b_data; + tmp_str.name = de->name; + tmp_str.len = de->name_len; + err = ext4_htree_store_dirent(dir_file, 0, 0, + de, &tmp_str); + if (err != 0) + goto errout; + count++; + } + if (start_hash < 2 || (start_hash ==2 && start_minor_hash==0)) { + de = (struct ext4_dir_entry_2 *) frames[0].bh->b_data; + de = ext4_next_entry(de, dir->i_sb->s_blocksize); + tmp_str.name = de->name; + tmp_str.len = de->name_len; + err = ext4_htree_store_dirent(dir_file, 2, 0, + de, &tmp_str); + if (err != 0) + goto errout; + count++; + } + + while (1) { + if (fatal_signal_pending(current)) { + err = -ERESTARTSYS; + goto errout; + } + cond_resched(); + block = dx_get_block(frame->at); + ret = htree_dirblock_to_tree(dir_file, dir, block, &hinfo, + start_hash, start_minor_hash); + if (ret < 0) { + err = ret; + goto errout; + } + count += ret; + hashval = ~0; + ret = ext4_htree_next_block(dir, HASH_NB_ALWAYS, + frame, frames, &hashval); + *next_hash = hashval; + if (ret < 0) { + err = ret; + goto errout; + } + /* + * Stop if: (a) there are no more entries, or + * (b) we have inserted at least one entry and the + * next hash value is not a continuation + */ + if ((ret == 0) || + (count && ((hashval & 1) == 0))) + break; + } + dx_release(frames); + dxtrace(printk(KERN_DEBUG "Fill tree: returned %d entries, " + "next hash: %x\n", count, *next_hash)); + return count; +errout: + dx_release(frames); + return (err); +} + +static inline int search_dirblock(struct buffer_head *bh, + struct inode *dir, + struct ext4_filename *fname, + unsigned int offset, + struct ext4_dir_entry_2 **res_dir) +{ + return ext4_search_dir(bh, bh->b_data, dir->i_sb->s_blocksize, dir, + fname, offset, res_dir); +} + +/* + * Directory block splitting, compacting + */ + +/* + * Create map of hash values, offsets, and sizes, stored at end of block. + * Returns number of entries mapped. + */ +static int dx_make_map(struct inode *dir, struct ext4_dir_entry_2 *de, + unsigned blocksize, struct dx_hash_info *hinfo, + struct dx_map_entry *map_tail) +{ + int count = 0; + char *base = (char *) de; + struct dx_hash_info h = *hinfo; + + while ((char *) de < base + blocksize) { + if (de->name_len && de->inode) { + ext4fs_dirhash(de->name, de->name_len, &h); + map_tail--; + map_tail->hash = h.hash; + map_tail->offs = ((char *) de - base)>>2; + map_tail->size = le16_to_cpu(de->rec_len); + count++; + cond_resched(); + } + /* XXX: do we need to check rec_len == 0 case? -Chris */ + de = ext4_next_entry(de, blocksize); + } + return count; +} + +/* Sort map by hash value */ +static void dx_sort_map (struct dx_map_entry *map, unsigned count) +{ + struct dx_map_entry *p, *q, *top = map + count - 1; + int more; + /* Combsort until bubble sort doesn't suck */ + while (count > 2) { + count = count*10/13; + if (count - 9 < 2) /* 9, 10 -> 11 */ + count = 11; + for (p = top, q = p - count; q >= map; p--, q--) + if (p->hash < q->hash) + swap(*p, *q); + } + /* Garden variety bubble sort */ + do { + more = 0; + q = top; + while (q-- > map) { + if (q[1].hash >= q[0].hash) + continue; + swap(*(q+1), *q); + more = 1; + } + } while(more); +} + +static void dx_insert_block(struct dx_frame *frame, u32 hash, ext4_lblk_t block) +{ + struct dx_entry *entries = frame->entries; + struct dx_entry *old = frame->at, *new = old + 1; + int count = dx_get_count(entries); + + assert(count < dx_get_limit(entries)); + assert(old < entries + count); + memmove(new + 1, new, (char *)(entries + count) - (char *)(new)); + dx_set_hash(new, hash); + dx_set_block(new, block); + dx_set_count(entries, count + 1); +} + +/* + * Test whether a directory entry matches the filename being searched for. + * + * Return: %true if the directory entry matches, otherwise %false. + */ +static inline bool ext4_match(const struct ext4_filename *fname, + const struct ext4_dir_entry_2 *de) +{ + struct fscrypt_name f; + + if (!de->inode) + return false; + + f.usr_fname = fname->usr_fname; + f.disk_name = fname->disk_name; +#ifdef CONFIG_EXT4_FS_ENCRYPTION + f.crypto_buf = fname->crypto_buf; +#endif + return fscrypt_match_name(&f, de->name, de->name_len); +} + +/* + * Returns 0 if not found, -1 on failure, and 1 on success + */ +int ext4_search_dir(struct buffer_head *bh, char *search_buf, int buf_size, + struct inode *dir, struct ext4_filename *fname, + unsigned int offset, struct ext4_dir_entry_2 **res_dir) +{ + struct ext4_dir_entry_2 * de; + char * dlimit; + int de_len; + + de = (struct ext4_dir_entry_2 *)search_buf; + dlimit = search_buf + buf_size; + while ((char *) de < dlimit) { + /* this code is executed quadratically often */ + /* do minimal checking `by hand' */ + if ((char *) de + de->name_len <= dlimit && + ext4_match(fname, de)) { + /* found a match - just to be sure, do + * a full check */ + if (ext4_check_dir_entry(dir, NULL, de, bh, bh->b_data, + bh->b_size, offset)) + return -1; + *res_dir = de; + return 1; + } + /* prevent looping on a bad block */ + de_len = ext4_rec_len_from_disk(de->rec_len, + dir->i_sb->s_blocksize); + if (de_len <= 0) + return -1; + offset += de_len; + de = (struct ext4_dir_entry_2 *) ((char *) de + de_len); + } + return 0; +} + +static int is_dx_internal_node(struct inode *dir, ext4_lblk_t block, + struct ext4_dir_entry *de) +{ + struct super_block *sb = dir->i_sb; + + if (!is_dx(dir)) + return 0; + if (block == 0) + return 1; + if (de->inode == 0 && + ext4_rec_len_from_disk(de->rec_len, sb->s_blocksize) == + sb->s_blocksize) + return 1; + return 0; +} + +/* + * ext4_find_entry() + * + * finds an entry in the specified directory with the wanted name. It + * returns the cache buffer in which the entry was found, and the entry + * itself (as a parameter - res_dir). It does NOT read the inode of the + * entry - you'll have to do that yourself if you want to. + * + * The returned buffer_head has ->b_count elevated. The caller is expected + * to brelse() it when appropriate. + */ +static struct buffer_head * ext4_find_entry (struct inode *dir, + const struct qstr *d_name, + struct ext4_dir_entry_2 **res_dir, + int *inlined) +{ + struct super_block *sb; + struct buffer_head *bh_use[NAMEI_RA_SIZE]; + struct buffer_head *bh, *ret = NULL; + ext4_lblk_t start, block; + const u8 *name = d_name->name; + size_t ra_max = 0; /* Number of bh's in the readahead + buffer, bh_use[] */ + size_t ra_ptr = 0; /* Current index into readahead + buffer */ + ext4_lblk_t nblocks; + int i, namelen, retval; + struct ext4_filename fname; + + *res_dir = NULL; + sb = dir->i_sb; + namelen = d_name->len; + if (namelen > EXT4_NAME_LEN) + return NULL; + + retval = ext4_fname_setup_filename(dir, d_name, 1, &fname); + if (retval == -ENOENT) + return NULL; + if (retval) + return ERR_PTR(retval); + + if (ext4_has_inline_data(dir)) { + int has_inline_data = 1; + ret = ext4_find_inline_entry(dir, &fname, res_dir, + &has_inline_data); + if (has_inline_data) { + if (inlined) + *inlined = 1; + goto cleanup_and_exit; + } + } + + if ((namelen <= 2) && (name[0] == '.') && + (name[1] == '.' || name[1] == '\0')) { + /* + * "." or ".." will only be in the first block + * NFS may look up ".."; "." should be handled by the VFS + */ + block = start = 0; + nblocks = 1; + goto restart; + } + if (is_dx(dir)) { + ret = ext4_dx_find_entry(dir, &fname, res_dir); + /* + * On success, or if the error was file not found, + * return. Otherwise, fall back to doing a search the + * old fashioned way. + */ + if (!IS_ERR(ret) || PTR_ERR(ret) != ERR_BAD_DX_DIR) + goto cleanup_and_exit; + dxtrace(printk(KERN_DEBUG "ext4_find_entry: dx failed, " + "falling back\n")); + ret = NULL; + } + nblocks = dir->i_size >> EXT4_BLOCK_SIZE_BITS(sb); + if (!nblocks) { + ret = NULL; + goto cleanup_and_exit; + } + start = EXT4_I(dir)->i_dir_start_lookup; + if (start >= nblocks) + start = 0; + block = start; +restart: + do { + /* + * We deal with the read-ahead logic here. + */ + if (ra_ptr >= ra_max) { + /* Refill the readahead buffer */ + ra_ptr = 0; + if (block < start) + ra_max = start - block; + else + ra_max = nblocks - block; + ra_max = min(ra_max, ARRAY_SIZE(bh_use)); + retval = ext4_bread_batch(dir, block, ra_max, + false /* wait */, bh_use); + if (retval) { + ret = ERR_PTR(retval); + ra_max = 0; + goto cleanup_and_exit; + } + } + if ((bh = bh_use[ra_ptr++]) == NULL) + goto next; + wait_on_buffer(bh); + if (!buffer_uptodate(bh)) { + EXT4_ERROR_INODE(dir, "reading directory lblock %lu", + (unsigned long) block); + brelse(bh); + ret = ERR_PTR(-EIO); + goto cleanup_and_exit; + } + if (!buffer_verified(bh) && + !is_dx_internal_node(dir, block, + (struct ext4_dir_entry *)bh->b_data) && + !ext4_dirent_csum_verify(dir, + (struct ext4_dir_entry *)bh->b_data)) { + EXT4_ERROR_INODE(dir, "checksumming directory " + "block %lu", (unsigned long)block); + brelse(bh); + ret = ERR_PTR(-EFSBADCRC); + goto cleanup_and_exit; + } + set_buffer_verified(bh); + i = search_dirblock(bh, dir, &fname, + block << EXT4_BLOCK_SIZE_BITS(sb), res_dir); + if (i == 1) { + EXT4_I(dir)->i_dir_start_lookup = block; + ret = bh; + goto cleanup_and_exit; + } else { + brelse(bh); + if (i < 0) + goto cleanup_and_exit; + } + next: + if (++block >= nblocks) + block = 0; + } while (block != start); + + /* + * If the directory has grown while we were searching, then + * search the last part of the directory before giving up. + */ + block = nblocks; + nblocks = dir->i_size >> EXT4_BLOCK_SIZE_BITS(sb); + if (block < nblocks) { + start = 0; + goto restart; + } + +cleanup_and_exit: + /* Clean up the read-ahead blocks */ + for (; ra_ptr < ra_max; ra_ptr++) + brelse(bh_use[ra_ptr]); + ext4_fname_free_filename(&fname); + return ret; +} + +static struct buffer_head * ext4_dx_find_entry(struct inode *dir, + struct ext4_filename *fname, + struct ext4_dir_entry_2 **res_dir) +{ + struct super_block * sb = dir->i_sb; + struct dx_frame frames[EXT4_HTREE_LEVEL], *frame; + struct buffer_head *bh; + ext4_lblk_t block; + int retval; + +#ifdef CONFIG_EXT4_FS_ENCRYPTION + *res_dir = NULL; +#endif + frame = dx_probe(fname, dir, NULL, frames); + if (IS_ERR(frame)) + return (struct buffer_head *) frame; + do { + block = dx_get_block(frame->at); + bh = ext4_read_dirblock(dir, block, DIRENT_HTREE); + if (IS_ERR(bh)) + goto errout; + + retval = search_dirblock(bh, dir, fname, + block << EXT4_BLOCK_SIZE_BITS(sb), + res_dir); + if (retval == 1) + goto success; + brelse(bh); + if (retval == -1) { + bh = ERR_PTR(ERR_BAD_DX_DIR); + goto errout; + } + + /* Check to see if we should continue to search */ + retval = ext4_htree_next_block(dir, fname->hinfo.hash, frame, + frames, NULL); + if (retval < 0) { + ext4_warning_inode(dir, + "error %d reading directory index block", + retval); + bh = ERR_PTR(retval); + goto errout; + } + } while (retval == 1); + + bh = NULL; +errout: + dxtrace(printk(KERN_DEBUG "%s not found\n", fname->usr_fname->name)); +success: + dx_release(frames); + return bh; +} + +static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) +{ + struct inode *inode; + struct ext4_dir_entry_2 *de; + struct buffer_head *bh; + int err; + + err = fscrypt_prepare_lookup(dir, dentry, flags); + if (err) + return ERR_PTR(err); + + if (dentry->d_name.len > EXT4_NAME_LEN) + return ERR_PTR(-ENAMETOOLONG); + + bh = ext4_find_entry(dir, &dentry->d_name, &de, NULL); + if (IS_ERR(bh)) + return (struct dentry *) bh; + inode = NULL; + if (bh) { + __u32 ino = le32_to_cpu(de->inode); + brelse(bh); + if (!ext4_valid_inum(dir->i_sb, ino)) { + EXT4_ERROR_INODE(dir, "bad inode number: %u", ino); + return ERR_PTR(-EFSCORRUPTED); + } + if (unlikely(ino == dir->i_ino)) { + EXT4_ERROR_INODE(dir, "'%pd' linked to parent dir", + dentry); + return ERR_PTR(-EFSCORRUPTED); + } + inode = ext4_iget(dir->i_sb, ino, EXT4_IGET_NORMAL); + if (inode == ERR_PTR(-ESTALE)) { + EXT4_ERROR_INODE(dir, + "deleted inode referenced: %u", + ino); + return ERR_PTR(-EFSCORRUPTED); + } + if (!IS_ERR(inode) && ext4_encrypted_inode(dir) && + (S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) && + !fscrypt_has_permitted_context(dir, inode)) { + ext4_warning(inode->i_sb, + "Inconsistent encryption contexts: %lu/%lu", + dir->i_ino, inode->i_ino); + iput(inode); + return ERR_PTR(-EPERM); + } + } + return d_splice_alias(inode, dentry); +} + + +struct dentry *ext4_get_parent(struct dentry *child) +{ + __u32 ino; + static const struct qstr dotdot = QSTR_INIT("..", 2); + struct ext4_dir_entry_2 * de; + struct buffer_head *bh; + + bh = ext4_find_entry(d_inode(child), &dotdot, &de, NULL); + if (IS_ERR(bh)) + return (struct dentry *) bh; + if (!bh) + return ERR_PTR(-ENOENT); + ino = le32_to_cpu(de->inode); + brelse(bh); + + if (!ext4_valid_inum(child->d_sb, ino)) { + EXT4_ERROR_INODE(d_inode(child), + "bad parent inode number: %u", ino); + return ERR_PTR(-EFSCORRUPTED); + } + + return d_obtain_alias(ext4_iget(child->d_sb, ino, EXT4_IGET_NORMAL)); +} + +/* + * Move count entries from end of map between two memory locations. + * Returns pointer to last entry moved. + */ +static struct ext4_dir_entry_2 * +dx_move_dirents(char *from, char *to, struct dx_map_entry *map, int count, + unsigned blocksize) +{ + unsigned rec_len = 0; + + while (count--) { + struct ext4_dir_entry_2 *de = (struct ext4_dir_entry_2 *) + (from + (map->offs<<2)); + rec_len = EXT4_DIR_REC_LEN(de->name_len); + memcpy (to, de, rec_len); + ((struct ext4_dir_entry_2 *) to)->rec_len = + ext4_rec_len_to_disk(rec_len, blocksize); + de->inode = 0; + map++; + to += rec_len; + } + return (struct ext4_dir_entry_2 *) (to - rec_len); +} + +/* + * Compact each dir entry in the range to the minimal rec_len. + * Returns pointer to last entry in range. + */ +static struct ext4_dir_entry_2* dx_pack_dirents(char *base, unsigned blocksize) +{ + struct ext4_dir_entry_2 *next, *to, *prev, *de = (struct ext4_dir_entry_2 *) base; + unsigned rec_len = 0; + + prev = to = de; + while ((char*)de < base + blocksize) { + next = ext4_next_entry(de, blocksize); + if (de->inode && de->name_len) { + rec_len = EXT4_DIR_REC_LEN(de->name_len); + if (de > to) + memmove(to, de, rec_len); + to->rec_len = ext4_rec_len_to_disk(rec_len, blocksize); + prev = to; + to = (struct ext4_dir_entry_2 *) (((char *) to) + rec_len); + } + de = next; + } + return prev; +} + +/* + * Split a full leaf block to make room for a new dir entry. + * Allocate a new block, and move entries so that they are approx. equally full. + * Returns pointer to de in block into which the new entry will be inserted. + */ +static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, + struct buffer_head **bh,struct dx_frame *frame, + struct dx_hash_info *hinfo) +{ + unsigned blocksize = dir->i_sb->s_blocksize; + unsigned count, continued; + struct buffer_head *bh2; + ext4_lblk_t newblock; + u32 hash2; + struct dx_map_entry *map; + char *data1 = (*bh)->b_data, *data2; + unsigned split, move, size; + struct ext4_dir_entry_2 *de = NULL, *de2; + struct ext4_dir_entry_tail *t; + int csum_size = 0; + int err = 0, i; + + if (ext4_has_metadata_csum(dir->i_sb)) + csum_size = sizeof(struct ext4_dir_entry_tail); + + bh2 = ext4_append(handle, dir, &newblock); + if (IS_ERR(bh2)) { + brelse(*bh); + *bh = NULL; + return (struct ext4_dir_entry_2 *) bh2; + } + + BUFFER_TRACE(*bh, "get_write_access"); + err = ext4_journal_get_write_access(handle, *bh); + if (err) + goto journal_error; + + BUFFER_TRACE(frame->bh, "get_write_access"); + err = ext4_journal_get_write_access(handle, frame->bh); + if (err) + goto journal_error; + + data2 = bh2->b_data; + + /* create map in the end of data2 block */ + map = (struct dx_map_entry *) (data2 + blocksize); + count = dx_make_map(dir, (struct ext4_dir_entry_2 *) data1, + blocksize, hinfo, map); + map -= count; + dx_sort_map(map, count); + /* Split the existing block in the middle, size-wise */ + size = 0; + move = 0; + for (i = count-1; i >= 0; i--) { + /* is more than half of this entry in 2nd half of the block? */ + if (size + map[i].size/2 > blocksize/2) + break; + size += map[i].size; + move++; + } + /* map index at which we will split */ + split = count - move; + hash2 = map[split].hash; + continued = hash2 == map[split - 1].hash; + dxtrace(printk(KERN_INFO "Split block %lu at %x, %i/%i\n", + (unsigned long)dx_get_block(frame->at), + hash2, split, count-split)); + + /* Fancy dance to stay within two buffers */ + de2 = dx_move_dirents(data1, data2, map + split, count - split, + blocksize); + de = dx_pack_dirents(data1, blocksize); + de->rec_len = ext4_rec_len_to_disk(data1 + (blocksize - csum_size) - + (char *) de, + blocksize); + de2->rec_len = ext4_rec_len_to_disk(data2 + (blocksize - csum_size) - + (char *) de2, + blocksize); + if (csum_size) { + t = EXT4_DIRENT_TAIL(data2, blocksize); + initialize_dirent_tail(t, blocksize); + + t = EXT4_DIRENT_TAIL(data1, blocksize); + initialize_dirent_tail(t, blocksize); + } + + dxtrace(dx_show_leaf(dir, hinfo, (struct ext4_dir_entry_2 *) data1, + blocksize, 1)); + dxtrace(dx_show_leaf(dir, hinfo, (struct ext4_dir_entry_2 *) data2, + blocksize, 1)); + + /* Which block gets the new entry? */ + if (hinfo->hash >= hash2) { + swap(*bh, bh2); + de = de2; + } + dx_insert_block(frame, hash2 + continued, newblock); + err = ext4_handle_dirty_dirent_node(handle, dir, bh2); + if (err) + goto journal_error; + err = ext4_handle_dirty_dx_node(handle, dir, frame->bh); + if (err) + goto journal_error; + brelse(bh2); + dxtrace(dx_show_index("frame", frame->entries)); + return de; + +journal_error: + brelse(*bh); + brelse(bh2); + *bh = NULL; + ext4_std_error(dir->i_sb, err); + return ERR_PTR(err); +} + +int ext4_find_dest_de(struct inode *dir, struct inode *inode, + struct buffer_head *bh, + void *buf, int buf_size, + struct ext4_filename *fname, + struct ext4_dir_entry_2 **dest_de) +{ + struct ext4_dir_entry_2 *de; + unsigned short reclen = EXT4_DIR_REC_LEN(fname_len(fname)); + int nlen, rlen; + unsigned int offset = 0; + char *top; + + de = (struct ext4_dir_entry_2 *)buf; + top = buf + buf_size - reclen; + while ((char *) de <= top) { + if (ext4_check_dir_entry(dir, NULL, de, bh, + buf, buf_size, offset)) + return -EFSCORRUPTED; + if (ext4_match(fname, de)) + return -EEXIST; + nlen = EXT4_DIR_REC_LEN(de->name_len); + rlen = ext4_rec_len_from_disk(de->rec_len, buf_size); + if ((de->inode ? rlen - nlen : rlen) >= reclen) + break; + de = (struct ext4_dir_entry_2 *)((char *)de + rlen); + offset += rlen; + } + if ((char *) de > top) + return -ENOSPC; + + *dest_de = de; + return 0; +} + +void ext4_insert_dentry(struct inode *inode, + struct ext4_dir_entry_2 *de, + int buf_size, + struct ext4_filename *fname) +{ + + int nlen, rlen; + + nlen = EXT4_DIR_REC_LEN(de->name_len); + rlen = ext4_rec_len_from_disk(de->rec_len, buf_size); + if (de->inode) { + struct ext4_dir_entry_2 *de1 = + (struct ext4_dir_entry_2 *)((char *)de + nlen); + de1->rec_len = ext4_rec_len_to_disk(rlen - nlen, buf_size); + de->rec_len = ext4_rec_len_to_disk(nlen, buf_size); + de = de1; + } + de->file_type = EXT4_FT_UNKNOWN; + de->inode = cpu_to_le32(inode->i_ino); + ext4_set_de_type(inode->i_sb, de, inode->i_mode); + de->name_len = fname_len(fname); + memcpy(de->name, fname_name(fname), fname_len(fname)); +} + +/* + * Add a new entry into a directory (leaf) block. If de is non-NULL, + * it points to a directory entry which is guaranteed to be large + * enough for new directory entry. If de is NULL, then + * add_dirent_to_buf will attempt search the directory block for + * space. It will return -ENOSPC if no space is available, and -EIO + * and -EEXIST if directory entry already exists. + */ +static int add_dirent_to_buf(handle_t *handle, struct ext4_filename *fname, + struct inode *dir, + struct inode *inode, struct ext4_dir_entry_2 *de, + struct buffer_head *bh) +{ + unsigned int blocksize = dir->i_sb->s_blocksize; + int csum_size = 0; + int err; + + if (ext4_has_metadata_csum(inode->i_sb)) + csum_size = sizeof(struct ext4_dir_entry_tail); + + if (!de) { + err = ext4_find_dest_de(dir, inode, bh, bh->b_data, + blocksize - csum_size, fname, &de); + if (err) + return err; + } + BUFFER_TRACE(bh, "get_write_access"); + err = ext4_journal_get_write_access(handle, bh); + if (err) { + ext4_std_error(dir->i_sb, err); + return err; + } + + /* By now the buffer is marked for journaling */ + ext4_insert_dentry(inode, de, blocksize, fname); + + /* + * XXX shouldn't update any times until successful + * completion of syscall, but too many callers depend + * on this. + * + * XXX similarly, too many callers depend on + * ext4_new_inode() setting the times, but error + * recovery deletes the inode, so the worst that can + * happen is that the times are slightly out of date + * and/or different from the directory change time. + */ + dir->i_mtime = dir->i_ctime = current_time(dir); + ext4_update_dx_flag(dir); + inode_inc_iversion(dir); + ext4_mark_inode_dirty(handle, dir); + BUFFER_TRACE(bh, "call ext4_handle_dirty_metadata"); + err = ext4_handle_dirty_dirent_node(handle, dir, bh); + if (err) + ext4_std_error(dir->i_sb, err); + return 0; +} + +/* + * This converts a one block unindexed directory to a 3 block indexed + * directory, and adds the dentry to the indexed directory. + */ +static int make_indexed_dir(handle_t *handle, struct ext4_filename *fname, + struct inode *dir, + struct inode *inode, struct buffer_head *bh) +{ + struct buffer_head *bh2; + struct dx_root *root; + struct dx_frame frames[EXT4_HTREE_LEVEL], *frame; + struct dx_entry *entries; + struct ext4_dir_entry_2 *de, *de2; + struct ext4_dir_entry_tail *t; + char *data1, *top; + unsigned len; + int retval; + unsigned blocksize; + ext4_lblk_t block; + struct fake_dirent *fde; + int csum_size = 0; + + if (ext4_has_metadata_csum(inode->i_sb)) + csum_size = sizeof(struct ext4_dir_entry_tail); + + blocksize = dir->i_sb->s_blocksize; + dxtrace(printk(KERN_DEBUG "Creating index: inode %lu\n", dir->i_ino)); + BUFFER_TRACE(bh, "get_write_access"); + retval = ext4_journal_get_write_access(handle, bh); + if (retval) { + ext4_std_error(dir->i_sb, retval); + brelse(bh); + return retval; + } + root = (struct dx_root *) bh->b_data; + + /* The 0th block becomes the root, move the dirents out */ + fde = &root->dotdot; + de = (struct ext4_dir_entry_2 *)((char *)fde + + ext4_rec_len_from_disk(fde->rec_len, blocksize)); + if ((char *) de >= (((char *) root) + blocksize)) { + EXT4_ERROR_INODE(dir, "invalid rec_len for '..'"); + brelse(bh); + return -EFSCORRUPTED; + } + len = ((char *) root) + (blocksize - csum_size) - (char *) de; + + /* Allocate new block for the 0th block's dirents */ + bh2 = ext4_append(handle, dir, &block); + if (IS_ERR(bh2)) { + brelse(bh); + return PTR_ERR(bh2); + } + ext4_set_inode_flag(dir, EXT4_INODE_INDEX); + data1 = bh2->b_data; + + memcpy (data1, de, len); + de = (struct ext4_dir_entry_2 *) data1; + top = data1 + len; + while ((char *)(de2 = ext4_next_entry(de, blocksize)) < top) + de = de2; + de->rec_len = ext4_rec_len_to_disk(data1 + (blocksize - csum_size) - + (char *) de, + blocksize); + + if (csum_size) { + t = EXT4_DIRENT_TAIL(data1, blocksize); + initialize_dirent_tail(t, blocksize); + } + + /* Initialize the root; the dot dirents already exist */ + de = (struct ext4_dir_entry_2 *) (&root->dotdot); + de->rec_len = ext4_rec_len_to_disk(blocksize - EXT4_DIR_REC_LEN(2), + blocksize); + memset (&root->info, 0, sizeof(root->info)); + root->info.info_length = sizeof(root->info); + root->info.hash_version = EXT4_SB(dir->i_sb)->s_def_hash_version; + entries = root->entries; + dx_set_block(entries, 1); + dx_set_count(entries, 1); + dx_set_limit(entries, dx_root_limit(dir, sizeof(root->info))); + + /* Initialize as for dx_probe */ + fname->hinfo.hash_version = root->info.hash_version; + if (fname->hinfo.hash_version <= DX_HASH_TEA) + fname->hinfo.hash_version += EXT4_SB(dir->i_sb)->s_hash_unsigned; + fname->hinfo.seed = EXT4_SB(dir->i_sb)->s_hash_seed; + ext4fs_dirhash(fname_name(fname), fname_len(fname), &fname->hinfo); + + memset(frames, 0, sizeof(frames)); + frame = frames; + frame->entries = entries; + frame->at = entries; + frame->bh = bh; + + retval = ext4_handle_dirty_dx_node(handle, dir, frame->bh); + if (retval) + goto out_frames; + retval = ext4_handle_dirty_dirent_node(handle, dir, bh2); + if (retval) + goto out_frames; + + de = do_split(handle,dir, &bh2, frame, &fname->hinfo); + if (IS_ERR(de)) { + retval = PTR_ERR(de); + goto out_frames; + } + + retval = add_dirent_to_buf(handle, fname, dir, inode, de, bh2); +out_frames: + /* + * Even if the block split failed, we have to properly write + * out all the changes we did so far. Otherwise we can end up + * with corrupted filesystem. + */ + if (retval) + ext4_mark_inode_dirty(handle, dir); + dx_release(frames); + brelse(bh2); + return retval; +} + +/* + * ext4_add_entry() + * + * adds a file entry to the specified directory, using the same + * semantics as ext4_find_entry(). It returns NULL if it failed. + * + * NOTE!! The inode part of 'de' is left at 0 - which means you + * may not sleep between calling this and putting something into + * the entry, as someone else might have used it while you slept. + */ +static int ext4_add_entry(handle_t *handle, struct dentry *dentry, + struct inode *inode) +{ + struct inode *dir = d_inode(dentry->d_parent); + struct buffer_head *bh = NULL; + struct ext4_dir_entry_2 *de; + struct ext4_dir_entry_tail *t; + struct super_block *sb; + struct ext4_filename fname; + int retval; + int dx_fallback=0; + unsigned blocksize; + ext4_lblk_t block, blocks; + int csum_size = 0; + + if (ext4_has_metadata_csum(inode->i_sb)) + csum_size = sizeof(struct ext4_dir_entry_tail); + + sb = dir->i_sb; + blocksize = sb->s_blocksize; + if (!dentry->d_name.len) + return -EINVAL; + + retval = ext4_fname_setup_filename(dir, &dentry->d_name, 0, &fname); + if (retval) + return retval; + + if (ext4_has_inline_data(dir)) { + retval = ext4_try_add_inline_entry(handle, &fname, dir, inode); + if (retval < 0) + goto out; + if (retval == 1) { + retval = 0; + goto out; + } + } + + if (is_dx(dir)) { + retval = ext4_dx_add_entry(handle, &fname, dir, inode); + if (!retval || (retval != ERR_BAD_DX_DIR)) + goto out; + ext4_clear_inode_flag(dir, EXT4_INODE_INDEX); + dx_fallback++; + ext4_mark_inode_dirty(handle, dir); + } + blocks = dir->i_size >> sb->s_blocksize_bits; + for (block = 0; block < blocks; block++) { + bh = ext4_read_dirblock(dir, block, DIRENT); + if (bh == NULL) { + bh = ext4_bread(handle, dir, block, + EXT4_GET_BLOCKS_CREATE); + goto add_to_new_block; + } + if (IS_ERR(bh)) { + retval = PTR_ERR(bh); + bh = NULL; + goto out; + } + retval = add_dirent_to_buf(handle, &fname, dir, inode, + NULL, bh); + if (retval != -ENOSPC) + goto out; + + if (blocks == 1 && !dx_fallback && + ext4_has_feature_dir_index(sb)) { + retval = make_indexed_dir(handle, &fname, dir, + inode, bh); + bh = NULL; /* make_indexed_dir releases bh */ + goto out; + } + brelse(bh); + } + bh = ext4_append(handle, dir, &block); +add_to_new_block: + if (IS_ERR(bh)) { + retval = PTR_ERR(bh); + bh = NULL; + goto out; + } + de = (struct ext4_dir_entry_2 *) bh->b_data; + de->inode = 0; + de->rec_len = ext4_rec_len_to_disk(blocksize - csum_size, blocksize); + + if (csum_size) { + t = EXT4_DIRENT_TAIL(bh->b_data, blocksize); + initialize_dirent_tail(t, blocksize); + } + + retval = add_dirent_to_buf(handle, &fname, dir, inode, de, bh); +out: + ext4_fname_free_filename(&fname); + brelse(bh); + if (retval == 0) + ext4_set_inode_state(inode, EXT4_STATE_NEWENTRY); + return retval; +} + +/* + * Returns 0 for success, or a negative error value + */ +static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname, + struct inode *dir, struct inode *inode) +{ + struct dx_frame frames[EXT4_HTREE_LEVEL], *frame; + struct dx_entry *entries, *at; + struct buffer_head *bh; + struct super_block *sb = dir->i_sb; + struct ext4_dir_entry_2 *de; + int restart; + int err; + +again: + restart = 0; + frame = dx_probe(fname, dir, NULL, frames); + if (IS_ERR(frame)) + return PTR_ERR(frame); + entries = frame->entries; + at = frame->at; + bh = ext4_read_dirblock(dir, dx_get_block(frame->at), DIRENT_HTREE); + if (IS_ERR(bh)) { + err = PTR_ERR(bh); + bh = NULL; + goto cleanup; + } + + BUFFER_TRACE(bh, "get_write_access"); + err = ext4_journal_get_write_access(handle, bh); + if (err) + goto journal_error; + + err = add_dirent_to_buf(handle, fname, dir, inode, NULL, bh); + if (err != -ENOSPC) + goto cleanup; + + err = 0; + /* Block full, should compress but for now just split */ + dxtrace(printk(KERN_DEBUG "using %u of %u node entries\n", + dx_get_count(entries), dx_get_limit(entries))); + /* Need to split index? */ + if (dx_get_count(entries) == dx_get_limit(entries)) { + ext4_lblk_t newblock; + int levels = frame - frames + 1; + unsigned int icount; + int add_level = 1; + struct dx_entry *entries2; + struct dx_node *node2; + struct buffer_head *bh2; + + while (frame > frames) { + if (dx_get_count((frame - 1)->entries) < + dx_get_limit((frame - 1)->entries)) { + add_level = 0; + break; + } + frame--; /* split higher index block */ + at = frame->at; + entries = frame->entries; + restart = 1; + } + if (add_level && levels == ext4_dir_htree_level(sb)) { + ext4_warning(sb, "Directory (ino: %lu) index full, " + "reach max htree level :%d", + dir->i_ino, levels); + if (ext4_dir_htree_level(sb) < EXT4_HTREE_LEVEL) { + ext4_warning(sb, "Large directory feature is " + "not enabled on this " + "filesystem"); + } + err = -ENOSPC; + goto cleanup; + } + icount = dx_get_count(entries); + bh2 = ext4_append(handle, dir, &newblock); + if (IS_ERR(bh2)) { + err = PTR_ERR(bh2); + goto cleanup; + } + node2 = (struct dx_node *)(bh2->b_data); + entries2 = node2->entries; + memset(&node2->fake, 0, sizeof(struct fake_dirent)); + node2->fake.rec_len = ext4_rec_len_to_disk(sb->s_blocksize, + sb->s_blocksize); + BUFFER_TRACE(frame->bh, "get_write_access"); + err = ext4_journal_get_write_access(handle, frame->bh); + if (err) + goto journal_error; + if (!add_level) { + unsigned icount1 = icount/2, icount2 = icount - icount1; + unsigned hash2 = dx_get_hash(entries + icount1); + dxtrace(printk(KERN_DEBUG "Split index %i/%i\n", + icount1, icount2)); + + BUFFER_TRACE(frame->bh, "get_write_access"); /* index root */ + err = ext4_journal_get_write_access(handle, + (frame - 1)->bh); + if (err) + goto journal_error; + + memcpy((char *) entries2, (char *) (entries + icount1), + icount2 * sizeof(struct dx_entry)); + dx_set_count(entries, icount1); + dx_set_count(entries2, icount2); + dx_set_limit(entries2, dx_node_limit(dir)); + + /* Which index block gets the new entry? */ + if (at - entries >= icount1) { + frame->at = at = at - entries - icount1 + entries2; + frame->entries = entries = entries2; + swap(frame->bh, bh2); + } + dx_insert_block((frame - 1), hash2, newblock); + dxtrace(dx_show_index("node", frame->entries)); + dxtrace(dx_show_index("node", + ((struct dx_node *) bh2->b_data)->entries)); + err = ext4_handle_dirty_dx_node(handle, dir, bh2); + if (err) + goto journal_error; + brelse (bh2); + err = ext4_handle_dirty_dx_node(handle, dir, + (frame - 1)->bh); + if (err) + goto journal_error; + if (restart) { + err = ext4_handle_dirty_dx_node(handle, dir, + frame->bh); + goto journal_error; + } + } else { + struct dx_root *dxroot; + memcpy((char *) entries2, (char *) entries, + icount * sizeof(struct dx_entry)); + dx_set_limit(entries2, dx_node_limit(dir)); + + /* Set up root */ + dx_set_count(entries, 1); + dx_set_block(entries + 0, newblock); + dxroot = (struct dx_root *)frames[0].bh->b_data; + dxroot->info.indirect_levels += 1; + dxtrace(printk(KERN_DEBUG + "Creating %d level index...\n", + info->indirect_levels)); + err = ext4_handle_dirty_dx_node(handle, dir, frame->bh); + if (err) + goto journal_error; + err = ext4_handle_dirty_dx_node(handle, dir, bh2); + brelse(bh2); + restart = 1; + goto journal_error; + } + } + de = do_split(handle, dir, &bh, frame, &fname->hinfo); + if (IS_ERR(de)) { + err = PTR_ERR(de); + goto cleanup; + } + err = add_dirent_to_buf(handle, fname, dir, inode, de, bh); + goto cleanup; + +journal_error: + ext4_std_error(dir->i_sb, err); /* this is a no-op if err == 0 */ +cleanup: + brelse(bh); + dx_release(frames); + /* @restart is true means htree-path has been changed, we need to + * repeat dx_probe() to find out valid htree-path + */ + if (restart && err == 0) + goto again; + return err; +} + +/* + * ext4_generic_delete_entry deletes a directory entry by merging it + * with the previous entry + */ +int ext4_generic_delete_entry(handle_t *handle, + struct inode *dir, + struct ext4_dir_entry_2 *de_del, + struct buffer_head *bh, + void *entry_buf, + int buf_size, + int csum_size) +{ + struct ext4_dir_entry_2 *de, *pde; + unsigned int blocksize = dir->i_sb->s_blocksize; + int i; + + i = 0; + pde = NULL; + de = (struct ext4_dir_entry_2 *)entry_buf; + while (i < buf_size - csum_size) { + if (ext4_check_dir_entry(dir, NULL, de, bh, + bh->b_data, bh->b_size, i)) + return -EFSCORRUPTED; + if (de == de_del) { + if (pde) + pde->rec_len = ext4_rec_len_to_disk( + ext4_rec_len_from_disk(pde->rec_len, + blocksize) + + ext4_rec_len_from_disk(de->rec_len, + blocksize), + blocksize); + else + de->inode = 0; + inode_inc_iversion(dir); + return 0; + } + i += ext4_rec_len_from_disk(de->rec_len, blocksize); + pde = de; + de = ext4_next_entry(de, blocksize); + } + return -ENOENT; +} + +static int ext4_delete_entry(handle_t *handle, + struct inode *dir, + struct ext4_dir_entry_2 *de_del, + struct buffer_head *bh) +{ + int err, csum_size = 0; + + if (ext4_has_inline_data(dir)) { + int has_inline_data = 1; + err = ext4_delete_inline_entry(handle, dir, de_del, bh, + &has_inline_data); + if (has_inline_data) + return err; + } + + if (ext4_has_metadata_csum(dir->i_sb)) + csum_size = sizeof(struct ext4_dir_entry_tail); + + BUFFER_TRACE(bh, "get_write_access"); + err = ext4_journal_get_write_access(handle, bh); + if (unlikely(err)) + goto out; + + err = ext4_generic_delete_entry(handle, dir, de_del, + bh, bh->b_data, + dir->i_sb->s_blocksize, csum_size); + if (err) + goto out; + + BUFFER_TRACE(bh, "call ext4_handle_dirty_metadata"); + err = ext4_handle_dirty_dirent_node(handle, dir, bh); + if (unlikely(err)) + goto out; + + return 0; +out: + if (err != -ENOENT) + ext4_std_error(dir->i_sb, err); + return err; +} + +/* + * Set directory link count to 1 if nlinks > EXT4_LINK_MAX, or if nlinks == 2 + * since this indicates that nlinks count was previously 1 to avoid overflowing + * the 16-bit i_links_count field on disk. Directories with i_nlink == 1 mean + * that subdirectory link counts are not being maintained accurately. + * + * The caller has already checked for i_nlink overflow in case the DIR_LINK + * feature is not enabled and returned -EMLINK. The is_dx() check is a proxy + * for checking S_ISDIR(inode) (since the INODE_INDEX feature will not be set + * on regular files) and to avoid creating huge/slow non-HTREE directories. + */ +static void ext4_inc_count(handle_t *handle, struct inode *inode) +{ + inc_nlink(inode); + if (is_dx(inode) && + (inode->i_nlink > EXT4_LINK_MAX || inode->i_nlink == 2)) + set_nlink(inode, 1); +} + +/* + * If a directory had nlink == 1, then we should let it be 1. This indicates + * directory has >EXT4_LINK_MAX subdirs. + */ +static void ext4_dec_count(handle_t *handle, struct inode *inode) +{ + if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2) + drop_nlink(inode); +} + + +static int ext4_add_nondir(handle_t *handle, + struct dentry *dentry, struct inode *inode) +{ + int err = ext4_add_entry(handle, dentry, inode); + if (!err) { + ext4_mark_inode_dirty(handle, inode); + d_instantiate_new(dentry, inode); + return 0; + } + drop_nlink(inode); + unlock_new_inode(inode); + iput(inode); + return err; +} + +/* + * By the time this is called, we already have created + * the directory cache entry for the new file, but it + * is so far negative - it has no inode. + * + * If the create succeeds, we fill in the inode information + * with d_instantiate(). + */ +static int ext4_create(struct inode *dir, struct dentry *dentry, umode_t mode, + bool excl) +{ + handle_t *handle; + struct inode *inode; + int err, credits, retries = 0; + + err = dquot_initialize(dir); + if (err) + return err; + + credits = (EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + + EXT4_INDEX_EXTRA_TRANS_BLOCKS + 3); +retry: + inode = ext4_new_inode_start_handle(dir, mode, &dentry->d_name, 0, + NULL, EXT4_HT_DIR, credits); + handle = ext4_journal_current_handle(); + err = PTR_ERR(inode); + if (!IS_ERR(inode)) { + inode->i_op = &ext4_file_inode_operations; + inode->i_fop = &ext4_file_operations; + ext4_set_aops(inode); + err = ext4_add_nondir(handle, dentry, inode); + if (!err && IS_DIRSYNC(dir)) + ext4_handle_sync(handle); + } + if (handle) + ext4_journal_stop(handle); + if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries)) + goto retry; + return err; +} + +static int ext4_mknod(struct inode *dir, struct dentry *dentry, + umode_t mode, dev_t rdev) +{ + handle_t *handle; + struct inode *inode; + int err, credits, retries = 0; + + err = dquot_initialize(dir); + if (err) + return err; + + credits = (EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + + EXT4_INDEX_EXTRA_TRANS_BLOCKS + 3); +retry: + inode = ext4_new_inode_start_handle(dir, mode, &dentry->d_name, 0, + NULL, EXT4_HT_DIR, credits); + handle = ext4_journal_current_handle(); + err = PTR_ERR(inode); + if (!IS_ERR(inode)) { + init_special_inode(inode, inode->i_mode, rdev); + inode->i_op = &ext4_special_inode_operations; + err = ext4_add_nondir(handle, dentry, inode); + if (!err && IS_DIRSYNC(dir)) + ext4_handle_sync(handle); + } + if (handle) + ext4_journal_stop(handle); + if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries)) + goto retry; + return err; +} + +static int ext4_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) +{ + handle_t *handle; + struct inode *inode; + int err, retries = 0; + + err = dquot_initialize(dir); + if (err) + return err; + +retry: + inode = ext4_new_inode_start_handle(dir, mode, + NULL, 0, NULL, + EXT4_HT_DIR, + EXT4_MAXQUOTAS_INIT_BLOCKS(dir->i_sb) + + 4 + EXT4_XATTR_TRANS_BLOCKS); + handle = ext4_journal_current_handle(); + err = PTR_ERR(inode); + if (!IS_ERR(inode)) { + inode->i_op = &ext4_file_inode_operations; + inode->i_fop = &ext4_file_operations; + ext4_set_aops(inode); + d_tmpfile(dentry, inode); + err = ext4_orphan_add(handle, inode); + if (err) + goto err_unlock_inode; + mark_inode_dirty(inode); + unlock_new_inode(inode); + } + if (handle) + ext4_journal_stop(handle); + if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries)) + goto retry; + return err; +err_unlock_inode: + ext4_journal_stop(handle); + unlock_new_inode(inode); + return err; +} + +struct ext4_dir_entry_2 *ext4_init_dot_dotdot(struct inode *inode, + struct ext4_dir_entry_2 *de, + int blocksize, int csum_size, + unsigned int parent_ino, int dotdot_real_len) +{ + de->inode = cpu_to_le32(inode->i_ino); + de->name_len = 1; + de->rec_len = ext4_rec_len_to_disk(EXT4_DIR_REC_LEN(de->name_len), + blocksize); + strcpy(de->name, "."); + ext4_set_de_type(inode->i_sb, de, S_IFDIR); + + de = ext4_next_entry(de, blocksize); + de->inode = cpu_to_le32(parent_ino); + de->name_len = 2; + if (!dotdot_real_len) + de->rec_len = ext4_rec_len_to_disk(blocksize - + (csum_size + EXT4_DIR_REC_LEN(1)), + blocksize); + else + de->rec_len = ext4_rec_len_to_disk( + EXT4_DIR_REC_LEN(de->name_len), blocksize); + strcpy(de->name, ".."); + ext4_set_de_type(inode->i_sb, de, S_IFDIR); + + return ext4_next_entry(de, blocksize); +} + +static int ext4_init_new_dir(handle_t *handle, struct inode *dir, + struct inode *inode) +{ + struct buffer_head *dir_block = NULL; + struct ext4_dir_entry_2 *de; + struct ext4_dir_entry_tail *t; + ext4_lblk_t block = 0; + unsigned int blocksize = dir->i_sb->s_blocksize; + int csum_size = 0; + int err; + + if (ext4_has_metadata_csum(dir->i_sb)) + csum_size = sizeof(struct ext4_dir_entry_tail); + + if (ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA)) { + err = ext4_try_create_inline_dir(handle, dir, inode); + if (err < 0 && err != -ENOSPC) + goto out; + if (!err) + goto out; + } + + inode->i_size = 0; + dir_block = ext4_append(handle, inode, &block); + if (IS_ERR(dir_block)) + return PTR_ERR(dir_block); + de = (struct ext4_dir_entry_2 *)dir_block->b_data; + ext4_init_dot_dotdot(inode, de, blocksize, csum_size, dir->i_ino, 0); + set_nlink(inode, 2); + if (csum_size) { + t = EXT4_DIRENT_TAIL(dir_block->b_data, blocksize); + initialize_dirent_tail(t, blocksize); + } + + BUFFER_TRACE(dir_block, "call ext4_handle_dirty_metadata"); + err = ext4_handle_dirty_dirent_node(handle, inode, dir_block); + if (err) + goto out; + set_buffer_verified(dir_block); +out: + brelse(dir_block); + return err; +} + +static int ext4_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) +{ + handle_t *handle; + struct inode *inode; + int err, credits, retries = 0; + + if (EXT4_DIR_LINK_MAX(dir)) + return -EMLINK; + + err = dquot_initialize(dir); + if (err) + return err; + + credits = (EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + + EXT4_INDEX_EXTRA_TRANS_BLOCKS + 3); +retry: + inode = ext4_new_inode_start_handle(dir, S_IFDIR | mode, + &dentry->d_name, + 0, NULL, EXT4_HT_DIR, credits); + handle = ext4_journal_current_handle(); + err = PTR_ERR(inode); + if (IS_ERR(inode)) + goto out_stop; + + inode->i_op = &ext4_dir_inode_operations; + inode->i_fop = &ext4_dir_operations; + err = ext4_init_new_dir(handle, dir, inode); + if (err) + goto out_clear_inode; + err = ext4_mark_inode_dirty(handle, inode); + if (!err) + err = ext4_add_entry(handle, dentry, inode); + if (err) { +out_clear_inode: + clear_nlink(inode); + unlock_new_inode(inode); + ext4_mark_inode_dirty(handle, inode); + iput(inode); + goto out_stop; + } + ext4_inc_count(handle, dir); + ext4_update_dx_flag(dir); + err = ext4_mark_inode_dirty(handle, dir); + if (err) + goto out_clear_inode; + d_instantiate_new(dentry, inode); + if (IS_DIRSYNC(dir)) + ext4_handle_sync(handle); + +out_stop: + if (handle) + ext4_journal_stop(handle); + if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries)) + goto retry; + return err; +} + +/* + * routine to check that the specified directory is empty (for rmdir) + */ +bool ext4_empty_dir(struct inode *inode) +{ + unsigned int offset; + struct buffer_head *bh; + struct ext4_dir_entry_2 *de, *de1; + struct super_block *sb; + + if (ext4_has_inline_data(inode)) { + int has_inline_data = 1; + int ret; + + ret = empty_inline_dir(inode, &has_inline_data); + if (has_inline_data) + return ret; + } + + sb = inode->i_sb; + if (inode->i_size < EXT4_DIR_REC_LEN(1) + EXT4_DIR_REC_LEN(2)) { + EXT4_ERROR_INODE(inode, "invalid size"); + return true; + } + /* The first directory block must not be a hole, + * so treat it as DIRENT_HTREE + */ + bh = ext4_read_dirblock(inode, 0, DIRENT_HTREE); + if (IS_ERR(bh)) + return true; + + de = (struct ext4_dir_entry_2 *) bh->b_data; + de1 = ext4_next_entry(de, sb->s_blocksize); + if (le32_to_cpu(de->inode) != inode->i_ino || + le32_to_cpu(de1->inode) == 0 || + strcmp(".", de->name) || strcmp("..", de1->name)) { + ext4_warning_inode(inode, "directory missing '.' and/or '..'"); + brelse(bh); + return true; + } + offset = ext4_rec_len_from_disk(de->rec_len, sb->s_blocksize) + + ext4_rec_len_from_disk(de1->rec_len, sb->s_blocksize); + de = ext4_next_entry(de1, sb->s_blocksize); + while (offset < inode->i_size) { + if ((void *) de >= (void *) (bh->b_data+sb->s_blocksize)) { + unsigned int lblock; + brelse(bh); + lblock = offset >> EXT4_BLOCK_SIZE_BITS(sb); + bh = ext4_read_dirblock(inode, lblock, EITHER); + if (bh == NULL) { + offset += sb->s_blocksize; + continue; + } + if (IS_ERR(bh)) + return true; + de = (struct ext4_dir_entry_2 *) bh->b_data; + } + if (ext4_check_dir_entry(inode, NULL, de, bh, + bh->b_data, bh->b_size, offset)) { + de = (struct ext4_dir_entry_2 *)(bh->b_data + + sb->s_blocksize); + offset = (offset | (sb->s_blocksize - 1)) + 1; + continue; + } + if (le32_to_cpu(de->inode)) { + brelse(bh); + return false; + } + offset += ext4_rec_len_from_disk(de->rec_len, sb->s_blocksize); + de = ext4_next_entry(de, sb->s_blocksize); + } + brelse(bh); + return true; +} + +/* + * ext4_orphan_add() links an unlinked or truncated inode into a list of + * such inodes, starting at the superblock, in case we crash before the + * file is closed/deleted, or in case the inode truncate spans multiple + * transactions and the last transaction is not recovered after a crash. + * + * At filesystem recovery time, we walk this list deleting unlinked + * inodes and truncating linked inodes in ext4_orphan_cleanup(). + * + * Orphan list manipulation functions must be called under i_mutex unless + * we are just creating the inode or deleting it. + */ +int ext4_orphan_add(handle_t *handle, struct inode *inode) +{ + struct super_block *sb = inode->i_sb; + struct ext4_sb_info *sbi = EXT4_SB(sb); + struct ext4_iloc iloc; + int err = 0, rc; + bool dirty = false; + + if (!sbi->s_journal || is_bad_inode(inode)) + return 0; + + WARN_ON_ONCE(!(inode->i_state & (I_NEW | I_FREEING)) && + !inode_is_locked(inode)); + /* + * Exit early if inode already is on orphan list. This is a big speedup + * since we don't have to contend on the global s_orphan_lock. + */ + if (!list_empty(&EXT4_I(inode)->i_orphan)) + return 0; + + /* + * Orphan handling is only valid for files with data blocks + * being truncated, or files being unlinked. Note that we either + * hold i_mutex, or the inode can not be referenced from outside, + * so i_nlink should not be bumped due to race + */ + J_ASSERT((S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || + S_ISLNK(inode->i_mode)) || inode->i_nlink == 0); + + BUFFER_TRACE(sbi->s_sbh, "get_write_access"); + err = ext4_journal_get_write_access(handle, sbi->s_sbh); + if (err) + goto out; + + err = ext4_reserve_inode_write(handle, inode, &iloc); + if (err) + goto out; + + mutex_lock(&sbi->s_orphan_lock); + /* + * Due to previous errors inode may be already a part of on-disk + * orphan list. If so skip on-disk list modification. + */ + if (!NEXT_ORPHAN(inode) || NEXT_ORPHAN(inode) > + (le32_to_cpu(sbi->s_es->s_inodes_count))) { + /* Insert this inode at the head of the on-disk orphan list */ + NEXT_ORPHAN(inode) = le32_to_cpu(sbi->s_es->s_last_orphan); + sbi->s_es->s_last_orphan = cpu_to_le32(inode->i_ino); + dirty = true; + } + list_add(&EXT4_I(inode)->i_orphan, &sbi->s_orphan); + mutex_unlock(&sbi->s_orphan_lock); + + if (dirty) { + err = ext4_handle_dirty_super(handle, sb); + rc = ext4_mark_iloc_dirty(handle, inode, &iloc); + if (!err) + err = rc; + if (err) { + /* + * We have to remove inode from in-memory list if + * addition to on disk orphan list failed. Stray orphan + * list entries can cause panics at unmount time. + */ + mutex_lock(&sbi->s_orphan_lock); + list_del_init(&EXT4_I(inode)->i_orphan); + mutex_unlock(&sbi->s_orphan_lock); + } + } else + brelse(iloc.bh); + + jbd_debug(4, "superblock will point to %lu\n", inode->i_ino); + jbd_debug(4, "orphan inode %lu will point to %d\n", + inode->i_ino, NEXT_ORPHAN(inode)); +out: + ext4_std_error(sb, err); + return err; +} + +/* + * ext4_orphan_del() removes an unlinked or truncated inode from the list + * of such inodes stored on disk, because it is finally being cleaned up. + */ +int ext4_orphan_del(handle_t *handle, struct inode *inode) +{ + struct list_head *prev; + struct ext4_inode_info *ei = EXT4_I(inode); + struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); + __u32 ino_next; + struct ext4_iloc iloc; + int err = 0; + + if (!sbi->s_journal && !(sbi->s_mount_state & EXT4_ORPHAN_FS)) + return 0; + + WARN_ON_ONCE(!(inode->i_state & (I_NEW | I_FREEING)) && + !inode_is_locked(inode)); + /* Do this quick check before taking global s_orphan_lock. */ + if (list_empty(&ei->i_orphan)) + return 0; + + if (handle) { + /* Grab inode buffer early before taking global s_orphan_lock */ + err = ext4_reserve_inode_write(handle, inode, &iloc); + } + + mutex_lock(&sbi->s_orphan_lock); + jbd_debug(4, "remove inode %lu from orphan list\n", inode->i_ino); + + prev = ei->i_orphan.prev; + list_del_init(&ei->i_orphan); + + /* If we're on an error path, we may not have a valid + * transaction handle with which to update the orphan list on + * disk, but we still need to remove the inode from the linked + * list in memory. */ + if (!handle || err) { + mutex_unlock(&sbi->s_orphan_lock); + goto out_err; + } + + ino_next = NEXT_ORPHAN(inode); + if (prev == &sbi->s_orphan) { + jbd_debug(4, "superblock will point to %u\n", ino_next); + BUFFER_TRACE(sbi->s_sbh, "get_write_access"); + err = ext4_journal_get_write_access(handle, sbi->s_sbh); + if (err) { + mutex_unlock(&sbi->s_orphan_lock); + goto out_brelse; + } + sbi->s_es->s_last_orphan = cpu_to_le32(ino_next); + mutex_unlock(&sbi->s_orphan_lock); + err = ext4_handle_dirty_super(handle, inode->i_sb); + } else { + struct ext4_iloc iloc2; + struct inode *i_prev = + &list_entry(prev, struct ext4_inode_info, i_orphan)->vfs_inode; + + jbd_debug(4, "orphan inode %lu will point to %u\n", + i_prev->i_ino, ino_next); + err = ext4_reserve_inode_write(handle, i_prev, &iloc2); + if (err) { + mutex_unlock(&sbi->s_orphan_lock); + goto out_brelse; + } + NEXT_ORPHAN(i_prev) = ino_next; + err = ext4_mark_iloc_dirty(handle, i_prev, &iloc2); + mutex_unlock(&sbi->s_orphan_lock); + } + if (err) + goto out_brelse; + NEXT_ORPHAN(inode) = 0; + err = ext4_mark_iloc_dirty(handle, inode, &iloc); +out_err: + ext4_std_error(inode->i_sb, err); + return err; + +out_brelse: + brelse(iloc.bh); + goto out_err; +} + +static int ext4_rmdir(struct inode *dir, struct dentry *dentry) +{ + int retval; + struct inode *inode; + struct buffer_head *bh; + struct ext4_dir_entry_2 *de; + handle_t *handle = NULL; + + if (unlikely(ext4_forced_shutdown(EXT4_SB(dir->i_sb)))) + return -EIO; + + /* Initialize quotas before so that eventual writes go in + * separate transaction */ + retval = dquot_initialize(dir); + if (retval) + return retval; + retval = dquot_initialize(d_inode(dentry)); + if (retval) + return retval; + + retval = -ENOENT; + bh = ext4_find_entry(dir, &dentry->d_name, &de, NULL); + if (IS_ERR(bh)) + return PTR_ERR(bh); + if (!bh) + goto end_rmdir; + + inode = d_inode(dentry); + + retval = -EFSCORRUPTED; + if (le32_to_cpu(de->inode) != inode->i_ino) + goto end_rmdir; + + retval = -ENOTEMPTY; + if (!ext4_empty_dir(inode)) + goto end_rmdir; + + handle = ext4_journal_start(dir, EXT4_HT_DIR, + EXT4_DATA_TRANS_BLOCKS(dir->i_sb)); + if (IS_ERR(handle)) { + retval = PTR_ERR(handle); + handle = NULL; + goto end_rmdir; + } + + if (IS_DIRSYNC(dir)) + ext4_handle_sync(handle); + + retval = ext4_delete_entry(handle, dir, de, bh); + if (retval) + goto end_rmdir; + if (!EXT4_DIR_LINK_EMPTY(inode)) + ext4_warning_inode(inode, + "empty directory '%.*s' has too many links (%u)", + dentry->d_name.len, dentry->d_name.name, + inode->i_nlink); + inode_inc_iversion(inode); + clear_nlink(inode); + /* There's no need to set i_disksize: the fact that i_nlink is + * zero will ensure that the right thing happens during any + * recovery. */ + inode->i_size = 0; + ext4_orphan_add(handle, inode); + inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode); + ext4_mark_inode_dirty(handle, inode); + ext4_dec_count(handle, dir); + ext4_update_dx_flag(dir); + ext4_mark_inode_dirty(handle, dir); + +end_rmdir: + brelse(bh); + if (handle) + ext4_journal_stop(handle); + return retval; +} + +static int ext4_unlink(struct inode *dir, struct dentry *dentry) +{ + int retval; + struct inode *inode; + struct buffer_head *bh; + struct ext4_dir_entry_2 *de; + handle_t *handle = NULL; + + if (unlikely(ext4_forced_shutdown(EXT4_SB(dir->i_sb)))) + return -EIO; + + trace_ext4_unlink_enter(dir, dentry); + /* Initialize quotas before so that eventual writes go + * in separate transaction */ + retval = dquot_initialize(dir); + if (retval) + return retval; + retval = dquot_initialize(d_inode(dentry)); + if (retval) + return retval; + + retval = -ENOENT; + bh = ext4_find_entry(dir, &dentry->d_name, &de, NULL); + if (IS_ERR(bh)) + return PTR_ERR(bh); + if (!bh) + goto end_unlink; + + inode = d_inode(dentry); + + retval = -EFSCORRUPTED; + if (le32_to_cpu(de->inode) != inode->i_ino) + goto end_unlink; + + handle = ext4_journal_start(dir, EXT4_HT_DIR, + EXT4_DATA_TRANS_BLOCKS(dir->i_sb)); + if (IS_ERR(handle)) { + retval = PTR_ERR(handle); + handle = NULL; + goto end_unlink; + } + + if (IS_DIRSYNC(dir)) + ext4_handle_sync(handle); + + if (inode->i_nlink == 0) { + ext4_warning_inode(inode, "Deleting file '%.*s' with no links", + dentry->d_name.len, dentry->d_name.name); + set_nlink(inode, 1); + } + retval = ext4_delete_entry(handle, dir, de, bh); + if (retval) + goto end_unlink; + dir->i_ctime = dir->i_mtime = current_time(dir); + ext4_update_dx_flag(dir); + ext4_mark_inode_dirty(handle, dir); + drop_nlink(inode); + if (!inode->i_nlink) + ext4_orphan_add(handle, inode); + inode->i_ctime = current_time(inode); + ext4_mark_inode_dirty(handle, inode); + +end_unlink: + brelse(bh); + if (handle) + ext4_journal_stop(handle); + trace_ext4_unlink_exit(dentry, retval); + return retval; +} + +static int ext4_symlink(struct inode *dir, + struct dentry *dentry, const char *symname) +{ + handle_t *handle; + struct inode *inode; + int err, len = strlen(symname); + int credits; + struct fscrypt_str disk_link; + + if (unlikely(ext4_forced_shutdown(EXT4_SB(dir->i_sb)))) + return -EIO; + + err = fscrypt_prepare_symlink(dir, symname, len, dir->i_sb->s_blocksize, + &disk_link); + if (err) + return err; + + err = dquot_initialize(dir); + if (err) + return err; + + if ((disk_link.len > EXT4_N_BLOCKS * 4)) { + /* + * For non-fast symlinks, we just allocate inode and put it on + * orphan list in the first transaction => we need bitmap, + * group descriptor, sb, inode block, quota blocks, and + * possibly selinux xattr blocks. + */ + credits = 4 + EXT4_MAXQUOTAS_INIT_BLOCKS(dir->i_sb) + + EXT4_XATTR_TRANS_BLOCKS; + } else { + /* + * Fast symlink. We have to add entry to directory + * (EXT4_DATA_TRANS_BLOCKS + EXT4_INDEX_EXTRA_TRANS_BLOCKS), + * allocate new inode (bitmap, group descriptor, inode block, + * quota blocks, sb is already counted in previous macros). + */ + credits = EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + + EXT4_INDEX_EXTRA_TRANS_BLOCKS + 3; + } + + inode = ext4_new_inode_start_handle(dir, S_IFLNK|S_IRWXUGO, + &dentry->d_name, 0, NULL, + EXT4_HT_DIR, credits); + handle = ext4_journal_current_handle(); + if (IS_ERR(inode)) { + if (handle) + ext4_journal_stop(handle); + return PTR_ERR(inode); + } + + if (IS_ENCRYPTED(inode)) { + err = fscrypt_encrypt_symlink(inode, symname, len, &disk_link); + if (err) + goto err_drop_inode; + inode->i_op = &ext4_encrypted_symlink_inode_operations; + } + + if ((disk_link.len > EXT4_N_BLOCKS * 4)) { + if (!IS_ENCRYPTED(inode)) + inode->i_op = &ext4_symlink_inode_operations; + inode_nohighmem(inode); + ext4_set_aops(inode); + /* + * We cannot call page_symlink() with transaction started + * because it calls into ext4_write_begin() which can wait + * for transaction commit if we are running out of space + * and thus we deadlock. So we have to stop transaction now + * and restart it when symlink contents is written. + * + * To keep fs consistent in case of crash, we have to put inode + * to orphan list in the mean time. + */ + drop_nlink(inode); + err = ext4_orphan_add(handle, inode); + ext4_journal_stop(handle); + handle = NULL; + if (err) + goto err_drop_inode; + err = __page_symlink(inode, disk_link.name, disk_link.len, 1); + if (err) + goto err_drop_inode; + /* + * Now inode is being linked into dir (EXT4_DATA_TRANS_BLOCKS + * + EXT4_INDEX_EXTRA_TRANS_BLOCKS), inode is also modified + */ + handle = ext4_journal_start(dir, EXT4_HT_DIR, + EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + + EXT4_INDEX_EXTRA_TRANS_BLOCKS + 1); + if (IS_ERR(handle)) { + err = PTR_ERR(handle); + handle = NULL; + goto err_drop_inode; + } + set_nlink(inode, 1); + err = ext4_orphan_del(handle, inode); + if (err) + goto err_drop_inode; + } else { + /* clear the extent format for fast symlink */ + ext4_clear_inode_flag(inode, EXT4_INODE_EXTENTS); + if (!IS_ENCRYPTED(inode)) { + inode->i_op = &ext4_fast_symlink_inode_operations; + inode->i_link = (char *)&EXT4_I(inode)->i_data; + } + memcpy((char *)&EXT4_I(inode)->i_data, disk_link.name, + disk_link.len); + inode->i_size = disk_link.len - 1; + } + EXT4_I(inode)->i_disksize = inode->i_size; + err = ext4_add_nondir(handle, dentry, inode); + if (!err && IS_DIRSYNC(dir)) + ext4_handle_sync(handle); + + if (handle) + ext4_journal_stop(handle); + goto out_free_encrypted_link; + +err_drop_inode: + if (handle) + ext4_journal_stop(handle); + clear_nlink(inode); + unlock_new_inode(inode); + iput(inode); +out_free_encrypted_link: + if (disk_link.name != (unsigned char *)symname) + kfree(disk_link.name); + return err; +} + +static int ext4_link(struct dentry *old_dentry, + struct inode *dir, struct dentry *dentry) +{ + handle_t *handle; + struct inode *inode = d_inode(old_dentry); + int err, retries = 0; + + if (inode->i_nlink >= EXT4_LINK_MAX) + return -EMLINK; + + err = fscrypt_prepare_link(old_dentry, dir, dentry); + if (err) + return err; + + if ((ext4_test_inode_flag(dir, EXT4_INODE_PROJINHERIT)) && + (!projid_eq(EXT4_I(dir)->i_projid, + EXT4_I(old_dentry->d_inode)->i_projid))) + return -EXDEV; + + err = dquot_initialize(dir); + if (err) + return err; + +retry: + handle = ext4_journal_start(dir, EXT4_HT_DIR, + (EXT4_DATA_TRANS_BLOCKS(dir->i_sb) + + EXT4_INDEX_EXTRA_TRANS_BLOCKS) + 1); + if (IS_ERR(handle)) + return PTR_ERR(handle); + + if (IS_DIRSYNC(dir)) + ext4_handle_sync(handle); + + inode->i_ctime = current_time(inode); + ext4_inc_count(handle, inode); + ihold(inode); + + err = ext4_add_entry(handle, dentry, inode); + if (!err) { + ext4_mark_inode_dirty(handle, inode); + /* this can happen only for tmpfile being + * linked the first time + */ + if (inode->i_nlink == 1) + ext4_orphan_del(handle, inode); + d_instantiate(dentry, inode); + } else { + drop_nlink(inode); + iput(inode); + } + ext4_journal_stop(handle); + if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries)) + goto retry; + return err; +} + + +/* + * Try to find buffer head where contains the parent block. + * It should be the inode block if it is inlined or the 1st block + * if it is a normal dir. + */ +static struct buffer_head *ext4_get_first_dir_block(handle_t *handle, + struct inode *inode, + int *retval, + struct ext4_dir_entry_2 **parent_de, + int *inlined) +{ + struct buffer_head *bh; + + if (!ext4_has_inline_data(inode)) { + /* The first directory block must not be a hole, so + * treat it as DIRENT_HTREE + */ + bh = ext4_read_dirblock(inode, 0, DIRENT_HTREE); + if (IS_ERR(bh)) { + *retval = PTR_ERR(bh); + return NULL; + } + *parent_de = ext4_next_entry( + (struct ext4_dir_entry_2 *)bh->b_data, + inode->i_sb->s_blocksize); + return bh; + } + + *inlined = 1; + return ext4_get_first_inline_block(inode, parent_de, retval); +} + +struct ext4_renament { + struct inode *dir; + struct dentry *dentry; + struct inode *inode; + bool is_dir; + int dir_nlink_delta; + + /* entry for "dentry" */ + struct buffer_head *bh; + struct ext4_dir_entry_2 *de; + int inlined; + + /* entry for ".." in inode if it's a directory */ + struct buffer_head *dir_bh; + struct ext4_dir_entry_2 *parent_de; + int dir_inlined; +}; + +static int ext4_rename_dir_prepare(handle_t *handle, struct ext4_renament *ent) +{ + int retval; + + ent->dir_bh = ext4_get_first_dir_block(handle, ent->inode, + &retval, &ent->parent_de, + &ent->dir_inlined); + if (!ent->dir_bh) + return retval; + if (le32_to_cpu(ent->parent_de->inode) != ent->dir->i_ino) + return -EFSCORRUPTED; + BUFFER_TRACE(ent->dir_bh, "get_write_access"); + return ext4_journal_get_write_access(handle, ent->dir_bh); +} + +static int ext4_rename_dir_finish(handle_t *handle, struct ext4_renament *ent, + unsigned dir_ino) +{ + int retval; + + ent->parent_de->inode = cpu_to_le32(dir_ino); + BUFFER_TRACE(ent->dir_bh, "call ext4_handle_dirty_metadata"); + if (!ent->dir_inlined) { + if (is_dx(ent->inode)) { + retval = ext4_handle_dirty_dx_node(handle, + ent->inode, + ent->dir_bh); + } else { + retval = ext4_handle_dirty_dirent_node(handle, + ent->inode, + ent->dir_bh); + } + } else { + retval = ext4_mark_inode_dirty(handle, ent->inode); + } + if (retval) { + ext4_std_error(ent->dir->i_sb, retval); + return retval; + } + return 0; +} + +static int ext4_setent(handle_t *handle, struct ext4_renament *ent, + unsigned ino, unsigned file_type) +{ + int retval; + + BUFFER_TRACE(ent->bh, "get write access"); + retval = ext4_journal_get_write_access(handle, ent->bh); + if (retval) + return retval; + ent->de->inode = cpu_to_le32(ino); + if (ext4_has_feature_filetype(ent->dir->i_sb)) + ent->de->file_type = file_type; + inode_inc_iversion(ent->dir); + ent->dir->i_ctime = ent->dir->i_mtime = + current_time(ent->dir); + ext4_mark_inode_dirty(handle, ent->dir); + BUFFER_TRACE(ent->bh, "call ext4_handle_dirty_metadata"); + if (!ent->inlined) { + retval = ext4_handle_dirty_dirent_node(handle, + ent->dir, ent->bh); + if (unlikely(retval)) { + ext4_std_error(ent->dir->i_sb, retval); + return retval; + } + } + brelse(ent->bh); + ent->bh = NULL; + + return 0; +} + +static int ext4_find_delete_entry(handle_t *handle, struct inode *dir, + const struct qstr *d_name) +{ + int retval = -ENOENT; + struct buffer_head *bh; + struct ext4_dir_entry_2 *de; + + bh = ext4_find_entry(dir, d_name, &de, NULL); + if (IS_ERR(bh)) + return PTR_ERR(bh); + if (bh) { + retval = ext4_delete_entry(handle, dir, de, bh); + brelse(bh); + } + return retval; +} + +static void ext4_rename_delete(handle_t *handle, struct ext4_renament *ent, + int force_reread) +{ + int retval; + /* + * ent->de could have moved from under us during htree split, so make + * sure that we are deleting the right entry. We might also be pointing + * to a stale entry in the unused part of ent->bh so just checking inum + * and the name isn't enough. + */ + if (le32_to_cpu(ent->de->inode) != ent->inode->i_ino || + ent->de->name_len != ent->dentry->d_name.len || + strncmp(ent->de->name, ent->dentry->d_name.name, + ent->de->name_len) || + force_reread) { + retval = ext4_find_delete_entry(handle, ent->dir, + &ent->dentry->d_name); + } else { + retval = ext4_delete_entry(handle, ent->dir, ent->de, ent->bh); + if (retval == -ENOENT) { + retval = ext4_find_delete_entry(handle, ent->dir, + &ent->dentry->d_name); + } + } + + if (retval) { + ext4_warning_inode(ent->dir, + "Deleting old file: nlink %d, error=%d", + ent->dir->i_nlink, retval); + } +} + +static void ext4_update_dir_count(handle_t *handle, struct ext4_renament *ent) +{ + if (ent->dir_nlink_delta) { + if (ent->dir_nlink_delta == -1) + ext4_dec_count(handle, ent->dir); + else + ext4_inc_count(handle, ent->dir); + ext4_mark_inode_dirty(handle, ent->dir); + } +} + +static struct inode *ext4_whiteout_for_rename(struct ext4_renament *ent, + int credits, handle_t **h) +{ + struct inode *wh; + handle_t *handle; + int retries = 0; + + /* + * for inode block, sb block, group summaries, + * and inode bitmap + */ + credits += (EXT4_MAXQUOTAS_TRANS_BLOCKS(ent->dir->i_sb) + + EXT4_XATTR_TRANS_BLOCKS + 4); +retry: + wh = ext4_new_inode_start_handle(ent->dir, S_IFCHR | WHITEOUT_MODE, + &ent->dentry->d_name, 0, NULL, + EXT4_HT_DIR, credits); + + handle = ext4_journal_current_handle(); + if (IS_ERR(wh)) { + if (handle) + ext4_journal_stop(handle); + if (PTR_ERR(wh) == -ENOSPC && + ext4_should_retry_alloc(ent->dir->i_sb, &retries)) + goto retry; + } else { + *h = handle; + init_special_inode(wh, wh->i_mode, WHITEOUT_DEV); + wh->i_op = &ext4_special_inode_operations; + } + return wh; +} + +/* + * Anybody can rename anything with this: the permission checks are left to the + * higher-level routines. + * + * n.b. old_{dentry,inode) refers to the source dentry/inode + * while new_{dentry,inode) refers to the destination dentry/inode + * This comes from rename(const char *oldpath, const char *newpath) + */ +static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry, + struct inode *new_dir, struct dentry *new_dentry, + unsigned int flags) +{ + handle_t *handle = NULL; + struct ext4_renament old = { + .dir = old_dir, + .dentry = old_dentry, + .inode = d_inode(old_dentry), + }; + struct ext4_renament new = { + .dir = new_dir, + .dentry = new_dentry, + .inode = d_inode(new_dentry), + }; + int force_reread; + int retval; + struct inode *whiteout = NULL; + int credits; + u8 old_file_type; + + if (new.inode && new.inode->i_nlink == 0) { + EXT4_ERROR_INODE(new.inode, + "target of rename is already freed"); + return -EFSCORRUPTED; + } + + if ((ext4_test_inode_flag(new_dir, EXT4_INODE_PROJINHERIT)) && + (!projid_eq(EXT4_I(new_dir)->i_projid, + EXT4_I(old_dentry->d_inode)->i_projid))) + return -EXDEV; + + retval = dquot_initialize(old.dir); + if (retval) + return retval; + retval = dquot_initialize(new.dir); + if (retval) + return retval; + + /* Initialize quotas before so that eventual writes go + * in separate transaction */ + if (new.inode) { + retval = dquot_initialize(new.inode); + if (retval) + return retval; + } + + old.bh = ext4_find_entry(old.dir, &old.dentry->d_name, &old.de, NULL); + if (IS_ERR(old.bh)) + return PTR_ERR(old.bh); + /* + * Check for inode number is _not_ due to possible IO errors. + * We might rmdir the source, keep it as pwd of some process + * and merrily kill the link to whatever was created under the + * same name. Goodbye sticky bit ;-< + */ + retval = -ENOENT; + if (!old.bh || le32_to_cpu(old.de->inode) != old.inode->i_ino) + goto end_rename; + + new.bh = ext4_find_entry(new.dir, &new.dentry->d_name, + &new.de, &new.inlined); + if (IS_ERR(new.bh)) { + retval = PTR_ERR(new.bh); + new.bh = NULL; + goto end_rename; + } + if (new.bh) { + if (!new.inode) { + brelse(new.bh); + new.bh = NULL; + } + } + if (new.inode && !test_opt(new.dir->i_sb, NO_AUTO_DA_ALLOC)) + ext4_alloc_da_blocks(old.inode); + + credits = (2 * EXT4_DATA_TRANS_BLOCKS(old.dir->i_sb) + + EXT4_INDEX_EXTRA_TRANS_BLOCKS + 2); + if (!(flags & RENAME_WHITEOUT)) { + handle = ext4_journal_start(old.dir, EXT4_HT_DIR, credits); + if (IS_ERR(handle)) { + retval = PTR_ERR(handle); + handle = NULL; + goto end_rename; + } + } else { + whiteout = ext4_whiteout_for_rename(&old, credits, &handle); + if (IS_ERR(whiteout)) { + retval = PTR_ERR(whiteout); + whiteout = NULL; + goto end_rename; + } + } + + if (IS_DIRSYNC(old.dir) || IS_DIRSYNC(new.dir)) + ext4_handle_sync(handle); + + if (S_ISDIR(old.inode->i_mode)) { + if (new.inode) { + retval = -ENOTEMPTY; + if (!ext4_empty_dir(new.inode)) + goto end_rename; + } else { + retval = -EMLINK; + if (new.dir != old.dir && EXT4_DIR_LINK_MAX(new.dir)) + goto end_rename; + } + retval = ext4_rename_dir_prepare(handle, &old); + if (retval) + goto end_rename; + } + /* + * If we're renaming a file within an inline_data dir and adding or + * setting the new dirent causes a conversion from inline_data to + * extents/blockmap, we need to force the dirent delete code to + * re-read the directory, or else we end up trying to delete a dirent + * from what is now the extent tree root (or a block map). + */ + force_reread = (new.dir->i_ino == old.dir->i_ino && + ext4_test_inode_flag(new.dir, EXT4_INODE_INLINE_DATA)); + + old_file_type = old.de->file_type; + if (whiteout) { + /* + * Do this before adding a new entry, so the old entry is sure + * to be still pointing to the valid old entry. + */ + retval = ext4_setent(handle, &old, whiteout->i_ino, + EXT4_FT_CHRDEV); + if (retval) + goto end_rename; + ext4_mark_inode_dirty(handle, whiteout); + } + if (!new.bh) { + retval = ext4_add_entry(handle, new.dentry, old.inode); + if (retval) + goto end_rename; + } else { + retval = ext4_setent(handle, &new, + old.inode->i_ino, old_file_type); + if (retval) + goto end_rename; + } + if (force_reread) + force_reread = !ext4_test_inode_flag(new.dir, + EXT4_INODE_INLINE_DATA); + + /* + * Like most other Unix systems, set the ctime for inodes on a + * rename. + */ + old.inode->i_ctime = current_time(old.inode); + ext4_mark_inode_dirty(handle, old.inode); + + if (!whiteout) { + /* + * ok, that's it + */ + ext4_rename_delete(handle, &old, force_reread); + } + + if (new.inode) { + ext4_dec_count(handle, new.inode); + new.inode->i_ctime = current_time(new.inode); + } + old.dir->i_ctime = old.dir->i_mtime = current_time(old.dir); + ext4_update_dx_flag(old.dir); + if (old.dir_bh) { + retval = ext4_rename_dir_finish(handle, &old, new.dir->i_ino); + if (retval) + goto end_rename; + + ext4_dec_count(handle, old.dir); + if (new.inode) { + /* checked ext4_empty_dir above, can't have another + * parent, ext4_dec_count() won't work for many-linked + * dirs */ + clear_nlink(new.inode); + } else { + ext4_inc_count(handle, new.dir); + ext4_update_dx_flag(new.dir); + ext4_mark_inode_dirty(handle, new.dir); + } + } + ext4_mark_inode_dirty(handle, old.dir); + if (new.inode) { + ext4_mark_inode_dirty(handle, new.inode); + if (!new.inode->i_nlink) + ext4_orphan_add(handle, new.inode); + } + retval = 0; + +end_rename: + brelse(old.dir_bh); + brelse(old.bh); + brelse(new.bh); + if (whiteout) { + if (retval) + drop_nlink(whiteout); + unlock_new_inode(whiteout); + iput(whiteout); + } + if (handle) + ext4_journal_stop(handle); + return retval; +} + +static int ext4_cross_rename(struct inode *old_dir, struct dentry *old_dentry, + struct inode *new_dir, struct dentry *new_dentry) +{ + handle_t *handle = NULL; + struct ext4_renament old = { + .dir = old_dir, + .dentry = old_dentry, + .inode = d_inode(old_dentry), + }; + struct ext4_renament new = { + .dir = new_dir, + .dentry = new_dentry, + .inode = d_inode(new_dentry), + }; + u8 new_file_type; + int retval; + struct timespec64 ctime; + + if ((ext4_test_inode_flag(new_dir, EXT4_INODE_PROJINHERIT) && + !projid_eq(EXT4_I(new_dir)->i_projid, + EXT4_I(old_dentry->d_inode)->i_projid)) || + (ext4_test_inode_flag(old_dir, EXT4_INODE_PROJINHERIT) && + !projid_eq(EXT4_I(old_dir)->i_projid, + EXT4_I(new_dentry->d_inode)->i_projid))) + return -EXDEV; + + retval = dquot_initialize(old.dir); + if (retval) + return retval; + retval = dquot_initialize(new.dir); + if (retval) + return retval; + + old.bh = ext4_find_entry(old.dir, &old.dentry->d_name, + &old.de, &old.inlined); + if (IS_ERR(old.bh)) + return PTR_ERR(old.bh); + /* + * Check for inode number is _not_ due to possible IO errors. + * We might rmdir the source, keep it as pwd of some process + * and merrily kill the link to whatever was created under the + * same name. Goodbye sticky bit ;-< + */ + retval = -ENOENT; + if (!old.bh || le32_to_cpu(old.de->inode) != old.inode->i_ino) + goto end_rename; + + new.bh = ext4_find_entry(new.dir, &new.dentry->d_name, + &new.de, &new.inlined); + if (IS_ERR(new.bh)) { + retval = PTR_ERR(new.bh); + new.bh = NULL; + goto end_rename; + } + + /* RENAME_EXCHANGE case: old *and* new must both exist */ + if (!new.bh || le32_to_cpu(new.de->inode) != new.inode->i_ino) + goto end_rename; + + handle = ext4_journal_start(old.dir, EXT4_HT_DIR, + (2 * EXT4_DATA_TRANS_BLOCKS(old.dir->i_sb) + + 2 * EXT4_INDEX_EXTRA_TRANS_BLOCKS + 2)); + if (IS_ERR(handle)) { + retval = PTR_ERR(handle); + handle = NULL; + goto end_rename; + } + + if (IS_DIRSYNC(old.dir) || IS_DIRSYNC(new.dir)) + ext4_handle_sync(handle); + + if (S_ISDIR(old.inode->i_mode)) { + old.is_dir = true; + retval = ext4_rename_dir_prepare(handle, &old); + if (retval) + goto end_rename; + } + if (S_ISDIR(new.inode->i_mode)) { + new.is_dir = true; + retval = ext4_rename_dir_prepare(handle, &new); + if (retval) + goto end_rename; + } + + /* + * Other than the special case of overwriting a directory, parents' + * nlink only needs to be modified if this is a cross directory rename. + */ + if (old.dir != new.dir && old.is_dir != new.is_dir) { + old.dir_nlink_delta = old.is_dir ? -1 : 1; + new.dir_nlink_delta = -old.dir_nlink_delta; + retval = -EMLINK; + if ((old.dir_nlink_delta > 0 && EXT4_DIR_LINK_MAX(old.dir)) || + (new.dir_nlink_delta > 0 && EXT4_DIR_LINK_MAX(new.dir))) + goto end_rename; + } + + new_file_type = new.de->file_type; + retval = ext4_setent(handle, &new, old.inode->i_ino, old.de->file_type); + if (retval) + goto end_rename; + + retval = ext4_setent(handle, &old, new.inode->i_ino, new_file_type); + if (retval) + goto end_rename; + + /* + * Like most other Unix systems, set the ctime for inodes on a + * rename. + */ + ctime = current_time(old.inode); + old.inode->i_ctime = ctime; + new.inode->i_ctime = ctime; + ext4_mark_inode_dirty(handle, old.inode); + ext4_mark_inode_dirty(handle, new.inode); + + if (old.dir_bh) { + retval = ext4_rename_dir_finish(handle, &old, new.dir->i_ino); + if (retval) + goto end_rename; + } + if (new.dir_bh) { + retval = ext4_rename_dir_finish(handle, &new, old.dir->i_ino); + if (retval) + goto end_rename; + } + ext4_update_dir_count(handle, &old); + ext4_update_dir_count(handle, &new); + retval = 0; + +end_rename: + brelse(old.dir_bh); + brelse(new.dir_bh); + brelse(old.bh); + brelse(new.bh); + if (handle) + ext4_journal_stop(handle); + return retval; +} + +static int ext4_rename2(struct inode *old_dir, struct dentry *old_dentry, + struct inode *new_dir, struct dentry *new_dentry, + unsigned int flags) +{ + int err; + + if (unlikely(ext4_forced_shutdown(EXT4_SB(old_dir->i_sb)))) + return -EIO; + + if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE | RENAME_WHITEOUT)) + return -EINVAL; + + err = fscrypt_prepare_rename(old_dir, old_dentry, new_dir, new_dentry, + flags); + if (err) + return err; + + if (flags & RENAME_EXCHANGE) { + return ext4_cross_rename(old_dir, old_dentry, + new_dir, new_dentry); + } + + return ext4_rename(old_dir, old_dentry, new_dir, new_dentry, flags); +} + +/* + * directories can handle most operations... + */ +const struct inode_operations ext4_dir_inode_operations = { + .create = ext4_create, + .lookup = ext4_lookup, + .link = ext4_link, + .unlink = ext4_unlink, + .symlink = ext4_symlink, + .mkdir = ext4_mkdir, + .rmdir = ext4_rmdir, + .mknod = ext4_mknod, + .tmpfile = ext4_tmpfile, + .rename = ext4_rename2, + .setattr = ext4_setattr, + .getattr = ext4_getattr, + .listxattr = ext4_listxattr, + .get_acl = ext4_get_acl, + .set_acl = ext4_set_acl, + .fiemap = ext4_fiemap, +}; + +const struct inode_operations ext4_special_inode_operations = { + .setattr = ext4_setattr, + .getattr = ext4_getattr, + .listxattr = ext4_listxattr, + .get_acl = ext4_get_acl, + .set_acl = ext4_set_acl, +}; \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/ext4/namei.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/ext4/namei.c.yml new file mode 100644 index 00000000000..0305bad593c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/ext4/namei.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1992, 1993, 1994, 1995 Remy Card (card@masi.ibp.fr) Laboratoire + - Copyright (c) 1991, 1992 Linus Torvalds + - (c) Daniel Phillips, 2001 Hash Tree Directory +holders: + - Remy Card Laboratoire + - Linus Torvalds + - Daniel Phillips, Hash Tree Directory +authors: + - Theodore Ts'o (tytso@mit.edu) diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/nfs/file.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/nfs/file.c new file mode 100644 index 00000000000..c5be24a6786 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/nfs/file.c @@ -0,0 +1,855 @@ +/* + * linux/fs/nfs/file.c + * + * Copyright (C) 1992 Rick Sladkey + * + * Changes Copyright (C) 1994 by Florian La Roche + * - Do not copy data too often around in the kernel. + * - In nfs_file_read the return value of kmalloc wasn't checked. + * - Put in a better version of read look-ahead buffering. Original idea + * and implementation by Wai S Kok elekokws@ee.nus.sg. + * + * Expire cache on write to a file by Wai S Kok (Oct 1994). + * + * Total rewrite of read side for new NFS buffer cache.. Linus. + * + * nfs regular file handling functions + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "delegation.h" +#include "internal.h" +#include "iostat.h" +#include "fscache.h" +#include "pnfs.h" + +#include "nfstrace.h" + +#define NFSDBG_FACILITY NFSDBG_FILE + +static const struct vm_operations_struct nfs_file_vm_ops; + +/* Hack for future NFS swap support */ +#ifndef IS_SWAPFILE +# define IS_SWAPFILE(inode) (0) +#endif + +int nfs_check_flags(int flags) +{ + if ((flags & (O_APPEND | O_DIRECT)) == (O_APPEND | O_DIRECT)) + return -EINVAL; + + return 0; +} +EXPORT_SYMBOL_GPL(nfs_check_flags); + +/* + * Open file + */ +static int +nfs_file_open(struct inode *inode, struct file *filp) +{ + int res; + + dprintk("NFS: open file(%pD2)\n", filp); + + nfs_inc_stats(inode, NFSIOS_VFSOPEN); + res = nfs_check_flags(filp->f_flags); + if (res) + return res; + + res = nfs_open(inode, filp); + return res; +} + +int +nfs_file_release(struct inode *inode, struct file *filp) +{ + dprintk("NFS: release(%pD2)\n", filp); + + nfs_inc_stats(inode, NFSIOS_VFSRELEASE); + nfs_file_clear_open_context(filp); + return 0; +} +EXPORT_SYMBOL_GPL(nfs_file_release); + +/** + * nfs_revalidate_size - Revalidate the file size + * @inode - pointer to inode struct + * @file - pointer to struct file + * + * Revalidates the file length. This is basically a wrapper around + * nfs_revalidate_inode() that takes into account the fact that we may + * have cached writes (in which case we don't care about the server's + * idea of what the file length is), or O_DIRECT (in which case we + * shouldn't trust the cache). + */ +static int nfs_revalidate_file_size(struct inode *inode, struct file *filp) +{ + struct nfs_server *server = NFS_SERVER(inode); + + if (filp->f_flags & O_DIRECT) + goto force_reval; + if (nfs_check_cache_invalid(inode, NFS_INO_REVAL_PAGECACHE)) + goto force_reval; + return 0; +force_reval: + return __nfs_revalidate_inode(server, inode); +} + +loff_t nfs_file_llseek(struct file *filp, loff_t offset, int whence) +{ + dprintk("NFS: llseek file(%pD2, %lld, %d)\n", + filp, offset, whence); + + /* + * whence == SEEK_END || SEEK_DATA || SEEK_HOLE => we must revalidate + * the cached file length + */ + if (whence != SEEK_SET && whence != SEEK_CUR) { + struct inode *inode = filp->f_mapping->host; + + int retval = nfs_revalidate_file_size(inode, filp); + if (retval < 0) + return (loff_t)retval; + } + + return generic_file_llseek(filp, offset, whence); +} +EXPORT_SYMBOL_GPL(nfs_file_llseek); + +/* + * Flush all dirty pages, and check for write errors. + */ +static int +nfs_file_flush(struct file *file, fl_owner_t id) +{ + struct inode *inode = file_inode(file); + + dprintk("NFS: flush(%pD2)\n", file); + + nfs_inc_stats(inode, NFSIOS_VFSFLUSH); + if ((file->f_mode & FMODE_WRITE) == 0) + return 0; + + /* Flush writes to the server and return any errors */ + return vfs_fsync(file, 0); +} + +ssize_t +nfs_file_read(struct kiocb *iocb, struct iov_iter *to) +{ + struct inode *inode = file_inode(iocb->ki_filp); + ssize_t result; + + if (iocb->ki_flags & IOCB_DIRECT) + return nfs_file_direct_read(iocb, to); + + dprintk("NFS: read(%pD2, %zu@%lu)\n", + iocb->ki_filp, + iov_iter_count(to), (unsigned long) iocb->ki_pos); + + nfs_start_io_read(inode); + result = nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping); + if (!result) { + result = generic_file_read_iter(iocb, to); + if (result > 0) + nfs_add_stats(inode, NFSIOS_NORMALREADBYTES, result); + } + nfs_end_io_read(inode); + return result; +} +EXPORT_SYMBOL_GPL(nfs_file_read); + +int +nfs_file_mmap(struct file * file, struct vm_area_struct * vma) +{ + struct inode *inode = file_inode(file); + int status; + + dprintk("NFS: mmap(%pD2)\n", file); + + /* Note: generic_file_mmap() returns ENOSYS on nommu systems + * so we call that before revalidating the mapping + */ + status = generic_file_mmap(file, vma); + if (!status) { + vma->vm_ops = &nfs_file_vm_ops; + status = nfs_revalidate_mapping(inode, file->f_mapping); + } + return status; +} +EXPORT_SYMBOL_GPL(nfs_file_mmap); + +/* + * Flush any dirty pages for this process, and check for write errors. + * The return status from this call provides a reliable indication of + * whether any write errors occurred for this process. + * + * Notice that it clears the NFS_CONTEXT_ERROR_WRITE before synching to + * disk, but it retrieves and clears ctx->error after synching, despite + * the two being set at the same time in nfs_context_set_write_error(). + * This is because the former is used to notify the _next_ call to + * nfs_file_write() that a write error occurred, and hence cause it to + * fall back to doing a synchronous write. + */ +static int +nfs_file_fsync_commit(struct file *file, int datasync) +{ + struct nfs_open_context *ctx = nfs_file_open_context(file); + struct inode *inode = file_inode(file); + int do_resend, status; + int ret = 0; + + dprintk("NFS: fsync file(%pD2) datasync %d\n", file, datasync); + + nfs_inc_stats(inode, NFSIOS_VFSFSYNC); + do_resend = test_and_clear_bit(NFS_CONTEXT_RESEND_WRITES, &ctx->flags); + status = nfs_commit_inode(inode, FLUSH_SYNC); + if (test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags)) { + ret = xchg(&ctx->error, 0); + if (ret) + goto out; + } + if (status < 0) { + ret = status; + goto out; + } + do_resend |= test_bit(NFS_CONTEXT_RESEND_WRITES, &ctx->flags); + if (do_resend) + ret = -EAGAIN; +out: + return ret; +} + +int +nfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) +{ + int ret; + struct inode *inode = file_inode(file); + + trace_nfs_fsync_enter(inode); + + do { + struct nfs_open_context *ctx = nfs_file_open_context(file); + ret = filemap_write_and_wait_range(inode->i_mapping, start, end); + if (test_and_clear_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags)) { + int ret2 = xchg(&ctx->error, 0); + if (ret2) + ret = ret2; + } + if (ret != 0) + break; + ret = nfs_file_fsync_commit(file, datasync); + if (!ret) + ret = pnfs_sync_inode(inode, !!datasync); + /* + * If nfs_file_fsync_commit detected a server reboot, then + * resend all dirty pages that might have been covered by + * the NFS_CONTEXT_RESEND_WRITES flag + */ + start = 0; + end = LLONG_MAX; + } while (ret == -EAGAIN); + + trace_nfs_fsync_exit(inode, ret); + return ret; +} +EXPORT_SYMBOL_GPL(nfs_file_fsync); + +/* + * Decide whether a read/modify/write cycle may be more efficient + * then a modify/write/read cycle when writing to a page in the + * page cache. + * + * The modify/write/read cycle may occur if a page is read before + * being completely filled by the writer. In this situation, the + * page must be completely written to stable storage on the server + * before it can be refilled by reading in the page from the server. + * This can lead to expensive, small, FILE_SYNC mode writes being + * done. + * + * It may be more efficient to read the page first if the file is + * open for reading in addition to writing, the page is not marked + * as Uptodate, it is not dirty or waiting to be committed, + * indicating that it was previously allocated and then modified, + * that there were valid bytes of data in that range of the file, + * and that the new data won't completely replace the old data in + * that range of the file. + */ +static int nfs_want_read_modify_write(struct file *file, struct page *page, + loff_t pos, unsigned len) +{ + unsigned int pglen = nfs_page_length(page); + unsigned int offset = pos & (PAGE_SIZE - 1); + unsigned int end = offset + len; + + if (pnfs_ld_read_whole_page(file->f_mapping->host)) { + if (!PageUptodate(page)) + return 1; + return 0; + } + + if ((file->f_mode & FMODE_READ) && /* open for read? */ + !PageUptodate(page) && /* Uptodate? */ + !PagePrivate(page) && /* i/o request already? */ + pglen && /* valid bytes of file? */ + (end < pglen || offset)) /* replace all valid bytes? */ + return 1; + return 0; +} + +/* + * This does the "real" work of the write. We must allocate and lock the + * page to be sent back to the generic routine, which then copies the + * data from user space. + * + * If the writer ends up delaying the write, the writer needs to + * increment the page use counts until he is done with the page. + */ +static int nfs_write_begin(struct file *file, struct address_space *mapping, + loff_t pos, unsigned len, unsigned flags, + struct page **pagep, void **fsdata) +{ + int ret; + pgoff_t index = pos >> PAGE_SHIFT; + struct page *page; + int once_thru = 0; + + dfprintk(PAGECACHE, "NFS: write_begin(%pD2(%lu), %u@%lld)\n", + file, mapping->host->i_ino, len, (long long) pos); + +start: + page = grab_cache_page_write_begin(mapping, index, flags); + if (!page) + return -ENOMEM; + *pagep = page; + + ret = nfs_flush_incompatible(file, page); + if (ret) { + unlock_page(page); + put_page(page); + } else if (!once_thru && + nfs_want_read_modify_write(file, page, pos, len)) { + once_thru = 1; + ret = nfs_readpage(file, page); + put_page(page); + if (!ret) + goto start; + } + return ret; +} + +static int nfs_write_end(struct file *file, struct address_space *mapping, + loff_t pos, unsigned len, unsigned copied, + struct page *page, void *fsdata) +{ + unsigned offset = pos & (PAGE_SIZE - 1); + struct nfs_open_context *ctx = nfs_file_open_context(file); + int status; + + dfprintk(PAGECACHE, "NFS: write_end(%pD2(%lu), %u@%lld)\n", + file, mapping->host->i_ino, len, (long long) pos); + + /* + * Zero any uninitialised parts of the page, and then mark the page + * as up to date if it turns out that we're extending the file. + */ + if (!PageUptodate(page)) { + unsigned pglen = nfs_page_length(page); + unsigned end = offset + copied; + + if (pglen == 0) { + zero_user_segments(page, 0, offset, + end, PAGE_SIZE); + SetPageUptodate(page); + } else if (end >= pglen) { + zero_user_segment(page, end, PAGE_SIZE); + if (offset == 0) + SetPageUptodate(page); + } else + zero_user_segment(page, pglen, PAGE_SIZE); + } + + status = nfs_updatepage(file, page, offset, copied); + + unlock_page(page); + put_page(page); + + if (status < 0) + return status; + NFS_I(mapping->host)->write_io += copied; + + if (nfs_ctx_key_to_expire(ctx, mapping->host)) { + status = nfs_wb_all(mapping->host); + if (status < 0) + return status; + } + + return copied; +} + +/* + * Partially or wholly invalidate a page + * - Release the private state associated with a page if undergoing complete + * page invalidation + * - Called if either PG_private or PG_fscache is set on the page + * - Caller holds page lock + */ +static void nfs_invalidate_page(struct page *page, unsigned int offset, + unsigned int length) +{ + dfprintk(PAGECACHE, "NFS: invalidate_page(%p, %u, %u)\n", + page, offset, length); + + if (offset != 0 || length < PAGE_SIZE) + return; + /* Cancel any unstarted writes on this page */ + nfs_wb_page_cancel(page_file_mapping(page)->host, page); + + nfs_fscache_invalidate_page(page, page->mapping->host); +} + +/* + * Attempt to release the private state associated with a page + * - Called if either PG_private or PG_fscache is set on the page + * - Caller holds page lock + * - Return true (may release page) or false (may not) + */ +static int nfs_release_page(struct page *page, gfp_t gfp) +{ + dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page); + + /* If PagePrivate() is set, then the page is not freeable */ + if (PagePrivate(page)) + return 0; + return nfs_fscache_release_page(page, gfp); +} + +static void nfs_check_dirty_writeback(struct page *page, + bool *dirty, bool *writeback) +{ + struct nfs_inode *nfsi; + struct address_space *mapping = page_file_mapping(page); + + if (!mapping || PageSwapCache(page)) + return; + + /* + * Check if an unstable page is currently being committed and + * if so, have the VM treat it as if the page is under writeback + * so it will not block due to pages that will shortly be freeable. + */ + nfsi = NFS_I(mapping->host); + if (atomic_read(&nfsi->commit_info.rpcs_out)) { + *writeback = true; + return; + } + + /* + * If PagePrivate() is set, then the page is not freeable and as the + * inode is not being committed, it's not going to be cleaned in the + * near future so treat it as dirty + */ + if (PagePrivate(page)) + *dirty = true; +} + +/* + * Attempt to clear the private state associated with a page when an error + * occurs that requires the cached contents of an inode to be written back or + * destroyed + * - Called if either PG_private or fscache is set on the page + * - Caller holds page lock + * - Return 0 if successful, -error otherwise + */ +static int nfs_launder_page(struct page *page) +{ + struct inode *inode = page_file_mapping(page)->host; + struct nfs_inode *nfsi = NFS_I(inode); + + dfprintk(PAGECACHE, "NFS: launder_page(%ld, %llu)\n", + inode->i_ino, (long long)page_offset(page)); + + nfs_fscache_wait_on_page_write(nfsi, page); + return nfs_wb_page(inode, page); +} + +static int nfs_swap_activate(struct swap_info_struct *sis, struct file *file, + sector_t *span) +{ + struct rpc_clnt *clnt = NFS_CLIENT(file->f_mapping->host); + + *span = sis->pages; + + return rpc_clnt_swap_activate(clnt); +} + +static void nfs_swap_deactivate(struct file *file) +{ + struct rpc_clnt *clnt = NFS_CLIENT(file->f_mapping->host); + + rpc_clnt_swap_deactivate(clnt); +} + +const struct address_space_operations nfs_file_aops = { + .readpage = nfs_readpage, + .readpages = nfs_readpages, + .set_page_dirty = __set_page_dirty_nobuffers, + .writepage = nfs_writepage, + .writepages = nfs_writepages, + .write_begin = nfs_write_begin, + .write_end = nfs_write_end, + .invalidatepage = nfs_invalidate_page, + .releasepage = nfs_release_page, + .direct_IO = nfs_direct_IO, +#ifdef CONFIG_MIGRATION + .migratepage = nfs_migrate_page, +#endif + .launder_page = nfs_launder_page, + .is_dirty_writeback = nfs_check_dirty_writeback, + .error_remove_page = generic_error_remove_page, + .swap_activate = nfs_swap_activate, + .swap_deactivate = nfs_swap_deactivate, +}; + +/* + * Notification that a PTE pointing to an NFS page is about to be made + * writable, implying that someone is about to modify the page through a + * shared-writable mapping + */ +static vm_fault_t nfs_vm_page_mkwrite(struct vm_fault *vmf) +{ + struct page *page = vmf->page; + struct file *filp = vmf->vma->vm_file; + struct inode *inode = file_inode(filp); + unsigned pagelen; + vm_fault_t ret = VM_FAULT_NOPAGE; + struct address_space *mapping; + + dfprintk(PAGECACHE, "NFS: vm_page_mkwrite(%pD2(%lu), offset %lld)\n", + filp, filp->f_mapping->host->i_ino, + (long long)page_offset(page)); + + sb_start_pagefault(inode->i_sb); + + /* make sure the cache has finished storing the page */ + nfs_fscache_wait_on_page_write(NFS_I(inode), page); + + wait_on_bit_action(&NFS_I(inode)->flags, NFS_INO_INVALIDATING, + nfs_wait_bit_killable, TASK_KILLABLE); + + lock_page(page); + mapping = page_file_mapping(page); + if (mapping != inode->i_mapping) + goto out_unlock; + + wait_on_page_writeback(page); + + pagelen = nfs_page_length(page); + if (pagelen == 0) + goto out_unlock; + + ret = VM_FAULT_LOCKED; + if (nfs_flush_incompatible(filp, page) == 0 && + nfs_updatepage(filp, page, 0, pagelen) == 0) + goto out; + + ret = VM_FAULT_SIGBUS; +out_unlock: + unlock_page(page); +out: + sb_end_pagefault(inode->i_sb); + return ret; +} + +static const struct vm_operations_struct nfs_file_vm_ops = { + .fault = filemap_fault, + .map_pages = filemap_map_pages, + .page_mkwrite = nfs_vm_page_mkwrite, +}; + +static int nfs_need_check_write(struct file *filp, struct inode *inode) +{ + struct nfs_open_context *ctx; + + ctx = nfs_file_open_context(filp); + if (test_bit(NFS_CONTEXT_ERROR_WRITE, &ctx->flags) || + nfs_ctx_key_to_expire(ctx, inode)) + return 1; + return 0; +} + +ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from) +{ + struct file *file = iocb->ki_filp; + struct inode *inode = file_inode(file); + unsigned long written = 0; + ssize_t result; + + result = nfs_key_timeout_notify(file, inode); + if (result) + return result; + + if (iocb->ki_flags & IOCB_DIRECT) + return nfs_file_direct_write(iocb, from); + + dprintk("NFS: write(%pD2, %zu@%Ld)\n", + file, iov_iter_count(from), (long long) iocb->ki_pos); + + if (IS_SWAPFILE(inode)) + goto out_swapfile; + /* + * O_APPEND implies that we must revalidate the file length. + */ + if (iocb->ki_flags & IOCB_APPEND) { + result = nfs_revalidate_file_size(inode, file); + if (result) + goto out; + } + if (iocb->ki_pos > i_size_read(inode)) + nfs_revalidate_mapping(inode, file->f_mapping); + + nfs_start_io_write(inode); + result = generic_write_checks(iocb, from); + if (result > 0) { + current->backing_dev_info = inode_to_bdi(inode); + result = generic_perform_write(file, from, iocb->ki_pos); + current->backing_dev_info = NULL; + } + nfs_end_io_write(inode); + if (result <= 0) + goto out; + + written = result; + iocb->ki_pos += written; + result = generic_write_sync(iocb, written); + if (result < 0) + goto out; + + /* Return error values */ + if (nfs_need_check_write(file, inode)) { + int err = vfs_fsync(file, 0); + if (err < 0) + result = err; + } + nfs_add_stats(inode, NFSIOS_NORMALWRITTENBYTES, written); +out: + return result; + +out_swapfile: + printk(KERN_INFO "NFS: attempt to write to active swap file!\n"); + return -EBUSY; +} +EXPORT_SYMBOL_GPL(nfs_file_write); + +static int +do_getlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) +{ + struct inode *inode = filp->f_mapping->host; + int status = 0; + unsigned int saved_type = fl->fl_type; + + /* Try local locking first */ + posix_test_lock(filp, fl); + if (fl->fl_type != F_UNLCK) { + /* found a conflict */ + goto out; + } + fl->fl_type = saved_type; + + if (NFS_PROTO(inode)->have_delegation(inode, FMODE_READ)) + goto out_noconflict; + + if (is_local) + goto out_noconflict; + + status = NFS_PROTO(inode)->lock(filp, cmd, fl); +out: + return status; +out_noconflict: + fl->fl_type = F_UNLCK; + goto out; +} + +static int +do_unlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) +{ + struct inode *inode = filp->f_mapping->host; + struct nfs_lock_context *l_ctx; + int status; + + /* + * Flush all pending writes before doing anything + * with locks.. + */ + vfs_fsync(filp, 0); + + l_ctx = nfs_get_lock_context(nfs_file_open_context(filp)); + if (!IS_ERR(l_ctx)) { + status = nfs_iocounter_wait(l_ctx); + nfs_put_lock_context(l_ctx); + /* NOTE: special case + * If we're signalled while cleaning up locks on process exit, we + * still need to complete the unlock. + */ + if (status < 0 && !(fl->fl_flags & FL_CLOSE)) + return status; + } + + /* + * Use local locking if mounted with "-onolock" or with appropriate + * "-olocal_lock=" + */ + if (!is_local) + status = NFS_PROTO(inode)->lock(filp, cmd, fl); + else + status = locks_lock_file_wait(filp, fl); + return status; +} + +static int +do_setlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) +{ + struct inode *inode = filp->f_mapping->host; + int status; + + /* + * Flush all pending writes before doing anything + * with locks.. + */ + status = nfs_sync_mapping(filp->f_mapping); + if (status != 0) + goto out; + + /* + * Use local locking if mounted with "-onolock" or with appropriate + * "-olocal_lock=" + */ + if (!is_local) + status = NFS_PROTO(inode)->lock(filp, cmd, fl); + else + status = locks_lock_file_wait(filp, fl); + if (status < 0) + goto out; + + /* + * Invalidate cache to prevent missing any changes. If + * the file is mapped, clear the page cache as well so + * those mappings will be loaded. + * + * This makes locking act as a cache coherency point. + */ + nfs_sync_mapping(filp->f_mapping); + if (!NFS_PROTO(inode)->have_delegation(inode, FMODE_READ)) { + nfs_zap_caches(inode); + if (mapping_mapped(filp->f_mapping)) + nfs_revalidate_mapping(inode, filp->f_mapping); + } +out: + return status; +} + +/* + * Lock a (portion of) a file + */ +int nfs_lock(struct file *filp, int cmd, struct file_lock *fl) +{ + struct inode *inode = filp->f_mapping->host; + int ret = -ENOLCK; + int is_local = 0; + + dprintk("NFS: lock(%pD2, t=%x, fl=%x, r=%lld:%lld)\n", + filp, fl->fl_type, fl->fl_flags, + (long long)fl->fl_start, (long long)fl->fl_end); + + nfs_inc_stats(inode, NFSIOS_VFSLOCK); + + /* No mandatory locks over NFS */ + if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) + goto out_err; + + if (NFS_SERVER(inode)->flags & NFS_MOUNT_LOCAL_FCNTL) + is_local = 1; + + if (NFS_PROTO(inode)->lock_check_bounds != NULL) { + ret = NFS_PROTO(inode)->lock_check_bounds(fl); + if (ret < 0) + goto out_err; + } + + if (IS_GETLK(cmd)) + ret = do_getlk(filp, cmd, fl, is_local); + else if (fl->fl_type == F_UNLCK) + ret = do_unlk(filp, cmd, fl, is_local); + else + ret = do_setlk(filp, cmd, fl, is_local); +out_err: + return ret; +} +EXPORT_SYMBOL_GPL(nfs_lock); + +/* + * Lock a (portion of) a file + */ +int nfs_flock(struct file *filp, int cmd, struct file_lock *fl) +{ + struct inode *inode = filp->f_mapping->host; + int is_local = 0; + + dprintk("NFS: flock(%pD2, t=%x, fl=%x)\n", + filp, fl->fl_type, fl->fl_flags); + + if (!(fl->fl_flags & FL_FLOCK)) + return -ENOLCK; + + /* + * The NFSv4 protocol doesn't support LOCK_MAND, which is not part of + * any standard. In principle we might be able to support LOCK_MAND + * on NFSv2/3 since NLMv3/4 support DOS share modes, but for now the + * NFS code is not set up for it. + */ + if (fl->fl_type & LOCK_MAND) + return -EINVAL; + + if (NFS_SERVER(inode)->flags & NFS_MOUNT_LOCAL_FLOCK) + is_local = 1; + + /* We're simulating flock() locks using posix locks on the server */ + if (fl->fl_type == F_UNLCK) + return do_unlk(filp, cmd, fl, is_local); + return do_setlk(filp, cmd, fl, is_local); +} +EXPORT_SYMBOL_GPL(nfs_flock); + +const struct file_operations nfs_file_operations = { + .llseek = nfs_file_llseek, + .read_iter = nfs_file_read, + .write_iter = nfs_file_write, + .mmap = nfs_file_mmap, + .open = nfs_file_open, + .flush = nfs_file_flush, + .release = nfs_file_release, + .fsync = nfs_file_fsync, + .lock = nfs_lock, + .flock = nfs_flock, + .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, + .check_flags = nfs_check_flags, + .setlease = simple_nosetlease, +}; +EXPORT_SYMBOL_GPL(nfs_file_operations); \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/nfs/file.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/nfs/file.c.yml new file mode 100644 index 00000000000..219c6fd6479 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/nfs/file.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1992 Rick Sladkey + - Changes Copyright (c) 1994 by Florian La Roche +holders: + - Rick Sladkey + - Changes by Florian La Roche +authors: + - Wai S Kok elekokws@ee.nus.sg diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/nilfs2/sufile.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/nilfs2/sufile.c new file mode 100644 index 00000000000..16c0e35ef3a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/nilfs2/sufile.c @@ -0,0 +1,1218 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * sufile.c - NILFS segment usage file. + * + * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation. + * + * Written by Koji Sato. + * Revised by Ryusuke Konishi. + */ + +#include +#include +#include +#include +#include +#include "mdt.h" +#include "sufile.h" + +#include + +/** + * struct nilfs_sufile_info - on-memory private data of sufile + * @mi: on-memory private data of metadata file + * @ncleansegs: number of clean segments + * @allocmin: lower limit of allocatable segment range + * @allocmax: upper limit of allocatable segment range + */ +struct nilfs_sufile_info { + struct nilfs_mdt_info mi; + unsigned long ncleansegs;/* number of clean segments */ + __u64 allocmin; /* lower limit of allocatable segment range */ + __u64 allocmax; /* upper limit of allocatable segment range */ +}; + +static inline struct nilfs_sufile_info *NILFS_SUI(struct inode *sufile) +{ + return (struct nilfs_sufile_info *)NILFS_MDT(sufile); +} + +static inline unsigned long +nilfs_sufile_segment_usages_per_block(const struct inode *sufile) +{ + return NILFS_MDT(sufile)->mi_entries_per_block; +} + +static unsigned long +nilfs_sufile_get_blkoff(const struct inode *sufile, __u64 segnum) +{ + __u64 t = segnum + NILFS_MDT(sufile)->mi_first_entry_offset; + + do_div(t, nilfs_sufile_segment_usages_per_block(sufile)); + return (unsigned long)t; +} + +static unsigned long +nilfs_sufile_get_offset(const struct inode *sufile, __u64 segnum) +{ + __u64 t = segnum + NILFS_MDT(sufile)->mi_first_entry_offset; + + return do_div(t, nilfs_sufile_segment_usages_per_block(sufile)); +} + +static unsigned long +nilfs_sufile_segment_usages_in_block(const struct inode *sufile, __u64 curr, + __u64 max) +{ + return min_t(unsigned long, + nilfs_sufile_segment_usages_per_block(sufile) - + nilfs_sufile_get_offset(sufile, curr), + max - curr + 1); +} + +static struct nilfs_segment_usage * +nilfs_sufile_block_get_segment_usage(const struct inode *sufile, __u64 segnum, + struct buffer_head *bh, void *kaddr) +{ + return kaddr + bh_offset(bh) + + nilfs_sufile_get_offset(sufile, segnum) * + NILFS_MDT(sufile)->mi_entry_size; +} + +static inline int nilfs_sufile_get_header_block(struct inode *sufile, + struct buffer_head **bhp) +{ + return nilfs_mdt_get_block(sufile, 0, 0, NULL, bhp); +} + +static inline int +nilfs_sufile_get_segment_usage_block(struct inode *sufile, __u64 segnum, + int create, struct buffer_head **bhp) +{ + return nilfs_mdt_get_block(sufile, + nilfs_sufile_get_blkoff(sufile, segnum), + create, NULL, bhp); +} + +static int nilfs_sufile_delete_segment_usage_block(struct inode *sufile, + __u64 segnum) +{ + return nilfs_mdt_delete_block(sufile, + nilfs_sufile_get_blkoff(sufile, segnum)); +} + +static void nilfs_sufile_mod_counter(struct buffer_head *header_bh, + u64 ncleanadd, u64 ndirtyadd) +{ + struct nilfs_sufile_header *header; + void *kaddr; + + kaddr = kmap_atomic(header_bh->b_page); + header = kaddr + bh_offset(header_bh); + le64_add_cpu(&header->sh_ncleansegs, ncleanadd); + le64_add_cpu(&header->sh_ndirtysegs, ndirtyadd); + kunmap_atomic(kaddr); + + mark_buffer_dirty(header_bh); +} + +/** + * nilfs_sufile_get_ncleansegs - return the number of clean segments + * @sufile: inode of segment usage file + */ +unsigned long nilfs_sufile_get_ncleansegs(struct inode *sufile) +{ + return NILFS_SUI(sufile)->ncleansegs; +} + +/** + * nilfs_sufile_updatev - modify multiple segment usages at a time + * @sufile: inode of segment usage file + * @segnumv: array of segment numbers + * @nsegs: size of @segnumv array + * @create: creation flag + * @ndone: place to store number of modified segments on @segnumv + * @dofunc: primitive operation for the update + * + * Description: nilfs_sufile_updatev() repeatedly calls @dofunc + * against the given array of segments. The @dofunc is called with + * buffers of a header block and the sufile block in which the target + * segment usage entry is contained. If @ndone is given, the number + * of successfully modified segments from the head is stored in the + * place @ndone points to. + * + * Return Value: On success, zero is returned. On error, one of the + * following negative error codes is returned. + * + * %-EIO - I/O error. + * + * %-ENOMEM - Insufficient amount of memory available. + * + * %-ENOENT - Given segment usage is in hole block (may be returned if + * @create is zero) + * + * %-EINVAL - Invalid segment usage number + */ +int nilfs_sufile_updatev(struct inode *sufile, __u64 *segnumv, size_t nsegs, + int create, size_t *ndone, + void (*dofunc)(struct inode *, __u64, + struct buffer_head *, + struct buffer_head *)) +{ + struct buffer_head *header_bh, *bh; + unsigned long blkoff, prev_blkoff; + __u64 *seg; + size_t nerr = 0, n = 0; + int ret = 0; + + if (unlikely(nsegs == 0)) + goto out; + + down_write(&NILFS_MDT(sufile)->mi_sem); + for (seg = segnumv; seg < segnumv + nsegs; seg++) { + if (unlikely(*seg >= nilfs_sufile_get_nsegments(sufile))) { + nilfs_msg(sufile->i_sb, KERN_WARNING, + "%s: invalid segment number: %llu", + __func__, (unsigned long long)*seg); + nerr++; + } + } + if (nerr > 0) { + ret = -EINVAL; + goto out_sem; + } + + ret = nilfs_sufile_get_header_block(sufile, &header_bh); + if (ret < 0) + goto out_sem; + + seg = segnumv; + blkoff = nilfs_sufile_get_blkoff(sufile, *seg); + ret = nilfs_mdt_get_block(sufile, blkoff, create, NULL, &bh); + if (ret < 0) + goto out_header; + + for (;;) { + dofunc(sufile, *seg, header_bh, bh); + + if (++seg >= segnumv + nsegs) + break; + prev_blkoff = blkoff; + blkoff = nilfs_sufile_get_blkoff(sufile, *seg); + if (blkoff == prev_blkoff) + continue; + + /* get different block */ + brelse(bh); + ret = nilfs_mdt_get_block(sufile, blkoff, create, NULL, &bh); + if (unlikely(ret < 0)) + goto out_header; + } + brelse(bh); + + out_header: + n = seg - segnumv; + brelse(header_bh); + out_sem: + up_write(&NILFS_MDT(sufile)->mi_sem); + out: + if (ndone) + *ndone = n; + return ret; +} + +int nilfs_sufile_update(struct inode *sufile, __u64 segnum, int create, + void (*dofunc)(struct inode *, __u64, + struct buffer_head *, + struct buffer_head *)) +{ + struct buffer_head *header_bh, *bh; + int ret; + + if (unlikely(segnum >= nilfs_sufile_get_nsegments(sufile))) { + nilfs_msg(sufile->i_sb, KERN_WARNING, + "%s: invalid segment number: %llu", + __func__, (unsigned long long)segnum); + return -EINVAL; + } + down_write(&NILFS_MDT(sufile)->mi_sem); + + ret = nilfs_sufile_get_header_block(sufile, &header_bh); + if (ret < 0) + goto out_sem; + + ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, create, &bh); + if (!ret) { + dofunc(sufile, segnum, header_bh, bh); + brelse(bh); + } + brelse(header_bh); + + out_sem: + up_write(&NILFS_MDT(sufile)->mi_sem); + return ret; +} + +/** + * nilfs_sufile_set_alloc_range - limit range of segment to be allocated + * @sufile: inode of segment usage file + * @start: minimum segment number of allocatable region (inclusive) + * @end: maximum segment number of allocatable region (inclusive) + * + * Return Value: On success, 0 is returned. On error, one of the + * following negative error codes is returned. + * + * %-ERANGE - invalid segment region + */ +int nilfs_sufile_set_alloc_range(struct inode *sufile, __u64 start, __u64 end) +{ + struct nilfs_sufile_info *sui = NILFS_SUI(sufile); + __u64 nsegs; + int ret = -ERANGE; + + down_write(&NILFS_MDT(sufile)->mi_sem); + nsegs = nilfs_sufile_get_nsegments(sufile); + + if (start <= end && end < nsegs) { + sui->allocmin = start; + sui->allocmax = end; + ret = 0; + } + up_write(&NILFS_MDT(sufile)->mi_sem); + return ret; +} + +/** + * nilfs_sufile_alloc - allocate a segment + * @sufile: inode of segment usage file + * @segnump: pointer to segment number + * + * Description: nilfs_sufile_alloc() allocates a clean segment. + * + * Return Value: On success, 0 is returned and the segment number of the + * allocated segment is stored in the place pointed by @segnump. On error, one + * of the following negative error codes is returned. + * + * %-EIO - I/O error. + * + * %-ENOMEM - Insufficient amount of memory available. + * + * %-ENOSPC - No clean segment left. + */ +int nilfs_sufile_alloc(struct inode *sufile, __u64 *segnump) +{ + struct buffer_head *header_bh, *su_bh; + struct nilfs_sufile_header *header; + struct nilfs_segment_usage *su; + struct nilfs_sufile_info *sui = NILFS_SUI(sufile); + size_t susz = NILFS_MDT(sufile)->mi_entry_size; + __u64 segnum, maxsegnum, last_alloc; + void *kaddr; + unsigned long nsegments, nsus, cnt; + int ret, j; + + down_write(&NILFS_MDT(sufile)->mi_sem); + + ret = nilfs_sufile_get_header_block(sufile, &header_bh); + if (ret < 0) + goto out_sem; + kaddr = kmap_atomic(header_bh->b_page); + header = kaddr + bh_offset(header_bh); + last_alloc = le64_to_cpu(header->sh_last_alloc); + kunmap_atomic(kaddr); + + nsegments = nilfs_sufile_get_nsegments(sufile); + maxsegnum = sui->allocmax; + segnum = last_alloc + 1; + if (segnum < sui->allocmin || segnum > sui->allocmax) + segnum = sui->allocmin; + + for (cnt = 0; cnt < nsegments; cnt += nsus) { + if (segnum > maxsegnum) { + if (cnt < sui->allocmax - sui->allocmin + 1) { + /* + * wrap around in the limited region. + * if allocation started from + * sui->allocmin, this never happens. + */ + segnum = sui->allocmin; + maxsegnum = last_alloc; + } else if (segnum > sui->allocmin && + sui->allocmax + 1 < nsegments) { + segnum = sui->allocmax + 1; + maxsegnum = nsegments - 1; + } else if (sui->allocmin > 0) { + segnum = 0; + maxsegnum = sui->allocmin - 1; + } else { + break; /* never happens */ + } + } + trace_nilfs2_segment_usage_check(sufile, segnum, cnt); + ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 1, + &su_bh); + if (ret < 0) + goto out_header; + kaddr = kmap_atomic(su_bh->b_page); + su = nilfs_sufile_block_get_segment_usage( + sufile, segnum, su_bh, kaddr); + + nsus = nilfs_sufile_segment_usages_in_block( + sufile, segnum, maxsegnum); + for (j = 0; j < nsus; j++, su = (void *)su + susz, segnum++) { + if (!nilfs_segment_usage_clean(su)) + continue; + /* found a clean segment */ + nilfs_segment_usage_set_dirty(su); + kunmap_atomic(kaddr); + + kaddr = kmap_atomic(header_bh->b_page); + header = kaddr + bh_offset(header_bh); + le64_add_cpu(&header->sh_ncleansegs, -1); + le64_add_cpu(&header->sh_ndirtysegs, 1); + header->sh_last_alloc = cpu_to_le64(segnum); + kunmap_atomic(kaddr); + + sui->ncleansegs--; + mark_buffer_dirty(header_bh); + mark_buffer_dirty(su_bh); + nilfs_mdt_mark_dirty(sufile); + brelse(su_bh); + *segnump = segnum; + + trace_nilfs2_segment_usage_allocated(sufile, segnum); + + goto out_header; + } + + kunmap_atomic(kaddr); + brelse(su_bh); + } + + /* no segments left */ + ret = -ENOSPC; + + out_header: + brelse(header_bh); + + out_sem: + up_write(&NILFS_MDT(sufile)->mi_sem); + return ret; +} + +void nilfs_sufile_do_cancel_free(struct inode *sufile, __u64 segnum, + struct buffer_head *header_bh, + struct buffer_head *su_bh) +{ + struct nilfs_segment_usage *su; + void *kaddr; + + kaddr = kmap_atomic(su_bh->b_page); + su = nilfs_sufile_block_get_segment_usage(sufile, segnum, su_bh, kaddr); + if (unlikely(!nilfs_segment_usage_clean(su))) { + nilfs_msg(sufile->i_sb, KERN_WARNING, + "%s: segment %llu must be clean", __func__, + (unsigned long long)segnum); + kunmap_atomic(kaddr); + return; + } + nilfs_segment_usage_set_dirty(su); + kunmap_atomic(kaddr); + + nilfs_sufile_mod_counter(header_bh, -1, 1); + NILFS_SUI(sufile)->ncleansegs--; + + mark_buffer_dirty(su_bh); + nilfs_mdt_mark_dirty(sufile); +} + +void nilfs_sufile_do_scrap(struct inode *sufile, __u64 segnum, + struct buffer_head *header_bh, + struct buffer_head *su_bh) +{ + struct nilfs_segment_usage *su; + void *kaddr; + int clean, dirty; + + kaddr = kmap_atomic(su_bh->b_page); + su = nilfs_sufile_block_get_segment_usage(sufile, segnum, su_bh, kaddr); + if (su->su_flags == cpu_to_le32(BIT(NILFS_SEGMENT_USAGE_DIRTY)) && + su->su_nblocks == cpu_to_le32(0)) { + kunmap_atomic(kaddr); + return; + } + clean = nilfs_segment_usage_clean(su); + dirty = nilfs_segment_usage_dirty(su); + + /* make the segment garbage */ + su->su_lastmod = cpu_to_le64(0); + su->su_nblocks = cpu_to_le32(0); + su->su_flags = cpu_to_le32(BIT(NILFS_SEGMENT_USAGE_DIRTY)); + kunmap_atomic(kaddr); + + nilfs_sufile_mod_counter(header_bh, clean ? (u64)-1 : 0, dirty ? 0 : 1); + NILFS_SUI(sufile)->ncleansegs -= clean; + + mark_buffer_dirty(su_bh); + nilfs_mdt_mark_dirty(sufile); +} + +void nilfs_sufile_do_free(struct inode *sufile, __u64 segnum, + struct buffer_head *header_bh, + struct buffer_head *su_bh) +{ + struct nilfs_segment_usage *su; + void *kaddr; + int sudirty; + + kaddr = kmap_atomic(su_bh->b_page); + su = nilfs_sufile_block_get_segment_usage(sufile, segnum, su_bh, kaddr); + if (nilfs_segment_usage_clean(su)) { + nilfs_msg(sufile->i_sb, KERN_WARNING, + "%s: segment %llu is already clean", + __func__, (unsigned long long)segnum); + kunmap_atomic(kaddr); + return; + } + WARN_ON(nilfs_segment_usage_error(su)); + WARN_ON(!nilfs_segment_usage_dirty(su)); + + sudirty = nilfs_segment_usage_dirty(su); + nilfs_segment_usage_set_clean(su); + kunmap_atomic(kaddr); + mark_buffer_dirty(su_bh); + + nilfs_sufile_mod_counter(header_bh, 1, sudirty ? (u64)-1 : 0); + NILFS_SUI(sufile)->ncleansegs++; + + nilfs_mdt_mark_dirty(sufile); + + trace_nilfs2_segment_usage_freed(sufile, segnum); +} + +/** + * nilfs_sufile_mark_dirty - mark the buffer having a segment usage dirty + * @sufile: inode of segment usage file + * @segnum: segment number + */ +int nilfs_sufile_mark_dirty(struct inode *sufile, __u64 segnum) +{ + struct buffer_head *bh; + int ret; + + ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, &bh); + if (!ret) { + mark_buffer_dirty(bh); + nilfs_mdt_mark_dirty(sufile); + brelse(bh); + } + return ret; +} + +/** + * nilfs_sufile_set_segment_usage - set usage of a segment + * @sufile: inode of segment usage file + * @segnum: segment number + * @nblocks: number of live blocks in the segment + * @modtime: modification time (option) + */ +int nilfs_sufile_set_segment_usage(struct inode *sufile, __u64 segnum, + unsigned long nblocks, time64_t modtime) +{ + struct buffer_head *bh; + struct nilfs_segment_usage *su; + void *kaddr; + int ret; + + down_write(&NILFS_MDT(sufile)->mi_sem); + ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, &bh); + if (ret < 0) + goto out_sem; + + kaddr = kmap_atomic(bh->b_page); + su = nilfs_sufile_block_get_segment_usage(sufile, segnum, bh, kaddr); + WARN_ON(nilfs_segment_usage_error(su)); + if (modtime) + su->su_lastmod = cpu_to_le64(modtime); + su->su_nblocks = cpu_to_le32(nblocks); + kunmap_atomic(kaddr); + + mark_buffer_dirty(bh); + nilfs_mdt_mark_dirty(sufile); + brelse(bh); + + out_sem: + up_write(&NILFS_MDT(sufile)->mi_sem); + return ret; +} + +/** + * nilfs_sufile_get_stat - get segment usage statistics + * @sufile: inode of segment usage file + * @stat: pointer to a structure of segment usage statistics + * + * Description: nilfs_sufile_get_stat() returns information about segment + * usage. + * + * Return Value: On success, 0 is returned, and segment usage information is + * stored in the place pointed by @stat. On error, one of the following + * negative error codes is returned. + * + * %-EIO - I/O error. + * + * %-ENOMEM - Insufficient amount of memory available. + */ +int nilfs_sufile_get_stat(struct inode *sufile, struct nilfs_sustat *sustat) +{ + struct buffer_head *header_bh; + struct nilfs_sufile_header *header; + struct the_nilfs *nilfs = sufile->i_sb->s_fs_info; + void *kaddr; + int ret; + + down_read(&NILFS_MDT(sufile)->mi_sem); + + ret = nilfs_sufile_get_header_block(sufile, &header_bh); + if (ret < 0) + goto out_sem; + + kaddr = kmap_atomic(header_bh->b_page); + header = kaddr + bh_offset(header_bh); + sustat->ss_nsegs = nilfs_sufile_get_nsegments(sufile); + sustat->ss_ncleansegs = le64_to_cpu(header->sh_ncleansegs); + sustat->ss_ndirtysegs = le64_to_cpu(header->sh_ndirtysegs); + sustat->ss_ctime = nilfs->ns_ctime; + sustat->ss_nongc_ctime = nilfs->ns_nongc_ctime; + spin_lock(&nilfs->ns_last_segment_lock); + sustat->ss_prot_seq = nilfs->ns_prot_seq; + spin_unlock(&nilfs->ns_last_segment_lock); + kunmap_atomic(kaddr); + brelse(header_bh); + + out_sem: + up_read(&NILFS_MDT(sufile)->mi_sem); + return ret; +} + +void nilfs_sufile_do_set_error(struct inode *sufile, __u64 segnum, + struct buffer_head *header_bh, + struct buffer_head *su_bh) +{ + struct nilfs_segment_usage *su; + void *kaddr; + int suclean; + + kaddr = kmap_atomic(su_bh->b_page); + su = nilfs_sufile_block_get_segment_usage(sufile, segnum, su_bh, kaddr); + if (nilfs_segment_usage_error(su)) { + kunmap_atomic(kaddr); + return; + } + suclean = nilfs_segment_usage_clean(su); + nilfs_segment_usage_set_error(su); + kunmap_atomic(kaddr); + + if (suclean) { + nilfs_sufile_mod_counter(header_bh, -1, 0); + NILFS_SUI(sufile)->ncleansegs--; + } + mark_buffer_dirty(su_bh); + nilfs_mdt_mark_dirty(sufile); +} + +/** + * nilfs_sufile_truncate_range - truncate range of segment array + * @sufile: inode of segment usage file + * @start: start segment number (inclusive) + * @end: end segment number (inclusive) + * + * Return Value: On success, 0 is returned. On error, one of the + * following negative error codes is returned. + * + * %-EIO - I/O error. + * + * %-ENOMEM - Insufficient amount of memory available. + * + * %-EINVAL - Invalid number of segments specified + * + * %-EBUSY - Dirty or active segments are present in the range + */ +static int nilfs_sufile_truncate_range(struct inode *sufile, + __u64 start, __u64 end) +{ + struct the_nilfs *nilfs = sufile->i_sb->s_fs_info; + struct buffer_head *header_bh; + struct buffer_head *su_bh; + struct nilfs_segment_usage *su, *su2; + size_t susz = NILFS_MDT(sufile)->mi_entry_size; + unsigned long segusages_per_block; + unsigned long nsegs, ncleaned; + __u64 segnum; + void *kaddr; + ssize_t n, nc; + int ret; + int j; + + nsegs = nilfs_sufile_get_nsegments(sufile); + + ret = -EINVAL; + if (start > end || start >= nsegs) + goto out; + + ret = nilfs_sufile_get_header_block(sufile, &header_bh); + if (ret < 0) + goto out; + + segusages_per_block = nilfs_sufile_segment_usages_per_block(sufile); + ncleaned = 0; + + for (segnum = start; segnum <= end; segnum += n) { + n = min_t(unsigned long, + segusages_per_block - + nilfs_sufile_get_offset(sufile, segnum), + end - segnum + 1); + ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, + &su_bh); + if (ret < 0) { + if (ret != -ENOENT) + goto out_header; + /* hole */ + continue; + } + kaddr = kmap_atomic(su_bh->b_page); + su = nilfs_sufile_block_get_segment_usage( + sufile, segnum, su_bh, kaddr); + su2 = su; + for (j = 0; j < n; j++, su = (void *)su + susz) { + if ((le32_to_cpu(su->su_flags) & + ~BIT(NILFS_SEGMENT_USAGE_ERROR)) || + nilfs_segment_is_active(nilfs, segnum + j)) { + ret = -EBUSY; + kunmap_atomic(kaddr); + brelse(su_bh); + goto out_header; + } + } + nc = 0; + for (su = su2, j = 0; j < n; j++, su = (void *)su + susz) { + if (nilfs_segment_usage_error(su)) { + nilfs_segment_usage_set_clean(su); + nc++; + } + } + kunmap_atomic(kaddr); + if (nc > 0) { + mark_buffer_dirty(su_bh); + ncleaned += nc; + } + brelse(su_bh); + + if (n == segusages_per_block) { + /* make hole */ + nilfs_sufile_delete_segment_usage_block(sufile, segnum); + } + } + ret = 0; + +out_header: + if (ncleaned > 0) { + NILFS_SUI(sufile)->ncleansegs += ncleaned; + nilfs_sufile_mod_counter(header_bh, ncleaned, 0); + nilfs_mdt_mark_dirty(sufile); + } + brelse(header_bh); +out: + return ret; +} + +/** + * nilfs_sufile_resize - resize segment array + * @sufile: inode of segment usage file + * @newnsegs: new number of segments + * + * Return Value: On success, 0 is returned. On error, one of the + * following negative error codes is returned. + * + * %-EIO - I/O error. + * + * %-ENOMEM - Insufficient amount of memory available. + * + * %-ENOSPC - Enough free space is not left for shrinking + * + * %-EBUSY - Dirty or active segments exist in the region to be truncated + */ +int nilfs_sufile_resize(struct inode *sufile, __u64 newnsegs) +{ + struct the_nilfs *nilfs = sufile->i_sb->s_fs_info; + struct buffer_head *header_bh; + struct nilfs_sufile_header *header; + struct nilfs_sufile_info *sui = NILFS_SUI(sufile); + void *kaddr; + unsigned long nsegs, nrsvsegs; + int ret = 0; + + down_write(&NILFS_MDT(sufile)->mi_sem); + + nsegs = nilfs_sufile_get_nsegments(sufile); + if (nsegs == newnsegs) + goto out; + + ret = -ENOSPC; + nrsvsegs = nilfs_nrsvsegs(nilfs, newnsegs); + if (newnsegs < nsegs && nsegs - newnsegs + nrsvsegs > sui->ncleansegs) + goto out; + + ret = nilfs_sufile_get_header_block(sufile, &header_bh); + if (ret < 0) + goto out; + + if (newnsegs > nsegs) { + sui->ncleansegs += newnsegs - nsegs; + } else /* newnsegs < nsegs */ { + ret = nilfs_sufile_truncate_range(sufile, newnsegs, nsegs - 1); + if (ret < 0) + goto out_header; + + sui->ncleansegs -= nsegs - newnsegs; + } + + kaddr = kmap_atomic(header_bh->b_page); + header = kaddr + bh_offset(header_bh); + header->sh_ncleansegs = cpu_to_le64(sui->ncleansegs); + kunmap_atomic(kaddr); + + mark_buffer_dirty(header_bh); + nilfs_mdt_mark_dirty(sufile); + nilfs_set_nsegments(nilfs, newnsegs); + +out_header: + brelse(header_bh); +out: + up_write(&NILFS_MDT(sufile)->mi_sem); + return ret; +} + +/** + * nilfs_sufile_get_suinfo - + * @sufile: inode of segment usage file + * @segnum: segment number to start looking + * @buf: array of suinfo + * @sisz: byte size of suinfo + * @nsi: size of suinfo array + * + * Description: + * + * Return Value: On success, 0 is returned and .... On error, one of the + * following negative error codes is returned. + * + * %-EIO - I/O error. + * + * %-ENOMEM - Insufficient amount of memory available. + */ +ssize_t nilfs_sufile_get_suinfo(struct inode *sufile, __u64 segnum, void *buf, + unsigned int sisz, size_t nsi) +{ + struct buffer_head *su_bh; + struct nilfs_segment_usage *su; + struct nilfs_suinfo *si = buf; + size_t susz = NILFS_MDT(sufile)->mi_entry_size; + struct the_nilfs *nilfs = sufile->i_sb->s_fs_info; + void *kaddr; + unsigned long nsegs, segusages_per_block; + ssize_t n; + int ret, i, j; + + down_read(&NILFS_MDT(sufile)->mi_sem); + + segusages_per_block = nilfs_sufile_segment_usages_per_block(sufile); + nsegs = min_t(unsigned long, + nilfs_sufile_get_nsegments(sufile) - segnum, + nsi); + for (i = 0; i < nsegs; i += n, segnum += n) { + n = min_t(unsigned long, + segusages_per_block - + nilfs_sufile_get_offset(sufile, segnum), + nsegs - i); + ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, + &su_bh); + if (ret < 0) { + if (ret != -ENOENT) + goto out; + /* hole */ + memset(si, 0, sisz * n); + si = (void *)si + sisz * n; + continue; + } + + kaddr = kmap_atomic(su_bh->b_page); + su = nilfs_sufile_block_get_segment_usage( + sufile, segnum, su_bh, kaddr); + for (j = 0; j < n; + j++, su = (void *)su + susz, si = (void *)si + sisz) { + si->sui_lastmod = le64_to_cpu(su->su_lastmod); + si->sui_nblocks = le32_to_cpu(su->su_nblocks); + si->sui_flags = le32_to_cpu(su->su_flags) & + ~BIT(NILFS_SEGMENT_USAGE_ACTIVE); + if (nilfs_segment_is_active(nilfs, segnum + j)) + si->sui_flags |= + BIT(NILFS_SEGMENT_USAGE_ACTIVE); + } + kunmap_atomic(kaddr); + brelse(su_bh); + } + ret = nsegs; + + out: + up_read(&NILFS_MDT(sufile)->mi_sem); + return ret; +} + +/** + * nilfs_sufile_set_suinfo - sets segment usage info + * @sufile: inode of segment usage file + * @buf: array of suinfo_update + * @supsz: byte size of suinfo_update + * @nsup: size of suinfo_update array + * + * Description: Takes an array of nilfs_suinfo_update structs and updates + * segment usage accordingly. Only the fields indicated by the sup_flags + * are updated. + * + * Return Value: On success, 0 is returned. On error, one of the + * following negative error codes is returned. + * + * %-EIO - I/O error. + * + * %-ENOMEM - Insufficient amount of memory available. + * + * %-EINVAL - Invalid values in input (segment number, flags or nblocks) + */ +ssize_t nilfs_sufile_set_suinfo(struct inode *sufile, void *buf, + unsigned int supsz, size_t nsup) +{ + struct the_nilfs *nilfs = sufile->i_sb->s_fs_info; + struct buffer_head *header_bh, *bh; + struct nilfs_suinfo_update *sup, *supend = buf + supsz * nsup; + struct nilfs_segment_usage *su; + void *kaddr; + unsigned long blkoff, prev_blkoff; + int cleansi, cleansu, dirtysi, dirtysu; + long ncleaned = 0, ndirtied = 0; + int ret = 0; + + if (unlikely(nsup == 0)) + return ret; + + for (sup = buf; sup < supend; sup = (void *)sup + supsz) { + if (sup->sup_segnum >= nilfs->ns_nsegments + || (sup->sup_flags & + (~0UL << __NR_NILFS_SUINFO_UPDATE_FIELDS)) + || (nilfs_suinfo_update_nblocks(sup) && + sup->sup_sui.sui_nblocks > + nilfs->ns_blocks_per_segment)) + return -EINVAL; + } + + down_write(&NILFS_MDT(sufile)->mi_sem); + + ret = nilfs_sufile_get_header_block(sufile, &header_bh); + if (ret < 0) + goto out_sem; + + sup = buf; + blkoff = nilfs_sufile_get_blkoff(sufile, sup->sup_segnum); + ret = nilfs_mdt_get_block(sufile, blkoff, 1, NULL, &bh); + if (ret < 0) + goto out_header; + + for (;;) { + kaddr = kmap_atomic(bh->b_page); + su = nilfs_sufile_block_get_segment_usage( + sufile, sup->sup_segnum, bh, kaddr); + + if (nilfs_suinfo_update_lastmod(sup)) + su->su_lastmod = cpu_to_le64(sup->sup_sui.sui_lastmod); + + if (nilfs_suinfo_update_nblocks(sup)) + su->su_nblocks = cpu_to_le32(sup->sup_sui.sui_nblocks); + + if (nilfs_suinfo_update_flags(sup)) { + /* + * Active flag is a virtual flag projected by running + * nilfs kernel code - drop it not to write it to + * disk. + */ + sup->sup_sui.sui_flags &= + ~BIT(NILFS_SEGMENT_USAGE_ACTIVE); + + cleansi = nilfs_suinfo_clean(&sup->sup_sui); + cleansu = nilfs_segment_usage_clean(su); + dirtysi = nilfs_suinfo_dirty(&sup->sup_sui); + dirtysu = nilfs_segment_usage_dirty(su); + + if (cleansi && !cleansu) + ++ncleaned; + else if (!cleansi && cleansu) + --ncleaned; + + if (dirtysi && !dirtysu) + ++ndirtied; + else if (!dirtysi && dirtysu) + --ndirtied; + + su->su_flags = cpu_to_le32(sup->sup_sui.sui_flags); + } + + kunmap_atomic(kaddr); + + sup = (void *)sup + supsz; + if (sup >= supend) + break; + + prev_blkoff = blkoff; + blkoff = nilfs_sufile_get_blkoff(sufile, sup->sup_segnum); + if (blkoff == prev_blkoff) + continue; + + /* get different block */ + mark_buffer_dirty(bh); + put_bh(bh); + ret = nilfs_mdt_get_block(sufile, blkoff, 1, NULL, &bh); + if (unlikely(ret < 0)) + goto out_mark; + } + mark_buffer_dirty(bh); + put_bh(bh); + + out_mark: + if (ncleaned || ndirtied) { + nilfs_sufile_mod_counter(header_bh, (u64)ncleaned, + (u64)ndirtied); + NILFS_SUI(sufile)->ncleansegs += ncleaned; + } + nilfs_mdt_mark_dirty(sufile); + out_header: + put_bh(header_bh); + out_sem: + up_write(&NILFS_MDT(sufile)->mi_sem); + return ret; +} + +/** + * nilfs_sufile_trim_fs() - trim ioctl handle function + * @sufile: inode of segment usage file + * @range: fstrim_range structure + * + * start: First Byte to trim + * len: number of Bytes to trim from start + * minlen: minimum extent length in Bytes + * + * Decription: nilfs_sufile_trim_fs goes through all segments containing bytes + * from start to start+len. start is rounded up to the next block boundary + * and start+len is rounded down. For each clean segment blkdev_issue_discard + * function is invoked. + * + * Return Value: On success, 0 is returned or negative error code, otherwise. + */ +int nilfs_sufile_trim_fs(struct inode *sufile, struct fstrim_range *range) +{ + struct the_nilfs *nilfs = sufile->i_sb->s_fs_info; + struct buffer_head *su_bh; + struct nilfs_segment_usage *su; + void *kaddr; + size_t n, i, susz = NILFS_MDT(sufile)->mi_entry_size; + sector_t seg_start, seg_end, start_block, end_block; + sector_t start = 0, nblocks = 0; + u64 segnum, segnum_end, minlen, len, max_blocks, ndiscarded = 0; + int ret = 0; + unsigned int sects_per_block; + + sects_per_block = (1 << nilfs->ns_blocksize_bits) / + bdev_logical_block_size(nilfs->ns_bdev); + len = range->len >> nilfs->ns_blocksize_bits; + minlen = range->minlen >> nilfs->ns_blocksize_bits; + max_blocks = ((u64)nilfs->ns_nsegments * nilfs->ns_blocks_per_segment); + + if (!len || range->start >= max_blocks << nilfs->ns_blocksize_bits) + return -EINVAL; + + start_block = (range->start + nilfs->ns_blocksize - 1) >> + nilfs->ns_blocksize_bits; + + /* + * range->len can be very large (actually, it is set to + * ULLONG_MAX by default) - truncate upper end of the range + * carefully so as not to overflow. + */ + if (max_blocks - start_block < len) + end_block = max_blocks - 1; + else + end_block = start_block + len - 1; + + segnum = nilfs_get_segnum_of_block(nilfs, start_block); + segnum_end = nilfs_get_segnum_of_block(nilfs, end_block); + + down_read(&NILFS_MDT(sufile)->mi_sem); + + while (segnum <= segnum_end) { + n = nilfs_sufile_segment_usages_in_block(sufile, segnum, + segnum_end); + + ret = nilfs_sufile_get_segment_usage_block(sufile, segnum, 0, + &su_bh); + if (ret < 0) { + if (ret != -ENOENT) + goto out_sem; + /* hole */ + segnum += n; + continue; + } + + kaddr = kmap_atomic(su_bh->b_page); + su = nilfs_sufile_block_get_segment_usage(sufile, segnum, + su_bh, kaddr); + for (i = 0; i < n; ++i, ++segnum, su = (void *)su + susz) { + if (!nilfs_segment_usage_clean(su)) + continue; + + nilfs_get_segment_range(nilfs, segnum, &seg_start, + &seg_end); + + if (!nblocks) { + /* start new extent */ + start = seg_start; + nblocks = seg_end - seg_start + 1; + continue; + } + + if (start + nblocks == seg_start) { + /* add to previous extent */ + nblocks += seg_end - seg_start + 1; + continue; + } + + /* discard previous extent */ + if (start < start_block) { + nblocks -= start_block - start; + start = start_block; + } + + if (nblocks >= minlen) { + kunmap_atomic(kaddr); + + ret = blkdev_issue_discard(nilfs->ns_bdev, + start * sects_per_block, + nblocks * sects_per_block, + GFP_NOFS, 0); + if (ret < 0) { + put_bh(su_bh); + goto out_sem; + } + + ndiscarded += nblocks; + kaddr = kmap_atomic(su_bh->b_page); + su = nilfs_sufile_block_get_segment_usage( + sufile, segnum, su_bh, kaddr); + } + + /* start new extent */ + start = seg_start; + nblocks = seg_end - seg_start + 1; + } + kunmap_atomic(kaddr); + put_bh(su_bh); + } + + + if (nblocks) { + /* discard last extent */ + if (start < start_block) { + nblocks -= start_block - start; + start = start_block; + } + if (start + nblocks > end_block + 1) + nblocks = end_block - start + 1; + + if (nblocks >= minlen) { + ret = blkdev_issue_discard(nilfs->ns_bdev, + start * sects_per_block, + nblocks * sects_per_block, + GFP_NOFS, 0); + if (!ret) + ndiscarded += nblocks; + } + } + +out_sem: + up_read(&NILFS_MDT(sufile)->mi_sem); + + range->len = ndiscarded << nilfs->ns_blocksize_bits; + return ret; +} + +/** + * nilfs_sufile_read - read or get sufile inode + * @sb: super block instance + * @susize: size of a segment usage entry + * @raw_inode: on-disk sufile inode + * @inodep: buffer to store the inode + */ +int nilfs_sufile_read(struct super_block *sb, size_t susize, + struct nilfs_inode *raw_inode, struct inode **inodep) +{ + struct inode *sufile; + struct nilfs_sufile_info *sui; + struct buffer_head *header_bh; + struct nilfs_sufile_header *header; + void *kaddr; + int err; + + if (susize > sb->s_blocksize) { + nilfs_msg(sb, KERN_ERR, + "too large segment usage size: %zu bytes", susize); + return -EINVAL; + } else if (susize < NILFS_MIN_SEGMENT_USAGE_SIZE) { + nilfs_msg(sb, KERN_ERR, + "too small segment usage size: %zu bytes", susize); + return -EINVAL; + } + + sufile = nilfs_iget_locked(sb, NULL, NILFS_SUFILE_INO); + if (unlikely(!sufile)) + return -ENOMEM; + if (!(sufile->i_state & I_NEW)) + goto out; + + err = nilfs_mdt_init(sufile, NILFS_MDT_GFP, sizeof(*sui)); + if (err) + goto failed; + + nilfs_mdt_set_entry_size(sufile, susize, + sizeof(struct nilfs_sufile_header)); + + err = nilfs_read_inode_common(sufile, raw_inode); + if (err) + goto failed; + + err = nilfs_sufile_get_header_block(sufile, &header_bh); + if (err) + goto failed; + + sui = NILFS_SUI(sufile); + kaddr = kmap_atomic(header_bh->b_page); + header = kaddr + bh_offset(header_bh); + sui->ncleansegs = le64_to_cpu(header->sh_ncleansegs); + kunmap_atomic(kaddr); + brelse(header_bh); + + sui->allocmax = nilfs_sufile_get_nsegments(sufile) - 1; + sui->allocmin = 0; + + unlock_new_inode(sufile); + out: + *inodep = sufile; + return 0; + failed: + iget_failed(sufile); + return err; +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/nilfs2/sufile.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/nilfs2/sufile.c.yml new file mode 100644 index 00000000000..89b5356dc0a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/nilfs2/sufile.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006-2008 Nippon Telegraph and Telephone Corporation +holders: + - Nippon Telegraph and Telephone Corporation +authors: + - Koji Sato. Revised diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/balloc.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/balloc.c new file mode 100644 index 00000000000..e713bfa1952 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/balloc.c @@ -0,0 +1,15 @@ +* Copyright (C) 1991, 1992 Linus Torvalds + * + * ext/freelists.c + * Copyright (C) 1992 Remy Card (card@masi.ibp.fr) + * + * xenix/alloc.c + * Copyright (C) 1992 Doug Evans + * + * coh/alloc.c + * Copyright (C) 1993 Pascal Haible, Bruno Haible + * + * sysv/balloc.c + * Copyright (C) 1993 Bruno Haible + * + * This file contains code for allocating/freeing blocks. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/balloc.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/balloc.c.yml new file mode 100644 index 00000000000..0ef889851d0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/balloc.c.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1991, 1992 Linus Torvalds + - Copyright (c) 1992 Remy Card (card@masi.ibp.fr) + - Copyright (c) 1992 Doug Evans + - Copyright (c) 1993 Pascal Haible, Bruno Haible + - Copyright (c) 1993 Bruno Haible +holders: + - Linus Torvalds + - Remy Card + - Doug Evans + - Pascal Haible, Bruno Haible + - Bruno Haible diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/ialloc.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/ialloc.c new file mode 100644 index 00000000000..0cd3ccb1569 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/ialloc.c @@ -0,0 +1,15 @@ +* Copyright (C) 1991, 1992 Linus Torvalds + * + * ext/freelists.c + * Copyright (C) 1992 Remy Card (card@masi.ibp.fr) + * + * xenix/alloc.c + * Copyright (C) 1992 Doug Evans + * + * coh/alloc.c + * Copyright (C) 1993 Pascal Haible, Bruno Haible + * + * sysv/ialloc.c + * Copyright (C) 1993 Bruno Haible + * + * This file contains code for allocating/freeing inodes. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/ialloc.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/ialloc.c.yml new file mode 100644 index 00000000000..0ef889851d0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/ialloc.c.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1991, 1992 Linus Torvalds + - Copyright (c) 1992 Remy Card (card@masi.ibp.fr) + - Copyright (c) 1992 Doug Evans + - Copyright (c) 1993 Pascal Haible, Bruno Haible + - Copyright (c) 1993 Bruno Haible +holders: + - Linus Torvalds + - Remy Card + - Doug Evans + - Pascal Haible, Bruno Haible + - Bruno Haible diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/inode.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/inode.c new file mode 100644 index 00000000000..752c52f74d1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/inode.c @@ -0,0 +1,16 @@ +* Copyright (C) 1991, 1992 Linus Torvalds + * + * xenix/inode.c + * Copyright (C) 1992 Doug Evans + * + * coh/inode.c + * Copyright (C) 1993 Pascal Haible, Bruno Haible + * + * sysv/inode.c + * Copyright (C) 1993 Paul B. Monday + * + * sysv/inode.c + * Copyright (C) 1993 Bruno Haible + * Copyright (C) 1997, 1998 Krzysztof G. Baranowski + * + * This file contains code for allocating/freeing inodes and for read/writing \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/inode.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/inode.c.yml new file mode 100644 index 00000000000..3819bcc15be --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/inode.c.yml @@ -0,0 +1,18 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1991, 1992 Linus Torvalds + - Copyright (c) 1992 Doug Evans + - Copyright (c) 1993 Pascal Haible, Bruno Haible + - Copyright (c) 1993 Paul B. + - Copyright (c) 1993 Bruno Haible + - Copyright (c) 1997, 1998 Krzysztof G. Baranowski +holders: + - Linus Torvalds + - Doug Evans + - Pascal Haible, Bruno Haible + - Paul B. + - Bruno Haible + - Krzysztof G. Baranowski diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/super.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/super.c new file mode 100644 index 00000000000..4d3a1743371 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/super.c @@ -0,0 +1,16 @@ +* Copyright (C) 1991, 1992 Linus Torvalds + * + * xenix/inode.c + * Copyright (C) 1992 Doug Evans + * + * coh/inode.c + * Copyright (C) 1993 Pascal Haible, Bruno Haible + * + * sysv/inode.c + * Copyright (C) 1993 Paul B. Monday + * + * sysv/inode.c + * Copyright (C) 1993 Bruno Haible + * Copyright (C) 1997, 1998 Krzysztof G. Baranowski + * + * This file contains code for read/parsing the superblock. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/super.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/super.c.yml new file mode 100644 index 00000000000..3819bcc15be --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/sysv/super.c.yml @@ -0,0 +1,18 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1991, 1992 Linus Torvalds + - Copyright (c) 1992 Doug Evans + - Copyright (c) 1993 Pascal Haible, Bruno Haible + - Copyright (c) 1993 Paul B. + - Copyright (c) 1993 Bruno Haible + - Copyright (c) 1997, 1998 Krzysztof G. Baranowski +holders: + - Linus Torvalds + - Doug Evans + - Pascal Haible, Bruno Haible + - Paul B. + - Bruno Haible + - Krzysztof G. Baranowski diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/ufs/swab.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/ufs/swab.h new file mode 100644 index 00000000000..d68b98dd948 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/ufs/swab.h @@ -0,0 +1,4 @@ +* Copyright (C) 1997, 1998 Francois-Rene Rideau + * Copyright (C) 1998 Jakub Jelinek + * Copyright (C) 2001 Christoph Hellwig + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/ufs/swab.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/ufs/swab.h.yml new file mode 100644 index 00000000000..00a37393373 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/fs/ufs/swab.h.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1997, 1998 Francois-Rene Rideau + - Copyright (c) 1998 Jakub Jelinek + - Copyright (c) 2001 Christoph Hellwig +holders: + - Francois-Rene Rideau + - Jakub Jelinek + - Christoph Hellwig diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/acpi/actbl3.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/acpi/actbl3.h new file mode 100644 index 00000000000..a3ee97da1db --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/acpi/actbl3.h @@ -0,0 +1,676 @@ +/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ +/****************************************************************************** + * + * Name: actbl3.h - ACPI Table Definitions + * + * Copyright (C) 2000 - 2018, Intel Corp. + * + *****************************************************************************/ + +#ifndef __ACTBL3_H__ +#define __ACTBL3_H__ + +/******************************************************************************* + * + * Additional ACPI Tables + * + * These tables are not consumed directly by the ACPICA subsystem, but are + * included here to support device drivers and the AML disassembler. + * + ******************************************************************************/ + +/* + * Values for description table header signatures for tables defined in this + * file. Useful because they make it more difficult to inadvertently type in + * the wrong signature. + */ +#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ +#define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */ +#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ +#define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ +#define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */ +#define ACPI_SIG_STAO "STAO" /* Status Override table */ +#define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ +#define ACPI_SIG_TPM2 "TPM2" /* Trusted Platform Module 2.0 H/W interface table */ +#define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ +#define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */ +#define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */ +#define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ +#define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */ +#define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */ +#define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */ +#define ACPI_SIG_WSMT "WSMT" /* Windows SMM Security Migrations Table */ +#define ACPI_SIG_XENV "XENV" /* Xen Environment table */ +#define ACPI_SIG_XXXX "XXXX" /* Intermediate AML header for ASL/ASL+ converter */ + +/* + * All tables must be byte-packed to match the ACPI specification, since + * the tables are provided by the system BIOS. + */ +#pragma pack(1) + +/* + * Note: C bitfields are not used for this reason: + * + * "Bitfields are great and easy to read, but unfortunately the C language + * does not specify the layout of bitfields in memory, which means they are + * essentially useless for dealing with packed data in on-disk formats or + * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me, + * this decision was a design error in C. Ritchie could have picked an order + * and stuck with it." Norman Ramsey. + * See http://stackoverflow.com/a/1053662/41661 + */ + +/******************************************************************************* + * + * SLIC - Software Licensing Description Table + * + * Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)", + * November 29, 2011. Copyright 2011 Microsoft + * + ******************************************************************************/ + +/* Basic SLIC table is only the common ACPI header */ + +struct acpi_table_slic { + struct acpi_table_header header; /* Common ACPI table header */ +}; + +/******************************************************************************* + * + * SLIT - System Locality Distance Information Table + * Version 1 + * + ******************************************************************************/ + +struct acpi_table_slit { + struct acpi_table_header header; /* Common ACPI table header */ + u64 locality_count; + u8 entry[1]; /* Real size = localities^2 */ +}; + +/******************************************************************************* + * + * SPCR - Serial Port Console Redirection table + * Version 2 + * + * Conforms to "Serial Port Console Redirection Table", + * Version 1.03, August 10, 2015 + * + ******************************************************************************/ + +struct acpi_table_spcr { + struct acpi_table_header header; /* Common ACPI table header */ + u8 interface_type; /* 0=full 16550, 1=subset of 16550 */ + u8 reserved[3]; + struct acpi_generic_address serial_port; + u8 interrupt_type; + u8 pc_interrupt; + u32 interrupt; + u8 baud_rate; + u8 parity; + u8 stop_bits; + u8 flow_control; + u8 terminal_type; + u8 reserved1; + u16 pci_device_id; + u16 pci_vendor_id; + u8 pci_bus; + u8 pci_device; + u8 pci_function; + u32 pci_flags; + u8 pci_segment; + u32 reserved2; +}; + +/* Masks for pci_flags field above */ + +#define ACPI_SPCR_DO_NOT_DISABLE (1) + +/* Values for Interface Type: See the definition of the DBG2 table */ + +/******************************************************************************* + * + * SPMI - Server Platform Management Interface table + * Version 5 + * + * Conforms to "Intelligent Platform Management Interface Specification + * Second Generation v2.0", Document Revision 1.0, February 12, 2004 with + * June 12, 2009 markup. + * + ******************************************************************************/ + +struct acpi_table_spmi { + struct acpi_table_header header; /* Common ACPI table header */ + u8 interface_type; + u8 reserved; /* Must be 1 */ + u16 spec_revision; /* Version of IPMI */ + u8 interrupt_type; + u8 gpe_number; /* GPE assigned */ + u8 reserved1; + u8 pci_device_flag; + u32 interrupt; + struct acpi_generic_address ipmi_register; + u8 pci_segment; + u8 pci_bus; + u8 pci_device; + u8 pci_function; + u8 reserved2; +}; + +/* Values for interface_type above */ + +enum acpi_spmi_interface_types { + ACPI_SPMI_NOT_USED = 0, + ACPI_SPMI_KEYBOARD = 1, + ACPI_SPMI_SMI = 2, + ACPI_SPMI_BLOCK_TRANSFER = 3, + ACPI_SPMI_SMBUS = 4, + ACPI_SPMI_RESERVED = 5 /* 5 and above are reserved */ +}; + +/******************************************************************************* + * + * SRAT - System Resource Affinity Table + * Version 3 + * + ******************************************************************************/ + +struct acpi_table_srat { + struct acpi_table_header header; /* Common ACPI table header */ + u32 table_revision; /* Must be value '1' */ + u64 reserved; /* Reserved, must be zero */ +}; + +/* Values for subtable type in struct acpi_subtable_header */ + +enum acpi_srat_type { + ACPI_SRAT_TYPE_CPU_AFFINITY = 0, + ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1, + ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2, + ACPI_SRAT_TYPE_GICC_AFFINITY = 3, + ACPI_SRAT_TYPE_GIC_ITS_AFFINITY = 4, /* ACPI 6.2 */ + ACPI_SRAT_TYPE_RESERVED = 5 /* 5 and greater are reserved */ +}; + +/* + * SRAT Subtables, correspond to Type in struct acpi_subtable_header + */ + +/* 0: Processor Local APIC/SAPIC Affinity */ + +struct acpi_srat_cpu_affinity { + struct acpi_subtable_header header; + u8 proximity_domain_lo; + u8 apic_id; + u32 flags; + u8 local_sapic_eid; + u8 proximity_domain_hi[3]; + u32 clock_domain; +}; + +/* Flags */ + +#define ACPI_SRAT_CPU_USE_AFFINITY (1) /* 00: Use affinity structure */ + +/* 1: Memory Affinity */ + +struct acpi_srat_mem_affinity { + struct acpi_subtable_header header; + u32 proximity_domain; + u16 reserved; /* Reserved, must be zero */ + u64 base_address; + u64 length; + u32 reserved1; + u32 flags; + u64 reserved2; /* Reserved, must be zero */ +}; + +/* Flags */ + +#define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */ +#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */ +#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */ + +/* 2: Processor Local X2_APIC Affinity (ACPI 4.0) */ + +struct acpi_srat_x2apic_cpu_affinity { + struct acpi_subtable_header header; + u16 reserved; /* Reserved, must be zero */ + u32 proximity_domain; + u32 apic_id; + u32 flags; + u32 clock_domain; + u32 reserved2; +}; + +/* Flags for struct acpi_srat_cpu_affinity and struct acpi_srat_x2apic_cpu_affinity */ + +#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ + +/* 3: GICC Affinity (ACPI 5.1) */ + +struct acpi_srat_gicc_affinity { + struct acpi_subtable_header header; + u32 proximity_domain; + u32 acpi_processor_uid; + u32 flags; + u32 clock_domain; +}; + +/* Flags for struct acpi_srat_gicc_affinity */ + +#define ACPI_SRAT_GICC_ENABLED (1) /* 00: Use affinity structure */ + +/* 4: GCC ITS Affinity (ACPI 6.2) */ + +struct acpi_srat_gic_its_affinity { + struct acpi_subtable_header header; + u32 proximity_domain; + u16 reserved; + u32 its_id; +}; + +/******************************************************************************* + * + * STAO - Status Override Table (_STA override) - ACPI 6.0 + * Version 1 + * + * Conforms to "ACPI Specification for Status Override Table" + * 6 January 2015 + * + ******************************************************************************/ + +struct acpi_table_stao { + struct acpi_table_header header; /* Common ACPI table header */ + u8 ignore_uart; +}; + +/******************************************************************************* + * + * TCPA - Trusted Computing Platform Alliance table + * Version 2 + * + * TCG Hardware Interface Table for TPM 1.2 Clients and Servers + * + * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0", + * Version 1.2, Revision 8 + * February 27, 2017 + * + * NOTE: There are two versions of the table with the same signature -- + * the client version and the server version. The common platform_class + * field is used to differentiate the two types of tables. + * + ******************************************************************************/ + +struct acpi_table_tcpa_hdr { + struct acpi_table_header header; /* Common ACPI table header */ + u16 platform_class; +}; + +/* + * Values for platform_class above. + * This is how the client and server subtables are differentiated + */ +#define ACPI_TCPA_CLIENT_TABLE 0 +#define ACPI_TCPA_SERVER_TABLE 1 + +struct acpi_table_tcpa_client { + u32 minimum_log_length; /* Minimum length for the event log area */ + u64 log_address; /* Address of the event log area */ +}; + +struct acpi_table_tcpa_server { + u16 reserved; + u64 minimum_log_length; /* Minimum length for the event log area */ + u64 log_address; /* Address of the event log area */ + u16 spec_revision; + u8 device_flags; + u8 interrupt_flags; + u8 gpe_number; + u8 reserved2[3]; + u32 global_interrupt; + struct acpi_generic_address address; + u32 reserved3; + struct acpi_generic_address config_address; + u8 group; + u8 bus; /* PCI Bus/Segment/Function numbers */ + u8 device; + u8 function; +}; + +/* Values for device_flags above */ + +#define ACPI_TCPA_PCI_DEVICE (1) +#define ACPI_TCPA_BUS_PNP (1<<1) +#define ACPI_TCPA_ADDRESS_VALID (1<<2) + +/* Values for interrupt_flags above */ + +#define ACPI_TCPA_INTERRUPT_MODE (1) +#define ACPI_TCPA_INTERRUPT_POLARITY (1<<1) +#define ACPI_TCPA_SCI_VIA_GPE (1<<2) +#define ACPI_TCPA_GLOBAL_INTERRUPT (1<<3) + +/******************************************************************************* + * + * TPM2 - Trusted Platform Module (TPM) 2.0 Hardware Interface Table + * Version 4 + * + * TCG Hardware Interface Table for TPM 2.0 Clients and Servers + * + * Conforms to "TCG ACPI Specification, Family 1.2 and 2.0", + * Version 1.2, Revision 8 + * February 27, 2017 + * + ******************************************************************************/ + +struct acpi_table_tpm2 { + struct acpi_table_header header; /* Common ACPI table header */ + u16 platform_class; + u16 reserved; + u64 control_address; + u32 start_method; + + /* Platform-specific data follows */ +}; + +/* Values for start_method above */ + +#define ACPI_TPM2_NOT_ALLOWED 0 +#define ACPI_TPM2_RESERVED1 1 +#define ACPI_TPM2_START_METHOD 2 +#define ACPI_TPM2_RESERVED3 3 +#define ACPI_TPM2_RESERVED4 4 +#define ACPI_TPM2_RESERVED5 5 +#define ACPI_TPM2_MEMORY_MAPPED 6 +#define ACPI_TPM2_COMMAND_BUFFER 7 +#define ACPI_TPM2_COMMAND_BUFFER_WITH_START_METHOD 8 +#define ACPI_TPM2_RESERVED9 9 +#define ACPI_TPM2_RESERVED10 10 +#define ACPI_TPM2_COMMAND_BUFFER_WITH_ARM_SMC 11 /* V1.2 Rev 8 */ +#define ACPI_TPM2_RESERVED 12 + +/* Optional trailer appears after any start_method subtables */ + +struct acpi_tpm2_trailer { + u8 method_parameters[12]; + u32 minimum_log_length; /* Minimum length for the event log area */ + u64 log_address; /* Address of the event log area */ +}; + +/* + * Subtables (start_method-specific) + */ + +/* 11: Start Method for ARM SMC (V1.2 Rev 8) */ + +struct acpi_tpm2_arm_smc { + u32 global_interrupt; + u8 interrupt_flags; + u8 operation_flags; + u16 reserved; + u32 function_id; +}; + +/* Values for interrupt_flags above */ + +#define ACPI_TPM2_INTERRUPT_SUPPORT (1) + +/* Values for operation_flags above */ + +#define ACPI_TPM2_IDLE_SUPPORT (1) + +/******************************************************************************* + * + * UEFI - UEFI Boot optimization Table + * Version 1 + * + * Conforms to "Unified Extensible Firmware Interface Specification", + * Version 2.3, May 8, 2009 + * + ******************************************************************************/ + +struct acpi_table_uefi { + struct acpi_table_header header; /* Common ACPI table header */ + u8 identifier[16]; /* UUID identifier */ + u16 data_offset; /* Offset of remaining data in table */ +}; + +/******************************************************************************* + * + * VRTC - Virtual Real Time Clock Table + * Version 1 + * + * Conforms to "Simple Firmware Interface Specification", + * Draft 0.8.2, Oct 19, 2010 + * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table. + * + ******************************************************************************/ + +struct acpi_table_vrtc { + struct acpi_table_header header; /* Common ACPI table header */ +}; + +/* VRTC entry */ + +struct acpi_vrtc_entry { + struct acpi_generic_address physical_address; + u32 irq; +}; + +/******************************************************************************* + * + * WAET - Windows ACPI Emulated devices Table + * Version 1 + * + * Conforms to "Windows ACPI Emulated Devices Table", version 1.0, April 6, 2009 + * + ******************************************************************************/ + +struct acpi_table_waet { + struct acpi_table_header header; /* Common ACPI table header */ + u32 flags; +}; + +/* Masks for Flags field above */ + +#define ACPI_WAET_RTC_NO_ACK (1) /* RTC requires no int acknowledge */ +#define ACPI_WAET_TIMER_ONE_READ (1<<1) /* PM timer requires only one read */ + +/******************************************************************************* + * + * WDAT - Watchdog Action Table + * Version 1 + * + * Conforms to "Hardware Watchdog Timers Design Specification", + * Copyright 2006 Microsoft Corporation. + * + ******************************************************************************/ + +struct acpi_table_wdat { + struct acpi_table_header header; /* Common ACPI table header */ + u32 header_length; /* Watchdog Header Length */ + u16 pci_segment; /* PCI Segment number */ + u8 pci_bus; /* PCI Bus number */ + u8 pci_device; /* PCI Device number */ + u8 pci_function; /* PCI Function number */ + u8 reserved[3]; + u32 timer_period; /* Period of one timer count (msec) */ + u32 max_count; /* Maximum counter value supported */ + u32 min_count; /* Minimum counter value */ + u8 flags; + u8 reserved2[3]; + u32 entries; /* Number of watchdog entries that follow */ +}; + +/* Masks for Flags field above */ + +#define ACPI_WDAT_ENABLED (1) +#define ACPI_WDAT_STOPPED 0x80 + +/* WDAT Instruction Entries (actions) */ + +struct acpi_wdat_entry { + u8 action; + u8 instruction; + u16 reserved; + struct acpi_generic_address register_region; + u32 value; /* Value used with Read/Write register */ + u32 mask; /* Bitmask required for this register instruction */ +}; + +/* Values for Action field above */ + +enum acpi_wdat_actions { + ACPI_WDAT_RESET = 1, + ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4, + ACPI_WDAT_GET_COUNTDOWN = 5, + ACPI_WDAT_SET_COUNTDOWN = 6, + ACPI_WDAT_GET_RUNNING_STATE = 8, + ACPI_WDAT_SET_RUNNING_STATE = 9, + ACPI_WDAT_GET_STOPPED_STATE = 10, + ACPI_WDAT_SET_STOPPED_STATE = 11, + ACPI_WDAT_GET_REBOOT = 16, + ACPI_WDAT_SET_REBOOT = 17, + ACPI_WDAT_GET_SHUTDOWN = 18, + ACPI_WDAT_SET_SHUTDOWN = 19, + ACPI_WDAT_GET_STATUS = 32, + ACPI_WDAT_SET_STATUS = 33, + ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */ +}; + +/* Values for Instruction field above */ + +enum acpi_wdat_instructions { + ACPI_WDAT_READ_VALUE = 0, + ACPI_WDAT_READ_COUNTDOWN = 1, + ACPI_WDAT_WRITE_VALUE = 2, + ACPI_WDAT_WRITE_COUNTDOWN = 3, + ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */ + ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */ +}; + +/******************************************************************************* + * + * WDDT - Watchdog Descriptor Table + * Version 1 + * + * Conforms to "Using the Intel ICH Family Watchdog Timer (WDT)", + * Version 001, September 2002 + * + ******************************************************************************/ + +struct acpi_table_wddt { + struct acpi_table_header header; /* Common ACPI table header */ + u16 spec_version; + u16 table_version; + u16 pci_vendor_id; + struct acpi_generic_address address; + u16 max_count; /* Maximum counter value supported */ + u16 min_count; /* Minimum counter value supported */ + u16 period; + u16 status; + u16 capability; +}; + +/* Flags for Status field above */ + +#define ACPI_WDDT_AVAILABLE (1) +#define ACPI_WDDT_ACTIVE (1<<1) +#define ACPI_WDDT_TCO_OS_OWNED (1<<2) +#define ACPI_WDDT_USER_RESET (1<<11) +#define ACPI_WDDT_WDT_RESET (1<<12) +#define ACPI_WDDT_POWER_FAIL (1<<13) +#define ACPI_WDDT_UNKNOWN_RESET (1<<14) + +/* Flags for Capability field above */ + +#define ACPI_WDDT_AUTO_RESET (1) +#define ACPI_WDDT_ALERT_SUPPORT (1<<1) + +/******************************************************************************* + * + * WDRT - Watchdog Resource Table + * Version 1 + * + * Conforms to "Watchdog Timer Hardware Requirements for Windows Server 2003", + * Version 1.01, August 28, 2006 + * + ******************************************************************************/ + +struct acpi_table_wdrt { + struct acpi_table_header header; /* Common ACPI table header */ + struct acpi_generic_address control_register; + struct acpi_generic_address count_register; + u16 pci_device_id; + u16 pci_vendor_id; + u8 pci_bus; /* PCI Bus number */ + u8 pci_device; /* PCI Device number */ + u8 pci_function; /* PCI Function number */ + u8 pci_segment; /* PCI Segment number */ + u16 max_count; /* Maximum counter value supported */ + u8 units; +}; + +/******************************************************************************* + * + * WPBT - Windows Platform Environment Table (ACPI 6.0) + * Version 1 + * + * Conforms to "Windows Platform Binary Table (WPBT)" 29 November 2011 + * + ******************************************************************************/ + +struct acpi_table_wpbt { + struct acpi_table_header header; /* Common ACPI table header */ + u32 handoff_size; + u64 handoff_address; + u8 layout; + u8 type; + u16 arguments_length; +}; + +/******************************************************************************* + * + * WSMT - Windows SMM Security Migrations Table + * Version 1 + * + * Conforms to "Windows SMM Security Migrations Table", + * Version 1.0, April 18, 2016 + * + ******************************************************************************/ + +struct acpi_table_wsmt { + struct acpi_table_header header; /* Common ACPI table header */ + u32 protection_flags; +}; + +/* Flags for protection_flags field above */ + +#define ACPI_WSMT_FIXED_COMM_BUFFERS (1) +#define ACPI_WSMT_COMM_BUFFER_NESTED_PTR_PROTECTION (2) +#define ACPI_WSMT_SYSTEM_RESOURCE_PROTECTION (4) + +/******************************************************************************* + * + * XENV - Xen Environment Table (ACPI 6.0) + * Version 1 + * + * Conforms to "ACPI Specification for Xen Environment Table" 4 January 2015 + * + ******************************************************************************/ + +struct acpi_table_xenv { + struct acpi_table_header header; /* Common ACPI table header */ + u64 grant_table_address; + u64 grant_table_size; + u32 event_interrupt; + u8 event_flags; +}; + +/* Reset to default packing */ + +#pragma pack() + +#endif /* __ACTBL3_H__ */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/acpi/actbl3.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/acpi/actbl3.h.yml new file mode 100644 index 00000000000..37f6e8c3b36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/acpi/actbl3.h.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2000 - 2018, Intel Corp. + - Copyright 2011 Microsoft + - Copyright 2006 Microsoft Corporation +holders: + - Intel Corp. + - Microsoft + - Microsoft Corporation diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/pnfs_osd_xdr.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/pnfs_osd_xdr.h new file mode 100644 index 00000000000..8399bccac83 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/pnfs_osd_xdr.h @@ -0,0 +1,317 @@ +/* + * pNFS-osd on-the-wire data structures + * + * Copyright (C) 2007 Panasas Inc. [year of first publication] + * All rights reserved. + * + * Benny Halevy + * Boaz Harrosh + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 + * See the file COPYING included with this distribution for more details. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Panasas company nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef __PNFS_OSD_XDR_H__ +#define __PNFS_OSD_XDR_H__ + +#include + +/* + * draft-ietf-nfsv4-minorversion-22 + * draft-ietf-nfsv4-pnfs-obj-12 + */ + +/* Layout Structure */ + +enum pnfs_osd_raid_algorithm4 { + PNFS_OSD_RAID_0 = 1, + PNFS_OSD_RAID_4 = 2, + PNFS_OSD_RAID_5 = 3, + PNFS_OSD_RAID_PQ = 4 /* Reed-Solomon P+Q */ +}; + +/* struct pnfs_osd_data_map4 { + * uint32_t odm_num_comps; + * length4 odm_stripe_unit; + * uint32_t odm_group_width; + * uint32_t odm_group_depth; + * uint32_t odm_mirror_cnt; + * pnfs_osd_raid_algorithm4 odm_raid_algorithm; + * }; + */ +struct pnfs_osd_data_map { + u32 odm_num_comps; + u64 odm_stripe_unit; + u32 odm_group_width; + u32 odm_group_depth; + u32 odm_mirror_cnt; + u32 odm_raid_algorithm; +}; + +/* struct pnfs_osd_objid4 { + * deviceid4 oid_device_id; + * uint64_t oid_partition_id; + * uint64_t oid_object_id; + * }; + */ +struct pnfs_osd_objid { + struct nfs4_deviceid oid_device_id; + u64 oid_partition_id; + u64 oid_object_id; +}; + +/* For printout. I use: + * kprint("dev(%llx:%llx)", _DEVID_LO(pointer), _DEVID_HI(pointer)); + * BE style + */ +#define _DEVID_LO(oid_device_id) \ + (unsigned long long)be64_to_cpup((__be64 *)(oid_device_id)->data) + +#define _DEVID_HI(oid_device_id) \ + (unsigned long long)be64_to_cpup(((__be64 *)(oid_device_id)->data) + 1) + +enum pnfs_osd_version { + PNFS_OSD_MISSING = 0, + PNFS_OSD_VERSION_1 = 1, + PNFS_OSD_VERSION_2 = 2 +}; + +struct pnfs_osd_opaque_cred { + u32 cred_len; + void *cred; +}; + +enum pnfs_osd_cap_key_sec { + PNFS_OSD_CAP_KEY_SEC_NONE = 0, + PNFS_OSD_CAP_KEY_SEC_SSV = 1, +}; + +/* struct pnfs_osd_object_cred4 { + * pnfs_osd_objid4 oc_object_id; + * pnfs_osd_version4 oc_osd_version; + * pnfs_osd_cap_key_sec4 oc_cap_key_sec; + * opaque oc_capability_key<>; + * opaque oc_capability<>; + * }; + */ +struct pnfs_osd_object_cred { + struct pnfs_osd_objid oc_object_id; + u32 oc_osd_version; + u32 oc_cap_key_sec; + struct pnfs_osd_opaque_cred oc_cap_key; + struct pnfs_osd_opaque_cred oc_cap; +}; + +/* struct pnfs_osd_layout4 { + * pnfs_osd_data_map4 olo_map; + * uint32_t olo_comps_index; + * pnfs_osd_object_cred4 olo_components<>; + * }; + */ +struct pnfs_osd_layout { + struct pnfs_osd_data_map olo_map; + u32 olo_comps_index; + u32 olo_num_comps; + struct pnfs_osd_object_cred *olo_comps; +}; + +/* Device Address */ +enum pnfs_osd_targetid_type { + OBJ_TARGET_ANON = 1, + OBJ_TARGET_SCSI_NAME = 2, + OBJ_TARGET_SCSI_DEVICE_ID = 3, +}; + +/* union pnfs_osd_targetid4 switch (pnfs_osd_targetid_type4 oti_type) { + * case OBJ_TARGET_SCSI_NAME: + * string oti_scsi_name<>; + * + * case OBJ_TARGET_SCSI_DEVICE_ID: + * opaque oti_scsi_device_id<>; + * + * default: + * void; + * }; + * + * union pnfs_osd_targetaddr4 switch (bool ota_available) { + * case TRUE: + * netaddr4 ota_netaddr; + * case FALSE: + * void; + * }; + * + * struct pnfs_osd_deviceaddr4 { + * pnfs_osd_targetid4 oda_targetid; + * pnfs_osd_targetaddr4 oda_targetaddr; + * uint64_t oda_lun; + * opaque oda_systemid<>; + * pnfs_osd_object_cred4 oda_root_obj_cred; + * opaque oda_osdname<>; + * }; + */ +struct pnfs_osd_targetid { + u32 oti_type; + struct nfs4_string oti_scsi_device_id; +}; + +/* struct netaddr4 { + * // see struct rpcb in RFC1833 + * string r_netid<>; // network id + * string r_addr<>; // universal address + * }; + */ +struct pnfs_osd_net_addr { + struct nfs4_string r_netid; + struct nfs4_string r_addr; +}; + +struct pnfs_osd_targetaddr { + u32 ota_available; + struct pnfs_osd_net_addr ota_netaddr; +}; + +struct pnfs_osd_deviceaddr { + struct pnfs_osd_targetid oda_targetid; + struct pnfs_osd_targetaddr oda_targetaddr; + u8 oda_lun[8]; + struct nfs4_string oda_systemid; + struct pnfs_osd_object_cred oda_root_obj_cred; + struct nfs4_string oda_osdname; +}; + +/* LAYOUTCOMMIT: layoutupdate */ + +/* union pnfs_osd_deltaspaceused4 switch (bool dsu_valid) { + * case TRUE: + * int64_t dsu_delta; + * case FALSE: + * void; + * }; + * + * struct pnfs_osd_layoutupdate4 { + * pnfs_osd_deltaspaceused4 olu_delta_space_used; + * bool olu_ioerr_flag; + * }; + */ +struct pnfs_osd_layoutupdate { + u32 dsu_valid; + s64 dsu_delta; + u32 olu_ioerr_flag; +}; + +/* LAYOUTRETURN: I/O Rrror Report */ + +enum pnfs_osd_errno { + PNFS_OSD_ERR_EIO = 1, + PNFS_OSD_ERR_NOT_FOUND = 2, + PNFS_OSD_ERR_NO_SPACE = 3, + PNFS_OSD_ERR_BAD_CRED = 4, + PNFS_OSD_ERR_NO_ACCESS = 5, + PNFS_OSD_ERR_UNREACHABLE = 6, + PNFS_OSD_ERR_RESOURCE = 7 +}; + +/* struct pnfs_osd_ioerr4 { + * pnfs_osd_objid4 oer_component; + * length4 oer_comp_offset; + * length4 oer_comp_length; + * bool oer_iswrite; + * pnfs_osd_errno4 oer_errno; + * }; + */ +struct pnfs_osd_ioerr { + struct pnfs_osd_objid oer_component; + u64 oer_comp_offset; + u64 oer_comp_length; + u32 oer_iswrite; + u32 oer_errno; +}; + +/* OSD XDR Client API */ +/* Layout helpers */ +/* Layout decoding is done in two parts: + * 1. First Call pnfs_osd_xdr_decode_layout_map to read in only the header part + * of the layout. @iter members need not be initialized. + * Returned: + * @layout members are set. (@layout->olo_comps set to NULL). + * + * Zero on success, or negative error if passed xdr is broken. + * + * 2. 2nd Call pnfs_osd_xdr_decode_layout_comp() in a loop until it returns + * false, to decode the next component. + * Returned: + * true if there is more to decode or false if we are done or error. + * + * Example: + * struct pnfs_osd_xdr_decode_layout_iter iter; + * struct pnfs_osd_layout layout; + * struct pnfs_osd_object_cred comp; + * int status; + * + * status = pnfs_osd_xdr_decode_layout_map(&layout, &iter, xdr); + * if (unlikely(status)) + * goto err; + * while(pnfs_osd_xdr_decode_layout_comp(&comp, &iter, xdr, &status)) { + * // All of @comp strings point to inside the xdr_buffer + * // or scrach buffer. Copy them out to user memory eg. + * copy_single_comp(dest_comp++, &comp); + * } + * if (unlikely(status)) + * goto err; + */ + +struct pnfs_osd_xdr_decode_layout_iter { + unsigned total_comps; + unsigned decoded_comps; +}; + +extern int pnfs_osd_xdr_decode_layout_map(struct pnfs_osd_layout *layout, + struct pnfs_osd_xdr_decode_layout_iter *iter, struct xdr_stream *xdr); + +extern bool pnfs_osd_xdr_decode_layout_comp(struct pnfs_osd_object_cred *comp, + struct pnfs_osd_xdr_decode_layout_iter *iter, struct xdr_stream *xdr, + int *err); + +/* Device Info helpers */ + +/* Note: All strings inside @deviceaddr point to space inside @p. + * @p should stay valid while @deviceaddr is in use. + */ +extern void pnfs_osd_xdr_decode_deviceaddr( + struct pnfs_osd_deviceaddr *deviceaddr, __be32 *p); + +/* layoutupdate (layout_commit) xdr helpers */ +extern int +pnfs_osd_xdr_encode_layoutupdate(struct xdr_stream *xdr, + struct pnfs_osd_layoutupdate *lou); + +/* osd_ioerror encoding (layout_return) */ +extern __be32 *pnfs_osd_xdr_ioerr_reserve_space(struct xdr_stream *xdr); +extern void pnfs_osd_xdr_encode_ioerr(__be32 *p, struct pnfs_osd_ioerr *ioerr); + +#endif /* __PNFS_OSD_XDR_H__ */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/pnfs_osd_xdr.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/pnfs_osd_xdr.h.yml new file mode 100644 index 00000000000..1ea4c4bfdae --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/pnfs_osd_xdr.h.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2007 Panasas Inc. year of first publication +holders: + - Panasas Inc. year of first publication diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/rslib.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/rslib.h new file mode 100644 index 00000000000..362e10ce2ca --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/rslib.h @@ -0,0 +1,131 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Generic Reed Solomon encoder / decoder library + * + * Copyright (C) 2004 Thomas Gleixner (tglx@linutronix.de) + * + * RS code lifted from reed solomon library written by Phil Karn + * Copyright 2002 Phil Karn, KA9Q + */ +#ifndef _RSLIB_H_ +#define _RSLIB_H_ + +#include +#include /* for gfp_t */ +#include /* for GFP_KERNEL */ + +/** + * struct rs_codec - rs codec data + * + * @mm: Bits per symbol + * @nn: Symbols per block (= (1<mm = number of bits per symbol + * rs->nn = (2^rs->mm) - 1 + * + * Simple arithmetic modulo would return a wrong result for values + * >= 3 * rs->nn +*/ +static inline int rs_modnn(struct rs_codec *rs, int x) +{ + while (x >= rs->nn) { + x -= rs->nn; + x = (x >> rs->mm) + (x & rs->nn); + } + return x; +} + +#endif \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/rslib.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/rslib.h.yml new file mode 100644 index 00000000000..b7ee6a6f338 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/rslib.h.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2004 Thomas Gleixner (tglx@linutronix.de) + - Copyright 2002 Phil Karn, KA9Q +holders: + - Thomas Gleixner + - Phil Karn, KA9Q +authors: + - Phil Karn diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/videodev2.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/videodev2.h new file mode 100644 index 00000000000..f620634f483 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/videodev2.h @@ -0,0 +1,62 @@ +/* + * Video for Linux Two header file + * + * Copyright (C) 1999-2012 the contributors + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Alternatively you can redistribute this file under the terms of the + * BSD license as stated below: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. The names of its contributors may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Header file for v4l or V4L2 drivers and applications + * with public API. + * All kernel-specific stuff were moved to media/v4l2-dev.h, so + * no #if __KERNEL tests are allowed here + * + * See https://linuxtv.org for more info + * + * Author: Bill Dirks + * Justin Schoeman + * Hans Verkuil + * et al. + */ +#ifndef __LINUX_VIDEODEV2_H +#define __LINUX_VIDEODEV2_H + +#include /* need struct timeval */ +#include + +#endif /* __LINUX_VIDEODEV2_H */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/videodev2.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/videodev2.h.yml new file mode 100644 index 00000000000..33bfdd27c68 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/videodev2.h.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999-2012 the contributors +holders: + - the contributors +authors: + - Bill Dirks Justin Schoeman Hans Verkuil diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/ww_mutex.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/ww_mutex.h new file mode 100644 index 00000000000..16e616b6b4b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/ww_mutex.h @@ -0,0 +1,372 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Wound/Wait Mutexes: blocking mutual exclusion locks with deadlock avoidance + * + * Original mutex implementation started by Ingo Molnar: + * + * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar + * + * Wait/Die implementation: + * Copyright (C) 2013 Canonical Ltd. + * Choice of algorithm: + * Copyright (C) 2018 WMWare Inc. + * + * This file contains the main data structure and API definitions. + */ + +#ifndef __LINUX_WW_MUTEX_H +#define __LINUX_WW_MUTEX_H + +#include + +struct ww_class { + atomic_long_t stamp; + struct lock_class_key acquire_key; + struct lock_class_key mutex_key; + const char *acquire_name; + const char *mutex_name; + unsigned int is_wait_die; +}; + +struct ww_acquire_ctx { + struct task_struct *task; + unsigned long stamp; + unsigned int acquired; + unsigned short wounded; + unsigned short is_wait_die; +#ifdef CONFIG_DEBUG_MUTEXES + unsigned int done_acquire; + struct ww_class *ww_class; + struct ww_mutex *contending_lock; +#endif +#ifdef CONFIG_DEBUG_LOCK_ALLOC + struct lockdep_map dep_map; +#endif +#ifdef CONFIG_DEBUG_WW_MUTEX_SLOWPATH + unsigned int deadlock_inject_interval; + unsigned int deadlock_inject_countdown; +#endif +}; + +struct ww_mutex { + struct mutex base; + struct ww_acquire_ctx *ctx; +#ifdef CONFIG_DEBUG_MUTEXES + struct ww_class *ww_class; +#endif +}; + +#ifdef CONFIG_DEBUG_LOCK_ALLOC +# define __WW_CLASS_MUTEX_INITIALIZER(lockname, class) \ + , .ww_class = class +#else +# define __WW_CLASS_MUTEX_INITIALIZER(lockname, class) +#endif + +#define __WW_CLASS_INITIALIZER(ww_class, _is_wait_die) \ + { .stamp = ATOMIC_LONG_INIT(0) \ + , .acquire_name = #ww_class "_acquire" \ + , .mutex_name = #ww_class "_mutex" \ + , .is_wait_die = _is_wait_die } + +#define __WW_MUTEX_INITIALIZER(lockname, class) \ + { .base = __MUTEX_INITIALIZER(lockname.base) \ + __WW_CLASS_MUTEX_INITIALIZER(lockname, class) } + +#define DEFINE_WD_CLASS(classname) \ + struct ww_class classname = __WW_CLASS_INITIALIZER(classname, 1) + +#define DEFINE_WW_CLASS(classname) \ + struct ww_class classname = __WW_CLASS_INITIALIZER(classname, 0) + +#define DEFINE_WW_MUTEX(mutexname, ww_class) \ + struct ww_mutex mutexname = __WW_MUTEX_INITIALIZER(mutexname, ww_class) + +/** + * ww_mutex_init - initialize the w/w mutex + * @lock: the mutex to be initialized + * @ww_class: the w/w class the mutex should belong to + * + * Initialize the w/w mutex to unlocked state and associate it with the given + * class. + * + * It is not allowed to initialize an already locked mutex. + */ +static inline void ww_mutex_init(struct ww_mutex *lock, + struct ww_class *ww_class) +{ + __mutex_init(&lock->base, ww_class->mutex_name, &ww_class->mutex_key); + lock->ctx = NULL; +#ifdef CONFIG_DEBUG_MUTEXES + lock->ww_class = ww_class; +#endif +} + +/** + * ww_acquire_init - initialize a w/w acquire context + * @ctx: w/w acquire context to initialize + * @ww_class: w/w class of the context + * + * Initializes an context to acquire multiple mutexes of the given w/w class. + * + * Context-based w/w mutex acquiring can be done in any order whatsoever within + * a given lock class. Deadlocks will be detected and handled with the + * wait/die logic. + * + * Mixing of context-based w/w mutex acquiring and single w/w mutex locking can + * result in undetected deadlocks and is so forbidden. Mixing different contexts + * for the same w/w class when acquiring mutexes can also result in undetected + * deadlocks, and is hence also forbidden. Both types of abuse will be caught by + * enabling CONFIG_PROVE_LOCKING. + * + * Nesting of acquire contexts for _different_ w/w classes is possible, subject + * to the usual locking rules between different lock classes. + * + * An acquire context must be released with ww_acquire_fini by the same task + * before the memory is freed. It is recommended to allocate the context itself + * on the stack. + */ +static inline void ww_acquire_init(struct ww_acquire_ctx *ctx, + struct ww_class *ww_class) +{ + ctx->task = current; + ctx->stamp = atomic_long_inc_return_relaxed(&ww_class->stamp); + ctx->acquired = 0; + ctx->wounded = false; + ctx->is_wait_die = ww_class->is_wait_die; +#ifdef CONFIG_DEBUG_MUTEXES + ctx->ww_class = ww_class; + ctx->done_acquire = 0; + ctx->contending_lock = NULL; +#endif +#ifdef CONFIG_DEBUG_LOCK_ALLOC + debug_check_no_locks_freed((void *)ctx, sizeof(*ctx)); + lockdep_init_map(&ctx->dep_map, ww_class->acquire_name, + &ww_class->acquire_key, 0); + mutex_acquire(&ctx->dep_map, 0, 0, _RET_IP_); +#endif +#ifdef CONFIG_DEBUG_WW_MUTEX_SLOWPATH + ctx->deadlock_inject_interval = 1; + ctx->deadlock_inject_countdown = ctx->stamp & 0xf; +#endif +} + +/** + * ww_acquire_done - marks the end of the acquire phase + * @ctx: the acquire context + * + * Marks the end of the acquire phase, any further w/w mutex lock calls using + * this context are forbidden. + * + * Calling this function is optional, it is just useful to document w/w mutex + * code and clearly designated the acquire phase from actually using the locked + * data structures. + */ +static inline void ww_acquire_done(struct ww_acquire_ctx *ctx) +{ +#ifdef CONFIG_DEBUG_MUTEXES + lockdep_assert_held(ctx); + + DEBUG_LOCKS_WARN_ON(ctx->done_acquire); + ctx->done_acquire = 1; +#endif +} + +/** + * ww_acquire_fini - releases a w/w acquire context + * @ctx: the acquire context to free + * + * Releases a w/w acquire context. This must be called _after_ all acquired w/w + * mutexes have been released with ww_mutex_unlock. + */ +static inline void ww_acquire_fini(struct ww_acquire_ctx *ctx) +{ +#ifdef CONFIG_DEBUG_MUTEXES + mutex_release(&ctx->dep_map, 0, _THIS_IP_); + + DEBUG_LOCKS_WARN_ON(ctx->acquired); + if (!IS_ENABLED(CONFIG_PROVE_LOCKING)) + /* + * lockdep will normally handle this, + * but fail without anyway + */ + ctx->done_acquire = 1; + + if (!IS_ENABLED(CONFIG_DEBUG_LOCK_ALLOC)) + /* ensure ww_acquire_fini will still fail if called twice */ + ctx->acquired = ~0U; +#endif +} + +/** + * ww_mutex_lock - acquire the w/w mutex + * @lock: the mutex to be acquired + * @ctx: w/w acquire context, or NULL to acquire only a single lock. + * + * Lock the w/w mutex exclusively for this task. + * + * Deadlocks within a given w/w class of locks are detected and handled with the + * wait/die algorithm. If the lock isn't immediately available this function + * will either sleep until it is (wait case). Or it selects the current context + * for backing off by returning -EDEADLK (die case). Trying to acquire the + * same lock with the same context twice is also detected and signalled by + * returning -EALREADY. Returns 0 if the mutex was successfully acquired. + * + * In the die case the caller must release all currently held w/w mutexes for + * the given context and then wait for this contending lock to be available by + * calling ww_mutex_lock_slow. Alternatively callers can opt to not acquire this + * lock and proceed with trying to acquire further w/w mutexes (e.g. when + * scanning through lru lists trying to free resources). + * + * The mutex must later on be released by the same task that + * acquired it. The task may not exit without first unlocking the mutex. Also, + * kernel memory where the mutex resides must not be freed with the mutex still + * locked. The mutex must first be initialized (or statically defined) before it + * can be locked. memset()-ing the mutex to 0 is not allowed. The mutex must be + * of the same w/w lock class as was used to initialize the acquire context. + * + * A mutex acquired with this function must be released with ww_mutex_unlock. + */ +extern int /* __must_check */ ww_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx); + +/** + * ww_mutex_lock_interruptible - acquire the w/w mutex, interruptible + * @lock: the mutex to be acquired + * @ctx: w/w acquire context + * + * Lock the w/w mutex exclusively for this task. + * + * Deadlocks within a given w/w class of locks are detected and handled with the + * wait/die algorithm. If the lock isn't immediately available this function + * will either sleep until it is (wait case). Or it selects the current context + * for backing off by returning -EDEADLK (die case). Trying to acquire the + * same lock with the same context twice is also detected and signalled by + * returning -EALREADY. Returns 0 if the mutex was successfully acquired. If a + * signal arrives while waiting for the lock then this function returns -EINTR. + * + * In the die case the caller must release all currently held w/w mutexes for + * the given context and then wait for this contending lock to be available by + * calling ww_mutex_lock_slow_interruptible. Alternatively callers can opt to + * not acquire this lock and proceed with trying to acquire further w/w mutexes + * (e.g. when scanning through lru lists trying to free resources). + * + * The mutex must later on be released by the same task that + * acquired it. The task may not exit without first unlocking the mutex. Also, + * kernel memory where the mutex resides must not be freed with the mutex still + * locked. The mutex must first be initialized (or statically defined) before it + * can be locked. memset()-ing the mutex to 0 is not allowed. The mutex must be + * of the same w/w lock class as was used to initialize the acquire context. + * + * A mutex acquired with this function must be released with ww_mutex_unlock. + */ +extern int __must_check ww_mutex_lock_interruptible(struct ww_mutex *lock, + struct ww_acquire_ctx *ctx); + +/** + * ww_mutex_lock_slow - slowpath acquiring of the w/w mutex + * @lock: the mutex to be acquired + * @ctx: w/w acquire context + * + * Acquires a w/w mutex with the given context after a die case. This function + * will sleep until the lock becomes available. + * + * The caller must have released all w/w mutexes already acquired with the + * context and then call this function on the contended lock. + * + * Afterwards the caller may continue to (re)acquire the other w/w mutexes it + * needs with ww_mutex_lock. Note that the -EALREADY return code from + * ww_mutex_lock can be used to avoid locking this contended mutex twice. + * + * It is forbidden to call this function with any other w/w mutexes associated + * with the context held. It is forbidden to call this on anything else than the + * contending mutex. + * + * Note that the slowpath lock acquiring can also be done by calling + * ww_mutex_lock directly. This function here is simply to help w/w mutex + * locking code readability by clearly denoting the slowpath. + */ +static inline void +ww_mutex_lock_slow(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) +{ + int ret; +#ifdef CONFIG_DEBUG_MUTEXES + DEBUG_LOCKS_WARN_ON(!ctx->contending_lock); +#endif + ret = ww_mutex_lock(lock, ctx); + (void)ret; +} + +/** + * ww_mutex_lock_slow_interruptible - slowpath acquiring of the w/w mutex, interruptible + * @lock: the mutex to be acquired + * @ctx: w/w acquire context + * + * Acquires a w/w mutex with the given context after a die case. This function + * will sleep until the lock becomes available and returns 0 when the lock has + * been acquired. If a signal arrives while waiting for the lock then this + * function returns -EINTR. + * + * The caller must have released all w/w mutexes already acquired with the + * context and then call this function on the contended lock. + * + * Afterwards the caller may continue to (re)acquire the other w/w mutexes it + * needs with ww_mutex_lock. Note that the -EALREADY return code from + * ww_mutex_lock can be used to avoid locking this contended mutex twice. + * + * It is forbidden to call this function with any other w/w mutexes associated + * with the given context held. It is forbidden to call this on anything else + * than the contending mutex. + * + * Note that the slowpath lock acquiring can also be done by calling + * ww_mutex_lock_interruptible directly. This function here is simply to help + * w/w mutex locking code readability by clearly denoting the slowpath. + */ +static inline int __must_check +ww_mutex_lock_slow_interruptible(struct ww_mutex *lock, + struct ww_acquire_ctx *ctx) +{ +#ifdef CONFIG_DEBUG_MUTEXES + DEBUG_LOCKS_WARN_ON(!ctx->contending_lock); +#endif + return ww_mutex_lock_interruptible(lock, ctx); +} + +extern void ww_mutex_unlock(struct ww_mutex *lock); + +/** + * ww_mutex_trylock - tries to acquire the w/w mutex without acquire context + * @lock: mutex to lock + * + * Trylocks a mutex without acquire context, so no deadlock detection is + * possible. Returns 1 if the mutex has been acquired successfully, 0 otherwise. + */ +static inline int __must_check ww_mutex_trylock(struct ww_mutex *lock) +{ + return mutex_trylock(&lock->base); +} + +/*** + * ww_mutex_destroy - mark a w/w mutex unusable + * @lock: the mutex to be destroyed + * + * This function marks the mutex uninitialized, and any subsequent + * use of the mutex is forbidden. The mutex must not be locked when + * this function is called. + */ +static inline void ww_mutex_destroy(struct ww_mutex *lock) +{ + mutex_destroy(&lock->base); +} + +/** + * ww_mutex_is_locked - is the w/w mutex locked + * @lock: the mutex to be queried + * + * Returns 1 if the mutex is locked, 0 if unlocked. + */ +static inline bool ww_mutex_is_locked(struct ww_mutex *lock) +{ + return mutex_is_locked(&lock->base); +} + +#endif \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/ww_mutex.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/ww_mutex.h.yml new file mode 100644 index 00000000000..7ea4d9653dd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/linux/ww_mutex.h.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar + - Copyright (c) 2013 Canonical Ltd. Choice + - Copyright (c) 2018 WMWare Inc. +holders: + - Red Hat, Inc., Ingo Molnar + - Canonical Ltd. Choice + - WMWare Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/media/dvb_frontend.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/media/dvb_frontend.h new file mode 100644 index 00000000000..c7265dae287 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/media/dvb_frontend.h @@ -0,0 +1,824 @@ +/* + * dvb_frontend.h + * + * The Digital TV Frontend kABI defines a driver-internal interface for + * registering low-level, hardware specific driver to a hardware independent + * frontend layer. + * + * Copyright (C) 2001 convergence integrated media GmbH + * Copyright (C) 2004 convergence GmbH + * + * Written by Ralph Metzler + * Overhauled by Holger Waechtler + * Kernel I2C stuff by Michael Hunold + * + * This program 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 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 Lesser General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + */ + +#ifndef _DVB_FRONTEND_H_ +#define _DVB_FRONTEND_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +/* + * Maximum number of Delivery systems per frontend. It + * should be smaller or equal to 32 + */ +#define MAX_DELSYS 8 + +/* Helper definitions to be used at frontend drivers */ +#define kHz 1000UL +#define MHz 1000000UL + +/** + * struct dvb_frontend_tune_settings - parameters to adjust frontend tuning + * + * @min_delay_ms: minimum delay for tuning, in ms + * @step_size: step size between two consecutive frequencies + * @max_drift: maximum drift + * + * NOTE: step_size is in Hz, for terrestrial/cable or kHz for satellite + */ +struct dvb_frontend_tune_settings { + int min_delay_ms; + int step_size; + int max_drift; +}; + +struct dvb_frontend; + +/** + * struct dvb_tuner_info - Frontend name and min/max ranges/bandwidths + * + * @name: name of the Frontend + * @frequency_min_hz: minimal frequency supported in Hz + * @frequency_max_hz: maximum frequency supported in Hz + * @frequency_step_hz: frequency step in Hz + * @bandwidth_min: minimal frontend bandwidth supported + * @bandwidth_max: maximum frontend bandwidth supported + * @bandwidth_step: frontend bandwidth step + */ +struct dvb_tuner_info { + char name[128]; + + u32 frequency_min_hz; + u32 frequency_max_hz; + u32 frequency_step_hz; + + u32 bandwidth_min; + u32 bandwidth_max; + u32 bandwidth_step; +}; + +/** + * struct analog_parameters - Parameters to tune into an analog/radio channel + * + * @frequency: Frequency used by analog TV tuner (either in 62.5 kHz step, + * for TV, or 62.5 Hz for radio) + * @mode: Tuner mode, as defined on enum v4l2_tuner_type + * @audmode: Audio mode as defined for the rxsubchans field at videodev2.h, + * e. g. V4L2_TUNER_MODE_* + * @std: TV standard bitmap as defined at videodev2.h, e. g. V4L2_STD_* + * + * Hybrid tuners should be supported by both V4L2 and DVB APIs. This + * struct contains the data that are used by the V4L2 side. To avoid + * dependencies from V4L2 headers, all enums here are declared as integers. + */ +struct analog_parameters { + unsigned int frequency; + unsigned int mode; + unsigned int audmode; + u64 std; +}; + +/** + * enum dvbfe_algo - defines the algorithm used to tune into a channel + * + * @DVBFE_ALGO_HW: Hardware Algorithm - + * Devices that support this algorithm do everything in hardware + * and no software support is needed to handle them. + * Requesting these devices to LOCK is the only thing required, + * device is supposed to do everything in the hardware. + * + * @DVBFE_ALGO_SW: Software Algorithm - + * These are dumb devices, that require software to do everything + * + * @DVBFE_ALGO_CUSTOM: Customizable Agorithm - + * Devices having this algorithm can be customized to have specific + * algorithms in the frontend driver, rather than simply doing a + * software zig-zag. In this case the zigzag maybe hardware assisted + * or it maybe completely done in hardware. In all cases, usage of + * this algorithm, in conjunction with the search and track + * callbacks, utilizes the driver specific algorithm. + * + * @DVBFE_ALGO_RECOVERY: Recovery Algorithm - + * These devices have AUTO recovery capabilities from LOCK failure + */ +enum dvbfe_algo { + DVBFE_ALGO_HW = (1 << 0), + DVBFE_ALGO_SW = (1 << 1), + DVBFE_ALGO_CUSTOM = (1 << 2), + DVBFE_ALGO_RECOVERY = (1 << 31) +}; + +/** + * enum dvbfe_search - search callback possible return status + * + * @DVBFE_ALGO_SEARCH_SUCCESS: + * The frontend search algorithm completed and returned successfully + * + * @DVBFE_ALGO_SEARCH_ASLEEP: + * The frontend search algorithm is sleeping + * + * @DVBFE_ALGO_SEARCH_FAILED: + * The frontend search for a signal failed + * + * @DVBFE_ALGO_SEARCH_INVALID: + * The frontend search algorith was probably supplied with invalid + * parameters and the search is an invalid one + * + * @DVBFE_ALGO_SEARCH_ERROR: + * The frontend search algorithm failed due to some error + * + * @DVBFE_ALGO_SEARCH_AGAIN: + * The frontend search algorithm was requested to search again + */ +enum dvbfe_search { + DVBFE_ALGO_SEARCH_SUCCESS = (1 << 0), + DVBFE_ALGO_SEARCH_ASLEEP = (1 << 1), + DVBFE_ALGO_SEARCH_FAILED = (1 << 2), + DVBFE_ALGO_SEARCH_INVALID = (1 << 3), + DVBFE_ALGO_SEARCH_AGAIN = (1 << 4), + DVBFE_ALGO_SEARCH_ERROR = (1 << 31), +}; + +/** + * struct dvb_tuner_ops - Tuner information and callbacks + * + * @info: embedded &struct dvb_tuner_info with tuner properties + * @release: callback function called when frontend is detached. + * drivers should free any allocated memory. + * @init: callback function used to initialize the tuner device. + * @sleep: callback function used to put the tuner to sleep. + * @suspend: callback function used to inform that the Kernel will + * suspend. + * @resume: callback function used to inform that the Kernel is + * resuming from suspend. + * @set_params: callback function used to inform the tuner to tune + * into a digital TV channel. The properties to be used + * are stored at &struct dvb_frontend.dtv_property_cache. + * The tuner demod can change the parameters to reflect + * the changes needed for the channel to be tuned, and + * update statistics. This is the recommended way to set + * the tuner parameters and should be used on newer + * drivers. + * @set_analog_params: callback function used to tune into an analog TV + * channel on hybrid tuners. It passes @analog_parameters + * to the driver. + * @set_config: callback function used to send some tuner-specific + * parameters. + * @get_frequency: get the actual tuned frequency + * @get_bandwidth: get the bandwitdh used by the low pass filters + * @get_if_frequency: get the Intermediate Frequency, in Hz. For baseband, + * should return 0. + * @get_status: returns the frontend lock status + * @get_rf_strength: returns the RF signal strength. Used mostly to support + * analog TV and radio. Digital TV should report, instead, + * via DVBv5 API (&struct dvb_frontend.dtv_property_cache). + * @get_afc: Used only by analog TV core. Reports the frequency + * drift due to AFC. + * @calc_regs: callback function used to pass register data settings + * for simple tuners. Shouldn't be used on newer drivers. + * @set_frequency: Set a new frequency. Shouldn't be used on newer drivers. + * @set_bandwidth: Set a new frequency. Shouldn't be used on newer drivers. + * + * NOTE: frequencies used on @get_frequency and @set_frequency are in Hz for + * terrestrial/cable or kHz for satellite. + * + */ +struct dvb_tuner_ops { + + struct dvb_tuner_info info; + + void (*release)(struct dvb_frontend *fe); + int (*init)(struct dvb_frontend *fe); + int (*sleep)(struct dvb_frontend *fe); + int (*suspend)(struct dvb_frontend *fe); + int (*resume)(struct dvb_frontend *fe); + + /* This is the recomended way to set the tuner */ + int (*set_params)(struct dvb_frontend *fe); + int (*set_analog_params)(struct dvb_frontend *fe, struct analog_parameters *p); + + int (*set_config)(struct dvb_frontend *fe, void *priv_cfg); + + int (*get_frequency)(struct dvb_frontend *fe, u32 *frequency); + int (*get_bandwidth)(struct dvb_frontend *fe, u32 *bandwidth); + int (*get_if_frequency)(struct dvb_frontend *fe, u32 *frequency); + +#define TUNER_STATUS_LOCKED 1 +#define TUNER_STATUS_STEREO 2 + int (*get_status)(struct dvb_frontend *fe, u32 *status); + int (*get_rf_strength)(struct dvb_frontend *fe, u16 *strength); + int (*get_afc)(struct dvb_frontend *fe, s32 *afc); + + /* + * This is support for demods like the mt352 - fills out the supplied + * buffer with what to write. + * + * Don't use on newer drivers. + */ + int (*calc_regs)(struct dvb_frontend *fe, u8 *buf, int buf_len); + + /* + * These are provided separately from set_params in order to + * facilitate silicon tuners which require sophisticated tuning loops, + * controlling each parameter separately. + * + * Don't use on newer drivers. + */ + int (*set_frequency)(struct dvb_frontend *fe, u32 frequency); + int (*set_bandwidth)(struct dvb_frontend *fe, u32 bandwidth); +}; + +/** + * struct analog_demod_info - Information struct for analog TV part of the demod + * + * @name: Name of the analog TV demodulator + */ +struct analog_demod_info { + char *name; +}; + +/** + * struct analog_demod_ops - Demodulation information and callbacks for + * analog TV and radio + * + * @info: pointer to struct analog_demod_info + * @set_params: callback function used to inform the demod to set the + * demodulator parameters needed to decode an analog or + * radio channel. The properties are passed via + * &struct analog_params. + * @has_signal: returns 0xffff if has signal, or 0 if it doesn't. + * @get_afc: Used only by analog TV core. Reports the frequency + * drift due to AFC. + * @tuner_status: callback function that returns tuner status bits, e. g. + * %TUNER_STATUS_LOCKED and %TUNER_STATUS_STEREO. + * @standby: set the tuner to standby mode. + * @release: callback function called when frontend is detached. + * drivers should free any allocated memory. + * @i2c_gate_ctrl: controls the I2C gate. Newer drivers should use I2C + * mux support instead. + * @set_config: callback function used to send some tuner-specific + * parameters. + */ +struct analog_demod_ops { + + struct analog_demod_info info; + + void (*set_params)(struct dvb_frontend *fe, + struct analog_parameters *params); + int (*has_signal)(struct dvb_frontend *fe, u16 *signal); + int (*get_afc)(struct dvb_frontend *fe, s32 *afc); + void (*tuner_status)(struct dvb_frontend *fe); + void (*standby)(struct dvb_frontend *fe); + void (*release)(struct dvb_frontend *fe); + int (*i2c_gate_ctrl)(struct dvb_frontend *fe, int enable); + + /** This is to allow setting tuner-specific configuration */ + int (*set_config)(struct dvb_frontend *fe, void *priv_cfg); +}; + +struct dtv_frontend_properties; + +/** + * struct dvb_frontend_internal_info - Frontend properties and capabilities + * + * @name: Name of the frontend + * @frequency_min_hz: Minimal frequency supported by the frontend. + * @frequency_max_hz: Minimal frequency supported by the frontend. + * @frequency_stepsize_hz: All frequencies are multiple of this value. + * @frequency_tolerance_hz: Frequency tolerance. + * @symbol_rate_min: Minimal symbol rate, in bauds + * (for Cable/Satellite systems). + * @symbol_rate_max: Maximal symbol rate, in bauds + * (for Cable/Satellite systems). + * @symbol_rate_tolerance: Maximal symbol rate tolerance, in ppm + * (for Cable/Satellite systems). + * @caps: Capabilities supported by the frontend, + * as specified in &enum fe_caps. + */ +struct dvb_frontend_internal_info { + char name[128]; + u32 frequency_min_hz; + u32 frequency_max_hz; + u32 frequency_stepsize_hz; + u32 frequency_tolerance_hz; + u32 symbol_rate_min; + u32 symbol_rate_max; + u32 symbol_rate_tolerance; + enum fe_caps caps; +}; + +/** + * struct dvb_frontend_ops - Demodulation information and callbacks for + * ditialt TV + * + * @info: embedded &struct dvb_tuner_info with tuner properties + * @delsys: Delivery systems supported by the frontend + * @detach: callback function called when frontend is detached. + * drivers should clean up, but not yet free the &struct + * dvb_frontend allocation. + * @release: callback function called when frontend is ready to be + * freed. + * drivers should free any allocated memory. + * @release_sec: callback function requesting that the Satelite Equipment + * Control (SEC) driver to release and free any memory + * allocated by the driver. + * @init: callback function used to initialize the tuner device. + * @sleep: callback function used to put the tuner to sleep. + * @write: callback function used by some demod legacy drivers to + * allow other drivers to write data into their registers. + * Should not be used on new drivers. + * @tune: callback function used by demod drivers that use + * @DVBFE_ALGO_HW to tune into a frequency. + * @get_frontend_algo: returns the desired hardware algorithm. + * @set_frontend: callback function used to inform the demod to set the + * parameters for demodulating a digital TV channel. + * The properties to be used are stored at &struct + * dvb_frontend.dtv_property_cache. The demod can change + * the parameters to reflect the changes needed for the + * channel to be decoded, and update statistics. + * @get_tune_settings: callback function + * @get_frontend: callback function used to inform the parameters + * actuall in use. The properties to be used are stored at + * &struct dvb_frontend.dtv_property_cache and update + * statistics. Please notice that it should not return + * an error code if the statistics are not available + * because the demog is not locked. + * @read_status: returns the locking status of the frontend. + * @read_ber: legacy callback function to return the bit error rate. + * Newer drivers should provide such info via DVBv5 API, + * e. g. @set_frontend;/@get_frontend, implementing this + * callback only if DVBv3 API compatibility is wanted. + * @read_signal_strength: legacy callback function to return the signal + * strength. Newer drivers should provide such info via + * DVBv5 API, e. g. @set_frontend/@get_frontend, + * implementing this callback only if DVBv3 API + * compatibility is wanted. + * @read_snr: legacy callback function to return the Signal/Noise + * rate. Newer drivers should provide such info via + * DVBv5 API, e. g. @set_frontend/@get_frontend, + * implementing this callback only if DVBv3 API + * compatibility is wanted. + * @read_ucblocks: legacy callback function to return the Uncorrected Error + * Blocks. Newer drivers should provide such info via + * DVBv5 API, e. g. @set_frontend/@get_frontend, + * implementing this callback only if DVBv3 API + * compatibility is wanted. + * @diseqc_reset_overload: callback function to implement the + * FE_DISEQC_RESET_OVERLOAD() ioctl (only Satellite) + * @diseqc_send_master_cmd: callback function to implement the + * FE_DISEQC_SEND_MASTER_CMD() ioctl (only Satellite). + * @diseqc_recv_slave_reply: callback function to implement the + * FE_DISEQC_RECV_SLAVE_REPLY() ioctl (only Satellite) + * @diseqc_send_burst: callback function to implement the + * FE_DISEQC_SEND_BURST() ioctl (only Satellite). + * @set_tone: callback function to implement the + * FE_SET_TONE() ioctl (only Satellite). + * @set_voltage: callback function to implement the + * FE_SET_VOLTAGE() ioctl (only Satellite). + * @enable_high_lnb_voltage: callback function to implement the + * FE_ENABLE_HIGH_LNB_VOLTAGE() ioctl (only Satellite). + * @dishnetwork_send_legacy_command: callback function to implement the + * FE_DISHNETWORK_SEND_LEGACY_CMD() ioctl (only Satellite). + * Drivers should not use this, except when the DVB + * core emulation fails to provide proper support (e.g. + * if @set_voltage takes more than 8ms to work), and + * when backward compatibility with this legacy API is + * required. + * @i2c_gate_ctrl: controls the I2C gate. Newer drivers should use I2C + * mux support instead. + * @ts_bus_ctrl: callback function used to take control of the TS bus. + * @set_lna: callback function to power on/off/auto the LNA. + * @search: callback function used on some custom algo search algos. + * @tuner_ops: pointer to &struct dvb_tuner_ops + * @analog_ops: pointer to &struct analog_demod_ops + */ +struct dvb_frontend_ops { + struct dvb_frontend_internal_info info; + + u8 delsys[MAX_DELSYS]; + + void (*detach)(struct dvb_frontend *fe); + void (*release)(struct dvb_frontend* fe); + void (*release_sec)(struct dvb_frontend* fe); + + int (*init)(struct dvb_frontend* fe); + int (*sleep)(struct dvb_frontend* fe); + + int (*write)(struct dvb_frontend* fe, const u8 buf[], int len); + + /* if this is set, it overrides the default swzigzag */ + int (*tune)(struct dvb_frontend* fe, + bool re_tune, + unsigned int mode_flags, + unsigned int *delay, + enum fe_status *status); + + /* get frontend tuning algorithm from the module */ + enum dvbfe_algo (*get_frontend_algo)(struct dvb_frontend *fe); + + /* these two are only used for the swzigzag code */ + int (*set_frontend)(struct dvb_frontend *fe); + int (*get_tune_settings)(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* settings); + + int (*get_frontend)(struct dvb_frontend *fe, + struct dtv_frontend_properties *props); + + int (*read_status)(struct dvb_frontend *fe, enum fe_status *status); + int (*read_ber)(struct dvb_frontend* fe, u32* ber); + int (*read_signal_strength)(struct dvb_frontend* fe, u16* strength); + int (*read_snr)(struct dvb_frontend* fe, u16* snr); + int (*read_ucblocks)(struct dvb_frontend* fe, u32* ucblocks); + + int (*diseqc_reset_overload)(struct dvb_frontend* fe); + int (*diseqc_send_master_cmd)(struct dvb_frontend* fe, struct dvb_diseqc_master_cmd* cmd); + int (*diseqc_recv_slave_reply)(struct dvb_frontend* fe, struct dvb_diseqc_slave_reply* reply); + int (*diseqc_send_burst)(struct dvb_frontend *fe, + enum fe_sec_mini_cmd minicmd); + int (*set_tone)(struct dvb_frontend *fe, enum fe_sec_tone_mode tone); + int (*set_voltage)(struct dvb_frontend *fe, + enum fe_sec_voltage voltage); + int (*enable_high_lnb_voltage)(struct dvb_frontend* fe, long arg); + int (*dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned long cmd); + int (*i2c_gate_ctrl)(struct dvb_frontend* fe, int enable); + int (*ts_bus_ctrl)(struct dvb_frontend* fe, int acquire); + int (*set_lna)(struct dvb_frontend *); + + /* + * These callbacks are for devices that implement their own + * tuning algorithms, rather than a simple swzigzag + */ + enum dvbfe_search (*search)(struct dvb_frontend *fe); + + struct dvb_tuner_ops tuner_ops; + struct analog_demod_ops analog_ops; +}; + +#ifdef __DVB_CORE__ +#define MAX_EVENT 8 + +/* Used only internally at dvb_frontend.c */ +struct dvb_fe_events { + struct dvb_frontend_event events[MAX_EVENT]; + int eventw; + int eventr; + int overflow; + wait_queue_head_t wait_queue; + struct mutex mtx; +}; +#endif + +/** + * struct dtv_frontend_properties - contains a list of properties that are + * specific to a digital TV standard. + * + * @frequency: frequency in Hz for terrestrial/cable or in kHz for + * Satellite + * @modulation: Frontend modulation type + * @voltage: SEC voltage (only Satellite) + * @sectone: SEC tone mode (only Satellite) + * @inversion: Spectral inversion + * @fec_inner: Forward error correction inner Code Rate + * @transmission_mode: Transmission Mode + * @bandwidth_hz: Bandwidth, in Hz. A zero value means that userspace + * wants to autodetect. + * @guard_interval: Guard Interval + * @hierarchy: Hierarchy + * @symbol_rate: Symbol Rate + * @code_rate_HP: high priority stream code rate + * @code_rate_LP: low priority stream code rate + * @pilot: Enable/disable/autodetect pilot tones + * @rolloff: Rolloff factor (alpha) + * @delivery_system: FE delivery system (e. g. digital TV standard) + * @interleaving: interleaving + * @isdbt_partial_reception: ISDB-T partial reception (only ISDB standard) + * @isdbt_sb_mode: ISDB-T Sound Broadcast (SB) mode (only ISDB standard) + * @isdbt_sb_subchannel: ISDB-T SB subchannel (only ISDB standard) + * @isdbt_sb_segment_idx: ISDB-T SB segment index (only ISDB standard) + * @isdbt_sb_segment_count: ISDB-T SB segment count (only ISDB standard) + * @isdbt_layer_enabled: ISDB Layer enabled (only ISDB standard) + * @layer: ISDB per-layer data (only ISDB standard) + * @layer.segment_count: Segment Count; + * @layer.fec: per layer code rate; + * @layer.modulation: per layer modulation; + * @layer.interleaving: per layer interleaving. + * @stream_id: If different than zero, enable substream filtering, if + * hardware supports (DVB-S2 and DVB-T2). + * @scrambling_sequence_index: Carries the index of the DVB-S2 physical layer + * scrambling sequence. + * @atscmh_fic_ver: Version number of the FIC (Fast Information Channel) + * signaling data (only ATSC-M/H) + * @atscmh_parade_id: Parade identification number (only ATSC-M/H) + * @atscmh_nog: Number of MH groups per MH subframe for a designated + * parade (only ATSC-M/H) + * @atscmh_tnog: Total number of MH groups including all MH groups + * belonging to all MH parades in one MH subframe + * (only ATSC-M/H) + * @atscmh_sgn: Start group number (only ATSC-M/H) + * @atscmh_prc: Parade repetition cycle (only ATSC-M/H) + * @atscmh_rs_frame_mode: Reed Solomon (RS) frame mode (only ATSC-M/H) + * @atscmh_rs_frame_ensemble: RS frame ensemble (only ATSC-M/H) + * @atscmh_rs_code_mode_pri: RS code mode pri (only ATSC-M/H) + * @atscmh_rs_code_mode_sec: RS code mode sec (only ATSC-M/H) + * @atscmh_sccc_block_mode: Series Concatenated Convolutional Code (SCCC) + * Block Mode (only ATSC-M/H) + * @atscmh_sccc_code_mode_a: SCCC code mode A (only ATSC-M/H) + * @atscmh_sccc_code_mode_b: SCCC code mode B (only ATSC-M/H) + * @atscmh_sccc_code_mode_c: SCCC code mode C (only ATSC-M/H) + * @atscmh_sccc_code_mode_d: SCCC code mode D (only ATSC-M/H) + * @lna: Power ON/OFF/AUTO the Linear Now-noise Amplifier (LNA) + * @strength: DVBv5 API statistics: Signal Strength + * @cnr: DVBv5 API statistics: Signal to Noise ratio of the + * (main) carrier + * @pre_bit_error: DVBv5 API statistics: pre-Viterbi bit error count + * @pre_bit_count: DVBv5 API statistics: pre-Viterbi bit count + * @post_bit_error: DVBv5 API statistics: post-Viterbi bit error count + * @post_bit_count: DVBv5 API statistics: post-Viterbi bit count + * @block_error: DVBv5 API statistics: block error count + * @block_count: DVBv5 API statistics: block count + * + * NOTE: derivated statistics like Uncorrected Error blocks (UCE) are + * calculated on userspace. + * + * Only a subset of the properties are needed for a given delivery system. + * For more info, consult the media_api.html with the documentation of the + * Userspace API. + */ +struct dtv_frontend_properties { + u32 frequency; + enum fe_modulation modulation; + + enum fe_sec_voltage voltage; + enum fe_sec_tone_mode sectone; + enum fe_spectral_inversion inversion; + enum fe_code_rate fec_inner; + enum fe_transmit_mode transmission_mode; + u32 bandwidth_hz; /* 0 = AUTO */ + enum fe_guard_interval guard_interval; + enum fe_hierarchy hierarchy; + u32 symbol_rate; + enum fe_code_rate code_rate_HP; + enum fe_code_rate code_rate_LP; + + enum fe_pilot pilot; + enum fe_rolloff rolloff; + + enum fe_delivery_system delivery_system; + + enum fe_interleaving interleaving; + + /* ISDB-T specifics */ + u8 isdbt_partial_reception; + u8 isdbt_sb_mode; + u8 isdbt_sb_subchannel; + u32 isdbt_sb_segment_idx; + u32 isdbt_sb_segment_count; + u8 isdbt_layer_enabled; + struct { + u8 segment_count; + enum fe_code_rate fec; + enum fe_modulation modulation; + u8 interleaving; + } layer[3]; + + /* Multistream specifics */ + u32 stream_id; + + /* Physical Layer Scrambling specifics */ + u32 scrambling_sequence_index; + + /* ATSC-MH specifics */ + u8 atscmh_fic_ver; + u8 atscmh_parade_id; + u8 atscmh_nog; + u8 atscmh_tnog; + u8 atscmh_sgn; + u8 atscmh_prc; + + u8 atscmh_rs_frame_mode; + u8 atscmh_rs_frame_ensemble; + u8 atscmh_rs_code_mode_pri; + u8 atscmh_rs_code_mode_sec; + u8 atscmh_sccc_block_mode; + u8 atscmh_sccc_code_mode_a; + u8 atscmh_sccc_code_mode_b; + u8 atscmh_sccc_code_mode_c; + u8 atscmh_sccc_code_mode_d; + + u32 lna; + + /* statistics data */ + struct dtv_fe_stats strength; + struct dtv_fe_stats cnr; + struct dtv_fe_stats pre_bit_error; + struct dtv_fe_stats pre_bit_count; + struct dtv_fe_stats post_bit_error; + struct dtv_fe_stats post_bit_count; + struct dtv_fe_stats block_error; + struct dtv_fe_stats block_count; +}; + +#define DVB_FE_NO_EXIT 0 +#define DVB_FE_NORMAL_EXIT 1 +#define DVB_FE_DEVICE_REMOVED 2 +#define DVB_FE_DEVICE_RESUME 3 + +/** + * struct dvb_frontend - Frontend structure to be used on drivers. + * + * @refcount: refcount to keep track of &struct dvb_frontend + * references + * @ops: embedded &struct dvb_frontend_ops + * @dvb: pointer to &struct dvb_adapter + * @demodulator_priv: demod private data + * @tuner_priv: tuner private data + * @frontend_priv: frontend private data + * @sec_priv: SEC private data + * @analog_demod_priv: Analog demod private data + * @dtv_property_cache: embedded &struct dtv_frontend_properties + * @callback: callback function used on some drivers to call + * either the tuner or the demodulator. + * @id: Frontend ID + * @exit: Used to inform the DVB core that the frontend + * thread should exit (usually, means that the hardware + * got disconnected. + */ + +struct dvb_frontend { + struct kref refcount; + struct dvb_frontend_ops ops; + struct dvb_adapter *dvb; + void *demodulator_priv; + void *tuner_priv; + void *frontend_priv; + void *sec_priv; + void *analog_demod_priv; + struct dtv_frontend_properties dtv_property_cache; +#define DVB_FRONTEND_COMPONENT_TUNER 0 +#define DVB_FRONTEND_COMPONENT_DEMOD 1 + int (*callback)(void *adapter_priv, int component, int cmd, int arg); + int id; + unsigned int exit; +}; + +/** + * dvb_register_frontend() - Registers a DVB frontend at the adapter + * + * @dvb: pointer to &struct dvb_adapter + * @fe: pointer to &struct dvb_frontend + * + * Allocate and initialize the private data needed by the frontend core to + * manage the frontend and calls dvb_register_device() to register a new + * frontend. It also cleans the property cache that stores the frontend + * parameters and selects the first available delivery system. + */ +int dvb_register_frontend(struct dvb_adapter *dvb, + struct dvb_frontend *fe); + +/** + * dvb_unregister_frontend() - Unregisters a DVB frontend + * + * @fe: pointer to &struct dvb_frontend + * + * Stops the frontend kthread, calls dvb_unregister_device() and frees the + * private frontend data allocated by dvb_register_frontend(). + * + * NOTE: This function doesn't frees the memory allocated by the demod, + * by the SEC driver and by the tuner. In order to free it, an explicit call to + * dvb_frontend_detach() is needed, after calling this function. + */ +int dvb_unregister_frontend(struct dvb_frontend *fe); + +/** + * dvb_frontend_detach() - Detaches and frees frontend specific data + * + * @fe: pointer to &struct dvb_frontend + * + * This function should be called after dvb_unregister_frontend(). It + * calls the SEC, tuner and demod release functions: + * &dvb_frontend_ops.release_sec, &dvb_frontend_ops.tuner_ops.release, + * &dvb_frontend_ops.analog_ops.release and &dvb_frontend_ops.release. + * + * If the driver is compiled with %CONFIG_MEDIA_ATTACH, it also decreases + * the module reference count, needed to allow userspace to remove the + * previously used DVB frontend modules. + */ +void dvb_frontend_detach(struct dvb_frontend *fe); + +/** + * dvb_frontend_suspend() - Suspends a Digital TV frontend + * + * @fe: pointer to &struct dvb_frontend + * + * This function prepares a Digital TV frontend to suspend. + * + * In order to prepare the tuner to suspend, if + * &dvb_frontend_ops.tuner_ops.suspend\(\) is available, it calls it. Otherwise, + * it will call &dvb_frontend_ops.tuner_ops.sleep\(\), if available. + * + * It will also call &dvb_frontend_ops.sleep\(\) to put the demod to suspend. + * + * The drivers should also call dvb_frontend_suspend\(\) as part of their + * handler for the &device_driver.suspend\(\). + */ +int dvb_frontend_suspend(struct dvb_frontend *fe); + +/** + * dvb_frontend_resume() - Resumes a Digital TV frontend + * + * @fe: pointer to &struct dvb_frontend + * + * This function resumes the usual operation of the tuner after resume. + * + * In order to resume the frontend, it calls the demod &dvb_frontend_ops.init\(\). + * + * If &dvb_frontend_ops.tuner_ops.resume\(\) is available, It, it calls it. + * Otherwise,t will call &dvb_frontend_ops.tuner_ops.init\(\), if available. + * + * Once tuner and demods are resumed, it will enforce that the SEC voltage and + * tone are restored to their previous values and wake up the frontend's + * kthread in order to retune the frontend. + * + * The drivers should also call dvb_frontend_resume() as part of their + * handler for the &device_driver.resume\(\). + */ +int dvb_frontend_resume(struct dvb_frontend *fe); + +/** + * dvb_frontend_reinitialise() - forces a reinitialisation at the frontend + * + * @fe: pointer to &struct dvb_frontend + * + * Calls &dvb_frontend_ops.init\(\) and &dvb_frontend_ops.tuner_ops.init\(\), + * and resets SEC tone and voltage (for Satellite systems). + * + * NOTE: Currently, this function is used only by one driver (budget-av). + * It seems to be due to address some special issue with that specific + * frontend. + */ +void dvb_frontend_reinitialise(struct dvb_frontend *fe); + +/** + * dvb_frontend_sleep_until() - Sleep for the amount of time given by + * add_usec parameter + * + * @waketime: pointer to &struct ktime_t + * @add_usec: time to sleep, in microseconds + * + * This function is used to measure the time required for the + * FE_DISHNETWORK_SEND_LEGACY_CMD() ioctl to work. It needs to be as precise + * as possible, as it affects the detection of the dish tone command at the + * satellite subsystem. + * + * Its used internally by the DVB frontend core, in order to emulate + * FE_DISHNETWORK_SEND_LEGACY_CMD() using the &dvb_frontend_ops.set_voltage\(\) + * callback. + * + * NOTE: it should not be used at the drivers, as the emulation for the + * legacy callback is provided by the Kernel. The only situation where this + * should be at the drivers is when there are some bugs at the hardware that + * would prevent the core emulation to work. On such cases, the driver would + * be writing a &dvb_frontend_ops.dishnetwork_send_legacy_command\(\) and + * calling this function directly. + */ +void dvb_frontend_sleep_until(ktime_t *waketime, u32 add_usec); + +#endif \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/media/dvb_frontend.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/media/dvb_frontend.h.yml new file mode 100644 index 00000000000..b1b4ce9e21b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/media/dvb_frontend.h.yml @@ -0,0 +1,13 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001 convergence integrated media GmbH + - Copyright (c) 2004 convergence GmbH +holders: + - convergence integrated media GmbH + - convergence GmbH +authors: + - Ralph Metzler Overhauled + - Michael Hunold diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/media/videobuf-dma-sg.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/media/videobuf-dma-sg.h new file mode 100644 index 00000000000..62af25ee9f5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/media/videobuf-dma-sg.h @@ -0,0 +1,104 @@ +/* + * helper functions for SG DMA video4linux capture buffers + * + * The functions expect the hardware being able to scatter gather + * (i.e. the buffers are not linear in physical memory, but fragmented + * into PAGE_SIZE chunks). They also assume the driver does not need + * to touch the video data. + * + * (c) 2007 Mauro Carvalho Chehab, + * + * Highly based on video-buf written originally by: + * (c) 2001,02 Gerd Knorr + * (c) 2006 Mauro Carvalho Chehab, + * (c) 2006 Ted Walther and John Sokol + * + * 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 + */ +#ifndef _VIDEOBUF_DMA_SG_H +#define _VIDEOBUF_DMA_SG_H + +#include + +/* --------------------------------------------------------------------- */ + +/* + * A small set of helper functions to manage buffers (both userland + * and kernel) for DMA. + * + * videobuf_dma_init_*() + * creates a buffer. The userland version takes a userspace + * pointer + length. The kernel version just wants the size and + * does memory allocation too using vmalloc_32(). + * + * videobuf_dma_*() + * see Documentation/DMA-API-HOWTO.txt, these functions to + * basically the same. The map function does also build a + * scatterlist for the buffer (and unmap frees it ...) + * + * videobuf_dma_free() + * no comment ... + * + */ + +struct videobuf_dmabuf { + u32 magic; + + /* for userland buffer */ + int offset; + size_t size; + struct page **pages; + + /* for kernel buffers */ + void *vaddr; + struct page **vaddr_pages; + dma_addr_t *dma_addr; + struct device *dev; + + /* for overlay buffers (pci-pci dma) */ + dma_addr_t bus_addr; + + /* common */ + struct scatterlist *sglist; + int sglen; + int nr_pages; + int direction; +}; + +struct videobuf_dma_sg_memory { + u32 magic; + + /* for mmap'ed buffers */ + struct videobuf_dmabuf dma; +}; + +/* + * Scatter-gather DMA buffer API. + * + * These functions provide a simple way to create a page list and a + * scatter-gather list from a kernel, userspace of physical address and map the + * memory for DMA operation. + * + * Despite the name, this is totally unrelated to videobuf, except that + * videobuf-dma-sg uses the same API internally. + */ +int videobuf_dma_free(struct videobuf_dmabuf *dma); + +int videobuf_dma_unmap(struct device *dev, struct videobuf_dmabuf *dma); +struct videobuf_dmabuf *videobuf_to_dma(struct videobuf_buffer *buf); + +void *videobuf_sg_alloc(size_t size); + +void videobuf_queue_sg_init(struct videobuf_queue *q, + const struct videobuf_queue_ops *ops, + struct device *dev, + spinlock_t *irqlock, + enum v4l2_buf_type type, + enum v4l2_field field, + unsigned int msize, + void *priv, + struct mutex *ext_lock); + +#endif /* _VIDEOBUF_DMA_SG_H */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/media/videobuf-dma-sg.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/media/videobuf-dma-sg.h.yml new file mode 100644 index 00000000000..69ba928c1f7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/media/videobuf-dma-sg.h.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2007 Mauro Carvalho Chehab, + - (c) 2001,02 Gerd Knorr + - (c) 2006 Mauro Carvalho Chehab, + - (c) 2006 Ted Walther and John Sokol +holders: + - Mauro Carvalho Chehab + - Gerd Knorr + - Mauro Carvalho Chehab + - Ted Walther and John Sokol diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/net/checksum.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/net/checksum.h new file mode 100644 index 00000000000..79dcc431e1a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/net/checksum.h @@ -0,0 +1,185 @@ +/* + * INET An implementation of the TCP/IP protocol suite for the LINUX + * operating system. INET is implemented using the BSD Socket + * interface as the means of communication with the user level. + * + * Checksumming functions for IP, TCP, UDP and so on + * + * Authors: Jorge Cwik, + * Arnt Gulbrandsen, + * Borrows very liberally from tcp.c and ip.c, see those + * files for more names. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#ifndef _CHECKSUM_H +#define _CHECKSUM_H + +#include +#include +#include +#include +#include + +#ifndef _HAVE_ARCH_COPY_AND_CSUM_FROM_USER +static inline +__wsum csum_and_copy_from_user (const void __user *src, void *dst, + int len, __wsum sum, int *err_ptr) +{ + if (access_ok(VERIFY_READ, src, len)) + return csum_partial_copy_from_user(src, dst, len, sum, err_ptr); + + if (len) + *err_ptr = -EFAULT; + + return sum; +} +#endif + +#ifndef HAVE_CSUM_COPY_USER +static __inline__ __wsum csum_and_copy_to_user +(const void *src, void __user *dst, int len, __wsum sum, int *err_ptr) +{ + sum = csum_partial(src, len, sum); + + if (access_ok(VERIFY_WRITE, dst, len)) { + if (copy_to_user(dst, src, len) == 0) + return sum; + } + if (len) + *err_ptr = -EFAULT; + + return (__force __wsum)-1; /* invalid checksum */ +} +#endif + +#ifndef HAVE_ARCH_CSUM_ADD +static inline __wsum csum_add(__wsum csum, __wsum addend) +{ + u32 res = (__force u32)csum; + res += (__force u32)addend; + return (__force __wsum)(res + (res < (__force u32)addend)); +} +#endif + +static inline __wsum csum_sub(__wsum csum, __wsum addend) +{ + return csum_add(csum, ~addend); +} + +static inline __sum16 csum16_add(__sum16 csum, __be16 addend) +{ + u16 res = (__force u16)csum; + + res += (__force u16)addend; + return (__force __sum16)(res + (res < (__force u16)addend)); +} + +static inline __sum16 csum16_sub(__sum16 csum, __be16 addend) +{ + return csum16_add(csum, ~addend); +} + +static inline __wsum +csum_block_add(__wsum csum, __wsum csum2, int offset) +{ + u32 sum = (__force u32)csum2; + + /* rotate sum to align it with a 16b boundary */ + if (offset & 1) + sum = ror32(sum, 8); + + return csum_add(csum, (__force __wsum)sum); +} + +static inline __wsum +csum_block_add_ext(__wsum csum, __wsum csum2, int offset, int len) +{ + return csum_block_add(csum, csum2, offset); +} + +static inline __wsum +csum_block_sub(__wsum csum, __wsum csum2, int offset) +{ + return csum_block_add(csum, ~csum2, offset); +} + +static inline __wsum csum_unfold(__sum16 n) +{ + return (__force __wsum)n; +} + +static inline __wsum csum_partial_ext(const void *buff, int len, __wsum sum) +{ + return csum_partial(buff, len, sum); +} + +#define CSUM_MANGLED_0 ((__force __sum16)0xffff) + +static inline void csum_replace_by_diff(__sum16 *sum, __wsum diff) +{ + *sum = csum_fold(csum_add(diff, ~csum_unfold(*sum))); +} + +static inline void csum_replace4(__sum16 *sum, __be32 from, __be32 to) +{ + __wsum tmp = csum_sub(~csum_unfold(*sum), (__force __wsum)from); + + *sum = csum_fold(csum_add(tmp, (__force __wsum)to)); +} + +/* Implements RFC 1624 (Incremental Internet Checksum) + * 3. Discussion states : + * HC' = ~(~HC + ~m + m') + * m : old value of a 16bit field + * m' : new value of a 16bit field + */ +static inline void csum_replace2(__sum16 *sum, __be16 old, __be16 new) +{ + *sum = ~csum16_add(csum16_sub(~(*sum), old), new); +} + +struct sk_buff; +void inet_proto_csum_replace4(__sum16 *sum, struct sk_buff *skb, + __be32 from, __be32 to, bool pseudohdr); +void inet_proto_csum_replace16(__sum16 *sum, struct sk_buff *skb, + const __be32 *from, const __be32 *to, + bool pseudohdr); +void inet_proto_csum_replace_by_diff(__sum16 *sum, struct sk_buff *skb, + __wsum diff, bool pseudohdr); + +static inline void inet_proto_csum_replace2(__sum16 *sum, struct sk_buff *skb, + __be16 from, __be16 to, + bool pseudohdr) +{ + inet_proto_csum_replace4(sum, skb, (__force __be32)from, + (__force __be32)to, pseudohdr); +} + +static inline __wsum remcsum_adjust(void *ptr, __wsum csum, + int start, int offset) +{ + __sum16 *psum = (__sum16 *)(ptr + offset); + __wsum delta; + + /* Subtract out checksum up to start */ + csum = csum_sub(csum, csum_partial(ptr, start, 0)); + + /* Set derived checksum in packet */ + delta = csum_sub((__force __wsum)csum_fold(csum), + (__force __wsum)*psum); + *psum = csum_fold(csum); + + return delta; +} + +static inline void remcsum_unadjust(__sum16 *psum, __wsum delta) +{ + *psum = csum_fold(csum_sub(delta, (__force __wsum)*psum)); +} + +#endif \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/net/checksum.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/net/checksum.h.yml new file mode 100644 index 00000000000..2719e13885f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/net/checksum.h.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - Jorge Cwik, Arnt Gulbrandsen, Borrows diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/net/ip6_checksum.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/net/ip6_checksum.h new file mode 100644 index 00000000000..bc2abc73590 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/net/ip6_checksum.h @@ -0,0 +1,105 @@ +/* + * INET An implementation of the TCP/IP protocol suite for the LINUX + * operating system. INET is implemented using the BSD Socket + * interface as the means of communication with the user level. + * + * Checksumming functions for IPv6 + * + * Authors: Jorge Cwik, + * Arnt Gulbrandsen, + * Borrows very liberally from tcp.c and ip.c, see those + * files for more names. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +/* + * Fixes: + * + * Ralf Baechle : generic ipv6 checksum + * + */ + +#ifndef _CHECKSUM_IPV6_H +#define _CHECKSUM_IPV6_H + +#include +#include +#include +#include +#include +#include +#include + +#ifndef _HAVE_ARCH_IPV6_CSUM +__sum16 csum_ipv6_magic(const struct in6_addr *saddr, + const struct in6_addr *daddr, + __u32 len, __u8 proto, __wsum csum); +#endif + +static inline __wsum ip6_compute_pseudo(struct sk_buff *skb, int proto) +{ + return ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr, + &ipv6_hdr(skb)->daddr, + skb->len, proto, 0)); +} + +static inline __wsum ip6_gro_compute_pseudo(struct sk_buff *skb, int proto) +{ + const struct ipv6hdr *iph = skb_gro_network_header(skb); + + return ~csum_unfold(csum_ipv6_magic(&iph->saddr, &iph->daddr, + skb_gro_len(skb), proto, 0)); +} + +static __inline__ __sum16 tcp_v6_check(int len, + const struct in6_addr *saddr, + const struct in6_addr *daddr, + __wsum base) +{ + return csum_ipv6_magic(saddr, daddr, len, IPPROTO_TCP, base); +} + +static inline void __tcp_v6_send_check(struct sk_buff *skb, + const struct in6_addr *saddr, + const struct in6_addr *daddr) +{ + struct tcphdr *th = tcp_hdr(skb); + + if (skb->ip_summed == CHECKSUM_PARTIAL) { + th->check = ~tcp_v6_check(skb->len, saddr, daddr, 0); + skb->csum_start = skb_transport_header(skb) - skb->head; + skb->csum_offset = offsetof(struct tcphdr, check); + } else { + th->check = tcp_v6_check(skb->len, saddr, daddr, + csum_partial(th, th->doff << 2, + skb->csum)); + } +} + +#if IS_ENABLED(CONFIG_IPV6) +static inline void tcp_v6_send_check(struct sock *sk, struct sk_buff *skb) +{ + struct ipv6_pinfo *np = inet6_sk(sk); + + __tcp_v6_send_check(skb, &np->saddr, &sk->sk_v6_daddr); +} +#endif + +static inline __sum16 udp_v6_check(int len, + const struct in6_addr *saddr, + const struct in6_addr *daddr, + __wsum base) +{ + return csum_ipv6_magic(saddr, daddr, len, IPPROTO_UDP, base); +} + +void udp6_set_csum(bool nocheck, struct sk_buff *skb, + const struct in6_addr *saddr, + const struct in6_addr *daddr, int len); + +int udp6_csum_init(struct sk_buff *skb, struct udphdr *uh, int proto); +#endif \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/net/ip6_checksum.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/net/ip6_checksum.h.yml new file mode 100644 index 00000000000..2719e13885f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/net/ip6_checksum.h.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - Jorge Cwik, Arnt Gulbrandsen, Borrows diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/scsi/scsi_transport_fc.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/scsi/scsi_transport_fc.h new file mode 100644 index 00000000000..0629b380a48 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/scsi/scsi_transport_fc.h @@ -0,0 +1,826 @@ +/* + * FiberChannel transport specific attributes exported to sysfs. + * + * Copyright (c) 2003 Silicon Graphics, Inc. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * ======== + * + * Copyright (C) 2004-2007 James Smart, Emulex Corporation + * Rewrite for host, target, device, and remote port attributes, + * statistics, and service functions... + * + */ +#ifndef SCSI_TRANSPORT_FC_H +#define SCSI_TRANSPORT_FC_H + +#include +#include +#include +#include +#include +#include + +struct scsi_transport_template; + +/* + * FC Port definitions - Following FC HBAAPI guidelines + * + * Note: Not all binary values for the different fields match HBAAPI. + * Instead, we use densely packed ordinal values or enums. + * We get away with this as we never present the actual binary values + * externally. For sysfs, we always present the string that describes + * the value. Thus, an admin doesn't need a magic HBAAPI decoder ring + * to understand the values. The HBAAPI user-space library is free to + * convert the strings into the HBAAPI-specified binary values. + * + * Note: Not all HBAAPI-defined values are contained in the definitions + * below. Those not appropriate to an fc_host (e.g. FCP initiator) have + * been removed. + */ + +/* + * fc_port_type: If you alter this, you also need to alter scsi_transport_fc.c + * (for the ascii descriptions). + */ +enum fc_port_type { + FC_PORTTYPE_UNKNOWN, + FC_PORTTYPE_OTHER, + FC_PORTTYPE_NOTPRESENT, + FC_PORTTYPE_NPORT, /* Attached to FPort */ + FC_PORTTYPE_NLPORT, /* (Public) Loop w/ FLPort */ + FC_PORTTYPE_LPORT, /* (Private) Loop w/o FLPort */ + FC_PORTTYPE_PTP, /* Point to Point w/ another NPort */ + FC_PORTTYPE_NPIV, /* VPORT based on NPIV */ +}; + + +/* + * fc_port_state: If you alter this, you also need to alter scsi_transport_fc.c + * (for the ascii descriptions). + */ +enum fc_port_state { + FC_PORTSTATE_UNKNOWN, + FC_PORTSTATE_NOTPRESENT, + FC_PORTSTATE_ONLINE, + FC_PORTSTATE_OFFLINE, /* User has taken Port Offline */ + FC_PORTSTATE_BLOCKED, + FC_PORTSTATE_BYPASSED, + FC_PORTSTATE_DIAGNOSTICS, + FC_PORTSTATE_LINKDOWN, + FC_PORTSTATE_ERROR, + FC_PORTSTATE_LOOPBACK, + FC_PORTSTATE_DELETED, +}; + + +/* + * fc_vport_state: If you alter this, you also need to alter + * scsi_transport_fc.c (for the ascii descriptions). + */ +enum fc_vport_state { + FC_VPORT_UNKNOWN, + FC_VPORT_ACTIVE, + FC_VPORT_DISABLED, + FC_VPORT_LINKDOWN, + FC_VPORT_INITIALIZING, + FC_VPORT_NO_FABRIC_SUPP, + FC_VPORT_NO_FABRIC_RSCS, + FC_VPORT_FABRIC_LOGOUT, + FC_VPORT_FABRIC_REJ_WWN, + FC_VPORT_FAILED, +}; + + +/* + * FC Classes of Service + * Note: values are not enumerated, as they can be "or'd" together + * for reporting (e.g. report supported_classes). If you alter this list, + * you also need to alter scsi_transport_fc.c (for the ascii descriptions). + */ +#define FC_COS_UNSPECIFIED 0 +#define FC_COS_CLASS1 2 +#define FC_COS_CLASS2 4 +#define FC_COS_CLASS3 8 +#define FC_COS_CLASS4 0x10 +#define FC_COS_CLASS6 0x40 + +/* + * FC Port Speeds + * Note: values are not enumerated, as they can be "or'd" together + * for reporting (e.g. report supported_speeds). If you alter this list, + * you also need to alter scsi_transport_fc.c (for the ascii descriptions). + */ +#define FC_PORTSPEED_UNKNOWN 0 /* Unknown - transceiver + incapable of reporting */ +#define FC_PORTSPEED_1GBIT 1 +#define FC_PORTSPEED_2GBIT 2 +#define FC_PORTSPEED_10GBIT 4 +#define FC_PORTSPEED_4GBIT 8 +#define FC_PORTSPEED_8GBIT 0x10 +#define FC_PORTSPEED_16GBIT 0x20 +#define FC_PORTSPEED_32GBIT 0x40 +#define FC_PORTSPEED_20GBIT 0x80 +#define FC_PORTSPEED_40GBIT 0x100 +#define FC_PORTSPEED_50GBIT 0x200 +#define FC_PORTSPEED_100GBIT 0x400 +#define FC_PORTSPEED_25GBIT 0x800 +#define FC_PORTSPEED_64GBIT 0x1000 +#define FC_PORTSPEED_128GBIT 0x2000 +#define FC_PORTSPEED_NOT_NEGOTIATED (1 << 15) /* Speed not established */ + +/* + * fc_tgtid_binding_type: If you alter this, you also need to alter + * scsi_transport_fc.c (for the ascii descriptions). + */ +enum fc_tgtid_binding_type { + FC_TGTID_BIND_NONE, + FC_TGTID_BIND_BY_WWPN, + FC_TGTID_BIND_BY_WWNN, + FC_TGTID_BIND_BY_ID, +}; + +/* + * FC Port Roles + * Note: values are not enumerated, as they can be "or'd" together + * for reporting (e.g. report roles). If you alter this list, + * you also need to alter scsi_transport_fc.c (for the ascii descriptions). + */ +#define FC_PORT_ROLE_UNKNOWN 0x00 +#define FC_PORT_ROLE_FCP_TARGET 0x01 +#define FC_PORT_ROLE_FCP_INITIATOR 0x02 +#define FC_PORT_ROLE_IP_PORT 0x04 +#define FC_PORT_ROLE_FCP_DUMMY_INITIATOR 0x08 + +/* The following are for compatibility */ +#define FC_RPORT_ROLE_UNKNOWN FC_PORT_ROLE_UNKNOWN +#define FC_RPORT_ROLE_FCP_TARGET FC_PORT_ROLE_FCP_TARGET +#define FC_RPORT_ROLE_FCP_INITIATOR FC_PORT_ROLE_FCP_INITIATOR +#define FC_RPORT_ROLE_IP_PORT FC_PORT_ROLE_IP_PORT + + +/* Macro for use in defining Virtual Port attributes */ +#define FC_VPORT_ATTR(_name,_mode,_show,_store) \ +struct device_attribute dev_attr_vport_##_name = \ + __ATTR(_name,_mode,_show,_store) + +/* + * fc_vport_identifiers: This set of data contains all elements + * to uniquely identify and instantiate a FC virtual port. + * + * Notes: + * symbolic_name: The driver is to append the symbolic_name string data + * to the symbolic_node_name data that it generates by default. + * the resulting combination should then be registered with the switch. + * It is expected that things like Xen may stuff a VM title into + * this field. + */ +#define FC_VPORT_SYMBOLIC_NAMELEN 64 +struct fc_vport_identifiers { + u64 node_name; + u64 port_name; + u32 roles; + bool disable; + enum fc_port_type vport_type; /* only FC_PORTTYPE_NPIV allowed */ + char symbolic_name[FC_VPORT_SYMBOLIC_NAMELEN]; +}; + +/* + * FC Virtual Port Attributes + * + * This structure exists for each FC port is a virtual FC port. Virtual + * ports share the physical link with the Physical port. Each virtual + * ports has a unique presence on the SAN, and may be instantiated via + * NPIV, Virtual Fabrics, or via additional ALPAs. As the vport is a + * unique presence, each vport has it's own view of the fabric, + * authentication privilege, and priorities. + * + * A virtual port may support 1 or more FC4 roles. Typically it is a + * FCP Initiator. It could be a FCP Target, or exist sole for an IP over FC + * roles. FC port attributes for the vport will be reported on any + * fc_host class object allocated for an FCP Initiator. + * + * -- + * + * Fixed attributes are not expected to change. The driver is + * expected to set these values after receiving the fc_vport structure + * via the vport_create() call from the transport. + * The transport fully manages all get functions w/o driver interaction. + * + * Dynamic attributes are expected to change. The driver participates + * in all get/set operations via functions provided by the driver. + * + * Private attributes are transport-managed values. They are fully + * managed by the transport w/o driver interaction. + */ + +struct fc_vport { + /* Fixed Attributes */ + + /* Dynamic Attributes */ + + /* Private (Transport-managed) Attributes */ + enum fc_vport_state vport_state; + enum fc_vport_state vport_last_state; + u64 node_name; + u64 port_name; + u32 roles; + u32 vport_id; /* Admin Identifier for the vport */ + enum fc_port_type vport_type; + char symbolic_name[FC_VPORT_SYMBOLIC_NAMELEN]; + + /* exported data */ + void *dd_data; /* Used for driver-specific storage */ + + /* internal data */ + struct Scsi_Host *shost; /* Physical Port Parent */ + unsigned int channel; + u32 number; + u8 flags; + struct list_head peers; + struct device dev; + struct work_struct vport_delete_work; +} __attribute__((aligned(sizeof(unsigned long)))); + +/* bit field values for struct fc_vport "flags" field: */ +#define FC_VPORT_CREATING 0x01 +#define FC_VPORT_DELETING 0x02 +#define FC_VPORT_DELETED 0x04 +#define FC_VPORT_DEL 0x06 /* Any DELETE state */ + +#define dev_to_vport(d) \ + container_of(d, struct fc_vport, dev) +#define transport_class_to_vport(dev) \ + dev_to_vport(dev->parent) +#define vport_to_shost(v) \ + (v->shost) +#define vport_to_shost_channel(v) \ + (v->channel) +#define vport_to_parent(v) \ + (v->dev.parent) + + +/* Error return codes for vport_create() callback */ +#define VPCERR_UNSUPPORTED -ENOSYS /* no driver/adapter + support */ +#define VPCERR_BAD_WWN -ENOTUNIQ /* driver validation + of WWNs failed */ +#define VPCERR_NO_FABRIC_SUPP -EOPNOTSUPP /* Fabric connection + is loop or the + Fabric Port does + not support NPIV */ + +/* + * fc_rport_identifiers: This set of data contains all elements + * to uniquely identify a remote FC port. The driver uses this data + * to report the existence of a remote FC port in the topology. Internally, + * the transport uses this data for attributes and to manage consistent + * target id bindings. + */ +struct fc_rport_identifiers { + u64 node_name; + u64 port_name; + u32 port_id; + u32 roles; +}; + + +/* Macro for use in defining Remote Port attributes */ +#define FC_RPORT_ATTR(_name,_mode,_show,_store) \ +struct device_attribute dev_attr_rport_##_name = \ + __ATTR(_name,_mode,_show,_store) + + +/* + * FC Remote Port Attributes + * + * This structure exists for each remote FC port that a LLDD notifies + * the subsystem of. A remote FC port may or may not be a SCSI Target, + * also be a SCSI initiator, IP endpoint, etc. As such, the remote + * port is considered a separate entity, independent of "role" (such + * as scsi target). + * + * -- + * + * Attributes are based on HBAAPI V2.0 definitions. Only those + * attributes that are determinable by the local port (aka Host) + * are contained. + * + * Fixed attributes are not expected to change. The driver is + * expected to set these values after successfully calling + * fc_remote_port_add(). The transport fully manages all get functions + * w/o driver interaction. + * + * Dynamic attributes are expected to change. The driver participates + * in all get/set operations via functions provided by the driver. + * + * Private attributes are transport-managed values. They are fully + * managed by the transport w/o driver interaction. + */ + +struct fc_rport { /* aka fc_starget_attrs */ + /* Fixed Attributes */ + u32 maxframe_size; + u32 supported_classes; + + /* Dynamic Attributes */ + u32 dev_loss_tmo; /* Remote Port loss timeout in seconds. */ + + /* Private (Transport-managed) Attributes */ + u64 node_name; + u64 port_name; + u32 port_id; + u32 roles; + enum fc_port_state port_state; /* Will only be ONLINE or UNKNOWN */ + u32 scsi_target_id; + u32 fast_io_fail_tmo; + + /* exported data */ + void *dd_data; /* Used for driver-specific storage */ + + /* internal data */ + unsigned int channel; + u32 number; + u8 flags; + struct list_head peers; + struct device dev; + struct delayed_work dev_loss_work; + struct work_struct scan_work; + struct delayed_work fail_io_work; + struct work_struct stgt_delete_work; + struct work_struct rport_delete_work; + struct request_queue *rqst_q; /* bsg support */ +} __attribute__((aligned(sizeof(unsigned long)))); + +/* bit field values for struct fc_rport "flags" field: */ +#define FC_RPORT_DEVLOSS_PENDING 0x01 +#define FC_RPORT_SCAN_PENDING 0x02 +#define FC_RPORT_FAST_FAIL_TIMEDOUT 0x04 +#define FC_RPORT_DEVLOSS_CALLBK_DONE 0x08 + +#define dev_to_rport(d) \ + container_of(d, struct fc_rport, dev) +#define transport_class_to_rport(dev) \ + dev_to_rport(dev->parent) +#define rport_to_shost(r) \ + dev_to_shost(r->dev.parent) + +/* + * FC SCSI Target Attributes + * + * The SCSI Target is considered an extension of a remote port (as + * a remote port can be more than a SCSI Target). Within the scsi + * subsystem, we leave the Target as a separate entity. Doing so + * provides backward compatibility with prior FC transport api's, + * and lets remote ports be handled entirely within the FC transport + * and independently from the scsi subsystem. The drawback is that + * some data will be duplicated. + */ + +struct fc_starget_attrs { /* aka fc_target_attrs */ + /* Dynamic Attributes */ + u64 node_name; + u64 port_name; + u32 port_id; +}; + +#define fc_starget_node_name(x) \ + (((struct fc_starget_attrs *)&(x)->starget_data)->node_name) +#define fc_starget_port_name(x) \ + (((struct fc_starget_attrs *)&(x)->starget_data)->port_name) +#define fc_starget_port_id(x) \ + (((struct fc_starget_attrs *)&(x)->starget_data)->port_id) + +#define starget_to_rport(s) \ + scsi_is_fc_rport(s->dev.parent) ? dev_to_rport(s->dev.parent) : NULL + + +/* + * FC Local Port (Host) Statistics + */ + +/* FC Statistics - Following FC HBAAPI v2.0 guidelines */ +struct fc_host_statistics { + /* port statistics */ + u64 seconds_since_last_reset; + u64 tx_frames; + u64 tx_words; + u64 rx_frames; + u64 rx_words; + u64 lip_count; + u64 nos_count; + u64 error_frames; + u64 dumped_frames; + u64 link_failure_count; + u64 loss_of_sync_count; + u64 loss_of_signal_count; + u64 prim_seq_protocol_err_count; + u64 invalid_tx_word_count; + u64 invalid_crc_count; + + /* fc4 statistics (only FCP supported currently) */ + u64 fcp_input_requests; + u64 fcp_output_requests; + u64 fcp_control_requests; + u64 fcp_input_megabytes; + u64 fcp_output_megabytes; + u64 fcp_packet_alloc_failures; /* fcp packet allocation failures */ + u64 fcp_packet_aborts; /* fcp packet aborted */ + u64 fcp_frame_alloc_failures; /* fcp frame allocation failures */ + + /* fc exches statistics */ + u64 fc_no_free_exch; /* no free exch memory */ + u64 fc_no_free_exch_xid; /* no free exch id */ + u64 fc_xid_not_found; /* exch not found for a response */ + u64 fc_xid_busy; /* exch exist for new a request */ + u64 fc_seq_not_found; /* seq is not found for exchange */ + u64 fc_non_bls_resp; /* a non BLS response frame with + a sequence responder in new exch */ +}; + + +/* + * FC Event Codes - Polled and Async, following FC HBAAPI v2.0 guidelines + */ + +/* + * fc_host_event_code: If you alter this, you also need to alter + * scsi_transport_fc.c (for the ascii descriptions). + */ +enum fc_host_event_code { + FCH_EVT_LIP = 0x1, + FCH_EVT_LINKUP = 0x2, + FCH_EVT_LINKDOWN = 0x3, + FCH_EVT_LIPRESET = 0x4, + FCH_EVT_RSCN = 0x5, + FCH_EVT_ADAPTER_CHANGE = 0x103, + FCH_EVT_PORT_UNKNOWN = 0x200, + FCH_EVT_PORT_OFFLINE = 0x201, + FCH_EVT_PORT_ONLINE = 0x202, + FCH_EVT_PORT_FABRIC = 0x204, + FCH_EVT_LINK_UNKNOWN = 0x500, + FCH_EVT_VENDOR_UNIQUE = 0xffff, +}; + + +/* + * FC Local Port (Host) Attributes + * + * Attributes are based on HBAAPI V2.0 definitions. + * Note: OSDeviceName is determined by user-space library + * + * Fixed attributes are not expected to change. The driver is + * expected to set these values after successfully calling scsi_add_host(). + * The transport fully manages all get functions w/o driver interaction. + * + * Dynamic attributes are expected to change. The driver participates + * in all get/set operations via functions provided by the driver. + * + * Private attributes are transport-managed values. They are fully + * managed by the transport w/o driver interaction. + */ + +#define FC_FC4_LIST_SIZE 32 +#define FC_SYMBOLIC_NAME_SIZE 256 +#define FC_VERSION_STRING_SIZE 64 +#define FC_SERIAL_NUMBER_SIZE 80 + +struct fc_host_attrs { + /* Fixed Attributes */ + u64 node_name; + u64 port_name; + u64 permanent_port_name; + u32 supported_classes; + u8 supported_fc4s[FC_FC4_LIST_SIZE]; + u32 supported_speeds; + u32 maxframe_size; + u16 max_npiv_vports; + char serial_number[FC_SERIAL_NUMBER_SIZE]; + char manufacturer[FC_SERIAL_NUMBER_SIZE]; + char model[FC_SYMBOLIC_NAME_SIZE]; + char model_description[FC_SYMBOLIC_NAME_SIZE]; + char hardware_version[FC_VERSION_STRING_SIZE]; + char driver_version[FC_VERSION_STRING_SIZE]; + char firmware_version[FC_VERSION_STRING_SIZE]; + char optionrom_version[FC_VERSION_STRING_SIZE]; + + /* Dynamic Attributes */ + u32 port_id; + enum fc_port_type port_type; + enum fc_port_state port_state; + u8 active_fc4s[FC_FC4_LIST_SIZE]; + u32 speed; + u64 fabric_name; + char symbolic_name[FC_SYMBOLIC_NAME_SIZE]; + char system_hostname[FC_SYMBOLIC_NAME_SIZE]; + u32 dev_loss_tmo; + + /* Private (Transport-managed) Attributes */ + enum fc_tgtid_binding_type tgtid_bind_type; + + /* internal data */ + struct list_head rports; + struct list_head rport_bindings; + struct list_head vports; + u32 next_rport_number; + u32 next_target_id; + u32 next_vport_number; + u16 npiv_vports_inuse; + + /* work queues for rport state manipulation */ + char work_q_name[20]; + struct workqueue_struct *work_q; + char devloss_work_q_name[20]; + struct workqueue_struct *devloss_work_q; + + /* bsg support */ + struct request_queue *rqst_q; +}; + +#define shost_to_fc_host(x) \ + ((struct fc_host_attrs *)(x)->shost_data) + +#define fc_host_node_name(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->node_name) +#define fc_host_port_name(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->port_name) +#define fc_host_permanent_port_name(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->permanent_port_name) +#define fc_host_supported_classes(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->supported_classes) +#define fc_host_supported_fc4s(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->supported_fc4s) +#define fc_host_supported_speeds(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->supported_speeds) +#define fc_host_maxframe_size(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->maxframe_size) +#define fc_host_max_npiv_vports(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->max_npiv_vports) +#define fc_host_serial_number(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->serial_number) +#define fc_host_manufacturer(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->manufacturer) +#define fc_host_model(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->model) +#define fc_host_model_description(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->model_description) +#define fc_host_hardware_version(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->hardware_version) +#define fc_host_driver_version(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->driver_version) +#define fc_host_firmware_version(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->firmware_version) +#define fc_host_optionrom_version(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->optionrom_version) +#define fc_host_port_id(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->port_id) +#define fc_host_port_type(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->port_type) +#define fc_host_port_state(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->port_state) +#define fc_host_active_fc4s(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->active_fc4s) +#define fc_host_speed(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->speed) +#define fc_host_fabric_name(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->fabric_name) +#define fc_host_symbolic_name(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->symbolic_name) +#define fc_host_system_hostname(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->system_hostname) +#define fc_host_tgtid_bind_type(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->tgtid_bind_type) +#define fc_host_rports(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->rports) +#define fc_host_rport_bindings(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->rport_bindings) +#define fc_host_vports(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->vports) +#define fc_host_next_rport_number(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->next_rport_number) +#define fc_host_next_target_id(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->next_target_id) +#define fc_host_next_vport_number(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->next_vport_number) +#define fc_host_npiv_vports_inuse(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->npiv_vports_inuse) +#define fc_host_work_q_name(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->work_q_name) +#define fc_host_work_q(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->work_q) +#define fc_host_devloss_work_q_name(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->devloss_work_q_name) +#define fc_host_devloss_work_q(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->devloss_work_q) +#define fc_host_dev_loss_tmo(x) \ + (((struct fc_host_attrs *)(x)->shost_data)->dev_loss_tmo) + +/* The functions by which the transport class and the driver communicate */ +struct fc_function_template { + void (*get_rport_dev_loss_tmo)(struct fc_rport *); + void (*set_rport_dev_loss_tmo)(struct fc_rport *, u32); + + void (*get_starget_node_name)(struct scsi_target *); + void (*get_starget_port_name)(struct scsi_target *); + void (*get_starget_port_id)(struct scsi_target *); + + void (*get_host_port_id)(struct Scsi_Host *); + void (*get_host_port_type)(struct Scsi_Host *); + void (*get_host_port_state)(struct Scsi_Host *); + void (*get_host_active_fc4s)(struct Scsi_Host *); + void (*get_host_speed)(struct Scsi_Host *); + void (*get_host_fabric_name)(struct Scsi_Host *); + void (*get_host_symbolic_name)(struct Scsi_Host *); + void (*set_host_system_hostname)(struct Scsi_Host *); + + struct fc_host_statistics * (*get_fc_host_stats)(struct Scsi_Host *); + void (*reset_fc_host_stats)(struct Scsi_Host *); + + int (*issue_fc_host_lip)(struct Scsi_Host *); + + void (*dev_loss_tmo_callbk)(struct fc_rport *); + void (*terminate_rport_io)(struct fc_rport *); + + void (*set_vport_symbolic_name)(struct fc_vport *); + int (*vport_create)(struct fc_vport *, bool); + int (*vport_disable)(struct fc_vport *, bool); + int (*vport_delete)(struct fc_vport *); + + /* bsg support */ + int (*bsg_request)(struct bsg_job *); + int (*bsg_timeout)(struct bsg_job *); + + /* allocation lengths for host-specific data */ + u32 dd_fcrport_size; + u32 dd_fcvport_size; + u32 dd_bsg_size; + + /* + * The driver sets these to tell the transport class it + * wants the attributes displayed in sysfs. If the show_ flag + * is not set, the attribute will be private to the transport + * class + */ + + /* remote port fixed attributes */ + unsigned long show_rport_maxframe_size:1; + unsigned long show_rport_supported_classes:1; + unsigned long show_rport_dev_loss_tmo:1; + + /* + * target dynamic attributes + * These should all be "1" if the driver uses the remote port + * add/delete functions (so attributes reflect rport values). + */ + unsigned long show_starget_node_name:1; + unsigned long show_starget_port_name:1; + unsigned long show_starget_port_id:1; + + /* host fixed attributes */ + unsigned long show_host_node_name:1; + unsigned long show_host_port_name:1; + unsigned long show_host_permanent_port_name:1; + unsigned long show_host_supported_classes:1; + unsigned long show_host_supported_fc4s:1; + unsigned long show_host_supported_speeds:1; + unsigned long show_host_maxframe_size:1; + unsigned long show_host_serial_number:1; + unsigned long show_host_manufacturer:1; + unsigned long show_host_model:1; + unsigned long show_host_model_description:1; + unsigned long show_host_hardware_version:1; + unsigned long show_host_driver_version:1; + unsigned long show_host_firmware_version:1; + unsigned long show_host_optionrom_version:1; + /* host dynamic attributes */ + unsigned long show_host_port_id:1; + unsigned long show_host_port_type:1; + unsigned long show_host_port_state:1; + unsigned long show_host_active_fc4s:1; + unsigned long show_host_speed:1; + unsigned long show_host_fabric_name:1; + unsigned long show_host_symbolic_name:1; + unsigned long show_host_system_hostname:1; + + unsigned long disable_target_scan:1; +}; + + +/** + * fc_remote_port_chkready - called to validate the remote port state + * prior to initiating io to the port. + * + * Returns a scsi result code that can be returned by the LLDD. + * + * @rport: remote port to be checked + **/ +static inline int +fc_remote_port_chkready(struct fc_rport *rport) +{ + int result; + + switch (rport->port_state) { + case FC_PORTSTATE_ONLINE: + if (rport->roles & FC_PORT_ROLE_FCP_TARGET) + result = 0; + else if (rport->flags & FC_RPORT_DEVLOSS_PENDING) + result = DID_IMM_RETRY << 16; + else + result = DID_NO_CONNECT << 16; + break; + case FC_PORTSTATE_BLOCKED: + if (rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT) + result = DID_TRANSPORT_FAILFAST << 16; + else + result = DID_IMM_RETRY << 16; + break; + default: + result = DID_NO_CONNECT << 16; + break; + } + return result; +} + +static inline u64 wwn_to_u64(u8 *wwn) +{ + return get_unaligned_be64(wwn); +} + +static inline void u64_to_wwn(u64 inm, u8 *wwn) +{ + put_unaligned_be64(inm, wwn); +} + +/** + * fc_vport_set_state() - called to set a vport's state. Saves the old state, + * excepting the transitory states of initializing and sending the ELS + * traffic to instantiate the vport on the link. + * + * Assumes the driver has surrounded this with the proper locking to ensure + * a coherent state change. + * + * @vport: virtual port whose state is changing + * @new_state: new state + **/ +static inline void +fc_vport_set_state(struct fc_vport *vport, enum fc_vport_state new_state) +{ + if ((new_state != FC_VPORT_UNKNOWN) && + (new_state != FC_VPORT_INITIALIZING)) + vport->vport_last_state = vport->vport_state; + vport->vport_state = new_state; +} + +struct scsi_transport_template *fc_attach_transport( + struct fc_function_template *); +void fc_release_transport(struct scsi_transport_template *); +void fc_remove_host(struct Scsi_Host *); +struct fc_rport *fc_remote_port_add(struct Scsi_Host *shost, + int channel, struct fc_rport_identifiers *ids); +void fc_remote_port_delete(struct fc_rport *rport); +void fc_remote_port_rolechg(struct fc_rport *rport, u32 roles); +int scsi_is_fc_rport(const struct device *); +u32 fc_get_event_number(void); +void fc_host_post_event(struct Scsi_Host *shost, u32 event_number, + enum fc_host_event_code event_code, u32 event_data); +void fc_host_post_vendor_event(struct Scsi_Host *shost, u32 event_number, + u32 data_len, char * data_buf, u64 vendor_id); + /* Note: when specifying vendor_id to fc_host_post_vendor_event() + * be sure to read the Vendor Type and ID formatting requirements + * specified in scsi_netlink.h + */ +struct fc_vport *fc_vport_create(struct Scsi_Host *shost, int channel, + struct fc_vport_identifiers *); +int fc_vport_terminate(struct fc_vport *vport); +int fc_block_rport(struct fc_rport *rport); +int fc_block_scsi_eh(struct scsi_cmnd *cmnd); +enum blk_eh_timer_return fc_eh_timed_out(struct scsi_cmnd *scmd); + +static inline struct Scsi_Host *fc_bsg_to_shost(struct bsg_job *job) +{ + if (scsi_is_host_device(job->dev)) + return dev_to_shost(job->dev); + return rport_to_shost(dev_to_rport(job->dev)); +} + +static inline struct fc_rport *fc_bsg_to_rport(struct bsg_job *job) +{ + if (scsi_is_fc_rport(job->dev)) + return dev_to_rport(job->dev); + return NULL; +} + +#endif /* SCSI_TRANSPORT_FC_H */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/scsi/scsi_transport_fc.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/scsi/scsi_transport_fc.h.yml new file mode 100644 index 00000000000..b01b84a3a29 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/scsi/scsi_transport_fc.h.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2003 Silicon Graphics, Inc. + - Copyright (c) 2004-2007 James Smart, Emulex Corporation Rewrite +holders: + - Silicon Graphics, Inc. + - James Smart, Emulex Corporation Rewrite diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/sound/emu10k1.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/sound/emu10k1.h new file mode 100644 index 00000000000..6091ecc793f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/sound/emu10k1.h @@ -0,0 +1,6 @@ +/* + * Copyright (c) by Jaroslav Kysela , + * Creative Labs, Inc. + * Definitions for EMU10K1 (SB Live!) chips + * + diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/sound/emu10k1.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/sound/emu10k1.h.yml new file mode 100644 index 00000000000..926ca800299 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/sound/emu10k1.h.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) by Jaroslav Kysela , Creative Labs, Inc. +holders: + - Jaroslav Kysela , Creative Labs, Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/in.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/in.h new file mode 100644 index 00000000000..062b828d12d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/in.h @@ -0,0 +1,3 @@ + * Authors: Original taken from the GNU Project file. + * Fred N. van Kempen, + diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/in.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/in.h.yml new file mode 100644 index 00000000000..af20123a27d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/in.h.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - Original taken from the GNU Project diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/mic_common.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/mic_common.h new file mode 100644 index 00000000000..872a9ffb594 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/mic_common.h @@ -0,0 +1,235 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * Intel MIC Platform Software Stack (MPSS) + * + * Copyright(c) 2013 Intel Corporation. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, version 2, as + * published by the Free Software Foundation. + * + * 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. + * + * The full GNU General Public License is included in this distribution in + * the file called "COPYING". + * + * Intel MIC driver. + * + */ +#ifndef __MIC_COMMON_H_ +#define __MIC_COMMON_H_ + +#include + +#define __mic_align(a, x) (((a) + (x) - 1) & ~((x) - 1)) + +/** + * struct mic_device_desc: Virtio device information shared between the + * virtio driver and userspace backend + * + * @type: Device type: console/network/disk etc. Type 0/-1 terminates. + * @num_vq: Number of virtqueues. + * @feature_len: Number of bytes of feature bits. Multiply by 2: one for + host features and one for guest acknowledgements. + * @config_len: Number of bytes of the config array after virtqueues. + * @status: A status byte, written by the Guest. + * @config: Start of the following variable length config. + */ +struct mic_device_desc { + __s8 type; + __u8 num_vq; + __u8 feature_len; + __u8 config_len; + __u8 status; + __le64 config[0]; +} __attribute__ ((aligned(8))); + +/** + * struct mic_device_ctrl: Per virtio device information in the device page + * used internally by the host and card side drivers. + * + * @vdev: Used for storing MIC vdev information by the guest. + * @config_change: Set to 1 by host when a config change is requested. + * @vdev_reset: Set to 1 by guest to indicate virtio device has been reset. + * @guest_ack: Set to 1 by guest to ack a command. + * @host_ack: Set to 1 by host to ack a command. + * @used_address_updated: Set to 1 by guest when the used address should be + * updated. + * @c2h_vdev_db: The doorbell number to be used by guest. Set by host. + * @h2c_vdev_db: The doorbell number to be used by host. Set by guest. + */ +struct mic_device_ctrl { + __le64 vdev; + __u8 config_change; + __u8 vdev_reset; + __u8 guest_ack; + __u8 host_ack; + __u8 used_address_updated; + __s8 c2h_vdev_db; + __s8 h2c_vdev_db; +} __attribute__ ((aligned(8))); + +/** + * struct mic_bootparam: Virtio device independent information in device page + * + * @magic: A magic value used by the card to ensure it can see the host + * @h2c_config_db: Host to Card Virtio config doorbell set by card + * @node_id: Unique id of the node + * @h2c_scif_db - Host to card SCIF doorbell set by card + * @c2h_scif_db - Card to host SCIF doorbell set by host + * @scif_host_dma_addr - SCIF host queue pair DMA address + * @scif_card_dma_addr - SCIF card queue pair DMA address + */ +struct mic_bootparam { + __le32 magic; + __s8 h2c_config_db; + __u8 node_id; + __u8 h2c_scif_db; + __u8 c2h_scif_db; + __u64 scif_host_dma_addr; + __u64 scif_card_dma_addr; +} __attribute__ ((aligned(8))); + +/** + * struct mic_device_page: High level representation of the device page + * + * @bootparam: The bootparam structure is used for sharing information and + * status updates between MIC host and card drivers. + * @desc: Array of MIC virtio device descriptors. + */ +struct mic_device_page { + struct mic_bootparam bootparam; + struct mic_device_desc desc[0]; +}; +/** + * struct mic_vqconfig: This is how we expect the device configuration field + * for a virtqueue to be laid out in config space. + * + * @address: Guest/MIC physical address of the virtio ring + * (avail and desc rings) + * @used_address: Guest/MIC physical address of the used ring + * @num: The number of entries in the virtio_ring + */ +struct mic_vqconfig { + __le64 address; + __le64 used_address; + __le16 num; +} __attribute__ ((aligned(8))); + +/* + * The alignment to use between consumer and producer parts of vring. + * This is pagesize for historical reasons. + */ +#define MIC_VIRTIO_RING_ALIGN 4096 + +#define MIC_MAX_VRINGS 4 +#define MIC_VRING_ENTRIES 128 + +/* + * Max vring entries (power of 2) to ensure desc and avail rings + * fit in a single page + */ +#define MIC_MAX_VRING_ENTRIES 128 + +/** + * Max size of the desc block in bytes: includes: + * - struct mic_device_desc + * - struct mic_vqconfig (num_vq of these) + * - host and guest features + * - virtio device config space + */ +#define MIC_MAX_DESC_BLK_SIZE 256 + +/** + * struct _mic_vring_info - Host vring info exposed to userspace backend + * for the avail index and magic for the card. + * + * @avail_idx: host avail idx + * @magic: A magic debug cookie. + */ +struct _mic_vring_info { + __u16 avail_idx; + __le32 magic; +}; + +/** + * struct mic_vring - Vring information. + * + * @vr: The virtio ring. + * @info: Host vring information exposed to the userspace backend for the + * avail index and magic for the card. + * @va: The va for the buffer allocated for vr and info. + * @len: The length of the buffer required for allocating vr and info. + */ +struct mic_vring { + struct vring vr; + struct _mic_vring_info *info; + void *va; + int len; +}; + +#define mic_aligned_desc_size(d) __mic_align(mic_desc_size(d), 8) + +#ifndef INTEL_MIC_CARD +static inline unsigned mic_desc_size(const struct mic_device_desc *desc) +{ + return sizeof(*desc) + desc->num_vq * sizeof(struct mic_vqconfig) + + desc->feature_len * 2 + desc->config_len; +} + +static inline struct mic_vqconfig * +mic_vq_config(const struct mic_device_desc *desc) +{ + return (struct mic_vqconfig *)(desc + 1); +} + +static inline __u8 *mic_vq_features(const struct mic_device_desc *desc) +{ + return (__u8 *)(mic_vq_config(desc) + desc->num_vq); +} + +static inline __u8 *mic_vq_configspace(const struct mic_device_desc *desc) +{ + return mic_vq_features(desc) + desc->feature_len * 2; +} +static inline unsigned mic_total_desc_size(struct mic_device_desc *desc) +{ + return mic_aligned_desc_size(desc) + sizeof(struct mic_device_ctrl); +} +#endif + +/* Device page size */ +#define MIC_DP_SIZE 4096 + +#define MIC_MAGIC 0xc0ffee00 + +/** + * enum mic_states - MIC states. + */ +enum mic_states { + MIC_READY = 0, + MIC_BOOTING, + MIC_ONLINE, + MIC_SHUTTING_DOWN, + MIC_RESETTING, + MIC_RESET_FAILED, + MIC_LAST +}; + +/** + * enum mic_status - MIC status reported by card after + * a host or card initiated shutdown or a card crash. + */ +enum mic_status { + MIC_NOP = 0, + MIC_CRASHED, + MIC_HALTED, + MIC_POWER_OFF, + MIC_RESTART, + MIC_STATUS_LAST +}; + +#endif \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/mic_common.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/mic_common.h.yml new file mode 100644 index 00000000000..b19512d6d9f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/mic_common.h.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2013 Intel Corporation +holders: + - Intel Corporation +authors: + - the Guest. @config Start diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/nbd.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/nbd.h new file mode 100644 index 00000000000..5832d5b8ccd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/nbd.h @@ -0,0 +1,89 @@ +/* SPDX-License-Identifier: GPL-1.0+ WITH Linux-syscall-note */ +/* + * 1999 Copyright (C) Pavel Machek, pavel@ucw.cz. This code is GPL. + * 1999/11/04 Copyright (C) 1999 VMware, Inc. (Regis "HPReg" Duchesne) + * Made nbd_end_request() use the io_request_lock + * 2001 Copyright (C) Steven Whitehouse + * New nbd_end_request() for compatibility with new linux block + * layer code. + * 2003/06/24 Louis D. Langholtz + * Removed unneeded blksize_bits field from nbd_device struct. + * Cleanup PARANOIA usage & code. + * 2004/02/19 Paul Clements + * Removed PARANOIA, plus various cleanup and comments + */ + +#ifndef _UAPILINUX_NBD_H +#define _UAPILINUX_NBD_H + +#include + +#define NBD_SET_SOCK _IO( 0xab, 0 ) +#define NBD_SET_BLKSIZE _IO( 0xab, 1 ) +#define NBD_SET_SIZE _IO( 0xab, 2 ) +#define NBD_DO_IT _IO( 0xab, 3 ) +#define NBD_CLEAR_SOCK _IO( 0xab, 4 ) +#define NBD_CLEAR_QUE _IO( 0xab, 5 ) +#define NBD_PRINT_DEBUG _IO( 0xab, 6 ) +#define NBD_SET_SIZE_BLOCKS _IO( 0xab, 7 ) +#define NBD_DISCONNECT _IO( 0xab, 8 ) +#define NBD_SET_TIMEOUT _IO( 0xab, 9 ) +#define NBD_SET_FLAGS _IO( 0xab, 10) + +enum { + NBD_CMD_READ = 0, + NBD_CMD_WRITE = 1, + NBD_CMD_DISC = 2, + NBD_CMD_FLUSH = 3, + NBD_CMD_TRIM = 4 +}; + +/* values for flags field, these are server interaction specific. */ +#define NBD_FLAG_HAS_FLAGS (1 << 0) /* nbd-server supports flags */ +#define NBD_FLAG_READ_ONLY (1 << 1) /* device is read-only */ +#define NBD_FLAG_SEND_FLUSH (1 << 2) /* can flush writeback cache */ +#define NBD_FLAG_SEND_FUA (1 << 3) /* send FUA (forced unit access) */ +/* there is a gap here to match userspace */ +#define NBD_FLAG_SEND_TRIM (1 << 5) /* send trim/discard */ +#define NBD_FLAG_CAN_MULTI_CONN (1 << 8) /* Server supports multiple connections per export. */ + +/* values for cmd flags in the upper 16 bits of request type */ +#define NBD_CMD_FLAG_FUA (1 << 16) /* FUA (forced unit access) op */ + +/* These are client behavior specific flags. */ +#define NBD_CFLAG_DESTROY_ON_DISCONNECT (1 << 0) /* delete the nbd device on + disconnect. */ +#define NBD_CFLAG_DISCONNECT_ON_CLOSE (1 << 1) /* disconnect the nbd device on + * close by last opener. + */ + +/* userspace doesn't need the nbd_device structure */ + +/* These are sent over the network in the request/reply magic fields */ + +#define NBD_REQUEST_MAGIC 0x25609513 +#define NBD_REPLY_MAGIC 0x67446698 +/* Do *not* use magics: 0x12560953 0x96744668. */ + +/* + * This is the packet used for communication between client and + * server. All data are in network byte order. + */ +struct nbd_request { + __be32 magic; + __be32 type; /* == READ || == WRITE */ + char handle[8]; + __be64 from; + __be32 len; +} __attribute__((packed)); + +/* + * This is the reply packet that nbd-server sends back to the client after + * it has completed an I/O request (or an error occurs). + */ +struct nbd_reply { + __be32 magic; + __be32 error; /* 0 = ok, else error */ + char handle[8]; /* handle you got from request */ +}; +#endif /* _UAPILINUX_NBD_H */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/nbd.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/nbd.h.yml new file mode 100644 index 00000000000..4fd39790af8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/nbd.h.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Pavel Machek, pavel@ucw.cz + - Copyright (c) 1999 VMware, Inc. (Regis HPReg Duchesne) Made + - Copyright (c) Steven Whitehouse +holders: + - Pavel Machek + - VMware, Inc. (Regis HPReg Duchesne) Made + - Steven Whitehouse diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/v4l2-controls.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/v4l2-controls.h new file mode 100644 index 00000000000..094dfccdb56 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/v4l2-controls.h @@ -0,0 +1,1095 @@ +/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */ +/* + * Video for Linux Two controls header file + * + * Copyright (C) 1999-2012 the contributors + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Alternatively you can redistribute this file under the terms of the + * BSD license as stated below: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. The names of its contributors may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The contents of this header was split off from videodev2.h. All control + * definitions should be added to this header, which is included by + * videodev2.h. + */ + +#ifndef __LINUX_V4L2_CONTROLS_H +#define __LINUX_V4L2_CONTROLS_H + +/* Control classes */ +#define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ +#define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ +#define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ +#define V4L2_CTRL_CLASS_FM_TX 0x009b0000 /* FM Modulator controls */ +#define V4L2_CTRL_CLASS_FLASH 0x009c0000 /* Camera flash controls */ +#define V4L2_CTRL_CLASS_JPEG 0x009d0000 /* JPEG-compression controls */ +#define V4L2_CTRL_CLASS_IMAGE_SOURCE 0x009e0000 /* Image source controls */ +#define V4L2_CTRL_CLASS_IMAGE_PROC 0x009f0000 /* Image processing controls */ +#define V4L2_CTRL_CLASS_DV 0x00a00000 /* Digital Video controls */ +#define V4L2_CTRL_CLASS_FM_RX 0x00a10000 /* FM Receiver controls */ +#define V4L2_CTRL_CLASS_RF_TUNER 0x00a20000 /* RF tuner controls */ +#define V4L2_CTRL_CLASS_DETECT 0x00a30000 /* Detection controls */ + +/* User-class control IDs */ + +#define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900) +#define V4L2_CID_USER_BASE V4L2_CID_BASE +#define V4L2_CID_USER_CLASS (V4L2_CTRL_CLASS_USER | 1) +#define V4L2_CID_BRIGHTNESS (V4L2_CID_BASE+0) +#define V4L2_CID_CONTRAST (V4L2_CID_BASE+1) +#define V4L2_CID_SATURATION (V4L2_CID_BASE+2) +#define V4L2_CID_HUE (V4L2_CID_BASE+3) +#define V4L2_CID_AUDIO_VOLUME (V4L2_CID_BASE+5) +#define V4L2_CID_AUDIO_BALANCE (V4L2_CID_BASE+6) +#define V4L2_CID_AUDIO_BASS (V4L2_CID_BASE+7) +#define V4L2_CID_AUDIO_TREBLE (V4L2_CID_BASE+8) +#define V4L2_CID_AUDIO_MUTE (V4L2_CID_BASE+9) +#define V4L2_CID_AUDIO_LOUDNESS (V4L2_CID_BASE+10) +#define V4L2_CID_BLACK_LEVEL (V4L2_CID_BASE+11) /* Deprecated */ +#define V4L2_CID_AUTO_WHITE_BALANCE (V4L2_CID_BASE+12) +#define V4L2_CID_DO_WHITE_BALANCE (V4L2_CID_BASE+13) +#define V4L2_CID_RED_BALANCE (V4L2_CID_BASE+14) +#define V4L2_CID_BLUE_BALANCE (V4L2_CID_BASE+15) +#define V4L2_CID_GAMMA (V4L2_CID_BASE+16) +#define V4L2_CID_WHITENESS (V4L2_CID_GAMMA) /* Deprecated */ +#define V4L2_CID_EXPOSURE (V4L2_CID_BASE+17) +#define V4L2_CID_AUTOGAIN (V4L2_CID_BASE+18) +#define V4L2_CID_GAIN (V4L2_CID_BASE+19) +#define V4L2_CID_HFLIP (V4L2_CID_BASE+20) +#define V4L2_CID_VFLIP (V4L2_CID_BASE+21) + +#define V4L2_CID_POWER_LINE_FREQUENCY (V4L2_CID_BASE+24) +enum v4l2_power_line_frequency { + V4L2_CID_POWER_LINE_FREQUENCY_DISABLED = 0, + V4L2_CID_POWER_LINE_FREQUENCY_50HZ = 1, + V4L2_CID_POWER_LINE_FREQUENCY_60HZ = 2, + V4L2_CID_POWER_LINE_FREQUENCY_AUTO = 3, +}; +#define V4L2_CID_HUE_AUTO (V4L2_CID_BASE+25) +#define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE+26) +#define V4L2_CID_SHARPNESS (V4L2_CID_BASE+27) +#define V4L2_CID_BACKLIGHT_COMPENSATION (V4L2_CID_BASE+28) +#define V4L2_CID_CHROMA_AGC (V4L2_CID_BASE+29) +#define V4L2_CID_COLOR_KILLER (V4L2_CID_BASE+30) +#define V4L2_CID_COLORFX (V4L2_CID_BASE+31) +enum v4l2_colorfx { + V4L2_COLORFX_NONE = 0, + V4L2_COLORFX_BW = 1, + V4L2_COLORFX_SEPIA = 2, + V4L2_COLORFX_NEGATIVE = 3, + V4L2_COLORFX_EMBOSS = 4, + V4L2_COLORFX_SKETCH = 5, + V4L2_COLORFX_SKY_BLUE = 6, + V4L2_COLORFX_GRASS_GREEN = 7, + V4L2_COLORFX_SKIN_WHITEN = 8, + V4L2_COLORFX_VIVID = 9, + V4L2_COLORFX_AQUA = 10, + V4L2_COLORFX_ART_FREEZE = 11, + V4L2_COLORFX_SILHOUETTE = 12, + V4L2_COLORFX_SOLARIZATION = 13, + V4L2_COLORFX_ANTIQUE = 14, + V4L2_COLORFX_SET_CBCR = 15, +}; +#define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) +#define V4L2_CID_BAND_STOP_FILTER (V4L2_CID_BASE+33) + +#define V4L2_CID_ROTATE (V4L2_CID_BASE+34) +#define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) + +#define V4L2_CID_CHROMA_GAIN (V4L2_CID_BASE+36) + +#define V4L2_CID_ILLUMINATORS_1 (V4L2_CID_BASE+37) +#define V4L2_CID_ILLUMINATORS_2 (V4L2_CID_BASE+38) + +#define V4L2_CID_MIN_BUFFERS_FOR_CAPTURE (V4L2_CID_BASE+39) +#define V4L2_CID_MIN_BUFFERS_FOR_OUTPUT (V4L2_CID_BASE+40) + +#define V4L2_CID_ALPHA_COMPONENT (V4L2_CID_BASE+41) +#define V4L2_CID_COLORFX_CBCR (V4L2_CID_BASE+42) + +/* last CID + 1 */ +#define V4L2_CID_LASTP1 (V4L2_CID_BASE+43) + +/* USER-class private control IDs */ + +/* The base for the meye driver controls. See linux/meye.h for the list + * of controls. We reserve 16 controls for this driver. */ +#define V4L2_CID_USER_MEYE_BASE (V4L2_CID_USER_BASE + 0x1000) + +/* The base for the bttv driver controls. + * We reserve 32 controls for this driver. */ +#define V4L2_CID_USER_BTTV_BASE (V4L2_CID_USER_BASE + 0x1010) + + +/* The base for the s2255 driver controls. + * We reserve 16 controls for this driver. */ +#define V4L2_CID_USER_S2255_BASE (V4L2_CID_USER_BASE + 0x1030) + +/* + * The base for the si476x driver controls. See include/media/drv-intf/si476x.h + * for the list of controls. Total of 16 controls is reserved for this driver + */ +#define V4L2_CID_USER_SI476X_BASE (V4L2_CID_USER_BASE + 0x1040) + +/* The base for the TI VPE driver controls. Total of 16 controls is reserved for + * this driver */ +#define V4L2_CID_USER_TI_VPE_BASE (V4L2_CID_USER_BASE + 0x1050) + +/* The base for the saa7134 driver controls. + * We reserve 16 controls for this driver. */ +#define V4L2_CID_USER_SAA7134_BASE (V4L2_CID_USER_BASE + 0x1060) + +/* The base for the adv7180 driver controls. + * We reserve 16 controls for this driver. */ +#define V4L2_CID_USER_ADV7180_BASE (V4L2_CID_USER_BASE + 0x1070) + +/* The base for the tc358743 driver controls. + * We reserve 16 controls for this driver. */ +#define V4L2_CID_USER_TC358743_BASE (V4L2_CID_USER_BASE + 0x1080) + +/* The base for the max217x driver controls. + * We reserve 32 controls for this driver + */ +#define V4L2_CID_USER_MAX217X_BASE (V4L2_CID_USER_BASE + 0x1090) + +/* The base for the imx driver controls. + * We reserve 16 controls for this driver. */ +#define V4L2_CID_USER_IMX_BASE (V4L2_CID_USER_BASE + 0x10b0) + +/* MPEG-class control IDs */ +/* The MPEG controls are applicable to all codec controls + * and the 'MPEG' part of the define is historical */ + +#define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) +#define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1) + +/* MPEG streams, specific to multiplexed streams */ +#define V4L2_CID_MPEG_STREAM_TYPE (V4L2_CID_MPEG_BASE+0) +enum v4l2_mpeg_stream_type { + V4L2_MPEG_STREAM_TYPE_MPEG2_PS = 0, /* MPEG-2 program stream */ + V4L2_MPEG_STREAM_TYPE_MPEG2_TS = 1, /* MPEG-2 transport stream */ + V4L2_MPEG_STREAM_TYPE_MPEG1_SS = 2, /* MPEG-1 system stream */ + V4L2_MPEG_STREAM_TYPE_MPEG2_DVD = 3, /* MPEG-2 DVD-compatible stream */ + V4L2_MPEG_STREAM_TYPE_MPEG1_VCD = 4, /* MPEG-1 VCD-compatible stream */ + V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD = 5, /* MPEG-2 SVCD-compatible stream */ +}; +#define V4L2_CID_MPEG_STREAM_PID_PMT (V4L2_CID_MPEG_BASE+1) +#define V4L2_CID_MPEG_STREAM_PID_AUDIO (V4L2_CID_MPEG_BASE+2) +#define V4L2_CID_MPEG_STREAM_PID_VIDEO (V4L2_CID_MPEG_BASE+3) +#define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4) +#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5) +#define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6) +#define V4L2_CID_MPEG_STREAM_VBI_FMT (V4L2_CID_MPEG_BASE+7) +enum v4l2_mpeg_stream_vbi_fmt { + V4L2_MPEG_STREAM_VBI_FMT_NONE = 0, /* No VBI in the MPEG stream */ + V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */ +}; + +/* MPEG audio controls specific to multiplexed streams */ +#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100) +enum v4l2_mpeg_audio_sampling_freq { + V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100 = 0, + V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000 = 1, + V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000 = 2, +}; +#define V4L2_CID_MPEG_AUDIO_ENCODING (V4L2_CID_MPEG_BASE+101) +enum v4l2_mpeg_audio_encoding { + V4L2_MPEG_AUDIO_ENCODING_LAYER_1 = 0, + V4L2_MPEG_AUDIO_ENCODING_LAYER_2 = 1, + V4L2_MPEG_AUDIO_ENCODING_LAYER_3 = 2, + V4L2_MPEG_AUDIO_ENCODING_AAC = 3, + V4L2_MPEG_AUDIO_ENCODING_AC3 = 4, +}; +#define V4L2_CID_MPEG_AUDIO_L1_BITRATE (V4L2_CID_MPEG_BASE+102) +enum v4l2_mpeg_audio_l1_bitrate { + V4L2_MPEG_AUDIO_L1_BITRATE_32K = 0, + V4L2_MPEG_AUDIO_L1_BITRATE_64K = 1, + V4L2_MPEG_AUDIO_L1_BITRATE_96K = 2, + V4L2_MPEG_AUDIO_L1_BITRATE_128K = 3, + V4L2_MPEG_AUDIO_L1_BITRATE_160K = 4, + V4L2_MPEG_AUDIO_L1_BITRATE_192K = 5, + V4L2_MPEG_AUDIO_L1_BITRATE_224K = 6, + V4L2_MPEG_AUDIO_L1_BITRATE_256K = 7, + V4L2_MPEG_AUDIO_L1_BITRATE_288K = 8, + V4L2_MPEG_AUDIO_L1_BITRATE_320K = 9, + V4L2_MPEG_AUDIO_L1_BITRATE_352K = 10, + V4L2_MPEG_AUDIO_L1_BITRATE_384K = 11, + V4L2_MPEG_AUDIO_L1_BITRATE_416K = 12, + V4L2_MPEG_AUDIO_L1_BITRATE_448K = 13, +}; +#define V4L2_CID_MPEG_AUDIO_L2_BITRATE (V4L2_CID_MPEG_BASE+103) +enum v4l2_mpeg_audio_l2_bitrate { + V4L2_MPEG_AUDIO_L2_BITRATE_32K = 0, + V4L2_MPEG_AUDIO_L2_BITRATE_48K = 1, + V4L2_MPEG_AUDIO_L2_BITRATE_56K = 2, + V4L2_MPEG_AUDIO_L2_BITRATE_64K = 3, + V4L2_MPEG_AUDIO_L2_BITRATE_80K = 4, + V4L2_MPEG_AUDIO_L2_BITRATE_96K = 5, + V4L2_MPEG_AUDIO_L2_BITRATE_112K = 6, + V4L2_MPEG_AUDIO_L2_BITRATE_128K = 7, + V4L2_MPEG_AUDIO_L2_BITRATE_160K = 8, + V4L2_MPEG_AUDIO_L2_BITRATE_192K = 9, + V4L2_MPEG_AUDIO_L2_BITRATE_224K = 10, + V4L2_MPEG_AUDIO_L2_BITRATE_256K = 11, + V4L2_MPEG_AUDIO_L2_BITRATE_320K = 12, + V4L2_MPEG_AUDIO_L2_BITRATE_384K = 13, +}; +#define V4L2_CID_MPEG_AUDIO_L3_BITRATE (V4L2_CID_MPEG_BASE+104) +enum v4l2_mpeg_audio_l3_bitrate { + V4L2_MPEG_AUDIO_L3_BITRATE_32K = 0, + V4L2_MPEG_AUDIO_L3_BITRATE_40K = 1, + V4L2_MPEG_AUDIO_L3_BITRATE_48K = 2, + V4L2_MPEG_AUDIO_L3_BITRATE_56K = 3, + V4L2_MPEG_AUDIO_L3_BITRATE_64K = 4, + V4L2_MPEG_AUDIO_L3_BITRATE_80K = 5, + V4L2_MPEG_AUDIO_L3_BITRATE_96K = 6, + V4L2_MPEG_AUDIO_L3_BITRATE_112K = 7, + V4L2_MPEG_AUDIO_L3_BITRATE_128K = 8, + V4L2_MPEG_AUDIO_L3_BITRATE_160K = 9, + V4L2_MPEG_AUDIO_L3_BITRATE_192K = 10, + V4L2_MPEG_AUDIO_L3_BITRATE_224K = 11, + V4L2_MPEG_AUDIO_L3_BITRATE_256K = 12, + V4L2_MPEG_AUDIO_L3_BITRATE_320K = 13, +}; +#define V4L2_CID_MPEG_AUDIO_MODE (V4L2_CID_MPEG_BASE+105) +enum v4l2_mpeg_audio_mode { + V4L2_MPEG_AUDIO_MODE_STEREO = 0, + V4L2_MPEG_AUDIO_MODE_JOINT_STEREO = 1, + V4L2_MPEG_AUDIO_MODE_DUAL = 2, + V4L2_MPEG_AUDIO_MODE_MONO = 3, +}; +#define V4L2_CID_MPEG_AUDIO_MODE_EXTENSION (V4L2_CID_MPEG_BASE+106) +enum v4l2_mpeg_audio_mode_extension { + V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4 = 0, + V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8 = 1, + V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12 = 2, + V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16 = 3, +}; +#define V4L2_CID_MPEG_AUDIO_EMPHASIS (V4L2_CID_MPEG_BASE+107) +enum v4l2_mpeg_audio_emphasis { + V4L2_MPEG_AUDIO_EMPHASIS_NONE = 0, + V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS = 1, + V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17 = 2, +}; +#define V4L2_CID_MPEG_AUDIO_CRC (V4L2_CID_MPEG_BASE+108) +enum v4l2_mpeg_audio_crc { + V4L2_MPEG_AUDIO_CRC_NONE = 0, + V4L2_MPEG_AUDIO_CRC_CRC16 = 1, +}; +#define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_MPEG_BASE+109) +#define V4L2_CID_MPEG_AUDIO_AAC_BITRATE (V4L2_CID_MPEG_BASE+110) +#define V4L2_CID_MPEG_AUDIO_AC3_BITRATE (V4L2_CID_MPEG_BASE+111) +enum v4l2_mpeg_audio_ac3_bitrate { + V4L2_MPEG_AUDIO_AC3_BITRATE_32K = 0, + V4L2_MPEG_AUDIO_AC3_BITRATE_40K = 1, + V4L2_MPEG_AUDIO_AC3_BITRATE_48K = 2, + V4L2_MPEG_AUDIO_AC3_BITRATE_56K = 3, + V4L2_MPEG_AUDIO_AC3_BITRATE_64K = 4, + V4L2_MPEG_AUDIO_AC3_BITRATE_80K = 5, + V4L2_MPEG_AUDIO_AC3_BITRATE_96K = 6, + V4L2_MPEG_AUDIO_AC3_BITRATE_112K = 7, + V4L2_MPEG_AUDIO_AC3_BITRATE_128K = 8, + V4L2_MPEG_AUDIO_AC3_BITRATE_160K = 9, + V4L2_MPEG_AUDIO_AC3_BITRATE_192K = 10, + V4L2_MPEG_AUDIO_AC3_BITRATE_224K = 11, + V4L2_MPEG_AUDIO_AC3_BITRATE_256K = 12, + V4L2_MPEG_AUDIO_AC3_BITRATE_320K = 13, + V4L2_MPEG_AUDIO_AC3_BITRATE_384K = 14, + V4L2_MPEG_AUDIO_AC3_BITRATE_448K = 15, + V4L2_MPEG_AUDIO_AC3_BITRATE_512K = 16, + V4L2_MPEG_AUDIO_AC3_BITRATE_576K = 17, + V4L2_MPEG_AUDIO_AC3_BITRATE_640K = 18, +}; +#define V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK (V4L2_CID_MPEG_BASE+112) +enum v4l2_mpeg_audio_dec_playback { + V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO = 0, + V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO = 1, + V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT = 2, + V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT = 3, + V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO = 4, + V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO = 5, +}; +#define V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK (V4L2_CID_MPEG_BASE+113) + +/* MPEG video controls specific to multiplexed streams */ +#define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200) +enum v4l2_mpeg_video_encoding { + V4L2_MPEG_VIDEO_ENCODING_MPEG_1 = 0, + V4L2_MPEG_VIDEO_ENCODING_MPEG_2 = 1, + V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC = 2, +}; +#define V4L2_CID_MPEG_VIDEO_ASPECT (V4L2_CID_MPEG_BASE+201) +enum v4l2_mpeg_video_aspect { + V4L2_MPEG_VIDEO_ASPECT_1x1 = 0, + V4L2_MPEG_VIDEO_ASPECT_4x3 = 1, + V4L2_MPEG_VIDEO_ASPECT_16x9 = 2, + V4L2_MPEG_VIDEO_ASPECT_221x100 = 3, +}; +#define V4L2_CID_MPEG_VIDEO_B_FRAMES (V4L2_CID_MPEG_BASE+202) +#define V4L2_CID_MPEG_VIDEO_GOP_SIZE (V4L2_CID_MPEG_BASE+203) +#define V4L2_CID_MPEG_VIDEO_GOP_CLOSURE (V4L2_CID_MPEG_BASE+204) +#define V4L2_CID_MPEG_VIDEO_PULLDOWN (V4L2_CID_MPEG_BASE+205) +#define V4L2_CID_MPEG_VIDEO_BITRATE_MODE (V4L2_CID_MPEG_BASE+206) +enum v4l2_mpeg_video_bitrate_mode { + V4L2_MPEG_VIDEO_BITRATE_MODE_VBR = 0, + V4L2_MPEG_VIDEO_BITRATE_MODE_CBR = 1, +}; +#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207) +#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208) +#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209) +#define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_MPEG_BASE+210) +#define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_MPEG_BASE+211) +#define V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE (V4L2_CID_MPEG_BASE+212) +#define V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER (V4L2_CID_MPEG_BASE+213) +#define V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB (V4L2_CID_MPEG_BASE+214) +#define V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE (V4L2_CID_MPEG_BASE+215) +#define V4L2_CID_MPEG_VIDEO_HEADER_MODE (V4L2_CID_MPEG_BASE+216) +enum v4l2_mpeg_video_header_mode { + V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE = 0, + V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME = 1, + +}; +#define V4L2_CID_MPEG_VIDEO_MAX_REF_PIC (V4L2_CID_MPEG_BASE+217) +#define V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE (V4L2_CID_MPEG_BASE+218) +#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_BYTES (V4L2_CID_MPEG_BASE+219) +#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MAX_MB (V4L2_CID_MPEG_BASE+220) +#define V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE (V4L2_CID_MPEG_BASE+221) +enum v4l2_mpeg_video_multi_slice_mode { + V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE = 0, + V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_MB = 1, + V4L2_MPEG_VIDEO_MULTI_SICE_MODE_MAX_BYTES = 2, +}; +#define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222) +#define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223) +#define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224) +#define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_MPEG_BASE+225) +#define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_MPEG_BASE+226) +#define V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE (V4L2_CID_MPEG_BASE+227) +#define V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE (V4L2_CID_MPEG_BASE+228) +#define V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME (V4L2_CID_MPEG_BASE+229) + +#define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) +#define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) +#define V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP (V4L2_CID_MPEG_BASE+302) +#define V4L2_CID_MPEG_VIDEO_H263_MIN_QP (V4L2_CID_MPEG_BASE+303) +#define V4L2_CID_MPEG_VIDEO_H263_MAX_QP (V4L2_CID_MPEG_BASE+304) +#define V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP (V4L2_CID_MPEG_BASE+350) +#define V4L2_CID_MPEG_VIDEO_H264_P_FRAME_QP (V4L2_CID_MPEG_BASE+351) +#define V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP (V4L2_CID_MPEG_BASE+352) +#define V4L2_CID_MPEG_VIDEO_H264_MIN_QP (V4L2_CID_MPEG_BASE+353) +#define V4L2_CID_MPEG_VIDEO_H264_MAX_QP (V4L2_CID_MPEG_BASE+354) +#define V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM (V4L2_CID_MPEG_BASE+355) +#define V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE (V4L2_CID_MPEG_BASE+356) +#define V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE (V4L2_CID_MPEG_BASE+357) +enum v4l2_mpeg_video_h264_entropy_mode { + V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC = 0, + V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC = 1, +}; +#define V4L2_CID_MPEG_VIDEO_H264_I_PERIOD (V4L2_CID_MPEG_BASE+358) +#define V4L2_CID_MPEG_VIDEO_H264_LEVEL (V4L2_CID_MPEG_BASE+359) +enum v4l2_mpeg_video_h264_level { + V4L2_MPEG_VIDEO_H264_LEVEL_1_0 = 0, + V4L2_MPEG_VIDEO_H264_LEVEL_1B = 1, + V4L2_MPEG_VIDEO_H264_LEVEL_1_1 = 2, + V4L2_MPEG_VIDEO_H264_LEVEL_1_2 = 3, + V4L2_MPEG_VIDEO_H264_LEVEL_1_3 = 4, + V4L2_MPEG_VIDEO_H264_LEVEL_2_0 = 5, + V4L2_MPEG_VIDEO_H264_LEVEL_2_1 = 6, + V4L2_MPEG_VIDEO_H264_LEVEL_2_2 = 7, + V4L2_MPEG_VIDEO_H264_LEVEL_3_0 = 8, + V4L2_MPEG_VIDEO_H264_LEVEL_3_1 = 9, + V4L2_MPEG_VIDEO_H264_LEVEL_3_2 = 10, + V4L2_MPEG_VIDEO_H264_LEVEL_4_0 = 11, + V4L2_MPEG_VIDEO_H264_LEVEL_4_1 = 12, + V4L2_MPEG_VIDEO_H264_LEVEL_4_2 = 13, + V4L2_MPEG_VIDEO_H264_LEVEL_5_0 = 14, + V4L2_MPEG_VIDEO_H264_LEVEL_5_1 = 15, +}; +#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_ALPHA (V4L2_CID_MPEG_BASE+360) +#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_BETA (V4L2_CID_MPEG_BASE+361) +#define V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE (V4L2_CID_MPEG_BASE+362) +enum v4l2_mpeg_video_h264_loop_filter_mode { + V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED = 0, + V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED = 1, + V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2, +}; +#define V4L2_CID_MPEG_VIDEO_H264_PROFILE (V4L2_CID_MPEG_BASE+363) +enum v4l2_mpeg_video_h264_profile { + V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE = 0, + V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE = 1, + V4L2_MPEG_VIDEO_H264_PROFILE_MAIN = 2, + V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED = 3, + V4L2_MPEG_VIDEO_H264_PROFILE_HIGH = 4, + V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10 = 5, + V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422 = 6, + V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE = 7, + V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA = 8, + V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA = 9, + V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA = 10, + V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA = 11, + V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE = 12, + V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH = 13, + V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA = 14, + V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH = 15, + V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH = 16, +}; +#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_HEIGHT (V4L2_CID_MPEG_BASE+364) +#define V4L2_CID_MPEG_VIDEO_H264_VUI_EXT_SAR_WIDTH (V4L2_CID_MPEG_BASE+365) +#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (V4L2_CID_MPEG_BASE+366) +#define V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC (V4L2_CID_MPEG_BASE+367) +enum v4l2_mpeg_video_h264_vui_sar_idc { + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED = 0, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1 = 1, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11 = 2, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11 = 3, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11 = 4, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33 = 5, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11 = 6, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11 = 7, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11 = 8, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33 = 9, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11 = 10, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11 = 11, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33 = 12, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99 = 13, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3 = 14, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2 = 15, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16, + V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17, +}; +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (V4L2_CID_MPEG_BASE+368) +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (V4L2_CID_MPEG_BASE+369) +#define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE (V4L2_CID_MPEG_BASE+370) +enum v4l2_mpeg_video_h264_sei_fp_arrangement_type { + V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHECKERBOARD = 0, + V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN = 1, + V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW = 2, + V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE = 3, + V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM = 4, + V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL = 5, +}; +#define V4L2_CID_MPEG_VIDEO_H264_FMO (V4L2_CID_MPEG_BASE+371) +#define V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE (V4L2_CID_MPEG_BASE+372) +enum v4l2_mpeg_video_h264_fmo_map_type { + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES = 0, + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES = 1, + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER = 2, + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT = 3, + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN = 4, + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN = 5, + V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT = 6, +}; +#define V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (V4L2_CID_MPEG_BASE+373) +#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION (V4L2_CID_MPEG_BASE+374) +enum v4l2_mpeg_video_h264_fmo_change_dir { + V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT = 0, + V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT = 1, +}; +#define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (V4L2_CID_MPEG_BASE+375) +#define V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (V4L2_CID_MPEG_BASE+376) +#define V4L2_CID_MPEG_VIDEO_H264_ASO (V4L2_CID_MPEG_BASE+377) +#define V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (V4L2_CID_MPEG_BASE+378) +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (V4L2_CID_MPEG_BASE+379) +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE (V4L2_CID_MPEG_BASE+380) +enum v4l2_mpeg_video_h264_hierarchical_coding_type { + V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B = 0, + V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P = 1, +}; +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (V4L2_CID_MPEG_BASE+381) +#define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (V4L2_CID_MPEG_BASE+382) +#define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400) +#define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401) +#define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402) +#define V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP (V4L2_CID_MPEG_BASE+403) +#define V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP (V4L2_CID_MPEG_BASE+404) +#define V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL (V4L2_CID_MPEG_BASE+405) +enum v4l2_mpeg_video_mpeg4_level { + V4L2_MPEG_VIDEO_MPEG4_LEVEL_0 = 0, + V4L2_MPEG_VIDEO_MPEG4_LEVEL_0B = 1, + V4L2_MPEG_VIDEO_MPEG4_LEVEL_1 = 2, + V4L2_MPEG_VIDEO_MPEG4_LEVEL_2 = 3, + V4L2_MPEG_VIDEO_MPEG4_LEVEL_3 = 4, + V4L2_MPEG_VIDEO_MPEG4_LEVEL_3B = 5, + V4L2_MPEG_VIDEO_MPEG4_LEVEL_4 = 6, + V4L2_MPEG_VIDEO_MPEG4_LEVEL_5 = 7, +}; +#define V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE (V4L2_CID_MPEG_BASE+406) +enum v4l2_mpeg_video_mpeg4_profile { + V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE = 0, + V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_SIMPLE = 1, + V4L2_MPEG_VIDEO_MPEG4_PROFILE_CORE = 2, + V4L2_MPEG_VIDEO_MPEG4_PROFILE_SIMPLE_SCALABLE = 3, + V4L2_MPEG_VIDEO_MPEG4_PROFILE_ADVANCED_CODING_EFFICIENCY = 4, +}; +#define V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (V4L2_CID_MPEG_BASE+407) + +/* Control IDs for VP8 streams + * Although VP8 is not part of MPEG we add these controls to the MPEG class + * as that class is already handling other video compression standards + */ +#define V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS (V4L2_CID_MPEG_BASE+500) +enum v4l2_vp8_num_partitions { + V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION = 0, + V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS = 1, + V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS = 2, + V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS = 3, +}; +#define V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (V4L2_CID_MPEG_BASE+501) +#define V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES (V4L2_CID_MPEG_BASE+502) +enum v4l2_vp8_num_ref_frames { + V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME = 0, + V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME = 1, + V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME = 2, +}; +#define V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (V4L2_CID_MPEG_BASE+503) +#define V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (V4L2_CID_MPEG_BASE+504) +#define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (V4L2_CID_MPEG_BASE+505) +#define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL (V4L2_CID_MPEG_BASE+506) +enum v4l2_vp8_golden_frame_sel { + V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV = 0, + V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD = 1, +}; +#define V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (V4L2_CID_MPEG_BASE+507) +#define V4L2_CID_MPEG_VIDEO_VPX_MAX_QP (V4L2_CID_MPEG_BASE+508) +#define V4L2_CID_MPEG_VIDEO_VPX_I_FRAME_QP (V4L2_CID_MPEG_BASE+509) +#define V4L2_CID_MPEG_VIDEO_VPX_P_FRAME_QP (V4L2_CID_MPEG_BASE+510) + +#define V4L2_CID_MPEG_VIDEO_VP8_PROFILE (V4L2_CID_MPEG_BASE+511) +enum v4l2_mpeg_video_vp8_profile { + V4L2_MPEG_VIDEO_VP8_PROFILE_0 = 0, + V4L2_MPEG_VIDEO_VP8_PROFILE_1 = 1, + V4L2_MPEG_VIDEO_VP8_PROFILE_2 = 2, + V4L2_MPEG_VIDEO_VP8_PROFILE_3 = 3, +}; +/* Deprecated alias for compatibility reasons. */ +#define V4L2_CID_MPEG_VIDEO_VPX_PROFILE V4L2_CID_MPEG_VIDEO_VP8_PROFILE +#define V4L2_CID_MPEG_VIDEO_VP9_PROFILE (V4L2_CID_MPEG_BASE+512) +enum v4l2_mpeg_video_vp9_profile { + V4L2_MPEG_VIDEO_VP9_PROFILE_0 = 0, + V4L2_MPEG_VIDEO_VP9_PROFILE_1 = 1, + V4L2_MPEG_VIDEO_VP9_PROFILE_2 = 2, + V4L2_MPEG_VIDEO_VP9_PROFILE_3 = 3, +}; + +/* CIDs for HEVC encoding. */ + +#define V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP (V4L2_CID_MPEG_BASE + 600) +#define V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP (V4L2_CID_MPEG_BASE + 601) +#define V4L2_CID_MPEG_VIDEO_HEVC_I_FRAME_QP (V4L2_CID_MPEG_BASE + 602) +#define V4L2_CID_MPEG_VIDEO_HEVC_P_FRAME_QP (V4L2_CID_MPEG_BASE + 603) +#define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_QP (V4L2_CID_MPEG_BASE + 604) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_QP (V4L2_CID_MPEG_BASE + 605) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_TYPE (V4L2_CID_MPEG_BASE + 606) +enum v4l2_mpeg_video_hevc_hier_coding_type { + V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_B = 0, + V4L2_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_P = 1, +}; +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_LAYER (V4L2_CID_MPEG_BASE + 607) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_QP (V4L2_CID_MPEG_BASE + 608) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_QP (V4L2_CID_MPEG_BASE + 609) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_QP (V4L2_CID_MPEG_BASE + 610) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_QP (V4L2_CID_MPEG_BASE + 611) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_QP (V4L2_CID_MPEG_BASE + 612) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_QP (V4L2_CID_MPEG_BASE + 613) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_QP (V4L2_CID_MPEG_BASE + 614) +#define V4L2_CID_MPEG_VIDEO_HEVC_PROFILE (V4L2_CID_MPEG_BASE + 615) +enum v4l2_mpeg_video_hevc_profile { + V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN = 0, + V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE = 1, + V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10 = 2, +}; +#define V4L2_CID_MPEG_VIDEO_HEVC_LEVEL (V4L2_CID_MPEG_BASE + 616) +enum v4l2_mpeg_video_hevc_level { + V4L2_MPEG_VIDEO_HEVC_LEVEL_1 = 0, + V4L2_MPEG_VIDEO_HEVC_LEVEL_2 = 1, + V4L2_MPEG_VIDEO_HEVC_LEVEL_2_1 = 2, + V4L2_MPEG_VIDEO_HEVC_LEVEL_3 = 3, + V4L2_MPEG_VIDEO_HEVC_LEVEL_3_1 = 4, + V4L2_MPEG_VIDEO_HEVC_LEVEL_4 = 5, + V4L2_MPEG_VIDEO_HEVC_LEVEL_4_1 = 6, + V4L2_MPEG_VIDEO_HEVC_LEVEL_5 = 7, + V4L2_MPEG_VIDEO_HEVC_LEVEL_5_1 = 8, + V4L2_MPEG_VIDEO_HEVC_LEVEL_5_2 = 9, + V4L2_MPEG_VIDEO_HEVC_LEVEL_6 = 10, + V4L2_MPEG_VIDEO_HEVC_LEVEL_6_1 = 11, + V4L2_MPEG_VIDEO_HEVC_LEVEL_6_2 = 12, +}; +#define V4L2_CID_MPEG_VIDEO_HEVC_FRAME_RATE_RESOLUTION (V4L2_CID_MPEG_BASE + 617) +#define V4L2_CID_MPEG_VIDEO_HEVC_TIER (V4L2_CID_MPEG_BASE + 618) +enum v4l2_mpeg_video_hevc_tier { + V4L2_MPEG_VIDEO_HEVC_TIER_MAIN = 0, + V4L2_MPEG_VIDEO_HEVC_TIER_HIGH = 1, +}; +#define V4L2_CID_MPEG_VIDEO_HEVC_MAX_PARTITION_DEPTH (V4L2_CID_MPEG_BASE + 619) +#define V4L2_CID_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE (V4L2_CID_MPEG_BASE + 620) +enum v4l2_cid_mpeg_video_hevc_loop_filter_mode { + V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED = 0, + V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_ENABLED = 1, + V4L2_MPEG_VIDEO_HEVC_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY = 2, +}; +#define V4L2_CID_MPEG_VIDEO_HEVC_LF_BETA_OFFSET_DIV2 (V4L2_CID_MPEG_BASE + 621) +#define V4L2_CID_MPEG_VIDEO_HEVC_LF_TC_OFFSET_DIV2 (V4L2_CID_MPEG_BASE + 622) +#define V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_TYPE (V4L2_CID_MPEG_BASE + 623) +enum v4l2_cid_mpeg_video_hevc_refresh_type { + V4L2_MPEG_VIDEO_HEVC_REFRESH_NONE = 0, + V4L2_MPEG_VIDEO_HEVC_REFRESH_CRA = 1, + V4L2_MPEG_VIDEO_HEVC_REFRESH_IDR = 2, +}; +#define V4L2_CID_MPEG_VIDEO_HEVC_REFRESH_PERIOD (V4L2_CID_MPEG_BASE + 624) +#define V4L2_CID_MPEG_VIDEO_HEVC_LOSSLESS_CU (V4L2_CID_MPEG_BASE + 625) +#define V4L2_CID_MPEG_VIDEO_HEVC_CONST_INTRA_PRED (V4L2_CID_MPEG_BASE + 626) +#define V4L2_CID_MPEG_VIDEO_HEVC_WAVEFRONT (V4L2_CID_MPEG_BASE + 627) +#define V4L2_CID_MPEG_VIDEO_HEVC_GENERAL_PB (V4L2_CID_MPEG_BASE + 628) +#define V4L2_CID_MPEG_VIDEO_HEVC_TEMPORAL_ID (V4L2_CID_MPEG_BASE + 629) +#define V4L2_CID_MPEG_VIDEO_HEVC_STRONG_SMOOTHING (V4L2_CID_MPEG_BASE + 630) +#define V4L2_CID_MPEG_VIDEO_HEVC_MAX_NUM_MERGE_MV_MINUS1 (V4L2_CID_MPEG_BASE + 631) +#define V4L2_CID_MPEG_VIDEO_HEVC_INTRA_PU_SPLIT (V4L2_CID_MPEG_BASE + 632) +#define V4L2_CID_MPEG_VIDEO_HEVC_TMV_PREDICTION (V4L2_CID_MPEG_BASE + 633) +#define V4L2_CID_MPEG_VIDEO_HEVC_WITHOUT_STARTCODE (V4L2_CID_MPEG_BASE + 634) +#define V4L2_CID_MPEG_VIDEO_HEVC_SIZE_OF_LENGTH_FIELD (V4L2_CID_MPEG_BASE + 635) +enum v4l2_cid_mpeg_video_hevc_size_of_length_field { + V4L2_MPEG_VIDEO_HEVC_SIZE_0 = 0, + V4L2_MPEG_VIDEO_HEVC_SIZE_1 = 1, + V4L2_MPEG_VIDEO_HEVC_SIZE_2 = 2, + V4L2_MPEG_VIDEO_HEVC_SIZE_4 = 3, +}; +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L0_BR (V4L2_CID_MPEG_BASE + 636) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L1_BR (V4L2_CID_MPEG_BASE + 637) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L2_BR (V4L2_CID_MPEG_BASE + 638) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L3_BR (V4L2_CID_MPEG_BASE + 639) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L4_BR (V4L2_CID_MPEG_BASE + 640) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L5_BR (V4L2_CID_MPEG_BASE + 641) +#define V4L2_CID_MPEG_VIDEO_HEVC_HIER_CODING_L6_BR (V4L2_CID_MPEG_BASE + 642) +#define V4L2_CID_MPEG_VIDEO_REF_NUMBER_FOR_PFRAMES (V4L2_CID_MPEG_BASE + 643) +#define V4L2_CID_MPEG_VIDEO_PREPEND_SPSPPS_TO_IDR (V4L2_CID_MPEG_BASE + 644) + +/* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ +#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) +#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0) +enum v4l2_mpeg_cx2341x_video_spatial_filter_mode { + V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL = 0, + V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO = 1, +}; +#define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+1) +#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+2) +enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type { + V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF = 0, + V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR = 1, + V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT = 2, + V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE = 3, + V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE = 4, +}; +#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+3) +enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type { + V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF = 0, + V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR = 1, +}; +#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+4) +enum v4l2_mpeg_cx2341x_video_temporal_filter_mode { + V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL = 0, + V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO = 1, +}; +#define V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER (V4L2_CID_MPEG_CX2341X_BASE+5) +#define V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (V4L2_CID_MPEG_CX2341X_BASE+6) +enum v4l2_mpeg_cx2341x_video_median_filter_type { + V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF = 0, + V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR = 1, + V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT = 2, + V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT = 3, + V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG = 4, +}; +#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+7) +#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8) +#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9) +#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10) +#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11) + +/* MPEG-class control IDs specific to the Samsung MFC 5.1 driver as defined by V4L2 */ +#define V4L2_CID_MPEG_MFC51_BASE (V4L2_CTRL_CLASS_MPEG | 0x1100) + +#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (V4L2_CID_MPEG_MFC51_BASE+0) +#define V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE (V4L2_CID_MPEG_MFC51_BASE+1) +#define V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE (V4L2_CID_MPEG_MFC51_BASE+2) +enum v4l2_mpeg_mfc51_video_frame_skip_mode { + V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_DISABLED = 0, + V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_LEVEL_LIMIT = 1, + V4L2_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE_BUF_LIMIT = 2, +}; +#define V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE (V4L2_CID_MPEG_MFC51_BASE+3) +enum v4l2_mpeg_mfc51_video_force_frame_type { + V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_DISABLED = 0, + V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_I_FRAME = 1, + V4L2_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE_NOT_CODED = 2, +}; +#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING (V4L2_CID_MPEG_MFC51_BASE+4) +#define V4L2_CID_MPEG_MFC51_VIDEO_PADDING_YUV (V4L2_CID_MPEG_MFC51_BASE+5) +#define V4L2_CID_MPEG_MFC51_VIDEO_RC_FIXED_TARGET_BIT (V4L2_CID_MPEG_MFC51_BASE+6) +#define V4L2_CID_MPEG_MFC51_VIDEO_RC_REACTION_COEFF (V4L2_CID_MPEG_MFC51_BASE+7) +#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_ACTIVITY (V4L2_CID_MPEG_MFC51_BASE+50) +#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_DARK (V4L2_CID_MPEG_MFC51_BASE+51) +#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_SMOOTH (V4L2_CID_MPEG_MFC51_BASE+52) +#define V4L2_CID_MPEG_MFC51_VIDEO_H264_ADAPTIVE_RC_STATIC (V4L2_CID_MPEG_MFC51_BASE+53) +#define V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (V4L2_CID_MPEG_MFC51_BASE+54) + +/* Camera class control IDs */ + +#define V4L2_CID_CAMERA_CLASS_BASE (V4L2_CTRL_CLASS_CAMERA | 0x900) +#define V4L2_CID_CAMERA_CLASS (V4L2_CTRL_CLASS_CAMERA | 1) + +#define V4L2_CID_EXPOSURE_AUTO (V4L2_CID_CAMERA_CLASS_BASE+1) +enum v4l2_exposure_auto_type { + V4L2_EXPOSURE_AUTO = 0, + V4L2_EXPOSURE_MANUAL = 1, + V4L2_EXPOSURE_SHUTTER_PRIORITY = 2, + V4L2_EXPOSURE_APERTURE_PRIORITY = 3 +}; +#define V4L2_CID_EXPOSURE_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+2) +#define V4L2_CID_EXPOSURE_AUTO_PRIORITY (V4L2_CID_CAMERA_CLASS_BASE+3) + +#define V4L2_CID_PAN_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+4) +#define V4L2_CID_TILT_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+5) +#define V4L2_CID_PAN_RESET (V4L2_CID_CAMERA_CLASS_BASE+6) +#define V4L2_CID_TILT_RESET (V4L2_CID_CAMERA_CLASS_BASE+7) + +#define V4L2_CID_PAN_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+8) +#define V4L2_CID_TILT_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+9) + +#define V4L2_CID_FOCUS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+10) +#define V4L2_CID_FOCUS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+11) +#define V4L2_CID_FOCUS_AUTO (V4L2_CID_CAMERA_CLASS_BASE+12) + +#define V4L2_CID_ZOOM_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+13) +#define V4L2_CID_ZOOM_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+14) +#define V4L2_CID_ZOOM_CONTINUOUS (V4L2_CID_CAMERA_CLASS_BASE+15) + +#define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) + +#define V4L2_CID_IRIS_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+17) +#define V4L2_CID_IRIS_RELATIVE (V4L2_CID_CAMERA_CLASS_BASE+18) + +#define V4L2_CID_AUTO_EXPOSURE_BIAS (V4L2_CID_CAMERA_CLASS_BASE+19) + +#define V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE (V4L2_CID_CAMERA_CLASS_BASE+20) +enum v4l2_auto_n_preset_white_balance { + V4L2_WHITE_BALANCE_MANUAL = 0, + V4L2_WHITE_BALANCE_AUTO = 1, + V4L2_WHITE_BALANCE_INCANDESCENT = 2, + V4L2_WHITE_BALANCE_FLUORESCENT = 3, + V4L2_WHITE_BALANCE_FLUORESCENT_H = 4, + V4L2_WHITE_BALANCE_HORIZON = 5, + V4L2_WHITE_BALANCE_DAYLIGHT = 6, + V4L2_WHITE_BALANCE_FLASH = 7, + V4L2_WHITE_BALANCE_CLOUDY = 8, + V4L2_WHITE_BALANCE_SHADE = 9, +}; + +#define V4L2_CID_WIDE_DYNAMIC_RANGE (V4L2_CID_CAMERA_CLASS_BASE+21) +#define V4L2_CID_IMAGE_STABILIZATION (V4L2_CID_CAMERA_CLASS_BASE+22) + +#define V4L2_CID_ISO_SENSITIVITY (V4L2_CID_CAMERA_CLASS_BASE+23) +#define V4L2_CID_ISO_SENSITIVITY_AUTO (V4L2_CID_CAMERA_CLASS_BASE+24) +enum v4l2_iso_sensitivity_auto_type { + V4L2_ISO_SENSITIVITY_MANUAL = 0, + V4L2_ISO_SENSITIVITY_AUTO = 1, +}; + +#define V4L2_CID_EXPOSURE_METERING (V4L2_CID_CAMERA_CLASS_BASE+25) +enum v4l2_exposure_metering { + V4L2_EXPOSURE_METERING_AVERAGE = 0, + V4L2_EXPOSURE_METERING_CENTER_WEIGHTED = 1, + V4L2_EXPOSURE_METERING_SPOT = 2, + V4L2_EXPOSURE_METERING_MATRIX = 3, +}; + +#define V4L2_CID_SCENE_MODE (V4L2_CID_CAMERA_CLASS_BASE+26) +enum v4l2_scene_mode { + V4L2_SCENE_MODE_NONE = 0, + V4L2_SCENE_MODE_BACKLIGHT = 1, + V4L2_SCENE_MODE_BEACH_SNOW = 2, + V4L2_SCENE_MODE_CANDLE_LIGHT = 3, + V4L2_SCENE_MODE_DAWN_DUSK = 4, + V4L2_SCENE_MODE_FALL_COLORS = 5, + V4L2_SCENE_MODE_FIREWORKS = 6, + V4L2_SCENE_MODE_LANDSCAPE = 7, + V4L2_SCENE_MODE_NIGHT = 8, + V4L2_SCENE_MODE_PARTY_INDOOR = 9, + V4L2_SCENE_MODE_PORTRAIT = 10, + V4L2_SCENE_MODE_SPORTS = 11, + V4L2_SCENE_MODE_SUNSET = 12, + V4L2_SCENE_MODE_TEXT = 13, +}; + +#define V4L2_CID_3A_LOCK (V4L2_CID_CAMERA_CLASS_BASE+27) +#define V4L2_LOCK_EXPOSURE (1 << 0) +#define V4L2_LOCK_WHITE_BALANCE (1 << 1) +#define V4L2_LOCK_FOCUS (1 << 2) + +#define V4L2_CID_AUTO_FOCUS_START (V4L2_CID_CAMERA_CLASS_BASE+28) +#define V4L2_CID_AUTO_FOCUS_STOP (V4L2_CID_CAMERA_CLASS_BASE+29) +#define V4L2_CID_AUTO_FOCUS_STATUS (V4L2_CID_CAMERA_CLASS_BASE+30) +#define V4L2_AUTO_FOCUS_STATUS_IDLE (0 << 0) +#define V4L2_AUTO_FOCUS_STATUS_BUSY (1 << 0) +#define V4L2_AUTO_FOCUS_STATUS_REACHED (1 << 1) +#define V4L2_AUTO_FOCUS_STATUS_FAILED (1 << 2) + +#define V4L2_CID_AUTO_FOCUS_RANGE (V4L2_CID_CAMERA_CLASS_BASE+31) +enum v4l2_auto_focus_range { + V4L2_AUTO_FOCUS_RANGE_AUTO = 0, + V4L2_AUTO_FOCUS_RANGE_NORMAL = 1, + V4L2_AUTO_FOCUS_RANGE_MACRO = 2, + V4L2_AUTO_FOCUS_RANGE_INFINITY = 3, +}; + +#define V4L2_CID_PAN_SPEED (V4L2_CID_CAMERA_CLASS_BASE+32) +#define V4L2_CID_TILT_SPEED (V4L2_CID_CAMERA_CLASS_BASE+33) + +/* FM Modulator class control IDs */ + +#define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) +#define V4L2_CID_FM_TX_CLASS (V4L2_CTRL_CLASS_FM_TX | 1) + +#define V4L2_CID_RDS_TX_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 1) +#define V4L2_CID_RDS_TX_PI (V4L2_CID_FM_TX_CLASS_BASE + 2) +#define V4L2_CID_RDS_TX_PTY (V4L2_CID_FM_TX_CLASS_BASE + 3) +#define V4L2_CID_RDS_TX_PS_NAME (V4L2_CID_FM_TX_CLASS_BASE + 5) +#define V4L2_CID_RDS_TX_RADIO_TEXT (V4L2_CID_FM_TX_CLASS_BASE + 6) +#define V4L2_CID_RDS_TX_MONO_STEREO (V4L2_CID_FM_TX_CLASS_BASE + 7) +#define V4L2_CID_RDS_TX_ARTIFICIAL_HEAD (V4L2_CID_FM_TX_CLASS_BASE + 8) +#define V4L2_CID_RDS_TX_COMPRESSED (V4L2_CID_FM_TX_CLASS_BASE + 9) +#define V4L2_CID_RDS_TX_DYNAMIC_PTY (V4L2_CID_FM_TX_CLASS_BASE + 10) +#define V4L2_CID_RDS_TX_TRAFFIC_ANNOUNCEMENT (V4L2_CID_FM_TX_CLASS_BASE + 11) +#define V4L2_CID_RDS_TX_TRAFFIC_PROGRAM (V4L2_CID_FM_TX_CLASS_BASE + 12) +#define V4L2_CID_RDS_TX_MUSIC_SPEECH (V4L2_CID_FM_TX_CLASS_BASE + 13) +#define V4L2_CID_RDS_TX_ALT_FREQS_ENABLE (V4L2_CID_FM_TX_CLASS_BASE + 14) +#define V4L2_CID_RDS_TX_ALT_FREQS (V4L2_CID_FM_TX_CLASS_BASE + 15) + +#define V4L2_CID_AUDIO_LIMITER_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 64) +#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 65) +#define V4L2_CID_AUDIO_LIMITER_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 66) + +#define V4L2_CID_AUDIO_COMPRESSION_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 80) +#define V4L2_CID_AUDIO_COMPRESSION_GAIN (V4L2_CID_FM_TX_CLASS_BASE + 81) +#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD (V4L2_CID_FM_TX_CLASS_BASE + 82) +#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME (V4L2_CID_FM_TX_CLASS_BASE + 83) +#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME (V4L2_CID_FM_TX_CLASS_BASE + 84) + +#define V4L2_CID_PILOT_TONE_ENABLED (V4L2_CID_FM_TX_CLASS_BASE + 96) +#define V4L2_CID_PILOT_TONE_DEVIATION (V4L2_CID_FM_TX_CLASS_BASE + 97) +#define V4L2_CID_PILOT_TONE_FREQUENCY (V4L2_CID_FM_TX_CLASS_BASE + 98) + +#define V4L2_CID_TUNE_PREEMPHASIS (V4L2_CID_FM_TX_CLASS_BASE + 112) +enum v4l2_preemphasis { + V4L2_PREEMPHASIS_DISABLED = 0, + V4L2_PREEMPHASIS_50_uS = 1, + V4L2_PREEMPHASIS_75_uS = 2, +}; +#define V4L2_CID_TUNE_POWER_LEVEL (V4L2_CID_FM_TX_CLASS_BASE + 113) +#define V4L2_CID_TUNE_ANTENNA_CAPACITOR (V4L2_CID_FM_TX_CLASS_BASE + 114) + + +/* Flash and privacy (indicator) light controls */ + +#define V4L2_CID_FLASH_CLASS_BASE (V4L2_CTRL_CLASS_FLASH | 0x900) +#define V4L2_CID_FLASH_CLASS (V4L2_CTRL_CLASS_FLASH | 1) + +#define V4L2_CID_FLASH_LED_MODE (V4L2_CID_FLASH_CLASS_BASE + 1) +enum v4l2_flash_led_mode { + V4L2_FLASH_LED_MODE_NONE, + V4L2_FLASH_LED_MODE_FLASH, + V4L2_FLASH_LED_MODE_TORCH, +}; + +#define V4L2_CID_FLASH_STROBE_SOURCE (V4L2_CID_FLASH_CLASS_BASE + 2) +enum v4l2_flash_strobe_source { + V4L2_FLASH_STROBE_SOURCE_SOFTWARE, + V4L2_FLASH_STROBE_SOURCE_EXTERNAL, +}; + +#define V4L2_CID_FLASH_STROBE (V4L2_CID_FLASH_CLASS_BASE + 3) +#define V4L2_CID_FLASH_STROBE_STOP (V4L2_CID_FLASH_CLASS_BASE + 4) +#define V4L2_CID_FLASH_STROBE_STATUS (V4L2_CID_FLASH_CLASS_BASE + 5) + +#define V4L2_CID_FLASH_TIMEOUT (V4L2_CID_FLASH_CLASS_BASE + 6) +#define V4L2_CID_FLASH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 7) +#define V4L2_CID_FLASH_TORCH_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 8) +#define V4L2_CID_FLASH_INDICATOR_INTENSITY (V4L2_CID_FLASH_CLASS_BASE + 9) + +#define V4L2_CID_FLASH_FAULT (V4L2_CID_FLASH_CLASS_BASE + 10) +#define V4L2_FLASH_FAULT_OVER_VOLTAGE (1 << 0) +#define V4L2_FLASH_FAULT_TIMEOUT (1 << 1) +#define V4L2_FLASH_FAULT_OVER_TEMPERATURE (1 << 2) +#define V4L2_FLASH_FAULT_SHORT_CIRCUIT (1 << 3) +#define V4L2_FLASH_FAULT_OVER_CURRENT (1 << 4) +#define V4L2_FLASH_FAULT_INDICATOR (1 << 5) +#define V4L2_FLASH_FAULT_UNDER_VOLTAGE (1 << 6) +#define V4L2_FLASH_FAULT_INPUT_VOLTAGE (1 << 7) +#define V4L2_FLASH_FAULT_LED_OVER_TEMPERATURE (1 << 8) + +#define V4L2_CID_FLASH_CHARGE (V4L2_CID_FLASH_CLASS_BASE + 11) +#define V4L2_CID_FLASH_READY (V4L2_CID_FLASH_CLASS_BASE + 12) + + +/* JPEG-class control IDs */ + +#define V4L2_CID_JPEG_CLASS_BASE (V4L2_CTRL_CLASS_JPEG | 0x900) +#define V4L2_CID_JPEG_CLASS (V4L2_CTRL_CLASS_JPEG | 1) + +#define V4L2_CID_JPEG_CHROMA_SUBSAMPLING (V4L2_CID_JPEG_CLASS_BASE + 1) +enum v4l2_jpeg_chroma_subsampling { + V4L2_JPEG_CHROMA_SUBSAMPLING_444 = 0, + V4L2_JPEG_CHROMA_SUBSAMPLING_422 = 1, + V4L2_JPEG_CHROMA_SUBSAMPLING_420 = 2, + V4L2_JPEG_CHROMA_SUBSAMPLING_411 = 3, + V4L2_JPEG_CHROMA_SUBSAMPLING_410 = 4, + V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY = 5, +}; +#define V4L2_CID_JPEG_RESTART_INTERVAL (V4L2_CID_JPEG_CLASS_BASE + 2) +#define V4L2_CID_JPEG_COMPRESSION_QUALITY (V4L2_CID_JPEG_CLASS_BASE + 3) + +#define V4L2_CID_JPEG_ACTIVE_MARKER (V4L2_CID_JPEG_CLASS_BASE + 4) +#define V4L2_JPEG_ACTIVE_MARKER_APP0 (1 << 0) +#define V4L2_JPEG_ACTIVE_MARKER_APP1 (1 << 1) +#define V4L2_JPEG_ACTIVE_MARKER_COM (1 << 16) +#define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17) +#define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18) + + +/* Image source controls */ +#define V4L2_CID_IMAGE_SOURCE_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_SOURCE | 0x900) +#define V4L2_CID_IMAGE_SOURCE_CLASS (V4L2_CTRL_CLASS_IMAGE_SOURCE | 1) + +#define V4L2_CID_VBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 1) +#define V4L2_CID_HBLANK (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 2) +#define V4L2_CID_ANALOGUE_GAIN (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 3) +#define V4L2_CID_TEST_PATTERN_RED (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 4) +#define V4L2_CID_TEST_PATTERN_GREENR (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 5) +#define V4L2_CID_TEST_PATTERN_BLUE (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6) +#define V4L2_CID_TEST_PATTERN_GREENB (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7) + + +/* Image processing controls */ + +#define V4L2_CID_IMAGE_PROC_CLASS_BASE (V4L2_CTRL_CLASS_IMAGE_PROC | 0x900) +#define V4L2_CID_IMAGE_PROC_CLASS (V4L2_CTRL_CLASS_IMAGE_PROC | 1) + +#define V4L2_CID_LINK_FREQ (V4L2_CID_IMAGE_PROC_CLASS_BASE + 1) +#define V4L2_CID_PIXEL_RATE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 2) +#define V4L2_CID_TEST_PATTERN (V4L2_CID_IMAGE_PROC_CLASS_BASE + 3) +#define V4L2_CID_DEINTERLACING_MODE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 4) +#define V4L2_CID_DIGITAL_GAIN (V4L2_CID_IMAGE_PROC_CLASS_BASE + 5) + +/* DV-class control IDs defined by V4L2 */ +#define V4L2_CID_DV_CLASS_BASE (V4L2_CTRL_CLASS_DV | 0x900) +#define V4L2_CID_DV_CLASS (V4L2_CTRL_CLASS_DV | 1) + +#define V4L2_CID_DV_TX_HOTPLUG (V4L2_CID_DV_CLASS_BASE + 1) +#define V4L2_CID_DV_TX_RXSENSE (V4L2_CID_DV_CLASS_BASE + 2) +#define V4L2_CID_DV_TX_EDID_PRESENT (V4L2_CID_DV_CLASS_BASE + 3) +#define V4L2_CID_DV_TX_MODE (V4L2_CID_DV_CLASS_BASE + 4) +enum v4l2_dv_tx_mode { + V4L2_DV_TX_MODE_DVI_D = 0, + V4L2_DV_TX_MODE_HDMI = 1, +}; +#define V4L2_CID_DV_TX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 5) +enum v4l2_dv_rgb_range { + V4L2_DV_RGB_RANGE_AUTO = 0, + V4L2_DV_RGB_RANGE_LIMITED = 1, + V4L2_DV_RGB_RANGE_FULL = 2, +}; + +#define V4L2_CID_DV_TX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 6) +enum v4l2_dv_it_content_type { + V4L2_DV_IT_CONTENT_TYPE_GRAPHICS = 0, + V4L2_DV_IT_CONTENT_TYPE_PHOTO = 1, + V4L2_DV_IT_CONTENT_TYPE_CINEMA = 2, + V4L2_DV_IT_CONTENT_TYPE_GAME = 3, + V4L2_DV_IT_CONTENT_TYPE_NO_ITC = 4, +}; + +#define V4L2_CID_DV_RX_POWER_PRESENT (V4L2_CID_DV_CLASS_BASE + 100) +#define V4L2_CID_DV_RX_RGB_RANGE (V4L2_CID_DV_CLASS_BASE + 101) +#define V4L2_CID_DV_RX_IT_CONTENT_TYPE (V4L2_CID_DV_CLASS_BASE + 102) + +#define V4L2_CID_FM_RX_CLASS_BASE (V4L2_CTRL_CLASS_FM_RX | 0x900) +#define V4L2_CID_FM_RX_CLASS (V4L2_CTRL_CLASS_FM_RX | 1) + +#define V4L2_CID_TUNE_DEEMPHASIS (V4L2_CID_FM_RX_CLASS_BASE + 1) +enum v4l2_deemphasis { + V4L2_DEEMPHASIS_DISABLED = V4L2_PREEMPHASIS_DISABLED, + V4L2_DEEMPHASIS_50_uS = V4L2_PREEMPHASIS_50_uS, + V4L2_DEEMPHASIS_75_uS = V4L2_PREEMPHASIS_75_uS, +}; + +#define V4L2_CID_RDS_RECEPTION (V4L2_CID_FM_RX_CLASS_BASE + 2) +#define V4L2_CID_RDS_RX_PTY (V4L2_CID_FM_RX_CLASS_BASE + 3) +#define V4L2_CID_RDS_RX_PS_NAME (V4L2_CID_FM_RX_CLASS_BASE + 4) +#define V4L2_CID_RDS_RX_RADIO_TEXT (V4L2_CID_FM_RX_CLASS_BASE + 5) +#define V4L2_CID_RDS_RX_TRAFFIC_ANNOUNCEMENT (V4L2_CID_FM_RX_CLASS_BASE + 6) +#define V4L2_CID_RDS_RX_TRAFFIC_PROGRAM (V4L2_CID_FM_RX_CLASS_BASE + 7) +#define V4L2_CID_RDS_RX_MUSIC_SPEECH (V4L2_CID_FM_RX_CLASS_BASE + 8) + +#define V4L2_CID_RF_TUNER_CLASS_BASE (V4L2_CTRL_CLASS_RF_TUNER | 0x900) +#define V4L2_CID_RF_TUNER_CLASS (V4L2_CTRL_CLASS_RF_TUNER | 1) + +#define V4L2_CID_RF_TUNER_BANDWIDTH_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 11) +#define V4L2_CID_RF_TUNER_BANDWIDTH (V4L2_CID_RF_TUNER_CLASS_BASE + 12) +#define V4L2_CID_RF_TUNER_RF_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 32) +#define V4L2_CID_RF_TUNER_LNA_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 41) +#define V4L2_CID_RF_TUNER_LNA_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 42) +#define V4L2_CID_RF_TUNER_MIXER_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 51) +#define V4L2_CID_RF_TUNER_MIXER_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 52) +#define V4L2_CID_RF_TUNER_IF_GAIN_AUTO (V4L2_CID_RF_TUNER_CLASS_BASE + 61) +#define V4L2_CID_RF_TUNER_IF_GAIN (V4L2_CID_RF_TUNER_CLASS_BASE + 62) +#define V4L2_CID_RF_TUNER_PLL_LOCK (V4L2_CID_RF_TUNER_CLASS_BASE + 91) + + +/* Detection-class control IDs defined by V4L2 */ +#define V4L2_CID_DETECT_CLASS_BASE (V4L2_CTRL_CLASS_DETECT | 0x900) +#define V4L2_CID_DETECT_CLASS (V4L2_CTRL_CLASS_DETECT | 1) + +#define V4L2_CID_DETECT_MD_MODE (V4L2_CID_DETECT_CLASS_BASE + 1) +enum v4l2_detect_md_mode { + V4L2_DETECT_MD_MODE_DISABLED = 0, + V4L2_DETECT_MD_MODE_GLOBAL = 1, + V4L2_DETECT_MD_MODE_THRESHOLD_GRID = 2, + V4L2_DETECT_MD_MODE_REGION_GRID = 3, +}; +#define V4L2_CID_DETECT_MD_GLOBAL_THRESHOLD (V4L2_CID_DETECT_CLASS_BASE + 2) +#define V4L2_CID_DETECT_MD_THRESHOLD_GRID (V4L2_CID_DETECT_CLASS_BASE + 3) +#define V4L2_CID_DETECT_MD_REGION_GRID (V4L2_CID_DETECT_CLASS_BASE + 4) + +#endif \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/v4l2-controls.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/v4l2-controls.h.yml new file mode 100644 index 00000000000..f100274a416 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/linux/v4l2-controls.h.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999-2012 the contributors +holders: + - the contributors diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/sound/emu10k1.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/sound/emu10k1.h new file mode 100644 index 00000000000..e422ac380b6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/sound/emu10k1.h @@ -0,0 +1,10 @@ + * Copyright (c) by Jaroslav Kysela , + * Creative Labs, Inc. + * Definitions for EMU10K1 (SB Live!) chips + + + + +#define EXTOUT_AC97_REAR_L 0x0d /* SB Live 5.1 (c) 2003 - Rear Left */ +#define EXTOUT_AC97_REAR_R 0x0e /* SB Live 5.1 (c) 2003 - Rear Right */ + diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/sound/emu10k1.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/sound/emu10k1.h.yml new file mode 100644 index 00000000000..8332c44959a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/include/uapi/sound/emu10k1.h.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) by Jaroslav Kysela , Creative Labs, Inc. + - (c) 2003 - Rear Left + - (c) 2003 - Rear +holders: + - Jaroslav Kysela , Creative Labs, Inc. + - Rear Left + - Rear diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/ipc/shm.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/ipc/shm.c new file mode 100644 index 00000000000..1f7865eeec1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/ipc/shm.c @@ -0,0 +1,1753 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * linux/ipc/shm.c + * Copyright (C) 1992, 1993 Krishna Balasubramanian + * Many improvements/fixes by Bruno Haible. + * Replaced `struct shm_desc' by `struct vm_area_struct', July 1994. + * Fixed the shm swap deallocation (shm_unuse()), August 1998 Andrea Arcangeli. + * + * /proc/sysvipc/shm support (c) 1999 Dragos Acostachioaie + * BIGMEM support, Andrea Arcangeli + * SMP thread shm, Jean-Luc Boyard + * HIGHMEM support, Ingo Molnar + * Make shmmax, shmall, shmmni sysctl'able, Christoph Rohland + * Shared /dev/zero support, Kanoj Sarcar + * Move the mm functionality over to mm/shmem.c, Christoph Rohland + * + * support for audit of ipc object properties and permission changes + * Dustin Kirkland + * + * namespaces support + * OpenVZ, SWsoft Inc. + * Pavel Emelianov + * + * Better ipc lock (kern_ipc_perm.lock) handling + * Davidlohr Bueso , June 2013. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "util.h" + +struct shmid_kernel /* private to the kernel */ +{ + struct kern_ipc_perm shm_perm; + struct file *shm_file; + unsigned long shm_nattch; + unsigned long shm_segsz; + time64_t shm_atim; + time64_t shm_dtim; + time64_t shm_ctim; + struct pid *shm_cprid; + struct pid *shm_lprid; + struct user_struct *mlock_user; + + /* The task created the shm object. NULL if the task is dead. */ + struct task_struct *shm_creator; + struct list_head shm_clist; /* list by creator */ +} __randomize_layout; + +/* shm_mode upper byte flags */ +#define SHM_DEST 01000 /* segment will be destroyed on last detach */ +#define SHM_LOCKED 02000 /* segment will not be swapped */ + +struct shm_file_data { + int id; + struct ipc_namespace *ns; + struct file *file; + const struct vm_operations_struct *vm_ops; +}; + +#define shm_file_data(file) (*((struct shm_file_data **)&(file)->private_data)) + +static const struct file_operations shm_file_operations; +static const struct vm_operations_struct shm_vm_ops; + +#define shm_ids(ns) ((ns)->ids[IPC_SHM_IDS]) + +#define shm_unlock(shp) \ + ipc_unlock(&(shp)->shm_perm) + +static int newseg(struct ipc_namespace *, struct ipc_params *); +static void shm_open(struct vm_area_struct *vma); +static void shm_close(struct vm_area_struct *vma); +static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp); +#ifdef CONFIG_PROC_FS +static int sysvipc_shm_proc_show(struct seq_file *s, void *it); +#endif + +void shm_init_ns(struct ipc_namespace *ns) +{ + ns->shm_ctlmax = SHMMAX; + ns->shm_ctlall = SHMALL; + ns->shm_ctlmni = SHMMNI; + ns->shm_rmid_forced = 0; + ns->shm_tot = 0; + ipc_init_ids(&shm_ids(ns)); +} + +/* + * Called with shm_ids.rwsem (writer) and the shp structure locked. + * Only shm_ids.rwsem remains locked on exit. + */ +static void do_shm_rmid(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp) +{ + struct shmid_kernel *shp; + + shp = container_of(ipcp, struct shmid_kernel, shm_perm); + + if (shp->shm_nattch) { + shp->shm_perm.mode |= SHM_DEST; + /* Do not find it any more */ + ipc_set_key_private(&shm_ids(ns), &shp->shm_perm); + shm_unlock(shp); + } else + shm_destroy(ns, shp); +} + +#ifdef CONFIG_IPC_NS +void shm_exit_ns(struct ipc_namespace *ns) +{ + free_ipcs(ns, &shm_ids(ns), do_shm_rmid); + idr_destroy(&ns->ids[IPC_SHM_IDS].ipcs_idr); + rhashtable_destroy(&ns->ids[IPC_SHM_IDS].key_ht); +} +#endif + +static int __init ipc_ns_init(void) +{ + shm_init_ns(&init_ipc_ns); + return 0; +} + +pure_initcall(ipc_ns_init); + +void __init shm_init(void) +{ + ipc_init_proc_interface("sysvipc/shm", +#if BITS_PER_LONG <= 32 + " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime rss swap\n", +#else + " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime rss swap\n", +#endif + IPC_SHM_IDS, sysvipc_shm_proc_show); +} + +static inline struct shmid_kernel *shm_obtain_object(struct ipc_namespace *ns, int id) +{ + struct kern_ipc_perm *ipcp = ipc_obtain_object_idr(&shm_ids(ns), id); + + if (IS_ERR(ipcp)) + return ERR_CAST(ipcp); + + return container_of(ipcp, struct shmid_kernel, shm_perm); +} + +static inline struct shmid_kernel *shm_obtain_object_check(struct ipc_namespace *ns, int id) +{ + struct kern_ipc_perm *ipcp = ipc_obtain_object_check(&shm_ids(ns), id); + + if (IS_ERR(ipcp)) + return ERR_CAST(ipcp); + + return container_of(ipcp, struct shmid_kernel, shm_perm); +} + +/* + * shm_lock_(check_) routines are called in the paths where the rwsem + * is not necessarily held. + */ +static inline struct shmid_kernel *shm_lock(struct ipc_namespace *ns, int id) +{ + struct kern_ipc_perm *ipcp; + + rcu_read_lock(); + ipcp = ipc_obtain_object_idr(&shm_ids(ns), id); + if (IS_ERR(ipcp)) + goto err; + + ipc_lock_object(ipcp); + /* + * ipc_rmid() may have already freed the ID while ipc_lock_object() + * was spinning: here verify that the structure is still valid. + * Upon races with RMID, return -EIDRM, thus indicating that + * the ID points to a removed identifier. + */ + if (ipc_valid_object(ipcp)) { + /* return a locked ipc object upon success */ + return container_of(ipcp, struct shmid_kernel, shm_perm); + } + + ipc_unlock_object(ipcp); + ipcp = ERR_PTR(-EIDRM); +err: + rcu_read_unlock(); + /* + * Callers of shm_lock() must validate the status of the returned ipc + * object pointer and error out as appropriate. + */ + return ERR_CAST(ipcp); +} + +static inline void shm_lock_by_ptr(struct shmid_kernel *ipcp) +{ + rcu_read_lock(); + ipc_lock_object(&ipcp->shm_perm); +} + +static void shm_rcu_free(struct rcu_head *head) +{ + struct kern_ipc_perm *ptr = container_of(head, struct kern_ipc_perm, + rcu); + struct shmid_kernel *shp = container_of(ptr, struct shmid_kernel, + shm_perm); + security_shm_free(&shp->shm_perm); + kvfree(shp); +} + +static inline void shm_rmid(struct ipc_namespace *ns, struct shmid_kernel *s) +{ + list_del(&s->shm_clist); + ipc_rmid(&shm_ids(ns), &s->shm_perm); +} + + +static int __shm_open(struct vm_area_struct *vma) +{ + struct file *file = vma->vm_file; + struct shm_file_data *sfd = shm_file_data(file); + struct shmid_kernel *shp; + + shp = shm_lock(sfd->ns, sfd->id); + + if (IS_ERR(shp)) + return PTR_ERR(shp); + + if (shp->shm_file != sfd->file) { + /* ID was reused */ + shm_unlock(shp); + return -EINVAL; + } + + shp->shm_atim = ktime_get_real_seconds(); + ipc_update_pid(&shp->shm_lprid, task_tgid(current)); + shp->shm_nattch++; + shm_unlock(shp); + return 0; +} + +/* This is called by fork, once for every shm attach. */ +static void shm_open(struct vm_area_struct *vma) +{ + int err = __shm_open(vma); + /* + * We raced in the idr lookup or with shm_destroy(). + * Either way, the ID is busted. + */ + WARN_ON_ONCE(err); +} + +/* + * shm_destroy - free the struct shmid_kernel + * + * @ns: namespace + * @shp: struct to free + * + * It has to be called with shp and shm_ids.rwsem (writer) locked, + * but returns with shp unlocked and freed. + */ +static void shm_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp) +{ + struct file *shm_file; + + shm_file = shp->shm_file; + shp->shm_file = NULL; + ns->shm_tot -= (shp->shm_segsz + PAGE_SIZE - 1) >> PAGE_SHIFT; + shm_rmid(ns, shp); + shm_unlock(shp); + if (!is_file_hugepages(shm_file)) + shmem_lock(shm_file, 0, shp->mlock_user); + else if (shp->mlock_user) + user_shm_unlock(i_size_read(file_inode(shm_file)), + shp->mlock_user); + fput(shm_file); + ipc_update_pid(&shp->shm_cprid, NULL); + ipc_update_pid(&shp->shm_lprid, NULL); + ipc_rcu_putref(&shp->shm_perm, shm_rcu_free); +} + +/* + * shm_may_destroy - identifies whether shm segment should be destroyed now + * + * Returns true if and only if there are no active users of the segment and + * one of the following is true: + * + * 1) shmctl(id, IPC_RMID, NULL) was called for this shp + * + * 2) sysctl kernel.shm_rmid_forced is set to 1. + */ +static bool shm_may_destroy(struct ipc_namespace *ns, struct shmid_kernel *shp) +{ + return (shp->shm_nattch == 0) && + (ns->shm_rmid_forced || + (shp->shm_perm.mode & SHM_DEST)); +} + +/* + * remove the attach descriptor vma. + * free memory for segment if it is marked destroyed. + * The descriptor has already been removed from the current->mm->mmap list + * and will later be kfree()d. + */ +static void shm_close(struct vm_area_struct *vma) +{ + struct file *file = vma->vm_file; + struct shm_file_data *sfd = shm_file_data(file); + struct shmid_kernel *shp; + struct ipc_namespace *ns = sfd->ns; + + down_write(&shm_ids(ns).rwsem); + /* remove from the list of attaches of the shm segment */ + shp = shm_lock(ns, sfd->id); + + /* + * We raced in the idr lookup or with shm_destroy(). + * Either way, the ID is busted. + */ + if (WARN_ON_ONCE(IS_ERR(shp))) + goto done; /* no-op */ + + ipc_update_pid(&shp->shm_lprid, task_tgid(current)); + shp->shm_dtim = ktime_get_real_seconds(); + shp->shm_nattch--; + if (shm_may_destroy(ns, shp)) + shm_destroy(ns, shp); + else + shm_unlock(shp); +done: + up_write(&shm_ids(ns).rwsem); +} + +/* Called with ns->shm_ids(ns).rwsem locked */ +static int shm_try_destroy_orphaned(int id, void *p, void *data) +{ + struct ipc_namespace *ns = data; + struct kern_ipc_perm *ipcp = p; + struct shmid_kernel *shp = container_of(ipcp, struct shmid_kernel, shm_perm); + + /* + * We want to destroy segments without users and with already + * exit'ed originating process. + * + * As shp->* are changed under rwsem, it's safe to skip shp locking. + */ + if (shp->shm_creator != NULL) + return 0; + + if (shm_may_destroy(ns, shp)) { + shm_lock_by_ptr(shp); + shm_destroy(ns, shp); + } + return 0; +} + +void shm_destroy_orphaned(struct ipc_namespace *ns) +{ + down_write(&shm_ids(ns).rwsem); + if (shm_ids(ns).in_use) + idr_for_each(&shm_ids(ns).ipcs_idr, &shm_try_destroy_orphaned, ns); + up_write(&shm_ids(ns).rwsem); +} + +/* Locking assumes this will only be called with task == current */ +void exit_shm(struct task_struct *task) +{ + struct ipc_namespace *ns = task->nsproxy->ipc_ns; + struct shmid_kernel *shp, *n; + + if (list_empty(&task->sysvshm.shm_clist)) + return; + + /* + * If kernel.shm_rmid_forced is not set then only keep track of + * which shmids are orphaned, so that a later set of the sysctl + * can clean them up. + */ + if (!ns->shm_rmid_forced) { + down_read(&shm_ids(ns).rwsem); + list_for_each_entry(shp, &task->sysvshm.shm_clist, shm_clist) + shp->shm_creator = NULL; + /* + * Only under read lock but we are only called on current + * so no entry on the list will be shared. + */ + list_del(&task->sysvshm.shm_clist); + up_read(&shm_ids(ns).rwsem); + return; + } + + /* + * Destroy all already created segments, that were not yet mapped, + * and mark any mapped as orphan to cover the sysctl toggling. + * Destroy is skipped if shm_may_destroy() returns false. + */ + down_write(&shm_ids(ns).rwsem); + list_for_each_entry_safe(shp, n, &task->sysvshm.shm_clist, shm_clist) { + shp->shm_creator = NULL; + + if (shm_may_destroy(ns, shp)) { + shm_lock_by_ptr(shp); + shm_destroy(ns, shp); + } + } + + /* Remove the list head from any segments still attached. */ + list_del(&task->sysvshm.shm_clist); + up_write(&shm_ids(ns).rwsem); +} + +static vm_fault_t shm_fault(struct vm_fault *vmf) +{ + struct file *file = vmf->vma->vm_file; + struct shm_file_data *sfd = shm_file_data(file); + + return sfd->vm_ops->fault(vmf); +} + +static int shm_split(struct vm_area_struct *vma, unsigned long addr) +{ + struct file *file = vma->vm_file; + struct shm_file_data *sfd = shm_file_data(file); + + if (sfd->vm_ops->split) + return sfd->vm_ops->split(vma, addr); + + return 0; +} + +static unsigned long shm_pagesize(struct vm_area_struct *vma) +{ + struct file *file = vma->vm_file; + struct shm_file_data *sfd = shm_file_data(file); + + if (sfd->vm_ops->pagesize) + return sfd->vm_ops->pagesize(vma); + + return PAGE_SIZE; +} + +#ifdef CONFIG_NUMA +static int shm_set_policy(struct vm_area_struct *vma, struct mempolicy *new) +{ + struct file *file = vma->vm_file; + struct shm_file_data *sfd = shm_file_data(file); + int err = 0; + + if (sfd->vm_ops->set_policy) + err = sfd->vm_ops->set_policy(vma, new); + return err; +} + +static struct mempolicy *shm_get_policy(struct vm_area_struct *vma, + unsigned long addr) +{ + struct file *file = vma->vm_file; + struct shm_file_data *sfd = shm_file_data(file); + struct mempolicy *pol = NULL; + + if (sfd->vm_ops->get_policy) + pol = sfd->vm_ops->get_policy(vma, addr); + else if (vma->vm_policy) + pol = vma->vm_policy; + + return pol; +} +#endif + +static int shm_mmap(struct file *file, struct vm_area_struct *vma) +{ + struct shm_file_data *sfd = shm_file_data(file); + int ret; + + /* + * In case of remap_file_pages() emulation, the file can represent an + * IPC ID that was removed, and possibly even reused by another shm + * segment already. Propagate this case as an error to caller. + */ + ret = __shm_open(vma); + if (ret) + return ret; + + ret = call_mmap(sfd->file, vma); + if (ret) { + shm_close(vma); + return ret; + } + sfd->vm_ops = vma->vm_ops; +#ifdef CONFIG_MMU + WARN_ON(!sfd->vm_ops->fault); +#endif + vma->vm_ops = &shm_vm_ops; + return 0; +} + +static int shm_release(struct inode *ino, struct file *file) +{ + struct shm_file_data *sfd = shm_file_data(file); + + put_ipc_ns(sfd->ns); + fput(sfd->file); + shm_file_data(file) = NULL; + kfree(sfd); + return 0; +} + +static int shm_fsync(struct file *file, loff_t start, loff_t end, int datasync) +{ + struct shm_file_data *sfd = shm_file_data(file); + + if (!sfd->file->f_op->fsync) + return -EINVAL; + return sfd->file->f_op->fsync(sfd->file, start, end, datasync); +} + +static long shm_fallocate(struct file *file, int mode, loff_t offset, + loff_t len) +{ + struct shm_file_data *sfd = shm_file_data(file); + + if (!sfd->file->f_op->fallocate) + return -EOPNOTSUPP; + return sfd->file->f_op->fallocate(file, mode, offset, len); +} + +static unsigned long shm_get_unmapped_area(struct file *file, + unsigned long addr, unsigned long len, unsigned long pgoff, + unsigned long flags) +{ + struct shm_file_data *sfd = shm_file_data(file); + + return sfd->file->f_op->get_unmapped_area(sfd->file, addr, len, + pgoff, flags); +} + +static const struct file_operations shm_file_operations = { + .mmap = shm_mmap, + .fsync = shm_fsync, + .release = shm_release, + .get_unmapped_area = shm_get_unmapped_area, + .llseek = noop_llseek, + .fallocate = shm_fallocate, +}; + +/* + * shm_file_operations_huge is now identical to shm_file_operations, + * but we keep it distinct for the sake of is_file_shm_hugepages(). + */ +static const struct file_operations shm_file_operations_huge = { + .mmap = shm_mmap, + .fsync = shm_fsync, + .release = shm_release, + .get_unmapped_area = shm_get_unmapped_area, + .llseek = noop_llseek, + .fallocate = shm_fallocate, +}; + +bool is_file_shm_hugepages(struct file *file) +{ + return file->f_op == &shm_file_operations_huge; +} + +static const struct vm_operations_struct shm_vm_ops = { + .open = shm_open, /* callback for a new vm-area open */ + .close = shm_close, /* callback for when the vm-area is released */ + .fault = shm_fault, + .split = shm_split, + .pagesize = shm_pagesize, +#if defined(CONFIG_NUMA) + .set_policy = shm_set_policy, + .get_policy = shm_get_policy, +#endif +}; + +/** + * newseg - Create a new shared memory segment + * @ns: namespace + * @params: ptr to the structure that contains key, size and shmflg + * + * Called with shm_ids.rwsem held as a writer. + */ +static int newseg(struct ipc_namespace *ns, struct ipc_params *params) +{ + key_t key = params->key; + int shmflg = params->flg; + size_t size = params->u.size; + int error; + struct shmid_kernel *shp; + size_t numpages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; + struct file *file; + char name[13]; + vm_flags_t acctflag = 0; + + if (size < SHMMIN || size > ns->shm_ctlmax) + return -EINVAL; + + if (numpages << PAGE_SHIFT < size) + return -ENOSPC; + + if (ns->shm_tot + numpages < ns->shm_tot || + ns->shm_tot + numpages > ns->shm_ctlall) + return -ENOSPC; + + shp = kvmalloc(sizeof(*shp), GFP_KERNEL); + if (unlikely(!shp)) + return -ENOMEM; + + shp->shm_perm.key = key; + shp->shm_perm.mode = (shmflg & S_IRWXUGO); + shp->mlock_user = NULL; + + shp->shm_perm.security = NULL; + error = security_shm_alloc(&shp->shm_perm); + if (error) { + kvfree(shp); + return error; + } + + sprintf(name, "SYSV%08x", key); + if (shmflg & SHM_HUGETLB) { + struct hstate *hs; + size_t hugesize; + + hs = hstate_sizelog((shmflg >> SHM_HUGE_SHIFT) & SHM_HUGE_MASK); + if (!hs) { + error = -EINVAL; + goto no_file; + } + hugesize = ALIGN(size, huge_page_size(hs)); + + /* hugetlb_file_setup applies strict accounting */ + if (shmflg & SHM_NORESERVE) + acctflag = VM_NORESERVE; + file = hugetlb_file_setup(name, hugesize, acctflag, + &shp->mlock_user, HUGETLB_SHMFS_INODE, + (shmflg >> SHM_HUGE_SHIFT) & SHM_HUGE_MASK); + } else { + /* + * Do not allow no accounting for OVERCOMMIT_NEVER, even + * if it's asked for. + */ + if ((shmflg & SHM_NORESERVE) && + sysctl_overcommit_memory != OVERCOMMIT_NEVER) + acctflag = VM_NORESERVE; + file = shmem_kernel_file_setup(name, size, acctflag); + } + error = PTR_ERR(file); + if (IS_ERR(file)) + goto no_file; + + shp->shm_cprid = get_pid(task_tgid(current)); + shp->shm_lprid = NULL; + shp->shm_atim = shp->shm_dtim = 0; + shp->shm_ctim = ktime_get_real_seconds(); + shp->shm_segsz = size; + shp->shm_nattch = 0; + shp->shm_file = file; + shp->shm_creator = current; + + /* ipc_addid() locks shp upon success. */ + error = ipc_addid(&shm_ids(ns), &shp->shm_perm, ns->shm_ctlmni); + if (error < 0) + goto no_id; + + list_add(&shp->shm_clist, ¤t->sysvshm.shm_clist); + + /* + * shmid gets reported as "inode#" in /proc/pid/maps. + * proc-ps tools use this. Changing this will break them. + */ + file_inode(file)->i_ino = shp->shm_perm.id; + + ns->shm_tot += numpages; + error = shp->shm_perm.id; + + ipc_unlock_object(&shp->shm_perm); + rcu_read_unlock(); + return error; + +no_id: + ipc_update_pid(&shp->shm_cprid, NULL); + ipc_update_pid(&shp->shm_lprid, NULL); + if (is_file_hugepages(file) && shp->mlock_user) + user_shm_unlock(size, shp->mlock_user); + fput(file); + ipc_rcu_putref(&shp->shm_perm, shm_rcu_free); + return error; +no_file: + call_rcu(&shp->shm_perm.rcu, shm_rcu_free); + return error; +} + +/* + * Called with shm_ids.rwsem and ipcp locked. + */ +static inline int shm_more_checks(struct kern_ipc_perm *ipcp, + struct ipc_params *params) +{ + struct shmid_kernel *shp; + + shp = container_of(ipcp, struct shmid_kernel, shm_perm); + if (shp->shm_segsz < params->u.size) + return -EINVAL; + + return 0; +} + +long ksys_shmget(key_t key, size_t size, int shmflg) +{ + struct ipc_namespace *ns; + static const struct ipc_ops shm_ops = { + .getnew = newseg, + .associate = security_shm_associate, + .more_checks = shm_more_checks, + }; + struct ipc_params shm_params; + + ns = current->nsproxy->ipc_ns; + + shm_params.key = key; + shm_params.flg = shmflg; + shm_params.u.size = size; + + return ipcget(ns, &shm_ids(ns), &shm_ops, &shm_params); +} + +SYSCALL_DEFINE3(shmget, key_t, key, size_t, size, int, shmflg) +{ + return ksys_shmget(key, size, shmflg); +} + +static inline unsigned long copy_shmid_to_user(void __user *buf, struct shmid64_ds *in, int version) +{ + switch (version) { + case IPC_64: + return copy_to_user(buf, in, sizeof(*in)); + case IPC_OLD: + { + struct shmid_ds out; + + memset(&out, 0, sizeof(out)); + ipc64_perm_to_ipc_perm(&in->shm_perm, &out.shm_perm); + out.shm_segsz = in->shm_segsz; + out.shm_atime = in->shm_atime; + out.shm_dtime = in->shm_dtime; + out.shm_ctime = in->shm_ctime; + out.shm_cpid = in->shm_cpid; + out.shm_lpid = in->shm_lpid; + out.shm_nattch = in->shm_nattch; + + return copy_to_user(buf, &out, sizeof(out)); + } + default: + return -EINVAL; + } +} + +static inline unsigned long +copy_shmid_from_user(struct shmid64_ds *out, void __user *buf, int version) +{ + switch (version) { + case IPC_64: + if (copy_from_user(out, buf, sizeof(*out))) + return -EFAULT; + return 0; + case IPC_OLD: + { + struct shmid_ds tbuf_old; + + if (copy_from_user(&tbuf_old, buf, sizeof(tbuf_old))) + return -EFAULT; + + out->shm_perm.uid = tbuf_old.shm_perm.uid; + out->shm_perm.gid = tbuf_old.shm_perm.gid; + out->shm_perm.mode = tbuf_old.shm_perm.mode; + + return 0; + } + default: + return -EINVAL; + } +} + +static inline unsigned long copy_shminfo_to_user(void __user *buf, struct shminfo64 *in, int version) +{ + switch (version) { + case IPC_64: + return copy_to_user(buf, in, sizeof(*in)); + case IPC_OLD: + { + struct shminfo out; + + if (in->shmmax > INT_MAX) + out.shmmax = INT_MAX; + else + out.shmmax = (int)in->shmmax; + + out.shmmin = in->shmmin; + out.shmmni = in->shmmni; + out.shmseg = in->shmseg; + out.shmall = in->shmall; + + return copy_to_user(buf, &out, sizeof(out)); + } + default: + return -EINVAL; + } +} + +/* + * Calculate and add used RSS and swap pages of a shm. + * Called with shm_ids.rwsem held as a reader + */ +static void shm_add_rss_swap(struct shmid_kernel *shp, + unsigned long *rss_add, unsigned long *swp_add) +{ + struct inode *inode; + + inode = file_inode(shp->shm_file); + + if (is_file_hugepages(shp->shm_file)) { + struct address_space *mapping = inode->i_mapping; + struct hstate *h = hstate_file(shp->shm_file); + *rss_add += pages_per_huge_page(h) * mapping->nrpages; + } else { +#ifdef CONFIG_SHMEM + struct shmem_inode_info *info = SHMEM_I(inode); + + spin_lock_irq(&info->lock); + *rss_add += inode->i_mapping->nrpages; + *swp_add += info->swapped; + spin_unlock_irq(&info->lock); +#else + *rss_add += inode->i_mapping->nrpages; +#endif + } +} + +/* + * Called with shm_ids.rwsem held as a reader + */ +static void shm_get_stat(struct ipc_namespace *ns, unsigned long *rss, + unsigned long *swp) +{ + int next_id; + int total, in_use; + + *rss = 0; + *swp = 0; + + in_use = shm_ids(ns).in_use; + + for (total = 0, next_id = 0; total < in_use; next_id++) { + struct kern_ipc_perm *ipc; + struct shmid_kernel *shp; + + ipc = idr_find(&shm_ids(ns).ipcs_idr, next_id); + if (ipc == NULL) + continue; + shp = container_of(ipc, struct shmid_kernel, shm_perm); + + shm_add_rss_swap(shp, rss, swp); + + total++; + } +} + +/* + * This function handles some shmctl commands which require the rwsem + * to be held in write mode. + * NOTE: no locks must be held, the rwsem is taken inside this function. + */ +static int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd, + struct shmid64_ds *shmid64) +{ + struct kern_ipc_perm *ipcp; + struct shmid_kernel *shp; + int err; + + down_write(&shm_ids(ns).rwsem); + rcu_read_lock(); + + ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd, + &shmid64->shm_perm, 0); + if (IS_ERR(ipcp)) { + err = PTR_ERR(ipcp); + goto out_unlock1; + } + + shp = container_of(ipcp, struct shmid_kernel, shm_perm); + + err = security_shm_shmctl(&shp->shm_perm, cmd); + if (err) + goto out_unlock1; + + switch (cmd) { + case IPC_RMID: + ipc_lock_object(&shp->shm_perm); + /* do_shm_rmid unlocks the ipc object and rcu */ + do_shm_rmid(ns, ipcp); + goto out_up; + case IPC_SET: + ipc_lock_object(&shp->shm_perm); + err = ipc_update_perm(&shmid64->shm_perm, ipcp); + if (err) + goto out_unlock0; + shp->shm_ctim = ktime_get_real_seconds(); + break; + default: + err = -EINVAL; + goto out_unlock1; + } + +out_unlock0: + ipc_unlock_object(&shp->shm_perm); +out_unlock1: + rcu_read_unlock(); +out_up: + up_write(&shm_ids(ns).rwsem); + return err; +} + +static int shmctl_ipc_info(struct ipc_namespace *ns, + struct shminfo64 *shminfo) +{ + int err = security_shm_shmctl(NULL, IPC_INFO); + if (!err) { + memset(shminfo, 0, sizeof(*shminfo)); + shminfo->shmmni = shminfo->shmseg = ns->shm_ctlmni; + shminfo->shmmax = ns->shm_ctlmax; + shminfo->shmall = ns->shm_ctlall; + shminfo->shmmin = SHMMIN; + down_read(&shm_ids(ns).rwsem); + err = ipc_get_maxidx(&shm_ids(ns)); + up_read(&shm_ids(ns).rwsem); + if (err < 0) + err = 0; + } + return err; +} + +static int shmctl_shm_info(struct ipc_namespace *ns, + struct shm_info *shm_info) +{ + int err = security_shm_shmctl(NULL, SHM_INFO); + if (!err) { + memset(shm_info, 0, sizeof(*shm_info)); + down_read(&shm_ids(ns).rwsem); + shm_info->used_ids = shm_ids(ns).in_use; + shm_get_stat(ns, &shm_info->shm_rss, &shm_info->shm_swp); + shm_info->shm_tot = ns->shm_tot; + shm_info->swap_attempts = 0; + shm_info->swap_successes = 0; + err = ipc_get_maxidx(&shm_ids(ns)); + up_read(&shm_ids(ns).rwsem); + if (err < 0) + err = 0; + } + return err; +} + +static int shmctl_stat(struct ipc_namespace *ns, int shmid, + int cmd, struct shmid64_ds *tbuf) +{ + struct shmid_kernel *shp; + int err; + + memset(tbuf, 0, sizeof(*tbuf)); + + rcu_read_lock(); + if (cmd == SHM_STAT || cmd == SHM_STAT_ANY) { + shp = shm_obtain_object(ns, shmid); + if (IS_ERR(shp)) { + err = PTR_ERR(shp); + goto out_unlock; + } + } else { /* IPC_STAT */ + shp = shm_obtain_object_check(ns, shmid); + if (IS_ERR(shp)) { + err = PTR_ERR(shp); + goto out_unlock; + } + } + + /* + * Semantically SHM_STAT_ANY ought to be identical to + * that functionality provided by the /proc/sysvipc/ + * interface. As such, only audit these calls and + * do not do traditional S_IRUGO permission checks on + * the ipc object. + */ + if (cmd == SHM_STAT_ANY) + audit_ipc_obj(&shp->shm_perm); + else { + err = -EACCES; + if (ipcperms(ns, &shp->shm_perm, S_IRUGO)) + goto out_unlock; + } + + err = security_shm_shmctl(&shp->shm_perm, cmd); + if (err) + goto out_unlock; + + ipc_lock_object(&shp->shm_perm); + + if (!ipc_valid_object(&shp->shm_perm)) { + ipc_unlock_object(&shp->shm_perm); + err = -EIDRM; + goto out_unlock; + } + + kernel_to_ipc64_perm(&shp->shm_perm, &tbuf->shm_perm); + tbuf->shm_segsz = shp->shm_segsz; + tbuf->shm_atime = shp->shm_atim; + tbuf->shm_dtime = shp->shm_dtim; + tbuf->shm_ctime = shp->shm_ctim; +#ifndef CONFIG_64BIT + tbuf->shm_atime_high = shp->shm_atim >> 32; + tbuf->shm_dtime_high = shp->shm_dtim >> 32; + tbuf->shm_ctime_high = shp->shm_ctim >> 32; +#endif + tbuf->shm_cpid = pid_vnr(shp->shm_cprid); + tbuf->shm_lpid = pid_vnr(shp->shm_lprid); + tbuf->shm_nattch = shp->shm_nattch; + + if (cmd == IPC_STAT) { + /* + * As defined in SUS: + * Return 0 on success + */ + err = 0; + } else { + /* + * SHM_STAT and SHM_STAT_ANY (both Linux specific) + * Return the full id, including the sequence number + */ + err = shp->shm_perm.id; + } + + ipc_unlock_object(&shp->shm_perm); +out_unlock: + rcu_read_unlock(); + return err; +} + +static int shmctl_do_lock(struct ipc_namespace *ns, int shmid, int cmd) +{ + struct shmid_kernel *shp; + struct file *shm_file; + int err; + + rcu_read_lock(); + shp = shm_obtain_object_check(ns, shmid); + if (IS_ERR(shp)) { + err = PTR_ERR(shp); + goto out_unlock1; + } + + audit_ipc_obj(&(shp->shm_perm)); + err = security_shm_shmctl(&shp->shm_perm, cmd); + if (err) + goto out_unlock1; + + ipc_lock_object(&shp->shm_perm); + + /* check if shm_destroy() is tearing down shp */ + if (!ipc_valid_object(&shp->shm_perm)) { + err = -EIDRM; + goto out_unlock0; + } + + if (!ns_capable(ns->user_ns, CAP_IPC_LOCK)) { + kuid_t euid = current_euid(); + + if (!uid_eq(euid, shp->shm_perm.uid) && + !uid_eq(euid, shp->shm_perm.cuid)) { + err = -EPERM; + goto out_unlock0; + } + if (cmd == SHM_LOCK && !rlimit(RLIMIT_MEMLOCK)) { + err = -EPERM; + goto out_unlock0; + } + } + + shm_file = shp->shm_file; + if (is_file_hugepages(shm_file)) + goto out_unlock0; + + if (cmd == SHM_LOCK) { + struct user_struct *user = current_user(); + + err = shmem_lock(shm_file, 1, user); + if (!err && !(shp->shm_perm.mode & SHM_LOCKED)) { + shp->shm_perm.mode |= SHM_LOCKED; + shp->mlock_user = user; + } + goto out_unlock0; + } + + /* SHM_UNLOCK */ + if (!(shp->shm_perm.mode & SHM_LOCKED)) + goto out_unlock0; + shmem_lock(shm_file, 0, shp->mlock_user); + shp->shm_perm.mode &= ~SHM_LOCKED; + shp->mlock_user = NULL; + get_file(shm_file); + ipc_unlock_object(&shp->shm_perm); + rcu_read_unlock(); + shmem_unlock_mapping(shm_file->f_mapping); + + fput(shm_file); + return err; + +out_unlock0: + ipc_unlock_object(&shp->shm_perm); +out_unlock1: + rcu_read_unlock(); + return err; +} + +long ksys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf) +{ + int err, version; + struct ipc_namespace *ns; + struct shmid64_ds sem64; + + if (cmd < 0 || shmid < 0) + return -EINVAL; + + version = ipc_parse_version(&cmd); + ns = current->nsproxy->ipc_ns; + + switch (cmd) { + case IPC_INFO: { + struct shminfo64 shminfo; + err = shmctl_ipc_info(ns, &shminfo); + if (err < 0) + return err; + if (copy_shminfo_to_user(buf, &shminfo, version)) + err = -EFAULT; + return err; + } + case SHM_INFO: { + struct shm_info shm_info; + err = shmctl_shm_info(ns, &shm_info); + if (err < 0) + return err; + if (copy_to_user(buf, &shm_info, sizeof(shm_info))) + err = -EFAULT; + return err; + } + case SHM_STAT: + case SHM_STAT_ANY: + case IPC_STAT: { + err = shmctl_stat(ns, shmid, cmd, &sem64); + if (err < 0) + return err; + if (copy_shmid_to_user(buf, &sem64, version)) + err = -EFAULT; + return err; + } + case IPC_SET: + if (copy_shmid_from_user(&sem64, buf, version)) + return -EFAULT; + /* fallthru */ + case IPC_RMID: + return shmctl_down(ns, shmid, cmd, &sem64); + case SHM_LOCK: + case SHM_UNLOCK: + return shmctl_do_lock(ns, shmid, cmd); + default: + return -EINVAL; + } +} + +SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf) +{ + return ksys_shmctl(shmid, cmd, buf); +} + +#ifdef CONFIG_COMPAT + +struct compat_shmid_ds { + struct compat_ipc_perm shm_perm; + int shm_segsz; + compat_time_t shm_atime; + compat_time_t shm_dtime; + compat_time_t shm_ctime; + compat_ipc_pid_t shm_cpid; + compat_ipc_pid_t shm_lpid; + unsigned short shm_nattch; + unsigned short shm_unused; + compat_uptr_t shm_unused2; + compat_uptr_t shm_unused3; +}; + +struct compat_shminfo64 { + compat_ulong_t shmmax; + compat_ulong_t shmmin; + compat_ulong_t shmmni; + compat_ulong_t shmseg; + compat_ulong_t shmall; + compat_ulong_t __unused1; + compat_ulong_t __unused2; + compat_ulong_t __unused3; + compat_ulong_t __unused4; +}; + +struct compat_shm_info { + compat_int_t used_ids; + compat_ulong_t shm_tot, shm_rss, shm_swp; + compat_ulong_t swap_attempts, swap_successes; +}; + +static int copy_compat_shminfo_to_user(void __user *buf, struct shminfo64 *in, + int version) +{ + if (in->shmmax > INT_MAX) + in->shmmax = INT_MAX; + if (version == IPC_64) { + struct compat_shminfo64 info; + memset(&info, 0, sizeof(info)); + info.shmmax = in->shmmax; + info.shmmin = in->shmmin; + info.shmmni = in->shmmni; + info.shmseg = in->shmseg; + info.shmall = in->shmall; + return copy_to_user(buf, &info, sizeof(info)); + } else { + struct shminfo info; + memset(&info, 0, sizeof(info)); + info.shmmax = in->shmmax; + info.shmmin = in->shmmin; + info.shmmni = in->shmmni; + info.shmseg = in->shmseg; + info.shmall = in->shmall; + return copy_to_user(buf, &info, sizeof(info)); + } +} + +static int put_compat_shm_info(struct shm_info *ip, + struct compat_shm_info __user *uip) +{ + struct compat_shm_info info; + + memset(&info, 0, sizeof(info)); + info.used_ids = ip->used_ids; + info.shm_tot = ip->shm_tot; + info.shm_rss = ip->shm_rss; + info.shm_swp = ip->shm_swp; + info.swap_attempts = ip->swap_attempts; + info.swap_successes = ip->swap_successes; + return copy_to_user(uip, &info, sizeof(info)); +} + +static int copy_compat_shmid_to_user(void __user *buf, struct shmid64_ds *in, + int version) +{ + if (version == IPC_64) { + struct compat_shmid64_ds v; + memset(&v, 0, sizeof(v)); + to_compat_ipc64_perm(&v.shm_perm, &in->shm_perm); + v.shm_atime = lower_32_bits(in->shm_atime); + v.shm_atime_high = upper_32_bits(in->shm_atime); + v.shm_dtime = lower_32_bits(in->shm_dtime); + v.shm_dtime_high = upper_32_bits(in->shm_dtime); + v.shm_ctime = lower_32_bits(in->shm_ctime); + v.shm_ctime_high = upper_32_bits(in->shm_ctime); + v.shm_segsz = in->shm_segsz; + v.shm_nattch = in->shm_nattch; + v.shm_cpid = in->shm_cpid; + v.shm_lpid = in->shm_lpid; + return copy_to_user(buf, &v, sizeof(v)); + } else { + struct compat_shmid_ds v; + memset(&v, 0, sizeof(v)); + to_compat_ipc_perm(&v.shm_perm, &in->shm_perm); + v.shm_perm.key = in->shm_perm.key; + v.shm_atime = in->shm_atime; + v.shm_dtime = in->shm_dtime; + v.shm_ctime = in->shm_ctime; + v.shm_segsz = in->shm_segsz; + v.shm_nattch = in->shm_nattch; + v.shm_cpid = in->shm_cpid; + v.shm_lpid = in->shm_lpid; + return copy_to_user(buf, &v, sizeof(v)); + } +} + +static int copy_compat_shmid_from_user(struct shmid64_ds *out, void __user *buf, + int version) +{ + memset(out, 0, sizeof(*out)); + if (version == IPC_64) { + struct compat_shmid64_ds __user *p = buf; + return get_compat_ipc64_perm(&out->shm_perm, &p->shm_perm); + } else { + struct compat_shmid_ds __user *p = buf; + return get_compat_ipc_perm(&out->shm_perm, &p->shm_perm); + } +} + +long compat_ksys_shmctl(int shmid, int cmd, void __user *uptr) +{ + struct ipc_namespace *ns; + struct shmid64_ds sem64; + int version = compat_ipc_parse_version(&cmd); + int err; + + ns = current->nsproxy->ipc_ns; + + if (cmd < 0 || shmid < 0) + return -EINVAL; + + switch (cmd) { + case IPC_INFO: { + struct shminfo64 shminfo; + err = shmctl_ipc_info(ns, &shminfo); + if (err < 0) + return err; + if (copy_compat_shminfo_to_user(uptr, &shminfo, version)) + err = -EFAULT; + return err; + } + case SHM_INFO: { + struct shm_info shm_info; + err = shmctl_shm_info(ns, &shm_info); + if (err < 0) + return err; + if (put_compat_shm_info(&shm_info, uptr)) + err = -EFAULT; + return err; + } + case IPC_STAT: + case SHM_STAT_ANY: + case SHM_STAT: + err = shmctl_stat(ns, shmid, cmd, &sem64); + if (err < 0) + return err; + if (copy_compat_shmid_to_user(uptr, &sem64, version)) + err = -EFAULT; + return err; + + case IPC_SET: + if (copy_compat_shmid_from_user(&sem64, uptr, version)) + return -EFAULT; + /* fallthru */ + case IPC_RMID: + return shmctl_down(ns, shmid, cmd, &sem64); + case SHM_LOCK: + case SHM_UNLOCK: + return shmctl_do_lock(ns, shmid, cmd); + break; + default: + return -EINVAL; + } + return err; +} + +COMPAT_SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, void __user *, uptr) +{ + return compat_ksys_shmctl(shmid, cmd, uptr); +} +#endif + +/* + * Fix shmaddr, allocate descriptor, map shm, add attach descriptor to lists. + * + * NOTE! Despite the name, this is NOT a direct system call entrypoint. The + * "raddr" thing points to kernel space, and there has to be a wrapper around + * this. + */ +long do_shmat(int shmid, char __user *shmaddr, int shmflg, + ulong *raddr, unsigned long shmlba) +{ + struct shmid_kernel *shp; + unsigned long addr = (unsigned long)shmaddr; + unsigned long size; + struct file *file, *base; + int err; + unsigned long flags = MAP_SHARED; + unsigned long prot; + int acc_mode; + struct ipc_namespace *ns; + struct shm_file_data *sfd; + int f_flags; + unsigned long populate = 0; + + err = -EINVAL; + if (shmid < 0) + goto out; + + if (addr) { + if (addr & (shmlba - 1)) { + if (shmflg & SHM_RND) { + addr &= ~(shmlba - 1); /* round down */ + + /* + * Ensure that the round-down is non-nil + * when remapping. This can happen for + * cases when addr < shmlba. + */ + if (!addr && (shmflg & SHM_REMAP)) + goto out; + } else +#ifndef __ARCH_FORCE_SHMLBA + if (addr & ~PAGE_MASK) +#endif + goto out; + } + + flags |= MAP_FIXED; + } else if ((shmflg & SHM_REMAP)) + goto out; + + if (shmflg & SHM_RDONLY) { + prot = PROT_READ; + acc_mode = S_IRUGO; + f_flags = O_RDONLY; + } else { + prot = PROT_READ | PROT_WRITE; + acc_mode = S_IRUGO | S_IWUGO; + f_flags = O_RDWR; + } + if (shmflg & SHM_EXEC) { + prot |= PROT_EXEC; + acc_mode |= S_IXUGO; + } + + /* + * We cannot rely on the fs check since SYSV IPC does have an + * additional creator id... + */ + ns = current->nsproxy->ipc_ns; + rcu_read_lock(); + shp = shm_obtain_object_check(ns, shmid); + if (IS_ERR(shp)) { + err = PTR_ERR(shp); + goto out_unlock; + } + + err = -EACCES; + if (ipcperms(ns, &shp->shm_perm, acc_mode)) + goto out_unlock; + + err = security_shm_shmat(&shp->shm_perm, shmaddr, shmflg); + if (err) + goto out_unlock; + + ipc_lock_object(&shp->shm_perm); + + /* check if shm_destroy() is tearing down shp */ + if (!ipc_valid_object(&shp->shm_perm)) { + ipc_unlock_object(&shp->shm_perm); + err = -EIDRM; + goto out_unlock; + } + + /* + * We need to take a reference to the real shm file to prevent the + * pointer from becoming stale in cases where the lifetime of the outer + * file extends beyond that of the shm segment. It's not usually + * possible, but it can happen during remap_file_pages() emulation as + * that unmaps the memory, then does ->mmap() via file reference only. + * We'll deny the ->mmap() if the shm segment was since removed, but to + * detect shm ID reuse we need to compare the file pointers. + */ + base = get_file(shp->shm_file); + shp->shm_nattch++; + size = i_size_read(file_inode(base)); + ipc_unlock_object(&shp->shm_perm); + rcu_read_unlock(); + + err = -ENOMEM; + sfd = kzalloc(sizeof(*sfd), GFP_KERNEL); + if (!sfd) { + fput(base); + goto out_nattch; + } + + file = alloc_file_clone(base, f_flags, + is_file_hugepages(base) ? + &shm_file_operations_huge : + &shm_file_operations); + err = PTR_ERR(file); + if (IS_ERR(file)) { + kfree(sfd); + fput(base); + goto out_nattch; + } + + sfd->id = shp->shm_perm.id; + sfd->ns = get_ipc_ns(ns); + sfd->file = base; + sfd->vm_ops = NULL; + file->private_data = sfd; + + err = security_mmap_file(file, prot, flags); + if (err) + goto out_fput; + + if (down_write_killable(¤t->mm->mmap_sem)) { + err = -EINTR; + goto out_fput; + } + + if (addr && !(shmflg & SHM_REMAP)) { + err = -EINVAL; + if (addr + size < addr) + goto invalid; + + if (find_vma_intersection(current->mm, addr, addr + size)) + goto invalid; + } + + addr = do_mmap_pgoff(file, addr, size, prot, flags, 0, &populate, NULL); + *raddr = addr; + err = 0; + if (IS_ERR_VALUE(addr)) + err = (long)addr; +invalid: + up_write(¤t->mm->mmap_sem); + if (populate) + mm_populate(addr, populate); + +out_fput: + fput(file); + +out_nattch: + down_write(&shm_ids(ns).rwsem); + shp = shm_lock(ns, shmid); + shp->shm_nattch--; + if (shm_may_destroy(ns, shp)) + shm_destroy(ns, shp); + else + shm_unlock(shp); + up_write(&shm_ids(ns).rwsem); + return err; + +out_unlock: + rcu_read_unlock(); +out: + return err; +} + +SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg) +{ + unsigned long ret; + long err; + + err = do_shmat(shmid, shmaddr, shmflg, &ret, SHMLBA); + if (err) + return err; + force_successful_syscall_return(); + return (long)ret; +} + +#ifdef CONFIG_COMPAT + +#ifndef COMPAT_SHMLBA +#define COMPAT_SHMLBA SHMLBA +#endif + +COMPAT_SYSCALL_DEFINE3(shmat, int, shmid, compat_uptr_t, shmaddr, int, shmflg) +{ + unsigned long ret; + long err; + + err = do_shmat(shmid, compat_ptr(shmaddr), shmflg, &ret, COMPAT_SHMLBA); + if (err) + return err; + force_successful_syscall_return(); + return (long)ret; +} +#endif + +/* + * detach and kill segment if marked destroyed. + * The work is done in shm_close. + */ +long ksys_shmdt(char __user *shmaddr) +{ + struct mm_struct *mm = current->mm; + struct vm_area_struct *vma; + unsigned long addr = (unsigned long)shmaddr; + int retval = -EINVAL; +#ifdef CONFIG_MMU + loff_t size = 0; + struct file *file; + struct vm_area_struct *next; +#endif + + if (addr & ~PAGE_MASK) + return retval; + + if (down_write_killable(&mm->mmap_sem)) + return -EINTR; + + /* + * This function tries to be smart and unmap shm segments that + * were modified by partial mlock or munmap calls: + * - It first determines the size of the shm segment that should be + * unmapped: It searches for a vma that is backed by shm and that + * started at address shmaddr. It records it's size and then unmaps + * it. + * - Then it unmaps all shm vmas that started at shmaddr and that + * are within the initially determined size and that are from the + * same shm segment from which we determined the size. + * Errors from do_munmap are ignored: the function only fails if + * it's called with invalid parameters or if it's called to unmap + * a part of a vma. Both calls in this function are for full vmas, + * the parameters are directly copied from the vma itself and always + * valid - therefore do_munmap cannot fail. (famous last words?) + */ + /* + * If it had been mremap()'d, the starting address would not + * match the usual checks anyway. So assume all vma's are + * above the starting address given. + */ + vma = find_vma(mm, addr); + +#ifdef CONFIG_MMU + while (vma) { + next = vma->vm_next; + + /* + * Check if the starting address would match, i.e. it's + * a fragment created by mprotect() and/or munmap(), or it + * otherwise it starts at this address with no hassles. + */ + if ((vma->vm_ops == &shm_vm_ops) && + (vma->vm_start - addr)/PAGE_SIZE == vma->vm_pgoff) { + + /* + * Record the file of the shm segment being + * unmapped. With mremap(), someone could place + * page from another segment but with equal offsets + * in the range we are unmapping. + */ + file = vma->vm_file; + size = i_size_read(file_inode(vma->vm_file)); + do_munmap(mm, vma->vm_start, vma->vm_end - vma->vm_start, NULL); + /* + * We discovered the size of the shm segment, so + * break out of here and fall through to the next + * loop that uses the size information to stop + * searching for matching vma's. + */ + retval = 0; + vma = next; + break; + } + vma = next; + } + + /* + * We need look no further than the maximum address a fragment + * could possibly have landed at. Also cast things to loff_t to + * prevent overflows and make comparisons vs. equal-width types. + */ + size = PAGE_ALIGN(size); + while (vma && (loff_t)(vma->vm_end - addr) <= size) { + next = vma->vm_next; + + /* finding a matching vma now does not alter retval */ + if ((vma->vm_ops == &shm_vm_ops) && + ((vma->vm_start - addr)/PAGE_SIZE == vma->vm_pgoff) && + (vma->vm_file == file)) + do_munmap(mm, vma->vm_start, vma->vm_end - vma->vm_start, NULL); + vma = next; + } + +#else /* CONFIG_MMU */ + /* under NOMMU conditions, the exact address to be destroyed must be + * given + */ + if (vma && vma->vm_start == addr && vma->vm_ops == &shm_vm_ops) { + do_munmap(mm, vma->vm_start, vma->vm_end - vma->vm_start, NULL); + retval = 0; + } + +#endif + + up_write(&mm->mmap_sem); + return retval; +} + +SYSCALL_DEFINE1(shmdt, char __user *, shmaddr) +{ + return ksys_shmdt(shmaddr); +} + +#ifdef CONFIG_PROC_FS +static int sysvipc_shm_proc_show(struct seq_file *s, void *it) +{ + struct pid_namespace *pid_ns = ipc_seq_pid_ns(s); + struct user_namespace *user_ns = seq_user_ns(s); + struct kern_ipc_perm *ipcp = it; + struct shmid_kernel *shp; + unsigned long rss = 0, swp = 0; + + shp = container_of(ipcp, struct shmid_kernel, shm_perm); + shm_add_rss_swap(shp, &rss, &swp); + +#if BITS_PER_LONG <= 32 +#define SIZE_SPEC "%10lu" +#else +#define SIZE_SPEC "%21lu" +#endif + + seq_printf(s, + "%10d %10d %4o " SIZE_SPEC " %5u %5u " + "%5lu %5u %5u %5u %5u %10llu %10llu %10llu " + SIZE_SPEC " " SIZE_SPEC "\n", + shp->shm_perm.key, + shp->shm_perm.id, + shp->shm_perm.mode, + shp->shm_segsz, + pid_nr_ns(shp->shm_cprid, pid_ns), + pid_nr_ns(shp->shm_lprid, pid_ns), + shp->shm_nattch, + from_kuid_munged(user_ns, shp->shm_perm.uid), + from_kgid_munged(user_ns, shp->shm_perm.gid), + from_kuid_munged(user_ns, shp->shm_perm.cuid), + from_kgid_munged(user_ns, shp->shm_perm.cgid), + shp->shm_atim, + shp->shm_dtim, + shp->shm_ctim, + rss * PAGE_SIZE, + swp * PAGE_SIZE); + + return 0; +} +#endif \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/ipc/shm.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/ipc/shm.c.yml new file mode 100644 index 00000000000..4033e21e9a8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/ipc/shm.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1992, 1993 Krishna Balasubramanian Many + - (c) 1999 Dragos Acostachioaie +holders: + - Krishna Balasubramanian Many + - Dragos Acostachioaie diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/kernel/time/posix-timers.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/kernel/time/posix-timers.c new file mode 100644 index 00000000000..2f2d182a0ec --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/kernel/time/posix-timers.c @@ -0,0 +1,1367 @@ +/* + * linux/kernel/posix-timers.c + * + * + * 2002-10-15 Posix Clocks & timers + * by George Anzinger george@mvista.com + * + * Copyright (C) 2002 2003 by MontaVista Software. + * + * 2004-06-01 Fix CLOCK_REALTIME clock/timer TIMER_ABSTIME bug. + * Copyright (C) 2004 Boris Hu + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * MontaVista Software | 1237 East Arques Avenue | Sunnyvale | CA 94085 | USA + */ + +/* These are all the functions necessary to implement + * POSIX clocks & timers + */ +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "timekeeping.h" +#include "posix-timers.h" + +/* + * Management arrays for POSIX timers. Timers are now kept in static hash table + * with 512 entries. + * Timer ids are allocated by local routine, which selects proper hash head by + * key, constructed from current->signal address and per signal struct counter. + * This keeps timer ids unique per process, but now they can intersect between + * processes. + */ + +/* + * Lets keep our timers in a slab cache :-) + */ +static struct kmem_cache *posix_timers_cache; + +static DEFINE_HASHTABLE(posix_timers_hashtable, 9); +static DEFINE_SPINLOCK(hash_lock); + +static const struct k_clock * const posix_clocks[]; +static const struct k_clock *clockid_to_kclock(const clockid_t id); +static const struct k_clock clock_realtime, clock_monotonic; + +/* + * we assume that the new SIGEV_THREAD_ID shares no bits with the other + * SIGEV values. Here we put out an error if this assumption fails. + */ +#if SIGEV_THREAD_ID != (SIGEV_THREAD_ID & \ + ~(SIGEV_SIGNAL | SIGEV_NONE | SIGEV_THREAD)) +#error "SIGEV_THREAD_ID must not share bit with other SIGEV values!" +#endif + +/* + * The timer ID is turned into a timer address by idr_find(). + * Verifying a valid ID consists of: + * + * a) checking that idr_find() returns other than -1. + * b) checking that the timer id matches the one in the timer itself. + * c) that the timer owner is in the callers thread group. + */ + +/* + * CLOCKs: The POSIX standard calls for a couple of clocks and allows us + * to implement others. This structure defines the various + * clocks. + * + * RESOLUTION: Clock resolution is used to round up timer and interval + * times, NOT to report clock times, which are reported with as + * much resolution as the system can muster. In some cases this + * resolution may depend on the underlying clock hardware and + * may not be quantifiable until run time, and only then is the + * necessary code is written. The standard says we should say + * something about this issue in the documentation... + * + * FUNCTIONS: The CLOCKs structure defines possible functions to + * handle various clock functions. + * + * The standard POSIX timer management code assumes the + * following: 1.) The k_itimer struct (sched.h) is used for + * the timer. 2.) The list, it_lock, it_clock, it_id and + * it_pid fields are not modified by timer code. + * + * Permissions: It is assumed that the clock_settime() function defined + * for each clock will take care of permission checks. Some + * clocks may be set able by any user (i.e. local process + * clocks) others not. Currently the only set able clock we + * have is CLOCK_REALTIME and its high res counter part, both of + * which we beg off on and pass to do_sys_settimeofday(). + */ +static struct k_itimer *__lock_timer(timer_t timer_id, unsigned long *flags); + +#define lock_timer(tid, flags) \ +({ struct k_itimer *__timr; \ + __cond_lock(&__timr->it_lock, __timr = __lock_timer(tid, flags)); \ + __timr; \ +}) + +static int hash(struct signal_struct *sig, unsigned int nr) +{ + return hash_32(hash32_ptr(sig) ^ nr, HASH_BITS(posix_timers_hashtable)); +} + +static struct k_itimer *__posix_timers_find(struct hlist_head *head, + struct signal_struct *sig, + timer_t id) +{ + struct k_itimer *timer; + + hlist_for_each_entry_rcu(timer, head, t_hash) { + if ((timer->it_signal == sig) && (timer->it_id == id)) + return timer; + } + return NULL; +} + +static struct k_itimer *posix_timer_by_id(timer_t id) +{ + struct signal_struct *sig = current->signal; + struct hlist_head *head = &posix_timers_hashtable[hash(sig, id)]; + + return __posix_timers_find(head, sig, id); +} + +static int posix_timer_add(struct k_itimer *timer) +{ + struct signal_struct *sig = current->signal; + int first_free_id = sig->posix_timer_id; + struct hlist_head *head; + int ret = -ENOENT; + + do { + spin_lock(&hash_lock); + head = &posix_timers_hashtable[hash(sig, sig->posix_timer_id)]; + if (!__posix_timers_find(head, sig, sig->posix_timer_id)) { + hlist_add_head_rcu(&timer->t_hash, head); + ret = sig->posix_timer_id; + } + if (++sig->posix_timer_id < 0) + sig->posix_timer_id = 0; + if ((sig->posix_timer_id == first_free_id) && (ret == -ENOENT)) + /* Loop over all possible ids completed */ + ret = -EAGAIN; + spin_unlock(&hash_lock); + } while (ret == -ENOENT); + return ret; +} + +static inline void unlock_timer(struct k_itimer *timr, unsigned long flags) +{ + spin_unlock_irqrestore(&timr->it_lock, flags); +} + +/* Get clock_realtime */ +static int posix_clock_realtime_get(clockid_t which_clock, struct timespec64 *tp) +{ + ktime_get_real_ts64(tp); + return 0; +} + +/* Set clock_realtime */ +static int posix_clock_realtime_set(const clockid_t which_clock, + const struct timespec64 *tp) +{ + return do_sys_settimeofday64(tp, NULL); +} + +static int posix_clock_realtime_adj(const clockid_t which_clock, + struct timex *t) +{ + return do_adjtimex(t); +} + +/* + * Get monotonic time for posix timers + */ +static int posix_ktime_get_ts(clockid_t which_clock, struct timespec64 *tp) +{ + ktime_get_ts64(tp); + return 0; +} + +/* + * Get monotonic-raw time for posix timers + */ +static int posix_get_monotonic_raw(clockid_t which_clock, struct timespec64 *tp) +{ + ktime_get_raw_ts64(tp); + return 0; +} + + +static int posix_get_realtime_coarse(clockid_t which_clock, struct timespec64 *tp) +{ + ktime_get_coarse_real_ts64(tp); + return 0; +} + +static int posix_get_monotonic_coarse(clockid_t which_clock, + struct timespec64 *tp) +{ + ktime_get_coarse_ts64(tp); + return 0; +} + +static int posix_get_coarse_res(const clockid_t which_clock, struct timespec64 *tp) +{ + *tp = ktime_to_timespec64(KTIME_LOW_RES); + return 0; +} + +static int posix_get_boottime(const clockid_t which_clock, struct timespec64 *tp) +{ + ktime_get_boottime_ts64(tp); + return 0; +} + +static int posix_get_tai(clockid_t which_clock, struct timespec64 *tp) +{ + ktime_get_clocktai_ts64(tp); + return 0; +} + +static int posix_get_hrtimer_res(clockid_t which_clock, struct timespec64 *tp) +{ + tp->tv_sec = 0; + tp->tv_nsec = hrtimer_resolution; + return 0; +} + +/* + * Initialize everything, well, just everything in Posix clocks/timers ;) + */ +static __init int init_posix_timers(void) +{ + posix_timers_cache = kmem_cache_create("posix_timers_cache", + sizeof (struct k_itimer), 0, SLAB_PANIC, + NULL); + return 0; +} +__initcall(init_posix_timers); + +/* + * The siginfo si_overrun field and the return value of timer_getoverrun(2) + * are of type int. Clamp the overrun value to INT_MAX + */ +static inline int timer_overrun_to_int(struct k_itimer *timr, int baseval) +{ + s64 sum = timr->it_overrun_last + (s64)baseval; + + return sum > (s64)INT_MAX ? INT_MAX : (int)sum; +} + +static void common_hrtimer_rearm(struct k_itimer *timr) +{ + struct hrtimer *timer = &timr->it.real.timer; + + timr->it_overrun += hrtimer_forward(timer, timer->base->get_time(), + timr->it_interval); + hrtimer_restart(timer); +} + +/* + * This function is exported for use by the signal deliver code. It is + * called just prior to the info block being released and passes that + * block to us. It's function is to update the overrun entry AND to + * restart the timer. It should only be called if the timer is to be + * restarted (i.e. we have flagged this in the sys_private entry of the + * info block). + * + * To protect against the timer going away while the interrupt is queued, + * we require that the it_requeue_pending flag be set. + */ +void posixtimer_rearm(struct siginfo *info) +{ + struct k_itimer *timr; + unsigned long flags; + + timr = lock_timer(info->si_tid, &flags); + if (!timr) + return; + + if (timr->it_interval && timr->it_requeue_pending == info->si_sys_private) { + timr->kclock->timer_rearm(timr); + + timr->it_active = 1; + timr->it_overrun_last = timr->it_overrun; + timr->it_overrun = -1LL; + ++timr->it_requeue_pending; + + info->si_overrun = timer_overrun_to_int(timr, info->si_overrun); + } + + unlock_timer(timr, flags); +} + +int posix_timer_event(struct k_itimer *timr, int si_private) +{ + enum pid_type type; + int ret = -1; + /* + * FIXME: if ->sigq is queued we can race with + * dequeue_signal()->posixtimer_rearm(). + * + * If dequeue_signal() sees the "right" value of + * si_sys_private it calls posixtimer_rearm(). + * We re-queue ->sigq and drop ->it_lock(). + * posixtimer_rearm() locks the timer + * and re-schedules it while ->sigq is pending. + * Not really bad, but not that we want. + */ + timr->sigq->info.si_sys_private = si_private; + + type = !(timr->it_sigev_notify & SIGEV_THREAD_ID) ? PIDTYPE_TGID : PIDTYPE_PID; + ret = send_sigqueue(timr->sigq, timr->it_pid, type); + /* If we failed to send the signal the timer stops. */ + return ret > 0; +} + +/* + * This function gets called when a POSIX.1b interval timer expires. It + * is used as a callback from the kernel internal timer. The + * run_timer_list code ALWAYS calls with interrupts on. + + * This code is for CLOCK_REALTIME* and CLOCK_MONOTONIC* timers. + */ +static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer) +{ + struct k_itimer *timr; + unsigned long flags; + int si_private = 0; + enum hrtimer_restart ret = HRTIMER_NORESTART; + + timr = container_of(timer, struct k_itimer, it.real.timer); + spin_lock_irqsave(&timr->it_lock, flags); + + timr->it_active = 0; + if (timr->it_interval != 0) + si_private = ++timr->it_requeue_pending; + + if (posix_timer_event(timr, si_private)) { + /* + * signal was not sent because of sig_ignor + * we will not get a call back to restart it AND + * it should be restarted. + */ + if (timr->it_interval != 0) { + ktime_t now = hrtimer_cb_get_time(timer); + + /* + * FIXME: What we really want, is to stop this + * timer completely and restart it in case the + * SIG_IGN is removed. This is a non trivial + * change which involves sighand locking + * (sigh !), which we don't want to do late in + * the release cycle. + * + * For now we just let timers with an interval + * less than a jiffie expire every jiffie to + * avoid softirq starvation in case of SIG_IGN + * and a very small interval, which would put + * the timer right back on the softirq pending + * list. By moving now ahead of time we trick + * hrtimer_forward() to expire the timer + * later, while we still maintain the overrun + * accuracy, but have some inconsistency in + * the timer_gettime() case. This is at least + * better than a starved softirq. A more + * complex fix which solves also another related + * inconsistency is already in the pipeline. + */ +#ifdef CONFIG_HIGH_RES_TIMERS + { + ktime_t kj = NSEC_PER_SEC / HZ; + + if (timr->it_interval < kj) + now = ktime_add(now, kj); + } +#endif + timr->it_overrun += hrtimer_forward(timer, now, + timr->it_interval); + ret = HRTIMER_RESTART; + ++timr->it_requeue_pending; + timr->it_active = 1; + } + } + + unlock_timer(timr, flags); + return ret; +} + +static struct pid *good_sigevent(sigevent_t * event) +{ + struct pid *pid = task_tgid(current); + struct task_struct *rtn; + + switch (event->sigev_notify) { + case SIGEV_SIGNAL | SIGEV_THREAD_ID: + pid = find_vpid(event->sigev_notify_thread_id); + rtn = pid_task(pid, PIDTYPE_PID); + if (!rtn || !same_thread_group(rtn, current)) + return NULL; + /* FALLTHRU */ + case SIGEV_SIGNAL: + case SIGEV_THREAD: + if (event->sigev_signo <= 0 || event->sigev_signo > SIGRTMAX) + return NULL; + /* FALLTHRU */ + case SIGEV_NONE: + return pid; + default: + return NULL; + } +} + +static struct k_itimer * alloc_posix_timer(void) +{ + struct k_itimer *tmr; + tmr = kmem_cache_zalloc(posix_timers_cache, GFP_KERNEL); + if (!tmr) + return tmr; + if (unlikely(!(tmr->sigq = sigqueue_alloc()))) { + kmem_cache_free(posix_timers_cache, tmr); + return NULL; + } + clear_siginfo(&tmr->sigq->info); + return tmr; +} + +static void k_itimer_rcu_free(struct rcu_head *head) +{ + struct k_itimer *tmr = container_of(head, struct k_itimer, it.rcu); + + kmem_cache_free(posix_timers_cache, tmr); +} + +#define IT_ID_SET 1 +#define IT_ID_NOT_SET 0 +static void release_posix_timer(struct k_itimer *tmr, int it_id_set) +{ + if (it_id_set) { + unsigned long flags; + spin_lock_irqsave(&hash_lock, flags); + hlist_del_rcu(&tmr->t_hash); + spin_unlock_irqrestore(&hash_lock, flags); + } + put_pid(tmr->it_pid); + sigqueue_free(tmr->sigq); + call_rcu(&tmr->it.rcu, k_itimer_rcu_free); +} + +static int common_timer_create(struct k_itimer *new_timer) +{ + hrtimer_init(&new_timer->it.real.timer, new_timer->it_clock, 0); + return 0; +} + +/* Create a POSIX.1b interval timer. */ +static int do_timer_create(clockid_t which_clock, struct sigevent *event, + timer_t __user *created_timer_id) +{ + const struct k_clock *kc = clockid_to_kclock(which_clock); + struct k_itimer *new_timer; + int error, new_timer_id; + int it_id_set = IT_ID_NOT_SET; + + if (!kc) + return -EINVAL; + if (!kc->timer_create) + return -EOPNOTSUPP; + + new_timer = alloc_posix_timer(); + if (unlikely(!new_timer)) + return -EAGAIN; + + spin_lock_init(&new_timer->it_lock); + new_timer_id = posix_timer_add(new_timer); + if (new_timer_id < 0) { + error = new_timer_id; + goto out; + } + + it_id_set = IT_ID_SET; + new_timer->it_id = (timer_t) new_timer_id; + new_timer->it_clock = which_clock; + new_timer->kclock = kc; + new_timer->it_overrun = -1LL; + + if (event) { + rcu_read_lock(); + new_timer->it_pid = get_pid(good_sigevent(event)); + rcu_read_unlock(); + if (!new_timer->it_pid) { + error = -EINVAL; + goto out; + } + new_timer->it_sigev_notify = event->sigev_notify; + new_timer->sigq->info.si_signo = event->sigev_signo; + new_timer->sigq->info.si_value = event->sigev_value; + } else { + new_timer->it_sigev_notify = SIGEV_SIGNAL; + new_timer->sigq->info.si_signo = SIGALRM; + memset(&new_timer->sigq->info.si_value, 0, sizeof(sigval_t)); + new_timer->sigq->info.si_value.sival_int = new_timer->it_id; + new_timer->it_pid = get_pid(task_tgid(current)); + } + + new_timer->sigq->info.si_tid = new_timer->it_id; + new_timer->sigq->info.si_code = SI_TIMER; + + if (copy_to_user(created_timer_id, + &new_timer_id, sizeof (new_timer_id))) { + error = -EFAULT; + goto out; + } + + error = kc->timer_create(new_timer); + if (error) + goto out; + + spin_lock_irq(¤t->sighand->siglock); + new_timer->it_signal = current->signal; + list_add(&new_timer->list, ¤t->signal->posix_timers); + spin_unlock_irq(¤t->sighand->siglock); + + return 0; + /* + * In the case of the timer belonging to another task, after + * the task is unlocked, the timer is owned by the other task + * and may cease to exist at any time. Don't use or modify + * new_timer after the unlock call. + */ +out: + release_posix_timer(new_timer, it_id_set); + return error; +} + +SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock, + struct sigevent __user *, timer_event_spec, + timer_t __user *, created_timer_id) +{ + if (timer_event_spec) { + sigevent_t event; + + if (copy_from_user(&event, timer_event_spec, sizeof (event))) + return -EFAULT; + return do_timer_create(which_clock, &event, created_timer_id); + } + return do_timer_create(which_clock, NULL, created_timer_id); +} + +#ifdef CONFIG_COMPAT +COMPAT_SYSCALL_DEFINE3(timer_create, clockid_t, which_clock, + struct compat_sigevent __user *, timer_event_spec, + timer_t __user *, created_timer_id) +{ + if (timer_event_spec) { + sigevent_t event; + + if (get_compat_sigevent(&event, timer_event_spec)) + return -EFAULT; + return do_timer_create(which_clock, &event, created_timer_id); + } + return do_timer_create(which_clock, NULL, created_timer_id); +} +#endif + +/* + * Locking issues: We need to protect the result of the id look up until + * we get the timer locked down so it is not deleted under us. The + * removal is done under the idr spinlock so we use that here to bridge + * the find to the timer lock. To avoid a dead lock, the timer id MUST + * be release with out holding the timer lock. + */ +static struct k_itimer *__lock_timer(timer_t timer_id, unsigned long *flags) +{ + struct k_itimer *timr; + + /* + * timer_t could be any type >= int and we want to make sure any + * @timer_id outside positive int range fails lookup. + */ + if ((unsigned long long)timer_id > INT_MAX) + return NULL; + + rcu_read_lock(); + timr = posix_timer_by_id(timer_id); + if (timr) { + spin_lock_irqsave(&timr->it_lock, *flags); + if (timr->it_signal == current->signal) { + rcu_read_unlock(); + return timr; + } + spin_unlock_irqrestore(&timr->it_lock, *flags); + } + rcu_read_unlock(); + + return NULL; +} + +static ktime_t common_hrtimer_remaining(struct k_itimer *timr, ktime_t now) +{ + struct hrtimer *timer = &timr->it.real.timer; + + return __hrtimer_expires_remaining_adjusted(timer, now); +} + +static s64 common_hrtimer_forward(struct k_itimer *timr, ktime_t now) +{ + struct hrtimer *timer = &timr->it.real.timer; + + return hrtimer_forward(timer, now, timr->it_interval); +} + +/* + * Get the time remaining on a POSIX.1b interval timer. This function + * is ALWAYS called with spin_lock_irq on the timer, thus it must not + * mess with irq. + * + * We have a couple of messes to clean up here. First there is the case + * of a timer that has a requeue pending. These timers should appear to + * be in the timer list with an expiry as if we were to requeue them + * now. + * + * The second issue is the SIGEV_NONE timer which may be active but is + * not really ever put in the timer list (to save system resources). + * This timer may be expired, and if so, we will do it here. Otherwise + * it is the same as a requeue pending timer WRT to what we should + * report. + */ +void common_timer_get(struct k_itimer *timr, struct itimerspec64 *cur_setting) +{ + const struct k_clock *kc = timr->kclock; + ktime_t now, remaining, iv; + struct timespec64 ts64; + bool sig_none; + + sig_none = timr->it_sigev_notify == SIGEV_NONE; + iv = timr->it_interval; + + /* interval timer ? */ + if (iv) { + cur_setting->it_interval = ktime_to_timespec64(iv); + } else if (!timr->it_active) { + /* + * SIGEV_NONE oneshot timers are never queued. Check them + * below. + */ + if (!sig_none) + return; + } + + /* + * The timespec64 based conversion is suboptimal, but it's not + * worth to implement yet another callback. + */ + kc->clock_get(timr->it_clock, &ts64); + now = timespec64_to_ktime(ts64); + + /* + * When a requeue is pending or this is a SIGEV_NONE timer move the + * expiry time forward by intervals, so expiry is > now. + */ + if (iv && (timr->it_requeue_pending & REQUEUE_PENDING || sig_none)) + timr->it_overrun += kc->timer_forward(timr, now); + + remaining = kc->timer_remaining(timr, now); + /* Return 0 only, when the timer is expired and not pending */ + if (remaining <= 0) { + /* + * A single shot SIGEV_NONE timer must return 0, when + * it is expired ! + */ + if (!sig_none) + cur_setting->it_value.tv_nsec = 1; + } else { + cur_setting->it_value = ktime_to_timespec64(remaining); + } +} + +/* Get the time remaining on a POSIX.1b interval timer. */ +static int do_timer_gettime(timer_t timer_id, struct itimerspec64 *setting) +{ + struct k_itimer *timr; + const struct k_clock *kc; + unsigned long flags; + int ret = 0; + + timr = lock_timer(timer_id, &flags); + if (!timr) + return -EINVAL; + + memset(setting, 0, sizeof(*setting)); + kc = timr->kclock; + if (WARN_ON_ONCE(!kc || !kc->timer_get)) + ret = -EINVAL; + else + kc->timer_get(timr, setting); + + unlock_timer(timr, flags); + return ret; +} + +/* Get the time remaining on a POSIX.1b interval timer. */ +SYSCALL_DEFINE2(timer_gettime, timer_t, timer_id, + struct __kernel_itimerspec __user *, setting) +{ + struct itimerspec64 cur_setting; + + int ret = do_timer_gettime(timer_id, &cur_setting); + if (!ret) { + if (put_itimerspec64(&cur_setting, setting)) + ret = -EFAULT; + } + return ret; +} + +#ifdef CONFIG_COMPAT_32BIT_TIME + +COMPAT_SYSCALL_DEFINE2(timer_gettime, timer_t, timer_id, + struct compat_itimerspec __user *, setting) +{ + struct itimerspec64 cur_setting; + + int ret = do_timer_gettime(timer_id, &cur_setting); + if (!ret) { + if (put_compat_itimerspec64(&cur_setting, setting)) + ret = -EFAULT; + } + return ret; +} + +#endif + +/* + * Get the number of overruns of a POSIX.1b interval timer. This is to + * be the overrun of the timer last delivered. At the same time we are + * accumulating overruns on the next timer. The overrun is frozen when + * the signal is delivered, either at the notify time (if the info block + * is not queued) or at the actual delivery time (as we are informed by + * the call back to posixtimer_rearm(). So all we need to do is + * to pick up the frozen overrun. + */ +SYSCALL_DEFINE1(timer_getoverrun, timer_t, timer_id) +{ + struct k_itimer *timr; + int overrun; + unsigned long flags; + + timr = lock_timer(timer_id, &flags); + if (!timr) + return -EINVAL; + + overrun = timer_overrun_to_int(timr, 0); + unlock_timer(timr, flags); + + return overrun; +} + +static void common_hrtimer_arm(struct k_itimer *timr, ktime_t expires, + bool absolute, bool sigev_none) +{ + struct hrtimer *timer = &timr->it.real.timer; + enum hrtimer_mode mode; + + mode = absolute ? HRTIMER_MODE_ABS : HRTIMER_MODE_REL; + /* + * Posix magic: Relative CLOCK_REALTIME timers are not affected by + * clock modifications, so they become CLOCK_MONOTONIC based under the + * hood. See hrtimer_init(). Update timr->kclock, so the generic + * functions which use timr->kclock->clock_get() work. + * + * Note: it_clock stays unmodified, because the next timer_set() might + * use ABSTIME, so it needs to switch back. + */ + if (timr->it_clock == CLOCK_REALTIME) + timr->kclock = absolute ? &clock_realtime : &clock_monotonic; + + hrtimer_init(&timr->it.real.timer, timr->it_clock, mode); + timr->it.real.timer.function = posix_timer_fn; + + if (!absolute) + expires = ktime_add_safe(expires, timer->base->get_time()); + hrtimer_set_expires(timer, expires); + + if (!sigev_none) + hrtimer_start_expires(timer, HRTIMER_MODE_ABS); +} + +static int common_hrtimer_try_to_cancel(struct k_itimer *timr) +{ + return hrtimer_try_to_cancel(&timr->it.real.timer); +} + +/* Set a POSIX.1b interval timer. */ +int common_timer_set(struct k_itimer *timr, int flags, + struct itimerspec64 *new_setting, + struct itimerspec64 *old_setting) +{ + const struct k_clock *kc = timr->kclock; + bool sigev_none; + ktime_t expires; + + if (old_setting) + common_timer_get(timr, old_setting); + + /* Prevent rearming by clearing the interval */ + timr->it_interval = 0; + /* + * Careful here. On SMP systems the timer expiry function could be + * active and spinning on timr->it_lock. + */ + if (kc->timer_try_to_cancel(timr) < 0) + return TIMER_RETRY; + + timr->it_active = 0; + timr->it_requeue_pending = (timr->it_requeue_pending + 2) & + ~REQUEUE_PENDING; + timr->it_overrun_last = 0; + + /* Switch off the timer when it_value is zero */ + if (!new_setting->it_value.tv_sec && !new_setting->it_value.tv_nsec) + return 0; + + timr->it_interval = timespec64_to_ktime(new_setting->it_interval); + expires = timespec64_to_ktime(new_setting->it_value); + sigev_none = timr->it_sigev_notify == SIGEV_NONE; + + kc->timer_arm(timr, expires, flags & TIMER_ABSTIME, sigev_none); + timr->it_active = !sigev_none; + return 0; +} + +static int do_timer_settime(timer_t timer_id, int flags, + struct itimerspec64 *new_spec64, + struct itimerspec64 *old_spec64) +{ + const struct k_clock *kc; + struct k_itimer *timr; + unsigned long flag; + int error = 0; + + if (!timespec64_valid(&new_spec64->it_interval) || + !timespec64_valid(&new_spec64->it_value)) + return -EINVAL; + + if (old_spec64) + memset(old_spec64, 0, sizeof(*old_spec64)); +retry: + timr = lock_timer(timer_id, &flag); + if (!timr) + return -EINVAL; + + kc = timr->kclock; + if (WARN_ON_ONCE(!kc || !kc->timer_set)) + error = -EINVAL; + else + error = kc->timer_set(timr, flags, new_spec64, old_spec64); + + unlock_timer(timr, flag); + if (error == TIMER_RETRY) { + old_spec64 = NULL; // We already got the old time... + goto retry; + } + + return error; +} + +/* Set a POSIX.1b interval timer */ +SYSCALL_DEFINE4(timer_settime, timer_t, timer_id, int, flags, + const struct __kernel_itimerspec __user *, new_setting, + struct __kernel_itimerspec __user *, old_setting) +{ + struct itimerspec64 new_spec, old_spec; + struct itimerspec64 *rtn = old_setting ? &old_spec : NULL; + int error = 0; + + if (!new_setting) + return -EINVAL; + + if (get_itimerspec64(&new_spec, new_setting)) + return -EFAULT; + + error = do_timer_settime(timer_id, flags, &new_spec, rtn); + if (!error && old_setting) { + if (put_itimerspec64(&old_spec, old_setting)) + error = -EFAULT; + } + return error; +} + +#ifdef CONFIG_COMPAT_32BIT_TIME +COMPAT_SYSCALL_DEFINE4(timer_settime, timer_t, timer_id, int, flags, + struct compat_itimerspec __user *, new, + struct compat_itimerspec __user *, old) +{ + struct itimerspec64 new_spec, old_spec; + struct itimerspec64 *rtn = old ? &old_spec : NULL; + int error = 0; + + if (!new) + return -EINVAL; + if (get_compat_itimerspec64(&new_spec, new)) + return -EFAULT; + + error = do_timer_settime(timer_id, flags, &new_spec, rtn); + if (!error && old) { + if (put_compat_itimerspec64(&old_spec, old)) + error = -EFAULT; + } + return error; +} +#endif + +int common_timer_del(struct k_itimer *timer) +{ + const struct k_clock *kc = timer->kclock; + + timer->it_interval = 0; + if (kc->timer_try_to_cancel(timer) < 0) + return TIMER_RETRY; + timer->it_active = 0; + return 0; +} + +static inline int timer_delete_hook(struct k_itimer *timer) +{ + const struct k_clock *kc = timer->kclock; + + if (WARN_ON_ONCE(!kc || !kc->timer_del)) + return -EINVAL; + return kc->timer_del(timer); +} + +/* Delete a POSIX.1b interval timer. */ +SYSCALL_DEFINE1(timer_delete, timer_t, timer_id) +{ + struct k_itimer *timer; + unsigned long flags; + +retry_delete: + timer = lock_timer(timer_id, &flags); + if (!timer) + return -EINVAL; + + if (timer_delete_hook(timer) == TIMER_RETRY) { + unlock_timer(timer, flags); + goto retry_delete; + } + + spin_lock(¤t->sighand->siglock); + list_del(&timer->list); + spin_unlock(¤t->sighand->siglock); + /* + * This keeps any tasks waiting on the spin lock from thinking + * they got something (see the lock code above). + */ + timer->it_signal = NULL; + + unlock_timer(timer, flags); + release_posix_timer(timer, IT_ID_SET); + return 0; +} + +/* + * return timer owned by the process, used by exit_itimers + */ +static void itimer_delete(struct k_itimer *timer) +{ + unsigned long flags; + +retry_delete: + spin_lock_irqsave(&timer->it_lock, flags); + + if (timer_delete_hook(timer) == TIMER_RETRY) { + unlock_timer(timer, flags); + goto retry_delete; + } + list_del(&timer->list); + /* + * This keeps any tasks waiting on the spin lock from thinking + * they got something (see the lock code above). + */ + timer->it_signal = NULL; + + unlock_timer(timer, flags); + release_posix_timer(timer, IT_ID_SET); +} + +/* + * This is called by do_exit or de_thread, only when there are no more + * references to the shared signal_struct. + */ +void exit_itimers(struct signal_struct *sig) +{ + struct k_itimer *tmr; + + while (!list_empty(&sig->posix_timers)) { + tmr = list_entry(sig->posix_timers.next, struct k_itimer, list); + itimer_delete(tmr); + } +} + +SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock, + const struct __kernel_timespec __user *, tp) +{ + const struct k_clock *kc = clockid_to_kclock(which_clock); + struct timespec64 new_tp; + + if (!kc || !kc->clock_set) + return -EINVAL; + + if (get_timespec64(&new_tp, tp)) + return -EFAULT; + + return kc->clock_set(which_clock, &new_tp); +} + +SYSCALL_DEFINE2(clock_gettime, const clockid_t, which_clock, + struct __kernel_timespec __user *, tp) +{ + const struct k_clock *kc = clockid_to_kclock(which_clock); + struct timespec64 kernel_tp; + int error; + + if (!kc) + return -EINVAL; + + error = kc->clock_get(which_clock, &kernel_tp); + + if (!error && put_timespec64(&kernel_tp, tp)) + error = -EFAULT; + + return error; +} + +SYSCALL_DEFINE2(clock_adjtime, const clockid_t, which_clock, + struct timex __user *, utx) +{ + const struct k_clock *kc = clockid_to_kclock(which_clock); + struct timex ktx; + int err; + + if (!kc) + return -EINVAL; + if (!kc->clock_adj) + return -EOPNOTSUPP; + + if (copy_from_user(&ktx, utx, sizeof(ktx))) + return -EFAULT; + + err = kc->clock_adj(which_clock, &ktx); + + if (err >= 0 && copy_to_user(utx, &ktx, sizeof(ktx))) + return -EFAULT; + + return err; +} + +SYSCALL_DEFINE2(clock_getres, const clockid_t, which_clock, + struct __kernel_timespec __user *, tp) +{ + const struct k_clock *kc = clockid_to_kclock(which_clock); + struct timespec64 rtn_tp; + int error; + + if (!kc) + return -EINVAL; + + error = kc->clock_getres(which_clock, &rtn_tp); + + if (!error && tp && put_timespec64(&rtn_tp, tp)) + error = -EFAULT; + + return error; +} + +#ifdef CONFIG_COMPAT_32BIT_TIME + +COMPAT_SYSCALL_DEFINE2(clock_settime, clockid_t, which_clock, + struct compat_timespec __user *, tp) +{ + const struct k_clock *kc = clockid_to_kclock(which_clock); + struct timespec64 ts; + + if (!kc || !kc->clock_set) + return -EINVAL; + + if (compat_get_timespec64(&ts, tp)) + return -EFAULT; + + return kc->clock_set(which_clock, &ts); +} + +COMPAT_SYSCALL_DEFINE2(clock_gettime, clockid_t, which_clock, + struct compat_timespec __user *, tp) +{ + const struct k_clock *kc = clockid_to_kclock(which_clock); + struct timespec64 ts; + int err; + + if (!kc) + return -EINVAL; + + err = kc->clock_get(which_clock, &ts); + + if (!err && compat_put_timespec64(&ts, tp)) + err = -EFAULT; + + return err; +} + +#endif + +#ifdef CONFIG_COMPAT + +COMPAT_SYSCALL_DEFINE2(clock_adjtime, clockid_t, which_clock, + struct compat_timex __user *, utp) +{ + const struct k_clock *kc = clockid_to_kclock(which_clock); + struct timex ktx; + int err; + + if (!kc) + return -EINVAL; + if (!kc->clock_adj) + return -EOPNOTSUPP; + + err = compat_get_timex(&ktx, utp); + if (err) + return err; + + err = kc->clock_adj(which_clock, &ktx); + + if (err >= 0) + err = compat_put_timex(utp, &ktx); + + return err; +} + +#endif + +#ifdef CONFIG_COMPAT_32BIT_TIME + +COMPAT_SYSCALL_DEFINE2(clock_getres, clockid_t, which_clock, + struct compat_timespec __user *, tp) +{ + const struct k_clock *kc = clockid_to_kclock(which_clock); + struct timespec64 ts; + int err; + + if (!kc) + return -EINVAL; + + err = kc->clock_getres(which_clock, &ts); + if (!err && tp && compat_put_timespec64(&ts, tp)) + return -EFAULT; + + return err; +} + +#endif + +/* + * nanosleep for monotonic and realtime clocks + */ +static int common_nsleep(const clockid_t which_clock, int flags, + const struct timespec64 *rqtp) +{ + return hrtimer_nanosleep(rqtp, flags & TIMER_ABSTIME ? + HRTIMER_MODE_ABS : HRTIMER_MODE_REL, + which_clock); +} + +SYSCALL_DEFINE4(clock_nanosleep, const clockid_t, which_clock, int, flags, + const struct __kernel_timespec __user *, rqtp, + struct __kernel_timespec __user *, rmtp) +{ + const struct k_clock *kc = clockid_to_kclock(which_clock); + struct timespec64 t; + + if (!kc) + return -EINVAL; + if (!kc->nsleep) + return -EOPNOTSUPP; + + if (get_timespec64(&t, rqtp)) + return -EFAULT; + + if (!timespec64_valid(&t)) + return -EINVAL; + if (flags & TIMER_ABSTIME) + rmtp = NULL; + current->restart_block.nanosleep.type = rmtp ? TT_NATIVE : TT_NONE; + current->restart_block.nanosleep.rmtp = rmtp; + + return kc->nsleep(which_clock, flags, &t); +} + +#ifdef CONFIG_COMPAT_32BIT_TIME + +COMPAT_SYSCALL_DEFINE4(clock_nanosleep, clockid_t, which_clock, int, flags, + struct compat_timespec __user *, rqtp, + struct compat_timespec __user *, rmtp) +{ + const struct k_clock *kc = clockid_to_kclock(which_clock); + struct timespec64 t; + + if (!kc) + return -EINVAL; + if (!kc->nsleep) + return -EOPNOTSUPP; + + if (compat_get_timespec64(&t, rqtp)) + return -EFAULT; + + if (!timespec64_valid(&t)) + return -EINVAL; + if (flags & TIMER_ABSTIME) + rmtp = NULL; + current->restart_block.nanosleep.type = rmtp ? TT_COMPAT : TT_NONE; + current->restart_block.nanosleep.compat_rmtp = rmtp; + + return kc->nsleep(which_clock, flags, &t); +} + +#endif + +static const struct k_clock clock_realtime = { + .clock_getres = posix_get_hrtimer_res, + .clock_get = posix_clock_realtime_get, + .clock_set = posix_clock_realtime_set, + .clock_adj = posix_clock_realtime_adj, + .nsleep = common_nsleep, + .timer_create = common_timer_create, + .timer_set = common_timer_set, + .timer_get = common_timer_get, + .timer_del = common_timer_del, + .timer_rearm = common_hrtimer_rearm, + .timer_forward = common_hrtimer_forward, + .timer_remaining = common_hrtimer_remaining, + .timer_try_to_cancel = common_hrtimer_try_to_cancel, + .timer_arm = common_hrtimer_arm, +}; + +static const struct k_clock clock_monotonic = { + .clock_getres = posix_get_hrtimer_res, + .clock_get = posix_ktime_get_ts, + .nsleep = common_nsleep, + .timer_create = common_timer_create, + .timer_set = common_timer_set, + .timer_get = common_timer_get, + .timer_del = common_timer_del, + .timer_rearm = common_hrtimer_rearm, + .timer_forward = common_hrtimer_forward, + .timer_remaining = common_hrtimer_remaining, + .timer_try_to_cancel = common_hrtimer_try_to_cancel, + .timer_arm = common_hrtimer_arm, +}; + +static const struct k_clock clock_monotonic_raw = { + .clock_getres = posix_get_hrtimer_res, + .clock_get = posix_get_monotonic_raw, +}; + +static const struct k_clock clock_realtime_coarse = { + .clock_getres = posix_get_coarse_res, + .clock_get = posix_get_realtime_coarse, +}; + +static const struct k_clock clock_monotonic_coarse = { + .clock_getres = posix_get_coarse_res, + .clock_get = posix_get_monotonic_coarse, +}; + +static const struct k_clock clock_tai = { + .clock_getres = posix_get_hrtimer_res, + .clock_get = posix_get_tai, + .nsleep = common_nsleep, + .timer_create = common_timer_create, + .timer_set = common_timer_set, + .timer_get = common_timer_get, + .timer_del = common_timer_del, + .timer_rearm = common_hrtimer_rearm, + .timer_forward = common_hrtimer_forward, + .timer_remaining = common_hrtimer_remaining, + .timer_try_to_cancel = common_hrtimer_try_to_cancel, + .timer_arm = common_hrtimer_arm, +}; + +static const struct k_clock clock_boottime = { + .clock_getres = posix_get_hrtimer_res, + .clock_get = posix_get_boottime, + .nsleep = common_nsleep, + .timer_create = common_timer_create, + .timer_set = common_timer_set, + .timer_get = common_timer_get, + .timer_del = common_timer_del, + .timer_rearm = common_hrtimer_rearm, + .timer_forward = common_hrtimer_forward, + .timer_remaining = common_hrtimer_remaining, + .timer_try_to_cancel = common_hrtimer_try_to_cancel, + .timer_arm = common_hrtimer_arm, +}; + +static const struct k_clock * const posix_clocks[] = { + [CLOCK_REALTIME] = &clock_realtime, + [CLOCK_MONOTONIC] = &clock_monotonic, + [CLOCK_PROCESS_CPUTIME_ID] = &clock_process, + [CLOCK_THREAD_CPUTIME_ID] = &clock_thread, + [CLOCK_MONOTONIC_RAW] = &clock_monotonic_raw, + [CLOCK_REALTIME_COARSE] = &clock_realtime_coarse, + [CLOCK_MONOTONIC_COARSE] = &clock_monotonic_coarse, + [CLOCK_BOOTTIME] = &clock_boottime, + [CLOCK_REALTIME_ALARM] = &alarm_clock, + [CLOCK_BOOTTIME_ALARM] = &alarm_clock, + [CLOCK_TAI] = &clock_tai, +}; + +static const struct k_clock *clockid_to_kclock(const clockid_t id) +{ + clockid_t idx = id; + + if (id < 0) { + return (id & CLOCKFD_MASK) == CLOCKFD ? + &clock_posix_dynamic : &clock_posix_cpu; + } + + if (id >= ARRAY_SIZE(posix_clocks)) + return NULL; + + return posix_clocks[array_index_nospec(idx, ARRAY_SIZE(posix_clocks))]; +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/kernel/time/posix-timers.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/kernel/time/posix-timers.c.yml new file mode 100644 index 00000000000..2ca8d98c001 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/kernel/time/posix-timers.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2002 2003 by MontaVista Software + - Copyright (c) 2004 Boris +holders: + - MontaVista Software + - Boris +authors: + - George Anzinger george@mvista.com diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/lib/decompress_unlzma.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/lib/decompress_unlzma.c new file mode 100644 index 00000000000..22062be8797 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/lib/decompress_unlzma.c @@ -0,0 +1,678 @@ +/* Lzma decompressor for Linux kernel. Shamelessly snarfed + *from busybox 1.1.1 + * + *Linux kernel adaptation + *Copyright (C) 2006 Alain < alain@knaff.lu > + * + *Based on small lzma deflate implementation/Small range coder + *implementation for lzma. + *Copyright (C) 2006 Aurelien Jacobs < aurel@gnuage.org > + * + *Based on LzmaDecode.c from the LZMA SDK 4.22 (http://www.7-zip.org/) + *Copyright (C) 1999-2005 Igor Pavlov + * + *Copyrights of the parts, see headers below. + * + * + *This program 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 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 + *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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifdef STATIC +#define PREBOOT +#else +#include +#endif /* STATIC */ + +#include + +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) + +static long long INIT read_int(unsigned char *ptr, int size) +{ + int i; + long long ret = 0; + + for (i = 0; i < size; i++) + ret = (ret << 8) | ptr[size-i-1]; + return ret; +} + +#define ENDIAN_CONVERT(x) \ + x = (typeof(x))read_int((unsigned char *)&x, sizeof(x)) + + +/* Small range coder implementation for lzma. + *Copyright (C) 2006 Aurelien Jacobs < aurel@gnuage.org > + * + *Based on LzmaDecode.c from the LZMA SDK 4.22 (http://www.7-zip.org/) + *Copyright (c) 1999-2005 Igor Pavlov + */ + +#include + +#define LZMA_IOBUF_SIZE 0x10000 + +struct rc { + long (*fill)(void*, unsigned long); + uint8_t *ptr; + uint8_t *buffer; + uint8_t *buffer_end; + long buffer_size; + uint32_t code; + uint32_t range; + uint32_t bound; + void (*error)(char *); +}; + + +#define RC_TOP_BITS 24 +#define RC_MOVE_BITS 5 +#define RC_MODEL_TOTAL_BITS 11 + + +static long INIT nofill(void *buffer, unsigned long len) +{ + return -1; +} + +/* Called twice: once at startup and once in rc_normalize() */ +static void INIT rc_read(struct rc *rc) +{ + rc->buffer_size = rc->fill((char *)rc->buffer, LZMA_IOBUF_SIZE); + if (rc->buffer_size <= 0) + rc->error("unexpected EOF"); + rc->ptr = rc->buffer; + rc->buffer_end = rc->buffer + rc->buffer_size; +} + +/* Called once */ +static inline void INIT rc_init(struct rc *rc, + long (*fill)(void*, unsigned long), + char *buffer, long buffer_size) +{ + if (fill) + rc->fill = fill; + else + rc->fill = nofill; + rc->buffer = (uint8_t *)buffer; + rc->buffer_size = buffer_size; + rc->buffer_end = rc->buffer + rc->buffer_size; + rc->ptr = rc->buffer; + + rc->code = 0; + rc->range = 0xFFFFFFFF; +} + +static inline void INIT rc_init_code(struct rc *rc) +{ + int i; + + for (i = 0; i < 5; i++) { + if (rc->ptr >= rc->buffer_end) + rc_read(rc); + rc->code = (rc->code << 8) | *rc->ptr++; + } +} + + +/* Called twice, but one callsite is in inline'd rc_is_bit_0_helper() */ +static void INIT rc_do_normalize(struct rc *rc) +{ + if (rc->ptr >= rc->buffer_end) + rc_read(rc); + rc->range <<= 8; + rc->code = (rc->code << 8) | *rc->ptr++; +} +static inline void INIT rc_normalize(struct rc *rc) +{ + if (rc->range < (1 << RC_TOP_BITS)) + rc_do_normalize(rc); +} + +/* Called 9 times */ +/* Why rc_is_bit_0_helper exists? + *Because we want to always expose (rc->code < rc->bound) to optimizer + */ +static inline uint32_t INIT rc_is_bit_0_helper(struct rc *rc, uint16_t *p) +{ + rc_normalize(rc); + rc->bound = *p * (rc->range >> RC_MODEL_TOTAL_BITS); + return rc->bound; +} +static inline int INIT rc_is_bit_0(struct rc *rc, uint16_t *p) +{ + uint32_t t = rc_is_bit_0_helper(rc, p); + return rc->code < t; +} + +/* Called ~10 times, but very small, thus inlined */ +static inline void INIT rc_update_bit_0(struct rc *rc, uint16_t *p) +{ + rc->range = rc->bound; + *p += ((1 << RC_MODEL_TOTAL_BITS) - *p) >> RC_MOVE_BITS; +} +static inline void INIT rc_update_bit_1(struct rc *rc, uint16_t *p) +{ + rc->range -= rc->bound; + rc->code -= rc->bound; + *p -= *p >> RC_MOVE_BITS; +} + +/* Called 4 times in unlzma loop */ +static int INIT rc_get_bit(struct rc *rc, uint16_t *p, int *symbol) +{ + if (rc_is_bit_0(rc, p)) { + rc_update_bit_0(rc, p); + *symbol *= 2; + return 0; + } else { + rc_update_bit_1(rc, p); + *symbol = *symbol * 2 + 1; + return 1; + } +} + +/* Called once */ +static inline int INIT rc_direct_bit(struct rc *rc) +{ + rc_normalize(rc); + rc->range >>= 1; + if (rc->code >= rc->range) { + rc->code -= rc->range; + return 1; + } + return 0; +} + +/* Called twice */ +static inline void INIT +rc_bit_tree_decode(struct rc *rc, uint16_t *p, int num_levels, int *symbol) +{ + int i = num_levels; + + *symbol = 1; + while (i--) + rc_get_bit(rc, p + *symbol, symbol); + *symbol -= 1 << num_levels; +} + + +/* + * Small lzma deflate implementation. + * Copyright (C) 2006 Aurelien Jacobs < aurel@gnuage.org > + * + * Based on LzmaDecode.c from the LZMA SDK 4.22 (http://www.7-zip.org/) + * Copyright (C) 1999-2005 Igor Pavlov + */ + + +struct lzma_header { + uint8_t pos; + uint32_t dict_size; + uint64_t dst_size; +} __attribute__ ((packed)) ; + + +#define LZMA_BASE_SIZE 1846 +#define LZMA_LIT_SIZE 768 + +#define LZMA_NUM_POS_BITS_MAX 4 + +#define LZMA_LEN_NUM_LOW_BITS 3 +#define LZMA_LEN_NUM_MID_BITS 3 +#define LZMA_LEN_NUM_HIGH_BITS 8 + +#define LZMA_LEN_CHOICE 0 +#define LZMA_LEN_CHOICE_2 (LZMA_LEN_CHOICE + 1) +#define LZMA_LEN_LOW (LZMA_LEN_CHOICE_2 + 1) +#define LZMA_LEN_MID (LZMA_LEN_LOW \ + + (1 << (LZMA_NUM_POS_BITS_MAX + LZMA_LEN_NUM_LOW_BITS))) +#define LZMA_LEN_HIGH (LZMA_LEN_MID \ + +(1 << (LZMA_NUM_POS_BITS_MAX + LZMA_LEN_NUM_MID_BITS))) +#define LZMA_NUM_LEN_PROBS (LZMA_LEN_HIGH + (1 << LZMA_LEN_NUM_HIGH_BITS)) + +#define LZMA_NUM_STATES 12 +#define LZMA_NUM_LIT_STATES 7 + +#define LZMA_START_POS_MODEL_INDEX 4 +#define LZMA_END_POS_MODEL_INDEX 14 +#define LZMA_NUM_FULL_DISTANCES (1 << (LZMA_END_POS_MODEL_INDEX >> 1)) + +#define LZMA_NUM_POS_SLOT_BITS 6 +#define LZMA_NUM_LEN_TO_POS_STATES 4 + +#define LZMA_NUM_ALIGN_BITS 4 + +#define LZMA_MATCH_MIN_LEN 2 + +#define LZMA_IS_MATCH 0 +#define LZMA_IS_REP (LZMA_IS_MATCH + (LZMA_NUM_STATES << LZMA_NUM_POS_BITS_MAX)) +#define LZMA_IS_REP_G0 (LZMA_IS_REP + LZMA_NUM_STATES) +#define LZMA_IS_REP_G1 (LZMA_IS_REP_G0 + LZMA_NUM_STATES) +#define LZMA_IS_REP_G2 (LZMA_IS_REP_G1 + LZMA_NUM_STATES) +#define LZMA_IS_REP_0_LONG (LZMA_IS_REP_G2 + LZMA_NUM_STATES) +#define LZMA_POS_SLOT (LZMA_IS_REP_0_LONG \ + + (LZMA_NUM_STATES << LZMA_NUM_POS_BITS_MAX)) +#define LZMA_SPEC_POS (LZMA_POS_SLOT \ + +(LZMA_NUM_LEN_TO_POS_STATES << LZMA_NUM_POS_SLOT_BITS)) +#define LZMA_ALIGN (LZMA_SPEC_POS \ + + LZMA_NUM_FULL_DISTANCES - LZMA_END_POS_MODEL_INDEX) +#define LZMA_LEN_CODER (LZMA_ALIGN + (1 << LZMA_NUM_ALIGN_BITS)) +#define LZMA_REP_LEN_CODER (LZMA_LEN_CODER + LZMA_NUM_LEN_PROBS) +#define LZMA_LITERAL (LZMA_REP_LEN_CODER + LZMA_NUM_LEN_PROBS) + + +struct writer { + uint8_t *buffer; + uint8_t previous_byte; + size_t buffer_pos; + int bufsize; + size_t global_pos; + long (*flush)(void*, unsigned long); + struct lzma_header *header; +}; + +struct cstate { + int state; + uint32_t rep0, rep1, rep2, rep3; +}; + +static inline size_t INIT get_pos(struct writer *wr) +{ + return + wr->global_pos + wr->buffer_pos; +} + +static inline uint8_t INIT peek_old_byte(struct writer *wr, + uint32_t offs) +{ + if (!wr->flush) { + int32_t pos; + while (offs > wr->header->dict_size) + offs -= wr->header->dict_size; + pos = wr->buffer_pos - offs; + return wr->buffer[pos]; + } else { + uint32_t pos = wr->buffer_pos - offs; + while (pos >= wr->header->dict_size) + pos += wr->header->dict_size; + return wr->buffer[pos]; + } + +} + +static inline int INIT write_byte(struct writer *wr, uint8_t byte) +{ + wr->buffer[wr->buffer_pos++] = wr->previous_byte = byte; + if (wr->flush && wr->buffer_pos == wr->header->dict_size) { + wr->buffer_pos = 0; + wr->global_pos += wr->header->dict_size; + if (wr->flush((char *)wr->buffer, wr->header->dict_size) + != wr->header->dict_size) + return -1; + } + return 0; +} + + +static inline int INIT copy_byte(struct writer *wr, uint32_t offs) +{ + return write_byte(wr, peek_old_byte(wr, offs)); +} + +static inline int INIT copy_bytes(struct writer *wr, + uint32_t rep0, int len) +{ + do { + if (copy_byte(wr, rep0)) + return -1; + len--; + } while (len != 0 && wr->buffer_pos < wr->header->dst_size); + + return len; +} + +static inline int INIT process_bit0(struct writer *wr, struct rc *rc, + struct cstate *cst, uint16_t *p, + int pos_state, uint16_t *prob, + int lc, uint32_t literal_pos_mask) { + int mi = 1; + rc_update_bit_0(rc, prob); + prob = (p + LZMA_LITERAL + + (LZMA_LIT_SIZE + * (((get_pos(wr) & literal_pos_mask) << lc) + + (wr->previous_byte >> (8 - lc)))) + ); + + if (cst->state >= LZMA_NUM_LIT_STATES) { + int match_byte = peek_old_byte(wr, cst->rep0); + do { + int bit; + uint16_t *prob_lit; + + match_byte <<= 1; + bit = match_byte & 0x100; + prob_lit = prob + 0x100 + bit + mi; + if (rc_get_bit(rc, prob_lit, &mi)) { + if (!bit) + break; + } else { + if (bit) + break; + } + } while (mi < 0x100); + } + while (mi < 0x100) { + uint16_t *prob_lit = prob + mi; + rc_get_bit(rc, prob_lit, &mi); + } + if (cst->state < 4) + cst->state = 0; + else if (cst->state < 10) + cst->state -= 3; + else + cst->state -= 6; + + return write_byte(wr, mi); +} + +static inline int INIT process_bit1(struct writer *wr, struct rc *rc, + struct cstate *cst, uint16_t *p, + int pos_state, uint16_t *prob) { + int offset; + uint16_t *prob_len; + int num_bits; + int len; + + rc_update_bit_1(rc, prob); + prob = p + LZMA_IS_REP + cst->state; + if (rc_is_bit_0(rc, prob)) { + rc_update_bit_0(rc, prob); + cst->rep3 = cst->rep2; + cst->rep2 = cst->rep1; + cst->rep1 = cst->rep0; + cst->state = cst->state < LZMA_NUM_LIT_STATES ? 0 : 3; + prob = p + LZMA_LEN_CODER; + } else { + rc_update_bit_1(rc, prob); + prob = p + LZMA_IS_REP_G0 + cst->state; + if (rc_is_bit_0(rc, prob)) { + rc_update_bit_0(rc, prob); + prob = (p + LZMA_IS_REP_0_LONG + + (cst->state << + LZMA_NUM_POS_BITS_MAX) + + pos_state); + if (rc_is_bit_0(rc, prob)) { + rc_update_bit_0(rc, prob); + + cst->state = cst->state < LZMA_NUM_LIT_STATES ? + 9 : 11; + return copy_byte(wr, cst->rep0); + } else { + rc_update_bit_1(rc, prob); + } + } else { + uint32_t distance; + + rc_update_bit_1(rc, prob); + prob = p + LZMA_IS_REP_G1 + cst->state; + if (rc_is_bit_0(rc, prob)) { + rc_update_bit_0(rc, prob); + distance = cst->rep1; + } else { + rc_update_bit_1(rc, prob); + prob = p + LZMA_IS_REP_G2 + cst->state; + if (rc_is_bit_0(rc, prob)) { + rc_update_bit_0(rc, prob); + distance = cst->rep2; + } else { + rc_update_bit_1(rc, prob); + distance = cst->rep3; + cst->rep3 = cst->rep2; + } + cst->rep2 = cst->rep1; + } + cst->rep1 = cst->rep0; + cst->rep0 = distance; + } + cst->state = cst->state < LZMA_NUM_LIT_STATES ? 8 : 11; + prob = p + LZMA_REP_LEN_CODER; + } + + prob_len = prob + LZMA_LEN_CHOICE; + if (rc_is_bit_0(rc, prob_len)) { + rc_update_bit_0(rc, prob_len); + prob_len = (prob + LZMA_LEN_LOW + + (pos_state << + LZMA_LEN_NUM_LOW_BITS)); + offset = 0; + num_bits = LZMA_LEN_NUM_LOW_BITS; + } else { + rc_update_bit_1(rc, prob_len); + prob_len = prob + LZMA_LEN_CHOICE_2; + if (rc_is_bit_0(rc, prob_len)) { + rc_update_bit_0(rc, prob_len); + prob_len = (prob + LZMA_LEN_MID + + (pos_state << + LZMA_LEN_NUM_MID_BITS)); + offset = 1 << LZMA_LEN_NUM_LOW_BITS; + num_bits = LZMA_LEN_NUM_MID_BITS; + } else { + rc_update_bit_1(rc, prob_len); + prob_len = prob + LZMA_LEN_HIGH; + offset = ((1 << LZMA_LEN_NUM_LOW_BITS) + + (1 << LZMA_LEN_NUM_MID_BITS)); + num_bits = LZMA_LEN_NUM_HIGH_BITS; + } + } + + rc_bit_tree_decode(rc, prob_len, num_bits, &len); + len += offset; + + if (cst->state < 4) { + int pos_slot; + + cst->state += LZMA_NUM_LIT_STATES; + prob = + p + LZMA_POS_SLOT + + ((len < + LZMA_NUM_LEN_TO_POS_STATES ? len : + LZMA_NUM_LEN_TO_POS_STATES - 1) + << LZMA_NUM_POS_SLOT_BITS); + rc_bit_tree_decode(rc, prob, + LZMA_NUM_POS_SLOT_BITS, + &pos_slot); + if (pos_slot >= LZMA_START_POS_MODEL_INDEX) { + int i, mi; + num_bits = (pos_slot >> 1) - 1; + cst->rep0 = 2 | (pos_slot & 1); + if (pos_slot < LZMA_END_POS_MODEL_INDEX) { + cst->rep0 <<= num_bits; + prob = p + LZMA_SPEC_POS + + cst->rep0 - pos_slot - 1; + } else { + num_bits -= LZMA_NUM_ALIGN_BITS; + while (num_bits--) + cst->rep0 = (cst->rep0 << 1) | + rc_direct_bit(rc); + prob = p + LZMA_ALIGN; + cst->rep0 <<= LZMA_NUM_ALIGN_BITS; + num_bits = LZMA_NUM_ALIGN_BITS; + } + i = 1; + mi = 1; + while (num_bits--) { + if (rc_get_bit(rc, prob + mi, &mi)) + cst->rep0 |= i; + i <<= 1; + } + } else + cst->rep0 = pos_slot; + if (++(cst->rep0) == 0) + return 0; + if (cst->rep0 > wr->header->dict_size + || cst->rep0 > get_pos(wr)) + return -1; + } + + len += LZMA_MATCH_MIN_LEN; + + return copy_bytes(wr, cst->rep0, len); +} + + +STATIC inline int INIT unlzma(unsigned char *buf, long in_len, + long (*fill)(void*, unsigned long), + long (*flush)(void*, unsigned long), + unsigned char *output, + long *posp, + void(*error)(char *x) + ) +{ + struct lzma_header header; + int lc, pb, lp; + uint32_t pos_state_mask; + uint32_t literal_pos_mask; + uint16_t *p; + int num_probs; + struct rc rc; + int i, mi; + struct writer wr; + struct cstate cst; + unsigned char *inbuf; + int ret = -1; + + rc.error = error; + + if (buf) + inbuf = buf; + else + inbuf = malloc(LZMA_IOBUF_SIZE); + if (!inbuf) { + error("Could not allocate input buffer"); + goto exit_0; + } + + cst.state = 0; + cst.rep0 = cst.rep1 = cst.rep2 = cst.rep3 = 1; + + wr.header = &header; + wr.flush = flush; + wr.global_pos = 0; + wr.previous_byte = 0; + wr.buffer_pos = 0; + + rc_init(&rc, fill, inbuf, in_len); + + for (i = 0; i < sizeof(header); i++) { + if (rc.ptr >= rc.buffer_end) + rc_read(&rc); + ((unsigned char *)&header)[i] = *rc.ptr++; + } + + if (header.pos >= (9 * 5 * 5)) { + error("bad header"); + goto exit_1; + } + + mi = 0; + lc = header.pos; + while (lc >= 9) { + mi++; + lc -= 9; + } + pb = 0; + lp = mi; + while (lp >= 5) { + pb++; + lp -= 5; + } + pos_state_mask = (1 << pb) - 1; + literal_pos_mask = (1 << lp) - 1; + + ENDIAN_CONVERT(header.dict_size); + ENDIAN_CONVERT(header.dst_size); + + if (header.dict_size == 0) + header.dict_size = 1; + + if (output) + wr.buffer = output; + else { + wr.bufsize = MIN(header.dst_size, header.dict_size); + wr.buffer = large_malloc(wr.bufsize); + } + if (wr.buffer == NULL) + goto exit_1; + + num_probs = LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)); + p = (uint16_t *) large_malloc(num_probs * sizeof(*p)); + if (p == NULL) + goto exit_2; + num_probs = LZMA_LITERAL + (LZMA_LIT_SIZE << (lc + lp)); + for (i = 0; i < num_probs; i++) + p[i] = (1 << RC_MODEL_TOTAL_BITS) >> 1; + + rc_init_code(&rc); + + while (get_pos(&wr) < header.dst_size) { + int pos_state = get_pos(&wr) & pos_state_mask; + uint16_t *prob = p + LZMA_IS_MATCH + + (cst.state << LZMA_NUM_POS_BITS_MAX) + pos_state; + if (rc_is_bit_0(&rc, prob)) { + if (process_bit0(&wr, &rc, &cst, p, pos_state, prob, + lc, literal_pos_mask)) { + error("LZMA data is corrupt"); + goto exit_3; + } + } else { + if (process_bit1(&wr, &rc, &cst, p, pos_state, prob)) { + error("LZMA data is corrupt"); + goto exit_3; + } + if (cst.rep0 == 0) + break; + } + if (rc.buffer_size <= 0) + goto exit_3; + } + + if (posp) + *posp = rc.ptr-rc.buffer; + if (!wr.flush || wr.flush(wr.buffer, wr.buffer_pos) == wr.buffer_pos) + ret = 0; +exit_3: + large_free(p); +exit_2: + if (!output) + large_free(wr.buffer); +exit_1: + if (!buf) + free(inbuf); +exit_0: + return ret; +} + +#ifdef PREBOOT +STATIC int INIT __decompress(unsigned char *buf, long in_len, + long (*fill)(void*, unsigned long), + long (*flush)(void*, unsigned long), + unsigned char *output, long out_len, + long *posp, + void (*error)(char *x)) +{ + return unlzma(buf, in_len - 4, fill, flush, output, posp, error); +} +#endif \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/lib/decompress_unlzma.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/lib/decompress_unlzma.c.yml new file mode 100644 index 00000000000..ad6abc82f89 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/lib/decompress_unlzma.c.yml @@ -0,0 +1,20 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006 Alain alain@knaff.lu + - Copyright (c) 2006 Aurelien Jacobs aurel@gnuage.org + - Copyright (c) 1999-2005 Igor Pavlov + - Copyright (c) 2006 Aurelien Jacobs aurel@gnuage.org + - Copyright (c) 1999-2005 Igor Pavlov + - Copyright (c) 2006 Aurelien Jacobs aurel@gnuage.org + - Copyright (c) 1999-2005 Igor Pavlov +holders: + - Alain + - Aurelien Jacobs + - Igor Pavlov + - Aurelien Jacobs + - Igor Pavlov + - Aurelien Jacobs + - Igor Pavlov diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/lib/inflate.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/lib/inflate.c new file mode 100644 index 00000000000..ee5259f9531 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/lib/inflate.c @@ -0,0 +1,1303 @@ +// SPDX-License-Identifier: GPL-2.0 +#define DEBG(x) +#define DEBG1(x) +/* inflate.c -- Not copyrighted 1992 by Mark Adler + version c10p1, 10 January 1993 */ + +/* + * Adapted for booting Linux by Hannu Savolainen 1993 + * based on gzip-1.0.3 + * + * Nicolas Pitre , 1999/04/14 : + * Little mods for all variable to reside either into rodata or bss segments + * by marking constant variables with 'const' and initializing all the others + * at run-time only. This allows for the kernel uncompressor to run + * directly from Flash or ROM memory on embedded systems. + */ + +/* + Inflate deflated (PKZIP's method 8 compressed) data. The compression + method searches for as much of the current string of bytes (up to a + length of 258) in the previous 32 K bytes. If it doesn't find any + matches (of at least length 3), it codes the next byte. Otherwise, it + codes the length of the matched string and its distance backwards from + the current position. There is a single Huffman code that codes both + single bytes (called "literals") and match lengths. A second Huffman + code codes the distance information, which follows a length code. Each + length or distance code actually represents a base value and a number + of "extra" (sometimes zero) bits to get to add to the base value. At + the end of each deflated block is a special end-of-block (EOB) literal/ + length code. The decoding process is basically: get a literal/length + code; if EOB then done; if a literal, emit the decoded byte; if a + length then get the distance and emit the referred-to bytes from the + sliding window of previously emitted data. + + There are (currently) three kinds of inflate blocks: stored, fixed, and + dynamic. The compressor deals with some chunk of data at a time, and + decides which method to use on a chunk-by-chunk basis. A chunk might + typically be 32 K or 64 K. If the chunk is incompressible, then the + "stored" method is used. In this case, the bytes are simply stored as + is, eight bits per byte, with none of the above coding. The bytes are + preceded by a count, since there is no longer an EOB code. + + If the data is compressible, then either the fixed or dynamic methods + are used. In the dynamic method, the compressed data is preceded by + an encoding of the literal/length and distance Huffman codes that are + to be used to decode this block. The representation is itself Huffman + coded, and so is preceded by a description of that code. These code + descriptions take up a little space, and so for small blocks, there is + a predefined set of codes, called the fixed codes. The fixed method is + used if the block codes up smaller that way (usually for quite small + chunks), otherwise the dynamic method is used. In the latter case, the + codes are customized to the probabilities in the current block, and so + can code it much better than the pre-determined fixed codes. + + The Huffman codes themselves are decoded using a multi-level table + lookup, in order to maximize the speed of decoding plus the speed of + building the decoding tables. See the comments below that precede the + lbits and dbits tuning parameters. + */ + + +/* + Notes beyond the 1.93a appnote.txt: + + 1. Distance pointers never point before the beginning of the output + stream. + 2. Distance pointers can point back across blocks, up to 32k away. + 3. There is an implied maximum of 7 bits for the bit length table and + 15 bits for the actual data. + 4. If only one code exists, then it is encoded using one bit. (Zero + would be more efficient, but perhaps a little confusing.) If two + codes exist, they are coded using one bit each (0 and 1). + 5. There is no way of sending zero distance codes--a dummy must be + sent if there are none. (History: a pre 2.0 version of PKZIP would + store blocks with no distance codes, but this was discovered to be + too harsh a criterion.) Valid only for 1.93a. 2.04c does allow + zero distance codes, which is sent as one code of zero bits in + length. + 6. There are up to 286 literal/length codes. Code 256 represents the + end-of-block. Note however that the static length tree defines + 288 codes just to fill out the Huffman codes. Codes 286 and 287 + cannot be used though, since there is no length base or extra bits + defined for them. Similarly, there are up to 30 distance codes. + However, static trees define 32 codes (all 5 bits) to fill out the + Huffman codes, but the last two had better not show up in the data. + 7. Unzip can check dynamic Huffman blocks for complete code sets. + The exception is that a single code would not be complete (see #4). + 8. The five bits following the block type is really the number of + literal codes sent minus 257. + 9. Length codes 8,16,16 are interpreted as 13 length codes of 8 bits + (1+6+6). Therefore, to output three times the length, you output + three codes (1+1+1), whereas to output four times the same length, + you only need two codes (1+3). Hmm. + 10. In the tree reconstruction algorithm, Code = Code + Increment + only if BitLength(i) is not zero. (Pretty obvious.) + 11. Correction: 4 Bits: # of Bit Length codes - 4 (4 - 19) + 12. Note: length code 284 can represent 227-258, but length code 285 + really is 258. The last length deserves its own, short code + since it gets used a lot in very redundant files. The length + 258 is special since 258 - 3 (the min match length) is 255. + 13. The literal/length and distance code bit lengths are read as a + single stream of lengths. It is possible (and advantageous) for + a repeat code (16, 17, or 18) to go across the boundary between + the two sets of lengths. + */ +#include +#ifdef NO_INFLATE_MALLOC +#include +#endif + +#ifdef RCSID +static char rcsid[] = "#Id: inflate.c,v 0.14 1993/06/10 13:27:04 jloup Exp #"; +#endif + +#ifndef STATIC + +#if defined(STDC_HEADERS) || defined(HAVE_STDLIB_H) +# include +# include +#endif + +#include "gzip.h" +#define STATIC +#endif /* !STATIC */ + +#ifndef INIT +#define INIT +#endif + +#define slide window + +/* Huffman code lookup table entry--this entry is four bytes for machines + that have 16-bit pointers (e.g. PC's in the small or medium model). + Valid extra bits are 0..13. e == 15 is EOB (end of block), e == 16 + means that v is a literal, 16 < e < 32 means that v is a pointer to + the next table, which codes e - 16 bits, and lastly e == 99 indicates + an unused code. If a code with e == 99 is looked up, this implies an + error in the data. */ +struct huft { + uch e; /* number of extra bits or operation */ + uch b; /* number of bits in this code or subcode */ + union { + ush n; /* literal, length base, or distance base */ + struct huft *t; /* pointer to next level of table */ + } v; +}; + + +/* Function prototypes */ +STATIC int INIT huft_build OF((unsigned *, unsigned, unsigned, + const ush *, const ush *, struct huft **, int *)); +STATIC int INIT huft_free OF((struct huft *)); +STATIC int INIT inflate_codes OF((struct huft *, struct huft *, int, int)); +STATIC int INIT inflate_stored OF((void)); +STATIC int INIT inflate_fixed OF((void)); +STATIC int INIT inflate_dynamic OF((void)); +STATIC int INIT inflate_block OF((int *)); +STATIC int INIT inflate OF((void)); + + +/* The inflate algorithm uses a sliding 32 K byte window on the uncompressed + stream to find repeated byte strings. This is implemented here as a + circular buffer. The index is updated simply by incrementing and then + ANDing with 0x7fff (32K-1). */ +/* It is left to other modules to supply the 32 K area. It is assumed + to be usable as if it were declared "uch slide[32768];" or as just + "uch *slide;" and then malloc'ed in the latter case. The definition + must be in unzip.h, included above. */ +/* unsigned wp; current position in slide */ +#define wp outcnt +#define flush_output(w) (wp=(w),flush_window()) + +/* Tables for deflate from PKZIP's appnote.txt. */ +static const unsigned border[] = { /* Order of the bit length code lengths */ + 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; +static const ush cplens[] = { /* Copy lengths for literal codes 257..285 */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; + /* note: see note #13 above about the 258 in this list. */ +static const ush cplext[] = { /* Extra bits for literal codes 257..285 */ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, + 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99}; /* 99==invalid */ +static const ush cpdist[] = { /* Copy offsets for distance codes 0..29 */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577}; +static const ush cpdext[] = { /* Extra bits for distance codes */ + 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, + 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, + 12, 12, 13, 13}; + + +/* Macros for inflate() bit peeking and grabbing. + The usage is: + + NEEDBITS(j) + x = b & mask_bits[j]; + DUMPBITS(j) + + where NEEDBITS makes sure that b has at least j bits in it, and + DUMPBITS removes the bits from b. The macros use the variable k + for the number of bits in b. Normally, b and k are register + variables for speed, and are initialized at the beginning of a + routine that uses these macros from a global bit buffer and count. + + If we assume that EOB will be the longest code, then we will never + ask for bits with NEEDBITS that are beyond the end of the stream. + So, NEEDBITS should not read any more bytes than are needed to + meet the request. Then no bytes need to be "returned" to the buffer + at the end of the last block. + + However, this assumption is not true for fixed blocks--the EOB code + is 7 bits, but the other literal/length codes can be 8 or 9 bits. + (The EOB code is shorter than other codes because fixed blocks are + generally short. So, while a block always has an EOB, many other + literal/length codes have a significantly lower probability of + showing up at all.) However, by making the first table have a + lookup of seven bits, the EOB code will be found in that first + lookup, and so will not require that too many bits be pulled from + the stream. + */ + +STATIC ulg bb; /* bit buffer */ +STATIC unsigned bk; /* bits in bit buffer */ + +STATIC const ush mask_bits[] = { + 0x0000, + 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, + 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff +}; + +#define NEXTBYTE() ({ int v = get_byte(); if (v < 0) goto underrun; (uch)v; }) +#define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE())<>=(n);k-=(n);} + +#ifndef NO_INFLATE_MALLOC +/* A trivial malloc implementation, adapted from + * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994 + */ + +static unsigned long malloc_ptr; +static int malloc_count; + +static void *malloc(int size) +{ + void *p; + + if (size < 0) + error("Malloc error"); + if (!malloc_ptr) + malloc_ptr = free_mem_ptr; + + malloc_ptr = (malloc_ptr + 3) & ~3; /* Align */ + + p = (void *)malloc_ptr; + malloc_ptr += size; + + if (free_mem_end_ptr && malloc_ptr >= free_mem_end_ptr) + error("Out of memory"); + + malloc_count++; + return p; +} + +static void free(void *where) +{ + malloc_count--; + if (!malloc_count) + malloc_ptr = free_mem_ptr; +} +#else +#define malloc(a) kmalloc(a, GFP_KERNEL) +#define free(a) kfree(a) +#endif + +/* + Huffman code decoding is performed using a multi-level table lookup. + The fastest way to decode is to simply build a lookup table whose + size is determined by the longest code. However, the time it takes + to build this table can also be a factor if the data being decoded + is not very long. The most common codes are necessarily the + shortest codes, so those codes dominate the decoding time, and hence + the speed. The idea is you can have a shorter table that decodes the + shorter, more probable codes, and then point to subsidiary tables for + the longer codes. The time it costs to decode the longer codes is + then traded against the time it takes to make longer tables. + + This results of this trade are in the variables lbits and dbits + below. lbits is the number of bits the first level table for literal/ + length codes can decode in one step, and dbits is the same thing for + the distance codes. Subsequent tables are also less than or equal to + those sizes. These values may be adjusted either when all of the + codes are shorter than that, in which case the longest code length in + bits is used, or when the shortest code is *longer* than the requested + table size, in which case the length of the shortest code in bits is + used. + + There are two different values for the two tables, since they code a + different number of possibilities each. The literal/length table + codes 286 possible values, or in a flat code, a little over eight + bits. The distance table codes 30 possible values, or a little less + than five bits, flat. The optimum values for speed end up being + about one bit more than those, so lbits is 8+1 and dbits is 5+1. + The optimum values may differ though from machine to machine, and + possibly even between compilers. Your mileage may vary. + */ + + +STATIC const int lbits = 9; /* bits in base literal/length lookup table */ +STATIC const int dbits = 6; /* bits in base distance lookup table */ + + +/* If BMAX needs to be larger than 16, then h and x[] should be ulg. */ +#define BMAX 16 /* maximum bit length of any code (16 for explode) */ +#define N_MAX 288 /* maximum number of codes in any set */ + + +STATIC unsigned hufts; /* track memory usage */ + + +STATIC int INIT huft_build( + unsigned *b, /* code lengths in bits (all assumed <= BMAX) */ + unsigned n, /* number of codes (assumed <= N_MAX) */ + unsigned s, /* number of simple-valued codes (0..s-1) */ + const ush *d, /* list of base values for non-simple codes */ + const ush *e, /* list of extra bits for non-simple codes */ + struct huft **t, /* result: starting table */ + int *m /* maximum lookup bits, returns actual */ + ) +/* Given a list of code lengths and a maximum table size, make a set of + tables to decode that set of codes. Return zero on success, one if + the given code set is incomplete (the tables are still built in this + case), two if the input is invalid (all zero length codes or an + oversubscribed set of lengths), and three if not enough memory. */ +{ + unsigned a; /* counter for codes of length k */ + unsigned f; /* i repeats in table every f entries */ + int g; /* maximum code length */ + int h; /* table level */ + register unsigned i; /* counter, current code */ + register unsigned j; /* counter */ + register int k; /* number of bits in current code */ + int l; /* bits per table (returned in m) */ + register unsigned *p; /* pointer into c[], b[], or v[] */ + register struct huft *q; /* points to current table */ + struct huft r; /* table entry for structure assignment */ + register int w; /* bits before this table == (l * h) */ + unsigned *xp; /* pointer into x */ + int y; /* number of dummy codes added */ + unsigned z; /* number of entries in current table */ + struct { + unsigned c[BMAX+1]; /* bit length count table */ + struct huft *u[BMAX]; /* table stack */ + unsigned v[N_MAX]; /* values in order of bit length */ + unsigned x[BMAX+1]; /* bit offsets, then code stack */ + } *stk; + unsigned *c, *v, *x; + struct huft **u; + int ret; + +DEBG("huft1 "); + + stk = malloc(sizeof(*stk)); + if (stk == NULL) + return 3; /* out of memory */ + + c = stk->c; + v = stk->v; + x = stk->x; + u = stk->u; + + /* Generate counts for each bit length */ + memzero(stk->c, sizeof(stk->c)); + p = b; i = n; + do { + Tracecv(*p, (stderr, (n-i >= ' ' && n-i <= '~' ? "%c %d\n" : "0x%x %d\n"), + n-i, *p)); + c[*p]++; /* assume all entries <= BMAX */ + p++; /* Can't combine with above line (Solaris bug) */ + } while (--i); + if (c[0] == n) /* null input--all zero length codes */ + { + *t = (struct huft *)NULL; + *m = 0; + ret = 2; + goto out; + } + +DEBG("huft2 "); + + /* Find minimum and maximum length, bound *m by those */ + l = *m; + for (j = 1; j <= BMAX; j++) + if (c[j]) + break; + k = j; /* minimum code length */ + if ((unsigned)l < j) + l = j; + for (i = BMAX; i; i--) + if (c[i]) + break; + g = i; /* maximum code length */ + if ((unsigned)l > i) + l = i; + *m = l; + +DEBG("huft3 "); + + /* Adjust last length count to fill out codes, if needed */ + for (y = 1 << j; j < i; j++, y <<= 1) + if ((y -= c[j]) < 0) { + ret = 2; /* bad input: more codes than bits */ + goto out; + } + if ((y -= c[i]) < 0) { + ret = 2; + goto out; + } + c[i] += y; + +DEBG("huft4 "); + + /* Generate starting offsets into the value table for each length */ + x[1] = j = 0; + p = c + 1; xp = x + 2; + while (--i) { /* note that i == g from above */ + *xp++ = (j += *p++); + } + +DEBG("huft5 "); + + /* Make a table of values in order of bit lengths */ + p = b; i = 0; + do { + if ((j = *p++) != 0) + v[x[j]++] = i; + } while (++i < n); + n = x[g]; /* set n to length of v */ + +DEBG("h6 "); + + /* Generate the Huffman codes and for each, make the table entries */ + x[0] = i = 0; /* first Huffman code is zero */ + p = v; /* grab values in bit order */ + h = -1; /* no tables yet--level -1 */ + w = -l; /* bits decoded == (l * h) */ + u[0] = (struct huft *)NULL; /* just to keep compilers happy */ + q = (struct huft *)NULL; /* ditto */ + z = 0; /* ditto */ +DEBG("h6a "); + + /* go through the bit lengths (k already is bits in shortest code) */ + for (; k <= g; k++) + { +DEBG("h6b "); + a = c[k]; + while (a--) + { +DEBG("h6b1 "); + /* here i is the Huffman code of length k bits for value *p */ + /* make tables up to required level */ + while (k > w + l) + { +DEBG1("1 "); + h++; + w += l; /* previous table always l bits */ + + /* compute minimum size table less than or equal to l bits */ + z = (z = g - w) > (unsigned)l ? l : z; /* upper limit on table size */ + if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ + { /* too few codes for k-w bit table */ +DEBG1("2 "); + f -= a + 1; /* deduct codes from patterns left */ + xp = c + k; + if (j < z) + while (++j < z) /* try smaller tables up to z bits */ + { + if ((f <<= 1) <= *++xp) + break; /* enough codes to use up j bits */ + f -= *xp; /* else deduct codes from patterns */ + } + } +DEBG1("3 "); + z = 1 << j; /* table entries for j-bit table */ + + /* allocate and link in new table */ + if ((q = (struct huft *)malloc((z + 1)*sizeof(struct huft))) == + (struct huft *)NULL) + { + if (h) + huft_free(u[0]); + ret = 3; /* not enough memory */ + goto out; + } +DEBG1("4 "); + hufts += z + 1; /* track memory usage */ + *t = q + 1; /* link to list for huft_free() */ + *(t = &(q->v.t)) = (struct huft *)NULL; + u[h] = ++q; /* table starts after link */ + +DEBG1("5 "); + /* connect to last table, if there is one */ + if (h) + { + x[h] = i; /* save pattern for backing up */ + r.b = (uch)l; /* bits to dump before this table */ + r.e = (uch)(16 + j); /* bits in this table */ + r.v.t = q; /* pointer to this table */ + j = i >> (w - l); /* (get around Turbo C bug) */ + u[h-1][j] = r; /* connect to last table */ + } +DEBG1("6 "); + } +DEBG("h6c "); + + /* set up table entry in r */ + r.b = (uch)(k - w); + if (p >= v + n) + r.e = 99; /* out of values--invalid code */ + else if (*p < s) + { + r.e = (uch)(*p < 256 ? 16 : 15); /* 256 is end-of-block code */ + r.v.n = (ush)(*p); /* simple code is just the value */ + p++; /* one compiler does not like *p++ */ + } + else + { + r.e = (uch)e[*p - s]; /* non-simple--look up in lists */ + r.v.n = d[*p++ - s]; + } +DEBG("h6d "); + + /* fill code-like entries with r */ + f = 1 << (k - w); + for (j = i >> w; j < z; j += f) + q[j] = r; + + /* backwards increment the k-bit code i */ + for (j = 1 << (k - 1); i & j; j >>= 1) + i ^= j; + i ^= j; + + /* backup over finished tables */ + while ((i & ((1 << w) - 1)) != x[h]) + { + h--; /* don't need to update q */ + w -= l; + } +DEBG("h6e "); + } +DEBG("h6f "); + } + +DEBG("huft7 "); + + /* Return true (1) if we were given an incomplete table */ + ret = y != 0 && g != 1; + + out: + free(stk); + return ret; +} + + +STATIC int INIT huft_free( + struct huft *t /* table to free */ + ) +/* Free the malloc'ed tables built by huft_build(), which makes a linked + list of the tables it made, with the links in a dummy first entry of + each table. */ +{ + register struct huft *p, *q; + + + /* Go through linked list, freeing from the malloced (t[-1]) address. */ + p = t; + while (p != (struct huft *)NULL) + { + q = (--p)->v.t; + free((char*)p); + p = q; + } + return 0; +} + + +STATIC int INIT inflate_codes( + struct huft *tl, /* literal/length decoder tables */ + struct huft *td, /* distance decoder tables */ + int bl, /* number of bits decoded by tl[] */ + int bd /* number of bits decoded by td[] */ + ) +/* inflate (decompress) the codes in a deflated (compressed) block. + Return an error code or zero if it all goes ok. */ +{ + register unsigned e; /* table entry flag/number of extra bits */ + unsigned n, d; /* length and index for copy */ + unsigned w; /* current window position */ + struct huft *t; /* pointer to table entry */ + unsigned ml, md; /* masks for bl and bd bits */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + + + /* make local copies of globals */ + b = bb; /* initialize bit buffer */ + k = bk; + w = wp; /* initialize window position */ + + /* inflate the coded data */ + ml = mask_bits[bl]; /* precompute masks for speed */ + md = mask_bits[bd]; + for (;;) /* do until end of block */ + { + NEEDBITS((unsigned)bl) + if ((e = (t = tl + ((unsigned)b & ml))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + if (e == 16) /* then it's a literal */ + { + slide[w++] = (uch)t->v.n; + Tracevv((stderr, "%c", slide[w-1])); + if (w == WSIZE) + { + flush_output(w); + w = 0; + } + } + else /* it's an EOB or a length */ + { + /* exit if end of block */ + if (e == 15) + break; + + /* get length of block to copy */ + NEEDBITS(e) + n = t->v.n + ((unsigned)b & mask_bits[e]); + DUMPBITS(e); + + /* decode distance of block to copy */ + NEEDBITS((unsigned)bd) + if ((e = (t = td + ((unsigned)b & md))->e) > 16) + do { + if (e == 99) + return 1; + DUMPBITS(t->b) + e -= 16; + NEEDBITS(e) + } while ((e = (t = t->v.t + ((unsigned)b & mask_bits[e]))->e) > 16); + DUMPBITS(t->b) + NEEDBITS(e) + d = w - t->v.n - ((unsigned)b & mask_bits[e]); + DUMPBITS(e) + Tracevv((stderr,"\\[%d,%d]", w-d, n)); + + /* do the copy */ + do { + n -= (e = (e = WSIZE - ((d &= WSIZE-1) > w ? d : w)) > n ? n : e); +#if !defined(NOMEMCPY) && !defined(DEBUG) + if (w - d >= e) /* (this test assumes unsigned comparison) */ + { + memcpy(slide + w, slide + d, e); + w += e; + d += e; + } + else /* do it slow to avoid memcpy() overlap */ +#endif /* !NOMEMCPY */ + do { + slide[w++] = slide[d++]; + Tracevv((stderr, "%c", slide[w-1])); + } while (--e); + if (w == WSIZE) + { + flush_output(w); + w = 0; + } + } while (n); + } + } + + + /* restore the globals from the locals */ + wp = w; /* restore global window pointer */ + bb = b; /* restore global bit buffer */ + bk = k; + + /* done */ + return 0; + + underrun: + return 4; /* Input underrun */ +} + + +STATIC int INIT inflate_stored(void) +/* "decompress" an inflated type 0 (stored) block. */ +{ + unsigned n; /* number of bytes in block */ + unsigned w; /* current window position */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + +DEBG(""); + return 0; + + underrun: + return 4; /* Input underrun */ +} + + +/* + * We use `noinline' here to prevent gcc-3.5 from using too much stack space + */ +STATIC int noinline INIT inflate_fixed(void) +/* decompress an inflated type 1 (fixed Huffman codes) block. We should + either replace this with a custom decoder, or at least precompute the + Huffman tables. */ +{ + int i; /* temporary variable */ + struct huft *tl; /* literal/length code table */ + struct huft *td; /* distance code table */ + int bl; /* lookup bits for tl */ + int bd; /* lookup bits for td */ + unsigned *l; /* length list for huft_build */ + +DEBG(" 1) + { + huft_free(tl); + free(l); + + DEBG(">"); + return i; + } + + + /* decompress until an end-of-block code */ + if (inflate_codes(tl, td, bl, bd)) { + free(l); + return 1; + } + + /* free the decoding tables, return */ + free(l); + huft_free(tl); + huft_free(td); + return 0; +} + + +/* + * We use `noinline' here to prevent gcc-3.5 from using too much stack space + */ +STATIC int noinline INIT inflate_dynamic(void) +/* decompress an inflated type 2 (dynamic Huffman codes) block. */ +{ + int i; /* temporary variables */ + unsigned j; + unsigned l; /* last length */ + unsigned m; /* mask for bit lengths table */ + unsigned n; /* number of lengths to get */ + struct huft *tl; /* literal/length code table */ + struct huft *td; /* distance code table */ + int bl; /* lookup bits for tl */ + int bd; /* lookup bits for td */ + unsigned nb; /* number of bit length codes */ + unsigned nl; /* number of literal/length codes */ + unsigned nd; /* number of distance codes */ + unsigned *ll; /* literal/length and distance code lengths */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + int ret; + +DEBG(" 288 || nd > 32) +#else + if (nl > 286 || nd > 30) +#endif + { + ret = 1; /* bad lengths */ + goto out; + } + +DEBG("dyn1 "); + + /* read in bit-length-code lengths */ + for (j = 0; j < nb; j++) + { + NEEDBITS(3) + ll[border[j]] = (unsigned)b & 7; + DUMPBITS(3) + } + for (; j < 19; j++) + ll[border[j]] = 0; + +DEBG("dyn2 "); + + /* build decoding table for trees--single level, 7 bit lookup */ + bl = 7; + if ((i = huft_build(ll, 19, 19, NULL, NULL, &tl, &bl)) != 0) + { + if (i == 1) + huft_free(tl); + ret = i; /* incomplete code set */ + goto out; + } + +DEBG("dyn3 "); + + /* read in literal and distance code lengths */ + n = nl + nd; + m = mask_bits[bl]; + i = l = 0; + while ((unsigned)i < n) + { + NEEDBITS((unsigned)bl) + j = (td = tl + ((unsigned)b & m))->b; + DUMPBITS(j) + j = td->v.n; + if (j < 16) /* length of code in bits (0..15) */ + ll[i++] = l = j; /* save last length in l */ + else if (j == 16) /* repeat last length 3 to 6 times */ + { + NEEDBITS(2) + j = 3 + ((unsigned)b & 3); + DUMPBITS(2) + if ((unsigned)i + j > n) { + ret = 1; + goto out; + } + while (j--) + ll[i++] = l; + } + else if (j == 17) /* 3 to 10 zero length codes */ + { + NEEDBITS(3) + j = 3 + ((unsigned)b & 7); + DUMPBITS(3) + if ((unsigned)i + j > n) { + ret = 1; + goto out; + } + while (j--) + ll[i++] = 0; + l = 0; + } + else /* j == 18: 11 to 138 zero length codes */ + { + NEEDBITS(7) + j = 11 + ((unsigned)b & 0x7f); + DUMPBITS(7) + if ((unsigned)i + j > n) { + ret = 1; + goto out; + } + while (j--) + ll[i++] = 0; + l = 0; + } + } + +DEBG("dyn4 "); + + /* free decoding table for trees */ + huft_free(tl); + +DEBG("dyn5 "); + + /* restore the global bit buffer */ + bb = b; + bk = k; + +DEBG("dyn5a "); + + /* build the decoding tables for literal/length and distance codes */ + bl = lbits; + if ((i = huft_build(ll, nl, 257, cplens, cplext, &tl, &bl)) != 0) + { +DEBG("dyn5b "); + if (i == 1) { + error("incomplete literal tree"); + huft_free(tl); + } + ret = i; /* incomplete code set */ + goto out; + } +DEBG("dyn5c "); + bd = dbits; + if ((i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &td, &bd)) != 0) + { +DEBG("dyn5d "); + if (i == 1) { + error("incomplete distance tree"); +#ifdef PKZIP_BUG_WORKAROUND + i = 0; + } +#else + huft_free(td); + } + huft_free(tl); + ret = i; /* incomplete code set */ + goto out; +#endif + } + +DEBG("dyn6 "); + + /* decompress until an end-of-block code */ + if (inflate_codes(tl, td, bl, bd)) { + ret = 1; + goto out; + } + +DEBG("dyn7 "); + + /* free the decoding tables, return */ + huft_free(tl); + huft_free(td); + + DEBG(">"); + ret = 0; +out: + free(ll); + return ret; + +underrun: + ret = 4; /* Input underrun */ + goto out; +} + + +STATIC int INIT inflate_block( + int *e /* last block flag */ + ) +/* decompress an inflated block */ +{ + unsigned t; /* block type */ + register ulg b; /* bit buffer */ + register unsigned k; /* number of bits in bit buffer */ + + DEBG(""); + + /* bad block type */ + return 2; + + underrun: + return 4; /* Input underrun */ +} + + +STATIC int INIT inflate(void) +/* decompress an inflated entry */ +{ + int e; /* last block flag */ + int r; /* result code */ + unsigned h; /* maximum struct huft's malloc'ed */ + + /* initialize window, bit buffer */ + wp = 0; + bk = 0; + bb = 0; + + + /* decompress until the last block */ + h = 0; + do { + hufts = 0; +#ifdef ARCH_HAS_DECOMP_WDOG + arch_decomp_wdog(); +#endif + r = inflate_block(&e); + if (r) + return r; + if (hufts > h) + h = hufts; + } while (!e); + + /* Undo too much lookahead. The next read will be byte aligned so we + * can discard unused bits in the last meaningful byte. + */ + while (bk >= 8) { + bk -= 8; + inptr--; + } + + /* flush out slide */ + flush_output(wp); + + + /* return success */ +#ifdef DEBUG + fprintf(stderr, "<%u> ", h); +#endif /* DEBUG */ + return 0; +} + +/********************************************************************** + * + * The following are support routines for inflate.c + * + **********************************************************************/ + +static ulg crc_32_tab[256]; +static ulg crc; /* initialized in makecrc() so it'll reside in bss */ +#define CRC_VALUE (crc ^ 0xffffffffUL) + +/* + * Code to compute the CRC-32 table. Borrowed from + * gzip-1.0.3/makecrc.c. + */ + +static void INIT +makecrc(void) +{ +/* Not copyrighted 1990 Mark Adler */ + + unsigned long c; /* crc shift register */ + unsigned long e; /* polynomial exclusive-or pattern */ + int i; /* counter for all possible eight bit values */ + int k; /* byte being shifted into crc apparatus */ + + /* terms of polynomial defining this crc (except x^32): */ + static const int p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; + + /* Make exclusive-or pattern from polynomial */ + e = 0; + for (i = 0; i < sizeof(p)/sizeof(int); i++) + e |= 1L << (31 - p[i]); + + crc_32_tab[0] = 0; + + for (i = 1; i < 256; i++) + { + c = 0; + for (k = i | 256; k != 1; k >>= 1) + { + c = c & 1 ? (c >> 1) ^ e : c >> 1; + if (k & 1) + c ^= e; + } + crc_32_tab[i] = c; + } + + /* this is initialized here so this code could reside in ROM */ + crc = (ulg)0xffffffffUL; /* shift register contents */ +} + +/* gzip flag byte */ +#define ASCII_FLAG 0x01 /* bit 0 set: file probably ASCII text */ +#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */ +#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ +#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ +#define COMMENT 0x10 /* bit 4 set: file comment present */ +#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */ +#define RESERVED 0xC0 /* bit 6,7: reserved */ + +/* + * Do the uncompression! + */ +static int INIT gunzip(void) +{ + uch flags; + unsigned char magic[2]; /* magic header */ + char method; + ulg orig_crc = 0; /* original crc */ + ulg orig_len = 0; /* original uncompressed length */ + int res; + + magic[0] = NEXTBYTE(); + magic[1] = NEXTBYTE(); + method = NEXTBYTE(); + + if (magic[0] != 037 || + ((magic[1] != 0213) && (magic[1] != 0236))) { + error("bad gzip magic numbers"); + return -1; + } + + /* We only support method #8, DEFLATED */ + if (method != 8) { + error("internal error, invalid method"); + return -1; + } + + flags = (uch)get_byte(); + if ((flags & ENCRYPTED) != 0) { + error("Input is encrypted"); + return -1; + } + if ((flags & CONTINUATION) != 0) { + error("Multi part input"); + return -1; + } + if ((flags & RESERVED) != 0) { + error("Input has invalid flags"); + return -1; + } + NEXTBYTE(); /* Get timestamp */ + NEXTBYTE(); + NEXTBYTE(); + NEXTBYTE(); + + (void)NEXTBYTE(); /* Ignore extra flags for the moment */ + (void)NEXTBYTE(); /* Ignore OS type for the moment */ + + if ((flags & EXTRA_FIELD) != 0) { + unsigned len = (unsigned)NEXTBYTE(); + len |= ((unsigned)NEXTBYTE())<<8; + while (len--) (void)NEXTBYTE(); + } + + /* Get original file name if it was truncated */ + if ((flags & ORIG_NAME) != 0) { + /* Discard the old name */ + while (NEXTBYTE() != 0) /* null */ ; + } + + /* Discard file comment if any */ + if ((flags & COMMENT) != 0) { + while (NEXTBYTE() != 0) /* null */ ; + } + + /* Decompress */ + if ((res = inflate())) { + switch (res) { + case 0: + break; + case 1: + error("invalid compressed format (err=1)"); + break; + case 2: + error("invalid compressed format (err=2)"); + break; + case 3: + error("out of memory"); + break; + case 4: + error("out of input data"); + break; + default: + error("invalid compressed format (other)"); + } + return -1; + } + + /* Get the crc and original length */ + /* crc32 (see algorithm.doc) + * uncompressed input size modulo 2^32 + */ + orig_crc = (ulg) NEXTBYTE(); + orig_crc |= (ulg) NEXTBYTE() << 8; + orig_crc |= (ulg) NEXTBYTE() << 16; + orig_crc |= (ulg) NEXTBYTE() << 24; + + orig_len = (ulg) NEXTBYTE(); + orig_len |= (ulg) NEXTBYTE() << 8; + orig_len |= (ulg) NEXTBYTE() << 16; + orig_len |= (ulg) NEXTBYTE() << 24; + + /* Validate decompression */ + if (orig_crc != CRC_VALUE) { + error("crc error"); + return -1; + } + if (orig_len != bytes_out) { + error("length error"); + return -1; + } + return 0; + + underrun: /* NEXTBYTE() goto's here if needed */ + error("out of input data"); + return -1; +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/lib/inflate.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/lib/inflate.c.yml new file mode 100644 index 00000000000..d580f9d5123 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/lib/inflate.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Not copyrighted 1992 by Mark Adler + - copyrighted 1990 Mark Adler +holders: + - Not by Mark Adler + - Mark Adler diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/af_ax25.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/af_ax25.c new file mode 100644 index 00000000000..2d25e6ee81c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/af_ax25.c @@ -0,0 +1,2017 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Copyright (C) Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk) + * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + * Copyright (C) Darryl Miles G7LED (dlm@g7led.demon.co.uk) + * Copyright (C) Steven Whitehouse GW7RRM (stevew@acm.org) + * Copyright (C) Joerg Reuter DL1BKE (jreuter@yaina.de) + * Copyright (C) Hans-Joachim Hetscher DD8NE (dd8ne@bnv-bamberg.de) + * Copyright (C) Hans Alblas PE1AYX (hans@esrac.ele.tue.nl) + * Copyright (C) Frederic Rible F1OAT (frible@teaser.fr) + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For TIOCINQ/OUTQ */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +HLIST_HEAD(ax25_list); +DEFINE_SPINLOCK(ax25_list_lock); + +static const struct proto_ops ax25_proto_ops; + +static void ax25_free_sock(struct sock *sk) +{ + ax25_cb_put(sk_to_ax25(sk)); +} + +/* + * Socket removal during an interrupt is now safe. + */ +static void ax25_cb_del(ax25_cb *ax25) +{ + if (!hlist_unhashed(&ax25->ax25_node)) { + spin_lock_bh(&ax25_list_lock); + hlist_del_init(&ax25->ax25_node); + spin_unlock_bh(&ax25_list_lock); + ax25_cb_put(ax25); + } +} + +/* + * Kill all bound sockets on a dropped device. + */ +static void ax25_kill_by_device(struct net_device *dev) +{ + ax25_dev *ax25_dev; + ax25_cb *s; + + if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) + return; + + spin_lock_bh(&ax25_list_lock); +again: + ax25_for_each(s, &ax25_list) { + if (s->ax25_dev == ax25_dev) { + s->ax25_dev = NULL; + spin_unlock_bh(&ax25_list_lock); + ax25_disconnect(s, ENETUNREACH); + spin_lock_bh(&ax25_list_lock); + + /* The entry could have been deleted from the + * list meanwhile and thus the next pointer is + * no longer valid. Play it safe and restart + * the scan. Forward progress is ensured + * because we set s->ax25_dev to NULL and we + * are never passed a NULL 'dev' argument. + */ + goto again; + } + } + spin_unlock_bh(&ax25_list_lock); +} + +/* + * Handle device status changes. + */ +static int ax25_device_event(struct notifier_block *this, unsigned long event, + void *ptr) +{ + struct net_device *dev = netdev_notifier_info_to_dev(ptr); + + if (!net_eq(dev_net(dev), &init_net)) + return NOTIFY_DONE; + + /* Reject non AX.25 devices */ + if (dev->type != ARPHRD_AX25) + return NOTIFY_DONE; + + switch (event) { + case NETDEV_UP: + ax25_dev_device_up(dev); + break; + case NETDEV_DOWN: + ax25_kill_by_device(dev); + ax25_rt_device_down(dev); + ax25_dev_device_down(dev); + break; + default: + break; + } + + return NOTIFY_DONE; +} + +/* + * Add a socket to the bound sockets list. + */ +void ax25_cb_add(ax25_cb *ax25) +{ + spin_lock_bh(&ax25_list_lock); + ax25_cb_hold(ax25); + hlist_add_head(&ax25->ax25_node, &ax25_list); + spin_unlock_bh(&ax25_list_lock); +} + +/* + * Find a socket that wants to accept the SABM we have just + * received. + */ +struct sock *ax25_find_listener(ax25_address *addr, int digi, + struct net_device *dev, int type) +{ + ax25_cb *s; + + spin_lock(&ax25_list_lock); + ax25_for_each(s, &ax25_list) { + if ((s->iamdigi && !digi) || (!s->iamdigi && digi)) + continue; + if (s->sk && !ax25cmp(&s->source_addr, addr) && + s->sk->sk_type == type && s->sk->sk_state == TCP_LISTEN) { + /* If device is null we match any device */ + if (s->ax25_dev == NULL || s->ax25_dev->dev == dev) { + sock_hold(s->sk); + spin_unlock(&ax25_list_lock); + return s->sk; + } + } + } + spin_unlock(&ax25_list_lock); + + return NULL; +} + +/* + * Find an AX.25 socket given both ends. + */ +struct sock *ax25_get_socket(ax25_address *my_addr, ax25_address *dest_addr, + int type) +{ + struct sock *sk = NULL; + ax25_cb *s; + + spin_lock(&ax25_list_lock); + ax25_for_each(s, &ax25_list) { + if (s->sk && !ax25cmp(&s->source_addr, my_addr) && + !ax25cmp(&s->dest_addr, dest_addr) && + s->sk->sk_type == type) { + sk = s->sk; + sock_hold(sk); + break; + } + } + + spin_unlock(&ax25_list_lock); + + return sk; +} + +/* + * Find an AX.25 control block given both ends. It will only pick up + * floating AX.25 control blocks or non Raw socket bound control blocks. + */ +ax25_cb *ax25_find_cb(ax25_address *src_addr, ax25_address *dest_addr, + ax25_digi *digi, struct net_device *dev) +{ + ax25_cb *s; + + spin_lock_bh(&ax25_list_lock); + ax25_for_each(s, &ax25_list) { + if (s->sk && s->sk->sk_type != SOCK_SEQPACKET) + continue; + if (s->ax25_dev == NULL) + continue; + if (ax25cmp(&s->source_addr, src_addr) == 0 && ax25cmp(&s->dest_addr, dest_addr) == 0 && s->ax25_dev->dev == dev) { + if (digi != NULL && digi->ndigi != 0) { + if (s->digipeat == NULL) + continue; + if (ax25digicmp(s->digipeat, digi) != 0) + continue; + } else { + if (s->digipeat != NULL && s->digipeat->ndigi != 0) + continue; + } + ax25_cb_hold(s); + spin_unlock_bh(&ax25_list_lock); + + return s; + } + } + spin_unlock_bh(&ax25_list_lock); + + return NULL; +} + +EXPORT_SYMBOL(ax25_find_cb); + +void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto) +{ + ax25_cb *s; + struct sk_buff *copy; + + spin_lock(&ax25_list_lock); + ax25_for_each(s, &ax25_list) { + if (s->sk != NULL && ax25cmp(&s->source_addr, addr) == 0 && + s->sk->sk_type == SOCK_RAW && + s->sk->sk_protocol == proto && + s->ax25_dev->dev == skb->dev && + atomic_read(&s->sk->sk_rmem_alloc) <= s->sk->sk_rcvbuf) { + if ((copy = skb_clone(skb, GFP_ATOMIC)) == NULL) + continue; + if (sock_queue_rcv_skb(s->sk, copy) != 0) + kfree_skb(copy); + } + } + spin_unlock(&ax25_list_lock); +} + +/* + * Deferred destroy. + */ +void ax25_destroy_socket(ax25_cb *); + +/* + * Handler for deferred kills. + */ +static void ax25_destroy_timer(struct timer_list *t) +{ + ax25_cb *ax25 = from_timer(ax25, t, dtimer); + struct sock *sk; + + sk=ax25->sk; + + bh_lock_sock(sk); + sock_hold(sk); + ax25_destroy_socket(ax25); + bh_unlock_sock(sk); + sock_put(sk); +} + +/* + * This is called from user mode and the timers. Thus it protects itself + * against interrupt users but doesn't worry about being called during + * work. Once it is removed from the queue no interrupt or bottom half + * will touch it and we are (fairly 8-) ) safe. + */ +void ax25_destroy_socket(ax25_cb *ax25) +{ + struct sk_buff *skb; + + ax25_cb_del(ax25); + + ax25_stop_heartbeat(ax25); + ax25_stop_t1timer(ax25); + ax25_stop_t2timer(ax25); + ax25_stop_t3timer(ax25); + ax25_stop_idletimer(ax25); + + ax25_clear_queues(ax25); /* Flush the queues */ + + if (ax25->sk != NULL) { + while ((skb = skb_dequeue(&ax25->sk->sk_receive_queue)) != NULL) { + if (skb->sk != ax25->sk) { + /* A pending connection */ + ax25_cb *sax25 = sk_to_ax25(skb->sk); + + /* Queue the unaccepted socket for death */ + sock_orphan(skb->sk); + + /* 9A4GL: hack to release unaccepted sockets */ + skb->sk->sk_state = TCP_LISTEN; + + ax25_start_heartbeat(sax25); + sax25->state = AX25_STATE_0; + } + + kfree_skb(skb); + } + skb_queue_purge(&ax25->sk->sk_write_queue); + } + + if (ax25->sk != NULL) { + if (sk_has_allocations(ax25->sk)) { + /* Defer: outstanding buffers */ + timer_setup(&ax25->dtimer, ax25_destroy_timer, 0); + ax25->dtimer.expires = jiffies + 2 * HZ; + add_timer(&ax25->dtimer); + } else { + struct sock *sk=ax25->sk; + ax25->sk=NULL; + sock_put(sk); + } + } else { + ax25_cb_put(ax25); + } +} + +/* + * dl1bke 960311: set parameters for existing AX.25 connections, + * includes a KILL command to abort any connection. + * VERY useful for debugging ;-) + */ +static int ax25_ctl_ioctl(const unsigned int cmd, void __user *arg) +{ + struct ax25_ctl_struct ax25_ctl; + ax25_digi digi; + ax25_dev *ax25_dev; + ax25_cb *ax25; + unsigned int k; + int ret = 0; + + if (copy_from_user(&ax25_ctl, arg, sizeof(ax25_ctl))) + return -EFAULT; + + if ((ax25_dev = ax25_addr_ax25dev(&ax25_ctl.port_addr)) == NULL) + return -ENODEV; + + if (ax25_ctl.digi_count > AX25_MAX_DIGIS) + return -EINVAL; + + if (ax25_ctl.arg > ULONG_MAX / HZ && ax25_ctl.cmd != AX25_KILL) + return -EINVAL; + + digi.ndigi = ax25_ctl.digi_count; + for (k = 0; k < digi.ndigi; k++) + digi.calls[k] = ax25_ctl.digi_addr[k]; + + if ((ax25 = ax25_find_cb(&ax25_ctl.source_addr, &ax25_ctl.dest_addr, &digi, ax25_dev->dev)) == NULL) + return -ENOTCONN; + + switch (ax25_ctl.cmd) { + case AX25_KILL: + ax25_send_control(ax25, AX25_DISC, AX25_POLLON, AX25_COMMAND); +#ifdef CONFIG_AX25_DAMA_SLAVE + if (ax25_dev->dama.slave && ax25->ax25_dev->values[AX25_VALUES_PROTOCOL] == AX25_PROTO_DAMA_SLAVE) + ax25_dama_off(ax25); +#endif + ax25_disconnect(ax25, ENETRESET); + break; + + case AX25_WINDOW: + if (ax25->modulus == AX25_MODULUS) { + if (ax25_ctl.arg < 1 || ax25_ctl.arg > 7) + goto einval_put; + } else { + if (ax25_ctl.arg < 1 || ax25_ctl.arg > 63) + goto einval_put; + } + ax25->window = ax25_ctl.arg; + break; + + case AX25_T1: + if (ax25_ctl.arg < 1 || ax25_ctl.arg > ULONG_MAX / HZ) + goto einval_put; + ax25->rtt = (ax25_ctl.arg * HZ) / 2; + ax25->t1 = ax25_ctl.arg * HZ; + break; + + case AX25_T2: + if (ax25_ctl.arg < 1 || ax25_ctl.arg > ULONG_MAX / HZ) + goto einval_put; + ax25->t2 = ax25_ctl.arg * HZ; + break; + + case AX25_N2: + if (ax25_ctl.arg < 1 || ax25_ctl.arg > 31) + goto einval_put; + ax25->n2count = 0; + ax25->n2 = ax25_ctl.arg; + break; + + case AX25_T3: + if (ax25_ctl.arg > ULONG_MAX / HZ) + goto einval_put; + ax25->t3 = ax25_ctl.arg * HZ; + break; + + case AX25_IDLE: + if (ax25_ctl.arg > ULONG_MAX / (60 * HZ)) + goto einval_put; + + ax25->idle = ax25_ctl.arg * 60 * HZ; + break; + + case AX25_PACLEN: + if (ax25_ctl.arg < 16 || ax25_ctl.arg > 65535) + goto einval_put; + ax25->paclen = ax25_ctl.arg; + break; + + default: + goto einval_put; + } + +out_put: + ax25_cb_put(ax25); + return ret; + +einval_put: + ret = -EINVAL; + goto out_put; +} + +static void ax25_fillin_cb_from_dev(ax25_cb *ax25, ax25_dev *ax25_dev) +{ + ax25->rtt = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_T1]) / 2; + ax25->t1 = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_T1]); + ax25->t2 = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_T2]); + ax25->t3 = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_T3]); + ax25->n2 = ax25_dev->values[AX25_VALUES_N2]; + ax25->paclen = ax25_dev->values[AX25_VALUES_PACLEN]; + ax25->idle = msecs_to_jiffies(ax25_dev->values[AX25_VALUES_IDLE]); + ax25->backoff = ax25_dev->values[AX25_VALUES_BACKOFF]; + + if (ax25_dev->values[AX25_VALUES_AXDEFMODE]) { + ax25->modulus = AX25_EMODULUS; + ax25->window = ax25_dev->values[AX25_VALUES_EWINDOW]; + } else { + ax25->modulus = AX25_MODULUS; + ax25->window = ax25_dev->values[AX25_VALUES_WINDOW]; + } +} + +/* + * Fill in a created AX.25 created control block with the default + * values for a particular device. + */ +void ax25_fillin_cb(ax25_cb *ax25, ax25_dev *ax25_dev) +{ + ax25->ax25_dev = ax25_dev; + + if (ax25->ax25_dev != NULL) { + ax25_fillin_cb_from_dev(ax25, ax25_dev); + return; + } + + /* + * No device, use kernel / AX.25 spec default values + */ + ax25->rtt = msecs_to_jiffies(AX25_DEF_T1) / 2; + ax25->t1 = msecs_to_jiffies(AX25_DEF_T1); + ax25->t2 = msecs_to_jiffies(AX25_DEF_T2); + ax25->t3 = msecs_to_jiffies(AX25_DEF_T3); + ax25->n2 = AX25_DEF_N2; + ax25->paclen = AX25_DEF_PACLEN; + ax25->idle = msecs_to_jiffies(AX25_DEF_IDLE); + ax25->backoff = AX25_DEF_BACKOFF; + + if (AX25_DEF_AXDEFMODE) { + ax25->modulus = AX25_EMODULUS; + ax25->window = AX25_DEF_EWINDOW; + } else { + ax25->modulus = AX25_MODULUS; + ax25->window = AX25_DEF_WINDOW; + } +} + +/* + * Create an empty AX.25 control block. + */ +ax25_cb *ax25_create_cb(void) +{ + ax25_cb *ax25; + + if ((ax25 = kzalloc(sizeof(*ax25), GFP_ATOMIC)) == NULL) + return NULL; + + refcount_set(&ax25->refcount, 1); + + skb_queue_head_init(&ax25->write_queue); + skb_queue_head_init(&ax25->frag_queue); + skb_queue_head_init(&ax25->ack_queue); + skb_queue_head_init(&ax25->reseq_queue); + + ax25_setup_timers(ax25); + + ax25_fillin_cb(ax25, NULL); + + ax25->state = AX25_STATE_0; + + return ax25; +} + +/* + * Handling for system calls applied via the various interfaces to an + * AX25 socket object + */ + +static int ax25_setsockopt(struct socket *sock, int level, int optname, + char __user *optval, unsigned int optlen) +{ + struct sock *sk = sock->sk; + ax25_cb *ax25; + struct net_device *dev; + char devname[IFNAMSIZ]; + unsigned long opt; + int res = 0; + + if (level != SOL_AX25) + return -ENOPROTOOPT; + + if (optlen < sizeof(unsigned int)) + return -EINVAL; + + if (get_user(opt, (unsigned int __user *)optval)) + return -EFAULT; + + lock_sock(sk); + ax25 = sk_to_ax25(sk); + + switch (optname) { + case AX25_WINDOW: + if (ax25->modulus == AX25_MODULUS) { + if (opt < 1 || opt > 7) { + res = -EINVAL; + break; + } + } else { + if (opt < 1 || opt > 63) { + res = -EINVAL; + break; + } + } + ax25->window = opt; + break; + + case AX25_T1: + if (opt < 1 || opt > ULONG_MAX / HZ) { + res = -EINVAL; + break; + } + ax25->rtt = (opt * HZ) >> 1; + ax25->t1 = opt * HZ; + break; + + case AX25_T2: + if (opt < 1 || opt > ULONG_MAX / HZ) { + res = -EINVAL; + break; + } + ax25->t2 = opt * HZ; + break; + + case AX25_N2: + if (opt < 1 || opt > 31) { + res = -EINVAL; + break; + } + ax25->n2 = opt; + break; + + case AX25_T3: + if (opt < 1 || opt > ULONG_MAX / HZ) { + res = -EINVAL; + break; + } + ax25->t3 = opt * HZ; + break; + + case AX25_IDLE: + if (opt > ULONG_MAX / (60 * HZ)) { + res = -EINVAL; + break; + } + ax25->idle = opt * 60 * HZ; + break; + + case AX25_BACKOFF: + if (opt > 2) { + res = -EINVAL; + break; + } + ax25->backoff = opt; + break; + + case AX25_EXTSEQ: + ax25->modulus = opt ? AX25_EMODULUS : AX25_MODULUS; + break; + + case AX25_PIDINCL: + ax25->pidincl = opt ? 1 : 0; + break; + + case AX25_IAMDIGI: + ax25->iamdigi = opt ? 1 : 0; + break; + + case AX25_PACLEN: + if (opt < 16 || opt > 65535) { + res = -EINVAL; + break; + } + ax25->paclen = opt; + break; + + case SO_BINDTODEVICE: + if (optlen > IFNAMSIZ) + optlen = IFNAMSIZ; + + if (copy_from_user(devname, optval, optlen)) { + res = -EFAULT; + break; + } + + if (sk->sk_type == SOCK_SEQPACKET && + (sock->state != SS_UNCONNECTED || + sk->sk_state == TCP_LISTEN)) { + res = -EADDRNOTAVAIL; + break; + } + + rtnl_lock(); + dev = __dev_get_by_name(&init_net, devname); + if (!dev) { + rtnl_unlock(); + res = -ENODEV; + break; + } + + ax25->ax25_dev = ax25_dev_ax25dev(dev); + if (!ax25->ax25_dev) { + rtnl_unlock(); + res = -ENODEV; + break; + } + ax25_fillin_cb(ax25, ax25->ax25_dev); + rtnl_unlock(); + break; + + default: + res = -ENOPROTOOPT; + } + release_sock(sk); + + return res; +} + +static int ax25_getsockopt(struct socket *sock, int level, int optname, + char __user *optval, int __user *optlen) +{ + struct sock *sk = sock->sk; + ax25_cb *ax25; + struct ax25_dev *ax25_dev; + char devname[IFNAMSIZ]; + void *valptr; + int val = 0; + int maxlen, length; + + if (level != SOL_AX25) + return -ENOPROTOOPT; + + if (get_user(maxlen, optlen)) + return -EFAULT; + + if (maxlen < 1) + return -EFAULT; + + valptr = (void *) &val; + length = min_t(unsigned int, maxlen, sizeof(int)); + + lock_sock(sk); + ax25 = sk_to_ax25(sk); + + switch (optname) { + case AX25_WINDOW: + val = ax25->window; + break; + + case AX25_T1: + val = ax25->t1 / HZ; + break; + + case AX25_T2: + val = ax25->t2 / HZ; + break; + + case AX25_N2: + val = ax25->n2; + break; + + case AX25_T3: + val = ax25->t3 / HZ; + break; + + case AX25_IDLE: + val = ax25->idle / (60 * HZ); + break; + + case AX25_BACKOFF: + val = ax25->backoff; + break; + + case AX25_EXTSEQ: + val = (ax25->modulus == AX25_EMODULUS); + break; + + case AX25_PIDINCL: + val = ax25->pidincl; + break; + + case AX25_IAMDIGI: + val = ax25->iamdigi; + break; + + case AX25_PACLEN: + val = ax25->paclen; + break; + + case SO_BINDTODEVICE: + ax25_dev = ax25->ax25_dev; + + if (ax25_dev != NULL && ax25_dev->dev != NULL) { + strlcpy(devname, ax25_dev->dev->name, sizeof(devname)); + length = strlen(devname) + 1; + } else { + *devname = '\0'; + length = 1; + } + + valptr = (void *) devname; + break; + + default: + release_sock(sk); + return -ENOPROTOOPT; + } + release_sock(sk); + + if (put_user(length, optlen)) + return -EFAULT; + + return copy_to_user(optval, valptr, length) ? -EFAULT : 0; +} + +static int ax25_listen(struct socket *sock, int backlog) +{ + struct sock *sk = sock->sk; + int res = 0; + + lock_sock(sk); + if (sk->sk_type == SOCK_SEQPACKET && sk->sk_state != TCP_LISTEN) { + sk->sk_max_ack_backlog = backlog; + sk->sk_state = TCP_LISTEN; + goto out; + } + res = -EOPNOTSUPP; + +out: + release_sock(sk); + + return res; +} + +/* + * XXX: when creating ax25_sock we should update the .obj_size setting + * below. + */ +static struct proto ax25_proto = { + .name = "AX25", + .owner = THIS_MODULE, + .obj_size = sizeof(struct ax25_sock), +}; + +static int ax25_create(struct net *net, struct socket *sock, int protocol, + int kern) +{ + struct sock *sk; + ax25_cb *ax25; + + if (protocol < 0 || protocol > SK_PROTOCOL_MAX) + return -EINVAL; + + if (!net_eq(net, &init_net)) + return -EAFNOSUPPORT; + + switch (sock->type) { + case SOCK_DGRAM: + if (protocol == 0 || protocol == PF_AX25) + protocol = AX25_P_TEXT; + break; + + case SOCK_SEQPACKET: + switch (protocol) { + case 0: + case PF_AX25: /* For CLX */ + protocol = AX25_P_TEXT; + break; + case AX25_P_SEGMENT: +#ifdef CONFIG_INET + case AX25_P_ARP: + case AX25_P_IP: +#endif +#ifdef CONFIG_NETROM + case AX25_P_NETROM: +#endif +#ifdef CONFIG_ROSE + case AX25_P_ROSE: +#endif + return -ESOCKTNOSUPPORT; +#ifdef CONFIG_NETROM_MODULE + case AX25_P_NETROM: + if (ax25_protocol_is_registered(AX25_P_NETROM)) + return -ESOCKTNOSUPPORT; + break; +#endif +#ifdef CONFIG_ROSE_MODULE + case AX25_P_ROSE: + if (ax25_protocol_is_registered(AX25_P_ROSE)) + return -ESOCKTNOSUPPORT; +#endif + default: + break; + } + break; + + case SOCK_RAW: + break; + default: + return -ESOCKTNOSUPPORT; + } + + sk = sk_alloc(net, PF_AX25, GFP_ATOMIC, &ax25_proto, kern); + if (sk == NULL) + return -ENOMEM; + + ax25 = ax25_sk(sk)->cb = ax25_create_cb(); + if (!ax25) { + sk_free(sk); + return -ENOMEM; + } + + sock_init_data(sock, sk); + + sk->sk_destruct = ax25_free_sock; + sock->ops = &ax25_proto_ops; + sk->sk_protocol = protocol; + + ax25->sk = sk; + + return 0; +} + +struct sock *ax25_make_new(struct sock *osk, struct ax25_dev *ax25_dev) +{ + struct sock *sk; + ax25_cb *ax25, *oax25; + + sk = sk_alloc(sock_net(osk), PF_AX25, GFP_ATOMIC, osk->sk_prot, 0); + if (sk == NULL) + return NULL; + + if ((ax25 = ax25_create_cb()) == NULL) { + sk_free(sk); + return NULL; + } + + switch (osk->sk_type) { + case SOCK_DGRAM: + break; + case SOCK_SEQPACKET: + break; + default: + sk_free(sk); + ax25_cb_put(ax25); + return NULL; + } + + sock_init_data(NULL, sk); + + sk->sk_type = osk->sk_type; + sk->sk_priority = osk->sk_priority; + sk->sk_protocol = osk->sk_protocol; + sk->sk_rcvbuf = osk->sk_rcvbuf; + sk->sk_sndbuf = osk->sk_sndbuf; + sk->sk_state = TCP_ESTABLISHED; + sock_copy_flags(sk, osk); + + oax25 = sk_to_ax25(osk); + + ax25->modulus = oax25->modulus; + ax25->backoff = oax25->backoff; + ax25->pidincl = oax25->pidincl; + ax25->iamdigi = oax25->iamdigi; + ax25->rtt = oax25->rtt; + ax25->t1 = oax25->t1; + ax25->t2 = oax25->t2; + ax25->t3 = oax25->t3; + ax25->n2 = oax25->n2; + ax25->idle = oax25->idle; + ax25->paclen = oax25->paclen; + ax25->window = oax25->window; + + ax25->ax25_dev = ax25_dev; + ax25->source_addr = oax25->source_addr; + + if (oax25->digipeat != NULL) { + ax25->digipeat = kmemdup(oax25->digipeat, sizeof(ax25_digi), + GFP_ATOMIC); + if (ax25->digipeat == NULL) { + sk_free(sk); + ax25_cb_put(ax25); + return NULL; + } + } + + ax25_sk(sk)->cb = ax25; + sk->sk_destruct = ax25_free_sock; + ax25->sk = sk; + + return sk; +} + +static int ax25_release(struct socket *sock) +{ + struct sock *sk = sock->sk; + ax25_cb *ax25; + + if (sk == NULL) + return 0; + + sock_hold(sk); + sock_orphan(sk); + lock_sock(sk); + ax25 = sk_to_ax25(sk); + + if (sk->sk_type == SOCK_SEQPACKET) { + switch (ax25->state) { + case AX25_STATE_0: + release_sock(sk); + ax25_disconnect(ax25, 0); + lock_sock(sk); + ax25_destroy_socket(ax25); + break; + + case AX25_STATE_1: + case AX25_STATE_2: + ax25_send_control(ax25, AX25_DISC, AX25_POLLON, AX25_COMMAND); + release_sock(sk); + ax25_disconnect(ax25, 0); + lock_sock(sk); + if (!sock_flag(ax25->sk, SOCK_DESTROY)) + ax25_destroy_socket(ax25); + break; + + case AX25_STATE_3: + case AX25_STATE_4: + ax25_clear_queues(ax25); + ax25->n2count = 0; + + switch (ax25->ax25_dev->values[AX25_VALUES_PROTOCOL]) { + case AX25_PROTO_STD_SIMPLEX: + case AX25_PROTO_STD_DUPLEX: + ax25_send_control(ax25, + AX25_DISC, + AX25_POLLON, + AX25_COMMAND); + ax25_stop_t2timer(ax25); + ax25_stop_t3timer(ax25); + ax25_stop_idletimer(ax25); + break; +#ifdef CONFIG_AX25_DAMA_SLAVE + case AX25_PROTO_DAMA_SLAVE: + ax25_stop_t3timer(ax25); + ax25_stop_idletimer(ax25); + break; +#endif + } + ax25_calculate_t1(ax25); + ax25_start_t1timer(ax25); + ax25->state = AX25_STATE_2; + sk->sk_state = TCP_CLOSE; + sk->sk_shutdown |= SEND_SHUTDOWN; + sk->sk_state_change(sk); + sock_set_flag(sk, SOCK_DESTROY); + break; + + default: + break; + } + } else { + sk->sk_state = TCP_CLOSE; + sk->sk_shutdown |= SEND_SHUTDOWN; + sk->sk_state_change(sk); + ax25_destroy_socket(ax25); + } + + sock->sk = NULL; + release_sock(sk); + sock_put(sk); + + return 0; +} + +/* + * We support a funny extension here so you can (as root) give any callsign + * digipeated via a local address as source. This hack is obsolete now + * that we've implemented support for SO_BINDTODEVICE. It is however small + * and trivially backward compatible. + */ +static int ax25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) +{ + struct sock *sk = sock->sk; + struct full_sockaddr_ax25 *addr = (struct full_sockaddr_ax25 *)uaddr; + ax25_dev *ax25_dev = NULL; + ax25_uid_assoc *user; + ax25_address call; + ax25_cb *ax25; + int err = 0; + + if (addr_len != sizeof(struct sockaddr_ax25) && + addr_len != sizeof(struct full_sockaddr_ax25)) + /* support for old structure may go away some time + * ax25_bind(): uses old (6 digipeater) socket structure. + */ + if ((addr_len < sizeof(struct sockaddr_ax25) + sizeof(ax25_address) * 6) || + (addr_len > sizeof(struct full_sockaddr_ax25))) + return -EINVAL; + + if (addr->fsa_ax25.sax25_family != AF_AX25) + return -EINVAL; + + user = ax25_findbyuid(current_euid()); + if (user) { + call = user->call; + ax25_uid_put(user); + } else { + if (ax25_uid_policy && !capable(CAP_NET_ADMIN)) + return -EACCES; + + call = addr->fsa_ax25.sax25_call; + } + + lock_sock(sk); + + ax25 = sk_to_ax25(sk); + if (!sock_flag(sk, SOCK_ZAPPED)) { + err = -EINVAL; + goto out; + } + + ax25->source_addr = call; + + /* + * User already set interface with SO_BINDTODEVICE + */ + if (ax25->ax25_dev != NULL) + goto done; + + if (addr_len > sizeof(struct sockaddr_ax25) && addr->fsa_ax25.sax25_ndigis == 1) { + if (ax25cmp(&addr->fsa_digipeater[0], &null_ax25_address) != 0 && + (ax25_dev = ax25_addr_ax25dev(&addr->fsa_digipeater[0])) == NULL) { + err = -EADDRNOTAVAIL; + goto out; + } + } else { + if ((ax25_dev = ax25_addr_ax25dev(&addr->fsa_ax25.sax25_call)) == NULL) { + err = -EADDRNOTAVAIL; + goto out; + } + } + + if (ax25_dev != NULL) + ax25_fillin_cb(ax25, ax25_dev); + +done: + ax25_cb_add(ax25); + sock_reset_flag(sk, SOCK_ZAPPED); + +out: + release_sock(sk); + + return err; +} + +/* + * FIXME: nonblock behaviour looks like it may have a bug. + */ +static int __must_check ax25_connect(struct socket *sock, + struct sockaddr *uaddr, int addr_len, int flags) +{ + struct sock *sk = sock->sk; + ax25_cb *ax25 = sk_to_ax25(sk), *ax25t; + struct full_sockaddr_ax25 *fsa = (struct full_sockaddr_ax25 *)uaddr; + ax25_digi *digi = NULL; + int ct = 0, err = 0; + + /* + * some sanity checks. code further down depends on this + */ + + if (addr_len == sizeof(struct sockaddr_ax25)) + /* support for this will go away in early 2.5.x + * ax25_connect(): uses obsolete socket structure + */ + ; + else if (addr_len != sizeof(struct full_sockaddr_ax25)) + /* support for old structure may go away some time + * ax25_connect(): uses old (6 digipeater) socket structure. + */ + if ((addr_len < sizeof(struct sockaddr_ax25) + sizeof(ax25_address) * 6) || + (addr_len > sizeof(struct full_sockaddr_ax25))) + return -EINVAL; + + + if (fsa->fsa_ax25.sax25_family != AF_AX25) + return -EINVAL; + + lock_sock(sk); + + /* deal with restarts */ + if (sock->state == SS_CONNECTING) { + switch (sk->sk_state) { + case TCP_SYN_SENT: /* still trying */ + err = -EINPROGRESS; + goto out_release; + + case TCP_ESTABLISHED: /* connection established */ + sock->state = SS_CONNECTED; + goto out_release; + + case TCP_CLOSE: /* connection refused */ + sock->state = SS_UNCONNECTED; + err = -ECONNREFUSED; + goto out_release; + } + } + + if (sk->sk_state == TCP_ESTABLISHED && sk->sk_type == SOCK_SEQPACKET) { + err = -EISCONN; /* No reconnect on a seqpacket socket */ + goto out_release; + } + + sk->sk_state = TCP_CLOSE; + sock->state = SS_UNCONNECTED; + + kfree(ax25->digipeat); + ax25->digipeat = NULL; + + /* + * Handle digi-peaters to be used. + */ + if (addr_len > sizeof(struct sockaddr_ax25) && + fsa->fsa_ax25.sax25_ndigis != 0) { + /* Valid number of digipeaters ? */ + if (fsa->fsa_ax25.sax25_ndigis < 1 || fsa->fsa_ax25.sax25_ndigis > AX25_MAX_DIGIS) { + err = -EINVAL; + goto out_release; + } + + if ((digi = kmalloc(sizeof(ax25_digi), GFP_KERNEL)) == NULL) { + err = -ENOBUFS; + goto out_release; + } + + digi->ndigi = fsa->fsa_ax25.sax25_ndigis; + digi->lastrepeat = -1; + + while (ct < fsa->fsa_ax25.sax25_ndigis) { + if ((fsa->fsa_digipeater[ct].ax25_call[6] & + AX25_HBIT) && ax25->iamdigi) { + digi->repeated[ct] = 1; + digi->lastrepeat = ct; + } else { + digi->repeated[ct] = 0; + } + digi->calls[ct] = fsa->fsa_digipeater[ct]; + ct++; + } + } + + /* + * Must bind first - autobinding in this may or may not work. If + * the socket is already bound, check to see if the device has + * been filled in, error if it hasn't. + */ + if (sock_flag(sk, SOCK_ZAPPED)) { + /* check if we can remove this feature. It is broken. */ + printk(KERN_WARNING "ax25_connect(): %s uses autobind, please contact jreuter@yaina.de\n", + current->comm); + if ((err = ax25_rt_autobind(ax25, &fsa->fsa_ax25.sax25_call)) < 0) { + kfree(digi); + goto out_release; + } + + ax25_fillin_cb(ax25, ax25->ax25_dev); + ax25_cb_add(ax25); + } else { + if (ax25->ax25_dev == NULL) { + kfree(digi); + err = -EHOSTUNREACH; + goto out_release; + } + } + + if (sk->sk_type == SOCK_SEQPACKET && + (ax25t=ax25_find_cb(&ax25->source_addr, &fsa->fsa_ax25.sax25_call, digi, + ax25->ax25_dev->dev))) { + kfree(digi); + err = -EADDRINUSE; /* Already such a connection */ + ax25_cb_put(ax25t); + goto out_release; + } + + ax25->dest_addr = fsa->fsa_ax25.sax25_call; + ax25->digipeat = digi; + + /* First the easy one */ + if (sk->sk_type != SOCK_SEQPACKET) { + sock->state = SS_CONNECTED; + sk->sk_state = TCP_ESTABLISHED; + goto out_release; + } + + /* Move to connecting socket, ax.25 lapb WAIT_UA.. */ + sock->state = SS_CONNECTING; + sk->sk_state = TCP_SYN_SENT; + + switch (ax25->ax25_dev->values[AX25_VALUES_PROTOCOL]) { + case AX25_PROTO_STD_SIMPLEX: + case AX25_PROTO_STD_DUPLEX: + ax25_std_establish_data_link(ax25); + break; + +#ifdef CONFIG_AX25_DAMA_SLAVE + case AX25_PROTO_DAMA_SLAVE: + ax25->modulus = AX25_MODULUS; + ax25->window = ax25->ax25_dev->values[AX25_VALUES_WINDOW]; + if (ax25->ax25_dev->dama.slave) + ax25_ds_establish_data_link(ax25); + else + ax25_std_establish_data_link(ax25); + break; +#endif + } + + ax25->state = AX25_STATE_1; + + ax25_start_heartbeat(ax25); + + /* Now the loop */ + if (sk->sk_state != TCP_ESTABLISHED && (flags & O_NONBLOCK)) { + err = -EINPROGRESS; + goto out_release; + } + + if (sk->sk_state == TCP_SYN_SENT) { + DEFINE_WAIT(wait); + + for (;;) { + prepare_to_wait(sk_sleep(sk), &wait, + TASK_INTERRUPTIBLE); + if (sk->sk_state != TCP_SYN_SENT) + break; + if (!signal_pending(current)) { + release_sock(sk); + schedule(); + lock_sock(sk); + continue; + } + err = -ERESTARTSYS; + break; + } + finish_wait(sk_sleep(sk), &wait); + + if (err) + goto out_release; + } + + if (sk->sk_state != TCP_ESTABLISHED) { + /* Not in ABM, not in WAIT_UA -> failed */ + sock->state = SS_UNCONNECTED; + err = sock_error(sk); /* Always set at this point */ + goto out_release; + } + + sock->state = SS_CONNECTED; + + err = 0; +out_release: + release_sock(sk); + + return err; +} + +static int ax25_accept(struct socket *sock, struct socket *newsock, int flags, + bool kern) +{ + struct sk_buff *skb; + struct sock *newsk; + DEFINE_WAIT(wait); + struct sock *sk; + int err = 0; + + if (sock->state != SS_UNCONNECTED) + return -EINVAL; + + if ((sk = sock->sk) == NULL) + return -EINVAL; + + lock_sock(sk); + if (sk->sk_type != SOCK_SEQPACKET) { + err = -EOPNOTSUPP; + goto out; + } + + if (sk->sk_state != TCP_LISTEN) { + err = -EINVAL; + goto out; + } + + /* + * The read queue this time is holding sockets ready to use + * hooked into the SABM we saved + */ + for (;;) { + prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); + skb = skb_dequeue(&sk->sk_receive_queue); + if (skb) + break; + + if (flags & O_NONBLOCK) { + err = -EWOULDBLOCK; + break; + } + if (!signal_pending(current)) { + release_sock(sk); + schedule(); + lock_sock(sk); + continue; + } + err = -ERESTARTSYS; + break; + } + finish_wait(sk_sleep(sk), &wait); + + if (err) + goto out; + + newsk = skb->sk; + sock_graft(newsk, newsock); + + /* Now attach up the new socket */ + kfree_skb(skb); + sk->sk_ack_backlog--; + newsock->state = SS_CONNECTED; + +out: + release_sock(sk); + + return err; +} + +static int ax25_getname(struct socket *sock, struct sockaddr *uaddr, + int peer) +{ + struct full_sockaddr_ax25 *fsa = (struct full_sockaddr_ax25 *)uaddr; + struct sock *sk = sock->sk; + unsigned char ndigi, i; + ax25_cb *ax25; + int err = 0; + + memset(fsa, 0, sizeof(*fsa)); + lock_sock(sk); + ax25 = sk_to_ax25(sk); + + if (peer != 0) { + if (sk->sk_state != TCP_ESTABLISHED) { + err = -ENOTCONN; + goto out; + } + + fsa->fsa_ax25.sax25_family = AF_AX25; + fsa->fsa_ax25.sax25_call = ax25->dest_addr; + + if (ax25->digipeat != NULL) { + ndigi = ax25->digipeat->ndigi; + fsa->fsa_ax25.sax25_ndigis = ndigi; + for (i = 0; i < ndigi; i++) + fsa->fsa_digipeater[i] = + ax25->digipeat->calls[i]; + } + } else { + fsa->fsa_ax25.sax25_family = AF_AX25; + fsa->fsa_ax25.sax25_call = ax25->source_addr; + fsa->fsa_ax25.sax25_ndigis = 1; + if (ax25->ax25_dev != NULL) { + memcpy(&fsa->fsa_digipeater[0], + ax25->ax25_dev->dev->dev_addr, AX25_ADDR_LEN); + } else { + fsa->fsa_digipeater[0] = null_ax25_address; + } + } + err = sizeof (struct full_sockaddr_ax25); + +out: + release_sock(sk); + + return err; +} + +static int ax25_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) +{ + DECLARE_SOCKADDR(struct sockaddr_ax25 *, usax, msg->msg_name); + struct sock *sk = sock->sk; + struct sockaddr_ax25 sax; + struct sk_buff *skb; + ax25_digi dtmp, *dp; + ax25_cb *ax25; + size_t size; + int lv, err, addr_len = msg->msg_namelen; + + if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT)) + return -EINVAL; + + lock_sock(sk); + ax25 = sk_to_ax25(sk); + + if (sock_flag(sk, SOCK_ZAPPED)) { + err = -EADDRNOTAVAIL; + goto out; + } + + if (sk->sk_shutdown & SEND_SHUTDOWN) { + send_sig(SIGPIPE, current, 0); + err = -EPIPE; + goto out; + } + + if (ax25->ax25_dev == NULL) { + err = -ENETUNREACH; + goto out; + } + + if (len > ax25->ax25_dev->dev->mtu) { + err = -EMSGSIZE; + goto out; + } + + if (usax != NULL) { + if (usax->sax25_family != AF_AX25) { + err = -EINVAL; + goto out; + } + + if (addr_len == sizeof(struct sockaddr_ax25)) + /* ax25_sendmsg(): uses obsolete socket structure */ + ; + else if (addr_len != sizeof(struct full_sockaddr_ax25)) + /* support for old structure may go away some time + * ax25_sendmsg(): uses old (6 digipeater) + * socket structure. + */ + if ((addr_len < sizeof(struct sockaddr_ax25) + sizeof(ax25_address) * 6) || + (addr_len > sizeof(struct full_sockaddr_ax25))) { + err = -EINVAL; + goto out; + } + + + if (addr_len > sizeof(struct sockaddr_ax25) && usax->sax25_ndigis != 0) { + int ct = 0; + struct full_sockaddr_ax25 *fsa = (struct full_sockaddr_ax25 *)usax; + + /* Valid number of digipeaters ? */ + if (usax->sax25_ndigis < 1 || usax->sax25_ndigis > AX25_MAX_DIGIS) { + err = -EINVAL; + goto out; + } + + dtmp.ndigi = usax->sax25_ndigis; + + while (ct < usax->sax25_ndigis) { + dtmp.repeated[ct] = 0; + dtmp.calls[ct] = fsa->fsa_digipeater[ct]; + ct++; + } + + dtmp.lastrepeat = 0; + } + + sax = *usax; + if (sk->sk_type == SOCK_SEQPACKET && + ax25cmp(&ax25->dest_addr, &sax.sax25_call)) { + err = -EISCONN; + goto out; + } + if (usax->sax25_ndigis == 0) + dp = NULL; + else + dp = &dtmp; + } else { + /* + * FIXME: 1003.1g - if the socket is like this because + * it has become closed (not started closed) and is VC + * we ought to SIGPIPE, EPIPE + */ + if (sk->sk_state != TCP_ESTABLISHED) { + err = -ENOTCONN; + goto out; + } + sax.sax25_family = AF_AX25; + sax.sax25_call = ax25->dest_addr; + dp = ax25->digipeat; + } + + /* Build a packet */ + /* Assume the worst case */ + size = len + ax25->ax25_dev->dev->hard_header_len; + + skb = sock_alloc_send_skb(sk, size, msg->msg_flags&MSG_DONTWAIT, &err); + if (skb == NULL) + goto out; + + skb_reserve(skb, size - len); + + /* User data follows immediately after the AX.25 data */ + if (memcpy_from_msg(skb_put(skb, len), msg, len)) { + err = -EFAULT; + kfree_skb(skb); + goto out; + } + + skb_reset_network_header(skb); + + /* Add the PID if one is not supplied by the user in the skb */ + if (!ax25->pidincl) + *(u8 *)skb_push(skb, 1) = sk->sk_protocol; + + if (sk->sk_type == SOCK_SEQPACKET) { + /* Connected mode sockets go via the LAPB machine */ + if (sk->sk_state != TCP_ESTABLISHED) { + kfree_skb(skb); + err = -ENOTCONN; + goto out; + } + + /* Shove it onto the queue and kick */ + ax25_output(ax25, ax25->paclen, skb); + + err = len; + goto out; + } + + skb_push(skb, 1 + ax25_addr_size(dp)); + + /* Building AX.25 Header */ + + /* Build an AX.25 header */ + lv = ax25_addr_build(skb->data, &ax25->source_addr, &sax.sax25_call, + dp, AX25_COMMAND, AX25_MODULUS); + + skb_set_transport_header(skb, lv); + + *skb_transport_header(skb) = AX25_UI; + + /* Datagram frames go straight out of the door as UI */ + ax25_queue_xmit(skb, ax25->ax25_dev->dev); + + err = len; + +out: + release_sock(sk); + + return err; +} + +static int ax25_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, + int flags) +{ + struct sock *sk = sock->sk; + struct sk_buff *skb; + int copied; + int err = 0; + + lock_sock(sk); + /* + * This works for seqpacket too. The receiver has ordered the + * queue for us! We do one quick check first though + */ + if (sk->sk_type == SOCK_SEQPACKET && sk->sk_state != TCP_ESTABLISHED) { + err = -ENOTCONN; + goto out; + } + + /* Now we can treat all alike */ + skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, + flags & MSG_DONTWAIT, &err); + if (skb == NULL) + goto out; + + if (!sk_to_ax25(sk)->pidincl) + skb_pull(skb, 1); /* Remove PID */ + + skb_reset_transport_header(skb); + copied = skb->len; + + if (copied > size) { + copied = size; + msg->msg_flags |= MSG_TRUNC; + } + + skb_copy_datagram_msg(skb, 0, msg, copied); + + if (msg->msg_name) { + ax25_digi digi; + ax25_address src; + const unsigned char *mac = skb_mac_header(skb); + DECLARE_SOCKADDR(struct sockaddr_ax25 *, sax, msg->msg_name); + + memset(sax, 0, sizeof(struct full_sockaddr_ax25)); + ax25_addr_parse(mac + 1, skb->data - mac - 1, &src, NULL, + &digi, NULL, NULL); + sax->sax25_family = AF_AX25; + /* We set this correctly, even though we may not let the + application know the digi calls further down (because it + did NOT ask to know them). This could get political... **/ + sax->sax25_ndigis = digi.ndigi; + sax->sax25_call = src; + + if (sax->sax25_ndigis != 0) { + int ct; + struct full_sockaddr_ax25 *fsa = (struct full_sockaddr_ax25 *)sax; + + for (ct = 0; ct < digi.ndigi; ct++) + fsa->fsa_digipeater[ct] = digi.calls[ct]; + } + msg->msg_namelen = sizeof(struct full_sockaddr_ax25); + } + + skb_free_datagram(sk, skb); + err = copied; + +out: + release_sock(sk); + + return err; +} + +static int ax25_shutdown(struct socket *sk, int how) +{ + /* FIXME - generate DM and RNR states */ + return -EOPNOTSUPP; +} + +static int ax25_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) +{ + struct sock *sk = sock->sk; + void __user *argp = (void __user *)arg; + int res = 0; + + lock_sock(sk); + switch (cmd) { + case TIOCOUTQ: { + long amount; + + amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk); + if (amount < 0) + amount = 0; + res = put_user(amount, (int __user *)argp); + break; + } + + case TIOCINQ: { + struct sk_buff *skb; + long amount = 0L; + /* These two are safe on a single CPU system as only user tasks fiddle here */ + if ((skb = skb_peek(&sk->sk_receive_queue)) != NULL) + amount = skb->len; + res = put_user(amount, (int __user *) argp); + break; + } + + case SIOCGSTAMP: + res = sock_get_timestamp(sk, argp); + break; + + case SIOCGSTAMPNS: + res = sock_get_timestampns(sk, argp); + break; + + case SIOCAX25ADDUID: /* Add a uid to the uid/call map table */ + case SIOCAX25DELUID: /* Delete a uid from the uid/call map table */ + case SIOCAX25GETUID: { + struct sockaddr_ax25 sax25; + if (copy_from_user(&sax25, argp, sizeof(sax25))) { + res = -EFAULT; + break; + } + res = ax25_uid_ioctl(cmd, &sax25); + break; + } + + case SIOCAX25NOUID: { /* Set the default policy (default/bar) */ + long amount; + if (!capable(CAP_NET_ADMIN)) { + res = -EPERM; + break; + } + if (get_user(amount, (long __user *)argp)) { + res = -EFAULT; + break; + } + if (amount < 0 || amount > AX25_NOUID_BLOCK) { + res = -EINVAL; + break; + } + ax25_uid_policy = amount; + res = 0; + break; + } + + case SIOCADDRT: + case SIOCDELRT: + case SIOCAX25OPTRT: + if (!capable(CAP_NET_ADMIN)) { + res = -EPERM; + break; + } + res = ax25_rt_ioctl(cmd, argp); + break; + + case SIOCAX25CTLCON: + if (!capable(CAP_NET_ADMIN)) { + res = -EPERM; + break; + } + res = ax25_ctl_ioctl(cmd, argp); + break; + + case SIOCAX25GETINFO: + case SIOCAX25GETINFOOLD: { + ax25_cb *ax25 = sk_to_ax25(sk); + struct ax25_info_struct ax25_info; + + ax25_info.t1 = ax25->t1 / HZ; + ax25_info.t2 = ax25->t2 / HZ; + ax25_info.t3 = ax25->t3 / HZ; + ax25_info.idle = ax25->idle / (60 * HZ); + ax25_info.n2 = ax25->n2; + ax25_info.t1timer = ax25_display_timer(&ax25->t1timer) / HZ; + ax25_info.t2timer = ax25_display_timer(&ax25->t2timer) / HZ; + ax25_info.t3timer = ax25_display_timer(&ax25->t3timer) / HZ; + ax25_info.idletimer = ax25_display_timer(&ax25->idletimer) / (60 * HZ); + ax25_info.n2count = ax25->n2count; + ax25_info.state = ax25->state; + ax25_info.rcv_q = sk_rmem_alloc_get(sk); + ax25_info.snd_q = sk_wmem_alloc_get(sk); + ax25_info.vs = ax25->vs; + ax25_info.vr = ax25->vr; + ax25_info.va = ax25->va; + ax25_info.vs_max = ax25->vs; /* reserved */ + ax25_info.paclen = ax25->paclen; + ax25_info.window = ax25->window; + + /* old structure? */ + if (cmd == SIOCAX25GETINFOOLD) { + static int warned = 0; + if (!warned) { + printk(KERN_INFO "%s uses old SIOCAX25GETINFO\n", + current->comm); + warned=1; + } + + if (copy_to_user(argp, &ax25_info, sizeof(struct ax25_info_struct_deprecated))) { + res = -EFAULT; + break; + } + } else { + if (copy_to_user(argp, &ax25_info, sizeof(struct ax25_info_struct))) { + res = -EINVAL; + break; + } + } + res = 0; + break; + } + + case SIOCAX25ADDFWD: + case SIOCAX25DELFWD: { + struct ax25_fwd_struct ax25_fwd; + if (!capable(CAP_NET_ADMIN)) { + res = -EPERM; + break; + } + if (copy_from_user(&ax25_fwd, argp, sizeof(ax25_fwd))) { + res = -EFAULT; + break; + } + res = ax25_fwd_ioctl(cmd, &ax25_fwd); + break; + } + + case SIOCGIFADDR: + case SIOCSIFADDR: + case SIOCGIFDSTADDR: + case SIOCSIFDSTADDR: + case SIOCGIFBRDADDR: + case SIOCSIFBRDADDR: + case SIOCGIFNETMASK: + case SIOCSIFNETMASK: + case SIOCGIFMETRIC: + case SIOCSIFMETRIC: + res = -EINVAL; + break; + + default: + res = -ENOIOCTLCMD; + break; + } + release_sock(sk); + + return res; +} + +#ifdef CONFIG_PROC_FS + +static void *ax25_info_start(struct seq_file *seq, loff_t *pos) + __acquires(ax25_list_lock) +{ + spin_lock_bh(&ax25_list_lock); + return seq_hlist_start(&ax25_list, *pos); +} + +static void *ax25_info_next(struct seq_file *seq, void *v, loff_t *pos) +{ + return seq_hlist_next(v, &ax25_list, pos); +} + +static void ax25_info_stop(struct seq_file *seq, void *v) + __releases(ax25_list_lock) +{ + spin_unlock_bh(&ax25_list_lock); +} + +static int ax25_info_show(struct seq_file *seq, void *v) +{ + ax25_cb *ax25 = hlist_entry(v, struct ax25_cb, ax25_node); + char buf[11]; + int k; + + + /* + * New format: + * magic dev src_addr dest_addr,digi1,digi2,.. st vs vr va t1 t1 t2 t2 t3 t3 idle idle n2 n2 rtt window paclen Snd-Q Rcv-Q inode + */ + + seq_printf(seq, "%8.8lx %s %s%s ", + (long) ax25, + ax25->ax25_dev == NULL? "???" : ax25->ax25_dev->dev->name, + ax2asc(buf, &ax25->source_addr), + ax25->iamdigi? "*":""); + seq_printf(seq, "%s", ax2asc(buf, &ax25->dest_addr)); + + for (k=0; (ax25->digipeat != NULL) && (k < ax25->digipeat->ndigi); k++) { + seq_printf(seq, ",%s%s", + ax2asc(buf, &ax25->digipeat->calls[k]), + ax25->digipeat->repeated[k]? "*":""); + } + + seq_printf(seq, " %d %d %d %d %lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %d %d", + ax25->state, + ax25->vs, ax25->vr, ax25->va, + ax25_display_timer(&ax25->t1timer) / HZ, ax25->t1 / HZ, + ax25_display_timer(&ax25->t2timer) / HZ, ax25->t2 / HZ, + ax25_display_timer(&ax25->t3timer) / HZ, ax25->t3 / HZ, + ax25_display_timer(&ax25->idletimer) / (60 * HZ), + ax25->idle / (60 * HZ), + ax25->n2count, ax25->n2, + ax25->rtt / HZ, + ax25->window, + ax25->paclen); + + if (ax25->sk != NULL) { + seq_printf(seq, " %d %d %lu\n", + sk_wmem_alloc_get(ax25->sk), + sk_rmem_alloc_get(ax25->sk), + sock_i_ino(ax25->sk)); + } else { + seq_puts(seq, " * * *\n"); + } + return 0; +} + +static const struct seq_operations ax25_info_seqops = { + .start = ax25_info_start, + .next = ax25_info_next, + .stop = ax25_info_stop, + .show = ax25_info_show, +}; +#endif + +static const struct net_proto_family ax25_family_ops = { + .family = PF_AX25, + .create = ax25_create, + .owner = THIS_MODULE, +}; + +static const struct proto_ops ax25_proto_ops = { + .family = PF_AX25, + .owner = THIS_MODULE, + .release = ax25_release, + .bind = ax25_bind, + .connect = ax25_connect, + .socketpair = sock_no_socketpair, + .accept = ax25_accept, + .getname = ax25_getname, + .poll = datagram_poll, + .ioctl = ax25_ioctl, + .listen = ax25_listen, + .shutdown = ax25_shutdown, + .setsockopt = ax25_setsockopt, + .getsockopt = ax25_getsockopt, + .sendmsg = ax25_sendmsg, + .recvmsg = ax25_recvmsg, + .mmap = sock_no_mmap, + .sendpage = sock_no_sendpage, +}; + +/* + * Called by socket.c on kernel start up + */ +static struct packet_type ax25_packet_type __read_mostly = { + .type = cpu_to_be16(ETH_P_AX25), + .func = ax25_kiss_rcv, +}; + +static struct notifier_block ax25_dev_notifier = { + .notifier_call = ax25_device_event, +}; + +static int __init ax25_init(void) +{ + int rc = proto_register(&ax25_proto, 0); + + if (rc != 0) + goto out; + + sock_register(&ax25_family_ops); + dev_add_pack(&ax25_packet_type); + register_netdevice_notifier(&ax25_dev_notifier); + + proc_create_seq("ax25_route", 0444, init_net.proc_net, &ax25_rt_seqops); + proc_create_seq("ax25", 0444, init_net.proc_net, &ax25_info_seqops); + proc_create_seq("ax25_calls", 0444, init_net.proc_net, + &ax25_uid_seqops); +out: + return rc; +} +module_init(ax25_init); + + +MODULE_AUTHOR("Jonathan Naylor G4KLX "); +MODULE_DESCRIPTION("The amateur radio AX.25 link layer protocol"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS_NETPROTO(PF_AX25); + +static void __exit ax25_exit(void) +{ + remove_proc_entry("ax25_route", init_net.proc_net); + remove_proc_entry("ax25", init_net.proc_net); + remove_proc_entry("ax25_calls", init_net.proc_net); + + unregister_netdevice_notifier(&ax25_dev_notifier); + + dev_remove_pack(&ax25_packet_type); + + sock_unregister(PF_AX25); + proto_unregister(&ax25_proto); + + ax25_rt_free(); + ax25_uid_free(); + ax25_dev_free(); +} +module_exit(ax25_exit); \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/af_ax25.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/af_ax25.c.yml new file mode 100644 index 00000000000..3945057ff64 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/af_ax25.c.yml @@ -0,0 +1,22 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk) + - Copyright (c) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + - Copyright (c) Darryl Miles G7LED (dlm@g7led.demon.co.uk) + - Copyright (c) Steven Whitehouse GW7RRM (stevew@acm.org) + - Copyright (c) Joerg Reuter DL1BKE (jreuter@yaina.de) + - Copyright (c) Hans-Joachim Hetscher DD8NE (dd8ne@bnv-bamberg.de) + - Copyright (c) Hans Alblas PE1AYX (hans@esrac.ele.tue.nl) + - Copyright (c) Frederic Rible F1OAT (frible@teaser.fr) +holders: + - Alan Cox GW4PTS + - Jonathan Naylor G4KLX + - Darryl Miles G7LED + - Steven Whitehouse GW7RRM + - Joerg Reuter DL1BKE + - Hans-Joachim Hetscher DD8NE + - Hans Alblas PE1AYX + - Frederic Rible F1OAT diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_std_in.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_std_in.c new file mode 100644 index 00000000000..e52c00f6115 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_std_in.c @@ -0,0 +1,446 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Copyright (C) Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk) + * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + * Copyright (C) Joerg Reuter DL1BKE (jreuter@yaina.de) + * Copyright (C) Hans-Joachim Hetscher DD8NE (dd8ne@bnv-bamberg.de) + * + * Most of this code is based on the SDL diagrams published in the 7th ARRL + * Computer Networking Conference papers. The diagrams have mistakes in them, + * but are mostly correct. Before you modify the code could you read the SDL + * diagrams as the code is not obvious and probably very easy to break. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * State machine for state 1, Awaiting Connection State. + * The handling of the timer(s) is in file ax25_std_timer.c. + * Handling of state 0 and connection release is in ax25.c. + */ +static int ax25_std_state1_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int pf, int type) +{ + switch (frametype) { + case AX25_SABM: + ax25->modulus = AX25_MODULUS; + ax25->window = ax25->ax25_dev->values[AX25_VALUES_WINDOW]; + ax25_send_control(ax25, AX25_UA, pf, AX25_RESPONSE); + break; + + case AX25_SABME: + ax25->modulus = AX25_EMODULUS; + ax25->window = ax25->ax25_dev->values[AX25_VALUES_EWINDOW]; + ax25_send_control(ax25, AX25_UA, pf, AX25_RESPONSE); + break; + + case AX25_DISC: + ax25_send_control(ax25, AX25_DM, pf, AX25_RESPONSE); + break; + + case AX25_UA: + if (pf) { + ax25_calculate_rtt(ax25); + ax25_stop_t1timer(ax25); + ax25_start_t3timer(ax25); + ax25_start_idletimer(ax25); + ax25->vs = 0; + ax25->va = 0; + ax25->vr = 0; + ax25->state = AX25_STATE_3; + ax25->n2count = 0; + if (ax25->sk != NULL) { + bh_lock_sock(ax25->sk); + ax25->sk->sk_state = TCP_ESTABLISHED; + /* For WAIT_SABM connections we will produce an accept ready socket here */ + if (!sock_flag(ax25->sk, SOCK_DEAD)) + ax25->sk->sk_state_change(ax25->sk); + bh_unlock_sock(ax25->sk); + } + } + break; + + case AX25_DM: + if (pf) { + if (ax25->modulus == AX25_MODULUS) { + ax25_disconnect(ax25, ECONNREFUSED); + } else { + ax25->modulus = AX25_MODULUS; + ax25->window = ax25->ax25_dev->values[AX25_VALUES_WINDOW]; + } + } + break; + + default: + break; + } + + return 0; +} + +/* + * State machine for state 2, Awaiting Release State. + * The handling of the timer(s) is in file ax25_std_timer.c + * Handling of state 0 and connection release is in ax25.c. + */ +static int ax25_std_state2_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int pf, int type) +{ + switch (frametype) { + case AX25_SABM: + case AX25_SABME: + ax25_send_control(ax25, AX25_DM, pf, AX25_RESPONSE); + break; + + case AX25_DISC: + ax25_send_control(ax25, AX25_UA, pf, AX25_RESPONSE); + ax25_disconnect(ax25, 0); + break; + + case AX25_DM: + case AX25_UA: + if (pf) + ax25_disconnect(ax25, 0); + break; + + case AX25_I: + case AX25_REJ: + case AX25_RNR: + case AX25_RR: + if (pf) ax25_send_control(ax25, AX25_DM, AX25_POLLON, AX25_RESPONSE); + break; + + default: + break; + } + + return 0; +} + +/* + * State machine for state 3, Connected State. + * The handling of the timer(s) is in file ax25_std_timer.c + * Handling of state 0 and connection release is in ax25.c. + */ +static int ax25_std_state3_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int ns, int nr, int pf, int type) +{ + int queued = 0; + + switch (frametype) { + case AX25_SABM: + case AX25_SABME: + if (frametype == AX25_SABM) { + ax25->modulus = AX25_MODULUS; + ax25->window = ax25->ax25_dev->values[AX25_VALUES_WINDOW]; + } else { + ax25->modulus = AX25_EMODULUS; + ax25->window = ax25->ax25_dev->values[AX25_VALUES_EWINDOW]; + } + ax25_send_control(ax25, AX25_UA, pf, AX25_RESPONSE); + ax25_stop_t1timer(ax25); + ax25_stop_t2timer(ax25); + ax25_start_t3timer(ax25); + ax25_start_idletimer(ax25); + ax25->condition = 0x00; + ax25->vs = 0; + ax25->va = 0; + ax25->vr = 0; + ax25_requeue_frames(ax25); + break; + + case AX25_DISC: + ax25_send_control(ax25, AX25_UA, pf, AX25_RESPONSE); + ax25_disconnect(ax25, 0); + break; + + case AX25_DM: + ax25_disconnect(ax25, ECONNRESET); + break; + + case AX25_RR: + case AX25_RNR: + if (frametype == AX25_RR) + ax25->condition &= ~AX25_COND_PEER_RX_BUSY; + else + ax25->condition |= AX25_COND_PEER_RX_BUSY; + if (type == AX25_COMMAND && pf) + ax25_std_enquiry_response(ax25); + if (ax25_validate_nr(ax25, nr)) { + ax25_check_iframes_acked(ax25, nr); + } else { + ax25_std_nr_error_recovery(ax25); + ax25->state = AX25_STATE_1; + } + break; + + case AX25_REJ: + ax25->condition &= ~AX25_COND_PEER_RX_BUSY; + if (type == AX25_COMMAND && pf) + ax25_std_enquiry_response(ax25); + if (ax25_validate_nr(ax25, nr)) { + ax25_frames_acked(ax25, nr); + ax25_calculate_rtt(ax25); + ax25_stop_t1timer(ax25); + ax25_start_t3timer(ax25); + ax25_requeue_frames(ax25); + } else { + ax25_std_nr_error_recovery(ax25); + ax25->state = AX25_STATE_1; + } + break; + + case AX25_I: + if (!ax25_validate_nr(ax25, nr)) { + ax25_std_nr_error_recovery(ax25); + ax25->state = AX25_STATE_1; + break; + } + if (ax25->condition & AX25_COND_PEER_RX_BUSY) { + ax25_frames_acked(ax25, nr); + } else { + ax25_check_iframes_acked(ax25, nr); + } + if (ax25->condition & AX25_COND_OWN_RX_BUSY) { + if (pf) ax25_std_enquiry_response(ax25); + break; + } + if (ns == ax25->vr) { + ax25->vr = (ax25->vr + 1) % ax25->modulus; + queued = ax25_rx_iframe(ax25, skb); + if (ax25->condition & AX25_COND_OWN_RX_BUSY) + ax25->vr = ns; /* ax25->vr - 1 */ + ax25->condition &= ~AX25_COND_REJECT; + if (pf) { + ax25_std_enquiry_response(ax25); + } else { + if (!(ax25->condition & AX25_COND_ACK_PENDING)) { + ax25->condition |= AX25_COND_ACK_PENDING; + ax25_start_t2timer(ax25); + } + } + } else { + if (ax25->condition & AX25_COND_REJECT) { + if (pf) ax25_std_enquiry_response(ax25); + } else { + ax25->condition |= AX25_COND_REJECT; + ax25_send_control(ax25, AX25_REJ, pf, AX25_RESPONSE); + ax25->condition &= ~AX25_COND_ACK_PENDING; + } + } + break; + + case AX25_FRMR: + case AX25_ILLEGAL: + ax25_std_establish_data_link(ax25); + ax25->state = AX25_STATE_1; + break; + + default: + break; + } + + return queued; +} + +/* + * State machine for state 4, Timer Recovery State. + * The handling of the timer(s) is in file ax25_std_timer.c + * Handling of state 0 and connection release is in ax25.c. + */ +static int ax25_std_state4_machine(ax25_cb *ax25, struct sk_buff *skb, int frametype, int ns, int nr, int pf, int type) +{ + int queued = 0; + + switch (frametype) { + case AX25_SABM: + case AX25_SABME: + if (frametype == AX25_SABM) { + ax25->modulus = AX25_MODULUS; + ax25->window = ax25->ax25_dev->values[AX25_VALUES_WINDOW]; + } else { + ax25->modulus = AX25_EMODULUS; + ax25->window = ax25->ax25_dev->values[AX25_VALUES_EWINDOW]; + } + ax25_send_control(ax25, AX25_UA, pf, AX25_RESPONSE); + ax25_stop_t1timer(ax25); + ax25_stop_t2timer(ax25); + ax25_start_t3timer(ax25); + ax25_start_idletimer(ax25); + ax25->condition = 0x00; + ax25->vs = 0; + ax25->va = 0; + ax25->vr = 0; + ax25->state = AX25_STATE_3; + ax25->n2count = 0; + ax25_requeue_frames(ax25); + break; + + case AX25_DISC: + ax25_send_control(ax25, AX25_UA, pf, AX25_RESPONSE); + ax25_disconnect(ax25, 0); + break; + + case AX25_DM: + ax25_disconnect(ax25, ECONNRESET); + break; + + case AX25_RR: + case AX25_RNR: + if (frametype == AX25_RR) + ax25->condition &= ~AX25_COND_PEER_RX_BUSY; + else + ax25->condition |= AX25_COND_PEER_RX_BUSY; + if (type == AX25_RESPONSE && pf) { + ax25_stop_t1timer(ax25); + ax25->n2count = 0; + if (ax25_validate_nr(ax25, nr)) { + ax25_frames_acked(ax25, nr); + if (ax25->vs == ax25->va) { + ax25_start_t3timer(ax25); + ax25->state = AX25_STATE_3; + } else { + ax25_requeue_frames(ax25); + } + } else { + ax25_std_nr_error_recovery(ax25); + ax25->state = AX25_STATE_1; + } + break; + } + if (type == AX25_COMMAND && pf) + ax25_std_enquiry_response(ax25); + if (ax25_validate_nr(ax25, nr)) { + ax25_frames_acked(ax25, nr); + } else { + ax25_std_nr_error_recovery(ax25); + ax25->state = AX25_STATE_1; + } + break; + + case AX25_REJ: + ax25->condition &= ~AX25_COND_PEER_RX_BUSY; + if (pf && type == AX25_RESPONSE) { + ax25_stop_t1timer(ax25); + ax25->n2count = 0; + if (ax25_validate_nr(ax25, nr)) { + ax25_frames_acked(ax25, nr); + if (ax25->vs == ax25->va) { + ax25_start_t3timer(ax25); + ax25->state = AX25_STATE_3; + } else { + ax25_requeue_frames(ax25); + } + } else { + ax25_std_nr_error_recovery(ax25); + ax25->state = AX25_STATE_1; + } + break; + } + if (type == AX25_COMMAND && pf) + ax25_std_enquiry_response(ax25); + if (ax25_validate_nr(ax25, nr)) { + ax25_frames_acked(ax25, nr); + ax25_requeue_frames(ax25); + } else { + ax25_std_nr_error_recovery(ax25); + ax25->state = AX25_STATE_1; + } + break; + + case AX25_I: + if (!ax25_validate_nr(ax25, nr)) { + ax25_std_nr_error_recovery(ax25); + ax25->state = AX25_STATE_1; + break; + } + ax25_frames_acked(ax25, nr); + if (ax25->condition & AX25_COND_OWN_RX_BUSY) { + if (pf) + ax25_std_enquiry_response(ax25); + break; + } + if (ns == ax25->vr) { + ax25->vr = (ax25->vr + 1) % ax25->modulus; + queued = ax25_rx_iframe(ax25, skb); + if (ax25->condition & AX25_COND_OWN_RX_BUSY) + ax25->vr = ns; /* ax25->vr - 1 */ + ax25->condition &= ~AX25_COND_REJECT; + if (pf) { + ax25_std_enquiry_response(ax25); + } else { + if (!(ax25->condition & AX25_COND_ACK_PENDING)) { + ax25->condition |= AX25_COND_ACK_PENDING; + ax25_start_t2timer(ax25); + } + } + } else { + if (ax25->condition & AX25_COND_REJECT) { + if (pf) ax25_std_enquiry_response(ax25); + } else { + ax25->condition |= AX25_COND_REJECT; + ax25_send_control(ax25, AX25_REJ, pf, AX25_RESPONSE); + ax25->condition &= ~AX25_COND_ACK_PENDING; + } + } + break; + + case AX25_FRMR: + case AX25_ILLEGAL: + ax25_std_establish_data_link(ax25); + ax25->state = AX25_STATE_1; + break; + + default: + break; + } + + return queued; +} + +/* + * Higher level upcall for a LAPB frame + */ +int ax25_std_frame_in(ax25_cb *ax25, struct sk_buff *skb, int type) +{ + int queued = 0, frametype, ns, nr, pf; + + frametype = ax25_decode(ax25, skb, &ns, &nr, &pf); + + switch (ax25->state) { + case AX25_STATE_1: + queued = ax25_std_state1_machine(ax25, skb, frametype, pf, type); + break; + case AX25_STATE_2: + queued = ax25_std_state2_machine(ax25, skb, frametype, pf, type); + break; + case AX25_STATE_3: + queued = ax25_std_state3_machine(ax25, skb, frametype, ns, nr, pf, type); + break; + case AX25_STATE_4: + queued = ax25_std_state4_machine(ax25, skb, frametype, ns, nr, pf, type); + break; + } + + ax25_kick(ax25); + + return queued; +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_std_in.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_std_in.c.yml new file mode 100644 index 00000000000..14c41707e84 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_std_in.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk) + - Copyright (c) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + - Copyright (c) Joerg Reuter DL1BKE (jreuter@yaina.de) + - Copyright (c) Hans-Joachim Hetscher DD8NE (dd8ne@bnv-bamberg.de) +holders: + - Alan Cox GW4PTS + - Jonathan Naylor G4KLX + - Joerg Reuter DL1BKE + - Hans-Joachim Hetscher DD8NE diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_subr.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_subr.c new file mode 100644 index 00000000000..09e50aa4d30 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_subr.c @@ -0,0 +1,291 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Copyright (C) Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk) + * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + * Copyright (C) Joerg Reuter DL1BKE (jreuter@yaina.de) + * Copyright (C) Frederic Rible F1OAT (frible@teaser.fr) + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * This routine purges all the queues of frames. + */ +void ax25_clear_queues(ax25_cb *ax25) +{ + skb_queue_purge(&ax25->write_queue); + skb_queue_purge(&ax25->ack_queue); + skb_queue_purge(&ax25->reseq_queue); + skb_queue_purge(&ax25->frag_queue); +} + +/* + * This routine purges the input queue of those frames that have been + * acknowledged. This replaces the boxes labelled "V(a) <- N(r)" on the + * SDL diagram. + */ +void ax25_frames_acked(ax25_cb *ax25, unsigned short nr) +{ + struct sk_buff *skb; + + /* + * Remove all the ack-ed frames from the ack queue. + */ + if (ax25->va != nr) { + while (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) { + skb = skb_dequeue(&ax25->ack_queue); + kfree_skb(skb); + ax25->va = (ax25->va + 1) % ax25->modulus; + } + } +} + +void ax25_requeue_frames(ax25_cb *ax25) +{ + struct sk_buff *skb; + + /* + * Requeue all the un-ack-ed frames on the output queue to be picked + * up by ax25_kick called from the timer. This arrangement handles the + * possibility of an empty output queue. + */ + while ((skb = skb_dequeue_tail(&ax25->ack_queue)) != NULL) + skb_queue_head(&ax25->write_queue, skb); +} + +/* + * Validate that the value of nr is between va and vs. Return true or + * false for testing. + */ +int ax25_validate_nr(ax25_cb *ax25, unsigned short nr) +{ + unsigned short vc = ax25->va; + + while (vc != ax25->vs) { + if (nr == vc) return 1; + vc = (vc + 1) % ax25->modulus; + } + + if (nr == ax25->vs) return 1; + + return 0; +} + +/* + * This routine is the centralised routine for parsing the control + * information for the different frame formats. + */ +int ax25_decode(ax25_cb *ax25, struct sk_buff *skb, int *ns, int *nr, int *pf) +{ + unsigned char *frame; + int frametype = AX25_ILLEGAL; + + frame = skb->data; + *ns = *nr = *pf = 0; + + if (ax25->modulus == AX25_MODULUS) { + if ((frame[0] & AX25_S) == 0) { + frametype = AX25_I; /* I frame - carries NR/NS/PF */ + *ns = (frame[0] >> 1) & 0x07; + *nr = (frame[0] >> 5) & 0x07; + *pf = frame[0] & AX25_PF; + } else if ((frame[0] & AX25_U) == 1) { /* S frame - take out PF/NR */ + frametype = frame[0] & 0x0F; + *nr = (frame[0] >> 5) & 0x07; + *pf = frame[0] & AX25_PF; + } else if ((frame[0] & AX25_U) == 3) { /* U frame - take out PF */ + frametype = frame[0] & ~AX25_PF; + *pf = frame[0] & AX25_PF; + } + skb_pull(skb, 1); + } else { + if ((frame[0] & AX25_S) == 0) { + frametype = AX25_I; /* I frame - carries NR/NS/PF */ + *ns = (frame[0] >> 1) & 0x7F; + *nr = (frame[1] >> 1) & 0x7F; + *pf = frame[1] & AX25_EPF; + skb_pull(skb, 2); + } else if ((frame[0] & AX25_U) == 1) { /* S frame - take out PF/NR */ + frametype = frame[0] & 0x0F; + *nr = (frame[1] >> 1) & 0x7F; + *pf = frame[1] & AX25_EPF; + skb_pull(skb, 2); + } else if ((frame[0] & AX25_U) == 3) { /* U frame - take out PF */ + frametype = frame[0] & ~AX25_PF; + *pf = frame[0] & AX25_PF; + skb_pull(skb, 1); + } + } + + return frametype; +} + +/* + * This routine is called when the HDLC layer internally generates a + * command or response for the remote machine ( eg. RR, UA etc. ). + * Only supervisory or unnumbered frames are processed. + */ +void ax25_send_control(ax25_cb *ax25, int frametype, int poll_bit, int type) +{ + struct sk_buff *skb; + unsigned char *dptr; + + if ((skb = alloc_skb(ax25->ax25_dev->dev->hard_header_len + 2, GFP_ATOMIC)) == NULL) + return; + + skb_reserve(skb, ax25->ax25_dev->dev->hard_header_len); + + skb_reset_network_header(skb); + + /* Assume a response - address structure for DTE */ + if (ax25->modulus == AX25_MODULUS) { + dptr = skb_put(skb, 1); + *dptr = frametype; + *dptr |= (poll_bit) ? AX25_PF : 0; + if ((frametype & AX25_U) == AX25_S) /* S frames carry NR */ + *dptr |= (ax25->vr << 5); + } else { + if ((frametype & AX25_U) == AX25_U) { + dptr = skb_put(skb, 1); + *dptr = frametype; + *dptr |= (poll_bit) ? AX25_PF : 0; + } else { + dptr = skb_put(skb, 2); + dptr[0] = frametype; + dptr[1] = (ax25->vr << 1); + dptr[1] |= (poll_bit) ? AX25_EPF : 0; + } + } + + ax25_transmit_buffer(ax25, skb, type); +} + +/* + * Send a 'DM' to an unknown connection attempt, or an invalid caller. + * + * Note: src here is the sender, thus it's the target of the DM + */ +void ax25_return_dm(struct net_device *dev, ax25_address *src, ax25_address *dest, ax25_digi *digi) +{ + struct sk_buff *skb; + char *dptr; + ax25_digi retdigi; + + if (dev == NULL) + return; + + if ((skb = alloc_skb(dev->hard_header_len + 1, GFP_ATOMIC)) == NULL) + return; /* Next SABM will get DM'd */ + + skb_reserve(skb, dev->hard_header_len); + skb_reset_network_header(skb); + + ax25_digi_invert(digi, &retdigi); + + dptr = skb_put(skb, 1); + + *dptr = AX25_DM | AX25_PF; + + /* + * Do the address ourselves + */ + dptr = skb_push(skb, ax25_addr_size(digi)); + dptr += ax25_addr_build(dptr, dest, src, &retdigi, AX25_RESPONSE, AX25_MODULUS); + + ax25_queue_xmit(skb, dev); +} + +/* + * Exponential backoff for AX.25 + */ +void ax25_calculate_t1(ax25_cb *ax25) +{ + int n, t = 2; + + switch (ax25->backoff) { + case 0: + break; + + case 1: + t += 2 * ax25->n2count; + break; + + case 2: + for (n = 0; n < ax25->n2count; n++) + t *= 2; + if (t > 8) t = 8; + break; + } + + ax25->t1 = t * ax25->rtt; +} + +/* + * Calculate the Round Trip Time + */ +void ax25_calculate_rtt(ax25_cb *ax25) +{ + if (ax25->backoff == 0) + return; + + if (ax25_t1timer_running(ax25) && ax25->n2count == 0) + ax25->rtt = (9 * ax25->rtt + ax25->t1 - ax25_display_timer(&ax25->t1timer)) / 10; + + if (ax25->rtt < AX25_T1CLAMPLO) + ax25->rtt = AX25_T1CLAMPLO; + + if (ax25->rtt > AX25_T1CLAMPHI) + ax25->rtt = AX25_T1CLAMPHI; +} + +void ax25_disconnect(ax25_cb *ax25, int reason) +{ + ax25_clear_queues(ax25); + + if (!ax25->sk || !sock_flag(ax25->sk, SOCK_DESTROY)) + ax25_stop_heartbeat(ax25); + ax25_stop_t1timer(ax25); + ax25_stop_t2timer(ax25); + ax25_stop_t3timer(ax25); + ax25_stop_idletimer(ax25); + + ax25->state = AX25_STATE_0; + + ax25_link_failed(ax25, reason); + + if (ax25->sk != NULL) { + local_bh_disable(); + bh_lock_sock(ax25->sk); + ax25->sk->sk_state = TCP_CLOSE; + ax25->sk->sk_err = reason; + ax25->sk->sk_shutdown |= SEND_SHUTDOWN; + if (!sock_flag(ax25->sk, SOCK_DEAD)) { + ax25->sk->sk_state_change(ax25->sk); + sock_set_flag(ax25->sk, SOCK_DEAD); + } + bh_unlock_sock(ax25->sk); + local_bh_enable(); + } +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_subr.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_subr.c.yml new file mode 100644 index 00000000000..4f832478a1d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_subr.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk) + - Copyright (c) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + - Copyright (c) Joerg Reuter DL1BKE (jreuter@yaina.de) + - Copyright (c) Frederic Rible F1OAT (frible@teaser.fr) +holders: + - Alan Cox GW4PTS + - Jonathan Naylor G4KLX + - Joerg Reuter DL1BKE + - Frederic Rible F1OAT diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_timer.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_timer.c new file mode 100644 index 00000000000..66489058475 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_timer.c @@ -0,0 +1,225 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Copyright (C) Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk) + * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + * Copyright (C) Tomi Manninen OH2BNS (oh2bns@sral.fi) + * Copyright (C) Darryl Miles G7LED (dlm@g7led.demon.co.uk) + * Copyright (C) Joerg Reuter DL1BKE (jreuter@yaina.de) + * Copyright (C) Frederic Rible F1OAT (frible@teaser.fr) + * Copyright (C) 2002 Ralf Baechle DO1GRB (ralf@gnu.org) + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void ax25_heartbeat_expiry(struct timer_list *); +static void ax25_t1timer_expiry(struct timer_list *); +static void ax25_t2timer_expiry(struct timer_list *); +static void ax25_t3timer_expiry(struct timer_list *); +static void ax25_idletimer_expiry(struct timer_list *); + +void ax25_setup_timers(ax25_cb *ax25) +{ + timer_setup(&ax25->timer, ax25_heartbeat_expiry, 0); + timer_setup(&ax25->t1timer, ax25_t1timer_expiry, 0); + timer_setup(&ax25->t2timer, ax25_t2timer_expiry, 0); + timer_setup(&ax25->t3timer, ax25_t3timer_expiry, 0); + timer_setup(&ax25->idletimer, ax25_idletimer_expiry, 0); +} + +void ax25_start_heartbeat(ax25_cb *ax25) +{ + mod_timer(&ax25->timer, jiffies + 5 * HZ); +} + +void ax25_start_t1timer(ax25_cb *ax25) +{ + mod_timer(&ax25->t1timer, jiffies + ax25->t1); +} + +void ax25_start_t2timer(ax25_cb *ax25) +{ + mod_timer(&ax25->t2timer, jiffies + ax25->t2); +} + +void ax25_start_t3timer(ax25_cb *ax25) +{ + if (ax25->t3 > 0) + mod_timer(&ax25->t3timer, jiffies + ax25->t3); + else + del_timer(&ax25->t3timer); +} + +void ax25_start_idletimer(ax25_cb *ax25) +{ + if (ax25->idle > 0) + mod_timer(&ax25->idletimer, jiffies + ax25->idle); + else + del_timer(&ax25->idletimer); +} + +void ax25_stop_heartbeat(ax25_cb *ax25) +{ + del_timer(&ax25->timer); +} + +void ax25_stop_t1timer(ax25_cb *ax25) +{ + del_timer(&ax25->t1timer); +} + +void ax25_stop_t2timer(ax25_cb *ax25) +{ + del_timer(&ax25->t2timer); +} + +void ax25_stop_t3timer(ax25_cb *ax25) +{ + del_timer(&ax25->t3timer); +} + +void ax25_stop_idletimer(ax25_cb *ax25) +{ + del_timer(&ax25->idletimer); +} + +int ax25_t1timer_running(ax25_cb *ax25) +{ + return timer_pending(&ax25->t1timer); +} + +unsigned long ax25_display_timer(struct timer_list *timer) +{ + if (!timer_pending(timer)) + return 0; + + return timer->expires - jiffies; +} + +EXPORT_SYMBOL(ax25_display_timer); + +static void ax25_heartbeat_expiry(struct timer_list *t) +{ + int proto = AX25_PROTO_STD_SIMPLEX; + ax25_cb *ax25 = from_timer(ax25, t, timer); + + if (ax25->ax25_dev) + proto = ax25->ax25_dev->values[AX25_VALUES_PROTOCOL]; + + switch (proto) { + case AX25_PROTO_STD_SIMPLEX: + case AX25_PROTO_STD_DUPLEX: + ax25_std_heartbeat_expiry(ax25); + break; + +#ifdef CONFIG_AX25_DAMA_SLAVE + case AX25_PROTO_DAMA_SLAVE: + if (ax25->ax25_dev->dama.slave) + ax25_ds_heartbeat_expiry(ax25); + else + ax25_std_heartbeat_expiry(ax25); + break; +#endif + } +} + +static void ax25_t1timer_expiry(struct timer_list *t) +{ + ax25_cb *ax25 = from_timer(ax25, t, t1timer); + + switch (ax25->ax25_dev->values[AX25_VALUES_PROTOCOL]) { + case AX25_PROTO_STD_SIMPLEX: + case AX25_PROTO_STD_DUPLEX: + ax25_std_t1timer_expiry(ax25); + break; + +#ifdef CONFIG_AX25_DAMA_SLAVE + case AX25_PROTO_DAMA_SLAVE: + if (!ax25->ax25_dev->dama.slave) + ax25_std_t1timer_expiry(ax25); + break; +#endif + } +} + +static void ax25_t2timer_expiry(struct timer_list *t) +{ + ax25_cb *ax25 = from_timer(ax25, t, t2timer); + + switch (ax25->ax25_dev->values[AX25_VALUES_PROTOCOL]) { + case AX25_PROTO_STD_SIMPLEX: + case AX25_PROTO_STD_DUPLEX: + ax25_std_t2timer_expiry(ax25); + break; + +#ifdef CONFIG_AX25_DAMA_SLAVE + case AX25_PROTO_DAMA_SLAVE: + if (!ax25->ax25_dev->dama.slave) + ax25_std_t2timer_expiry(ax25); + break; +#endif + } +} + +static void ax25_t3timer_expiry(struct timer_list *t) +{ + ax25_cb *ax25 = from_timer(ax25, t, t3timer); + + switch (ax25->ax25_dev->values[AX25_VALUES_PROTOCOL]) { + case AX25_PROTO_STD_SIMPLEX: + case AX25_PROTO_STD_DUPLEX: + ax25_std_t3timer_expiry(ax25); + break; + +#ifdef CONFIG_AX25_DAMA_SLAVE + case AX25_PROTO_DAMA_SLAVE: + if (ax25->ax25_dev->dama.slave) + ax25_ds_t3timer_expiry(ax25); + else + ax25_std_t3timer_expiry(ax25); + break; +#endif + } +} + +static void ax25_idletimer_expiry(struct timer_list *t) +{ + ax25_cb *ax25 = from_timer(ax25, t, idletimer); + + switch (ax25->ax25_dev->values[AX25_VALUES_PROTOCOL]) { + case AX25_PROTO_STD_SIMPLEX: + case AX25_PROTO_STD_DUPLEX: + ax25_std_idletimer_expiry(ax25); + break; + +#ifdef CONFIG_AX25_DAMA_SLAVE + case AX25_PROTO_DAMA_SLAVE: + if (ax25->ax25_dev->dama.slave) + ax25_ds_idletimer_expiry(ax25); + else + ax25_std_idletimer_expiry(ax25); + break; +#endif + } +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_timer.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_timer.c.yml new file mode 100644 index 00000000000..a131b634726 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/ax25/ax25_timer.c.yml @@ -0,0 +1,20 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk) + - Copyright (c) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + - Copyright (c) Tomi Manninen OH2BNS (oh2bns@sral.fi) + - Copyright (c) Darryl Miles G7LED (dlm@g7led.demon.co.uk) + - Copyright (c) Joerg Reuter DL1BKE (jreuter@yaina.de) + - Copyright (c) Frederic Rible F1OAT (frible@teaser.fr) + - Copyright (c) 2002 Ralf Baechle DO1GRB (ralf@gnu.org) +holders: + - Alan Cox GW4PTS + - Jonathan Naylor G4KLX + - Tomi Manninen OH2BNS + - Darryl Miles G7LED + - Joerg Reuter DL1BKE + - Frederic Rible F1OAT + - Ralf Baechle DO1GRB diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/batman-adv/types.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/batman-adv/types.h new file mode 100644 index 00000000000..e237bd2a02e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/batman-adv/types.h @@ -0,0 +1,2436 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (C) 2007-2018 B.A.T.M.A.N. contributors: + * + * Marek Lindner, Simon Wunderlich + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of version 2 of the GNU General Public + * License as published by the Free Software Foundation. + * + * 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 . + */ + +#ifndef _NET_BATMAN_ADV_TYPES_H_ +#define _NET_BATMAN_ADV_TYPES_H_ + +#ifndef _NET_BATMAN_ADV_MAIN_H_ +#error only "main.h" can be included directly +#endif + +#include +#include +#include +#include +#include +#include +#include +#include /* for linux/wait.h */ +#include +#include +#include +#include +#include +#include + +struct seq_file; + +#ifdef CONFIG_BATMAN_ADV_DAT + +/** + * typedef batadv_dat_addr_t - type used for all DHT addresses + * + * If it is changed, BATADV_DAT_ADDR_MAX is changed as well. + * + * *Please be careful: batadv_dat_addr_t must be UNSIGNED* + */ +typedef u16 batadv_dat_addr_t; + +#endif /* CONFIG_BATMAN_ADV_DAT */ + +/** + * enum batadv_dhcp_recipient - dhcp destination + */ +enum batadv_dhcp_recipient { + /** @BATADV_DHCP_NO: packet is not a dhcp message */ + BATADV_DHCP_NO = 0, + + /** @BATADV_DHCP_TO_SERVER: dhcp message is directed to a server */ + BATADV_DHCP_TO_SERVER, + + /** @BATADV_DHCP_TO_CLIENT: dhcp message is directed to a client */ + BATADV_DHCP_TO_CLIENT, +}; + +/** + * BATADV_TT_REMOTE_MASK - bitmask selecting the flags that are sent over the + * wire only + */ +#define BATADV_TT_REMOTE_MASK 0x00FF + +/** + * BATADV_TT_SYNC_MASK - bitmask of the flags that need to be kept in sync + * among the nodes. These flags are used to compute the global/local CRC + */ +#define BATADV_TT_SYNC_MASK 0x00F0 + +/** + * struct batadv_hard_iface_bat_iv - per hard-interface B.A.T.M.A.N. IV data + */ +struct batadv_hard_iface_bat_iv { + /** @ogm_buff: buffer holding the OGM packet */ + unsigned char *ogm_buff; + + /** @ogm_buff_len: length of the OGM packet buffer */ + int ogm_buff_len; + + /** @ogm_seqno: OGM sequence number - used to identify each OGM */ + atomic_t ogm_seqno; +}; + +/** + * enum batadv_v_hard_iface_flags - interface flags useful to B.A.T.M.A.N. V + */ +enum batadv_v_hard_iface_flags { + /** + * @BATADV_FULL_DUPLEX: tells if the connection over this link is + * full-duplex + */ + BATADV_FULL_DUPLEX = BIT(0), + + /** + * @BATADV_WARNING_DEFAULT: tells whether we have warned the user that + * no throughput data is available for this interface and that default + * values are assumed. + */ + BATADV_WARNING_DEFAULT = BIT(1), +}; + +/** + * struct batadv_hard_iface_bat_v - per hard-interface B.A.T.M.A.N. V data + */ +struct batadv_hard_iface_bat_v { + /** @elp_interval: time interval between two ELP transmissions */ + atomic_t elp_interval; + + /** @elp_seqno: current ELP sequence number */ + atomic_t elp_seqno; + + /** @elp_skb: base skb containing the ELP message to send */ + struct sk_buff *elp_skb; + + /** @elp_wq: workqueue used to schedule ELP transmissions */ + struct delayed_work elp_wq; + + /** + * @throughput_override: throughput override to disable link + * auto-detection + */ + atomic_t throughput_override; + + /** @flags: interface specific flags */ + u8 flags; +}; + +/** + * enum batadv_hard_iface_wifi_flags - Flags describing the wifi configuration + * of a batadv_hard_iface + */ +enum batadv_hard_iface_wifi_flags { + /** @BATADV_HARDIF_WIFI_WEXT_DIRECT: it is a wext wifi device */ + BATADV_HARDIF_WIFI_WEXT_DIRECT = BIT(0), + + /** @BATADV_HARDIF_WIFI_CFG80211_DIRECT: it is a cfg80211 wifi device */ + BATADV_HARDIF_WIFI_CFG80211_DIRECT = BIT(1), + + /** + * @BATADV_HARDIF_WIFI_WEXT_INDIRECT: link device is a wext wifi device + */ + BATADV_HARDIF_WIFI_WEXT_INDIRECT = BIT(2), + + /** + * @BATADV_HARDIF_WIFI_CFG80211_INDIRECT: link device is a cfg80211 wifi + * device + */ + BATADV_HARDIF_WIFI_CFG80211_INDIRECT = BIT(3), +}; + +/** + * struct batadv_hard_iface - network device known to batman-adv + */ +struct batadv_hard_iface { + /** @list: list node for batadv_hardif_list */ + struct list_head list; + + /** @if_num: identificator of the interface */ + unsigned int if_num; + + /** @if_status: status of the interface for batman-adv */ + char if_status; + + /** + * @num_bcasts: number of payload re-broadcasts on this interface (ARQ) + */ + u8 num_bcasts; + + /** + * @wifi_flags: flags whether this is (directly or indirectly) a wifi + * interface + */ + u32 wifi_flags; + + /** @net_dev: pointer to the net_device */ + struct net_device *net_dev; + + /** @hardif_obj: kobject of the per interface sysfs "mesh" directory */ + struct kobject *hardif_obj; + + /** @refcount: number of contexts the object is used */ + struct kref refcount; + + /** + * @batman_adv_ptype: packet type describing packets that should be + * processed by batman-adv for this interface + */ + struct packet_type batman_adv_ptype; + + /** + * @soft_iface: the batman-adv interface which uses this network + * interface + */ + struct net_device *soft_iface; + + /** @rcu: struct used for freeing in an RCU-safe manner */ + struct rcu_head rcu; + + /** @bat_iv: per hard-interface B.A.T.M.A.N. IV data */ + struct batadv_hard_iface_bat_iv bat_iv; + +#ifdef CONFIG_BATMAN_ADV_BATMAN_V + /** @bat_v: per hard-interface B.A.T.M.A.N. V data */ + struct batadv_hard_iface_bat_v bat_v; +#endif + +#ifdef CONFIG_BATMAN_ADV_DEBUGFS + /** + * @debug_dir: dentry for nc subdir in batman-adv directory in debugfs + */ + struct dentry *debug_dir; +#endif + + /** + * @neigh_list: list of unique single hop neighbors via this interface + */ + struct hlist_head neigh_list; + + /** @neigh_list_lock: lock protecting neigh_list */ + spinlock_t neigh_list_lock; +}; + +/** + * struct batadv_orig_ifinfo - originator info per outgoing interface + */ +struct batadv_orig_ifinfo { + /** @list: list node for &batadv_orig_node.ifinfo_list */ + struct hlist_node list; + + /** @if_outgoing: pointer to outgoing hard-interface */ + struct batadv_hard_iface *if_outgoing; + + /** @router: router that should be used to reach this originator */ + struct batadv_neigh_node __rcu *router; + + /** @last_real_seqno: last and best known sequence number */ + u32 last_real_seqno; + + /** @last_ttl: ttl of last received packet */ + u8 last_ttl; + + /** @last_seqno_forwarded: seqno of the OGM which was forwarded last */ + u32 last_seqno_forwarded; + + /** @batman_seqno_reset: time when the batman seqno window was reset */ + unsigned long batman_seqno_reset; + + /** @refcount: number of contexts the object is used */ + struct kref refcount; + + /** @rcu: struct used for freeing in an RCU-safe manner */ + struct rcu_head rcu; +}; + +/** + * struct batadv_frag_table_entry - head in the fragment buffer table + */ +struct batadv_frag_table_entry { + /** @fragment_list: head of list with fragments */ + struct hlist_head fragment_list; + + /** @lock: lock to protect the list of fragments */ + spinlock_t lock; + + /** @timestamp: time (jiffie) of last received fragment */ + unsigned long timestamp; + + /** @seqno: sequence number of the fragments in the list */ + u16 seqno; + + /** @size: accumulated size of packets in list */ + u16 size; + + /** @total_size: expected size of the assembled packet */ + u16 total_size; +}; + +/** + * struct batadv_frag_list_entry - entry in a list of fragments + */ +struct batadv_frag_list_entry { + /** @list: list node information */ + struct hlist_node list; + + /** @skb: fragment */ + struct sk_buff *skb; + + /** @no: fragment number in the set */ + u8 no; +}; + +/** + * struct batadv_vlan_tt - VLAN specific TT attributes + */ +struct batadv_vlan_tt { + /** @crc: CRC32 checksum of the entries belonging to this vlan */ + u32 crc; + + /** @num_entries: number of TT entries for this VLAN */ + atomic_t num_entries; +}; + +/** + * struct batadv_orig_node_vlan - VLAN specific data per orig_node + */ +struct batadv_orig_node_vlan { + /** @vid: the VLAN identifier */ + unsigned short vid; + + /** @tt: VLAN specific TT attributes */ + struct batadv_vlan_tt tt; + + /** @list: list node for &batadv_orig_node.vlan_list */ + struct hlist_node list; + + /** + * @refcount: number of context where this object is currently in use + */ + struct kref refcount; + + /** @rcu: struct used for freeing in a RCU-safe manner */ + struct rcu_head rcu; +}; + +/** + * struct batadv_orig_bat_iv - B.A.T.M.A.N. IV private orig_node members + */ +struct batadv_orig_bat_iv { + /** + * @bcast_own: set of bitfields (one per hard-interface) where each one + * counts the number of our OGMs this orig_node rebroadcasted "back" to + * us (relative to last_real_seqno). Every bitfield is + * BATADV_TQ_LOCAL_WINDOW_SIZE bits long. + */ + unsigned long *bcast_own; + + /** @bcast_own_sum: sum of bcast_own */ + u8 *bcast_own_sum; + + /** + * @ogm_cnt_lock: lock protecting bcast_own, bcast_own_sum, + * neigh_node->bat_iv.real_bits & neigh_node->bat_iv.real_packet_count + */ + spinlock_t ogm_cnt_lock; +}; + +/** + * struct batadv_orig_node - structure for orig_list maintaining nodes of mesh + */ +struct batadv_orig_node { + /** @orig: originator ethernet address */ + u8 orig[ETH_ALEN]; + + /** @ifinfo_list: list for routers per outgoing interface */ + struct hlist_head ifinfo_list; + + /** + * @last_bonding_candidate: pointer to last ifinfo of last used router + */ + struct batadv_orig_ifinfo *last_bonding_candidate; + +#ifdef CONFIG_BATMAN_ADV_DAT + /** @dat_addr: address of the orig node in the distributed hash */ + batadv_dat_addr_t dat_addr; +#endif + + /** @last_seen: time when last packet from this node was received */ + unsigned long last_seen; + + /** + * @bcast_seqno_reset: time when the broadcast seqno window was reset + */ + unsigned long bcast_seqno_reset; + +#ifdef CONFIG_BATMAN_ADV_MCAST + /** + * @mcast_handler_lock: synchronizes mcast-capability and -flag changes + */ + spinlock_t mcast_handler_lock; + + /** @mcast_flags: multicast flags announced by the orig node */ + u8 mcast_flags; + + /** + * @mcast_want_all_unsnoopables_node: a list node for the + * mcast.want_all_unsnoopables list + */ + struct hlist_node mcast_want_all_unsnoopables_node; + + /** + * @mcast_want_all_ipv4_node: a list node for the mcast.want_all_ipv4 + * list + */ + struct hlist_node mcast_want_all_ipv4_node; + /** + * @mcast_want_all_ipv6_node: a list node for the mcast.want_all_ipv6 + * list + */ + struct hlist_node mcast_want_all_ipv6_node; +#endif + + /** @capabilities: announced capabilities of this originator */ + unsigned long capabilities; + + /** + * @capa_initialized: bitfield to remember whether a capability was + * initialized + */ + unsigned long capa_initialized; + + /** @last_ttvn: last seen translation table version number */ + atomic_t last_ttvn; + + /** @tt_buff: last tt changeset this node received from the orig node */ + unsigned char *tt_buff; + + /** + * @tt_buff_len: length of the last tt changeset this node received + * from the orig node + */ + s16 tt_buff_len; + + /** @tt_buff_lock: lock that protects tt_buff and tt_buff_len */ + spinlock_t tt_buff_lock; + + /** + * @tt_lock: prevents from updating the table while reading it. Table + * update is made up by two operations (data structure update and + * metdata -CRC/TTVN-recalculation) and they have to be executed + * atomically in order to avoid another thread to read the + * table/metadata between those. + */ + spinlock_t tt_lock; + + /** + * @bcast_bits: bitfield containing the info which payload broadcast + * originated from this orig node this host already has seen (relative + * to last_bcast_seqno) + */ + DECLARE_BITMAP(bcast_bits, BATADV_TQ_LOCAL_WINDOW_SIZE); + + /** + * @last_bcast_seqno: last broadcast sequence number received by this + * host + */ + u32 last_bcast_seqno; + + /** + * @neigh_list: list of potential next hop neighbor towards this orig + * node + */ + struct hlist_head neigh_list; + + /** + * @neigh_list_lock: lock protecting neigh_list, ifinfo_list, + * last_bonding_candidate and router + */ + spinlock_t neigh_list_lock; + + /** @hash_entry: hlist node for &batadv_priv.orig_hash */ + struct hlist_node hash_entry; + + /** @bat_priv: pointer to soft_iface this orig node belongs to */ + struct batadv_priv *bat_priv; + + /** @bcast_seqno_lock: lock protecting bcast_bits & last_bcast_seqno */ + spinlock_t bcast_seqno_lock; + + /** @refcount: number of contexts the object is used */ + struct kref refcount; + + /** @rcu: struct used for freeing in an RCU-safe manner */ + struct rcu_head rcu; + +#ifdef CONFIG_BATMAN_ADV_NC + /** @in_coding_list: list of nodes this orig can hear */ + struct list_head in_coding_list; + + /** @out_coding_list: list of nodes that can hear this orig */ + struct list_head out_coding_list; + + /** @in_coding_list_lock: protects in_coding_list */ + spinlock_t in_coding_list_lock; + + /** @out_coding_list_lock: protects out_coding_list */ + spinlock_t out_coding_list_lock; +#endif + + /** @fragments: array with heads for fragment chains */ + struct batadv_frag_table_entry fragments[BATADV_FRAG_BUFFER_COUNT]; + + /** + * @vlan_list: a list of orig_node_vlan structs, one per VLAN served by + * the originator represented by this object + */ + struct hlist_head vlan_list; + + /** @vlan_list_lock: lock protecting vlan_list */ + spinlock_t vlan_list_lock; + + /** @bat_iv: B.A.T.M.A.N. IV private structure */ + struct batadv_orig_bat_iv bat_iv; +}; + +/** + * enum batadv_orig_capabilities - orig node capabilities + */ +enum batadv_orig_capabilities { + /** + * @BATADV_ORIG_CAPA_HAS_DAT: orig node has distributed arp table + * enabled + */ + BATADV_ORIG_CAPA_HAS_DAT, + + /** @BATADV_ORIG_CAPA_HAS_NC: orig node has network coding enabled */ + BATADV_ORIG_CAPA_HAS_NC, + + /** @BATADV_ORIG_CAPA_HAS_TT: orig node has tt capability */ + BATADV_ORIG_CAPA_HAS_TT, + + /** + * @BATADV_ORIG_CAPA_HAS_MCAST: orig node has some multicast capability + * (= orig node announces a tvlv of type BATADV_TVLV_MCAST) + */ + BATADV_ORIG_CAPA_HAS_MCAST, +}; + +/** + * struct batadv_gw_node - structure for orig nodes announcing gw capabilities + */ +struct batadv_gw_node { + /** @list: list node for &batadv_priv_gw.list */ + struct hlist_node list; + + /** @orig_node: pointer to corresponding orig node */ + struct batadv_orig_node *orig_node; + + /** @bandwidth_down: advertised uplink download bandwidth */ + u32 bandwidth_down; + + /** @bandwidth_up: advertised uplink upload bandwidth */ + u32 bandwidth_up; + + /** @refcount: number of contexts the object is used */ + struct kref refcount; + + /** @rcu: struct used for freeing in an RCU-safe manner */ + struct rcu_head rcu; +}; + +DECLARE_EWMA(throughput, 10, 8) + +/** + * struct batadv_hardif_neigh_node_bat_v - B.A.T.M.A.N. V private neighbor + * information + */ +struct batadv_hardif_neigh_node_bat_v { + /** @throughput: ewma link throughput towards this neighbor */ + struct ewma_throughput throughput; + + /** @elp_interval: time interval between two ELP transmissions */ + u32 elp_interval; + + /** @elp_latest_seqno: latest and best known ELP sequence number */ + u32 elp_latest_seqno; + + /** + * @last_unicast_tx: when the last unicast packet has been sent to this + * neighbor + */ + unsigned long last_unicast_tx; + + /** @metric_work: work queue callback item for metric update */ + struct work_struct metric_work; +}; + +/** + * struct batadv_hardif_neigh_node - unique neighbor per hard-interface + */ +struct batadv_hardif_neigh_node { + /** @list: list node for &batadv_hard_iface.neigh_list */ + struct hlist_node list; + + /** @addr: the MAC address of the neighboring interface */ + u8 addr[ETH_ALEN]; + + /** + * @orig: the address of the originator this neighbor node belongs to + */ + u8 orig[ETH_ALEN]; + + /** @if_incoming: pointer to incoming hard-interface */ + struct batadv_hard_iface *if_incoming; + + /** @last_seen: when last packet via this neighbor was received */ + unsigned long last_seen; + +#ifdef CONFIG_BATMAN_ADV_BATMAN_V + /** @bat_v: B.A.T.M.A.N. V private data */ + struct batadv_hardif_neigh_node_bat_v bat_v; +#endif + + /** @refcount: number of contexts the object is used */ + struct kref refcount; + + /** @rcu: struct used for freeing in a RCU-safe manner */ + struct rcu_head rcu; +}; + +/** + * struct batadv_neigh_node - structure for single hops neighbors + */ +struct batadv_neigh_node { + /** @list: list node for &batadv_orig_node.neigh_list */ + struct hlist_node list; + + /** @orig_node: pointer to corresponding orig_node */ + struct batadv_orig_node *orig_node; + + /** @addr: the MAC address of the neighboring interface */ + u8 addr[ETH_ALEN]; + + /** @ifinfo_list: list for routing metrics per outgoing interface */ + struct hlist_head ifinfo_list; + + /** @ifinfo_lock: lock protecting ifinfo_list and its members */ + spinlock_t ifinfo_lock; + + /** @if_incoming: pointer to incoming hard-interface */ + struct batadv_hard_iface *if_incoming; + + /** @last_seen: when last packet via this neighbor was received */ + unsigned long last_seen; + + /** @hardif_neigh: hardif_neigh of this neighbor */ + struct batadv_hardif_neigh_node *hardif_neigh; + + /** @refcount: number of contexts the object is used */ + struct kref refcount; + + /** @rcu: struct used for freeing in an RCU-safe manner */ + struct rcu_head rcu; +}; + +/** + * struct batadv_neigh_ifinfo_bat_iv - neighbor information per outgoing + * interface for B.A.T.M.A.N. IV + */ +struct batadv_neigh_ifinfo_bat_iv { + /** @tq_recv: ring buffer of received TQ values from this neigh node */ + u8 tq_recv[BATADV_TQ_GLOBAL_WINDOW_SIZE]; + + /** @tq_index: ring buffer index */ + u8 tq_index; + + /** + * @tq_avg: averaged tq of all tq values in the ring buffer (tq_recv) + */ + u8 tq_avg; + + /** + * @real_bits: bitfield containing the number of OGMs received from this + * neigh node (relative to orig_node->last_real_seqno) + */ + DECLARE_BITMAP(real_bits, BATADV_TQ_LOCAL_WINDOW_SIZE); + + /** @real_packet_count: counted result of real_bits */ + u8 real_packet_count; +}; + +/** + * struct batadv_neigh_ifinfo_bat_v - neighbor information per outgoing + * interface for B.A.T.M.A.N. V + */ +struct batadv_neigh_ifinfo_bat_v { + /** + * @throughput: last throughput metric received from originator via this + * neigh + */ + u32 throughput; + + /** @last_seqno: last sequence number known for this neighbor */ + u32 last_seqno; +}; + +/** + * struct batadv_neigh_ifinfo - neighbor information per outgoing interface + */ +struct batadv_neigh_ifinfo { + /** @list: list node for &batadv_neigh_node.ifinfo_list */ + struct hlist_node list; + + /** @if_outgoing: pointer to outgoing hard-interface */ + struct batadv_hard_iface *if_outgoing; + + /** @bat_iv: B.A.T.M.A.N. IV private structure */ + struct batadv_neigh_ifinfo_bat_iv bat_iv; + +#ifdef CONFIG_BATMAN_ADV_BATMAN_V + /** @bat_v: B.A.T.M.A.N. V private data */ + struct batadv_neigh_ifinfo_bat_v bat_v; +#endif + + /** @last_ttl: last received ttl from this neigh node */ + u8 last_ttl; + + /** @refcount: number of contexts the object is used */ + struct kref refcount; + + /** @rcu: struct used for freeing in a RCU-safe manner */ + struct rcu_head rcu; +}; + +#ifdef CONFIG_BATMAN_ADV_BLA + +/** + * struct batadv_bcast_duplist_entry - structure for LAN broadcast suppression + */ +struct batadv_bcast_duplist_entry { + /** @orig: mac address of orig node orginating the broadcast */ + u8 orig[ETH_ALEN]; + + /** @crc: crc32 checksum of broadcast payload */ + __be32 crc; + + /** @entrytime: time when the broadcast packet was received */ + unsigned long entrytime; +}; +#endif + +/** + * enum batadv_counters - indices for traffic counters + */ +enum batadv_counters { + /** @BATADV_CNT_TX: transmitted payload traffic packet counter */ + BATADV_CNT_TX, + + /** @BATADV_CNT_TX_BYTES: transmitted payload traffic bytes counter */ + BATADV_CNT_TX_BYTES, + + /** + * @BATADV_CNT_TX_DROPPED: dropped transmission payload traffic packet + * counter + */ + BATADV_CNT_TX_DROPPED, + + /** @BATADV_CNT_RX: received payload traffic packet counter */ + BATADV_CNT_RX, + + /** @BATADV_CNT_RX_BYTES: received payload traffic bytes counter */ + BATADV_CNT_RX_BYTES, + + /** @BATADV_CNT_FORWARD: forwarded payload traffic packet counter */ + BATADV_CNT_FORWARD, + + /** + * @BATADV_CNT_FORWARD_BYTES: forwarded payload traffic bytes counter + */ + BATADV_CNT_FORWARD_BYTES, + + /** + * @BATADV_CNT_MGMT_TX: transmitted routing protocol traffic packet + * counter + */ + BATADV_CNT_MGMT_TX, + + /** + * @BATADV_CNT_MGMT_TX_BYTES: transmitted routing protocol traffic bytes + * counter + */ + BATADV_CNT_MGMT_TX_BYTES, + + /** + * @BATADV_CNT_MGMT_RX: received routing protocol traffic packet counter + */ + BATADV_CNT_MGMT_RX, + + /** + * @BATADV_CNT_MGMT_RX_BYTES: received routing protocol traffic bytes + * counter + */ + BATADV_CNT_MGMT_RX_BYTES, + + /** @BATADV_CNT_FRAG_TX: transmitted fragment traffic packet counter */ + BATADV_CNT_FRAG_TX, + + /** + * @BATADV_CNT_FRAG_TX_BYTES: transmitted fragment traffic bytes counter + */ + BATADV_CNT_FRAG_TX_BYTES, + + /** @BATADV_CNT_FRAG_RX: received fragment traffic packet counter */ + BATADV_CNT_FRAG_RX, + + /** + * @BATADV_CNT_FRAG_RX_BYTES: received fragment traffic bytes counter + */ + BATADV_CNT_FRAG_RX_BYTES, + + /** @BATADV_CNT_FRAG_FWD: forwarded fragment traffic packet counter */ + BATADV_CNT_FRAG_FWD, + + /** + * @BATADV_CNT_FRAG_FWD_BYTES: forwarded fragment traffic bytes counter + */ + BATADV_CNT_FRAG_FWD_BYTES, + + /** + * @BATADV_CNT_TT_REQUEST_TX: transmitted tt req traffic packet counter + */ + BATADV_CNT_TT_REQUEST_TX, + + /** @BATADV_CNT_TT_REQUEST_RX: received tt req traffic packet counter */ + BATADV_CNT_TT_REQUEST_RX, + + /** + * @BATADV_CNT_TT_RESPONSE_TX: transmitted tt resp traffic packet + * counter + */ + BATADV_CNT_TT_RESPONSE_TX, + + /** + * @BATADV_CNT_TT_RESPONSE_RX: received tt resp traffic packet counter + */ + BATADV_CNT_TT_RESPONSE_RX, + + /** + * @BATADV_CNT_TT_ROAM_ADV_TX: transmitted tt roam traffic packet + * counter + */ + BATADV_CNT_TT_ROAM_ADV_TX, + + /** + * @BATADV_CNT_TT_ROAM_ADV_RX: received tt roam traffic packet counter + */ + BATADV_CNT_TT_ROAM_ADV_RX, + +#ifdef CONFIG_BATMAN_ADV_DAT + /** + * @BATADV_CNT_DAT_GET_TX: transmitted dht GET traffic packet counter + */ + BATADV_CNT_DAT_GET_TX, + + /** @BATADV_CNT_DAT_GET_RX: received dht GET traffic packet counter */ + BATADV_CNT_DAT_GET_RX, + + /** + * @BATADV_CNT_DAT_PUT_TX: transmitted dht PUT traffic packet counter + */ + BATADV_CNT_DAT_PUT_TX, + + /** @BATADV_CNT_DAT_PUT_RX: received dht PUT traffic packet counter */ + BATADV_CNT_DAT_PUT_RX, + + /** + * @BATADV_CNT_DAT_CACHED_REPLY_TX: transmitted dat cache reply traffic + * packet counter + */ + BATADV_CNT_DAT_CACHED_REPLY_TX, +#endif + +#ifdef CONFIG_BATMAN_ADV_NC + /** + * @BATADV_CNT_NC_CODE: transmitted nc-combined traffic packet counter + */ + BATADV_CNT_NC_CODE, + + /** + * @BATADV_CNT_NC_CODE_BYTES: transmitted nc-combined traffic bytes + * counter + */ + BATADV_CNT_NC_CODE_BYTES, + + /** + * @BATADV_CNT_NC_RECODE: transmitted nc-recombined traffic packet + * counter + */ + BATADV_CNT_NC_RECODE, + + /** + * @BATADV_CNT_NC_RECODE_BYTES: transmitted nc-recombined traffic bytes + * counter + */ + BATADV_CNT_NC_RECODE_BYTES, + + /** + * @BATADV_CNT_NC_BUFFER: counter for packets buffered for later nc + * decoding + */ + BATADV_CNT_NC_BUFFER, + + /** + * @BATADV_CNT_NC_DECODE: received and nc-decoded traffic packet counter + */ + BATADV_CNT_NC_DECODE, + + /** + * @BATADV_CNT_NC_DECODE_BYTES: received and nc-decoded traffic bytes + * counter + */ + BATADV_CNT_NC_DECODE_BYTES, + + /** + * @BATADV_CNT_NC_DECODE_FAILED: received and decode-failed traffic + * packet counter + */ + BATADV_CNT_NC_DECODE_FAILED, + + /** + * @BATADV_CNT_NC_SNIFFED: counter for nc-decoded packets received in + * promisc mode. + */ + BATADV_CNT_NC_SNIFFED, +#endif + + /** @BATADV_CNT_NUM: number of traffic counters */ + BATADV_CNT_NUM, +}; + +/** + * struct batadv_priv_tt - per mesh interface translation table data + */ +struct batadv_priv_tt { + /** @vn: translation table version number */ + atomic_t vn; + + /** + * @ogm_append_cnt: counter of number of OGMs containing the local tt + * diff + */ + atomic_t ogm_append_cnt; + + /** @local_changes: changes registered in an originator interval */ + atomic_t local_changes; + + /** + * @changes_list: tracks tt local changes within an originator interval + */ + struct list_head changes_list; + + /** @local_hash: local translation table hash table */ + struct batadv_hashtable *local_hash; + + /** @global_hash: global translation table hash table */ + struct batadv_hashtable *global_hash; + + /** @req_list: list of pending & unanswered tt_requests */ + struct hlist_head req_list; + + /** + * @roam_list: list of the last roaming events of each client limiting + * the number of roaming events to avoid route flapping + */ + struct list_head roam_list; + + /** @changes_list_lock: lock protecting changes_list */ + spinlock_t changes_list_lock; + + /** @req_list_lock: lock protecting req_list */ + spinlock_t req_list_lock; + + /** @roam_list_lock: lock protecting roam_list */ + spinlock_t roam_list_lock; + + /** @last_changeset: last tt changeset this host has generated */ + unsigned char *last_changeset; + + /** + * @last_changeset_len: length of last tt changeset this host has + * generated + */ + s16 last_changeset_len; + + /** + * @last_changeset_lock: lock protecting last_changeset & + * last_changeset_len + */ + spinlock_t last_changeset_lock; + + /** + * @commit_lock: prevents from executing a local TT commit while reading + * the local table. The local TT commit is made up by two operations + * (data structure update and metdata -CRC/TTVN- recalculation) and + * they have to be executed atomically in order to avoid another thread + * to read the table/metadata between those. + */ + spinlock_t commit_lock; + + /** @work: work queue callback item for translation table purging */ + struct delayed_work work; +}; + +#ifdef CONFIG_BATMAN_ADV_BLA + +/** + * struct batadv_priv_bla - per mesh interface bridge loope avoidance data + */ +struct batadv_priv_bla { + /** @num_requests: number of bla requests in flight */ + atomic_t num_requests; + + /** + * @claim_hash: hash table containing mesh nodes this host has claimed + */ + struct batadv_hashtable *claim_hash; + + /** + * @backbone_hash: hash table containing all detected backbone gateways + */ + struct batadv_hashtable *backbone_hash; + + /** @loopdetect_addr: MAC address used for own loopdetection frames */ + u8 loopdetect_addr[ETH_ALEN]; + + /** + * @loopdetect_lasttime: time when the loopdetection frames were sent + */ + unsigned long loopdetect_lasttime; + + /** + * @loopdetect_next: how many periods to wait for the next loopdetect + * process + */ + atomic_t loopdetect_next; + + /** + * @bcast_duplist: recently received broadcast packets array (for + * broadcast duplicate suppression) + */ + struct batadv_bcast_duplist_entry bcast_duplist[BATADV_DUPLIST_SIZE]; + + /** + * @bcast_duplist_curr: index of last broadcast packet added to + * bcast_duplist + */ + int bcast_duplist_curr; + + /** + * @bcast_duplist_lock: lock protecting bcast_duplist & + * bcast_duplist_curr + */ + spinlock_t bcast_duplist_lock; + + /** @claim_dest: local claim data (e.g. claim group) */ + struct batadv_bla_claim_dst claim_dest; + + /** @work: work queue callback item for cleanups & bla announcements */ + struct delayed_work work; +}; +#endif + +#ifdef CONFIG_BATMAN_ADV_DEBUG + +/** + * struct batadv_priv_debug_log - debug logging data + */ +struct batadv_priv_debug_log { + /** @log_buff: buffer holding the logs (ring bufer) */ + char log_buff[BATADV_LOG_BUF_LEN]; + + /** @log_start: index of next character to read */ + unsigned long log_start; + + /** @log_end: index of next character to write */ + unsigned long log_end; + + /** @lock: lock protecting log_buff, log_start & log_end */ + spinlock_t lock; + + /** @queue_wait: log reader's wait queue */ + wait_queue_head_t queue_wait; +}; +#endif + +/** + * struct batadv_priv_gw - per mesh interface gateway data + */ +struct batadv_priv_gw { + /** @gateway_list: list of available gateway nodes */ + struct hlist_head gateway_list; + + /** @list_lock: lock protecting gateway_list & curr_gw */ + spinlock_t list_lock; + + /** @curr_gw: pointer to currently selected gateway node */ + struct batadv_gw_node __rcu *curr_gw; + + /** + * @mode: gateway operation: off, client or server (see batadv_gw_modes) + */ + atomic_t mode; + + /** @sel_class: gateway selection class (applies if gw_mode client) */ + atomic_t sel_class; + + /** + * @bandwidth_down: advertised uplink download bandwidth (if gw_mode + * server) + */ + atomic_t bandwidth_down; + + /** + * @bandwidth_up: advertised uplink upload bandwidth (if gw_mode server) + */ + atomic_t bandwidth_up; + + /** @reselect: bool indicating a gateway re-selection is in progress */ + atomic_t reselect; +}; + +/** + * struct batadv_priv_tvlv - per mesh interface tvlv data + */ +struct batadv_priv_tvlv { + /** + * @container_list: list of registered tvlv containers to be sent with + * each OGM + */ + struct hlist_head container_list; + + /** @handler_list: list of the various tvlv content handlers */ + struct hlist_head handler_list; + + /** @container_list_lock: protects tvlv container list access */ + spinlock_t container_list_lock; + + /** @handler_list_lock: protects handler list access */ + spinlock_t handler_list_lock; +}; + +#ifdef CONFIG_BATMAN_ADV_DAT + +/** + * struct batadv_priv_dat - per mesh interface DAT private data + */ +struct batadv_priv_dat { + /** @addr: node DAT address */ + batadv_dat_addr_t addr; + + /** @hash: hashtable representing the local ARP cache */ + struct batadv_hashtable *hash; + + /** @work: work queue callback item for cache purging */ + struct delayed_work work; +}; +#endif + +#ifdef CONFIG_BATMAN_ADV_MCAST +/** + * struct batadv_mcast_querier_state - IGMP/MLD querier state when bridged + */ +struct batadv_mcast_querier_state { + /** @exists: whether a querier exists in the mesh */ + unsigned char exists:1; + + /** + * @shadowing: if a querier exists, whether it is potentially shadowing + * multicast listeners (i.e. querier is behind our own bridge segment) + */ + unsigned char shadowing:1; +}; + +/** + * struct batadv_priv_mcast - per mesh interface mcast data + */ +struct batadv_priv_mcast { + /** + * @mla_list: list of multicast addresses we are currently announcing + * via TT + */ + struct hlist_head mla_list; /* see __batadv_mcast_mla_update() */ + + /** + * @want_all_unsnoopables_list: a list of orig_nodes wanting all + * unsnoopable multicast traffic + */ + struct hlist_head want_all_unsnoopables_list; + + /** + * @want_all_ipv4_list: a list of orig_nodes wanting all IPv4 multicast + * traffic + */ + struct hlist_head want_all_ipv4_list; + + /** + * @want_all_ipv6_list: a list of orig_nodes wanting all IPv6 multicast + * traffic + */ + struct hlist_head want_all_ipv6_list; + + /** @querier_ipv4: the current state of an IGMP querier in the mesh */ + struct batadv_mcast_querier_state querier_ipv4; + + /** @querier_ipv6: the current state of an MLD querier in the mesh */ + struct batadv_mcast_querier_state querier_ipv6; + + /** @flags: the flags we have last sent in our mcast tvlv */ + u8 flags; + + /** @enabled: whether the multicast tvlv is currently enabled */ + unsigned char enabled:1; + + /** @bridged: whether the soft interface has a bridge on top */ + unsigned char bridged:1; + + /** + * @mla_lock: a lock protecting mla_list and mla_flags + */ + spinlock_t mla_lock; + + /** + * @num_want_all_unsnoopables: number of nodes wanting unsnoopable IP + * traffic + */ + atomic_t num_want_all_unsnoopables; + + /** @num_want_all_ipv4: counter for items in want_all_ipv4_list */ + atomic_t num_want_all_ipv4; + + /** @num_want_all_ipv6: counter for items in want_all_ipv6_list */ + atomic_t num_want_all_ipv6; + + /** + * @want_lists_lock: lock for protecting modifications to mcasts + * want_all_{unsnoopables,ipv4,ipv6}_list (traversals are rcu-locked) + */ + spinlock_t want_lists_lock; + + /** @work: work queue callback item for multicast TT and TVLV updates */ + struct delayed_work work; +}; +#endif + +/** + * struct batadv_priv_nc - per mesh interface network coding private data + */ +struct batadv_priv_nc { + /** @work: work queue callback item for cleanup */ + struct delayed_work work; + +#ifdef CONFIG_BATMAN_ADV_DEBUGFS + /** + * @debug_dir: dentry for nc subdir in batman-adv directory in debugfs + */ + struct dentry *debug_dir; +#endif + + /** + * @min_tq: only consider neighbors for encoding if neigh_tq > min_tq + */ + u8 min_tq; + + /** + * @max_fwd_delay: maximum packet forward delay to allow coding of + * packets + */ + u32 max_fwd_delay; + + /** + * @max_buffer_time: buffer time for sniffed packets used to decoding + */ + u32 max_buffer_time; + + /** + * @timestamp_fwd_flush: timestamp of last forward packet queue flush + */ + unsigned long timestamp_fwd_flush; + + /** + * @timestamp_sniffed_purge: timestamp of last sniffed packet queue + * purge + */ + unsigned long timestamp_sniffed_purge; + + /** + * @coding_hash: Hash table used to buffer skbs while waiting for + * another incoming skb to code it with. Skbs are added to the buffer + * just before being forwarded in routing.c + */ + struct batadv_hashtable *coding_hash; + + /** + * @decoding_hash: Hash table used to buffer skbs that might be needed + * to decode a received coded skb. The buffer is used for 1) skbs + * arriving on the soft-interface; 2) skbs overheard on the + * hard-interface; and 3) skbs forwarded by batman-adv. + */ + struct batadv_hashtable *decoding_hash; +}; + +/** + * struct batadv_tp_unacked - unacked packet meta-information + * + * This struct is supposed to represent a buffer unacked packet. However, since + * the purpose of the TP meter is to count the traffic only, there is no need to + * store the entire sk_buff, the starting offset and the length are enough + */ +struct batadv_tp_unacked { + /** @seqno: seqno of the unacked packet */ + u32 seqno; + + /** @len: length of the packet */ + u16 len; + + /** @list: list node for &batadv_tp_vars.unacked_list */ + struct list_head list; +}; + +/** + * enum batadv_tp_meter_role - Modus in tp meter session + */ +enum batadv_tp_meter_role { + /** @BATADV_TP_RECEIVER: Initialized as receiver */ + BATADV_TP_RECEIVER, + + /** @BATADV_TP_SENDER: Initialized as sender */ + BATADV_TP_SENDER +}; + +/** + * struct batadv_tp_vars - tp meter private variables per session + */ +struct batadv_tp_vars { + /** @list: list node for &bat_priv.tp_list */ + struct hlist_node list; + + /** @timer: timer for ack (receiver) and retry (sender) */ + struct timer_list timer; + + /** @bat_priv: pointer to the mesh object */ + struct batadv_priv *bat_priv; + + /** @start_time: start time in jiffies */ + unsigned long start_time; + + /** @other_end: mac address of remote */ + u8 other_end[ETH_ALEN]; + + /** @role: receiver/sender modi */ + enum batadv_tp_meter_role role; + + /** @sending: sending binary semaphore: 1 if sending, 0 is not */ + atomic_t sending; + + /** @reason: reason for a stopped session */ + enum batadv_tp_meter_reason reason; + + /** @finish_work: work item for the finishing procedure */ + struct delayed_work finish_work; + + /** @test_length: test length in milliseconds */ + u32 test_length; + + /** @session: TP session identifier */ + u8 session[2]; + + /** @icmp_uid: local ICMP "socket" index */ + u8 icmp_uid; + + /* sender variables */ + + /** @dec_cwnd: decimal part of the cwnd used during linear growth */ + u16 dec_cwnd; + + /** @cwnd: current size of the congestion window */ + u32 cwnd; + + /** @cwnd_lock: lock do protect @cwnd & @dec_cwnd */ + spinlock_t cwnd_lock; + + /** + * @ss_threshold: Slow Start threshold. Once cwnd exceeds this value the + * connection switches to the Congestion Avoidance state + */ + u32 ss_threshold; + + /** @last_acked: last acked byte */ + atomic_t last_acked; + + /** @last_sent: last sent byte, not yet acked */ + u32 last_sent; + + /** @tot_sent: amount of data sent/ACKed so far */ + atomic64_t tot_sent; + + /** @dup_acks: duplicate ACKs counter */ + atomic_t dup_acks; + + /** @fast_recovery: true if in Fast Recovery mode */ + unsigned char fast_recovery:1; + + /** @recover: last sent seqno when entering Fast Recovery */ + u32 recover; + + /** @rto: sender timeout */ + u32 rto; + + /** @srtt: smoothed RTT scaled by 2^3 */ + u32 srtt; + + /** @rttvar: RTT variation scaled by 2^2 */ + u32 rttvar; + + /** + * @more_bytes: waiting queue anchor when waiting for more ack/retry + * timeout + */ + wait_queue_head_t more_bytes; + + /** @prerandom_offset: offset inside the prerandom buffer */ + u32 prerandom_offset; + + /** @prerandom_lock: spinlock protecting access to prerandom_offset */ + spinlock_t prerandom_lock; + + /* receiver variables */ + + /** @last_recv: last in-order received packet */ + u32 last_recv; + + /** @unacked_list: list of unacked packets (meta-info only) */ + struct list_head unacked_list; + + /** @unacked_lock: protect unacked_list */ + spinlock_t unacked_lock; + + /** @last_recv_time: time time (jiffies) a msg was received */ + unsigned long last_recv_time; + + /** @refcount: number of context where the object is used */ + struct kref refcount; + + /** @rcu: struct used for freeing in an RCU-safe manner */ + struct rcu_head rcu; +}; + +/** + * struct batadv_softif_vlan - per VLAN attributes set + */ +struct batadv_softif_vlan { + /** @bat_priv: pointer to the mesh object */ + struct batadv_priv *bat_priv; + + /** @vid: VLAN identifier */ + unsigned short vid; + + /** @kobj: kobject for sysfs vlan subdirectory */ + struct kobject *kobj; + + /** @ap_isolation: AP isolation state */ + atomic_t ap_isolation; /* boolean */ + + /** @tt: TT private attributes (VLAN specific) */ + struct batadv_vlan_tt tt; + + /** @list: list node for &bat_priv.softif_vlan_list */ + struct hlist_node list; + + /** + * @refcount: number of context where this object is currently in use + */ + struct kref refcount; + + /** @rcu: struct used for freeing in a RCU-safe manner */ + struct rcu_head rcu; +}; + +/** + * struct batadv_priv_bat_v - B.A.T.M.A.N. V per soft-interface private data + */ +struct batadv_priv_bat_v { + /** @ogm_buff: buffer holding the OGM packet */ + unsigned char *ogm_buff; + + /** @ogm_buff_len: length of the OGM packet buffer */ + int ogm_buff_len; + + /** @ogm_seqno: OGM sequence number - used to identify each OGM */ + atomic_t ogm_seqno; + + /** @ogm_wq: workqueue used to schedule OGM transmissions */ + struct delayed_work ogm_wq; +}; + +/** + * struct batadv_priv - per mesh interface data + */ +struct batadv_priv { + /** + * @mesh_state: current status of the mesh + * (inactive/active/deactivating) + */ + atomic_t mesh_state; + + /** @soft_iface: net device which holds this struct as private data */ + struct net_device *soft_iface; + + /** + * @bat_counters: mesh internal traffic statistic counters (see + * batadv_counters) + */ + u64 __percpu *bat_counters; /* Per cpu counters */ + + /** + * @aggregated_ogms: bool indicating whether OGM aggregation is enabled + */ + atomic_t aggregated_ogms; + + /** @bonding: bool indicating whether traffic bonding is enabled */ + atomic_t bonding; + + /** + * @fragmentation: bool indicating whether traffic fragmentation is + * enabled + */ + atomic_t fragmentation; + + /** + * @packet_size_max: max packet size that can be transmitted via + * multiple fragmented skbs or a single frame if fragmentation is + * disabled + */ + atomic_t packet_size_max; + + /** + * @frag_seqno: incremental counter to identify chains of egress + * fragments + */ + atomic_t frag_seqno; + +#ifdef CONFIG_BATMAN_ADV_BLA + /** + * @bridge_loop_avoidance: bool indicating whether bridge loop + * avoidance is enabled + */ + atomic_t bridge_loop_avoidance; +#endif + +#ifdef CONFIG_BATMAN_ADV_DAT + /** + * @distributed_arp_table: bool indicating whether distributed ARP table + * is enabled + */ + atomic_t distributed_arp_table; +#endif + +#ifdef CONFIG_BATMAN_ADV_MCAST + /** + * @multicast_mode: Enable or disable multicast optimizations on this + * node's sender/originating side + */ + atomic_t multicast_mode; +#endif + + /** @orig_interval: OGM broadcast interval in milliseconds */ + atomic_t orig_interval; + + /** + * @hop_penalty: penalty which will be applied to an OGM's tq-field on + * every hop + */ + atomic_t hop_penalty; + +#ifdef CONFIG_BATMAN_ADV_DEBUG + /** @log_level: configured log level (see batadv_dbg_level) */ + atomic_t log_level; +#endif + + /** + * @isolation_mark: the skb->mark value used to match packets for AP + * isolation + */ + u32 isolation_mark; + + /** + * @isolation_mark_mask: bitmask identifying the bits in skb->mark to be + * used for the isolation mark + */ + u32 isolation_mark_mask; + + /** @bcast_seqno: last sent broadcast packet sequence number */ + atomic_t bcast_seqno; + + /** + * @bcast_queue_left: number of remaining buffered broadcast packet + * slots + */ + atomic_t bcast_queue_left; + + /** @batman_queue_left: number of remaining OGM packet slots */ + atomic_t batman_queue_left; + + /** @num_ifaces: number of interfaces assigned to this mesh interface */ + unsigned int num_ifaces; + + /** @mesh_obj: kobject for sysfs mesh subdirectory */ + struct kobject *mesh_obj; + +#ifdef CONFIG_BATMAN_ADV_DEBUGFS + /** @debug_dir: dentry for debugfs batman-adv subdirectory */ + struct dentry *debug_dir; +#endif + + /** @forw_bat_list: list of aggregated OGMs that will be forwarded */ + struct hlist_head forw_bat_list; + + /** + * @forw_bcast_list: list of broadcast packets that will be + * rebroadcasted + */ + struct hlist_head forw_bcast_list; + + /** @tp_list: list of tp sessions */ + struct hlist_head tp_list; + + /** @tp_num: number of currently active tp sessions */ + struct batadv_hashtable *orig_hash; + + /** @orig_hash: hash table containing mesh participants (orig nodes) */ + spinlock_t forw_bat_list_lock; + + /** @forw_bat_list_lock: lock protecting forw_bat_list */ + spinlock_t forw_bcast_list_lock; + + /** @forw_bcast_list_lock: lock protecting forw_bcast_list */ + spinlock_t tp_list_lock; + + /** @tp_list_lock: spinlock protecting @tp_list */ + atomic_t tp_num; + + /** @orig_work: work queue callback item for orig node purging */ + struct delayed_work orig_work; + + /** + * @primary_if: one of the hard-interfaces assigned to this mesh + * interface becomes the primary interface + */ + struct batadv_hard_iface __rcu *primary_if; /* rcu protected pointer */ + + /** @algo_ops: routing algorithm used by this mesh interface */ + struct batadv_algo_ops *algo_ops; + + /** + * @softif_vlan_list: a list of softif_vlan structs, one per VLAN + * created on top of the mesh interface represented by this object + */ + struct hlist_head softif_vlan_list; + + /** @softif_vlan_list_lock: lock protecting softif_vlan_list */ + spinlock_t softif_vlan_list_lock; + +#ifdef CONFIG_BATMAN_ADV_BLA + /** @bla: bridge loope avoidance data */ + struct batadv_priv_bla bla; +#endif + +#ifdef CONFIG_BATMAN_ADV_DEBUG + /** @debug_log: holding debug logging relevant data */ + struct batadv_priv_debug_log *debug_log; +#endif + + /** @gw: gateway data */ + struct batadv_priv_gw gw; + + /** @tt: translation table data */ + struct batadv_priv_tt tt; + + /** @tvlv: type-version-length-value data */ + struct batadv_priv_tvlv tvlv; + +#ifdef CONFIG_BATMAN_ADV_DAT + /** @dat: distributed arp table data */ + struct batadv_priv_dat dat; +#endif + +#ifdef CONFIG_BATMAN_ADV_MCAST + /** @mcast: multicast data */ + struct batadv_priv_mcast mcast; +#endif + +#ifdef CONFIG_BATMAN_ADV_NC + /** + * @network_coding: bool indicating whether network coding is enabled + */ + atomic_t network_coding; + + /** @nc: network coding data */ + struct batadv_priv_nc nc; +#endif /* CONFIG_BATMAN_ADV_NC */ + +#ifdef CONFIG_BATMAN_ADV_BATMAN_V + /** @bat_v: B.A.T.M.A.N. V per soft-interface private data */ + struct batadv_priv_bat_v bat_v; +#endif +}; + +/** + * struct batadv_socket_client - layer2 icmp socket client data + */ +struct batadv_socket_client { + /** + * @queue_list: packet queue for packets destined for this socket client + */ + struct list_head queue_list; + + /** @queue_len: number of packets in the packet queue (queue_list) */ + unsigned int queue_len; + + /** @index: socket client's index in the batadv_socket_client_hash */ + unsigned char index; + + /** @lock: lock protecting queue_list, queue_len & index */ + spinlock_t lock; + + /** @queue_wait: socket client's wait queue */ + wait_queue_head_t queue_wait; + + /** @bat_priv: pointer to soft_iface this client belongs to */ + struct batadv_priv *bat_priv; +}; + +/** + * struct batadv_socket_packet - layer2 icmp packet for socket client + */ +struct batadv_socket_packet { + /** @list: list node for &batadv_socket_client.queue_list */ + struct list_head list; + + /** @icmp_len: size of the layer2 icmp packet */ + size_t icmp_len; + + /** @icmp_packet: layer2 icmp packet */ + u8 icmp_packet[BATADV_ICMP_MAX_PACKET_SIZE]; +}; + +#ifdef CONFIG_BATMAN_ADV_BLA + +/** + * struct batadv_bla_backbone_gw - batman-adv gateway bridged into the LAN + */ +struct batadv_bla_backbone_gw { + /** + * @orig: originator address of backbone node (mac address of primary + * iface) + */ + u8 orig[ETH_ALEN]; + + /** @vid: vlan id this gateway was detected on */ + unsigned short vid; + + /** @hash_entry: hlist node for &batadv_priv_bla.backbone_hash */ + struct hlist_node hash_entry; + + /** @bat_priv: pointer to soft_iface this backbone gateway belongs to */ + struct batadv_priv *bat_priv; + + /** @lasttime: last time we heard of this backbone gw */ + unsigned long lasttime; + + /** + * @wait_periods: grace time for bridge forward delays and bla group + * forming at bootup phase - no bcast traffic is formwared until it has + * elapsed + */ + atomic_t wait_periods; + + /** + * @request_sent: if this bool is set to true we are out of sync with + * this backbone gateway - no bcast traffic is formwared until the + * situation was resolved + */ + atomic_t request_sent; + + /** @crc: crc16 checksum over all claims */ + u16 crc; + + /** @crc_lock: lock protecting crc */ + spinlock_t crc_lock; + + /** @report_work: work struct for reporting detected loops */ + struct work_struct report_work; + + /** @refcount: number of contexts the object is used */ + struct kref refcount; + + /** @rcu: struct used for freeing in an RCU-safe manner */ + struct rcu_head rcu; +}; + +/** + * struct batadv_bla_claim - claimed non-mesh client structure + */ +struct batadv_bla_claim { + /** @addr: mac address of claimed non-mesh client */ + u8 addr[ETH_ALEN]; + + /** @vid: vlan id this client was detected on */ + unsigned short vid; + + /** @backbone_gw: pointer to backbone gw claiming this client */ + struct batadv_bla_backbone_gw *backbone_gw; + + /** @backbone_lock: lock protecting backbone_gw pointer */ + spinlock_t backbone_lock; + + /** @lasttime: last time we heard of claim (locals only) */ + unsigned long lasttime; + + /** @hash_entry: hlist node for &batadv_priv_bla.claim_hash */ + struct hlist_node hash_entry; + + /** @refcount: number of contexts the object is used */ + struct rcu_head rcu; + + /** @rcu: struct used for freeing in an RCU-safe manner */ + struct kref refcount; +}; +#endif + +/** + * struct batadv_tt_common_entry - tt local & tt global common data + */ +struct batadv_tt_common_entry { + /** @addr: mac address of non-mesh client */ + u8 addr[ETH_ALEN]; + + /** @vid: VLAN identifier */ + unsigned short vid; + + /** + * @hash_entry: hlist node for &batadv_priv_tt.local_hash or for + * &batadv_priv_tt.global_hash + */ + struct hlist_node hash_entry; + + /** @flags: various state handling flags (see batadv_tt_client_flags) */ + u16 flags; + + /** @added_at: timestamp used for purging stale tt common entries */ + unsigned long added_at; + + /** @refcount: number of contexts the object is used */ + struct kref refcount; + + /** @rcu: struct used for freeing in an RCU-safe manner */ + struct rcu_head rcu; +}; + +/** + * struct batadv_tt_local_entry - translation table local entry data + */ +struct batadv_tt_local_entry { + /** @common: general translation table data */ + struct batadv_tt_common_entry common; + + /** @last_seen: timestamp used for purging stale tt local entries */ + unsigned long last_seen; + + /** @vlan: soft-interface vlan of the entry */ + struct batadv_softif_vlan *vlan; +}; + +/** + * struct batadv_tt_global_entry - translation table global entry data + */ +struct batadv_tt_global_entry { + /** @common: general translation table data */ + struct batadv_tt_common_entry common; + + /** @orig_list: list of orig nodes announcing this non-mesh client */ + struct hlist_head orig_list; + + /** @orig_list_count: number of items in the orig_list */ + atomic_t orig_list_count; + + /** @list_lock: lock protecting orig_list */ + spinlock_t list_lock; + + /** @roam_at: time at which TT_GLOBAL_ROAM was set */ + unsigned long roam_at; +}; + +/** + * struct batadv_tt_orig_list_entry - orig node announcing a non-mesh client + */ +struct batadv_tt_orig_list_entry { + /** @orig_node: pointer to orig node announcing this non-mesh client */ + struct batadv_orig_node *orig_node; + + /** + * @ttvn: translation table version number which added the non-mesh + * client + */ + u8 ttvn; + + /** @flags: per orig entry TT sync flags */ + u8 flags; + + /** @list: list node for &batadv_tt_global_entry.orig_list */ + struct hlist_node list; + + /** @refcount: number of contexts the object is used */ + struct kref refcount; + + /** @rcu: struct used for freeing in an RCU-safe manner */ + struct rcu_head rcu; +}; + +/** + * struct batadv_tt_change_node - structure for tt changes occurred + */ +struct batadv_tt_change_node { + /** @list: list node for &batadv_priv_tt.changes_list */ + struct list_head list; + + /** @change: holds the actual translation table diff data */ + struct batadv_tvlv_tt_change change; +}; + +/** + * struct batadv_tt_req_node - data to keep track of the tt requests in flight + */ +struct batadv_tt_req_node { + /** + * @addr: mac address address of the originator this request was sent to + */ + u8 addr[ETH_ALEN]; + + /** @issued_at: timestamp used for purging stale tt requests */ + unsigned long issued_at; + + /** @refcount: number of contexts the object is used by */ + struct kref refcount; + + /** @list: list node for &batadv_priv_tt.req_list */ + struct hlist_node list; +}; + +/** + * struct batadv_tt_roam_node - roaming client data + */ +struct batadv_tt_roam_node { + /** @addr: mac address of the client in the roaming phase */ + u8 addr[ETH_ALEN]; + + /** + * @counter: number of allowed roaming events per client within a single + * OGM interval (changes are committed with each OGM) + */ + atomic_t counter; + + /** + * @first_time: timestamp used for purging stale roaming node entries + */ + unsigned long first_time; + + /** @list: list node for &batadv_priv_tt.roam_list */ + struct list_head list; +}; + +/** + * struct batadv_nc_node - network coding node + */ +struct batadv_nc_node { + /** @list: next and prev pointer for the list handling */ + struct list_head list; + + /** @addr: the node's mac address */ + u8 addr[ETH_ALEN]; + + /** @refcount: number of contexts the object is used by */ + struct kref refcount; + + /** @rcu: struct used for freeing in an RCU-safe manner */ + struct rcu_head rcu; + + /** @orig_node: pointer to corresponding orig node struct */ + struct batadv_orig_node *orig_node; + + /** @last_seen: timestamp of last ogm received from this node */ + unsigned long last_seen; +}; + +/** + * struct batadv_nc_path - network coding path + */ +struct batadv_nc_path { + /** @hash_entry: next and prev pointer for the list handling */ + struct hlist_node hash_entry; + + /** @rcu: struct used for freeing in an RCU-safe manner */ + struct rcu_head rcu; + + /** @refcount: number of contexts the object is used by */ + struct kref refcount; + + /** @packet_list: list of buffered packets for this path */ + struct list_head packet_list; + + /** @packet_list_lock: access lock for packet list */ + spinlock_t packet_list_lock; + + /** @next_hop: next hop (destination) of path */ + u8 next_hop[ETH_ALEN]; + + /** @prev_hop: previous hop (source) of path */ + u8 prev_hop[ETH_ALEN]; + + /** @last_valid: timestamp for last validation of path */ + unsigned long last_valid; +}; + +/** + * struct batadv_nc_packet - network coding packet used when coding and + * decoding packets + */ +struct batadv_nc_packet { + /** @list: next and prev pointer for the list handling */ + struct list_head list; + + /** @packet_id: crc32 checksum of skb data */ + __be32 packet_id; + + /** + * @timestamp: field containing the info when the packet was added to + * path + */ + unsigned long timestamp; + + /** @neigh_node: pointer to original next hop neighbor of skb */ + struct batadv_neigh_node *neigh_node; + + /** @skb: skb which can be encoded or used for decoding */ + struct sk_buff *skb; + + /** @nc_path: pointer to path this nc packet is attached to */ + struct batadv_nc_path *nc_path; +}; + +/** + * struct batadv_skb_cb - control buffer structure used to store private data + * relevant to batman-adv in the skb->cb buffer in skbs. + */ +struct batadv_skb_cb { + /** + * @decoded: Marks a skb as decoded, which is checked when searching for + * coding opportunities in network-coding.c + */ + unsigned char decoded:1; + + /** @num_bcasts: Counter for broadcast packet retransmissions */ + unsigned char num_bcasts; +}; + +/** + * struct batadv_forw_packet - structure for bcast packets to be sent/forwarded + */ +struct batadv_forw_packet { + /** + * @list: list node for &batadv_priv.forw.bcast_list and + * &batadv_priv.forw.bat_list + */ + struct hlist_node list; + + /** @cleanup_list: list node for purging functions */ + struct hlist_node cleanup_list; + + /** @send_time: execution time for delayed_work (packet sending) */ + unsigned long send_time; + + /** + * @own: bool for locally generated packets (local OGMs are re-scheduled + * after sending) + */ + u8 own; + + /** @skb: bcast packet's skb buffer */ + struct sk_buff *skb; + + /** @packet_len: size of aggregated OGM packet inside the skb buffer */ + u16 packet_len; + + /** @direct_link_flags: direct link flags for aggregated OGM packets */ + u32 direct_link_flags; + + /** @num_packets: counter for aggregated OGMv1 packets */ + u8 num_packets; + + /** @delayed_work: work queue callback item for packet sending */ + struct delayed_work delayed_work; + + /** + * @if_incoming: pointer to incoming hard-iface or primary iface if + * locally generated packet + */ + struct batadv_hard_iface *if_incoming; + + /** + * @if_outgoing: packet where the packet should be sent to, or NULL if + * unspecified + */ + struct batadv_hard_iface *if_outgoing; + + /** @queue_left: The queue (counter) this packet was applied to */ + atomic_t *queue_left; +}; + +/** + * struct batadv_algo_iface_ops - mesh algorithm callbacks (interface specific) + */ +struct batadv_algo_iface_ops { + /** + * @activate: start routing mechanisms when hard-interface is brought up + * (optional) + */ + void (*activate)(struct batadv_hard_iface *hard_iface); + + /** @enable: init routing info when hard-interface is enabled */ + int (*enable)(struct batadv_hard_iface *hard_iface); + + /** @enabled: notification when hard-interface was enabled (optional) */ + void (*enabled)(struct batadv_hard_iface *hard_iface); + + /** @disable: de-init routing info when hard-interface is disabled */ + void (*disable)(struct batadv_hard_iface *hard_iface); + + /** + * @update_mac: (re-)init mac addresses of the protocol information + * belonging to this hard-interface + */ + void (*update_mac)(struct batadv_hard_iface *hard_iface); + + /** @primary_set: called when primary interface is selected / changed */ + void (*primary_set)(struct batadv_hard_iface *hard_iface); +}; + +/** + * struct batadv_algo_neigh_ops - mesh algorithm callbacks (neighbour specific) + */ +struct batadv_algo_neigh_ops { + /** @hardif_init: called on creation of single hop entry (optional) */ + void (*hardif_init)(struct batadv_hardif_neigh_node *neigh); + + /** + * @cmp: compare the metrics of two neighbors for their respective + * outgoing interfaces + */ + int (*cmp)(struct batadv_neigh_node *neigh1, + struct batadv_hard_iface *if_outgoing1, + struct batadv_neigh_node *neigh2, + struct batadv_hard_iface *if_outgoing2); + + /** + * @is_similar_or_better: check if neigh1 is equally similar or better + * than neigh2 for their respective outgoing interface from the metric + * prospective + */ + bool (*is_similar_or_better)(struct batadv_neigh_node *neigh1, + struct batadv_hard_iface *if_outgoing1, + struct batadv_neigh_node *neigh2, + struct batadv_hard_iface *if_outgoing2); + +#ifdef CONFIG_BATMAN_ADV_DEBUGFS + /** @print: print the single hop neighbor list (optional) */ + void (*print)(struct batadv_priv *priv, struct seq_file *seq); +#endif + + /** @dump: dump neighbors to a netlink socket (optional) */ + void (*dump)(struct sk_buff *msg, struct netlink_callback *cb, + struct batadv_priv *priv, + struct batadv_hard_iface *hard_iface); +}; + +/** + * struct batadv_algo_orig_ops - mesh algorithm callbacks (originator specific) + */ +struct batadv_algo_orig_ops { + /** + * @free: free the resources allocated by the routing algorithm for an + * orig_node object (optional) + */ + void (*free)(struct batadv_orig_node *orig_node); + + /** + * @add_if: ask the routing algorithm to apply the needed changes to the + * orig_node due to a new hard-interface being added into the mesh + * (optional) + */ + int (*add_if)(struct batadv_orig_node *orig_node, + unsigned int max_if_num); + + /** + * @del_if: ask the routing algorithm to apply the needed changes to the + * orig_node due to an hard-interface being removed from the mesh + * (optional) + */ + int (*del_if)(struct batadv_orig_node *orig_node, + unsigned int max_if_num, unsigned int del_if_num); + +#ifdef CONFIG_BATMAN_ADV_DEBUGFS + /** @print: print the originator table (optional) */ + void (*print)(struct batadv_priv *priv, struct seq_file *seq, + struct batadv_hard_iface *hard_iface); +#endif + + /** @dump: dump originators to a netlink socket (optional) */ + void (*dump)(struct sk_buff *msg, struct netlink_callback *cb, + struct batadv_priv *priv, + struct batadv_hard_iface *hard_iface); +}; + +/** + * struct batadv_algo_gw_ops - mesh algorithm callbacks (GW specific) + */ +struct batadv_algo_gw_ops { + /** @init_sel_class: initialize GW selection class (optional) */ + void (*init_sel_class)(struct batadv_priv *bat_priv); + + /** + * @store_sel_class: parse and stores a new GW selection class + * (optional) + */ + ssize_t (*store_sel_class)(struct batadv_priv *bat_priv, char *buff, + size_t count); + + /** @show_sel_class: prints the current GW selection class (optional) */ + ssize_t (*show_sel_class)(struct batadv_priv *bat_priv, char *buff); + + /** + * @get_best_gw_node: select the best GW from the list of available + * nodes (optional) + */ + struct batadv_gw_node *(*get_best_gw_node) + (struct batadv_priv *bat_priv); + + /** + * @is_eligible: check if a newly discovered GW is a potential candidate + * for the election as best GW (optional) + */ + bool (*is_eligible)(struct batadv_priv *bat_priv, + struct batadv_orig_node *curr_gw_orig, + struct batadv_orig_node *orig_node); + +#ifdef CONFIG_BATMAN_ADV_DEBUGFS + /** @print: print the gateway table (optional) */ + void (*print)(struct batadv_priv *bat_priv, struct seq_file *seq); +#endif + + /** @dump: dump gateways to a netlink socket (optional) */ + void (*dump)(struct sk_buff *msg, struct netlink_callback *cb, + struct batadv_priv *priv); +}; + +/** + * struct batadv_algo_ops - mesh algorithm callbacks + */ +struct batadv_algo_ops { + /** @list: list node for the batadv_algo_list */ + struct hlist_node list; + + /** @name: name of the algorithm */ + char *name; + + /** @iface: callbacks related to interface handling */ + struct batadv_algo_iface_ops iface; + + /** @neigh: callbacks related to neighbors handling */ + struct batadv_algo_neigh_ops neigh; + + /** @orig: callbacks related to originators handling */ + struct batadv_algo_orig_ops orig; + + /** @gw: callbacks related to GW mode */ + struct batadv_algo_gw_ops gw; +}; + +/** + * struct batadv_dat_entry - it is a single entry of batman-adv ARP backend. It + * is used to stored ARP entries needed for the global DAT cache + */ +struct batadv_dat_entry { + /** @ip: the IPv4 corresponding to this DAT/ARP entry */ + __be32 ip; + + /** @mac_addr: the MAC address associated to the stored IPv4 */ + u8 mac_addr[ETH_ALEN]; + + /** @vid: the vlan ID associated to this entry */ + unsigned short vid; + + /** + * @last_update: time in jiffies when this entry was refreshed last time + */ + unsigned long last_update; + + /** @hash_entry: hlist node for &batadv_priv_dat.hash */ + struct hlist_node hash_entry; + + /** @refcount: number of contexts the object is used */ + struct kref refcount; + + /** @rcu: struct used for freeing in an RCU-safe manner */ + struct rcu_head rcu; +}; + +/** + * struct batadv_hw_addr - a list entry for a MAC address + */ +struct batadv_hw_addr { + /** @list: list node for the linking of entries */ + struct hlist_node list; + + /** @addr: the MAC address of this list entry */ + unsigned char addr[ETH_ALEN]; +}; + +/** + * struct batadv_dat_candidate - candidate destination for DAT operations + */ +struct batadv_dat_candidate { + /** + * @type: the type of the selected candidate. It can one of the + * following: + * - BATADV_DAT_CANDIDATE_NOT_FOUND + * - BATADV_DAT_CANDIDATE_ORIG + */ + int type; + + /** + * @orig_node: if type is BATADV_DAT_CANDIDATE_ORIG this field points to + * the corresponding originator node structure + */ + struct batadv_orig_node *orig_node; +}; + +/** + * struct batadv_tvlv_container - container for tvlv appended to OGMs + */ +struct batadv_tvlv_container { + /** @list: hlist node for &batadv_priv_tvlv.container_list */ + struct hlist_node list; + + /** @tvlv_hdr: tvlv header information needed to construct the tvlv */ + struct batadv_tvlv_hdr tvlv_hdr; + + /** @refcount: number of contexts the object is used */ + struct kref refcount; +}; + +/** + * struct batadv_tvlv_handler - handler for specific tvlv type and version + */ +struct batadv_tvlv_handler { + /** @list: hlist node for &batadv_priv_tvlv.handler_list */ + struct hlist_node list; + + /** + * @ogm_handler: handler callback which is given the tvlv payload to + * process on incoming OGM packets + */ + void (*ogm_handler)(struct batadv_priv *bat_priv, + struct batadv_orig_node *orig, + u8 flags, void *tvlv_value, u16 tvlv_value_len); + + /** + * @unicast_handler: handler callback which is given the tvlv payload to + * process on incoming unicast tvlv packets + */ + int (*unicast_handler)(struct batadv_priv *bat_priv, + u8 *src, u8 *dst, + void *tvlv_value, u16 tvlv_value_len); + + /** @type: tvlv type this handler feels responsible for */ + u8 type; + + /** @version: tvlv version this handler feels responsible for */ + u8 version; + + /** @flags: tvlv handler flags */ + u8 flags; + + /** @refcount: number of contexts the object is used */ + struct kref refcount; + + /** @rcu: struct used for freeing in an RCU-safe manner */ + struct rcu_head rcu; +}; + +/** + * enum batadv_tvlv_handler_flags - tvlv handler flags definitions + */ +enum batadv_tvlv_handler_flags { + /** + * @BATADV_TVLV_HANDLER_OGM_CIFNOTFND: tvlv ogm processing function + * will call this handler even if its type was not found (with no data) + */ + BATADV_TVLV_HANDLER_OGM_CIFNOTFND = BIT(1), + + /** + * @BATADV_TVLV_HANDLER_OGM_CALLED: interval tvlv handling flag - the + * API marks a handler as being called, so it won't be called if the + * BATADV_TVLV_HANDLER_OGM_CIFNOTFND flag was set + */ + BATADV_TVLV_HANDLER_OGM_CALLED = BIT(2), +}; + +/** + * struct batadv_store_mesh_work - Work queue item to detach add/del interface + * from sysfs locks + */ +struct batadv_store_mesh_work { + /** + * @net_dev: netdevice to add/remove to/from batman-adv soft-interface + */ + struct net_device *net_dev; + + /** @soft_iface_name: name of soft-interface to modify */ + char soft_iface_name[IFNAMSIZ]; + + /** @work: work queue item */ + struct work_struct work; +}; + +#endif /* _NET_BATMAN_ADV_TYPES_H_ */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/batman-adv/types.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/batman-adv/types.h.yml new file mode 100644 index 00000000000..80f5d994b2c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/batman-adv/types.h.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2007-2018 B.A.T.M.A.N. +holders: + - B.A.T.M.A.N. diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/dccp/ccids/lib/packet_history.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/dccp/ccids/lib/packet_history.c new file mode 100644 index 00000000000..34fddb6cac9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/dccp/ccids/lib/packet_history.c @@ -0,0 +1,447 @@ +/* + * Copyright (c) 2007 The University of Aberdeen, Scotland, UK + * Copyright (c) 2005-7 The University of Waikato, Hamilton, New Zealand. + * + * An implementation of the DCCP protocol + * + * This code has been developed by the University of Waikato WAND + * research group. For further information please see http://www.wand.net.nz/ + * or e-mail Ian McDonald - ian.mcdonald@jandi.co.nz + * + * This code also uses code from Lulea University, rereleased as GPL by its + * authors: + * Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon + * + * Changes to meet Linux coding standards, to make it meet latest ccid3 draft + * and to make it work as a loadable module in the DCCP stack written by + * Arnaldo Carvalho de Melo . + * + * Copyright (c) 2005 Arnaldo Carvalho de Melo + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include "packet_history.h" +#include "../../dccp.h" + +/* + * Transmitter History Routines + */ +static struct kmem_cache *tfrc_tx_hist_slab; + +int __init tfrc_tx_packet_history_init(void) +{ + tfrc_tx_hist_slab = kmem_cache_create("tfrc_tx_hist", + sizeof(struct tfrc_tx_hist_entry), + 0, SLAB_HWCACHE_ALIGN, NULL); + return tfrc_tx_hist_slab == NULL ? -ENOBUFS : 0; +} + +void tfrc_tx_packet_history_exit(void) +{ + if (tfrc_tx_hist_slab != NULL) { + kmem_cache_destroy(tfrc_tx_hist_slab); + tfrc_tx_hist_slab = NULL; + } +} + +int tfrc_tx_hist_add(struct tfrc_tx_hist_entry **headp, u64 seqno) +{ + struct tfrc_tx_hist_entry *entry = kmem_cache_alloc(tfrc_tx_hist_slab, gfp_any()); + + if (entry == NULL) + return -ENOBUFS; + entry->seqno = seqno; + entry->stamp = ktime_get_real(); + entry->next = *headp; + *headp = entry; + return 0; +} + +void tfrc_tx_hist_purge(struct tfrc_tx_hist_entry **headp) +{ + struct tfrc_tx_hist_entry *head = *headp; + + while (head != NULL) { + struct tfrc_tx_hist_entry *next = head->next; + + kmem_cache_free(tfrc_tx_hist_slab, head); + head = next; + } + + *headp = NULL; +} + +/* + * Receiver History Routines + */ +static struct kmem_cache *tfrc_rx_hist_slab; + +int __init tfrc_rx_packet_history_init(void) +{ + tfrc_rx_hist_slab = kmem_cache_create("tfrc_rxh_cache", + sizeof(struct tfrc_rx_hist_entry), + 0, SLAB_HWCACHE_ALIGN, NULL); + return tfrc_rx_hist_slab == NULL ? -ENOBUFS : 0; +} + +void tfrc_rx_packet_history_exit(void) +{ + if (tfrc_rx_hist_slab != NULL) { + kmem_cache_destroy(tfrc_rx_hist_slab); + tfrc_rx_hist_slab = NULL; + } +} + +static inline void tfrc_rx_hist_entry_from_skb(struct tfrc_rx_hist_entry *entry, + const struct sk_buff *skb, + const u64 ndp) +{ + const struct dccp_hdr *dh = dccp_hdr(skb); + + entry->tfrchrx_seqno = DCCP_SKB_CB(skb)->dccpd_seq; + entry->tfrchrx_ccval = dh->dccph_ccval; + entry->tfrchrx_type = dh->dccph_type; + entry->tfrchrx_ndp = ndp; + entry->tfrchrx_tstamp = ktime_get_real(); +} + +void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h, + const struct sk_buff *skb, + const u64 ndp) +{ + struct tfrc_rx_hist_entry *entry = tfrc_rx_hist_last_rcv(h); + + tfrc_rx_hist_entry_from_skb(entry, skb, ndp); +} + +/* has the packet contained in skb been seen before? */ +int tfrc_rx_hist_duplicate(struct tfrc_rx_hist *h, struct sk_buff *skb) +{ + const u64 seq = DCCP_SKB_CB(skb)->dccpd_seq; + int i; + + if (dccp_delta_seqno(tfrc_rx_hist_loss_prev(h)->tfrchrx_seqno, seq) <= 0) + return 1; + + for (i = 1; i <= h->loss_count; i++) + if (tfrc_rx_hist_entry(h, i)->tfrchrx_seqno == seq) + return 1; + + return 0; +} + +static void tfrc_rx_hist_swap(struct tfrc_rx_hist *h, const u8 a, const u8 b) +{ + const u8 idx_a = tfrc_rx_hist_index(h, a), + idx_b = tfrc_rx_hist_index(h, b); + + swap(h->ring[idx_a], h->ring[idx_b]); +} + +/* + * Private helper functions for loss detection. + * + * In the descriptions, `Si' refers to the sequence number of entry number i, + * whose NDP count is `Ni' (lower case is used for variables). + * Note: All __xxx_loss functions expect that a test against duplicates has been + * performed already: the seqno of the skb must not be less than the seqno + * of loss_prev; and it must not equal that of any valid history entry. + */ +static void __do_track_loss(struct tfrc_rx_hist *h, struct sk_buff *skb, u64 n1) +{ + u64 s0 = tfrc_rx_hist_loss_prev(h)->tfrchrx_seqno, + s1 = DCCP_SKB_CB(skb)->dccpd_seq; + + if (!dccp_loss_free(s0, s1, n1)) { /* gap between S0 and S1 */ + h->loss_count = 1; + tfrc_rx_hist_entry_from_skb(tfrc_rx_hist_entry(h, 1), skb, n1); + } +} + +static void __one_after_loss(struct tfrc_rx_hist *h, struct sk_buff *skb, u32 n2) +{ + u64 s0 = tfrc_rx_hist_loss_prev(h)->tfrchrx_seqno, + s1 = tfrc_rx_hist_entry(h, 1)->tfrchrx_seqno, + s2 = DCCP_SKB_CB(skb)->dccpd_seq; + + if (likely(dccp_delta_seqno(s1, s2) > 0)) { /* S1 < S2 */ + h->loss_count = 2; + tfrc_rx_hist_entry_from_skb(tfrc_rx_hist_entry(h, 2), skb, n2); + return; + } + + /* S0 < S2 < S1 */ + + if (dccp_loss_free(s0, s2, n2)) { + u64 n1 = tfrc_rx_hist_entry(h, 1)->tfrchrx_ndp; + + if (dccp_loss_free(s2, s1, n1)) { + /* hole is filled: S0, S2, and S1 are consecutive */ + h->loss_count = 0; + h->loss_start = tfrc_rx_hist_index(h, 1); + } else + /* gap between S2 and S1: just update loss_prev */ + tfrc_rx_hist_entry_from_skb(tfrc_rx_hist_loss_prev(h), skb, n2); + + } else { /* gap between S0 and S2 */ + /* + * Reorder history to insert S2 between S0 and S1 + */ + tfrc_rx_hist_swap(h, 0, 3); + h->loss_start = tfrc_rx_hist_index(h, 3); + tfrc_rx_hist_entry_from_skb(tfrc_rx_hist_entry(h, 1), skb, n2); + h->loss_count = 2; + } +} + +/* return 1 if a new loss event has been identified */ +static int __two_after_loss(struct tfrc_rx_hist *h, struct sk_buff *skb, u32 n3) +{ + u64 s0 = tfrc_rx_hist_loss_prev(h)->tfrchrx_seqno, + s1 = tfrc_rx_hist_entry(h, 1)->tfrchrx_seqno, + s2 = tfrc_rx_hist_entry(h, 2)->tfrchrx_seqno, + s3 = DCCP_SKB_CB(skb)->dccpd_seq; + + if (likely(dccp_delta_seqno(s2, s3) > 0)) { /* S2 < S3 */ + h->loss_count = 3; + tfrc_rx_hist_entry_from_skb(tfrc_rx_hist_entry(h, 3), skb, n3); + return 1; + } + + /* S3 < S2 */ + + if (dccp_delta_seqno(s1, s3) > 0) { /* S1 < S3 < S2 */ + /* + * Reorder history to insert S3 between S1 and S2 + */ + tfrc_rx_hist_swap(h, 2, 3); + tfrc_rx_hist_entry_from_skb(tfrc_rx_hist_entry(h, 2), skb, n3); + h->loss_count = 3; + return 1; + } + + /* S0 < S3 < S1 */ + + if (dccp_loss_free(s0, s3, n3)) { + u64 n1 = tfrc_rx_hist_entry(h, 1)->tfrchrx_ndp; + + if (dccp_loss_free(s3, s1, n1)) { + /* hole between S0 and S1 filled by S3 */ + u64 n2 = tfrc_rx_hist_entry(h, 2)->tfrchrx_ndp; + + if (dccp_loss_free(s1, s2, n2)) { + /* entire hole filled by S0, S3, S1, S2 */ + h->loss_start = tfrc_rx_hist_index(h, 2); + h->loss_count = 0; + } else { + /* gap remains between S1 and S2 */ + h->loss_start = tfrc_rx_hist_index(h, 1); + h->loss_count = 1; + } + + } else /* gap exists between S3 and S1, loss_count stays at 2 */ + tfrc_rx_hist_entry_from_skb(tfrc_rx_hist_loss_prev(h), skb, n3); + + return 0; + } + + /* + * The remaining case: S0 < S3 < S1 < S2; gap between S0 and S3 + * Reorder history to insert S3 between S0 and S1. + */ + tfrc_rx_hist_swap(h, 0, 3); + h->loss_start = tfrc_rx_hist_index(h, 3); + tfrc_rx_hist_entry_from_skb(tfrc_rx_hist_entry(h, 1), skb, n3); + h->loss_count = 3; + + return 1; +} + +/* recycle RX history records to continue loss detection if necessary */ +static void __three_after_loss(struct tfrc_rx_hist *h) +{ + /* + * At this stage we know already that there is a gap between S0 and S1 + * (since S0 was the highest sequence number received before detecting + * the loss). To recycle the loss record, it is thus only necessary to + * check for other possible gaps between S1/S2 and between S2/S3. + */ + u64 s1 = tfrc_rx_hist_entry(h, 1)->tfrchrx_seqno, + s2 = tfrc_rx_hist_entry(h, 2)->tfrchrx_seqno, + s3 = tfrc_rx_hist_entry(h, 3)->tfrchrx_seqno; + u64 n2 = tfrc_rx_hist_entry(h, 2)->tfrchrx_ndp, + n3 = tfrc_rx_hist_entry(h, 3)->tfrchrx_ndp; + + if (dccp_loss_free(s1, s2, n2)) { + + if (dccp_loss_free(s2, s3, n3)) { + /* no gap between S2 and S3: entire hole is filled */ + h->loss_start = tfrc_rx_hist_index(h, 3); + h->loss_count = 0; + } else { + /* gap between S2 and S3 */ + h->loss_start = tfrc_rx_hist_index(h, 2); + h->loss_count = 1; + } + + } else { /* gap between S1 and S2 */ + h->loss_start = tfrc_rx_hist_index(h, 1); + h->loss_count = 2; + } +} + +/** + * tfrc_rx_handle_loss - Loss detection and further processing + * @h: The non-empty RX history object + * @lh: Loss Intervals database to update + * @skb: Currently received packet + * @ndp: The NDP count belonging to @skb + * @calc_first_li: Caller-dependent computation of first loss interval in @lh + * @sk: Used by @calc_first_li (see tfrc_lh_interval_add) + * + * Chooses action according to pending loss, updates LI database when a new + * loss was detected, and does required post-processing. Returns 1 when caller + * should send feedback, 0 otherwise. + * Since it also takes care of reordering during loss detection and updates the + * records accordingly, the caller should not perform any more RX history + * operations when loss_count is greater than 0 after calling this function. + */ +int tfrc_rx_handle_loss(struct tfrc_rx_hist *h, + struct tfrc_loss_hist *lh, + struct sk_buff *skb, const u64 ndp, + u32 (*calc_first_li)(struct sock *), struct sock *sk) +{ + int is_new_loss = 0; + + if (h->loss_count == 0) { + __do_track_loss(h, skb, ndp); + } else if (h->loss_count == 1) { + __one_after_loss(h, skb, ndp); + } else if (h->loss_count != 2) { + DCCP_BUG("invalid loss_count %d", h->loss_count); + } else if (__two_after_loss(h, skb, ndp)) { + /* + * Update Loss Interval database and recycle RX records + */ + is_new_loss = tfrc_lh_interval_add(lh, h, calc_first_li, sk); + __three_after_loss(h); + } + return is_new_loss; +} + +int tfrc_rx_hist_alloc(struct tfrc_rx_hist *h) +{ + int i; + + for (i = 0; i <= TFRC_NDUPACK; i++) { + h->ring[i] = kmem_cache_alloc(tfrc_rx_hist_slab, GFP_ATOMIC); + if (h->ring[i] == NULL) + goto out_free; + } + + h->loss_count = h->loss_start = 0; + return 0; + +out_free: + while (i-- != 0) { + kmem_cache_free(tfrc_rx_hist_slab, h->ring[i]); + h->ring[i] = NULL; + } + return -ENOBUFS; +} + +void tfrc_rx_hist_purge(struct tfrc_rx_hist *h) +{ + int i; + + for (i = 0; i <= TFRC_NDUPACK; ++i) + if (h->ring[i] != NULL) { + kmem_cache_free(tfrc_rx_hist_slab, h->ring[i]); + h->ring[i] = NULL; + } +} + +/** + * tfrc_rx_hist_rtt_last_s - reference entry to compute RTT samples against + */ +static inline struct tfrc_rx_hist_entry * + tfrc_rx_hist_rtt_last_s(const struct tfrc_rx_hist *h) +{ + return h->ring[0]; +} + +/** + * tfrc_rx_hist_rtt_prev_s - previously suitable (wrt rtt_last_s) RTT-sampling entry + */ +static inline struct tfrc_rx_hist_entry * + tfrc_rx_hist_rtt_prev_s(const struct tfrc_rx_hist *h) +{ + return h->ring[h->rtt_sample_prev]; +} + +/** + * tfrc_rx_hist_sample_rtt - Sample RTT from timestamp / CCVal + * Based on ideas presented in RFC 4342, 8.1. Returns 0 if it was not able + * to compute a sample with given data - calling function should check this. + */ +u32 tfrc_rx_hist_sample_rtt(struct tfrc_rx_hist *h, const struct sk_buff *skb) +{ + u32 sample = 0, + delta_v = SUB16(dccp_hdr(skb)->dccph_ccval, + tfrc_rx_hist_rtt_last_s(h)->tfrchrx_ccval); + + if (delta_v < 1 || delta_v > 4) { /* unsuitable CCVal delta */ + if (h->rtt_sample_prev == 2) { /* previous candidate stored */ + sample = SUB16(tfrc_rx_hist_rtt_prev_s(h)->tfrchrx_ccval, + tfrc_rx_hist_rtt_last_s(h)->tfrchrx_ccval); + if (sample) + sample = 4 / sample * + ktime_us_delta(tfrc_rx_hist_rtt_prev_s(h)->tfrchrx_tstamp, + tfrc_rx_hist_rtt_last_s(h)->tfrchrx_tstamp); + else /* + * FIXME: This condition is in principle not + * possible but occurs when CCID is used for + * two-way data traffic. I have tried to trace + * it, but the cause does not seem to be here. + */ + DCCP_BUG("please report to dccp@vger.kernel.org" + " => prev = %u, last = %u", + tfrc_rx_hist_rtt_prev_s(h)->tfrchrx_ccval, + tfrc_rx_hist_rtt_last_s(h)->tfrchrx_ccval); + } else if (delta_v < 1) { + h->rtt_sample_prev = 1; + goto keep_ref_for_next_time; + } + + } else if (delta_v == 4) /* optimal match */ + sample = ktime_to_us(net_timedelta(tfrc_rx_hist_rtt_last_s(h)->tfrchrx_tstamp)); + else { /* suboptimal match */ + h->rtt_sample_prev = 2; + goto keep_ref_for_next_time; + } + + if (unlikely(sample > DCCP_SANE_RTT_MAX)) { + DCCP_WARN("RTT sample %u too large, using max\n", sample); + sample = DCCP_SANE_RTT_MAX; + } + + h->rtt_sample_prev = 0; /* use current entry as next reference */ +keep_ref_for_next_time: + + return sample; +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/dccp/ccids/lib/packet_history.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/dccp/ccids/lib/packet_history.c.yml new file mode 100644 index 00000000000..371d768b5a8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/dccp/ccids/lib/packet_history.c.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2007 The University of Aberdeen, Scotland, UK + - Copyright (c) 2005-7 The University of Waikato, Hamilton, New Zealand. An + - Copyright (c) 2003 Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon + - Copyright (c) 2005 Arnaldo Carvalho de Melo +holders: + - The University of Aberdeen, Scotland, UK + - The University of Waikato, Hamilton, New Zealand. An + - Nils-Erik Mattsson, Joacim Haggmark, Magnus Erixzon + - Arnaldo Carvalho de Melo +authors: + - the University of Waikato WAND research group diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/llc/af_llc.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/llc/af_llc.c new file mode 100644 index 00000000000..d64f228d439 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/llc/af_llc.c @@ -0,0 +1,1267 @@ +/* + * af_llc.c - LLC User Interface SAPs + * Description: + * Functions in this module are implementation of socket based llc + * communications for the Linux operating system. Support of llc class + * one and class two is provided via SOCK_DGRAM and SOCK_STREAM + * respectively. + * + * An llc2 connection is (mac + sap), only one llc2 sap connection + * is allowed per mac. Though one sap may have multiple mac + sap + * connections. + * + * Copyright (c) 2001 by Jay Schulist + * 2002-2003 by Arnaldo Carvalho de Melo + * + * This program can be redistributed or modified under the terms of the + * GNU General Public License as published by the Free Software Foundation. + * This program is distributed without any warranty or implied warranty + * of merchantability or fitness for a particular purpose. + * + * See the GNU General Public License for more details. + */ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +/* remember: uninitialized global data is zeroed because its in .bss */ +static u16 llc_ui_sap_last_autoport = LLC_SAP_DYN_START; +static u16 llc_ui_sap_link_no_max[256]; +static struct sockaddr_llc llc_ui_addrnull; +static const struct proto_ops llc_ui_ops; + +static bool llc_ui_wait_for_conn(struct sock *sk, long timeout); +static int llc_ui_wait_for_disc(struct sock *sk, long timeout); +static int llc_ui_wait_for_busy_core(struct sock *sk, long timeout); + +#if 0 +#define dprintk(args...) printk(KERN_DEBUG args) +#else +#define dprintk(args...) +#endif + +/* Maybe we'll add some more in the future. */ +#define LLC_CMSG_PKTINFO 1 + + +/** + * llc_ui_next_link_no - return the next unused link number for a sap + * @sap: Address of sap to get link number from. + * + * Return the next unused link number for a given sap. + */ +static inline u16 llc_ui_next_link_no(int sap) +{ + return llc_ui_sap_link_no_max[sap]++; +} + +/** + * llc_proto_type - return eth protocol for ARP header type + * @arphrd: ARP header type. + * + * Given an ARP header type return the corresponding ethernet protocol. + */ +static inline __be16 llc_proto_type(u16 arphrd) +{ + return htons(ETH_P_802_2); +} + +/** + * llc_ui_addr_null - determines if a address structure is null + * @addr: Address to test if null. + */ +static inline u8 llc_ui_addr_null(struct sockaddr_llc *addr) +{ + return !memcmp(addr, &llc_ui_addrnull, sizeof(*addr)); +} + +/** + * llc_ui_header_len - return length of llc header based on operation + * @sk: Socket which contains a valid llc socket type. + * @addr: Complete sockaddr_llc structure received from the user. + * + * Provide the length of the llc header depending on what kind of + * operation the user would like to perform and the type of socket. + * Returns the correct llc header length. + */ +static inline u8 llc_ui_header_len(struct sock *sk, struct sockaddr_llc *addr) +{ + u8 rc = LLC_PDU_LEN_U; + + if (addr->sllc_test || addr->sllc_xid) + rc = LLC_PDU_LEN_U; + else if (sk->sk_type == SOCK_STREAM) + rc = LLC_PDU_LEN_I; + return rc; +} + +/** + * llc_ui_send_data - send data via reliable llc2 connection + * @sk: Connection the socket is using. + * @skb: Data the user wishes to send. + * @noblock: can we block waiting for data? + * + * Send data via reliable llc2 connection. + * Returns 0 upon success, non-zero if action did not succeed. + */ +static int llc_ui_send_data(struct sock* sk, struct sk_buff *skb, int noblock) +{ + struct llc_sock* llc = llc_sk(sk); + int rc = 0; + + if (unlikely(llc_data_accept_state(llc->state) || + llc->remote_busy_flag || + llc->p_flag)) { + long timeout = sock_sndtimeo(sk, noblock); + + rc = llc_ui_wait_for_busy_core(sk, timeout); + } + if (unlikely(!rc)) + rc = llc_build_and_send_pkt(sk, skb); + return rc; +} + +static void llc_ui_sk_init(struct socket *sock, struct sock *sk) +{ + sock_graft(sk, sock); + sk->sk_type = sock->type; + sock->ops = &llc_ui_ops; +} + +static struct proto llc_proto = { + .name = "LLC", + .owner = THIS_MODULE, + .obj_size = sizeof(struct llc_sock), + .slab_flags = SLAB_TYPESAFE_BY_RCU, +}; + +/** + * llc_ui_create - alloc and init a new llc_ui socket + * @net: network namespace (must be default network) + * @sock: Socket to initialize and attach allocated sk to. + * @protocol: Unused. + * @kern: on behalf of kernel or userspace + * + * Allocate and initialize a new llc_ui socket, validate the user wants a + * socket type we have available. + * Returns 0 upon success, negative upon failure. + */ +static int llc_ui_create(struct net *net, struct socket *sock, int protocol, + int kern) +{ + struct sock *sk; + int rc = -ESOCKTNOSUPPORT; + + if (!ns_capable(net->user_ns, CAP_NET_RAW)) + return -EPERM; + + if (!net_eq(net, &init_net)) + return -EAFNOSUPPORT; + + if (likely(sock->type == SOCK_DGRAM || sock->type == SOCK_STREAM)) { + rc = -ENOMEM; + sk = llc_sk_alloc(net, PF_LLC, GFP_KERNEL, &llc_proto, kern); + if (sk) { + rc = 0; + llc_ui_sk_init(sock, sk); + } + } + return rc; +} + +/** + * llc_ui_release - shutdown socket + * @sock: Socket to release. + * + * Shutdown and deallocate an existing socket. + */ +static int llc_ui_release(struct socket *sock) +{ + struct sock *sk = sock->sk; + struct llc_sock *llc; + + if (unlikely(sk == NULL)) + goto out; + sock_hold(sk); + lock_sock(sk); + llc = llc_sk(sk); + dprintk("%s: closing local(%02X) remote(%02X)\n", __func__, + llc->laddr.lsap, llc->daddr.lsap); + if (!llc_send_disc(sk)) + llc_ui_wait_for_disc(sk, sk->sk_rcvtimeo); + if (!sock_flag(sk, SOCK_ZAPPED)) { + struct llc_sap *sap = llc->sap; + + /* Hold this for release_sock(), so that llc_backlog_rcv() + * could still use it. + */ + llc_sap_hold(sap); + llc_sap_remove_socket(llc->sap, sk); + release_sock(sk); + llc_sap_put(sap); + } else { + release_sock(sk); + } + if (llc->dev) + dev_put(llc->dev); + sock_put(sk); + llc_sk_free(sk); +out: + return 0; +} + +/** + * llc_ui_autoport - provide dynamically allocate SAP number + * + * Provide the caller with a dynamically allocated SAP number according + * to the rules that are set in this function. Returns: 0, upon failure, + * SAP number otherwise. + */ +static int llc_ui_autoport(void) +{ + struct llc_sap *sap; + int i, tries = 0; + + while (tries < LLC_SAP_DYN_TRIES) { + for (i = llc_ui_sap_last_autoport; + i < LLC_SAP_DYN_STOP; i += 2) { + sap = llc_sap_find(i); + if (!sap) { + llc_ui_sap_last_autoport = i + 2; + goto out; + } + llc_sap_put(sap); + } + llc_ui_sap_last_autoport = LLC_SAP_DYN_START; + tries++; + } + i = 0; +out: + return i; +} + +/** + * llc_ui_autobind - automatically bind a socket to a sap + * @sock: socket to bind + * @addr: address to connect to + * + * Used by llc_ui_connect and llc_ui_sendmsg when the user hasn't + * specifically used llc_ui_bind to bind to an specific address/sap + * + * Returns: 0 upon success, negative otherwise. + */ +static int llc_ui_autobind(struct socket *sock, struct sockaddr_llc *addr) +{ + struct sock *sk = sock->sk; + struct llc_sock *llc = llc_sk(sk); + struct llc_sap *sap; + int rc = -EINVAL; + + if (!sock_flag(sk, SOCK_ZAPPED)) + goto out; + rc = -ENODEV; + if (sk->sk_bound_dev_if) { + llc->dev = dev_get_by_index(&init_net, sk->sk_bound_dev_if); + if (llc->dev && addr->sllc_arphrd != llc->dev->type) { + dev_put(llc->dev); + llc->dev = NULL; + } + } else + llc->dev = dev_getfirstbyhwtype(&init_net, addr->sllc_arphrd); + if (!llc->dev) + goto out; + rc = -EUSERS; + llc->laddr.lsap = llc_ui_autoport(); + if (!llc->laddr.lsap) + goto out; + rc = -EBUSY; /* some other network layer is using the sap */ + sap = llc_sap_open(llc->laddr.lsap, NULL); + if (!sap) + goto out; + memcpy(llc->laddr.mac, llc->dev->dev_addr, IFHWADDRLEN); + memcpy(&llc->addr, addr, sizeof(llc->addr)); + /* assign new connection to its SAP */ + llc_sap_add_socket(sap, sk); + sock_reset_flag(sk, SOCK_ZAPPED); + rc = 0; +out: + return rc; +} + +/** + * llc_ui_bind - bind a socket to a specific address. + * @sock: Socket to bind an address to. + * @uaddr: Address the user wants the socket bound to. + * @addrlen: Length of the uaddr structure. + * + * Bind a socket to a specific address. For llc a user is able to bind to + * a specific sap only or mac + sap. + * If the user desires to bind to a specific mac + sap, it is possible to + * have multiple sap connections via multiple macs. + * Bind and autobind for that matter must enforce the correct sap usage + * otherwise all hell will break loose. + * Returns: 0 upon success, negative otherwise. + */ +static int llc_ui_bind(struct socket *sock, struct sockaddr *uaddr, int addrlen) +{ + struct sockaddr_llc *addr = (struct sockaddr_llc *)uaddr; + struct sock *sk = sock->sk; + struct llc_sock *llc = llc_sk(sk); + struct llc_sap *sap; + int rc = -EINVAL; + + dprintk("%s: binding %02X\n", __func__, addr->sllc_sap); + + lock_sock(sk); + if (unlikely(!sock_flag(sk, SOCK_ZAPPED) || addrlen != sizeof(*addr))) + goto out; + rc = -EAFNOSUPPORT; + if (unlikely(addr->sllc_family != AF_LLC)) + goto out; + rc = -ENODEV; + rcu_read_lock(); + if (sk->sk_bound_dev_if) { + llc->dev = dev_get_by_index_rcu(&init_net, sk->sk_bound_dev_if); + if (llc->dev) { + if (!addr->sllc_arphrd) + addr->sllc_arphrd = llc->dev->type; + if (is_zero_ether_addr(addr->sllc_mac)) + memcpy(addr->sllc_mac, llc->dev->dev_addr, + IFHWADDRLEN); + if (addr->sllc_arphrd != llc->dev->type || + !ether_addr_equal(addr->sllc_mac, + llc->dev->dev_addr)) { + rc = -EINVAL; + llc->dev = NULL; + } + } + } else + llc->dev = dev_getbyhwaddr_rcu(&init_net, addr->sllc_arphrd, + addr->sllc_mac); + if (llc->dev) + dev_hold(llc->dev); + rcu_read_unlock(); + if (!llc->dev) + goto out; + if (!addr->sllc_sap) { + rc = -EUSERS; + addr->sllc_sap = llc_ui_autoport(); + if (!addr->sllc_sap) + goto out; + } + sap = llc_sap_find(addr->sllc_sap); + if (!sap) { + sap = llc_sap_open(addr->sllc_sap, NULL); + rc = -EBUSY; /* some other network layer is using the sap */ + if (!sap) + goto out; + } else { + struct llc_addr laddr, daddr; + struct sock *ask; + + memset(&laddr, 0, sizeof(laddr)); + memset(&daddr, 0, sizeof(daddr)); + /* + * FIXME: check if the address is multicast, + * only SOCK_DGRAM can do this. + */ + memcpy(laddr.mac, addr->sllc_mac, IFHWADDRLEN); + laddr.lsap = addr->sllc_sap; + rc = -EADDRINUSE; /* mac + sap clash. */ + ask = llc_lookup_established(sap, &daddr, &laddr); + if (ask) { + sock_put(ask); + goto out_put; + } + } + llc->laddr.lsap = addr->sllc_sap; + memcpy(llc->laddr.mac, addr->sllc_mac, IFHWADDRLEN); + memcpy(&llc->addr, addr, sizeof(llc->addr)); + /* assign new connection to its SAP */ + llc_sap_add_socket(sap, sk); + sock_reset_flag(sk, SOCK_ZAPPED); + rc = 0; +out_put: + llc_sap_put(sap); +out: + release_sock(sk); + return rc; +} + +/** + * llc_ui_shutdown - shutdown a connect llc2 socket. + * @sock: Socket to shutdown. + * @how: What part of the socket to shutdown. + * + * Shutdown a connected llc2 socket. Currently this function only supports + * shutting down both sends and receives (2), we could probably make this + * function such that a user can shutdown only half the connection but not + * right now. + * Returns: 0 upon success, negative otherwise. + */ +static int llc_ui_shutdown(struct socket *sock, int how) +{ + struct sock *sk = sock->sk; + int rc = -ENOTCONN; + + lock_sock(sk); + if (unlikely(sk->sk_state != TCP_ESTABLISHED)) + goto out; + rc = -EINVAL; + if (how != 2) + goto out; + rc = llc_send_disc(sk); + if (!rc) + rc = llc_ui_wait_for_disc(sk, sk->sk_rcvtimeo); + /* Wake up anyone sleeping in poll */ + sk->sk_state_change(sk); +out: + release_sock(sk); + return rc; +} + +/** + * llc_ui_connect - Connect to a remote llc2 mac + sap. + * @sock: Socket which will be connected to the remote destination. + * @uaddr: Remote and possibly the local address of the new connection. + * @addrlen: Size of uaddr structure. + * @flags: Operational flags specified by the user. + * + * Connect to a remote llc2 mac + sap. The caller must specify the + * destination mac and address to connect to. If the user hasn't previously + * called bind(2) with a smac the address of the first interface of the + * specified arp type will be used. + * This function will autobind if user did not previously call bind. + * Returns: 0 upon success, negative otherwise. + */ +static int llc_ui_connect(struct socket *sock, struct sockaddr *uaddr, + int addrlen, int flags) +{ + struct sock *sk = sock->sk; + struct llc_sock *llc = llc_sk(sk); + struct sockaddr_llc *addr = (struct sockaddr_llc *)uaddr; + int rc = -EINVAL; + + lock_sock(sk); + if (unlikely(addrlen != sizeof(*addr))) + goto out; + rc = -EAFNOSUPPORT; + if (unlikely(addr->sllc_family != AF_LLC)) + goto out; + if (unlikely(sk->sk_type != SOCK_STREAM)) + goto out; + rc = -EALREADY; + if (unlikely(sock->state == SS_CONNECTING)) + goto out; + /* bind connection to sap if user hasn't done it. */ + if (sock_flag(sk, SOCK_ZAPPED)) { + /* bind to sap with null dev, exclusive */ + rc = llc_ui_autobind(sock, addr); + if (rc) + goto out; + } + llc->daddr.lsap = addr->sllc_sap; + memcpy(llc->daddr.mac, addr->sllc_mac, IFHWADDRLEN); + sock->state = SS_CONNECTING; + sk->sk_state = TCP_SYN_SENT; + llc->link = llc_ui_next_link_no(llc->sap->laddr.lsap); + rc = llc_establish_connection(sk, llc->dev->dev_addr, + addr->sllc_mac, addr->sllc_sap); + if (rc) { + dprintk("%s: llc_ui_send_conn failed :-(\n", __func__); + sock->state = SS_UNCONNECTED; + sk->sk_state = TCP_CLOSE; + goto out; + } + + if (sk->sk_state == TCP_SYN_SENT) { + const long timeo = sock_sndtimeo(sk, flags & O_NONBLOCK); + + if (!timeo || !llc_ui_wait_for_conn(sk, timeo)) + goto out; + + rc = sock_intr_errno(timeo); + if (signal_pending(current)) + goto out; + } + + if (sk->sk_state == TCP_CLOSE) + goto sock_error; + + sock->state = SS_CONNECTED; + rc = 0; +out: + release_sock(sk); + return rc; +sock_error: + rc = sock_error(sk) ? : -ECONNABORTED; + sock->state = SS_UNCONNECTED; + goto out; +} + +/** + * llc_ui_listen - allow a normal socket to accept incoming connections + * @sock: Socket to allow incoming connections on. + * @backlog: Number of connections to queue. + * + * Allow a normal socket to accept incoming connections. + * Returns 0 upon success, negative otherwise. + */ +static int llc_ui_listen(struct socket *sock, int backlog) +{ + struct sock *sk = sock->sk; + int rc = -EINVAL; + + lock_sock(sk); + if (unlikely(sock->state != SS_UNCONNECTED)) + goto out; + rc = -EOPNOTSUPP; + if (unlikely(sk->sk_type != SOCK_STREAM)) + goto out; + rc = -EAGAIN; + if (sock_flag(sk, SOCK_ZAPPED)) + goto out; + rc = 0; + if (!(unsigned int)backlog) /* BSDism */ + backlog = 1; + sk->sk_max_ack_backlog = backlog; + if (sk->sk_state != TCP_LISTEN) { + sk->sk_ack_backlog = 0; + sk->sk_state = TCP_LISTEN; + } + sk->sk_socket->flags |= __SO_ACCEPTCON; +out: + release_sock(sk); + return rc; +} + +static int llc_ui_wait_for_disc(struct sock *sk, long timeout) +{ + DEFINE_WAIT_FUNC(wait, woken_wake_function); + int rc = 0; + + add_wait_queue(sk_sleep(sk), &wait); + while (1) { + if (sk_wait_event(sk, &timeout, sk->sk_state == TCP_CLOSE, &wait)) + break; + rc = -ERESTARTSYS; + if (signal_pending(current)) + break; + rc = -EAGAIN; + if (!timeout) + break; + rc = 0; + } + remove_wait_queue(sk_sleep(sk), &wait); + return rc; +} + +static bool llc_ui_wait_for_conn(struct sock *sk, long timeout) +{ + DEFINE_WAIT_FUNC(wait, woken_wake_function); + + add_wait_queue(sk_sleep(sk), &wait); + while (1) { + if (sk_wait_event(sk, &timeout, sk->sk_state != TCP_SYN_SENT, &wait)) + break; + if (signal_pending(current) || !timeout) + break; + } + remove_wait_queue(sk_sleep(sk), &wait); + return timeout; +} + +static int llc_ui_wait_for_busy_core(struct sock *sk, long timeout) +{ + DEFINE_WAIT_FUNC(wait, woken_wake_function); + struct llc_sock *llc = llc_sk(sk); + int rc; + + add_wait_queue(sk_sleep(sk), &wait); + while (1) { + rc = 0; + if (sk_wait_event(sk, &timeout, + (sk->sk_shutdown & RCV_SHUTDOWN) || + (!llc_data_accept_state(llc->state) && + !llc->remote_busy_flag && + !llc->p_flag), &wait)) + break; + rc = -ERESTARTSYS; + if (signal_pending(current)) + break; + rc = -EAGAIN; + if (!timeout) + break; + } + remove_wait_queue(sk_sleep(sk), &wait); + return rc; +} + +static int llc_wait_data(struct sock *sk, long timeo) +{ + int rc; + + while (1) { + /* + * POSIX 1003.1g mandates this order. + */ + rc = sock_error(sk); + if (rc) + break; + rc = 0; + if (sk->sk_shutdown & RCV_SHUTDOWN) + break; + rc = -EAGAIN; + if (!timeo) + break; + rc = sock_intr_errno(timeo); + if (signal_pending(current)) + break; + rc = 0; + if (sk_wait_data(sk, &timeo, NULL)) + break; + } + return rc; +} + +static void llc_cmsg_rcv(struct msghdr *msg, struct sk_buff *skb) +{ + struct llc_sock *llc = llc_sk(skb->sk); + + if (llc->cmsg_flags & LLC_CMSG_PKTINFO) { + struct llc_pktinfo info; + + memset(&info, 0, sizeof(info)); + info.lpi_ifindex = llc_sk(skb->sk)->dev->ifindex; + llc_pdu_decode_dsap(skb, &info.lpi_sap); + llc_pdu_decode_da(skb, info.lpi_mac); + put_cmsg(msg, SOL_LLC, LLC_OPT_PKTINFO, sizeof(info), &info); + } +} + +/** + * llc_ui_accept - accept a new incoming connection. + * @sock: Socket which connections arrive on. + * @newsock: Socket to move incoming connection to. + * @flags: User specified operational flags. + * @kern: If the socket is kernel internal + * + * Accept a new incoming connection. + * Returns 0 upon success, negative otherwise. + */ +static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags, + bool kern) +{ + struct sock *sk = sock->sk, *newsk; + struct llc_sock *llc, *newllc; + struct sk_buff *skb; + int rc = -EOPNOTSUPP; + + dprintk("%s: accepting on %02X\n", __func__, + llc_sk(sk)->laddr.lsap); + lock_sock(sk); + if (unlikely(sk->sk_type != SOCK_STREAM)) + goto out; + rc = -EINVAL; + if (unlikely(sock->state != SS_UNCONNECTED || + sk->sk_state != TCP_LISTEN)) + goto out; + /* wait for a connection to arrive. */ + if (skb_queue_empty(&sk->sk_receive_queue)) { + rc = llc_wait_data(sk, sk->sk_rcvtimeo); + if (rc) + goto out; + } + dprintk("%s: got a new connection on %02X\n", __func__, + llc_sk(sk)->laddr.lsap); + skb = skb_dequeue(&sk->sk_receive_queue); + rc = -EINVAL; + if (!skb->sk) + goto frees; + rc = 0; + newsk = skb->sk; + /* attach connection to a new socket. */ + llc_ui_sk_init(newsock, newsk); + sock_reset_flag(newsk, SOCK_ZAPPED); + newsk->sk_state = TCP_ESTABLISHED; + newsock->state = SS_CONNECTED; + llc = llc_sk(sk); + newllc = llc_sk(newsk); + memcpy(&newllc->addr, &llc->addr, sizeof(newllc->addr)); + newllc->link = llc_ui_next_link_no(newllc->laddr.lsap); + + /* put original socket back into a clean listen state. */ + sk->sk_state = TCP_LISTEN; + sk->sk_ack_backlog--; + dprintk("%s: ok success on %02X, client on %02X\n", __func__, + llc_sk(sk)->addr.sllc_sap, newllc->daddr.lsap); +frees: + kfree_skb(skb); +out: + release_sock(sk); + return rc; +} + +/** + * llc_ui_recvmsg - copy received data to the socket user. + * @sock: Socket to copy data from. + * @msg: Various user space related information. + * @len: Size of user buffer. + * @flags: User specified flags. + * + * Copy received data to the socket user. + * Returns non-negative upon success, negative otherwise. + */ +static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, + int flags) +{ + DECLARE_SOCKADDR(struct sockaddr_llc *, uaddr, msg->msg_name); + const int nonblock = flags & MSG_DONTWAIT; + struct sk_buff *skb = NULL; + struct sock *sk = sock->sk; + struct llc_sock *llc = llc_sk(sk); + size_t copied = 0; + u32 peek_seq = 0; + u32 *seq, skb_len; + unsigned long used; + int target; /* Read at least this many bytes */ + long timeo; + + lock_sock(sk); + copied = -ENOTCONN; + if (unlikely(sk->sk_type == SOCK_STREAM && sk->sk_state == TCP_LISTEN)) + goto out; + + timeo = sock_rcvtimeo(sk, nonblock); + + seq = &llc->copied_seq; + if (flags & MSG_PEEK) { + peek_seq = llc->copied_seq; + seq = &peek_seq; + } + + target = sock_rcvlowat(sk, flags & MSG_WAITALL, len); + copied = 0; + + do { + u32 offset; + + /* + * We need to check signals first, to get correct SIGURG + * handling. FIXME: Need to check this doesn't impact 1003.1g + * and move it down to the bottom of the loop + */ + if (signal_pending(current)) { + if (copied) + break; + copied = timeo ? sock_intr_errno(timeo) : -EAGAIN; + break; + } + + /* Next get a buffer. */ + + skb = skb_peek(&sk->sk_receive_queue); + if (skb) { + offset = *seq; + goto found_ok_skb; + } + /* Well, if we have backlog, try to process it now yet. */ + + if (copied >= target && !sk->sk_backlog.tail) + break; + + if (copied) { + if (sk->sk_err || + sk->sk_state == TCP_CLOSE || + (sk->sk_shutdown & RCV_SHUTDOWN) || + !timeo || + (flags & MSG_PEEK)) + break; + } else { + if (sock_flag(sk, SOCK_DONE)) + break; + + if (sk->sk_err) { + copied = sock_error(sk); + break; + } + if (sk->sk_shutdown & RCV_SHUTDOWN) + break; + + if (sk->sk_type == SOCK_STREAM && sk->sk_state == TCP_CLOSE) { + if (!sock_flag(sk, SOCK_DONE)) { + /* + * This occurs when user tries to read + * from never connected socket. + */ + copied = -ENOTCONN; + break; + } + break; + } + if (!timeo) { + copied = -EAGAIN; + break; + } + } + + if (copied >= target) { /* Do not sleep, just process backlog. */ + release_sock(sk); + lock_sock(sk); + } else + sk_wait_data(sk, &timeo, NULL); + + if ((flags & MSG_PEEK) && peek_seq != llc->copied_seq) { + net_dbg_ratelimited("LLC(%s:%d): Application bug, race in MSG_PEEK\n", + current->comm, + task_pid_nr(current)); + peek_seq = llc->copied_seq; + } + continue; + found_ok_skb: + skb_len = skb->len; + /* Ok so how much can we use? */ + used = skb->len - offset; + if (len < used) + used = len; + + if (!(flags & MSG_TRUNC)) { + int rc = skb_copy_datagram_msg(skb, offset, msg, used); + if (rc) { + /* Exception. Bailout! */ + if (!copied) + copied = -EFAULT; + break; + } + } + + *seq += used; + copied += used; + len -= used; + + /* For non stream protcols we get one packet per recvmsg call */ + if (sk->sk_type != SOCK_STREAM) + goto copy_uaddr; + + if (!(flags & MSG_PEEK)) { + skb_unlink(skb, &sk->sk_receive_queue); + kfree_skb(skb); + *seq = 0; + } + + /* Partial read */ + if (used + offset < skb_len) + continue; + } while (len > 0); + +out: + release_sock(sk); + return copied; +copy_uaddr: + if (uaddr != NULL && skb != NULL) { + memcpy(uaddr, llc_ui_skb_cb(skb), sizeof(*uaddr)); + msg->msg_namelen = sizeof(*uaddr); + } + if (llc_sk(sk)->cmsg_flags) + llc_cmsg_rcv(msg, skb); + + if (!(flags & MSG_PEEK)) { + skb_unlink(skb, &sk->sk_receive_queue); + kfree_skb(skb); + *seq = 0; + } + + goto out; +} + +/** + * llc_ui_sendmsg - Transmit data provided by the socket user. + * @sock: Socket to transmit data from. + * @msg: Various user related information. + * @len: Length of data to transmit. + * + * Transmit data provided by the socket user. + * Returns non-negative upon success, negative otherwise. + */ +static int llc_ui_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) +{ + struct sock *sk = sock->sk; + struct llc_sock *llc = llc_sk(sk); + DECLARE_SOCKADDR(struct sockaddr_llc *, addr, msg->msg_name); + int flags = msg->msg_flags; + int noblock = flags & MSG_DONTWAIT; + struct sk_buff *skb; + size_t size = 0; + int rc = -EINVAL, copied = 0, hdrlen; + + dprintk("%s: sending from %02X to %02X\n", __func__, + llc->laddr.lsap, llc->daddr.lsap); + lock_sock(sk); + if (addr) { + if (msg->msg_namelen < sizeof(*addr)) + goto release; + } else { + if (llc_ui_addr_null(&llc->addr)) + goto release; + addr = &llc->addr; + } + /* must bind connection to sap if user hasn't done it. */ + if (sock_flag(sk, SOCK_ZAPPED)) { + /* bind to sap with null dev, exclusive. */ + rc = llc_ui_autobind(sock, addr); + if (rc) + goto release; + } + hdrlen = llc->dev->hard_header_len + llc_ui_header_len(sk, addr); + size = hdrlen + len; + if (size > llc->dev->mtu) + size = llc->dev->mtu; + copied = size - hdrlen; + rc = -EINVAL; + if (copied < 0) + goto release; + release_sock(sk); + skb = sock_alloc_send_skb(sk, size, noblock, &rc); + lock_sock(sk); + if (!skb) + goto release; + skb->dev = llc->dev; + skb->protocol = llc_proto_type(addr->sllc_arphrd); + skb_reserve(skb, hdrlen); + rc = memcpy_from_msg(skb_put(skb, copied), msg, copied); + if (rc) + goto out; + if (sk->sk_type == SOCK_DGRAM || addr->sllc_ua) { + llc_build_and_send_ui_pkt(llc->sap, skb, addr->sllc_mac, + addr->sllc_sap); + goto out; + } + if (addr->sllc_test) { + llc_build_and_send_test_pkt(llc->sap, skb, addr->sllc_mac, + addr->sllc_sap); + goto out; + } + if (addr->sllc_xid) { + llc_build_and_send_xid_pkt(llc->sap, skb, addr->sllc_mac, + addr->sllc_sap); + goto out; + } + rc = -ENOPROTOOPT; + if (!(sk->sk_type == SOCK_STREAM && !addr->sllc_ua)) + goto out; + rc = llc_ui_send_data(sk, skb, noblock); +out: + if (rc) { + kfree_skb(skb); +release: + dprintk("%s: failed sending from %02X to %02X: %d\n", + __func__, llc->laddr.lsap, llc->daddr.lsap, rc); + } + release_sock(sk); + return rc ? : copied; +} + +/** + * llc_ui_getname - return the address info of a socket + * @sock: Socket to get address of. + * @uaddr: Address structure to return information. + * @uaddrlen: Length of address structure. + * @peer: Does user want local or remote address information. + * + * Return the address information of a socket. + */ +static int llc_ui_getname(struct socket *sock, struct sockaddr *uaddr, + int peer) +{ + struct sockaddr_llc sllc; + struct sock *sk = sock->sk; + struct llc_sock *llc = llc_sk(sk); + int rc = -EBADF; + + memset(&sllc, 0, sizeof(sllc)); + lock_sock(sk); + if (sock_flag(sk, SOCK_ZAPPED)) + goto out; + if (peer) { + rc = -ENOTCONN; + if (sk->sk_state != TCP_ESTABLISHED) + goto out; + if(llc->dev) + sllc.sllc_arphrd = llc->dev->type; + sllc.sllc_sap = llc->daddr.lsap; + memcpy(&sllc.sllc_mac, &llc->daddr.mac, IFHWADDRLEN); + } else { + rc = -EINVAL; + if (!llc->sap) + goto out; + sllc.sllc_sap = llc->sap->laddr.lsap; + + if (llc->dev) { + sllc.sllc_arphrd = llc->dev->type; + memcpy(&sllc.sllc_mac, llc->dev->dev_addr, + IFHWADDRLEN); + } + } + sllc.sllc_family = AF_LLC; + memcpy(uaddr, &sllc, sizeof(sllc)); + rc = sizeof(sllc); +out: + release_sock(sk); + return rc; +} + +/** + * llc_ui_ioctl - io controls for PF_LLC + * @sock: Socket to get/set info + * @cmd: command + * @arg: optional argument for cmd + * + * get/set info on llc sockets + */ +static int llc_ui_ioctl(struct socket *sock, unsigned int cmd, + unsigned long arg) +{ + return -ENOIOCTLCMD; +} + +/** + * llc_ui_setsockopt - set various connection specific parameters. + * @sock: Socket to set options on. + * @level: Socket level user is requesting operations on. + * @optname: Operation name. + * @optval: User provided operation data. + * @optlen: Length of optval. + * + * Set various connection specific parameters. + */ +static int llc_ui_setsockopt(struct socket *sock, int level, int optname, + char __user *optval, unsigned int optlen) +{ + struct sock *sk = sock->sk; + struct llc_sock *llc = llc_sk(sk); + unsigned int opt; + int rc = -EINVAL; + + lock_sock(sk); + if (unlikely(level != SOL_LLC || optlen != sizeof(int))) + goto out; + rc = get_user(opt, (int __user *)optval); + if (rc) + goto out; + rc = -EINVAL; + switch (optname) { + case LLC_OPT_RETRY: + if (opt > LLC_OPT_MAX_RETRY) + goto out; + llc->n2 = opt; + break; + case LLC_OPT_SIZE: + if (opt > LLC_OPT_MAX_SIZE) + goto out; + llc->n1 = opt; + break; + case LLC_OPT_ACK_TMR_EXP: + if (opt > LLC_OPT_MAX_ACK_TMR_EXP) + goto out; + llc->ack_timer.expire = opt * HZ; + break; + case LLC_OPT_P_TMR_EXP: + if (opt > LLC_OPT_MAX_P_TMR_EXP) + goto out; + llc->pf_cycle_timer.expire = opt * HZ; + break; + case LLC_OPT_REJ_TMR_EXP: + if (opt > LLC_OPT_MAX_REJ_TMR_EXP) + goto out; + llc->rej_sent_timer.expire = opt * HZ; + break; + case LLC_OPT_BUSY_TMR_EXP: + if (opt > LLC_OPT_MAX_BUSY_TMR_EXP) + goto out; + llc->busy_state_timer.expire = opt * HZ; + break; + case LLC_OPT_TX_WIN: + if (opt > LLC_OPT_MAX_WIN) + goto out; + llc->k = opt; + break; + case LLC_OPT_RX_WIN: + if (opt > LLC_OPT_MAX_WIN) + goto out; + llc->rw = opt; + break; + case LLC_OPT_PKTINFO: + if (opt) + llc->cmsg_flags |= LLC_CMSG_PKTINFO; + else + llc->cmsg_flags &= ~LLC_CMSG_PKTINFO; + break; + default: + rc = -ENOPROTOOPT; + goto out; + } + rc = 0; +out: + release_sock(sk); + return rc; +} + +/** + * llc_ui_getsockopt - get connection specific socket info + * @sock: Socket to get information from. + * @level: Socket level user is requesting operations on. + * @optname: Operation name. + * @optval: Variable to return operation data in. + * @optlen: Length of optval. + * + * Get connection specific socket information. + */ +static int llc_ui_getsockopt(struct socket *sock, int level, int optname, + char __user *optval, int __user *optlen) +{ + struct sock *sk = sock->sk; + struct llc_sock *llc = llc_sk(sk); + int val = 0, len = 0, rc = -EINVAL; + + lock_sock(sk); + if (unlikely(level != SOL_LLC)) + goto out; + rc = get_user(len, optlen); + if (rc) + goto out; + rc = -EINVAL; + if (len != sizeof(int)) + goto out; + switch (optname) { + case LLC_OPT_RETRY: + val = llc->n2; break; + case LLC_OPT_SIZE: + val = llc->n1; break; + case LLC_OPT_ACK_TMR_EXP: + val = llc->ack_timer.expire / HZ; break; + case LLC_OPT_P_TMR_EXP: + val = llc->pf_cycle_timer.expire / HZ; break; + case LLC_OPT_REJ_TMR_EXP: + val = llc->rej_sent_timer.expire / HZ; break; + case LLC_OPT_BUSY_TMR_EXP: + val = llc->busy_state_timer.expire / HZ; break; + case LLC_OPT_TX_WIN: + val = llc->k; break; + case LLC_OPT_RX_WIN: + val = llc->rw; break; + case LLC_OPT_PKTINFO: + val = (llc->cmsg_flags & LLC_CMSG_PKTINFO) != 0; + break; + default: + rc = -ENOPROTOOPT; + goto out; + } + rc = 0; + if (put_user(len, optlen) || copy_to_user(optval, &val, len)) + rc = -EFAULT; +out: + release_sock(sk); + return rc; +} + +static const struct net_proto_family llc_ui_family_ops = { + .family = PF_LLC, + .create = llc_ui_create, + .owner = THIS_MODULE, +}; + +static const struct proto_ops llc_ui_ops = { + .family = PF_LLC, + .owner = THIS_MODULE, + .release = llc_ui_release, + .bind = llc_ui_bind, + .connect = llc_ui_connect, + .socketpair = sock_no_socketpair, + .accept = llc_ui_accept, + .getname = llc_ui_getname, + .poll = datagram_poll, + .ioctl = llc_ui_ioctl, + .listen = llc_ui_listen, + .shutdown = llc_ui_shutdown, + .setsockopt = llc_ui_setsockopt, + .getsockopt = llc_ui_getsockopt, + .sendmsg = llc_ui_sendmsg, + .recvmsg = llc_ui_recvmsg, + .mmap = sock_no_mmap, + .sendpage = sock_no_sendpage, +}; + +static const char llc_proc_err_msg[] __initconst = + KERN_CRIT "LLC: Unable to register the proc_fs entries\n"; +static const char llc_sysctl_err_msg[] __initconst = + KERN_CRIT "LLC: Unable to register the sysctl entries\n"; +static const char llc_sock_err_msg[] __initconst = + KERN_CRIT "LLC: Unable to register the network family\n"; + +static int __init llc2_init(void) +{ + int rc = proto_register(&llc_proto, 0); + + if (rc != 0) + goto out; + + llc_build_offset_table(); + llc_station_init(); + llc_ui_sap_last_autoport = LLC_SAP_DYN_START; + rc = llc_proc_init(); + if (rc != 0) { + printk(llc_proc_err_msg); + goto out_station; + } + rc = llc_sysctl_init(); + if (rc) { + printk(llc_sysctl_err_msg); + goto out_proc; + } + rc = sock_register(&llc_ui_family_ops); + if (rc) { + printk(llc_sock_err_msg); + goto out_sysctl; + } + llc_add_pack(LLC_DEST_SAP, llc_sap_handler); + llc_add_pack(LLC_DEST_CONN, llc_conn_handler); +out: + return rc; +out_sysctl: + llc_sysctl_exit(); +out_proc: + llc_proc_exit(); +out_station: + llc_station_exit(); + proto_unregister(&llc_proto); + goto out; +} + +static void __exit llc2_exit(void) +{ + llc_station_exit(); + llc_remove_pack(LLC_DEST_SAP); + llc_remove_pack(LLC_DEST_CONN); + sock_unregister(PF_LLC); + llc_proc_exit(); + llc_sysctl_exit(); + proto_unregister(&llc_proto); +} + +module_init(llc2_init); +module_exit(llc2_exit); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Procom 1997, Jay Schullist 2001, Arnaldo C. Melo 2001-2003"); +MODULE_DESCRIPTION("IEEE 802.2 PF_LLC support"); +MODULE_ALIAS_NETPROTO(PF_LLC); \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/llc/af_llc.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/llc/af_llc.c.yml new file mode 100644 index 00000000000..5cb452e45ca --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/llc/af_llc.c.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001 by Jay Schulist 2002-2003 by Arnaldo Carvalho de + Melo +holders: + - Jay Schulist by Arnaldo Carvalho de Melo diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/llc/llc_proc.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/llc/llc_proc.c new file mode 100644 index 00000000000..705773e3c8b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/llc/llc_proc.c @@ -0,0 +1,251 @@ +/* + * proc_llc.c - proc interface for LLC + * + * Copyright (c) 2001 by Jay Schulist + * 2002-2003 by Arnaldo Carvalho de Melo + * + * This program can be redistributed or modified under the terms of the + * GNU General Public License as published by the Free Software Foundation. + * This program is distributed without any warranty or implied warranty + * of merchantability or fitness for a particular purpose. + * + * See the GNU General Public License for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void llc_ui_format_mac(struct seq_file *seq, u8 *addr) +{ + seq_printf(seq, "%pM", addr); +} + +static struct sock *llc_get_sk_idx(loff_t pos) +{ + struct llc_sap *sap; + struct sock *sk = NULL; + int i; + + list_for_each_entry_rcu(sap, &llc_sap_list, node) { + spin_lock_bh(&sap->sk_lock); + for (i = 0; i < LLC_SK_LADDR_HASH_ENTRIES; i++) { + struct hlist_nulls_head *head = &sap->sk_laddr_hash[i]; + struct hlist_nulls_node *node; + + sk_nulls_for_each(sk, node, head) { + if (!pos) + goto found; /* keep the lock */ + --pos; + } + } + spin_unlock_bh(&sap->sk_lock); + } + sk = NULL; +found: + return sk; +} + +static void *llc_seq_start(struct seq_file *seq, loff_t *pos) +{ + loff_t l = *pos; + + rcu_read_lock_bh(); + return l ? llc_get_sk_idx(--l) : SEQ_START_TOKEN; +} + +static struct sock *laddr_hash_next(struct llc_sap *sap, int bucket) +{ + struct hlist_nulls_node *node; + struct sock *sk = NULL; + + while (++bucket < LLC_SK_LADDR_HASH_ENTRIES) + sk_nulls_for_each(sk, node, &sap->sk_laddr_hash[bucket]) + goto out; + +out: + return sk; +} + +static void *llc_seq_next(struct seq_file *seq, void *v, loff_t *pos) +{ + struct sock* sk, *next; + struct llc_sock *llc; + struct llc_sap *sap; + + ++*pos; + if (v == SEQ_START_TOKEN) { + sk = llc_get_sk_idx(0); + goto out; + } + sk = v; + next = sk_nulls_next(sk); + if (next) { + sk = next; + goto out; + } + llc = llc_sk(sk); + sap = llc->sap; + sk = laddr_hash_next(sap, llc_sk_laddr_hashfn(sap, &llc->laddr)); + if (sk) + goto out; + spin_unlock_bh(&sap->sk_lock); + list_for_each_entry_continue_rcu(sap, &llc_sap_list, node) { + spin_lock_bh(&sap->sk_lock); + sk = laddr_hash_next(sap, -1); + if (sk) + break; /* keep the lock */ + spin_unlock_bh(&sap->sk_lock); + } +out: + return sk; +} + +static void llc_seq_stop(struct seq_file *seq, void *v) +{ + if (v && v != SEQ_START_TOKEN) { + struct sock *sk = v; + struct llc_sock *llc = llc_sk(sk); + struct llc_sap *sap = llc->sap; + + spin_unlock_bh(&sap->sk_lock); + } + rcu_read_unlock_bh(); +} + +static int llc_seq_socket_show(struct seq_file *seq, void *v) +{ + struct sock* sk; + struct llc_sock *llc; + + if (v == SEQ_START_TOKEN) { + seq_puts(seq, "SKt Mc local_mac_sap remote_mac_sap " + " tx_queue rx_queue st uid link\n"); + goto out; + } + sk = v; + llc = llc_sk(sk); + + /* FIXME: check if the address is multicast */ + seq_printf(seq, "%2X %2X ", sk->sk_type, 0); + + if (llc->dev) + llc_ui_format_mac(seq, llc->dev->dev_addr); + else { + u8 addr[6] = {0,0,0,0,0,0}; + llc_ui_format_mac(seq, addr); + } + seq_printf(seq, "@%02X ", llc->sap->laddr.lsap); + llc_ui_format_mac(seq, llc->daddr.mac); + seq_printf(seq, "@%02X %8d %8d %2d %3u %4d\n", llc->daddr.lsap, + sk_wmem_alloc_get(sk), + sk_rmem_alloc_get(sk) - llc->copied_seq, + sk->sk_state, + from_kuid_munged(seq_user_ns(seq), sock_i_uid(sk)), + llc->link); +out: + return 0; +} + +static const char *const llc_conn_state_names[] = { + [LLC_CONN_STATE_ADM] = "adm", + [LLC_CONN_STATE_SETUP] = "setup", + [LLC_CONN_STATE_NORMAL] = "normal", + [LLC_CONN_STATE_BUSY] = "busy", + [LLC_CONN_STATE_REJ] = "rej", + [LLC_CONN_STATE_AWAIT] = "await", + [LLC_CONN_STATE_AWAIT_BUSY] = "await_busy", + [LLC_CONN_STATE_AWAIT_REJ] = "await_rej", + [LLC_CONN_STATE_D_CONN] = "d_conn", + [LLC_CONN_STATE_RESET] = "reset", + [LLC_CONN_STATE_ERROR] = "error", + [LLC_CONN_STATE_TEMP] = "temp", +}; + +static int llc_seq_core_show(struct seq_file *seq, void *v) +{ + struct sock* sk; + struct llc_sock *llc; + + if (v == SEQ_START_TOKEN) { + seq_puts(seq, "Connection list:\n" + "dsap state retr txw rxw pf ff sf df rs cs " + "tack tpfc trs tbs blog busr\n"); + goto out; + } + sk = v; + llc = llc_sk(sk); + + seq_printf(seq, " %02X %-10s %3d %3d %3d %2d %2d %2d %2d %2d %2d " + "%4d %4d %3d %3d %4d %4d\n", + llc->daddr.lsap, llc_conn_state_names[llc->state], + llc->retry_count, llc->k, llc->rw, llc->p_flag, llc->f_flag, + llc->s_flag, llc->data_flag, llc->remote_busy_flag, + llc->cause_flag, timer_pending(&llc->ack_timer.timer), + timer_pending(&llc->pf_cycle_timer.timer), + timer_pending(&llc->rej_sent_timer.timer), + timer_pending(&llc->busy_state_timer.timer), + !!sk->sk_backlog.tail, !!sk->sk_lock.owned); +out: + return 0; +} + +static const struct seq_operations llc_seq_socket_ops = { + .start = llc_seq_start, + .next = llc_seq_next, + .stop = llc_seq_stop, + .show = llc_seq_socket_show, +}; + +static const struct seq_operations llc_seq_core_ops = { + .start = llc_seq_start, + .next = llc_seq_next, + .stop = llc_seq_stop, + .show = llc_seq_core_show, +}; + +static struct proc_dir_entry *llc_proc_dir; + +int __init llc_proc_init(void) +{ + int rc = -ENOMEM; + struct proc_dir_entry *p; + + llc_proc_dir = proc_mkdir("llc", init_net.proc_net); + if (!llc_proc_dir) + goto out; + + p = proc_create_seq("socket", 0444, llc_proc_dir, &llc_seq_socket_ops); + if (!p) + goto out_socket; + + p = proc_create_seq("core", 0444, llc_proc_dir, &llc_seq_core_ops); + if (!p) + goto out_core; + + rc = 0; +out: + return rc; +out_core: + remove_proc_entry("socket", llc_proc_dir); +out_socket: + remove_proc_entry("llc", init_net.proc_net); + goto out; +} + +void llc_proc_exit(void) +{ + remove_proc_entry("socket", llc_proc_dir); + remove_proc_entry("core", llc_proc_dir); + remove_proc_entry("llc", init_net.proc_net); +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/llc/llc_proc.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/llc/llc_proc.c.yml new file mode 100644 index 00000000000..5cb452e45ca --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/llc/llc_proc.c.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001 by Jay Schulist 2002-2003 by Arnaldo Carvalho de + Melo +holders: + - Jay Schulist by Arnaldo Carvalho de Melo diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netfilter/ipvs/ip_vs_nfct.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netfilter/ipvs/ip_vs_nfct.c new file mode 100644 index 00000000000..4434062ed35 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netfilter/ipvs/ip_vs_nfct.c @@ -0,0 +1,295 @@ +/* + * ip_vs_nfct.c: Netfilter connection tracking support for IPVS + * + * Portions Copyright (C) 2001-2002 + * Antefacto Ltd, 181 Parnell St, Dublin 1, Ireland. + * + * Portions Copyright (C) 2003-2010 + * Julian Anastasov + * + * + * This code is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + * + * + * Authors: + * Ben North + * Julian Anastasov Reorganize and sync with latest kernels + * Hannes Eder Extend NFCT support for FTP, ipvs match + * + * + * Current status: + * + * - provide conntrack confirmation for new and related connections, by + * this way we can see their proper conntrack state in all hooks + * - support for all forwarding methods, not only NAT + * - FTP support (NAT), ability to support other NAT apps with expectations + * - to correctly create expectations for related NAT connections the proper + * NF conntrack support must be already installed, eg. ip_vs_ftp requires + * nf_conntrack_ftp ... iptables_nat for the same ports (but no iptables + * NAT rules are needed) + * - alter reply for NAT when forwarding packet in original direction: + * conntrack from client in NEW or RELATED (Passive FTP DATA) state or + * when RELATED conntrack is created from real server (Active FTP DATA) + * - if iptables_nat is not loaded the Passive FTP will not work (the + * PASV response can not be NAT-ed) but Active FTP should work + * + */ + +#define KMSG_COMPONENT "IPVS" +#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define FMT_TUPLE "%s:%u->%s:%u/%u" +#define ARG_TUPLE(T) IP_VS_DBG_ADDR((T)->src.l3num, &(T)->src.u3), \ + ntohs((T)->src.u.all), \ + IP_VS_DBG_ADDR((T)->src.l3num, &(T)->dst.u3), \ + ntohs((T)->dst.u.all), \ + (T)->dst.protonum + +#define FMT_CONN "%s:%u->%s:%u->%s:%u/%u:%u" +#define ARG_CONN(C) IP_VS_DBG_ADDR((C)->af, &((C)->caddr)), \ + ntohs((C)->cport), \ + IP_VS_DBG_ADDR((C)->af, &((C)->vaddr)), \ + ntohs((C)->vport), \ + IP_VS_DBG_ADDR((C)->daf, &((C)->daddr)), \ + ntohs((C)->dport), \ + (C)->protocol, (C)->state + +void +ip_vs_update_conntrack(struct sk_buff *skb, struct ip_vs_conn *cp, int outin) +{ + enum ip_conntrack_info ctinfo; + struct nf_conn *ct = nf_ct_get(skb, &ctinfo); + struct nf_conntrack_tuple new_tuple; + + if (ct == NULL || nf_ct_is_confirmed(ct) || + nf_ct_is_dying(ct)) + return; + + /* Never alter conntrack for non-NAT conns */ + if (IP_VS_FWD_METHOD(cp) != IP_VS_CONN_F_MASQ) + return; + + /* Never alter conntrack for OPS conns (no reply is expected) */ + if (cp->flags & IP_VS_CONN_F_ONE_PACKET) + return; + + /* Alter reply only in original direction */ + if (CTINFO2DIR(ctinfo) != IP_CT_DIR_ORIGINAL) + return; + + /* Applications may adjust TCP seqs */ + if (cp->app && nf_ct_protonum(ct) == IPPROTO_TCP && + !nfct_seqadj(ct) && !nfct_seqadj_ext_add(ct)) + return; + + /* + * The connection is not yet in the hashtable, so we update it. + * CIP->VIP will remain the same, so leave the tuple in + * IP_CT_DIR_ORIGINAL untouched. When the reply comes back from the + * real-server we will see RIP->DIP. + */ + new_tuple = ct->tuplehash[IP_CT_DIR_REPLY].tuple; + /* + * This will also take care of UDP and other protocols. + */ + if (outin) { + new_tuple.src.u3 = cp->daddr; + if (new_tuple.dst.protonum != IPPROTO_ICMP && + new_tuple.dst.protonum != IPPROTO_ICMPV6) + new_tuple.src.u.tcp.port = cp->dport; + } else { + new_tuple.dst.u3 = cp->vaddr; + if (new_tuple.dst.protonum != IPPROTO_ICMP && + new_tuple.dst.protonum != IPPROTO_ICMPV6) + new_tuple.dst.u.tcp.port = cp->vport; + } + IP_VS_DBG_BUF(7, "%s: Updating conntrack ct=%p, status=0x%lX, " + "ctinfo=%d, old reply=" FMT_TUPLE "\n", + __func__, ct, ct->status, ctinfo, + ARG_TUPLE(&ct->tuplehash[IP_CT_DIR_REPLY].tuple)); + IP_VS_DBG_BUF(7, "%s: Updating conntrack ct=%p, status=0x%lX, " + "ctinfo=%d, new reply=" FMT_TUPLE "\n", + __func__, ct, ct->status, ctinfo, + ARG_TUPLE(&new_tuple)); + nf_conntrack_alter_reply(ct, &new_tuple); + IP_VS_DBG_BUF(7, "%s: Updated conntrack ct=%p for cp=" FMT_CONN "\n", + __func__, ct, ARG_CONN(cp)); +} + +int ip_vs_confirm_conntrack(struct sk_buff *skb) +{ + return nf_conntrack_confirm(skb); +} + +/* + * Called from init_conntrack() as expectfn handler. + */ +static void ip_vs_nfct_expect_callback(struct nf_conn *ct, + struct nf_conntrack_expect *exp) +{ + struct nf_conntrack_tuple *orig, new_reply; + struct ip_vs_conn *cp; + struct ip_vs_conn_param p; + struct net *net = nf_ct_net(ct); + + /* + * We assume that no NF locks are held before this callback. + * ip_vs_conn_out_get and ip_vs_conn_in_get should match their + * expectations even if they use wildcard values, now we provide the + * actual values from the newly created original conntrack direction. + * The conntrack is confirmed when packet reaches IPVS hooks. + */ + + /* RS->CLIENT */ + orig = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; + ip_vs_conn_fill_param(net_ipvs(net), exp->tuple.src.l3num, orig->dst.protonum, + &orig->src.u3, orig->src.u.tcp.port, + &orig->dst.u3, orig->dst.u.tcp.port, &p); + cp = ip_vs_conn_out_get(&p); + if (cp) { + /* Change reply CLIENT->RS to CLIENT->VS */ + IP_VS_DBG_BUF(7, "%s: for ct=%p, status=0x%lX found inout cp=" + FMT_CONN "\n", + __func__, ct, ct->status, ARG_CONN(cp)); + new_reply = ct->tuplehash[IP_CT_DIR_REPLY].tuple; + IP_VS_DBG_BUF(7, "%s: ct=%p before alter: reply tuple=" + FMT_TUPLE "\n", + __func__, ct, ARG_TUPLE(&new_reply)); + new_reply.dst.u3 = cp->vaddr; + new_reply.dst.u.tcp.port = cp->vport; + goto alter; + } + + /* CLIENT->VS */ + cp = ip_vs_conn_in_get(&p); + if (cp) { + /* Change reply VS->CLIENT to RS->CLIENT */ + IP_VS_DBG_BUF(7, "%s: for ct=%p, status=0x%lX found outin cp=" + FMT_CONN "\n", + __func__, ct, ct->status, ARG_CONN(cp)); + new_reply = ct->tuplehash[IP_CT_DIR_REPLY].tuple; + IP_VS_DBG_BUF(7, "%s: ct=%p before alter: reply tuple=" + FMT_TUPLE "\n", + __func__, ct, ARG_TUPLE(&new_reply)); + new_reply.src.u3 = cp->daddr; + new_reply.src.u.tcp.port = cp->dport; + goto alter; + } + + IP_VS_DBG_BUF(7, "%s: ct=%p, status=0x%lX, tuple=" FMT_TUPLE + " - unknown expect\n", + __func__, ct, ct->status, ARG_TUPLE(orig)); + return; + +alter: + /* Never alter conntrack for non-NAT conns */ + if (IP_VS_FWD_METHOD(cp) == IP_VS_CONN_F_MASQ) + nf_conntrack_alter_reply(ct, &new_reply); + ip_vs_conn_put(cp); + return; +} + +/* + * Create NF conntrack expectation with wildcard (optional) source port. + * Then the default callback function will alter the reply and will confirm + * the conntrack entry when the first packet comes. + * Use port 0 to expect connection from any port. + */ +void ip_vs_nfct_expect_related(struct sk_buff *skb, struct nf_conn *ct, + struct ip_vs_conn *cp, u_int8_t proto, + const __be16 port, int from_rs) +{ + struct nf_conntrack_expect *exp; + + if (ct == NULL) + return; + + exp = nf_ct_expect_alloc(ct); + if (!exp) + return; + + nf_ct_expect_init(exp, NF_CT_EXPECT_CLASS_DEFAULT, nf_ct_l3num(ct), + from_rs ? &cp->daddr : &cp->caddr, + from_rs ? &cp->caddr : &cp->vaddr, + proto, port ? &port : NULL, + from_rs ? &cp->cport : &cp->vport); + + exp->expectfn = ip_vs_nfct_expect_callback; + + IP_VS_DBG_BUF(7, "%s: ct=%p, expect tuple=" FMT_TUPLE "\n", + __func__, ct, ARG_TUPLE(&exp->tuple)); + nf_ct_expect_related(exp); + nf_ct_expect_put(exp); +} +EXPORT_SYMBOL(ip_vs_nfct_expect_related); + +/* + * Our connection was terminated, try to drop the conntrack immediately + */ +void ip_vs_conn_drop_conntrack(struct ip_vs_conn *cp) +{ + struct nf_conntrack_tuple_hash *h; + struct nf_conn *ct; + struct nf_conntrack_tuple tuple; + + if (!cp->cport) + return; + + tuple = (struct nf_conntrack_tuple) { + .dst = { .protonum = cp->protocol, .dir = IP_CT_DIR_ORIGINAL } }; + tuple.src.u3 = cp->caddr; + tuple.src.u.all = cp->cport; + tuple.src.l3num = cp->af; + tuple.dst.u3 = cp->vaddr; + tuple.dst.u.all = cp->vport; + + IP_VS_DBG_BUF(7, "%s: dropping conntrack for conn " FMT_CONN "\n", + __func__, ARG_CONN(cp)); + + h = nf_conntrack_find_get(cp->ipvs->net, &nf_ct_zone_dflt, &tuple); + if (h) { + ct = nf_ct_tuplehash_to_ctrack(h); + if (nf_ct_kill(ct)) { + IP_VS_DBG_BUF(7, "%s: ct=%p deleted for tuple=" + FMT_TUPLE "\n", + __func__, ct, ARG_TUPLE(&tuple)); + } else { + IP_VS_DBG_BUF(7, "%s: ct=%p, no conntrack for tuple=" + FMT_TUPLE "\n", + __func__, ct, ARG_TUPLE(&tuple)); + } + nf_ct_put(ct); + } else { + IP_VS_DBG_BUF(7, "%s: no conntrack for tuple=" FMT_TUPLE "\n", + __func__, ARG_TUPLE(&tuple)); + } +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netfilter/ipvs/ip_vs_nfct.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netfilter/ipvs/ip_vs_nfct.c.yml new file mode 100644 index 00000000000..7b1ce07610f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netfilter/ipvs/ip_vs_nfct.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Portions Copyright (c) 2001-2002 Antefacto Ltd + - Portions Copyright (c) 2003-2010 Julian Anastasov +holders: + - Antefacto Ltd + - Julian Anastasov +authors: + - Ben North Julian Anastasov Reorganize diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netfilter/xt_hashlimit.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netfilter/xt_hashlimit.c new file mode 100644 index 00000000000..bdb8f17a9d6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netfilter/xt_hashlimit.c @@ -0,0 +1,1334 @@ +/* + * xt_hashlimit - Netfilter module to limit the number of packets per time + * separately for each hashbucket (sourceip/sourceport/dstip/dstport) + * + * (C) 2003-2004 by Harald Welte + * (C) 2006-2012 Patrick McHardy + * Copyright © CC Computer Consultants GmbH, 2007 - 2008 + * + * Development of this code was funded by Astaro AG, http://www.astaro.com/ + */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) +#include +#include +#endif + +#include +#include + +#include +#include +#include +#include +#include +#include + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Harald Welte "); +MODULE_AUTHOR("Jan Engelhardt "); +MODULE_DESCRIPTION("Xtables: per hash-bucket rate-limit match"); +MODULE_ALIAS("ipt_hashlimit"); +MODULE_ALIAS("ip6t_hashlimit"); + +struct hashlimit_net { + struct hlist_head htables; + struct proc_dir_entry *ipt_hashlimit; + struct proc_dir_entry *ip6t_hashlimit; +}; + +static unsigned int hashlimit_net_id; +static inline struct hashlimit_net *hashlimit_pernet(struct net *net) +{ + return net_generic(net, hashlimit_net_id); +} + +/* need to declare this at the top */ +static const struct seq_operations dl_seq_ops_v2; +static const struct seq_operations dl_seq_ops_v1; +static const struct seq_operations dl_seq_ops; + +/* hash table crap */ +struct dsthash_dst { + union { + struct { + __be32 src; + __be32 dst; + } ip; +#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) + struct { + __be32 src[4]; + __be32 dst[4]; + } ip6; +#endif + }; + __be16 src_port; + __be16 dst_port; +}; + +struct dsthash_ent { + /* static / read-only parts in the beginning */ + struct hlist_node node; + struct dsthash_dst dst; + + /* modified structure members in the end */ + spinlock_t lock; + unsigned long expires; /* precalculated expiry time */ + struct { + unsigned long prev; /* last modification */ + union { + struct { + u_int64_t credit; + u_int64_t credit_cap; + u_int64_t cost; + }; + struct { + u_int32_t interval, prev_window; + u_int64_t current_rate; + u_int64_t rate; + int64_t burst; + }; + }; + } rateinfo; + struct rcu_head rcu; +}; + +struct xt_hashlimit_htable { + struct hlist_node node; /* global list of all htables */ + int use; + u_int8_t family; + bool rnd_initialized; + + struct hashlimit_cfg3 cfg; /* config */ + + /* used internally */ + spinlock_t lock; /* lock for list_head */ + u_int32_t rnd; /* random seed for hash */ + unsigned int count; /* number entries in table */ + struct delayed_work gc_work; + + /* seq_file stuff */ + struct proc_dir_entry *pde; + const char *name; + struct net *net; + + struct hlist_head hash[0]; /* hashtable itself */ +}; + +static int +cfg_copy(struct hashlimit_cfg3 *to, const void *from, int revision) +{ + if (revision == 1) { + struct hashlimit_cfg1 *cfg = (struct hashlimit_cfg1 *)from; + + to->mode = cfg->mode; + to->avg = cfg->avg; + to->burst = cfg->burst; + to->size = cfg->size; + to->max = cfg->max; + to->gc_interval = cfg->gc_interval; + to->expire = cfg->expire; + to->srcmask = cfg->srcmask; + to->dstmask = cfg->dstmask; + } else if (revision == 2) { + struct hashlimit_cfg2 *cfg = (struct hashlimit_cfg2 *)from; + + to->mode = cfg->mode; + to->avg = cfg->avg; + to->burst = cfg->burst; + to->size = cfg->size; + to->max = cfg->max; + to->gc_interval = cfg->gc_interval; + to->expire = cfg->expire; + to->srcmask = cfg->srcmask; + to->dstmask = cfg->dstmask; + } else if (revision == 3) { + memcpy(to, from, sizeof(struct hashlimit_cfg3)); + } else { + return -EINVAL; + } + + return 0; +} + +static DEFINE_MUTEX(hashlimit_mutex); /* protects htables list */ +static struct kmem_cache *hashlimit_cachep __read_mostly; + +static inline bool dst_cmp(const struct dsthash_ent *ent, + const struct dsthash_dst *b) +{ + return !memcmp(&ent->dst, b, sizeof(ent->dst)); +} + +static u_int32_t +hash_dst(const struct xt_hashlimit_htable *ht, const struct dsthash_dst *dst) +{ + u_int32_t hash = jhash2((const u32 *)dst, + sizeof(*dst)/sizeof(u32), + ht->rnd); + /* + * Instead of returning hash % ht->cfg.size (implying a divide) + * we return the high 32 bits of the (hash * ht->cfg.size) that will + * give results between [0 and cfg.size-1] and same hash distribution, + * but using a multiply, less expensive than a divide + */ + return reciprocal_scale(hash, ht->cfg.size); +} + +static struct dsthash_ent * +dsthash_find(const struct xt_hashlimit_htable *ht, + const struct dsthash_dst *dst) +{ + struct dsthash_ent *ent; + u_int32_t hash = hash_dst(ht, dst); + + if (!hlist_empty(&ht->hash[hash])) { + hlist_for_each_entry_rcu(ent, &ht->hash[hash], node) + if (dst_cmp(ent, dst)) { + spin_lock(&ent->lock); + return ent; + } + } + return NULL; +} + +/* allocate dsthash_ent, initialize dst, put in htable and lock it */ +static struct dsthash_ent * +dsthash_alloc_init(struct xt_hashlimit_htable *ht, + const struct dsthash_dst *dst, bool *race) +{ + struct dsthash_ent *ent; + + spin_lock(&ht->lock); + + /* Two or more packets may race to create the same entry in the + * hashtable, double check if this packet lost race. + */ + ent = dsthash_find(ht, dst); + if (ent != NULL) { + spin_unlock(&ht->lock); + *race = true; + return ent; + } + + /* initialize hash with random val at the time we allocate + * the first hashtable entry */ + if (unlikely(!ht->rnd_initialized)) { + get_random_bytes(&ht->rnd, sizeof(ht->rnd)); + ht->rnd_initialized = true; + } + + if (ht->cfg.max && ht->count >= ht->cfg.max) { + /* FIXME: do something. question is what.. */ + net_err_ratelimited("max count of %u reached\n", ht->cfg.max); + ent = NULL; + } else + ent = kmem_cache_alloc(hashlimit_cachep, GFP_ATOMIC); + if (ent) { + memcpy(&ent->dst, dst, sizeof(ent->dst)); + spin_lock_init(&ent->lock); + + spin_lock(&ent->lock); + hlist_add_head_rcu(&ent->node, &ht->hash[hash_dst(ht, dst)]); + ht->count++; + } + spin_unlock(&ht->lock); + return ent; +} + +static void dsthash_free_rcu(struct rcu_head *head) +{ + struct dsthash_ent *ent = container_of(head, struct dsthash_ent, rcu); + + kmem_cache_free(hashlimit_cachep, ent); +} + +static inline void +dsthash_free(struct xt_hashlimit_htable *ht, struct dsthash_ent *ent) +{ + hlist_del_rcu(&ent->node); + call_rcu_bh(&ent->rcu, dsthash_free_rcu); + ht->count--; +} +static void htable_gc(struct work_struct *work); + +static int htable_create(struct net *net, struct hashlimit_cfg3 *cfg, + const char *name, u_int8_t family, + struct xt_hashlimit_htable **out_hinfo, + int revision) +{ + struct hashlimit_net *hashlimit_net = hashlimit_pernet(net); + struct xt_hashlimit_htable *hinfo; + const struct seq_operations *ops; + unsigned int size, i; + int ret; + + if (cfg->size) { + size = cfg->size; + } else { + size = (totalram_pages << PAGE_SHIFT) / 16384 / + sizeof(struct hlist_head); + if (totalram_pages > 1024 * 1024 * 1024 / PAGE_SIZE) + size = 8192; + if (size < 16) + size = 16; + } + /* FIXME: don't use vmalloc() here or anywhere else -HW */ + hinfo = vmalloc(sizeof(struct xt_hashlimit_htable) + + sizeof(struct hlist_head) * size); + if (hinfo == NULL) + return -ENOMEM; + *out_hinfo = hinfo; + + /* copy match config into hashtable config */ + ret = cfg_copy(&hinfo->cfg, (void *)cfg, 3); + if (ret) { + vfree(hinfo); + return ret; + } + + hinfo->cfg.size = size; + if (hinfo->cfg.max == 0) + hinfo->cfg.max = 8 * hinfo->cfg.size; + else if (hinfo->cfg.max < hinfo->cfg.size) + hinfo->cfg.max = hinfo->cfg.size; + + for (i = 0; i < hinfo->cfg.size; i++) + INIT_HLIST_HEAD(&hinfo->hash[i]); + + hinfo->use = 1; + hinfo->count = 0; + hinfo->family = family; + hinfo->rnd_initialized = false; + hinfo->name = kstrdup(name, GFP_KERNEL); + if (!hinfo->name) { + vfree(hinfo); + return -ENOMEM; + } + spin_lock_init(&hinfo->lock); + + switch (revision) { + case 1: + ops = &dl_seq_ops_v1; + break; + case 2: + ops = &dl_seq_ops_v2; + break; + default: + ops = &dl_seq_ops; + } + + hinfo->pde = proc_create_seq_data(name, 0, + (family == NFPROTO_IPV4) ? + hashlimit_net->ipt_hashlimit : hashlimit_net->ip6t_hashlimit, + ops, hinfo); + if (hinfo->pde == NULL) { + kfree(hinfo->name); + vfree(hinfo); + return -ENOMEM; + } + hinfo->net = net; + + INIT_DEFERRABLE_WORK(&hinfo->gc_work, htable_gc); + queue_delayed_work(system_power_efficient_wq, &hinfo->gc_work, + msecs_to_jiffies(hinfo->cfg.gc_interval)); + + hlist_add_head(&hinfo->node, &hashlimit_net->htables); + + return 0; +} + +static bool select_all(const struct xt_hashlimit_htable *ht, + const struct dsthash_ent *he) +{ + return true; +} + +static bool select_gc(const struct xt_hashlimit_htable *ht, + const struct dsthash_ent *he) +{ + return time_after_eq(jiffies, he->expires); +} + +static void htable_selective_cleanup(struct xt_hashlimit_htable *ht, + bool (*select)(const struct xt_hashlimit_htable *ht, + const struct dsthash_ent *he)) +{ + unsigned int i; + + for (i = 0; i < ht->cfg.size; i++) { + struct dsthash_ent *dh; + struct hlist_node *n; + + spin_lock_bh(&ht->lock); + hlist_for_each_entry_safe(dh, n, &ht->hash[i], node) { + if ((*select)(ht, dh)) + dsthash_free(ht, dh); + } + spin_unlock_bh(&ht->lock); + cond_resched(); + } +} + +static void htable_gc(struct work_struct *work) +{ + struct xt_hashlimit_htable *ht; + + ht = container_of(work, struct xt_hashlimit_htable, gc_work.work); + + htable_selective_cleanup(ht, select_gc); + + queue_delayed_work(system_power_efficient_wq, + &ht->gc_work, msecs_to_jiffies(ht->cfg.gc_interval)); +} + +static void htable_remove_proc_entry(struct xt_hashlimit_htable *hinfo) +{ + struct hashlimit_net *hashlimit_net = hashlimit_pernet(hinfo->net); + struct proc_dir_entry *parent; + + if (hinfo->family == NFPROTO_IPV4) + parent = hashlimit_net->ipt_hashlimit; + else + parent = hashlimit_net->ip6t_hashlimit; + + if (parent != NULL) + remove_proc_entry(hinfo->name, parent); +} + +static void htable_destroy(struct xt_hashlimit_htable *hinfo) +{ + cancel_delayed_work_sync(&hinfo->gc_work); + htable_remove_proc_entry(hinfo); + htable_selective_cleanup(hinfo, select_all); + kfree(hinfo->name); + vfree(hinfo); +} + +static struct xt_hashlimit_htable *htable_find_get(struct net *net, + const char *name, + u_int8_t family) +{ + struct hashlimit_net *hashlimit_net = hashlimit_pernet(net); + struct xt_hashlimit_htable *hinfo; + + hlist_for_each_entry(hinfo, &hashlimit_net->htables, node) { + if (!strcmp(name, hinfo->name) && + hinfo->family == family) { + hinfo->use++; + return hinfo; + } + } + return NULL; +} + +static void htable_put(struct xt_hashlimit_htable *hinfo) +{ + mutex_lock(&hashlimit_mutex); + if (--hinfo->use == 0) { + hlist_del(&hinfo->node); + htable_destroy(hinfo); + } + mutex_unlock(&hashlimit_mutex); +} + +/* The algorithm used is the Simple Token Bucket Filter (TBF) + * see net/sched/sch_tbf.c in the linux source tree + */ + +/* Rusty: This is my (non-mathematically-inclined) understanding of + this algorithm. The `average rate' in jiffies becomes your initial + amount of credit `credit' and the most credit you can ever have + `credit_cap'. The `peak rate' becomes the cost of passing the + test, `cost'. + + `prev' tracks the last packet hit: you gain one credit per jiffy. + If you get credit balance more than this, the extra credit is + discarded. Every time the match passes, you lose `cost' credits; + if you don't have that many, the test fails. + + See Alexey's formal explanation in net/sched/sch_tbf.c. + + To get the maximum range, we multiply by this factor (ie. you get N + credits per jiffy). We want to allow a rate as low as 1 per day + (slowest userspace tool allows), which means + CREDITS_PER_JIFFY*HZ*60*60*24 < 2^32 ie. +*/ +#define MAX_CPJ_v1 (0xFFFFFFFF / (HZ*60*60*24)) +#define MAX_CPJ (0xFFFFFFFFFFFFFFFFULL / (HZ*60*60*24)) + +/* Repeated shift and or gives us all 1s, final shift and add 1 gives + * us the power of 2 below the theoretical max, so GCC simply does a + * shift. */ +#define _POW2_BELOW2(x) ((x)|((x)>>1)) +#define _POW2_BELOW4(x) (_POW2_BELOW2(x)|_POW2_BELOW2((x)>>2)) +#define _POW2_BELOW8(x) (_POW2_BELOW4(x)|_POW2_BELOW4((x)>>4)) +#define _POW2_BELOW16(x) (_POW2_BELOW8(x)|_POW2_BELOW8((x)>>8)) +#define _POW2_BELOW32(x) (_POW2_BELOW16(x)|_POW2_BELOW16((x)>>16)) +#define _POW2_BELOW64(x) (_POW2_BELOW32(x)|_POW2_BELOW32((x)>>32)) +#define POW2_BELOW32(x) ((_POW2_BELOW32(x)>>1) + 1) +#define POW2_BELOW64(x) ((_POW2_BELOW64(x)>>1) + 1) + +#define CREDITS_PER_JIFFY POW2_BELOW64(MAX_CPJ) +#define CREDITS_PER_JIFFY_v1 POW2_BELOW32(MAX_CPJ_v1) + +/* in byte mode, the lowest possible rate is one packet/second. + * credit_cap is used as a counter that tells us how many times we can + * refill the "credits available" counter when it becomes empty. + */ +#define MAX_CPJ_BYTES (0xFFFFFFFF / HZ) +#define CREDITS_PER_JIFFY_BYTES POW2_BELOW32(MAX_CPJ_BYTES) + +static u32 xt_hashlimit_len_to_chunks(u32 len) +{ + return (len >> XT_HASHLIMIT_BYTE_SHIFT) + 1; +} + +/* Precision saver. */ +static u64 user2credits(u64 user, int revision) +{ + u64 scale = (revision == 1) ? + XT_HASHLIMIT_SCALE : XT_HASHLIMIT_SCALE_v2; + u64 cpj = (revision == 1) ? + CREDITS_PER_JIFFY_v1 : CREDITS_PER_JIFFY; + + /* Avoid overflow: divide the constant operands first */ + if (scale >= HZ * cpj) + return div64_u64(user, div64_u64(scale, HZ * cpj)); + + return user * div64_u64(HZ * cpj, scale); +} + +static u32 user2credits_byte(u32 user) +{ + u64 us = user; + us *= HZ * CREDITS_PER_JIFFY_BYTES; + return (u32) (us >> 32); +} + +static u64 user2rate(u64 user) +{ + if (user != 0) { + return div64_u64(XT_HASHLIMIT_SCALE_v2, user); + } else { + pr_info_ratelimited("invalid rate from userspace: %llu\n", + user); + return 0; + } +} + +static u64 user2rate_bytes(u32 user) +{ + u64 r; + + r = user ? U32_MAX / user : U32_MAX; + return (r - 1) << XT_HASHLIMIT_BYTE_SHIFT; +} + +static void rateinfo_recalc(struct dsthash_ent *dh, unsigned long now, + u32 mode, int revision) +{ + unsigned long delta = now - dh->rateinfo.prev; + u64 cap, cpj; + + if (delta == 0) + return; + + if (revision >= 3 && mode & XT_HASHLIMIT_RATE_MATCH) { + u64 interval = dh->rateinfo.interval * HZ; + + if (delta < interval) + return; + + dh->rateinfo.prev = now; + dh->rateinfo.prev_window = + ((dh->rateinfo.current_rate * interval) > + (delta * dh->rateinfo.rate)); + dh->rateinfo.current_rate = 0; + + return; + } + + dh->rateinfo.prev = now; + + if (mode & XT_HASHLIMIT_BYTES) { + u64 tmp = dh->rateinfo.credit; + dh->rateinfo.credit += CREDITS_PER_JIFFY_BYTES * delta; + cap = CREDITS_PER_JIFFY_BYTES * HZ; + if (tmp >= dh->rateinfo.credit) {/* overflow */ + dh->rateinfo.credit = cap; + return; + } + } else { + cpj = (revision == 1) ? + CREDITS_PER_JIFFY_v1 : CREDITS_PER_JIFFY; + dh->rateinfo.credit += delta * cpj; + cap = dh->rateinfo.credit_cap; + } + if (dh->rateinfo.credit > cap) + dh->rateinfo.credit = cap; +} + +static void rateinfo_init(struct dsthash_ent *dh, + struct xt_hashlimit_htable *hinfo, int revision) +{ + dh->rateinfo.prev = jiffies; + if (revision >= 3 && hinfo->cfg.mode & XT_HASHLIMIT_RATE_MATCH) { + dh->rateinfo.prev_window = 0; + dh->rateinfo.current_rate = 0; + if (hinfo->cfg.mode & XT_HASHLIMIT_BYTES) { + dh->rateinfo.rate = + user2rate_bytes((u32)hinfo->cfg.avg); + if (hinfo->cfg.burst) + dh->rateinfo.burst = + hinfo->cfg.burst * dh->rateinfo.rate; + else + dh->rateinfo.burst = dh->rateinfo.rate; + } else { + dh->rateinfo.rate = user2rate(hinfo->cfg.avg); + dh->rateinfo.burst = + hinfo->cfg.burst + dh->rateinfo.rate; + } + dh->rateinfo.interval = hinfo->cfg.interval; + } else if (hinfo->cfg.mode & XT_HASHLIMIT_BYTES) { + dh->rateinfo.credit = CREDITS_PER_JIFFY_BYTES * HZ; + dh->rateinfo.cost = user2credits_byte(hinfo->cfg.avg); + dh->rateinfo.credit_cap = hinfo->cfg.burst; + } else { + dh->rateinfo.credit = user2credits(hinfo->cfg.avg * + hinfo->cfg.burst, revision); + dh->rateinfo.cost = user2credits(hinfo->cfg.avg, revision); + dh->rateinfo.credit_cap = dh->rateinfo.credit; + } +} + +static inline __be32 maskl(__be32 a, unsigned int l) +{ + return l ? htonl(ntohl(a) & ~0 << (32 - l)) : 0; +} + +#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) +static void hashlimit_ipv6_mask(__be32 *i, unsigned int p) +{ + switch (p) { + case 0 ... 31: + i[0] = maskl(i[0], p); + i[1] = i[2] = i[3] = 0; + break; + case 32 ... 63: + i[1] = maskl(i[1], p - 32); + i[2] = i[3] = 0; + break; + case 64 ... 95: + i[2] = maskl(i[2], p - 64); + i[3] = 0; + break; + case 96 ... 127: + i[3] = maskl(i[3], p - 96); + break; + case 128: + break; + } +} +#endif + +static int +hashlimit_init_dst(const struct xt_hashlimit_htable *hinfo, + struct dsthash_dst *dst, + const struct sk_buff *skb, unsigned int protoff) +{ + __be16 _ports[2], *ports; + u8 nexthdr; + int poff; + + memset(dst, 0, sizeof(*dst)); + + switch (hinfo->family) { + case NFPROTO_IPV4: + if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_DIP) + dst->ip.dst = maskl(ip_hdr(skb)->daddr, + hinfo->cfg.dstmask); + if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_SIP) + dst->ip.src = maskl(ip_hdr(skb)->saddr, + hinfo->cfg.srcmask); + + if (!(hinfo->cfg.mode & + (XT_HASHLIMIT_HASH_DPT | XT_HASHLIMIT_HASH_SPT))) + return 0; + nexthdr = ip_hdr(skb)->protocol; + break; +#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) + case NFPROTO_IPV6: + { + __be16 frag_off; + + if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_DIP) { + memcpy(&dst->ip6.dst, &ipv6_hdr(skb)->daddr, + sizeof(dst->ip6.dst)); + hashlimit_ipv6_mask(dst->ip6.dst, hinfo->cfg.dstmask); + } + if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_SIP) { + memcpy(&dst->ip6.src, &ipv6_hdr(skb)->saddr, + sizeof(dst->ip6.src)); + hashlimit_ipv6_mask(dst->ip6.src, hinfo->cfg.srcmask); + } + + if (!(hinfo->cfg.mode & + (XT_HASHLIMIT_HASH_DPT | XT_HASHLIMIT_HASH_SPT))) + return 0; + nexthdr = ipv6_hdr(skb)->nexthdr; + protoff = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr, &frag_off); + if ((int)protoff < 0) + return -1; + break; + } +#endif + default: + BUG(); + return 0; + } + + poff = proto_ports_offset(nexthdr); + if (poff >= 0) { + ports = skb_header_pointer(skb, protoff + poff, sizeof(_ports), + &_ports); + } else { + _ports[0] = _ports[1] = 0; + ports = _ports; + } + if (!ports) + return -1; + if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_SPT) + dst->src_port = ports[0]; + if (hinfo->cfg.mode & XT_HASHLIMIT_HASH_DPT) + dst->dst_port = ports[1]; + return 0; +} + +static u32 hashlimit_byte_cost(unsigned int len, struct dsthash_ent *dh) +{ + u64 tmp = xt_hashlimit_len_to_chunks(len); + tmp = tmp * dh->rateinfo.cost; + + if (unlikely(tmp > CREDITS_PER_JIFFY_BYTES * HZ)) + tmp = CREDITS_PER_JIFFY_BYTES * HZ; + + if (dh->rateinfo.credit < tmp && dh->rateinfo.credit_cap) { + dh->rateinfo.credit_cap--; + dh->rateinfo.credit = CREDITS_PER_JIFFY_BYTES * HZ; + } + return (u32) tmp; +} + +static bool +hashlimit_mt_common(const struct sk_buff *skb, struct xt_action_param *par, + struct xt_hashlimit_htable *hinfo, + const struct hashlimit_cfg3 *cfg, int revision) +{ + unsigned long now = jiffies; + struct dsthash_ent *dh; + struct dsthash_dst dst; + bool race = false; + u64 cost; + + if (hashlimit_init_dst(hinfo, &dst, skb, par->thoff) < 0) + goto hotdrop; + + local_bh_disable(); + dh = dsthash_find(hinfo, &dst); + if (dh == NULL) { + dh = dsthash_alloc_init(hinfo, &dst, &race); + if (dh == NULL) { + local_bh_enable(); + goto hotdrop; + } else if (race) { + /* Already got an entry, update expiration timeout */ + dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire); + rateinfo_recalc(dh, now, hinfo->cfg.mode, revision); + } else { + dh->expires = jiffies + msecs_to_jiffies(hinfo->cfg.expire); + rateinfo_init(dh, hinfo, revision); + } + } else { + /* update expiration timeout */ + dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire); + rateinfo_recalc(dh, now, hinfo->cfg.mode, revision); + } + + if (cfg->mode & XT_HASHLIMIT_RATE_MATCH) { + cost = (cfg->mode & XT_HASHLIMIT_BYTES) ? skb->len : 1; + dh->rateinfo.current_rate += cost; + + if (!dh->rateinfo.prev_window && + (dh->rateinfo.current_rate <= dh->rateinfo.burst)) { + spin_unlock(&dh->lock); + local_bh_enable(); + return !(cfg->mode & XT_HASHLIMIT_INVERT); + } else { + goto overlimit; + } + } + + if (cfg->mode & XT_HASHLIMIT_BYTES) + cost = hashlimit_byte_cost(skb->len, dh); + else + cost = dh->rateinfo.cost; + + if (dh->rateinfo.credit >= cost) { + /* below the limit */ + dh->rateinfo.credit -= cost; + spin_unlock(&dh->lock); + local_bh_enable(); + return !(cfg->mode & XT_HASHLIMIT_INVERT); + } + +overlimit: + spin_unlock(&dh->lock); + local_bh_enable(); + /* default match is underlimit - so over the limit, we need to invert */ + return cfg->mode & XT_HASHLIMIT_INVERT; + + hotdrop: + par->hotdrop = true; + return false; +} + +static bool +hashlimit_mt_v1(const struct sk_buff *skb, struct xt_action_param *par) +{ + const struct xt_hashlimit_mtinfo1 *info = par->matchinfo; + struct xt_hashlimit_htable *hinfo = info->hinfo; + struct hashlimit_cfg3 cfg = {}; + int ret; + + ret = cfg_copy(&cfg, (void *)&info->cfg, 1); + if (ret) + return ret; + + return hashlimit_mt_common(skb, par, hinfo, &cfg, 1); +} + +static bool +hashlimit_mt_v2(const struct sk_buff *skb, struct xt_action_param *par) +{ + const struct xt_hashlimit_mtinfo2 *info = par->matchinfo; + struct xt_hashlimit_htable *hinfo = info->hinfo; + struct hashlimit_cfg3 cfg = {}; + int ret; + + ret = cfg_copy(&cfg, (void *)&info->cfg, 2); + if (ret) + return ret; + + return hashlimit_mt_common(skb, par, hinfo, &cfg, 2); +} + +static bool +hashlimit_mt(const struct sk_buff *skb, struct xt_action_param *par) +{ + const struct xt_hashlimit_mtinfo3 *info = par->matchinfo; + struct xt_hashlimit_htable *hinfo = info->hinfo; + + return hashlimit_mt_common(skb, par, hinfo, &info->cfg, 3); +} + +static int hashlimit_mt_check_common(const struct xt_mtchk_param *par, + struct xt_hashlimit_htable **hinfo, + struct hashlimit_cfg3 *cfg, + const char *name, int revision) +{ + struct net *net = par->net; + int ret; + + if (cfg->gc_interval == 0 || cfg->expire == 0) + return -EINVAL; + if (par->family == NFPROTO_IPV4) { + if (cfg->srcmask > 32 || cfg->dstmask > 32) + return -EINVAL; + } else { + if (cfg->srcmask > 128 || cfg->dstmask > 128) + return -EINVAL; + } + + if (cfg->mode & ~XT_HASHLIMIT_ALL) { + pr_info_ratelimited("Unknown mode mask %X, kernel too old?\n", + cfg->mode); + return -EINVAL; + } + + /* Check for overflow. */ + if (revision >= 3 && cfg->mode & XT_HASHLIMIT_RATE_MATCH) { + if (cfg->avg == 0 || cfg->avg > U32_MAX) { + pr_info_ratelimited("invalid rate\n"); + return -ERANGE; + } + + if (cfg->interval == 0) { + pr_info_ratelimited("invalid interval\n"); + return -EINVAL; + } + } else if (cfg->mode & XT_HASHLIMIT_BYTES) { + if (user2credits_byte(cfg->avg) == 0) { + pr_info_ratelimited("overflow, rate too high: %llu\n", + cfg->avg); + return -EINVAL; + } + } else if (cfg->burst == 0 || + user2credits(cfg->avg * cfg->burst, revision) < + user2credits(cfg->avg, revision)) { + pr_info_ratelimited("overflow, try lower: %llu/%llu\n", + cfg->avg, cfg->burst); + return -ERANGE; + } + + mutex_lock(&hashlimit_mutex); + *hinfo = htable_find_get(net, name, par->family); + if (*hinfo == NULL) { + ret = htable_create(net, cfg, name, par->family, + hinfo, revision); + if (ret < 0) { + mutex_unlock(&hashlimit_mutex); + return ret; + } + } + mutex_unlock(&hashlimit_mutex); + + return 0; +} + +static int hashlimit_mt_check_v1(const struct xt_mtchk_param *par) +{ + struct xt_hashlimit_mtinfo1 *info = par->matchinfo; + struct hashlimit_cfg3 cfg = {}; + int ret; + + ret = xt_check_proc_name(info->name, sizeof(info->name)); + if (ret) + return ret; + + ret = cfg_copy(&cfg, (void *)&info->cfg, 1); + if (ret) + return ret; + + return hashlimit_mt_check_common(par, &info->hinfo, + &cfg, info->name, 1); +} + +static int hashlimit_mt_check_v2(const struct xt_mtchk_param *par) +{ + struct xt_hashlimit_mtinfo2 *info = par->matchinfo; + struct hashlimit_cfg3 cfg = {}; + int ret; + + ret = xt_check_proc_name(info->name, sizeof(info->name)); + if (ret) + return ret; + + ret = cfg_copy(&cfg, (void *)&info->cfg, 2); + if (ret) + return ret; + + return hashlimit_mt_check_common(par, &info->hinfo, + &cfg, info->name, 2); +} + +static int hashlimit_mt_check(const struct xt_mtchk_param *par) +{ + struct xt_hashlimit_mtinfo3 *info = par->matchinfo; + int ret; + + ret = xt_check_proc_name(info->name, sizeof(info->name)); + if (ret) + return ret; + + return hashlimit_mt_check_common(par, &info->hinfo, &info->cfg, + info->name, 3); +} + +static void hashlimit_mt_destroy_v2(const struct xt_mtdtor_param *par) +{ + const struct xt_hashlimit_mtinfo2 *info = par->matchinfo; + + htable_put(info->hinfo); +} + +static void hashlimit_mt_destroy_v1(const struct xt_mtdtor_param *par) +{ + const struct xt_hashlimit_mtinfo1 *info = par->matchinfo; + + htable_put(info->hinfo); +} + +static void hashlimit_mt_destroy(const struct xt_mtdtor_param *par) +{ + const struct xt_hashlimit_mtinfo3 *info = par->matchinfo; + + htable_put(info->hinfo); +} + +static struct xt_match hashlimit_mt_reg[] __read_mostly = { + { + .name = "hashlimit", + .revision = 1, + .family = NFPROTO_IPV4, + .match = hashlimit_mt_v1, + .matchsize = sizeof(struct xt_hashlimit_mtinfo1), + .usersize = offsetof(struct xt_hashlimit_mtinfo1, hinfo), + .checkentry = hashlimit_mt_check_v1, + .destroy = hashlimit_mt_destroy_v1, + .me = THIS_MODULE, + }, + { + .name = "hashlimit", + .revision = 2, + .family = NFPROTO_IPV4, + .match = hashlimit_mt_v2, + .matchsize = sizeof(struct xt_hashlimit_mtinfo2), + .usersize = offsetof(struct xt_hashlimit_mtinfo2, hinfo), + .checkentry = hashlimit_mt_check_v2, + .destroy = hashlimit_mt_destroy_v2, + .me = THIS_MODULE, + }, + { + .name = "hashlimit", + .revision = 3, + .family = NFPROTO_IPV4, + .match = hashlimit_mt, + .matchsize = sizeof(struct xt_hashlimit_mtinfo3), + .usersize = offsetof(struct xt_hashlimit_mtinfo3, hinfo), + .checkentry = hashlimit_mt_check, + .destroy = hashlimit_mt_destroy, + .me = THIS_MODULE, + }, +#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) + { + .name = "hashlimit", + .revision = 1, + .family = NFPROTO_IPV6, + .match = hashlimit_mt_v1, + .matchsize = sizeof(struct xt_hashlimit_mtinfo1), + .usersize = offsetof(struct xt_hashlimit_mtinfo1, hinfo), + .checkentry = hashlimit_mt_check_v1, + .destroy = hashlimit_mt_destroy_v1, + .me = THIS_MODULE, + }, + { + .name = "hashlimit", + .revision = 2, + .family = NFPROTO_IPV6, + .match = hashlimit_mt_v2, + .matchsize = sizeof(struct xt_hashlimit_mtinfo2), + .usersize = offsetof(struct xt_hashlimit_mtinfo2, hinfo), + .checkentry = hashlimit_mt_check_v2, + .destroy = hashlimit_mt_destroy_v2, + .me = THIS_MODULE, + }, + { + .name = "hashlimit", + .revision = 3, + .family = NFPROTO_IPV6, + .match = hashlimit_mt, + .matchsize = sizeof(struct xt_hashlimit_mtinfo3), + .usersize = offsetof(struct xt_hashlimit_mtinfo3, hinfo), + .checkentry = hashlimit_mt_check, + .destroy = hashlimit_mt_destroy, + .me = THIS_MODULE, + }, +#endif +}; + +/* PROC stuff */ +static void *dl_seq_start(struct seq_file *s, loff_t *pos) + __acquires(htable->lock) +{ + struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->file)); + unsigned int *bucket; + + spin_lock_bh(&htable->lock); + if (*pos >= htable->cfg.size) + return NULL; + + bucket = kmalloc(sizeof(unsigned int), GFP_ATOMIC); + if (!bucket) + return ERR_PTR(-ENOMEM); + + *bucket = *pos; + return bucket; +} + +static void *dl_seq_next(struct seq_file *s, void *v, loff_t *pos) +{ + struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->file)); + unsigned int *bucket = v; + + *pos = ++(*bucket); + if (*pos >= htable->cfg.size) { + kfree(v); + return NULL; + } + return bucket; +} + +static void dl_seq_stop(struct seq_file *s, void *v) + __releases(htable->lock) +{ + struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->file)); + unsigned int *bucket = v; + + if (!IS_ERR(bucket)) + kfree(bucket); + spin_unlock_bh(&htable->lock); +} + +static void dl_seq_print(struct dsthash_ent *ent, u_int8_t family, + struct seq_file *s) +{ + switch (family) { + case NFPROTO_IPV4: + seq_printf(s, "%ld %pI4:%u->%pI4:%u %llu %llu %llu\n", + (long)(ent->expires - jiffies)/HZ, + &ent->dst.ip.src, + ntohs(ent->dst.src_port), + &ent->dst.ip.dst, + ntohs(ent->dst.dst_port), + ent->rateinfo.credit, ent->rateinfo.credit_cap, + ent->rateinfo.cost); + break; +#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) + case NFPROTO_IPV6: + seq_printf(s, "%ld %pI6:%u->%pI6:%u %llu %llu %llu\n", + (long)(ent->expires - jiffies)/HZ, + &ent->dst.ip6.src, + ntohs(ent->dst.src_port), + &ent->dst.ip6.dst, + ntohs(ent->dst.dst_port), + ent->rateinfo.credit, ent->rateinfo.credit_cap, + ent->rateinfo.cost); + break; +#endif + default: + BUG(); + } +} + +static int dl_seq_real_show_v2(struct dsthash_ent *ent, u_int8_t family, + struct seq_file *s) +{ + struct xt_hashlimit_htable *ht = PDE_DATA(file_inode(s->file)); + + spin_lock(&ent->lock); + /* recalculate to show accurate numbers */ + rateinfo_recalc(ent, jiffies, ht->cfg.mode, 2); + + dl_seq_print(ent, family, s); + + spin_unlock(&ent->lock); + return seq_has_overflowed(s); +} + +static int dl_seq_real_show_v1(struct dsthash_ent *ent, u_int8_t family, + struct seq_file *s) +{ + struct xt_hashlimit_htable *ht = PDE_DATA(file_inode(s->file)); + + spin_lock(&ent->lock); + /* recalculate to show accurate numbers */ + rateinfo_recalc(ent, jiffies, ht->cfg.mode, 1); + + dl_seq_print(ent, family, s); + + spin_unlock(&ent->lock); + return seq_has_overflowed(s); +} + +static int dl_seq_real_show(struct dsthash_ent *ent, u_int8_t family, + struct seq_file *s) +{ + struct xt_hashlimit_htable *ht = PDE_DATA(file_inode(s->file)); + + spin_lock(&ent->lock); + /* recalculate to show accurate numbers */ + rateinfo_recalc(ent, jiffies, ht->cfg.mode, 3); + + dl_seq_print(ent, family, s); + + spin_unlock(&ent->lock); + return seq_has_overflowed(s); +} + +static int dl_seq_show_v2(struct seq_file *s, void *v) +{ + struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->file)); + unsigned int *bucket = (unsigned int *)v; + struct dsthash_ent *ent; + + if (!hlist_empty(&htable->hash[*bucket])) { + hlist_for_each_entry(ent, &htable->hash[*bucket], node) + if (dl_seq_real_show_v2(ent, htable->family, s)) + return -1; + } + return 0; +} + +static int dl_seq_show_v1(struct seq_file *s, void *v) +{ + struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->file)); + unsigned int *bucket = v; + struct dsthash_ent *ent; + + if (!hlist_empty(&htable->hash[*bucket])) { + hlist_for_each_entry(ent, &htable->hash[*bucket], node) + if (dl_seq_real_show_v1(ent, htable->family, s)) + return -1; + } + return 0; +} + +static int dl_seq_show(struct seq_file *s, void *v) +{ + struct xt_hashlimit_htable *htable = PDE_DATA(file_inode(s->file)); + unsigned int *bucket = v; + struct dsthash_ent *ent; + + if (!hlist_empty(&htable->hash[*bucket])) { + hlist_for_each_entry(ent, &htable->hash[*bucket], node) + if (dl_seq_real_show(ent, htable->family, s)) + return -1; + } + return 0; +} + +static const struct seq_operations dl_seq_ops_v1 = { + .start = dl_seq_start, + .next = dl_seq_next, + .stop = dl_seq_stop, + .show = dl_seq_show_v1 +}; + +static const struct seq_operations dl_seq_ops_v2 = { + .start = dl_seq_start, + .next = dl_seq_next, + .stop = dl_seq_stop, + .show = dl_seq_show_v2 +}; + +static const struct seq_operations dl_seq_ops = { + .start = dl_seq_start, + .next = dl_seq_next, + .stop = dl_seq_stop, + .show = dl_seq_show +}; + +static int __net_init hashlimit_proc_net_init(struct net *net) +{ + struct hashlimit_net *hashlimit_net = hashlimit_pernet(net); + + hashlimit_net->ipt_hashlimit = proc_mkdir("ipt_hashlimit", net->proc_net); + if (!hashlimit_net->ipt_hashlimit) + return -ENOMEM; +#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) + hashlimit_net->ip6t_hashlimit = proc_mkdir("ip6t_hashlimit", net->proc_net); + if (!hashlimit_net->ip6t_hashlimit) { + remove_proc_entry("ipt_hashlimit", net->proc_net); + return -ENOMEM; + } +#endif + return 0; +} + +static void __net_exit hashlimit_proc_net_exit(struct net *net) +{ + struct xt_hashlimit_htable *hinfo; + struct hashlimit_net *hashlimit_net = hashlimit_pernet(net); + + /* hashlimit_net_exit() is called before hashlimit_mt_destroy(). + * Make sure that the parent ipt_hashlimit and ip6t_hashlimit proc + * entries is empty before trying to remove it. + */ + mutex_lock(&hashlimit_mutex); + hlist_for_each_entry(hinfo, &hashlimit_net->htables, node) + htable_remove_proc_entry(hinfo); + hashlimit_net->ipt_hashlimit = NULL; + hashlimit_net->ip6t_hashlimit = NULL; + mutex_unlock(&hashlimit_mutex); + + remove_proc_entry("ipt_hashlimit", net->proc_net); +#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES) + remove_proc_entry("ip6t_hashlimit", net->proc_net); +#endif +} + +static int __net_init hashlimit_net_init(struct net *net) +{ + struct hashlimit_net *hashlimit_net = hashlimit_pernet(net); + + INIT_HLIST_HEAD(&hashlimit_net->htables); + return hashlimit_proc_net_init(net); +} + +static void __net_exit hashlimit_net_exit(struct net *net) +{ + hashlimit_proc_net_exit(net); +} + +static struct pernet_operations hashlimit_net_ops = { + .init = hashlimit_net_init, + .exit = hashlimit_net_exit, + .id = &hashlimit_net_id, + .size = sizeof(struct hashlimit_net), +}; + +static int __init hashlimit_mt_init(void) +{ + int err; + + err = register_pernet_subsys(&hashlimit_net_ops); + if (err < 0) + return err; + err = xt_register_matches(hashlimit_mt_reg, + ARRAY_SIZE(hashlimit_mt_reg)); + if (err < 0) + goto err1; + + err = -ENOMEM; + hashlimit_cachep = kmem_cache_create("xt_hashlimit", + sizeof(struct dsthash_ent), 0, 0, + NULL); + if (!hashlimit_cachep) { + pr_warn("unable to create slab cache\n"); + goto err2; + } + return 0; + +err2: + xt_unregister_matches(hashlimit_mt_reg, ARRAY_SIZE(hashlimit_mt_reg)); +err1: + unregister_pernet_subsys(&hashlimit_net_ops); + return err; + +} + +static void __exit hashlimit_mt_exit(void) +{ + xt_unregister_matches(hashlimit_mt_reg, ARRAY_SIZE(hashlimit_mt_reg)); + unregister_pernet_subsys(&hashlimit_net_ops); + + rcu_barrier_bh(); + kmem_cache_destroy(hashlimit_cachep); +} + +module_init(hashlimit_mt_init); +module_exit(hashlimit_mt_exit); \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netfilter/xt_hashlimit.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netfilter/xt_hashlimit.c.yml new file mode 100644 index 00000000000..b3782e5dd9f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netfilter/xt_hashlimit.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2003-2004 by Harald Welte + - (c) 2006-2012 Patrick McHardy + - Copyright (c) CC Computer Consultants GmbH, 2007 - 2008 Development +holders: + - Harald Welte + - Patrick McHardy + - CC Computer Consultants GmbH, Development diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netrom/nr_timer.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netrom/nr_timer.c new file mode 100644 index 00000000000..17a5f634807 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netrom/nr_timer.c @@ -0,0 +1,248 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + * Copyright (C) 2002 Ralf Baechle DO1GRB (ralf@gnu.org) + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void nr_heartbeat_expiry(struct timer_list *); +static void nr_t1timer_expiry(struct timer_list *); +static void nr_t2timer_expiry(struct timer_list *); +static void nr_t4timer_expiry(struct timer_list *); +static void nr_idletimer_expiry(struct timer_list *); + +void nr_init_timers(struct sock *sk) +{ + struct nr_sock *nr = nr_sk(sk); + + timer_setup(&nr->t1timer, nr_t1timer_expiry, 0); + timer_setup(&nr->t2timer, nr_t2timer_expiry, 0); + timer_setup(&nr->t4timer, nr_t4timer_expiry, 0); + timer_setup(&nr->idletimer, nr_idletimer_expiry, 0); + + /* initialized by sock_init_data */ + sk->sk_timer.function = nr_heartbeat_expiry; +} + +void nr_start_t1timer(struct sock *sk) +{ + struct nr_sock *nr = nr_sk(sk); + + sk_reset_timer(sk, &nr->t1timer, jiffies + nr->t1); +} + +void nr_start_t2timer(struct sock *sk) +{ + struct nr_sock *nr = nr_sk(sk); + + sk_reset_timer(sk, &nr->t2timer, jiffies + nr->t2); +} + +void nr_start_t4timer(struct sock *sk) +{ + struct nr_sock *nr = nr_sk(sk); + + sk_reset_timer(sk, &nr->t4timer, jiffies + nr->t4); +} + +void nr_start_idletimer(struct sock *sk) +{ + struct nr_sock *nr = nr_sk(sk); + + if (nr->idle > 0) + sk_reset_timer(sk, &nr->idletimer, jiffies + nr->idle); +} + +void nr_start_heartbeat(struct sock *sk) +{ + sk_reset_timer(sk, &sk->sk_timer, jiffies + 5 * HZ); +} + +void nr_stop_t1timer(struct sock *sk) +{ + sk_stop_timer(sk, &nr_sk(sk)->t1timer); +} + +void nr_stop_t2timer(struct sock *sk) +{ + sk_stop_timer(sk, &nr_sk(sk)->t2timer); +} + +void nr_stop_t4timer(struct sock *sk) +{ + sk_stop_timer(sk, &nr_sk(sk)->t4timer); +} + +void nr_stop_idletimer(struct sock *sk) +{ + sk_stop_timer(sk, &nr_sk(sk)->idletimer); +} + +void nr_stop_heartbeat(struct sock *sk) +{ + sk_stop_timer(sk, &sk->sk_timer); +} + +int nr_t1timer_running(struct sock *sk) +{ + return timer_pending(&nr_sk(sk)->t1timer); +} + +static void nr_heartbeat_expiry(struct timer_list *t) +{ + struct sock *sk = from_timer(sk, t, sk_timer); + struct nr_sock *nr = nr_sk(sk); + + bh_lock_sock(sk); + switch (nr->state) { + case NR_STATE_0: + /* Magic here: If we listen() and a new link dies before it + is accepted() it isn't 'dead' so doesn't get removed. */ + if (sock_flag(sk, SOCK_DESTROY) || + (sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD))) { + sock_hold(sk); + bh_unlock_sock(sk); + nr_destroy_socket(sk); + sock_put(sk); + return; + } + break; + + case NR_STATE_3: + /* + * Check for the state of the receive buffer. + */ + if (atomic_read(&sk->sk_rmem_alloc) < (sk->sk_rcvbuf / 2) && + (nr->condition & NR_COND_OWN_RX_BUSY)) { + nr->condition &= ~NR_COND_OWN_RX_BUSY; + nr->condition &= ~NR_COND_ACK_PENDING; + nr->vl = nr->vr; + nr_write_internal(sk, NR_INFOACK); + break; + } + break; + } + + nr_start_heartbeat(sk); + bh_unlock_sock(sk); +} + +static void nr_t2timer_expiry(struct timer_list *t) +{ + struct nr_sock *nr = from_timer(nr, t, t2timer); + struct sock *sk = &nr->sock; + + bh_lock_sock(sk); + if (nr->condition & NR_COND_ACK_PENDING) { + nr->condition &= ~NR_COND_ACK_PENDING; + nr_enquiry_response(sk); + } + bh_unlock_sock(sk); +} + +static void nr_t4timer_expiry(struct timer_list *t) +{ + struct nr_sock *nr = from_timer(nr, t, t4timer); + struct sock *sk = &nr->sock; + + bh_lock_sock(sk); + nr_sk(sk)->condition &= ~NR_COND_PEER_RX_BUSY; + bh_unlock_sock(sk); +} + +static void nr_idletimer_expiry(struct timer_list *t) +{ + struct nr_sock *nr = from_timer(nr, t, idletimer); + struct sock *sk = &nr->sock; + + bh_lock_sock(sk); + + nr_clear_queues(sk); + + nr->n2count = 0; + nr_write_internal(sk, NR_DISCREQ); + nr->state = NR_STATE_2; + + nr_start_t1timer(sk); + nr_stop_t2timer(sk); + nr_stop_t4timer(sk); + + sk->sk_state = TCP_CLOSE; + sk->sk_err = 0; + sk->sk_shutdown |= SEND_SHUTDOWN; + + if (!sock_flag(sk, SOCK_DEAD)) { + sk->sk_state_change(sk); + sock_set_flag(sk, SOCK_DEAD); + } + bh_unlock_sock(sk); +} + +static void nr_t1timer_expiry(struct timer_list *t) +{ + struct nr_sock *nr = from_timer(nr, t, t1timer); + struct sock *sk = &nr->sock; + + bh_lock_sock(sk); + switch (nr->state) { + case NR_STATE_1: + if (nr->n2count == nr->n2) { + nr_disconnect(sk, ETIMEDOUT); + bh_unlock_sock(sk); + return; + } else { + nr->n2count++; + nr_write_internal(sk, NR_CONNREQ); + } + break; + + case NR_STATE_2: + if (nr->n2count == nr->n2) { + nr_disconnect(sk, ETIMEDOUT); + bh_unlock_sock(sk); + return; + } else { + nr->n2count++; + nr_write_internal(sk, NR_DISCREQ); + } + break; + + case NR_STATE_3: + if (nr->n2count == nr->n2) { + nr_disconnect(sk, ETIMEDOUT); + bh_unlock_sock(sk); + return; + } else { + nr->n2count++; + nr_requeue_frames(sk); + } + break; + } + + nr_start_t1timer(sk); + bh_unlock_sock(sk); +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netrom/nr_timer.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netrom/nr_timer.c.yml new file mode 100644 index 00000000000..232c779ccfd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/netrom/nr_timer.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + - Copyright (c) 2002 Ralf Baechle DO1GRB (ralf@gnu.org) +holders: + - Jonathan Naylor G4KLX + - Ralf Baechle DO1GRB diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/af_rose.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/af_rose.c new file mode 100644 index 00000000000..d2c038c01e2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/af_rose.c @@ -0,0 +1,1626 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + * Copyright (C) Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk) + * Copyright (C) Terry Dawson VK2KTJ (terry@animats.net) + * Copyright (C) Tomi Manninen OH2BNS (oh2bns@sral.fi) + */ + +#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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int rose_ndevs = 10; + +int sysctl_rose_restart_request_timeout = ROSE_DEFAULT_T0; +int sysctl_rose_call_request_timeout = ROSE_DEFAULT_T1; +int sysctl_rose_reset_request_timeout = ROSE_DEFAULT_T2; +int sysctl_rose_clear_request_timeout = ROSE_DEFAULT_T3; +int sysctl_rose_no_activity_timeout = ROSE_DEFAULT_IDLE; +int sysctl_rose_ack_hold_back_timeout = ROSE_DEFAULT_HB; +int sysctl_rose_routing_control = ROSE_DEFAULT_ROUTING; +int sysctl_rose_link_fail_timeout = ROSE_DEFAULT_FAIL_TIMEOUT; +int sysctl_rose_maximum_vcs = ROSE_DEFAULT_MAXVC; +int sysctl_rose_window_size = ROSE_DEFAULT_WINDOW_SIZE; + +static HLIST_HEAD(rose_list); +static DEFINE_SPINLOCK(rose_list_lock); + +static const struct proto_ops rose_proto_ops; + +ax25_address rose_callsign; + +/* + * ROSE network devices are virtual network devices encapsulating ROSE + * frames into AX.25 which will be sent through an AX.25 device, so form a + * special "super class" of normal net devices; split their locks off into a + * separate class since they always nest. + */ +static struct lock_class_key rose_netdev_xmit_lock_key; +static struct lock_class_key rose_netdev_addr_lock_key; + +static void rose_set_lockdep_one(struct net_device *dev, + struct netdev_queue *txq, + void *_unused) +{ + lockdep_set_class(&txq->_xmit_lock, &rose_netdev_xmit_lock_key); +} + +static void rose_set_lockdep_key(struct net_device *dev) +{ + lockdep_set_class(&dev->addr_list_lock, &rose_netdev_addr_lock_key); + netdev_for_each_tx_queue(dev, rose_set_lockdep_one, NULL); +} + +/* + * Convert a ROSE address into text. + */ +char *rose2asc(char *buf, const rose_address *addr) +{ + if (addr->rose_addr[0] == 0x00 && addr->rose_addr[1] == 0x00 && + addr->rose_addr[2] == 0x00 && addr->rose_addr[3] == 0x00 && + addr->rose_addr[4] == 0x00) { + strcpy(buf, "*"); + } else { + sprintf(buf, "%02X%02X%02X%02X%02X", addr->rose_addr[0] & 0xFF, + addr->rose_addr[1] & 0xFF, + addr->rose_addr[2] & 0xFF, + addr->rose_addr[3] & 0xFF, + addr->rose_addr[4] & 0xFF); + } + + return buf; +} + +/* + * Compare two ROSE addresses, 0 == equal. + */ +int rosecmp(rose_address *addr1, rose_address *addr2) +{ + int i; + + for (i = 0; i < 5; i++) + if (addr1->rose_addr[i] != addr2->rose_addr[i]) + return 1; + + return 0; +} + +/* + * Compare two ROSE addresses for only mask digits, 0 == equal. + */ +int rosecmpm(rose_address *addr1, rose_address *addr2, unsigned short mask) +{ + unsigned int i, j; + + if (mask > 10) + return 1; + + for (i = 0; i < mask; i++) { + j = i / 2; + + if ((i % 2) != 0) { + if ((addr1->rose_addr[j] & 0x0F) != (addr2->rose_addr[j] & 0x0F)) + return 1; + } else { + if ((addr1->rose_addr[j] & 0xF0) != (addr2->rose_addr[j] & 0xF0)) + return 1; + } + } + + return 0; +} + +/* + * Socket removal during an interrupt is now safe. + */ +static void rose_remove_socket(struct sock *sk) +{ + spin_lock_bh(&rose_list_lock); + sk_del_node_init(sk); + spin_unlock_bh(&rose_list_lock); +} + +/* + * Kill all bound sockets on a broken link layer connection to a + * particular neighbour. + */ +void rose_kill_by_neigh(struct rose_neigh *neigh) +{ + struct sock *s; + + spin_lock_bh(&rose_list_lock); + sk_for_each(s, &rose_list) { + struct rose_sock *rose = rose_sk(s); + + if (rose->neighbour == neigh) { + rose_disconnect(s, ENETUNREACH, ROSE_OUT_OF_ORDER, 0); + rose->neighbour->use--; + rose->neighbour = NULL; + } + } + spin_unlock_bh(&rose_list_lock); +} + +/* + * Kill all bound sockets on a dropped device. + */ +static void rose_kill_by_device(struct net_device *dev) +{ + struct sock *s; + + spin_lock_bh(&rose_list_lock); + sk_for_each(s, &rose_list) { + struct rose_sock *rose = rose_sk(s); + + if (rose->device == dev) { + rose_disconnect(s, ENETUNREACH, ROSE_OUT_OF_ORDER, 0); + if (rose->neighbour) + rose->neighbour->use--; + rose->device = NULL; + } + } + spin_unlock_bh(&rose_list_lock); +} + +/* + * Handle device status changes. + */ +static int rose_device_event(struct notifier_block *this, + unsigned long event, void *ptr) +{ + struct net_device *dev = netdev_notifier_info_to_dev(ptr); + + if (!net_eq(dev_net(dev), &init_net)) + return NOTIFY_DONE; + + if (event != NETDEV_DOWN) + return NOTIFY_DONE; + + switch (dev->type) { + case ARPHRD_ROSE: + rose_kill_by_device(dev); + break; + case ARPHRD_AX25: + rose_link_device_down(dev); + rose_rt_device_down(dev); + break; + } + + return NOTIFY_DONE; +} + +/* + * Add a socket to the bound sockets list. + */ +static void rose_insert_socket(struct sock *sk) +{ + + spin_lock_bh(&rose_list_lock); + sk_add_node(sk, &rose_list); + spin_unlock_bh(&rose_list_lock); +} + +/* + * Find a socket that wants to accept the Call Request we just + * received. + */ +static struct sock *rose_find_listener(rose_address *addr, ax25_address *call) +{ + struct sock *s; + + spin_lock_bh(&rose_list_lock); + sk_for_each(s, &rose_list) { + struct rose_sock *rose = rose_sk(s); + + if (!rosecmp(&rose->source_addr, addr) && + !ax25cmp(&rose->source_call, call) && + !rose->source_ndigis && s->sk_state == TCP_LISTEN) + goto found; + } + + sk_for_each(s, &rose_list) { + struct rose_sock *rose = rose_sk(s); + + if (!rosecmp(&rose->source_addr, addr) && + !ax25cmp(&rose->source_call, &null_ax25_address) && + s->sk_state == TCP_LISTEN) + goto found; + } + s = NULL; +found: + spin_unlock_bh(&rose_list_lock); + return s; +} + +/* + * Find a connected ROSE socket given my LCI and device. + */ +struct sock *rose_find_socket(unsigned int lci, struct rose_neigh *neigh) +{ + struct sock *s; + + spin_lock_bh(&rose_list_lock); + sk_for_each(s, &rose_list) { + struct rose_sock *rose = rose_sk(s); + + if (rose->lci == lci && rose->neighbour == neigh) + goto found; + } + s = NULL; +found: + spin_unlock_bh(&rose_list_lock); + return s; +} + +/* + * Find a unique LCI for a given device. + */ +unsigned int rose_new_lci(struct rose_neigh *neigh) +{ + int lci; + + if (neigh->dce_mode) { + for (lci = 1; lci <= sysctl_rose_maximum_vcs; lci++) + if (rose_find_socket(lci, neigh) == NULL && rose_route_free_lci(lci, neigh) == NULL) + return lci; + } else { + for (lci = sysctl_rose_maximum_vcs; lci > 0; lci--) + if (rose_find_socket(lci, neigh) == NULL && rose_route_free_lci(lci, neigh) == NULL) + return lci; + } + + return 0; +} + +/* + * Deferred destroy. + */ +void rose_destroy_socket(struct sock *); + +/* + * Handler for deferred kills. + */ +static void rose_destroy_timer(struct timer_list *t) +{ + struct sock *sk = from_timer(sk, t, sk_timer); + + rose_destroy_socket(sk); +} + +/* + * This is called from user mode and the timers. Thus it protects itself + * against interrupt users but doesn't worry about being called during + * work. Once it is removed from the queue no interrupt or bottom half + * will touch it and we are (fairly 8-) ) safe. + */ +void rose_destroy_socket(struct sock *sk) +{ + struct sk_buff *skb; + + rose_remove_socket(sk); + rose_stop_heartbeat(sk); + rose_stop_idletimer(sk); + rose_stop_timer(sk); + + rose_clear_queues(sk); /* Flush the queues */ + + while ((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) { + if (skb->sk != sk) { /* A pending connection */ + /* Queue the unaccepted socket for death */ + sock_set_flag(skb->sk, SOCK_DEAD); + rose_start_heartbeat(skb->sk); + rose_sk(skb->sk)->state = ROSE_STATE_0; + } + + kfree_skb(skb); + } + + if (sk_has_allocations(sk)) { + /* Defer: outstanding buffers */ + timer_setup(&sk->sk_timer, rose_destroy_timer, 0); + sk->sk_timer.expires = jiffies + 10 * HZ; + add_timer(&sk->sk_timer); + } else + sock_put(sk); +} + +/* + * Handling for system calls applied via the various interfaces to a + * ROSE socket object. + */ + +static int rose_setsockopt(struct socket *sock, int level, int optname, + char __user *optval, unsigned int optlen) +{ + struct sock *sk = sock->sk; + struct rose_sock *rose = rose_sk(sk); + int opt; + + if (level != SOL_ROSE) + return -ENOPROTOOPT; + + if (optlen < sizeof(int)) + return -EINVAL; + + if (get_user(opt, (int __user *)optval)) + return -EFAULT; + + switch (optname) { + case ROSE_DEFER: + rose->defer = opt ? 1 : 0; + return 0; + + case ROSE_T1: + if (opt < 1) + return -EINVAL; + rose->t1 = opt * HZ; + return 0; + + case ROSE_T2: + if (opt < 1) + return -EINVAL; + rose->t2 = opt * HZ; + return 0; + + case ROSE_T3: + if (opt < 1) + return -EINVAL; + rose->t3 = opt * HZ; + return 0; + + case ROSE_HOLDBACK: + if (opt < 1) + return -EINVAL; + rose->hb = opt * HZ; + return 0; + + case ROSE_IDLE: + if (opt < 0) + return -EINVAL; + rose->idle = opt * 60 * HZ; + return 0; + + case ROSE_QBITINCL: + rose->qbitincl = opt ? 1 : 0; + return 0; + + default: + return -ENOPROTOOPT; + } +} + +static int rose_getsockopt(struct socket *sock, int level, int optname, + char __user *optval, int __user *optlen) +{ + struct sock *sk = sock->sk; + struct rose_sock *rose = rose_sk(sk); + int val = 0; + int len; + + if (level != SOL_ROSE) + return -ENOPROTOOPT; + + if (get_user(len, optlen)) + return -EFAULT; + + if (len < 0) + return -EINVAL; + + switch (optname) { + case ROSE_DEFER: + val = rose->defer; + break; + + case ROSE_T1: + val = rose->t1 / HZ; + break; + + case ROSE_T2: + val = rose->t2 / HZ; + break; + + case ROSE_T3: + val = rose->t3 / HZ; + break; + + case ROSE_HOLDBACK: + val = rose->hb / HZ; + break; + + case ROSE_IDLE: + val = rose->idle / (60 * HZ); + break; + + case ROSE_QBITINCL: + val = rose->qbitincl; + break; + + default: + return -ENOPROTOOPT; + } + + len = min_t(unsigned int, len, sizeof(int)); + + if (put_user(len, optlen)) + return -EFAULT; + + return copy_to_user(optval, &val, len) ? -EFAULT : 0; +} + +static int rose_listen(struct socket *sock, int backlog) +{ + struct sock *sk = sock->sk; + + if (sk->sk_state != TCP_LISTEN) { + struct rose_sock *rose = rose_sk(sk); + + rose->dest_ndigis = 0; + memset(&rose->dest_addr, 0, ROSE_ADDR_LEN); + memset(&rose->dest_call, 0, AX25_ADDR_LEN); + memset(rose->dest_digis, 0, AX25_ADDR_LEN * ROSE_MAX_DIGIS); + sk->sk_max_ack_backlog = backlog; + sk->sk_state = TCP_LISTEN; + return 0; + } + + return -EOPNOTSUPP; +} + +static struct proto rose_proto = { + .name = "ROSE", + .owner = THIS_MODULE, + .obj_size = sizeof(struct rose_sock), +}; + +static int rose_create(struct net *net, struct socket *sock, int protocol, + int kern) +{ + struct sock *sk; + struct rose_sock *rose; + + if (!net_eq(net, &init_net)) + return -EAFNOSUPPORT; + + if (sock->type != SOCK_SEQPACKET || protocol != 0) + return -ESOCKTNOSUPPORT; + + sk = sk_alloc(net, PF_ROSE, GFP_ATOMIC, &rose_proto, kern); + if (sk == NULL) + return -ENOMEM; + + rose = rose_sk(sk); + + sock_init_data(sock, sk); + + skb_queue_head_init(&rose->ack_queue); +#ifdef M_BIT + skb_queue_head_init(&rose->frag_queue); + rose->fraglen = 0; +#endif + + sock->ops = &rose_proto_ops; + sk->sk_protocol = protocol; + + timer_setup(&rose->timer, NULL, 0); + timer_setup(&rose->idletimer, NULL, 0); + + rose->t1 = msecs_to_jiffies(sysctl_rose_call_request_timeout); + rose->t2 = msecs_to_jiffies(sysctl_rose_reset_request_timeout); + rose->t3 = msecs_to_jiffies(sysctl_rose_clear_request_timeout); + rose->hb = msecs_to_jiffies(sysctl_rose_ack_hold_back_timeout); + rose->idle = msecs_to_jiffies(sysctl_rose_no_activity_timeout); + + rose->state = ROSE_STATE_0; + + return 0; +} + +static struct sock *rose_make_new(struct sock *osk) +{ + struct sock *sk; + struct rose_sock *rose, *orose; + + if (osk->sk_type != SOCK_SEQPACKET) + return NULL; + + sk = sk_alloc(sock_net(osk), PF_ROSE, GFP_ATOMIC, &rose_proto, 0); + if (sk == NULL) + return NULL; + + rose = rose_sk(sk); + + sock_init_data(NULL, sk); + + skb_queue_head_init(&rose->ack_queue); +#ifdef M_BIT + skb_queue_head_init(&rose->frag_queue); + rose->fraglen = 0; +#endif + + sk->sk_type = osk->sk_type; + sk->sk_priority = osk->sk_priority; + sk->sk_protocol = osk->sk_protocol; + sk->sk_rcvbuf = osk->sk_rcvbuf; + sk->sk_sndbuf = osk->sk_sndbuf; + sk->sk_state = TCP_ESTABLISHED; + sock_copy_flags(sk, osk); + + timer_setup(&rose->timer, NULL, 0); + timer_setup(&rose->idletimer, NULL, 0); + + orose = rose_sk(osk); + rose->t1 = orose->t1; + rose->t2 = orose->t2; + rose->t3 = orose->t3; + rose->hb = orose->hb; + rose->idle = orose->idle; + rose->defer = orose->defer; + rose->device = orose->device; + rose->qbitincl = orose->qbitincl; + + return sk; +} + +static int rose_release(struct socket *sock) +{ + struct sock *sk = sock->sk; + struct rose_sock *rose; + + if (sk == NULL) return 0; + + sock_hold(sk); + sock_orphan(sk); + lock_sock(sk); + rose = rose_sk(sk); + + switch (rose->state) { + case ROSE_STATE_0: + release_sock(sk); + rose_disconnect(sk, 0, -1, -1); + lock_sock(sk); + rose_destroy_socket(sk); + break; + + case ROSE_STATE_2: + rose->neighbour->use--; + release_sock(sk); + rose_disconnect(sk, 0, -1, -1); + lock_sock(sk); + rose_destroy_socket(sk); + break; + + case ROSE_STATE_1: + case ROSE_STATE_3: + case ROSE_STATE_4: + case ROSE_STATE_5: + rose_clear_queues(sk); + rose_stop_idletimer(sk); + rose_write_internal(sk, ROSE_CLEAR_REQUEST); + rose_start_t3timer(sk); + rose->state = ROSE_STATE_2; + sk->sk_state = TCP_CLOSE; + sk->sk_shutdown |= SEND_SHUTDOWN; + sk->sk_state_change(sk); + sock_set_flag(sk, SOCK_DEAD); + sock_set_flag(sk, SOCK_DESTROY); + break; + + default: + break; + } + + sock->sk = NULL; + release_sock(sk); + sock_put(sk); + + return 0; +} + +static int rose_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) +{ + struct sock *sk = sock->sk; + struct rose_sock *rose = rose_sk(sk); + struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr; + struct net_device *dev; + ax25_address *source; + ax25_uid_assoc *user; + int n; + + if (!sock_flag(sk, SOCK_ZAPPED)) + return -EINVAL; + + if (addr_len != sizeof(struct sockaddr_rose) && addr_len != sizeof(struct full_sockaddr_rose)) + return -EINVAL; + + if (addr->srose_family != AF_ROSE) + return -EINVAL; + + if (addr_len == sizeof(struct sockaddr_rose) && addr->srose_ndigis > 1) + return -EINVAL; + + if ((unsigned int) addr->srose_ndigis > ROSE_MAX_DIGIS) + return -EINVAL; + + if ((dev = rose_dev_get(&addr->srose_addr)) == NULL) + return -EADDRNOTAVAIL; + + source = &addr->srose_call; + + user = ax25_findbyuid(current_euid()); + if (user) { + rose->source_call = user->call; + ax25_uid_put(user); + } else { + if (ax25_uid_policy && !capable(CAP_NET_BIND_SERVICE)) + return -EACCES; + rose->source_call = *source; + } + + rose->source_addr = addr->srose_addr; + rose->device = dev; + rose->source_ndigis = addr->srose_ndigis; + + if (addr_len == sizeof(struct full_sockaddr_rose)) { + struct full_sockaddr_rose *full_addr = (struct full_sockaddr_rose *)uaddr; + for (n = 0 ; n < addr->srose_ndigis ; n++) + rose->source_digis[n] = full_addr->srose_digis[n]; + } else { + if (rose->source_ndigis == 1) { + rose->source_digis[0] = addr->srose_digi; + } + } + + rose_insert_socket(sk); + + sock_reset_flag(sk, SOCK_ZAPPED); + + return 0; +} + +static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_len, int flags) +{ + struct sock *sk = sock->sk; + struct rose_sock *rose = rose_sk(sk); + struct sockaddr_rose *addr = (struct sockaddr_rose *)uaddr; + unsigned char cause, diagnostic; + struct net_device *dev; + ax25_uid_assoc *user; + int n, err = 0; + + if (addr_len != sizeof(struct sockaddr_rose) && addr_len != sizeof(struct full_sockaddr_rose)) + return -EINVAL; + + if (addr->srose_family != AF_ROSE) + return -EINVAL; + + if (addr_len == sizeof(struct sockaddr_rose) && addr->srose_ndigis > 1) + return -EINVAL; + + if ((unsigned int) addr->srose_ndigis > ROSE_MAX_DIGIS) + return -EINVAL; + + /* Source + Destination digis should not exceed ROSE_MAX_DIGIS */ + if ((rose->source_ndigis + addr->srose_ndigis) > ROSE_MAX_DIGIS) + return -EINVAL; + + lock_sock(sk); + + if (sk->sk_state == TCP_ESTABLISHED && sock->state == SS_CONNECTING) { + /* Connect completed during a ERESTARTSYS event */ + sock->state = SS_CONNECTED; + goto out_release; + } + + if (sk->sk_state == TCP_CLOSE && sock->state == SS_CONNECTING) { + sock->state = SS_UNCONNECTED; + err = -ECONNREFUSED; + goto out_release; + } + + if (sk->sk_state == TCP_ESTABLISHED) { + /* No reconnect on a seqpacket socket */ + err = -EISCONN; + goto out_release; + } + + sk->sk_state = TCP_CLOSE; + sock->state = SS_UNCONNECTED; + + rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause, + &diagnostic, 0); + if (!rose->neighbour) { + err = -ENETUNREACH; + goto out_release; + } + + rose->lci = rose_new_lci(rose->neighbour); + if (!rose->lci) { + err = -ENETUNREACH; + goto out_release; + } + + if (sock_flag(sk, SOCK_ZAPPED)) { /* Must bind first - autobinding in this may or may not work */ + sock_reset_flag(sk, SOCK_ZAPPED); + + if ((dev = rose_dev_first()) == NULL) { + err = -ENETUNREACH; + goto out_release; + } + + user = ax25_findbyuid(current_euid()); + if (!user) { + err = -EINVAL; + goto out_release; + } + + memcpy(&rose->source_addr, dev->dev_addr, ROSE_ADDR_LEN); + rose->source_call = user->call; + rose->device = dev; + ax25_uid_put(user); + + rose_insert_socket(sk); /* Finish the bind */ + } + rose->dest_addr = addr->srose_addr; + rose->dest_call = addr->srose_call; + rose->rand = ((long)rose & 0xFFFF) + rose->lci; + rose->dest_ndigis = addr->srose_ndigis; + + if (addr_len == sizeof(struct full_sockaddr_rose)) { + struct full_sockaddr_rose *full_addr = (struct full_sockaddr_rose *)uaddr; + for (n = 0 ; n < addr->srose_ndigis ; n++) + rose->dest_digis[n] = full_addr->srose_digis[n]; + } else { + if (rose->dest_ndigis == 1) { + rose->dest_digis[0] = addr->srose_digi; + } + } + + /* Move to connecting socket, start sending Connect Requests */ + sock->state = SS_CONNECTING; + sk->sk_state = TCP_SYN_SENT; + + rose->state = ROSE_STATE_1; + + rose->neighbour->use++; + + rose_write_internal(sk, ROSE_CALL_REQUEST); + rose_start_heartbeat(sk); + rose_start_t1timer(sk); + + /* Now the loop */ + if (sk->sk_state != TCP_ESTABLISHED && (flags & O_NONBLOCK)) { + err = -EINPROGRESS; + goto out_release; + } + + /* + * A Connect Ack with Choke or timeout or failed routing will go to + * closed. + */ + if (sk->sk_state == TCP_SYN_SENT) { + DEFINE_WAIT(wait); + + for (;;) { + prepare_to_wait(sk_sleep(sk), &wait, + TASK_INTERRUPTIBLE); + if (sk->sk_state != TCP_SYN_SENT) + break; + if (!signal_pending(current)) { + release_sock(sk); + schedule(); + lock_sock(sk); + continue; + } + err = -ERESTARTSYS; + break; + } + finish_wait(sk_sleep(sk), &wait); + + if (err) + goto out_release; + } + + if (sk->sk_state != TCP_ESTABLISHED) { + sock->state = SS_UNCONNECTED; + err = sock_error(sk); /* Always set at this point */ + goto out_release; + } + + sock->state = SS_CONNECTED; + +out_release: + release_sock(sk); + + return err; +} + +static int rose_accept(struct socket *sock, struct socket *newsock, int flags, + bool kern) +{ + struct sk_buff *skb; + struct sock *newsk; + DEFINE_WAIT(wait); + struct sock *sk; + int err = 0; + + if ((sk = sock->sk) == NULL) + return -EINVAL; + + lock_sock(sk); + if (sk->sk_type != SOCK_SEQPACKET) { + err = -EOPNOTSUPP; + goto out_release; + } + + if (sk->sk_state != TCP_LISTEN) { + err = -EINVAL; + goto out_release; + } + + /* + * The write queue this time is holding sockets ready to use + * hooked into the SABM we saved + */ + for (;;) { + prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); + + skb = skb_dequeue(&sk->sk_receive_queue); + if (skb) + break; + + if (flags & O_NONBLOCK) { + err = -EWOULDBLOCK; + break; + } + if (!signal_pending(current)) { + release_sock(sk); + schedule(); + lock_sock(sk); + continue; + } + err = -ERESTARTSYS; + break; + } + finish_wait(sk_sleep(sk), &wait); + if (err) + goto out_release; + + newsk = skb->sk; + sock_graft(newsk, newsock); + + /* Now attach up the new socket */ + skb->sk = NULL; + kfree_skb(skb); + sk->sk_ack_backlog--; + +out_release: + release_sock(sk); + + return err; +} + +static int rose_getname(struct socket *sock, struct sockaddr *uaddr, + int peer) +{ + struct full_sockaddr_rose *srose = (struct full_sockaddr_rose *)uaddr; + struct sock *sk = sock->sk; + struct rose_sock *rose = rose_sk(sk); + int n; + + memset(srose, 0, sizeof(*srose)); + if (peer != 0) { + if (sk->sk_state != TCP_ESTABLISHED) + return -ENOTCONN; + srose->srose_family = AF_ROSE; + srose->srose_addr = rose->dest_addr; + srose->srose_call = rose->dest_call; + srose->srose_ndigis = rose->dest_ndigis; + for (n = 0; n < rose->dest_ndigis; n++) + srose->srose_digis[n] = rose->dest_digis[n]; + } else { + srose->srose_family = AF_ROSE; + srose->srose_addr = rose->source_addr; + srose->srose_call = rose->source_call; + srose->srose_ndigis = rose->source_ndigis; + for (n = 0; n < rose->source_ndigis; n++) + srose->srose_digis[n] = rose->source_digis[n]; + } + + return sizeof(struct full_sockaddr_rose); +} + +int rose_rx_call_request(struct sk_buff *skb, struct net_device *dev, struct rose_neigh *neigh, unsigned int lci) +{ + struct sock *sk; + struct sock *make; + struct rose_sock *make_rose; + struct rose_facilities_struct facilities; + int n; + + skb->sk = NULL; /* Initially we don't know who it's for */ + + /* + * skb->data points to the rose frame start + */ + memset(&facilities, 0x00, sizeof(struct rose_facilities_struct)); + + if (!rose_parse_facilities(skb->data + ROSE_CALL_REQ_FACILITIES_OFF, + skb->len - ROSE_CALL_REQ_FACILITIES_OFF, + &facilities)) { + rose_transmit_clear_request(neigh, lci, ROSE_INVALID_FACILITY, 76); + return 0; + } + + sk = rose_find_listener(&facilities.source_addr, &facilities.source_call); + + /* + * We can't accept the Call Request. + */ + if (sk == NULL || sk_acceptq_is_full(sk) || + (make = rose_make_new(sk)) == NULL) { + rose_transmit_clear_request(neigh, lci, ROSE_NETWORK_CONGESTION, 120); + return 0; + } + + skb->sk = make; + make->sk_state = TCP_ESTABLISHED; + make_rose = rose_sk(make); + + make_rose->lci = lci; + make_rose->dest_addr = facilities.dest_addr; + make_rose->dest_call = facilities.dest_call; + make_rose->dest_ndigis = facilities.dest_ndigis; + for (n = 0 ; n < facilities.dest_ndigis ; n++) + make_rose->dest_digis[n] = facilities.dest_digis[n]; + make_rose->source_addr = facilities.source_addr; + make_rose->source_call = facilities.source_call; + make_rose->source_ndigis = facilities.source_ndigis; + for (n = 0 ; n < facilities.source_ndigis ; n++) + make_rose->source_digis[n] = facilities.source_digis[n]; + make_rose->neighbour = neigh; + make_rose->device = dev; + make_rose->facilities = facilities; + + make_rose->neighbour->use++; + + if (rose_sk(sk)->defer) { + make_rose->state = ROSE_STATE_5; + } else { + rose_write_internal(make, ROSE_CALL_ACCEPTED); + make_rose->state = ROSE_STATE_3; + rose_start_idletimer(make); + } + + make_rose->condition = 0x00; + make_rose->vs = 0; + make_rose->va = 0; + make_rose->vr = 0; + make_rose->vl = 0; + sk->sk_ack_backlog++; + + rose_insert_socket(make); + + skb_queue_head(&sk->sk_receive_queue, skb); + + rose_start_heartbeat(make); + + if (!sock_flag(sk, SOCK_DEAD)) + sk->sk_data_ready(sk); + + return 1; +} + +static int rose_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) +{ + struct sock *sk = sock->sk; + struct rose_sock *rose = rose_sk(sk); + DECLARE_SOCKADDR(struct sockaddr_rose *, usrose, msg->msg_name); + int err; + struct full_sockaddr_rose srose; + struct sk_buff *skb; + unsigned char *asmptr; + int n, size, qbit = 0; + + if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_EOR|MSG_CMSG_COMPAT)) + return -EINVAL; + + if (sock_flag(sk, SOCK_ZAPPED)) + return -EADDRNOTAVAIL; + + if (sk->sk_shutdown & SEND_SHUTDOWN) { + send_sig(SIGPIPE, current, 0); + return -EPIPE; + } + + if (rose->neighbour == NULL || rose->device == NULL) + return -ENETUNREACH; + + if (usrose != NULL) { + if (msg->msg_namelen != sizeof(struct sockaddr_rose) && msg->msg_namelen != sizeof(struct full_sockaddr_rose)) + return -EINVAL; + memset(&srose, 0, sizeof(struct full_sockaddr_rose)); + memcpy(&srose, usrose, msg->msg_namelen); + if (rosecmp(&rose->dest_addr, &srose.srose_addr) != 0 || + ax25cmp(&rose->dest_call, &srose.srose_call) != 0) + return -EISCONN; + if (srose.srose_ndigis != rose->dest_ndigis) + return -EISCONN; + if (srose.srose_ndigis == rose->dest_ndigis) { + for (n = 0 ; n < srose.srose_ndigis ; n++) + if (ax25cmp(&rose->dest_digis[n], + &srose.srose_digis[n])) + return -EISCONN; + } + if (srose.srose_family != AF_ROSE) + return -EINVAL; + } else { + if (sk->sk_state != TCP_ESTABLISHED) + return -ENOTCONN; + + srose.srose_family = AF_ROSE; + srose.srose_addr = rose->dest_addr; + srose.srose_call = rose->dest_call; + srose.srose_ndigis = rose->dest_ndigis; + for (n = 0 ; n < rose->dest_ndigis ; n++) + srose.srose_digis[n] = rose->dest_digis[n]; + } + + /* Build a packet */ + /* Sanity check the packet size */ + if (len > 65535) + return -EMSGSIZE; + + size = len + AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN; + + if ((skb = sock_alloc_send_skb(sk, size, msg->msg_flags & MSG_DONTWAIT, &err)) == NULL) + return err; + + skb_reserve(skb, AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN); + + /* + * Put the data on the end + */ + + skb_reset_transport_header(skb); + skb_put(skb, len); + + err = memcpy_from_msg(skb_transport_header(skb), msg, len); + if (err) { + kfree_skb(skb); + return err; + } + + /* + * If the Q BIT Include socket option is in force, the first + * byte of the user data is the logical value of the Q Bit. + */ + if (rose->qbitincl) { + qbit = skb->data[0]; + skb_pull(skb, 1); + } + + /* + * Push down the ROSE header + */ + asmptr = skb_push(skb, ROSE_MIN_LEN); + + /* Build a ROSE Network header */ + asmptr[0] = ((rose->lci >> 8) & 0x0F) | ROSE_GFI; + asmptr[1] = (rose->lci >> 0) & 0xFF; + asmptr[2] = ROSE_DATA; + + if (qbit) + asmptr[0] |= ROSE_Q_BIT; + + if (sk->sk_state != TCP_ESTABLISHED) { + kfree_skb(skb); + return -ENOTCONN; + } + +#ifdef M_BIT +#define ROSE_PACLEN (256-ROSE_MIN_LEN) + if (skb->len - ROSE_MIN_LEN > ROSE_PACLEN) { + unsigned char header[ROSE_MIN_LEN]; + struct sk_buff *skbn; + int frontlen; + int lg; + + /* Save a copy of the Header */ + skb_copy_from_linear_data(skb, header, ROSE_MIN_LEN); + skb_pull(skb, ROSE_MIN_LEN); + + frontlen = skb_headroom(skb); + + while (skb->len > 0) { + if ((skbn = sock_alloc_send_skb(sk, frontlen + ROSE_PACLEN, 0, &err)) == NULL) { + kfree_skb(skb); + return err; + } + + skbn->sk = sk; + skbn->free = 1; + skbn->arp = 1; + + skb_reserve(skbn, frontlen); + + lg = (ROSE_PACLEN > skb->len) ? skb->len : ROSE_PACLEN; + + /* Copy the user data */ + skb_copy_from_linear_data(skb, skb_put(skbn, lg), lg); + skb_pull(skb, lg); + + /* Duplicate the Header */ + skb_push(skbn, ROSE_MIN_LEN); + skb_copy_to_linear_data(skbn, header, ROSE_MIN_LEN); + + if (skb->len > 0) + skbn->data[2] |= M_BIT; + + skb_queue_tail(&sk->sk_write_queue, skbn); /* Throw it on the queue */ + } + + skb->free = 1; + kfree_skb(skb); + } else { + skb_queue_tail(&sk->sk_write_queue, skb); /* Throw it on the queue */ + } +#else + skb_queue_tail(&sk->sk_write_queue, skb); /* Shove it onto the queue */ +#endif + + rose_kick(sk); + + return len; +} + + +static int rose_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, + int flags) +{ + struct sock *sk = sock->sk; + struct rose_sock *rose = rose_sk(sk); + size_t copied; + unsigned char *asmptr; + struct sk_buff *skb; + int n, er, qbit; + + /* + * This works for seqpacket too. The receiver has ordered the queue for + * us! We do one quick check first though + */ + if (sk->sk_state != TCP_ESTABLISHED) + return -ENOTCONN; + + /* Now we can treat all alike */ + if ((skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, flags & MSG_DONTWAIT, &er)) == NULL) + return er; + + qbit = (skb->data[0] & ROSE_Q_BIT) == ROSE_Q_BIT; + + skb_pull(skb, ROSE_MIN_LEN); + + if (rose->qbitincl) { + asmptr = skb_push(skb, 1); + *asmptr = qbit; + } + + skb_reset_transport_header(skb); + copied = skb->len; + + if (copied > size) { + copied = size; + msg->msg_flags |= MSG_TRUNC; + } + + skb_copy_datagram_msg(skb, 0, msg, copied); + + if (msg->msg_name) { + struct sockaddr_rose *srose; + DECLARE_SOCKADDR(struct full_sockaddr_rose *, full_srose, + msg->msg_name); + + memset(msg->msg_name, 0, sizeof(struct full_sockaddr_rose)); + srose = msg->msg_name; + srose->srose_family = AF_ROSE; + srose->srose_addr = rose->dest_addr; + srose->srose_call = rose->dest_call; + srose->srose_ndigis = rose->dest_ndigis; + for (n = 0 ; n < rose->dest_ndigis ; n++) + full_srose->srose_digis[n] = rose->dest_digis[n]; + msg->msg_namelen = sizeof(struct full_sockaddr_rose); + } + + skb_free_datagram(sk, skb); + + return copied; +} + + +static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) +{ + struct sock *sk = sock->sk; + struct rose_sock *rose = rose_sk(sk); + void __user *argp = (void __user *)arg; + + switch (cmd) { + case TIOCOUTQ: { + long amount; + + amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk); + if (amount < 0) + amount = 0; + return put_user(amount, (unsigned int __user *) argp); + } + + case TIOCINQ: { + struct sk_buff *skb; + long amount = 0L; + /* These two are safe on a single CPU system as only user tasks fiddle here */ + if ((skb = skb_peek(&sk->sk_receive_queue)) != NULL) + amount = skb->len; + return put_user(amount, (unsigned int __user *) argp); + } + + case SIOCGSTAMP: + return sock_get_timestamp(sk, (struct timeval __user *) argp); + + case SIOCGSTAMPNS: + return sock_get_timestampns(sk, (struct timespec __user *) argp); + + case SIOCGIFADDR: + case SIOCSIFADDR: + case SIOCGIFDSTADDR: + case SIOCSIFDSTADDR: + case SIOCGIFBRDADDR: + case SIOCSIFBRDADDR: + case SIOCGIFNETMASK: + case SIOCSIFNETMASK: + case SIOCGIFMETRIC: + case SIOCSIFMETRIC: + return -EINVAL; + + case SIOCADDRT: + case SIOCDELRT: + case SIOCRSCLRRT: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + return rose_rt_ioctl(cmd, argp); + + case SIOCRSGCAUSE: { + struct rose_cause_struct rose_cause; + rose_cause.cause = rose->cause; + rose_cause.diagnostic = rose->diagnostic; + return copy_to_user(argp, &rose_cause, sizeof(struct rose_cause_struct)) ? -EFAULT : 0; + } + + case SIOCRSSCAUSE: { + struct rose_cause_struct rose_cause; + if (copy_from_user(&rose_cause, argp, sizeof(struct rose_cause_struct))) + return -EFAULT; + rose->cause = rose_cause.cause; + rose->diagnostic = rose_cause.diagnostic; + return 0; + } + + case SIOCRSSL2CALL: + if (!capable(CAP_NET_ADMIN)) return -EPERM; + if (ax25cmp(&rose_callsign, &null_ax25_address) != 0) + ax25_listen_release(&rose_callsign, NULL); + if (copy_from_user(&rose_callsign, argp, sizeof(ax25_address))) + return -EFAULT; + if (ax25cmp(&rose_callsign, &null_ax25_address) != 0) + return ax25_listen_register(&rose_callsign, NULL); + + return 0; + + case SIOCRSGL2CALL: + return copy_to_user(argp, &rose_callsign, sizeof(ax25_address)) ? -EFAULT : 0; + + case SIOCRSACCEPT: + if (rose->state == ROSE_STATE_5) { + rose_write_internal(sk, ROSE_CALL_ACCEPTED); + rose_start_idletimer(sk); + rose->condition = 0x00; + rose->vs = 0; + rose->va = 0; + rose->vr = 0; + rose->vl = 0; + rose->state = ROSE_STATE_3; + } + return 0; + + default: + return -ENOIOCTLCMD; + } + + return 0; +} + +#ifdef CONFIG_PROC_FS +static void *rose_info_start(struct seq_file *seq, loff_t *pos) + __acquires(rose_list_lock) +{ + spin_lock_bh(&rose_list_lock); + return seq_hlist_start_head(&rose_list, *pos); +} + +static void *rose_info_next(struct seq_file *seq, void *v, loff_t *pos) +{ + return seq_hlist_next(v, &rose_list, pos); +} + +static void rose_info_stop(struct seq_file *seq, void *v) + __releases(rose_list_lock) +{ + spin_unlock_bh(&rose_list_lock); +} + +static int rose_info_show(struct seq_file *seq, void *v) +{ + char buf[11], rsbuf[11]; + + if (v == SEQ_START_TOKEN) + seq_puts(seq, + "dest_addr dest_call src_addr src_call dev lci neigh st vs vr va t t1 t2 t3 hb idle Snd-Q Rcv-Q inode\n"); + + else { + struct sock *s = sk_entry(v); + struct rose_sock *rose = rose_sk(s); + const char *devname, *callsign; + const struct net_device *dev = rose->device; + + if (!dev) + devname = "???"; + else + devname = dev->name; + + seq_printf(seq, "%-10s %-9s ", + rose2asc(rsbuf, &rose->dest_addr), + ax2asc(buf, &rose->dest_call)); + + if (ax25cmp(&rose->source_call, &null_ax25_address) == 0) + callsign = "??????-?"; + else + callsign = ax2asc(buf, &rose->source_call); + + seq_printf(seq, + "%-10s %-9s %-5s %3.3X %05d %d %d %d %d %3lu %3lu %3lu %3lu %3lu %3lu/%03lu %5d %5d %ld\n", + rose2asc(rsbuf, &rose->source_addr), + callsign, + devname, + rose->lci & 0x0FFF, + (rose->neighbour) ? rose->neighbour->number : 0, + rose->state, + rose->vs, + rose->vr, + rose->va, + ax25_display_timer(&rose->timer) / HZ, + rose->t1 / HZ, + rose->t2 / HZ, + rose->t3 / HZ, + rose->hb / HZ, + ax25_display_timer(&rose->idletimer) / (60 * HZ), + rose->idle / (60 * HZ), + sk_wmem_alloc_get(s), + sk_rmem_alloc_get(s), + s->sk_socket ? SOCK_INODE(s->sk_socket)->i_ino : 0L); + } + + return 0; +} + +static const struct seq_operations rose_info_seqops = { + .start = rose_info_start, + .next = rose_info_next, + .stop = rose_info_stop, + .show = rose_info_show, +}; +#endif /* CONFIG_PROC_FS */ + +static const struct net_proto_family rose_family_ops = { + .family = PF_ROSE, + .create = rose_create, + .owner = THIS_MODULE, +}; + +static const struct proto_ops rose_proto_ops = { + .family = PF_ROSE, + .owner = THIS_MODULE, + .release = rose_release, + .bind = rose_bind, + .connect = rose_connect, + .socketpair = sock_no_socketpair, + .accept = rose_accept, + .getname = rose_getname, + .poll = datagram_poll, + .ioctl = rose_ioctl, + .listen = rose_listen, + .shutdown = sock_no_shutdown, + .setsockopt = rose_setsockopt, + .getsockopt = rose_getsockopt, + .sendmsg = rose_sendmsg, + .recvmsg = rose_recvmsg, + .mmap = sock_no_mmap, + .sendpage = sock_no_sendpage, +}; + +static struct notifier_block rose_dev_notifier = { + .notifier_call = rose_device_event, +}; + +static struct net_device **dev_rose; + +static struct ax25_protocol rose_pid = { + .pid = AX25_P_ROSE, + .func = rose_route_frame +}; + +static struct ax25_linkfail rose_linkfail_notifier = { + .func = rose_link_failed +}; + +static int __init rose_proto_init(void) +{ + int i; + int rc; + + if (rose_ndevs > 0x7FFFFFFF/sizeof(struct net_device *)) { + printk(KERN_ERR "ROSE: rose_proto_init - rose_ndevs parameter to large\n"); + rc = -EINVAL; + goto out; + } + + rc = proto_register(&rose_proto, 0); + if (rc != 0) + goto out; + + rose_callsign = null_ax25_address; + + dev_rose = kcalloc(rose_ndevs, sizeof(struct net_device *), + GFP_KERNEL); + if (dev_rose == NULL) { + printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate device structure\n"); + rc = -ENOMEM; + goto out_proto_unregister; + } + + for (i = 0; i < rose_ndevs; i++) { + struct net_device *dev; + char name[IFNAMSIZ]; + + sprintf(name, "rose%d", i); + dev = alloc_netdev(0, name, NET_NAME_UNKNOWN, rose_setup); + if (!dev) { + printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate memory\n"); + rc = -ENOMEM; + goto fail; + } + rc = register_netdev(dev); + if (rc) { + printk(KERN_ERR "ROSE: netdevice registration failed\n"); + free_netdev(dev); + goto fail; + } + rose_set_lockdep_key(dev); + dev_rose[i] = dev; + } + + sock_register(&rose_family_ops); + register_netdevice_notifier(&rose_dev_notifier); + + ax25_register_pid(&rose_pid); + ax25_linkfail_register(&rose_linkfail_notifier); + +#ifdef CONFIG_SYSCTL + rose_register_sysctl(); +#endif + rose_loopback_init(); + + rose_add_loopback_neigh(); + + proc_create_seq("rose", 0444, init_net.proc_net, &rose_info_seqops); + proc_create_seq("rose_neigh", 0444, init_net.proc_net, + &rose_neigh_seqops); + proc_create_seq("rose_nodes", 0444, init_net.proc_net, + &rose_node_seqops); + proc_create_seq("rose_routes", 0444, init_net.proc_net, + &rose_route_seqops); +out: + return rc; +fail: + while (--i >= 0) { + unregister_netdev(dev_rose[i]); + free_netdev(dev_rose[i]); + } + kfree(dev_rose); +out_proto_unregister: + proto_unregister(&rose_proto); + goto out; +} +module_init(rose_proto_init); + +module_param(rose_ndevs, int, 0); +MODULE_PARM_DESC(rose_ndevs, "number of ROSE devices"); + +MODULE_AUTHOR("Jonathan Naylor G4KLX "); +MODULE_DESCRIPTION("The amateur radio ROSE network layer protocol"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS_NETPROTO(PF_ROSE); + +static void __exit rose_exit(void) +{ + int i; + + remove_proc_entry("rose", init_net.proc_net); + remove_proc_entry("rose_neigh", init_net.proc_net); + remove_proc_entry("rose_nodes", init_net.proc_net); + remove_proc_entry("rose_routes", init_net.proc_net); + rose_loopback_clear(); + + rose_rt_free(); + + ax25_protocol_release(AX25_P_ROSE); + ax25_linkfail_release(&rose_linkfail_notifier); + + if (ax25cmp(&rose_callsign, &null_ax25_address) != 0) + ax25_listen_release(&rose_callsign, NULL); + +#ifdef CONFIG_SYSCTL + rose_unregister_sysctl(); +#endif + unregister_netdevice_notifier(&rose_dev_notifier); + + sock_unregister(PF_ROSE); + + for (i = 0; i < rose_ndevs; i++) { + struct net_device *dev = dev_rose[i]; + + if (dev) { + unregister_netdev(dev); + free_netdev(dev); + } + } + + kfree(dev_rose); + proto_unregister(&rose_proto); +} + +module_exit(rose_exit); \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/af_rose.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/af_rose.c.yml new file mode 100644 index 00000000000..8337dfbfb68 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/af_rose.c.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + - Copyright (c) Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk) + - Copyright (c) Terry Dawson VK2KTJ (terry@animats.net) + - Copyright (c) Tomi Manninen OH2BNS (oh2bns@sral.fi) +holders: + - Jonathan Naylor G4KLX + - Alan Cox GW4PTS + - Terry Dawson VK2KTJ + - Tomi Manninen OH2BNS diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/rose_route.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/rose_route.c new file mode 100644 index 00000000000..29227a083de --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/rose_route.c @@ -0,0 +1,1329 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + * Copyright (C) Terry Dawson VK2KTJ (terry@animats.net) + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* For TIOCINQ/OUTQ */ +#include +#include +#include +#include +#include +#include +#include + +static unsigned int rose_neigh_no = 1; + +static struct rose_node *rose_node_list; +static DEFINE_SPINLOCK(rose_node_list_lock); +static struct rose_neigh *rose_neigh_list; +static DEFINE_SPINLOCK(rose_neigh_list_lock); +static struct rose_route *rose_route_list; +static DEFINE_SPINLOCK(rose_route_list_lock); + +struct rose_neigh *rose_loopback_neigh; + +/* + * Add a new route to a node, and in the process add the node and the + * neighbour if it is new. + */ +static int __must_check rose_add_node(struct rose_route_struct *rose_route, + struct net_device *dev) +{ + struct rose_node *rose_node, *rose_tmpn, *rose_tmpp; + struct rose_neigh *rose_neigh; + int i, res = 0; + + spin_lock_bh(&rose_node_list_lock); + spin_lock_bh(&rose_neigh_list_lock); + + rose_node = rose_node_list; + while (rose_node != NULL) { + if ((rose_node->mask == rose_route->mask) && + (rosecmpm(&rose_route->address, &rose_node->address, + rose_route->mask) == 0)) + break; + rose_node = rose_node->next; + } + + if (rose_node != NULL && rose_node->loopback) { + res = -EINVAL; + goto out; + } + + rose_neigh = rose_neigh_list; + while (rose_neigh != NULL) { + if (ax25cmp(&rose_route->neighbour, + &rose_neigh->callsign) == 0 && + rose_neigh->dev == dev) + break; + rose_neigh = rose_neigh->next; + } + + if (rose_neigh == NULL) { + rose_neigh = kmalloc(sizeof(*rose_neigh), GFP_ATOMIC); + if (rose_neigh == NULL) { + res = -ENOMEM; + goto out; + } + + rose_neigh->callsign = rose_route->neighbour; + rose_neigh->digipeat = NULL; + rose_neigh->ax25 = NULL; + rose_neigh->dev = dev; + rose_neigh->count = 0; + rose_neigh->use = 0; + rose_neigh->dce_mode = 0; + rose_neigh->loopback = 0; + rose_neigh->number = rose_neigh_no++; + rose_neigh->restarted = 0; + + skb_queue_head_init(&rose_neigh->queue); + + timer_setup(&rose_neigh->ftimer, NULL, 0); + timer_setup(&rose_neigh->t0timer, NULL, 0); + + if (rose_route->ndigis != 0) { + rose_neigh->digipeat = + kmalloc(sizeof(ax25_digi), GFP_ATOMIC); + if (rose_neigh->digipeat == NULL) { + kfree(rose_neigh); + res = -ENOMEM; + goto out; + } + + rose_neigh->digipeat->ndigi = rose_route->ndigis; + rose_neigh->digipeat->lastrepeat = -1; + + for (i = 0; i < rose_route->ndigis; i++) { + rose_neigh->digipeat->calls[i] = + rose_route->digipeaters[i]; + rose_neigh->digipeat->repeated[i] = 0; + } + } + + rose_neigh->next = rose_neigh_list; + rose_neigh_list = rose_neigh; + } + + /* + * This is a new node to be inserted into the list. Find where it needs + * to be inserted into the list, and insert it. We want to be sure + * to order the list in descending order of mask size to ensure that + * later when we are searching this list the first match will be the + * best match. + */ + if (rose_node == NULL) { + rose_tmpn = rose_node_list; + rose_tmpp = NULL; + + while (rose_tmpn != NULL) { + if (rose_tmpn->mask > rose_route->mask) { + rose_tmpp = rose_tmpn; + rose_tmpn = rose_tmpn->next; + } else { + break; + } + } + + /* create new node */ + rose_node = kmalloc(sizeof(*rose_node), GFP_ATOMIC); + if (rose_node == NULL) { + res = -ENOMEM; + goto out; + } + + rose_node->address = rose_route->address; + rose_node->mask = rose_route->mask; + rose_node->count = 1; + rose_node->loopback = 0; + rose_node->neighbour[0] = rose_neigh; + + if (rose_tmpn == NULL) { + if (rose_tmpp == NULL) { /* Empty list */ + rose_node_list = rose_node; + rose_node->next = NULL; + } else { + rose_tmpp->next = rose_node; + rose_node->next = NULL; + } + } else { + if (rose_tmpp == NULL) { /* 1st node */ + rose_node->next = rose_node_list; + rose_node_list = rose_node; + } else { + rose_tmpp->next = rose_node; + rose_node->next = rose_tmpn; + } + } + rose_neigh->count++; + + goto out; + } + + /* We have space, slot it in */ + if (rose_node->count < 3) { + rose_node->neighbour[rose_node->count] = rose_neigh; + rose_node->count++; + rose_neigh->count++; + } + +out: + spin_unlock_bh(&rose_neigh_list_lock); + spin_unlock_bh(&rose_node_list_lock); + + return res; +} + +/* + * Caller is holding rose_node_list_lock. + */ +static void rose_remove_node(struct rose_node *rose_node) +{ + struct rose_node *s; + + if ((s = rose_node_list) == rose_node) { + rose_node_list = rose_node->next; + kfree(rose_node); + return; + } + + while (s != NULL && s->next != NULL) { + if (s->next == rose_node) { + s->next = rose_node->next; + kfree(rose_node); + return; + } + + s = s->next; + } +} + +/* + * Caller is holding rose_neigh_list_lock. + */ +static void rose_remove_neigh(struct rose_neigh *rose_neigh) +{ + struct rose_neigh *s; + + rose_stop_ftimer(rose_neigh); + rose_stop_t0timer(rose_neigh); + + skb_queue_purge(&rose_neigh->queue); + + if ((s = rose_neigh_list) == rose_neigh) { + rose_neigh_list = rose_neigh->next; + if (rose_neigh->ax25) + ax25_cb_put(rose_neigh->ax25); + kfree(rose_neigh->digipeat); + kfree(rose_neigh); + return; + } + + while (s != NULL && s->next != NULL) { + if (s->next == rose_neigh) { + s->next = rose_neigh->next; + if (rose_neigh->ax25) + ax25_cb_put(rose_neigh->ax25); + kfree(rose_neigh->digipeat); + kfree(rose_neigh); + return; + } + + s = s->next; + } +} + +/* + * Caller is holding rose_route_list_lock. + */ +static void rose_remove_route(struct rose_route *rose_route) +{ + struct rose_route *s; + + if (rose_route->neigh1 != NULL) + rose_route->neigh1->use--; + + if (rose_route->neigh2 != NULL) + rose_route->neigh2->use--; + + if ((s = rose_route_list) == rose_route) { + rose_route_list = rose_route->next; + kfree(rose_route); + return; + } + + while (s != NULL && s->next != NULL) { + if (s->next == rose_route) { + s->next = rose_route->next; + kfree(rose_route); + return; + } + + s = s->next; + } +} + +/* + * "Delete" a node. Strictly speaking remove a route to a node. The node + * is only deleted if no routes are left to it. + */ +static int rose_del_node(struct rose_route_struct *rose_route, + struct net_device *dev) +{ + struct rose_node *rose_node; + struct rose_neigh *rose_neigh; + int i, err = 0; + + spin_lock_bh(&rose_node_list_lock); + spin_lock_bh(&rose_neigh_list_lock); + + rose_node = rose_node_list; + while (rose_node != NULL) { + if ((rose_node->mask == rose_route->mask) && + (rosecmpm(&rose_route->address, &rose_node->address, + rose_route->mask) == 0)) + break; + rose_node = rose_node->next; + } + + if (rose_node == NULL || rose_node->loopback) { + err = -EINVAL; + goto out; + } + + rose_neigh = rose_neigh_list; + while (rose_neigh != NULL) { + if (ax25cmp(&rose_route->neighbour, + &rose_neigh->callsign) == 0 && + rose_neigh->dev == dev) + break; + rose_neigh = rose_neigh->next; + } + + if (rose_neigh == NULL) { + err = -EINVAL; + goto out; + } + + for (i = 0; i < rose_node->count; i++) { + if (rose_node->neighbour[i] == rose_neigh) { + rose_neigh->count--; + + if (rose_neigh->count == 0 && rose_neigh->use == 0) + rose_remove_neigh(rose_neigh); + + rose_node->count--; + + if (rose_node->count == 0) { + rose_remove_node(rose_node); + } else { + switch (i) { + case 0: + rose_node->neighbour[0] = + rose_node->neighbour[1]; + /* fall through */ + case 1: + rose_node->neighbour[1] = + rose_node->neighbour[2]; + case 2: + break; + } + } + goto out; + } + } + err = -EINVAL; + +out: + spin_unlock_bh(&rose_neigh_list_lock); + spin_unlock_bh(&rose_node_list_lock); + + return err; +} + +/* + * Add the loopback neighbour. + */ +void rose_add_loopback_neigh(void) +{ + struct rose_neigh *sn; + + rose_loopback_neigh = kmalloc(sizeof(struct rose_neigh), GFP_KERNEL); + if (!rose_loopback_neigh) + return; + sn = rose_loopback_neigh; + + sn->callsign = null_ax25_address; + sn->digipeat = NULL; + sn->ax25 = NULL; + sn->dev = NULL; + sn->count = 0; + sn->use = 0; + sn->dce_mode = 1; + sn->loopback = 1; + sn->number = rose_neigh_no++; + sn->restarted = 1; + + skb_queue_head_init(&sn->queue); + + timer_setup(&sn->ftimer, NULL, 0); + timer_setup(&sn->t0timer, NULL, 0); + + spin_lock_bh(&rose_neigh_list_lock); + sn->next = rose_neigh_list; + rose_neigh_list = sn; + spin_unlock_bh(&rose_neigh_list_lock); +} + +/* + * Add a loopback node. + */ +int rose_add_loopback_node(rose_address *address) +{ + struct rose_node *rose_node; + int err = 0; + + spin_lock_bh(&rose_node_list_lock); + + rose_node = rose_node_list; + while (rose_node != NULL) { + if ((rose_node->mask == 10) && + (rosecmpm(address, &rose_node->address, 10) == 0) && + rose_node->loopback) + break; + rose_node = rose_node->next; + } + + if (rose_node != NULL) + goto out; + + if ((rose_node = kmalloc(sizeof(*rose_node), GFP_ATOMIC)) == NULL) { + err = -ENOMEM; + goto out; + } + + rose_node->address = *address; + rose_node->mask = 10; + rose_node->count = 1; + rose_node->loopback = 1; + rose_node->neighbour[0] = rose_loopback_neigh; + + /* Insert at the head of list. Address is always mask=10 */ + rose_node->next = rose_node_list; + rose_node_list = rose_node; + + rose_loopback_neigh->count++; + +out: + spin_unlock_bh(&rose_node_list_lock); + + return err; +} + +/* + * Delete a loopback node. + */ +void rose_del_loopback_node(rose_address *address) +{ + struct rose_node *rose_node; + + spin_lock_bh(&rose_node_list_lock); + + rose_node = rose_node_list; + while (rose_node != NULL) { + if ((rose_node->mask == 10) && + (rosecmpm(address, &rose_node->address, 10) == 0) && + rose_node->loopback) + break; + rose_node = rose_node->next; + } + + if (rose_node == NULL) + goto out; + + rose_remove_node(rose_node); + + rose_loopback_neigh->count--; + +out: + spin_unlock_bh(&rose_node_list_lock); +} + +/* + * A device has been removed. Remove its routes and neighbours. + */ +void rose_rt_device_down(struct net_device *dev) +{ + struct rose_neigh *s, *rose_neigh; + struct rose_node *t, *rose_node; + int i; + + spin_lock_bh(&rose_node_list_lock); + spin_lock_bh(&rose_neigh_list_lock); + rose_neigh = rose_neigh_list; + while (rose_neigh != NULL) { + s = rose_neigh; + rose_neigh = rose_neigh->next; + + if (s->dev != dev) + continue; + + rose_node = rose_node_list; + + while (rose_node != NULL) { + t = rose_node; + rose_node = rose_node->next; + + for (i = 0; i < t->count; i++) { + if (t->neighbour[i] != s) + continue; + + t->count--; + + switch (i) { + case 0: + t->neighbour[0] = t->neighbour[1]; + /* fall through */ + case 1: + t->neighbour[1] = t->neighbour[2]; + case 2: + break; + } + } + + if (t->count <= 0) + rose_remove_node(t); + } + + rose_remove_neigh(s); + } + spin_unlock_bh(&rose_neigh_list_lock); + spin_unlock_bh(&rose_node_list_lock); +} + +#if 0 /* Currently unused */ +/* + * A device has been removed. Remove its links. + */ +void rose_route_device_down(struct net_device *dev) +{ + struct rose_route *s, *rose_route; + + spin_lock_bh(&rose_route_list_lock); + rose_route = rose_route_list; + while (rose_route != NULL) { + s = rose_route; + rose_route = rose_route->next; + + if (s->neigh1->dev == dev || s->neigh2->dev == dev) + rose_remove_route(s); + } + spin_unlock_bh(&rose_route_list_lock); +} +#endif + +/* + * Clear all nodes and neighbours out, except for neighbours with + * active connections going through them. + * Do not clear loopback neighbour and nodes. + */ +static int rose_clear_routes(void) +{ + struct rose_neigh *s, *rose_neigh; + struct rose_node *t, *rose_node; + + spin_lock_bh(&rose_node_list_lock); + spin_lock_bh(&rose_neigh_list_lock); + + rose_neigh = rose_neigh_list; + rose_node = rose_node_list; + + while (rose_node != NULL) { + t = rose_node; + rose_node = rose_node->next; + if (!t->loopback) + rose_remove_node(t); + } + + while (rose_neigh != NULL) { + s = rose_neigh; + rose_neigh = rose_neigh->next; + + if (s->use == 0 && !s->loopback) { + s->count = 0; + rose_remove_neigh(s); + } + } + + spin_unlock_bh(&rose_neigh_list_lock); + spin_unlock_bh(&rose_node_list_lock); + + return 0; +} + +/* + * Check that the device given is a valid AX.25 interface that is "up". + * called with RTNL + */ +static struct net_device *rose_ax25_dev_find(char *devname) +{ + struct net_device *dev; + + if ((dev = __dev_get_by_name(&init_net, devname)) == NULL) + return NULL; + + if ((dev->flags & IFF_UP) && dev->type == ARPHRD_AX25) + return dev; + + return NULL; +} + +/* + * Find the first active ROSE device, usually "rose0". + */ +struct net_device *rose_dev_first(void) +{ + struct net_device *dev, *first = NULL; + + rcu_read_lock(); + for_each_netdev_rcu(&init_net, dev) { + if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE) + if (first == NULL || strncmp(dev->name, first->name, 3) < 0) + first = dev; + } + rcu_read_unlock(); + + return first; +} + +/* + * Find the ROSE device for the given address. + */ +struct net_device *rose_dev_get(rose_address *addr) +{ + struct net_device *dev; + + rcu_read_lock(); + for_each_netdev_rcu(&init_net, dev) { + if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE && rosecmp(addr, (rose_address *)dev->dev_addr) == 0) { + dev_hold(dev); + goto out; + } + } + dev = NULL; +out: + rcu_read_unlock(); + return dev; +} + +static int rose_dev_exists(rose_address *addr) +{ + struct net_device *dev; + + rcu_read_lock(); + for_each_netdev_rcu(&init_net, dev) { + if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE && rosecmp(addr, (rose_address *)dev->dev_addr) == 0) + goto out; + } + dev = NULL; +out: + rcu_read_unlock(); + return dev != NULL; +} + + +struct rose_route *rose_route_free_lci(unsigned int lci, struct rose_neigh *neigh) +{ + struct rose_route *rose_route; + + for (rose_route = rose_route_list; rose_route != NULL; rose_route = rose_route->next) + if ((rose_route->neigh1 == neigh && rose_route->lci1 == lci) || + (rose_route->neigh2 == neigh && rose_route->lci2 == lci)) + return rose_route; + + return NULL; +} + +/* + * Find a neighbour or a route given a ROSE address. + */ +struct rose_neigh *rose_get_neigh(rose_address *addr, unsigned char *cause, + unsigned char *diagnostic, int route_frame) +{ + struct rose_neigh *res = NULL; + struct rose_node *node; + int failed = 0; + int i; + + if (!route_frame) spin_lock_bh(&rose_node_list_lock); + for (node = rose_node_list; node != NULL; node = node->next) { + if (rosecmpm(addr, &node->address, node->mask) == 0) { + for (i = 0; i < node->count; i++) { + if (node->neighbour[i]->restarted) { + res = node->neighbour[i]; + goto out; + } + } + } + } + if (!route_frame) { /* connect request */ + for (node = rose_node_list; node != NULL; node = node->next) { + if (rosecmpm(addr, &node->address, node->mask) == 0) { + for (i = 0; i < node->count; i++) { + if (!rose_ftimer_running(node->neighbour[i])) { + res = node->neighbour[i]; + failed = 0; + goto out; + } + failed = 1; + } + } + } + } + + if (failed) { + *cause = ROSE_OUT_OF_ORDER; + *diagnostic = 0; + } else { + *cause = ROSE_NOT_OBTAINABLE; + *diagnostic = 0; + } + +out: + if (!route_frame) spin_unlock_bh(&rose_node_list_lock); + return res; +} + +/* + * Handle the ioctls that control the routing functions. + */ +int rose_rt_ioctl(unsigned int cmd, void __user *arg) +{ + struct rose_route_struct rose_route; + struct net_device *dev; + int err; + + switch (cmd) { + case SIOCADDRT: + if (copy_from_user(&rose_route, arg, sizeof(struct rose_route_struct))) + return -EFAULT; + if ((dev = rose_ax25_dev_find(rose_route.device)) == NULL) + return -EINVAL; + if (rose_dev_exists(&rose_route.address)) /* Can't add routes to ourself */ + return -EINVAL; + if (rose_route.mask > 10) /* Mask can't be more than 10 digits */ + return -EINVAL; + if (rose_route.ndigis > AX25_MAX_DIGIS) + return -EINVAL; + err = rose_add_node(&rose_route, dev); + return err; + + case SIOCDELRT: + if (copy_from_user(&rose_route, arg, sizeof(struct rose_route_struct))) + return -EFAULT; + if ((dev = rose_ax25_dev_find(rose_route.device)) == NULL) + return -EINVAL; + err = rose_del_node(&rose_route, dev); + return err; + + case SIOCRSCLRRT: + return rose_clear_routes(); + + default: + return -EINVAL; + } + + return 0; +} + +static void rose_del_route_by_neigh(struct rose_neigh *rose_neigh) +{ + struct rose_route *rose_route, *s; + + rose_neigh->restarted = 0; + + rose_stop_t0timer(rose_neigh); + rose_start_ftimer(rose_neigh); + + skb_queue_purge(&rose_neigh->queue); + + spin_lock_bh(&rose_route_list_lock); + + rose_route = rose_route_list; + + while (rose_route != NULL) { + if ((rose_route->neigh1 == rose_neigh && rose_route->neigh2 == rose_neigh) || + (rose_route->neigh1 == rose_neigh && rose_route->neigh2 == NULL) || + (rose_route->neigh2 == rose_neigh && rose_route->neigh1 == NULL)) { + s = rose_route->next; + rose_remove_route(rose_route); + rose_route = s; + continue; + } + + if (rose_route->neigh1 == rose_neigh) { + rose_route->neigh1->use--; + rose_route->neigh1 = NULL; + rose_transmit_clear_request(rose_route->neigh2, rose_route->lci2, ROSE_OUT_OF_ORDER, 0); + } + + if (rose_route->neigh2 == rose_neigh) { + rose_route->neigh2->use--; + rose_route->neigh2 = NULL; + rose_transmit_clear_request(rose_route->neigh1, rose_route->lci1, ROSE_OUT_OF_ORDER, 0); + } + + rose_route = rose_route->next; + } + spin_unlock_bh(&rose_route_list_lock); +} + +/* + * A level 2 link has timed out, therefore it appears to be a poor link, + * then don't use that neighbour until it is reset. Blow away all through + * routes and connections using this route. + */ +void rose_link_failed(ax25_cb *ax25, int reason) +{ + struct rose_neigh *rose_neigh; + + spin_lock_bh(&rose_neigh_list_lock); + rose_neigh = rose_neigh_list; + while (rose_neigh != NULL) { + if (rose_neigh->ax25 == ax25) + break; + rose_neigh = rose_neigh->next; + } + + if (rose_neigh != NULL) { + rose_neigh->ax25 = NULL; + ax25_cb_put(ax25); + + rose_del_route_by_neigh(rose_neigh); + rose_kill_by_neigh(rose_neigh); + } + spin_unlock_bh(&rose_neigh_list_lock); +} + +/* + * A device has been "downed" remove its link status. Blow away all + * through routes and connections that use this device. + */ +void rose_link_device_down(struct net_device *dev) +{ + struct rose_neigh *rose_neigh; + + for (rose_neigh = rose_neigh_list; rose_neigh != NULL; rose_neigh = rose_neigh->next) { + if (rose_neigh->dev == dev) { + rose_del_route_by_neigh(rose_neigh); + rose_kill_by_neigh(rose_neigh); + } + } +} + +/* + * Route a frame to an appropriate AX.25 connection. + * A NULL ax25_cb indicates an internally generated frame. + */ +int rose_route_frame(struct sk_buff *skb, ax25_cb *ax25) +{ + struct rose_neigh *rose_neigh, *new_neigh; + struct rose_route *rose_route; + struct rose_facilities_struct facilities; + rose_address *src_addr, *dest_addr; + struct sock *sk; + unsigned short frametype; + unsigned int lci, new_lci; + unsigned char cause, diagnostic; + struct net_device *dev; + int res = 0; + char buf[11]; + + if (skb->len < ROSE_MIN_LEN) + return res; + + if (!ax25) + return rose_loopback_queue(skb, NULL); + + frametype = skb->data[2]; + lci = ((skb->data[0] << 8) & 0xF00) + ((skb->data[1] << 0) & 0x0FF); + if (frametype == ROSE_CALL_REQUEST && + (skb->len <= ROSE_CALL_REQ_FACILITIES_OFF || + skb->data[ROSE_CALL_REQ_ADDR_LEN_OFF] != + ROSE_CALL_REQ_ADDR_LEN_VAL)) + return res; + src_addr = (rose_address *)(skb->data + ROSE_CALL_REQ_SRC_ADDR_OFF); + dest_addr = (rose_address *)(skb->data + ROSE_CALL_REQ_DEST_ADDR_OFF); + + spin_lock_bh(&rose_neigh_list_lock); + spin_lock_bh(&rose_route_list_lock); + + rose_neigh = rose_neigh_list; + while (rose_neigh != NULL) { + if (ax25cmp(&ax25->dest_addr, &rose_neigh->callsign) == 0 && + ax25->ax25_dev->dev == rose_neigh->dev) + break; + rose_neigh = rose_neigh->next; + } + + if (rose_neigh == NULL) { + printk("rose_route : unknown neighbour or device %s\n", + ax2asc(buf, &ax25->dest_addr)); + goto out; + } + + /* + * Obviously the link is working, halt the ftimer. + */ + rose_stop_ftimer(rose_neigh); + + /* + * LCI of zero is always for us, and its always a restart + * frame. + */ + if (lci == 0) { + rose_link_rx_restart(skb, rose_neigh, frametype); + goto out; + } + + /* + * Find an existing socket. + */ + if ((sk = rose_find_socket(lci, rose_neigh)) != NULL) { + if (frametype == ROSE_CALL_REQUEST) { + struct rose_sock *rose = rose_sk(sk); + + /* Remove an existing unused socket */ + rose_clear_queues(sk); + rose->cause = ROSE_NETWORK_CONGESTION; + rose->diagnostic = 0; + rose->neighbour->use--; + rose->neighbour = NULL; + rose->lci = 0; + rose->state = ROSE_STATE_0; + sk->sk_state = TCP_CLOSE; + sk->sk_err = 0; + sk->sk_shutdown |= SEND_SHUTDOWN; + if (!sock_flag(sk, SOCK_DEAD)) { + sk->sk_state_change(sk); + sock_set_flag(sk, SOCK_DEAD); + } + } + else { + skb_reset_transport_header(skb); + res = rose_process_rx_frame(sk, skb); + goto out; + } + } + + /* + * Is is a Call Request and is it for us ? + */ + if (frametype == ROSE_CALL_REQUEST) + if ((dev = rose_dev_get(dest_addr)) != NULL) { + res = rose_rx_call_request(skb, dev, rose_neigh, lci); + dev_put(dev); + goto out; + } + + if (!sysctl_rose_routing_control) { + rose_transmit_clear_request(rose_neigh, lci, ROSE_NOT_OBTAINABLE, 0); + goto out; + } + + /* + * Route it to the next in line if we have an entry for it. + */ + rose_route = rose_route_list; + while (rose_route != NULL) { + if (rose_route->lci1 == lci && + rose_route->neigh1 == rose_neigh) { + if (frametype == ROSE_CALL_REQUEST) { + /* F6FBB - Remove an existing unused route */ + rose_remove_route(rose_route); + break; + } else if (rose_route->neigh2 != NULL) { + skb->data[0] &= 0xF0; + skb->data[0] |= (rose_route->lci2 >> 8) & 0x0F; + skb->data[1] = (rose_route->lci2 >> 0) & 0xFF; + rose_transmit_link(skb, rose_route->neigh2); + if (frametype == ROSE_CLEAR_CONFIRMATION) + rose_remove_route(rose_route); + res = 1; + goto out; + } else { + if (frametype == ROSE_CLEAR_CONFIRMATION) + rose_remove_route(rose_route); + goto out; + } + } + if (rose_route->lci2 == lci && + rose_route->neigh2 == rose_neigh) { + if (frametype == ROSE_CALL_REQUEST) { + /* F6FBB - Remove an existing unused route */ + rose_remove_route(rose_route); + break; + } else if (rose_route->neigh1 != NULL) { + skb->data[0] &= 0xF0; + skb->data[0] |= (rose_route->lci1 >> 8) & 0x0F; + skb->data[1] = (rose_route->lci1 >> 0) & 0xFF; + rose_transmit_link(skb, rose_route->neigh1); + if (frametype == ROSE_CLEAR_CONFIRMATION) + rose_remove_route(rose_route); + res = 1; + goto out; + } else { + if (frametype == ROSE_CLEAR_CONFIRMATION) + rose_remove_route(rose_route); + goto out; + } + } + rose_route = rose_route->next; + } + + /* + * We know that: + * 1. The frame isn't for us, + * 2. It isn't "owned" by any existing route. + */ + if (frametype != ROSE_CALL_REQUEST) { /* XXX */ + res = 0; + goto out; + } + + memset(&facilities, 0x00, sizeof(struct rose_facilities_struct)); + + if (!rose_parse_facilities(skb->data + ROSE_CALL_REQ_FACILITIES_OFF, + skb->len - ROSE_CALL_REQ_FACILITIES_OFF, + &facilities)) { + rose_transmit_clear_request(rose_neigh, lci, ROSE_INVALID_FACILITY, 76); + goto out; + } + + /* + * Check for routing loops. + */ + rose_route = rose_route_list; + while (rose_route != NULL) { + if (rose_route->rand == facilities.rand && + rosecmp(src_addr, &rose_route->src_addr) == 0 && + ax25cmp(&facilities.dest_call, &rose_route->src_call) == 0 && + ax25cmp(&facilities.source_call, &rose_route->dest_call) == 0) { + rose_transmit_clear_request(rose_neigh, lci, ROSE_NOT_OBTAINABLE, 120); + goto out; + } + rose_route = rose_route->next; + } + + if ((new_neigh = rose_get_neigh(dest_addr, &cause, &diagnostic, 1)) == NULL) { + rose_transmit_clear_request(rose_neigh, lci, cause, diagnostic); + goto out; + } + + if ((new_lci = rose_new_lci(new_neigh)) == 0) { + rose_transmit_clear_request(rose_neigh, lci, ROSE_NETWORK_CONGESTION, 71); + goto out; + } + + if ((rose_route = kmalloc(sizeof(*rose_route), GFP_ATOMIC)) == NULL) { + rose_transmit_clear_request(rose_neigh, lci, ROSE_NETWORK_CONGESTION, 120); + goto out; + } + + rose_route->lci1 = lci; + rose_route->src_addr = *src_addr; + rose_route->dest_addr = *dest_addr; + rose_route->src_call = facilities.dest_call; + rose_route->dest_call = facilities.source_call; + rose_route->rand = facilities.rand; + rose_route->neigh1 = rose_neigh; + rose_route->lci2 = new_lci; + rose_route->neigh2 = new_neigh; + + rose_route->neigh1->use++; + rose_route->neigh2->use++; + + rose_route->next = rose_route_list; + rose_route_list = rose_route; + + skb->data[0] &= 0xF0; + skb->data[0] |= (rose_route->lci2 >> 8) & 0x0F; + skb->data[1] = (rose_route->lci2 >> 0) & 0xFF; + + rose_transmit_link(skb, rose_route->neigh2); + res = 1; + +out: + spin_unlock_bh(&rose_route_list_lock); + spin_unlock_bh(&rose_neigh_list_lock); + + return res; +} + +#ifdef CONFIG_PROC_FS + +static void *rose_node_start(struct seq_file *seq, loff_t *pos) + __acquires(rose_node_list_lock) +{ + struct rose_node *rose_node; + int i = 1; + + spin_lock_bh(&rose_node_list_lock); + if (*pos == 0) + return SEQ_START_TOKEN; + + for (rose_node = rose_node_list; rose_node && i < *pos; + rose_node = rose_node->next, ++i); + + return (i == *pos) ? rose_node : NULL; +} + +static void *rose_node_next(struct seq_file *seq, void *v, loff_t *pos) +{ + ++*pos; + + return (v == SEQ_START_TOKEN) ? rose_node_list + : ((struct rose_node *)v)->next; +} + +static void rose_node_stop(struct seq_file *seq, void *v) + __releases(rose_node_list_lock) +{ + spin_unlock_bh(&rose_node_list_lock); +} + +static int rose_node_show(struct seq_file *seq, void *v) +{ + char rsbuf[11]; + int i; + + if (v == SEQ_START_TOKEN) + seq_puts(seq, "address mask n neigh neigh neigh\n"); + else { + const struct rose_node *rose_node = v; + /* if (rose_node->loopback) { + seq_printf(seq, "%-10s %04d 1 loopback\n", + rose2asc(rsbuf, &rose_node->address), + rose_node->mask); + } else { */ + seq_printf(seq, "%-10s %04d %d", + rose2asc(rsbuf, &rose_node->address), + rose_node->mask, + rose_node->count); + + for (i = 0; i < rose_node->count; i++) + seq_printf(seq, " %05d", + rose_node->neighbour[i]->number); + + seq_puts(seq, "\n"); + /* } */ + } + return 0; +} + +const struct seq_operations rose_node_seqops = { + .start = rose_node_start, + .next = rose_node_next, + .stop = rose_node_stop, + .show = rose_node_show, +}; + +static void *rose_neigh_start(struct seq_file *seq, loff_t *pos) + __acquires(rose_neigh_list_lock) +{ + struct rose_neigh *rose_neigh; + int i = 1; + + spin_lock_bh(&rose_neigh_list_lock); + if (*pos == 0) + return SEQ_START_TOKEN; + + for (rose_neigh = rose_neigh_list; rose_neigh && i < *pos; + rose_neigh = rose_neigh->next, ++i); + + return (i == *pos) ? rose_neigh : NULL; +} + +static void *rose_neigh_next(struct seq_file *seq, void *v, loff_t *pos) +{ + ++*pos; + + return (v == SEQ_START_TOKEN) ? rose_neigh_list + : ((struct rose_neigh *)v)->next; +} + +static void rose_neigh_stop(struct seq_file *seq, void *v) + __releases(rose_neigh_list_lock) +{ + spin_unlock_bh(&rose_neigh_list_lock); +} + +static int rose_neigh_show(struct seq_file *seq, void *v) +{ + char buf[11]; + int i; + + if (v == SEQ_START_TOKEN) + seq_puts(seq, + "addr callsign dev count use mode restart t0 tf digipeaters\n"); + else { + struct rose_neigh *rose_neigh = v; + + /* if (!rose_neigh->loopback) { */ + seq_printf(seq, "%05d %-9s %-4s %3d %3d %3s %3s %3lu %3lu", + rose_neigh->number, + (rose_neigh->loopback) ? "RSLOOP-0" : ax2asc(buf, &rose_neigh->callsign), + rose_neigh->dev ? rose_neigh->dev->name : "???", + rose_neigh->count, + rose_neigh->use, + (rose_neigh->dce_mode) ? "DCE" : "DTE", + (rose_neigh->restarted) ? "yes" : "no", + ax25_display_timer(&rose_neigh->t0timer) / HZ, + ax25_display_timer(&rose_neigh->ftimer) / HZ); + + if (rose_neigh->digipeat != NULL) { + for (i = 0; i < rose_neigh->digipeat->ndigi; i++) + seq_printf(seq, " %s", ax2asc(buf, &rose_neigh->digipeat->calls[i])); + } + + seq_puts(seq, "\n"); + } + return 0; +} + + +const struct seq_operations rose_neigh_seqops = { + .start = rose_neigh_start, + .next = rose_neigh_next, + .stop = rose_neigh_stop, + .show = rose_neigh_show, +}; + +static void *rose_route_start(struct seq_file *seq, loff_t *pos) + __acquires(rose_route_list_lock) +{ + struct rose_route *rose_route; + int i = 1; + + spin_lock_bh(&rose_route_list_lock); + if (*pos == 0) + return SEQ_START_TOKEN; + + for (rose_route = rose_route_list; rose_route && i < *pos; + rose_route = rose_route->next, ++i); + + return (i == *pos) ? rose_route : NULL; +} + +static void *rose_route_next(struct seq_file *seq, void *v, loff_t *pos) +{ + ++*pos; + + return (v == SEQ_START_TOKEN) ? rose_route_list + : ((struct rose_route *)v)->next; +} + +static void rose_route_stop(struct seq_file *seq, void *v) + __releases(rose_route_list_lock) +{ + spin_unlock_bh(&rose_route_list_lock); +} + +static int rose_route_show(struct seq_file *seq, void *v) +{ + char buf[11], rsbuf[11]; + + if (v == SEQ_START_TOKEN) + seq_puts(seq, + "lci address callsign neigh <-> lci address callsign neigh\n"); + else { + struct rose_route *rose_route = v; + + if (rose_route->neigh1) + seq_printf(seq, + "%3.3X %-10s %-9s %05d ", + rose_route->lci1, + rose2asc(rsbuf, &rose_route->src_addr), + ax2asc(buf, &rose_route->src_call), + rose_route->neigh1->number); + else + seq_puts(seq, + "000 * * 00000 "); + + if (rose_route->neigh2) + seq_printf(seq, + "%3.3X %-10s %-9s %05d\n", + rose_route->lci2, + rose2asc(rsbuf, &rose_route->dest_addr), + ax2asc(buf, &rose_route->dest_call), + rose_route->neigh2->number); + else + seq_puts(seq, + "000 * * 00000\n"); + } + return 0; +} + +struct seq_operations rose_route_seqops = { + .start = rose_route_start, + .next = rose_route_next, + .stop = rose_route_stop, + .show = rose_route_show, +}; +#endif /* CONFIG_PROC_FS */ + +/* + * Release all memory associated with ROSE routing structures. + */ +void __exit rose_rt_free(void) +{ + struct rose_neigh *s, *rose_neigh = rose_neigh_list; + struct rose_node *t, *rose_node = rose_node_list; + struct rose_route *u, *rose_route = rose_route_list; + + while (rose_neigh != NULL) { + s = rose_neigh; + rose_neigh = rose_neigh->next; + + rose_remove_neigh(s); + } + + while (rose_node != NULL) { + t = rose_node; + rose_node = rose_node->next; + + rose_remove_node(t); + } + + while (rose_route != NULL) { + u = rose_route; + rose_route = rose_route->next; + + rose_remove_route(u); + } +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/rose_route.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/rose_route.c.yml new file mode 100644 index 00000000000..6ab99cfdb7e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/rose_route.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + - Copyright (c) Terry Dawson VK2KTJ (terry@animats.net) +holders: + - Jonathan Naylor G4KLX + - Terry Dawson VK2KTJ diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/rose_timer.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/rose_timer.c new file mode 100644 index 00000000000..17e603d08cd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/rose_timer.c @@ -0,0 +1,211 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + * Copyright (C) 2002 Ralf Baechle DO1GRB (ralf@gnu.org) + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void rose_heartbeat_expiry(struct timer_list *t); +static void rose_timer_expiry(struct timer_list *); +static void rose_idletimer_expiry(struct timer_list *); + +void rose_start_heartbeat(struct sock *sk) +{ + del_timer(&sk->sk_timer); + + sk->sk_timer.function = rose_heartbeat_expiry; + sk->sk_timer.expires = jiffies + 5 * HZ; + + add_timer(&sk->sk_timer); +} + +void rose_start_t1timer(struct sock *sk) +{ + struct rose_sock *rose = rose_sk(sk); + + del_timer(&rose->timer); + + rose->timer.function = rose_timer_expiry; + rose->timer.expires = jiffies + rose->t1; + + add_timer(&rose->timer); +} + +void rose_start_t2timer(struct sock *sk) +{ + struct rose_sock *rose = rose_sk(sk); + + del_timer(&rose->timer); + + rose->timer.function = rose_timer_expiry; + rose->timer.expires = jiffies + rose->t2; + + add_timer(&rose->timer); +} + +void rose_start_t3timer(struct sock *sk) +{ + struct rose_sock *rose = rose_sk(sk); + + del_timer(&rose->timer); + + rose->timer.function = rose_timer_expiry; + rose->timer.expires = jiffies + rose->t3; + + add_timer(&rose->timer); +} + +void rose_start_hbtimer(struct sock *sk) +{ + struct rose_sock *rose = rose_sk(sk); + + del_timer(&rose->timer); + + rose->timer.function = rose_timer_expiry; + rose->timer.expires = jiffies + rose->hb; + + add_timer(&rose->timer); +} + +void rose_start_idletimer(struct sock *sk) +{ + struct rose_sock *rose = rose_sk(sk); + + del_timer(&rose->idletimer); + + if (rose->idle > 0) { + rose->idletimer.function = rose_idletimer_expiry; + rose->idletimer.expires = jiffies + rose->idle; + + add_timer(&rose->idletimer); + } +} + +void rose_stop_heartbeat(struct sock *sk) +{ + del_timer(&sk->sk_timer); +} + +void rose_stop_timer(struct sock *sk) +{ + del_timer(&rose_sk(sk)->timer); +} + +void rose_stop_idletimer(struct sock *sk) +{ + del_timer(&rose_sk(sk)->idletimer); +} + +static void rose_heartbeat_expiry(struct timer_list *t) +{ + struct sock *sk = from_timer(sk, t, sk_timer); + struct rose_sock *rose = rose_sk(sk); + + bh_lock_sock(sk); + switch (rose->state) { + case ROSE_STATE_0: + /* Magic here: If we listen() and a new link dies before it + is accepted() it isn't 'dead' so doesn't get removed. */ + if (sock_flag(sk, SOCK_DESTROY) || + (sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD))) { + bh_unlock_sock(sk); + rose_destroy_socket(sk); + return; + } + break; + + case ROSE_STATE_3: + /* + * Check for the state of the receive buffer. + */ + if (atomic_read(&sk->sk_rmem_alloc) < (sk->sk_rcvbuf / 2) && + (rose->condition & ROSE_COND_OWN_RX_BUSY)) { + rose->condition &= ~ROSE_COND_OWN_RX_BUSY; + rose->condition &= ~ROSE_COND_ACK_PENDING; + rose->vl = rose->vr; + rose_write_internal(sk, ROSE_RR); + rose_stop_timer(sk); /* HB */ + break; + } + break; + } + + rose_start_heartbeat(sk); + bh_unlock_sock(sk); +} + +static void rose_timer_expiry(struct timer_list *t) +{ + struct rose_sock *rose = from_timer(rose, t, timer); + struct sock *sk = &rose->sock; + + bh_lock_sock(sk); + switch (rose->state) { + case ROSE_STATE_1: /* T1 */ + case ROSE_STATE_4: /* T2 */ + rose_write_internal(sk, ROSE_CLEAR_REQUEST); + rose->state = ROSE_STATE_2; + rose_start_t3timer(sk); + break; + + case ROSE_STATE_2: /* T3 */ + rose->neighbour->use--; + rose_disconnect(sk, ETIMEDOUT, -1, -1); + break; + + case ROSE_STATE_3: /* HB */ + if (rose->condition & ROSE_COND_ACK_PENDING) { + rose->condition &= ~ROSE_COND_ACK_PENDING; + rose_enquiry_response(sk); + } + break; + } + bh_unlock_sock(sk); +} + +static void rose_idletimer_expiry(struct timer_list *t) +{ + struct rose_sock *rose = from_timer(rose, t, idletimer); + struct sock *sk = &rose->sock; + + bh_lock_sock(sk); + rose_clear_queues(sk); + + rose_write_internal(sk, ROSE_CLEAR_REQUEST); + rose_sk(sk)->state = ROSE_STATE_2; + + rose_start_t3timer(sk); + + sk->sk_state = TCP_CLOSE; + sk->sk_err = 0; + sk->sk_shutdown |= SEND_SHUTDOWN; + + if (!sock_flag(sk, SOCK_DEAD)) { + sk->sk_state_change(sk); + sock_set_flag(sk, SOCK_DEAD); + } + bh_unlock_sock(sk); +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/rose_timer.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/rose_timer.c.yml new file mode 100644 index 00000000000..232c779ccfd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/rose/rose_timer.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) + - Copyright (c) 2002 Ralf Baechle DO1GRB (ralf@gnu.org) +holders: + - Jonathan Naylor G4KLX + - Ralf Baechle DO1GRB diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/sunrpc/xprtsock.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/sunrpc/xprtsock.c new file mode 100644 index 00000000000..f8d8673ddc2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/sunrpc/xprtsock.c @@ -0,0 +1,3377 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * linux/net/sunrpc/xprtsock.c + * + * Client-side transport implementation for sockets. + * + * TCP callback races fixes (C) 1998 Red Hat + * TCP send fixes (C) 1998 Red Hat + * TCP NFS related read + write fixes + * (C) 1999 Dave Airlie, University of Limerick, Ireland + * + * Rewrite of larges part of the code in order to stabilize TCP stuff. + * Fix behaviour when socket buffer is full. + * (C) 1999 Trond Myklebust + * + * IP socket transport implementation, (C) 2005 Chuck Lever + * + * IPv6 support contributed by Gilles Quillard, Bull Open Source, 2005. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef CONFIG_SUNRPC_BACKCHANNEL +#include +#endif + +#include +#include +#include +#include + +#include + +#include "sunrpc.h" + +#define RPC_TCP_READ_CHUNK_SZ (3*512*1024) + +static void xs_close(struct rpc_xprt *xprt); +static void xs_tcp_set_socket_timeouts(struct rpc_xprt *xprt, + struct socket *sock); + +/* + * xprtsock tunables + */ +static unsigned int xprt_udp_slot_table_entries = RPC_DEF_SLOT_TABLE; +static unsigned int xprt_tcp_slot_table_entries = RPC_MIN_SLOT_TABLE; +static unsigned int xprt_max_tcp_slot_table_entries = RPC_MAX_SLOT_TABLE; + +static unsigned int xprt_min_resvport = RPC_DEF_MIN_RESVPORT; +static unsigned int xprt_max_resvport = RPC_DEF_MAX_RESVPORT; + +#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) + +#define XS_TCP_LINGER_TO (15U * HZ) +static unsigned int xs_tcp_fin_timeout __read_mostly = XS_TCP_LINGER_TO; + +/* + * We can register our own files under /proc/sys/sunrpc by + * calling register_sysctl_table() again. The files in that + * directory become the union of all files registered there. + * + * We simply need to make sure that we don't collide with + * someone else's file names! + */ + +static unsigned int min_slot_table_size = RPC_MIN_SLOT_TABLE; +static unsigned int max_slot_table_size = RPC_MAX_SLOT_TABLE; +static unsigned int max_tcp_slot_table_limit = RPC_MAX_SLOT_TABLE_LIMIT; +static unsigned int xprt_min_resvport_limit = RPC_MIN_RESVPORT; +static unsigned int xprt_max_resvport_limit = RPC_MAX_RESVPORT; + +static struct ctl_table_header *sunrpc_table_header; + +/* + * FIXME: changing the UDP slot table size should also resize the UDP + * socket buffers for existing UDP transports + */ +static struct ctl_table xs_tunables_table[] = { + { + .procname = "udp_slot_table_entries", + .data = &xprt_udp_slot_table_entries, + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = proc_dointvec_minmax, + .extra1 = &min_slot_table_size, + .extra2 = &max_slot_table_size + }, + { + .procname = "tcp_slot_table_entries", + .data = &xprt_tcp_slot_table_entries, + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = proc_dointvec_minmax, + .extra1 = &min_slot_table_size, + .extra2 = &max_slot_table_size + }, + { + .procname = "tcp_max_slot_table_entries", + .data = &xprt_max_tcp_slot_table_entries, + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = proc_dointvec_minmax, + .extra1 = &min_slot_table_size, + .extra2 = &max_tcp_slot_table_limit + }, + { + .procname = "min_resvport", + .data = &xprt_min_resvport, + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = proc_dointvec_minmax, + .extra1 = &xprt_min_resvport_limit, + .extra2 = &xprt_max_resvport + }, + { + .procname = "max_resvport", + .data = &xprt_max_resvport, + .maxlen = sizeof(unsigned int), + .mode = 0644, + .proc_handler = proc_dointvec_minmax, + .extra1 = &xprt_min_resvport, + .extra2 = &xprt_max_resvport_limit + }, + { + .procname = "tcp_fin_timeout", + .data = &xs_tcp_fin_timeout, + .maxlen = sizeof(xs_tcp_fin_timeout), + .mode = 0644, + .proc_handler = proc_dointvec_jiffies, + }, + { }, +}; + +static struct ctl_table sunrpc_table[] = { + { + .procname = "sunrpc", + .mode = 0555, + .child = xs_tunables_table + }, + { }, +}; + +#endif + +/* + * Wait duration for a reply from the RPC portmapper. + */ +#define XS_BIND_TO (60U * HZ) + +/* + * Delay if a UDP socket connect error occurs. This is most likely some + * kind of resource problem on the local host. + */ +#define XS_UDP_REEST_TO (2U * HZ) + +/* + * The reestablish timeout allows clients to delay for a bit before attempting + * to reconnect to a server that just dropped our connection. + * + * We implement an exponential backoff when trying to reestablish a TCP + * transport connection with the server. Some servers like to drop a TCP + * connection when they are overworked, so we start with a short timeout and + * increase over time if the server is down or not responding. + */ +#define XS_TCP_INIT_REEST_TO (3U * HZ) + +/* + * TCP idle timeout; client drops the transport socket if it is idle + * for this long. Note that we also timeout UDP sockets to prevent + * holding port numbers when there is no RPC traffic. + */ +#define XS_IDLE_DISC_TO (5U * 60 * HZ) + +#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) +# undef RPC_DEBUG_DATA +# define RPCDBG_FACILITY RPCDBG_TRANS +#endif + +#ifdef RPC_DEBUG_DATA +static void xs_pktdump(char *msg, u32 *packet, unsigned int count) +{ + u8 *buf = (u8 *) packet; + int j; + + dprintk("RPC: %s\n", msg); + for (j = 0; j < count && j < 128; j += 4) { + if (!(j & 31)) { + if (j) + dprintk("\n"); + dprintk("0x%04x ", j); + } + dprintk("%02x%02x%02x%02x ", + buf[j], buf[j+1], buf[j+2], buf[j+3]); + } + dprintk("\n"); +} +#else +static inline void xs_pktdump(char *msg, u32 *packet, unsigned int count) +{ + /* NOP */ +} +#endif + +static inline struct rpc_xprt *xprt_from_sock(struct sock *sk) +{ + return (struct rpc_xprt *) sk->sk_user_data; +} + +static inline struct sockaddr *xs_addr(struct rpc_xprt *xprt) +{ + return (struct sockaddr *) &xprt->addr; +} + +static inline struct sockaddr_un *xs_addr_un(struct rpc_xprt *xprt) +{ + return (struct sockaddr_un *) &xprt->addr; +} + +static inline struct sockaddr_in *xs_addr_in(struct rpc_xprt *xprt) +{ + return (struct sockaddr_in *) &xprt->addr; +} + +static inline struct sockaddr_in6 *xs_addr_in6(struct rpc_xprt *xprt) +{ + return (struct sockaddr_in6 *) &xprt->addr; +} + +static void xs_format_common_peer_addresses(struct rpc_xprt *xprt) +{ + struct sockaddr *sap = xs_addr(xprt); + struct sockaddr_in6 *sin6; + struct sockaddr_in *sin; + struct sockaddr_un *sun; + char buf[128]; + + switch (sap->sa_family) { + case AF_LOCAL: + sun = xs_addr_un(xprt); + strlcpy(buf, sun->sun_path, sizeof(buf)); + xprt->address_strings[RPC_DISPLAY_ADDR] = + kstrdup(buf, GFP_KERNEL); + break; + case AF_INET: + (void)rpc_ntop(sap, buf, sizeof(buf)); + xprt->address_strings[RPC_DISPLAY_ADDR] = + kstrdup(buf, GFP_KERNEL); + sin = xs_addr_in(xprt); + snprintf(buf, sizeof(buf), "%08x", ntohl(sin->sin_addr.s_addr)); + break; + case AF_INET6: + (void)rpc_ntop(sap, buf, sizeof(buf)); + xprt->address_strings[RPC_DISPLAY_ADDR] = + kstrdup(buf, GFP_KERNEL); + sin6 = xs_addr_in6(xprt); + snprintf(buf, sizeof(buf), "%pi6", &sin6->sin6_addr); + break; + default: + BUG(); + } + + xprt->address_strings[RPC_DISPLAY_HEX_ADDR] = kstrdup(buf, GFP_KERNEL); +} + +static void xs_format_common_peer_ports(struct rpc_xprt *xprt) +{ + struct sockaddr *sap = xs_addr(xprt); + char buf[128]; + + snprintf(buf, sizeof(buf), "%u", rpc_get_port(sap)); + xprt->address_strings[RPC_DISPLAY_PORT] = kstrdup(buf, GFP_KERNEL); + + snprintf(buf, sizeof(buf), "%4hx", rpc_get_port(sap)); + xprt->address_strings[RPC_DISPLAY_HEX_PORT] = kstrdup(buf, GFP_KERNEL); +} + +static void xs_format_peer_addresses(struct rpc_xprt *xprt, + const char *protocol, + const char *netid) +{ + xprt->address_strings[RPC_DISPLAY_PROTO] = protocol; + xprt->address_strings[RPC_DISPLAY_NETID] = netid; + xs_format_common_peer_addresses(xprt); + xs_format_common_peer_ports(xprt); +} + +static void xs_update_peer_port(struct rpc_xprt *xprt) +{ + kfree(xprt->address_strings[RPC_DISPLAY_HEX_PORT]); + kfree(xprt->address_strings[RPC_DISPLAY_PORT]); + + xs_format_common_peer_ports(xprt); +} + +static void xs_free_peer_addresses(struct rpc_xprt *xprt) +{ + unsigned int i; + + for (i = 0; i < RPC_DISPLAY_MAX; i++) + switch (i) { + case RPC_DISPLAY_PROTO: + case RPC_DISPLAY_NETID: + continue; + default: + kfree(xprt->address_strings[i]); + } +} + +#define XS_SENDMSG_FLAGS (MSG_DONTWAIT | MSG_NOSIGNAL) + +static int xs_send_kvec(struct socket *sock, struct sockaddr *addr, int addrlen, struct kvec *vec, unsigned int base, int more) +{ + struct msghdr msg = { + .msg_name = addr, + .msg_namelen = addrlen, + .msg_flags = XS_SENDMSG_FLAGS | (more ? MSG_MORE : 0), + }; + struct kvec iov = { + .iov_base = vec->iov_base + base, + .iov_len = vec->iov_len - base, + }; + + if (iov.iov_len != 0) + return kernel_sendmsg(sock, &msg, &iov, 1, iov.iov_len); + return kernel_sendmsg(sock, &msg, NULL, 0, 0); +} + +static int xs_send_pagedata(struct socket *sock, struct xdr_buf *xdr, unsigned int base, int more, bool zerocopy, int *sent_p) +{ + ssize_t (*do_sendpage)(struct socket *sock, struct page *page, + int offset, size_t size, int flags); + struct page **ppage; + unsigned int remainder; + int err; + + remainder = xdr->page_len - base; + base += xdr->page_base; + ppage = xdr->pages + (base >> PAGE_SHIFT); + base &= ~PAGE_MASK; + do_sendpage = sock->ops->sendpage; + if (!zerocopy) + do_sendpage = sock_no_sendpage; + for(;;) { + unsigned int len = min_t(unsigned int, PAGE_SIZE - base, remainder); + int flags = XS_SENDMSG_FLAGS; + + remainder -= len; + if (more) + flags |= MSG_MORE; + if (remainder != 0) + flags |= MSG_SENDPAGE_NOTLAST | MSG_MORE; + err = do_sendpage(sock, *ppage, base, len, flags); + if (remainder == 0 || err != len) + break; + *sent_p += err; + ppage++; + base = 0; + } + if (err > 0) { + *sent_p += err; + err = 0; + } + return err; +} + +/** + * xs_sendpages - write pages directly to a socket + * @sock: socket to send on + * @addr: UDP only -- address of destination + * @addrlen: UDP only -- length of destination address + * @xdr: buffer containing this request + * @base: starting position in the buffer + * @zerocopy: true if it is safe to use sendpage() + * @sent_p: return the total number of bytes successfully queued for sending + * + */ +static int xs_sendpages(struct socket *sock, struct sockaddr *addr, int addrlen, struct xdr_buf *xdr, unsigned int base, bool zerocopy, int *sent_p) +{ + unsigned int remainder = xdr->len - base; + int err = 0; + int sent = 0; + + if (unlikely(!sock)) + return -ENOTSOCK; + + if (base != 0) { + addr = NULL; + addrlen = 0; + } + + if (base < xdr->head[0].iov_len || addr != NULL) { + unsigned int len = xdr->head[0].iov_len - base; + remainder -= len; + err = xs_send_kvec(sock, addr, addrlen, &xdr->head[0], base, remainder != 0); + if (remainder == 0 || err != len) + goto out; + *sent_p += err; + base = 0; + } else + base -= xdr->head[0].iov_len; + + if (base < xdr->page_len) { + unsigned int len = xdr->page_len - base; + remainder -= len; + err = xs_send_pagedata(sock, xdr, base, remainder != 0, zerocopy, &sent); + *sent_p += sent; + if (remainder == 0 || sent != len) + goto out; + base = 0; + } else + base -= xdr->page_len; + + if (base >= xdr->tail[0].iov_len) + return 0; + err = xs_send_kvec(sock, NULL, 0, &xdr->tail[0], base, 0); +out: + if (err > 0) { + *sent_p += err; + err = 0; + } + return err; +} + +static void xs_nospace_callback(struct rpc_task *task) +{ + struct sock_xprt *transport = container_of(task->tk_rqstp->rq_xprt, struct sock_xprt, xprt); + + transport->inet->sk_write_pending--; +} + +/** + * xs_nospace - place task on wait queue if transmit was incomplete + * @task: task to put to sleep + * + */ +static int xs_nospace(struct rpc_task *task) +{ + struct rpc_rqst *req = task->tk_rqstp; + struct rpc_xprt *xprt = req->rq_xprt; + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + struct sock *sk = transport->inet; + int ret = -EAGAIN; + + dprintk("RPC: %5u xmit incomplete (%u left of %u)\n", + task->tk_pid, req->rq_slen - req->rq_bytes_sent, + req->rq_slen); + + /* Protect against races with write_space */ + spin_lock_bh(&xprt->transport_lock); + + /* Don't race with disconnect */ + if (xprt_connected(xprt)) { + /* wait for more buffer space */ + sk->sk_write_pending++; + xprt_wait_for_buffer_space(task, xs_nospace_callback); + } else + ret = -ENOTCONN; + + spin_unlock_bh(&xprt->transport_lock); + + /* Race breaker in case memory is freed before above code is called */ + if (ret == -EAGAIN) { + struct socket_wq *wq; + + rcu_read_lock(); + wq = rcu_dereference(sk->sk_wq); + set_bit(SOCKWQ_ASYNC_NOSPACE, &wq->flags); + rcu_read_unlock(); + + sk->sk_write_space(sk); + } + return ret; +} + +/* + * Construct a stream transport record marker in @buf. + */ +static inline void xs_encode_stream_record_marker(struct xdr_buf *buf) +{ + u32 reclen = buf->len - sizeof(rpc_fraghdr); + rpc_fraghdr *base = buf->head[0].iov_base; + *base = cpu_to_be32(RPC_LAST_STREAM_FRAGMENT | reclen); +} + +/** + * xs_local_send_request - write an RPC request to an AF_LOCAL socket + * @task: RPC task that manages the state of an RPC request + * + * Return values: + * 0: The request has been sent + * EAGAIN: The socket was blocked, please call again later to + * complete the request + * ENOTCONN: Caller needs to invoke connect logic then call again + * other: Some other error occured, the request was not sent + */ +static int xs_local_send_request(struct rpc_task *task) +{ + struct rpc_rqst *req = task->tk_rqstp; + struct rpc_xprt *xprt = req->rq_xprt; + struct sock_xprt *transport = + container_of(xprt, struct sock_xprt, xprt); + struct xdr_buf *xdr = &req->rq_snd_buf; + int status; + int sent = 0; + + xs_encode_stream_record_marker(&req->rq_snd_buf); + + xs_pktdump("packet data:", + req->rq_svec->iov_base, req->rq_svec->iov_len); + + req->rq_xtime = ktime_get(); + status = xs_sendpages(transport->sock, NULL, 0, xdr, req->rq_bytes_sent, + true, &sent); + dprintk("RPC: %s(%u) = %d\n", + __func__, xdr->len - req->rq_bytes_sent, status); + + if (status == -EAGAIN && sock_writeable(transport->inet)) + status = -ENOBUFS; + + if (likely(sent > 0) || status == 0) { + req->rq_bytes_sent += sent; + req->rq_xmit_bytes_sent += sent; + if (likely(req->rq_bytes_sent >= req->rq_slen)) { + req->rq_bytes_sent = 0; + return 0; + } + status = -EAGAIN; + } + + switch (status) { + case -ENOBUFS: + break; + case -EAGAIN: + status = xs_nospace(task); + break; + default: + dprintk("RPC: sendmsg returned unrecognized error %d\n", + -status); + /* fall through */ + case -EPIPE: + xs_close(xprt); + status = -ENOTCONN; + } + + return status; +} + +/** + * xs_udp_send_request - write an RPC request to a UDP socket + * @task: address of RPC task that manages the state of an RPC request + * + * Return values: + * 0: The request has been sent + * EAGAIN: The socket was blocked, please call again later to + * complete the request + * ENOTCONN: Caller needs to invoke connect logic then call again + * other: Some other error occurred, the request was not sent + */ +static int xs_udp_send_request(struct rpc_task *task) +{ + struct rpc_rqst *req = task->tk_rqstp; + struct rpc_xprt *xprt = req->rq_xprt; + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + struct xdr_buf *xdr = &req->rq_snd_buf; + int sent = 0; + int status; + + xs_pktdump("packet data:", + req->rq_svec->iov_base, + req->rq_svec->iov_len); + + if (!xprt_bound(xprt)) + return -ENOTCONN; + req->rq_xtime = ktime_get(); + status = xs_sendpages(transport->sock, xs_addr(xprt), xprt->addrlen, + xdr, req->rq_bytes_sent, true, &sent); + + dprintk("RPC: xs_udp_send_request(%u) = %d\n", + xdr->len - req->rq_bytes_sent, status); + + /* firewall is blocking us, don't return -EAGAIN or we end up looping */ + if (status == -EPERM) + goto process_status; + + if (status == -EAGAIN && sock_writeable(transport->inet)) + status = -ENOBUFS; + + if (sent > 0 || status == 0) { + req->rq_xmit_bytes_sent += sent; + if (sent >= req->rq_slen) + return 0; + /* Still some bytes left; set up for a retry later. */ + status = -EAGAIN; + } + +process_status: + switch (status) { + case -ENOTSOCK: + status = -ENOTCONN; + /* Should we call xs_close() here? */ + break; + case -EAGAIN: + status = xs_nospace(task); + break; + case -ENETUNREACH: + case -ENOBUFS: + case -EPIPE: + case -ECONNREFUSED: + case -EPERM: + /* When the server has died, an ICMP port unreachable message + * prompts ECONNREFUSED. */ + break; + default: + dprintk("RPC: sendmsg returned unrecognized error %d\n", + -status); + } + + return status; +} + +/** + * xs_tcp_send_request - write an RPC request to a TCP socket + * @task: address of RPC task that manages the state of an RPC request + * + * Return values: + * 0: The request has been sent + * EAGAIN: The socket was blocked, please call again later to + * complete the request + * ENOTCONN: Caller needs to invoke connect logic then call again + * other: Some other error occurred, the request was not sent + * + * XXX: In the case of soft timeouts, should we eventually give up + * if sendmsg is not able to make progress? + */ +static int xs_tcp_send_request(struct rpc_task *task) +{ + struct rpc_rqst *req = task->tk_rqstp; + struct rpc_xprt *xprt = req->rq_xprt; + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + struct xdr_buf *xdr = &req->rq_snd_buf; + bool zerocopy = true; + bool vm_wait = false; + int status; + int sent; + + xs_encode_stream_record_marker(&req->rq_snd_buf); + + xs_pktdump("packet data:", + req->rq_svec->iov_base, + req->rq_svec->iov_len); + /* Don't use zero copy if this is a resend. If the RPC call + * completes while the socket holds a reference to the pages, + * then we may end up resending corrupted data. + */ + if (task->tk_flags & RPC_TASK_SENT) + zerocopy = false; + + if (test_bit(XPRT_SOCK_UPD_TIMEOUT, &transport->sock_state)) + xs_tcp_set_socket_timeouts(xprt, transport->sock); + + /* Continue transmitting the packet/record. We must be careful + * to cope with writespace callbacks arriving _after_ we have + * called sendmsg(). */ + req->rq_xtime = ktime_get(); + while (1) { + sent = 0; + status = xs_sendpages(transport->sock, NULL, 0, xdr, + req->rq_bytes_sent, zerocopy, &sent); + + dprintk("RPC: xs_tcp_send_request(%u) = %d\n", + xdr->len - req->rq_bytes_sent, status); + + /* If we've sent the entire packet, immediately + * reset the count of bytes sent. */ + req->rq_bytes_sent += sent; + req->rq_xmit_bytes_sent += sent; + if (likely(req->rq_bytes_sent >= req->rq_slen)) { + req->rq_bytes_sent = 0; + return 0; + } + + WARN_ON_ONCE(sent == 0 && status == 0); + + if (status == -EAGAIN ) { + /* + * Return EAGAIN if we're sure we're hitting the + * socket send buffer limits. + */ + if (test_bit(SOCK_NOSPACE, &transport->sock->flags)) + break; + /* + * Did we hit a memory allocation failure? + */ + if (sent == 0) { + status = -ENOBUFS; + if (vm_wait) + break; + /* Retry, knowing now that we're below the + * socket send buffer limit + */ + vm_wait = true; + } + continue; + } + if (status < 0) + break; + vm_wait = false; + } + + switch (status) { + case -ENOTSOCK: + status = -ENOTCONN; + /* Should we call xs_close() here? */ + break; + case -EAGAIN: + status = xs_nospace(task); + break; + case -ECONNRESET: + case -ECONNREFUSED: + case -ENOTCONN: + case -EADDRINUSE: + case -ENOBUFS: + case -EPIPE: + break; + default: + dprintk("RPC: sendmsg returned unrecognized error %d\n", + -status); + } + + return status; +} + +/** + * xs_tcp_release_xprt - clean up after a tcp transmission + * @xprt: transport + * @task: rpc task + * + * This cleans up if an error causes us to abort the transmission of a request. + * In this case, the socket may need to be reset in order to avoid confusing + * the server. + */ +static void xs_tcp_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task) +{ + struct rpc_rqst *req; + + if (task != xprt->snd_task) + return; + if (task == NULL) + goto out_release; + req = task->tk_rqstp; + if (req == NULL) + goto out_release; + if (req->rq_bytes_sent == 0) + goto out_release; + if (req->rq_bytes_sent == req->rq_snd_buf.len) + goto out_release; + set_bit(XPRT_CLOSE_WAIT, &xprt->state); +out_release: + xprt_release_xprt(xprt, task); +} + +static void xs_save_old_callbacks(struct sock_xprt *transport, struct sock *sk) +{ + transport->old_data_ready = sk->sk_data_ready; + transport->old_state_change = sk->sk_state_change; + transport->old_write_space = sk->sk_write_space; + transport->old_error_report = sk->sk_error_report; +} + +static void xs_restore_old_callbacks(struct sock_xprt *transport, struct sock *sk) +{ + sk->sk_data_ready = transport->old_data_ready; + sk->sk_state_change = transport->old_state_change; + sk->sk_write_space = transport->old_write_space; + sk->sk_error_report = transport->old_error_report; +} + +static void xs_sock_reset_state_flags(struct rpc_xprt *xprt) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + + clear_bit(XPRT_SOCK_DATA_READY, &transport->sock_state); +} + +static void xs_sock_reset_connection_flags(struct rpc_xprt *xprt) +{ + smp_mb__before_atomic(); + clear_bit(XPRT_CLOSE_WAIT, &xprt->state); + clear_bit(XPRT_CLOSING, &xprt->state); + xs_sock_reset_state_flags(xprt); + smp_mb__after_atomic(); +} + +/** + * xs_error_report - callback to handle TCP socket state errors + * @sk: socket + * + * Note: we don't call sock_error() since there may be a rpc_task + * using the socket, and so we don't want to clear sk->sk_err. + */ +static void xs_error_report(struct sock *sk) +{ + struct rpc_xprt *xprt; + int err; + + read_lock_bh(&sk->sk_callback_lock); + if (!(xprt = xprt_from_sock(sk))) + goto out; + + err = -sk->sk_err; + if (err == 0) + goto out; + dprintk("RPC: xs_error_report client %p, error=%d...\n", + xprt, -err); + trace_rpc_socket_error(xprt, sk->sk_socket, err); + xprt_wake_pending_tasks(xprt, err); + out: + read_unlock_bh(&sk->sk_callback_lock); +} + +static void xs_reset_transport(struct sock_xprt *transport) +{ + struct socket *sock = transport->sock; + struct sock *sk = transport->inet; + struct rpc_xprt *xprt = &transport->xprt; + + if (sk == NULL) + return; + + if (atomic_read(&transport->xprt.swapper)) + sk_clear_memalloc(sk); + + kernel_sock_shutdown(sock, SHUT_RDWR); + + mutex_lock(&transport->recv_mutex); + write_lock_bh(&sk->sk_callback_lock); + transport->inet = NULL; + transport->sock = NULL; + + sk->sk_user_data = NULL; + + xs_restore_old_callbacks(transport, sk); + xprt_clear_connected(xprt); + write_unlock_bh(&sk->sk_callback_lock); + xs_sock_reset_connection_flags(xprt); + mutex_unlock(&transport->recv_mutex); + + trace_rpc_socket_close(xprt, sock); + sock_release(sock); +} + +/** + * xs_close - close a socket + * @xprt: transport + * + * This is used when all requests are complete; ie, no DRC state remains + * on the server we want to save. + * + * The caller _must_ be holding XPRT_LOCKED in order to avoid issues with + * xs_reset_transport() zeroing the socket from underneath a writer. + */ +static void xs_close(struct rpc_xprt *xprt) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + + dprintk("RPC: xs_close xprt %p\n", xprt); + + xs_reset_transport(transport); + xprt->reestablish_timeout = 0; + + xprt_disconnect_done(xprt); +} + +static void xs_inject_disconnect(struct rpc_xprt *xprt) +{ + dprintk("RPC: injecting transport disconnect on xprt=%p\n", + xprt); + xprt_disconnect_done(xprt); +} + +static void xs_xprt_free(struct rpc_xprt *xprt) +{ + xs_free_peer_addresses(xprt); + xprt_free(xprt); +} + +/** + * xs_destroy - prepare to shutdown a transport + * @xprt: doomed transport + * + */ +static void xs_destroy(struct rpc_xprt *xprt) +{ + struct sock_xprt *transport = container_of(xprt, + struct sock_xprt, xprt); + dprintk("RPC: xs_destroy xprt %p\n", xprt); + + cancel_delayed_work_sync(&transport->connect_worker); + xs_close(xprt); + cancel_work_sync(&transport->recv_worker); + xs_xprt_free(xprt); + module_put(THIS_MODULE); +} + +static int xs_local_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb) +{ + struct xdr_skb_reader desc = { + .skb = skb, + .offset = sizeof(rpc_fraghdr), + .count = skb->len - sizeof(rpc_fraghdr), + }; + + if (xdr_partial_copy_from_skb(xdr, 0, &desc, xdr_skb_read_bits) < 0) + return -1; + if (desc.count) + return -1; + return 0; +} + +/** + * xs_local_data_read_skb + * @xprt: transport + * @sk: socket + * @skb: skbuff + * + * Currently this assumes we can read the whole reply in a single gulp. + */ +static void xs_local_data_read_skb(struct rpc_xprt *xprt, + struct sock *sk, + struct sk_buff *skb) +{ + struct rpc_task *task; + struct rpc_rqst *rovr; + int repsize, copied; + u32 _xid; + __be32 *xp; + + repsize = skb->len - sizeof(rpc_fraghdr); + if (repsize < 4) { + dprintk("RPC: impossible RPC reply size %d\n", repsize); + return; + } + + /* Copy the XID from the skb... */ + xp = skb_header_pointer(skb, sizeof(rpc_fraghdr), sizeof(_xid), &_xid); + if (xp == NULL) + return; + + /* Look up and lock the request corresponding to the given XID */ + spin_lock(&xprt->recv_lock); + rovr = xprt_lookup_rqst(xprt, *xp); + if (!rovr) + goto out_unlock; + xprt_pin_rqst(rovr); + spin_unlock(&xprt->recv_lock); + task = rovr->rq_task; + + copied = rovr->rq_private_buf.buflen; + if (copied > repsize) + copied = repsize; + + if (xs_local_copy_to_xdr(&rovr->rq_private_buf, skb)) { + dprintk("RPC: sk_buff copy failed\n"); + spin_lock(&xprt->recv_lock); + goto out_unpin; + } + + spin_lock(&xprt->recv_lock); + xprt_complete_rqst(task, copied); +out_unpin: + xprt_unpin_rqst(rovr); + out_unlock: + spin_unlock(&xprt->recv_lock); +} + +static void xs_local_data_receive(struct sock_xprt *transport) +{ + struct sk_buff *skb; + struct sock *sk; + int err; + +restart: + mutex_lock(&transport->recv_mutex); + sk = transport->inet; + if (sk == NULL) + goto out; + for (;;) { + skb = skb_recv_datagram(sk, 0, 1, &err); + if (skb != NULL) { + xs_local_data_read_skb(&transport->xprt, sk, skb); + skb_free_datagram(sk, skb); + continue; + } + if (!test_and_clear_bit(XPRT_SOCK_DATA_READY, &transport->sock_state)) + break; + if (need_resched()) { + mutex_unlock(&transport->recv_mutex); + cond_resched(); + goto restart; + } + } +out: + mutex_unlock(&transport->recv_mutex); +} + +static void xs_local_data_receive_workfn(struct work_struct *work) +{ + struct sock_xprt *transport = + container_of(work, struct sock_xprt, recv_worker); + xs_local_data_receive(transport); +} + +/** + * xs_udp_data_read_skb - receive callback for UDP sockets + * @xprt: transport + * @sk: socket + * @skb: skbuff + * + */ +static void xs_udp_data_read_skb(struct rpc_xprt *xprt, + struct sock *sk, + struct sk_buff *skb) +{ + struct rpc_task *task; + struct rpc_rqst *rovr; + int repsize, copied; + u32 _xid; + __be32 *xp; + + repsize = skb->len; + if (repsize < 4) { + dprintk("RPC: impossible RPC reply size %d!\n", repsize); + return; + } + + /* Copy the XID from the skb... */ + xp = skb_header_pointer(skb, 0, sizeof(_xid), &_xid); + if (xp == NULL) + return; + + /* Look up and lock the request corresponding to the given XID */ + spin_lock(&xprt->recv_lock); + rovr = xprt_lookup_rqst(xprt, *xp); + if (!rovr) + goto out_unlock; + xprt_pin_rqst(rovr); + xprt_update_rtt(rovr->rq_task); + spin_unlock(&xprt->recv_lock); + task = rovr->rq_task; + + if ((copied = rovr->rq_private_buf.buflen) > repsize) + copied = repsize; + + /* Suck it into the iovec, verify checksum if not done by hw. */ + if (csum_partial_copy_to_xdr(&rovr->rq_private_buf, skb)) { + spin_lock(&xprt->recv_lock); + __UDPX_INC_STATS(sk, UDP_MIB_INERRORS); + goto out_unpin; + } + + + spin_lock_bh(&xprt->transport_lock); + xprt_adjust_cwnd(xprt, task, copied); + spin_unlock_bh(&xprt->transport_lock); + spin_lock(&xprt->recv_lock); + xprt_complete_rqst(task, copied); + __UDPX_INC_STATS(sk, UDP_MIB_INDATAGRAMS); +out_unpin: + xprt_unpin_rqst(rovr); + out_unlock: + spin_unlock(&xprt->recv_lock); +} + +static void xs_udp_data_receive(struct sock_xprt *transport) +{ + struct sk_buff *skb; + struct sock *sk; + int err; + +restart: + mutex_lock(&transport->recv_mutex); + sk = transport->inet; + if (sk == NULL) + goto out; + for (;;) { + skb = skb_recv_udp(sk, 0, 1, &err); + if (skb != NULL) { + xs_udp_data_read_skb(&transport->xprt, sk, skb); + consume_skb(skb); + continue; + } + if (!test_and_clear_bit(XPRT_SOCK_DATA_READY, &transport->sock_state)) + break; + if (need_resched()) { + mutex_unlock(&transport->recv_mutex); + cond_resched(); + goto restart; + } + } +out: + mutex_unlock(&transport->recv_mutex); +} + +static void xs_udp_data_receive_workfn(struct work_struct *work) +{ + struct sock_xprt *transport = + container_of(work, struct sock_xprt, recv_worker); + xs_udp_data_receive(transport); +} + +/** + * xs_data_ready - "data ready" callback for UDP sockets + * @sk: socket with data to read + * + */ +static void xs_data_ready(struct sock *sk) +{ + struct rpc_xprt *xprt; + + read_lock_bh(&sk->sk_callback_lock); + dprintk("RPC: xs_data_ready...\n"); + xprt = xprt_from_sock(sk); + if (xprt != NULL) { + struct sock_xprt *transport = container_of(xprt, + struct sock_xprt, xprt); + transport->old_data_ready(sk); + /* Any data means we had a useful conversation, so + * then we don't need to delay the next reconnect + */ + if (xprt->reestablish_timeout) + xprt->reestablish_timeout = 0; + if (!test_and_set_bit(XPRT_SOCK_DATA_READY, &transport->sock_state)) + queue_work(xprtiod_workqueue, &transport->recv_worker); + } + read_unlock_bh(&sk->sk_callback_lock); +} + +/* + * Helper function to force a TCP close if the server is sending + * junk and/or it has put us in CLOSE_WAIT + */ +static void xs_tcp_force_close(struct rpc_xprt *xprt) +{ + xprt_force_disconnect(xprt); +} + +static inline void xs_tcp_read_fraghdr(struct rpc_xprt *xprt, struct xdr_skb_reader *desc) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + size_t len, used; + char *p; + + p = ((char *) &transport->tcp_fraghdr) + transport->tcp_offset; + len = sizeof(transport->tcp_fraghdr) - transport->tcp_offset; + used = xdr_skb_read_bits(desc, p, len); + transport->tcp_offset += used; + if (used != len) + return; + + transport->tcp_reclen = ntohl(transport->tcp_fraghdr); + if (transport->tcp_reclen & RPC_LAST_STREAM_FRAGMENT) + transport->tcp_flags |= TCP_RCV_LAST_FRAG; + else + transport->tcp_flags &= ~TCP_RCV_LAST_FRAG; + transport->tcp_reclen &= RPC_FRAGMENT_SIZE_MASK; + + transport->tcp_flags &= ~TCP_RCV_COPY_FRAGHDR; + transport->tcp_offset = 0; + + /* Sanity check of the record length */ + if (unlikely(transport->tcp_reclen < 8)) { + dprintk("RPC: invalid TCP record fragment length\n"); + xs_tcp_force_close(xprt); + return; + } + dprintk("RPC: reading TCP record fragment of length %d\n", + transport->tcp_reclen); +} + +static void xs_tcp_check_fraghdr(struct sock_xprt *transport) +{ + if (transport->tcp_offset == transport->tcp_reclen) { + transport->tcp_flags |= TCP_RCV_COPY_FRAGHDR; + transport->tcp_offset = 0; + if (transport->tcp_flags & TCP_RCV_LAST_FRAG) { + transport->tcp_flags &= ~TCP_RCV_COPY_DATA; + transport->tcp_flags |= TCP_RCV_COPY_XID; + transport->tcp_copied = 0; + } + } +} + +static inline void xs_tcp_read_xid(struct sock_xprt *transport, struct xdr_skb_reader *desc) +{ + size_t len, used; + char *p; + + len = sizeof(transport->tcp_xid) - transport->tcp_offset; + dprintk("RPC: reading XID (%zu bytes)\n", len); + p = ((char *) &transport->tcp_xid) + transport->tcp_offset; + used = xdr_skb_read_bits(desc, p, len); + transport->tcp_offset += used; + if (used != len) + return; + transport->tcp_flags &= ~TCP_RCV_COPY_XID; + transport->tcp_flags |= TCP_RCV_READ_CALLDIR; + transport->tcp_copied = 4; + dprintk("RPC: reading %s XID %08x\n", + (transport->tcp_flags & TCP_RPC_REPLY) ? "reply for" + : "request with", + ntohl(transport->tcp_xid)); + xs_tcp_check_fraghdr(transport); +} + +static inline void xs_tcp_read_calldir(struct sock_xprt *transport, + struct xdr_skb_reader *desc) +{ + size_t len, used; + u32 offset; + char *p; + + /* + * We want transport->tcp_offset to be 8 at the end of this routine + * (4 bytes for the xid and 4 bytes for the call/reply flag). + * When this function is called for the first time, + * transport->tcp_offset is 4 (after having already read the xid). + */ + offset = transport->tcp_offset - sizeof(transport->tcp_xid); + len = sizeof(transport->tcp_calldir) - offset; + dprintk("RPC: reading CALL/REPLY flag (%zu bytes)\n", len); + p = ((char *) &transport->tcp_calldir) + offset; + used = xdr_skb_read_bits(desc, p, len); + transport->tcp_offset += used; + if (used != len) + return; + transport->tcp_flags &= ~TCP_RCV_READ_CALLDIR; + /* + * We don't yet have the XDR buffer, so we will write the calldir + * out after we get the buffer from the 'struct rpc_rqst' + */ + switch (ntohl(transport->tcp_calldir)) { + case RPC_REPLY: + transport->tcp_flags |= TCP_RCV_COPY_CALLDIR; + transport->tcp_flags |= TCP_RCV_COPY_DATA; + transport->tcp_flags |= TCP_RPC_REPLY; + break; + case RPC_CALL: + transport->tcp_flags |= TCP_RCV_COPY_CALLDIR; + transport->tcp_flags |= TCP_RCV_COPY_DATA; + transport->tcp_flags &= ~TCP_RPC_REPLY; + break; + default: + dprintk("RPC: invalid request message type\n"); + xs_tcp_force_close(&transport->xprt); + } + xs_tcp_check_fraghdr(transport); +} + +static inline void xs_tcp_read_common(struct rpc_xprt *xprt, + struct xdr_skb_reader *desc, + struct rpc_rqst *req) +{ + struct sock_xprt *transport = + container_of(xprt, struct sock_xprt, xprt); + struct xdr_buf *rcvbuf; + size_t len; + ssize_t r; + + rcvbuf = &req->rq_private_buf; + + if (transport->tcp_flags & TCP_RCV_COPY_CALLDIR) { + /* + * Save the RPC direction in the XDR buffer + */ + memcpy(rcvbuf->head[0].iov_base + transport->tcp_copied, + &transport->tcp_calldir, + sizeof(transport->tcp_calldir)); + transport->tcp_copied += sizeof(transport->tcp_calldir); + transport->tcp_flags &= ~TCP_RCV_COPY_CALLDIR; + } + + len = desc->count; + if (len > transport->tcp_reclen - transport->tcp_offset) + desc->count = transport->tcp_reclen - transport->tcp_offset; + r = xdr_partial_copy_from_skb(rcvbuf, transport->tcp_copied, + desc, xdr_skb_read_bits); + + if (desc->count) { + /* Error when copying to the receive buffer, + * usually because we weren't able to allocate + * additional buffer pages. All we can do now + * is turn off TCP_RCV_COPY_DATA, so the request + * will not receive any additional updates, + * and time out. + * Any remaining data from this record will + * be discarded. + */ + transport->tcp_flags &= ~TCP_RCV_COPY_DATA; + dprintk("RPC: XID %08x truncated request\n", + ntohl(transport->tcp_xid)); + dprintk("RPC: xprt = %p, tcp_copied = %lu, " + "tcp_offset = %u, tcp_reclen = %u\n", + xprt, transport->tcp_copied, + transport->tcp_offset, transport->tcp_reclen); + return; + } + + transport->tcp_copied += r; + transport->tcp_offset += r; + desc->count = len - r; + + dprintk("RPC: XID %08x read %zd bytes\n", + ntohl(transport->tcp_xid), r); + dprintk("RPC: xprt = %p, tcp_copied = %lu, tcp_offset = %u, " + "tcp_reclen = %u\n", xprt, transport->tcp_copied, + transport->tcp_offset, transport->tcp_reclen); + + if (transport->tcp_copied == req->rq_private_buf.buflen) + transport->tcp_flags &= ~TCP_RCV_COPY_DATA; + else if (transport->tcp_offset == transport->tcp_reclen) { + if (transport->tcp_flags & TCP_RCV_LAST_FRAG) + transport->tcp_flags &= ~TCP_RCV_COPY_DATA; + } +} + +/* + * Finds the request corresponding to the RPC xid and invokes the common + * tcp read code to read the data. + */ +static inline int xs_tcp_read_reply(struct rpc_xprt *xprt, + struct xdr_skb_reader *desc) +{ + struct sock_xprt *transport = + container_of(xprt, struct sock_xprt, xprt); + struct rpc_rqst *req; + + dprintk("RPC: read reply XID %08x\n", ntohl(transport->tcp_xid)); + + /* Find and lock the request corresponding to this xid */ + spin_lock(&xprt->recv_lock); + req = xprt_lookup_rqst(xprt, transport->tcp_xid); + if (!req) { + dprintk("RPC: XID %08x request not found!\n", + ntohl(transport->tcp_xid)); + spin_unlock(&xprt->recv_lock); + return -1; + } + xprt_pin_rqst(req); + spin_unlock(&xprt->recv_lock); + + xs_tcp_read_common(xprt, desc, req); + + spin_lock(&xprt->recv_lock); + if (!(transport->tcp_flags & TCP_RCV_COPY_DATA)) + xprt_complete_rqst(req->rq_task, transport->tcp_copied); + xprt_unpin_rqst(req); + spin_unlock(&xprt->recv_lock); + return 0; +} + +#if defined(CONFIG_SUNRPC_BACKCHANNEL) +/* + * Obtains an rpc_rqst previously allocated and invokes the common + * tcp read code to read the data. The result is placed in the callback + * queue. + * If we're unable to obtain the rpc_rqst we schedule the closing of the + * connection and return -1. + */ +static int xs_tcp_read_callback(struct rpc_xprt *xprt, + struct xdr_skb_reader *desc) +{ + struct sock_xprt *transport = + container_of(xprt, struct sock_xprt, xprt); + struct rpc_rqst *req; + + /* Look up the request corresponding to the given XID */ + req = xprt_lookup_bc_request(xprt, transport->tcp_xid); + if (req == NULL) { + printk(KERN_WARNING "Callback slot table overflowed\n"); + xprt_force_disconnect(xprt); + return -1; + } + + dprintk("RPC: read callback XID %08x\n", ntohl(req->rq_xid)); + xs_tcp_read_common(xprt, desc, req); + + if (!(transport->tcp_flags & TCP_RCV_COPY_DATA)) + xprt_complete_bc_request(req, transport->tcp_copied); + + return 0; +} + +static inline int _xs_tcp_read_data(struct rpc_xprt *xprt, + struct xdr_skb_reader *desc) +{ + struct sock_xprt *transport = + container_of(xprt, struct sock_xprt, xprt); + + return (transport->tcp_flags & TCP_RPC_REPLY) ? + xs_tcp_read_reply(xprt, desc) : + xs_tcp_read_callback(xprt, desc); +} + +static int xs_tcp_bc_up(struct svc_serv *serv, struct net *net) +{ + int ret; + + ret = svc_create_xprt(serv, "tcp-bc", net, PF_INET, 0, + SVC_SOCK_ANONYMOUS); + if (ret < 0) + return ret; + return 0; +} + +static size_t xs_tcp_bc_maxpayload(struct rpc_xprt *xprt) +{ + return PAGE_SIZE; +} +#else +static inline int _xs_tcp_read_data(struct rpc_xprt *xprt, + struct xdr_skb_reader *desc) +{ + return xs_tcp_read_reply(xprt, desc); +} +#endif /* CONFIG_SUNRPC_BACKCHANNEL */ + +/* + * Read data off the transport. This can be either an RPC_CALL or an + * RPC_REPLY. Relay the processing to helper functions. + */ +static void xs_tcp_read_data(struct rpc_xprt *xprt, + struct xdr_skb_reader *desc) +{ + struct sock_xprt *transport = + container_of(xprt, struct sock_xprt, xprt); + + if (_xs_tcp_read_data(xprt, desc) == 0) + xs_tcp_check_fraghdr(transport); + else { + /* + * The transport_lock protects the request handling. + * There's no need to hold it to update the tcp_flags. + */ + transport->tcp_flags &= ~TCP_RCV_COPY_DATA; + } +} + +static inline void xs_tcp_read_discard(struct sock_xprt *transport, struct xdr_skb_reader *desc) +{ + size_t len; + + len = transport->tcp_reclen - transport->tcp_offset; + if (len > desc->count) + len = desc->count; + desc->count -= len; + desc->offset += len; + transport->tcp_offset += len; + dprintk("RPC: discarded %zu bytes\n", len); + xs_tcp_check_fraghdr(transport); +} + +static int xs_tcp_data_recv(read_descriptor_t *rd_desc, struct sk_buff *skb, unsigned int offset, size_t len) +{ + struct rpc_xprt *xprt = rd_desc->arg.data; + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + struct xdr_skb_reader desc = { + .skb = skb, + .offset = offset, + .count = len, + }; + size_t ret; + + dprintk("RPC: xs_tcp_data_recv started\n"); + do { + trace_xs_tcp_data_recv(transport); + /* Read in a new fragment marker if necessary */ + /* Can we ever really expect to get completely empty fragments? */ + if (transport->tcp_flags & TCP_RCV_COPY_FRAGHDR) { + xs_tcp_read_fraghdr(xprt, &desc); + continue; + } + /* Read in the xid if necessary */ + if (transport->tcp_flags & TCP_RCV_COPY_XID) { + xs_tcp_read_xid(transport, &desc); + continue; + } + /* Read in the call/reply flag */ + if (transport->tcp_flags & TCP_RCV_READ_CALLDIR) { + xs_tcp_read_calldir(transport, &desc); + continue; + } + /* Read in the request data */ + if (transport->tcp_flags & TCP_RCV_COPY_DATA) { + xs_tcp_read_data(xprt, &desc); + continue; + } + /* Skip over any trailing bytes on short reads */ + xs_tcp_read_discard(transport, &desc); + } while (desc.count); + ret = len - desc.count; + if (ret < rd_desc->count) + rd_desc->count -= ret; + else + rd_desc->count = 0; + trace_xs_tcp_data_recv(transport); + dprintk("RPC: xs_tcp_data_recv done\n"); + return ret; +} + +static void xs_tcp_data_receive(struct sock_xprt *transport) +{ + struct rpc_xprt *xprt = &transport->xprt; + struct sock *sk; + read_descriptor_t rd_desc = { + .arg.data = xprt, + }; + unsigned long total = 0; + int read = 0; + +restart: + mutex_lock(&transport->recv_mutex); + sk = transport->inet; + if (sk == NULL) + goto out; + + /* We use rd_desc to pass struct xprt to xs_tcp_data_recv */ + for (;;) { + rd_desc.count = RPC_TCP_READ_CHUNK_SZ; + lock_sock(sk); + read = tcp_read_sock(sk, &rd_desc, xs_tcp_data_recv); + if (rd_desc.count != 0 || read < 0) { + clear_bit(XPRT_SOCK_DATA_READY, &transport->sock_state); + release_sock(sk); + break; + } + release_sock(sk); + total += read; + if (need_resched()) { + mutex_unlock(&transport->recv_mutex); + cond_resched(); + goto restart; + } + } + if (test_bit(XPRT_SOCK_DATA_READY, &transport->sock_state)) + queue_work(xprtiod_workqueue, &transport->recv_worker); +out: + mutex_unlock(&transport->recv_mutex); + trace_xs_tcp_data_ready(xprt, read, total); +} + +static void xs_tcp_data_receive_workfn(struct work_struct *work) +{ + struct sock_xprt *transport = + container_of(work, struct sock_xprt, recv_worker); + xs_tcp_data_receive(transport); +} + +/** + * xs_tcp_state_change - callback to handle TCP socket state changes + * @sk: socket whose state has changed + * + */ +static void xs_tcp_state_change(struct sock *sk) +{ + struct rpc_xprt *xprt; + struct sock_xprt *transport; + + read_lock_bh(&sk->sk_callback_lock); + if (!(xprt = xprt_from_sock(sk))) + goto out; + dprintk("RPC: xs_tcp_state_change client %p...\n", xprt); + dprintk("RPC: state %x conn %d dead %d zapped %d sk_shutdown %d\n", + sk->sk_state, xprt_connected(xprt), + sock_flag(sk, SOCK_DEAD), + sock_flag(sk, SOCK_ZAPPED), + sk->sk_shutdown); + + transport = container_of(xprt, struct sock_xprt, xprt); + trace_rpc_socket_state_change(xprt, sk->sk_socket); + switch (sk->sk_state) { + case TCP_ESTABLISHED: + spin_lock(&xprt->transport_lock); + if (!xprt_test_and_set_connected(xprt)) { + + /* Reset TCP record info */ + transport->tcp_offset = 0; + transport->tcp_reclen = 0; + transport->tcp_copied = 0; + transport->tcp_flags = + TCP_RCV_COPY_FRAGHDR | TCP_RCV_COPY_XID; + xprt->connect_cookie++; + clear_bit(XPRT_SOCK_CONNECTING, &transport->sock_state); + xprt_clear_connecting(xprt); + + xprt_wake_pending_tasks(xprt, -EAGAIN); + } + spin_unlock(&xprt->transport_lock); + break; + case TCP_FIN_WAIT1: + /* The client initiated a shutdown of the socket */ + xprt->connect_cookie++; + xprt->reestablish_timeout = 0; + set_bit(XPRT_CLOSING, &xprt->state); + smp_mb__before_atomic(); + clear_bit(XPRT_CONNECTED, &xprt->state); + clear_bit(XPRT_CLOSE_WAIT, &xprt->state); + smp_mb__after_atomic(); + break; + case TCP_CLOSE_WAIT: + /* The server initiated a shutdown of the socket */ + xprt->connect_cookie++; + clear_bit(XPRT_CONNECTED, &xprt->state); + xs_tcp_force_close(xprt); + /* fall through */ + case TCP_CLOSING: + /* + * If the server closed down the connection, make sure that + * we back off before reconnecting + */ + if (xprt->reestablish_timeout < XS_TCP_INIT_REEST_TO) + xprt->reestablish_timeout = XS_TCP_INIT_REEST_TO; + break; + case TCP_LAST_ACK: + set_bit(XPRT_CLOSING, &xprt->state); + smp_mb__before_atomic(); + clear_bit(XPRT_CONNECTED, &xprt->state); + smp_mb__after_atomic(); + break; + case TCP_CLOSE: + if (test_and_clear_bit(XPRT_SOCK_CONNECTING, + &transport->sock_state)) + xprt_clear_connecting(xprt); + clear_bit(XPRT_CLOSING, &xprt->state); + if (sk->sk_err) + xprt_wake_pending_tasks(xprt, -sk->sk_err); + /* Trigger the socket release */ + xs_tcp_force_close(xprt); + } + out: + read_unlock_bh(&sk->sk_callback_lock); +} + +static void xs_write_space(struct sock *sk) +{ + struct socket_wq *wq; + struct rpc_xprt *xprt; + + if (!sk->sk_socket) + return; + clear_bit(SOCK_NOSPACE, &sk->sk_socket->flags); + + if (unlikely(!(xprt = xprt_from_sock(sk)))) + return; + rcu_read_lock(); + wq = rcu_dereference(sk->sk_wq); + if (!wq || test_and_clear_bit(SOCKWQ_ASYNC_NOSPACE, &wq->flags) == 0) + goto out; + + xprt_write_space(xprt); +out: + rcu_read_unlock(); +} + +/** + * xs_udp_write_space - callback invoked when socket buffer space + * becomes available + * @sk: socket whose state has changed + * + * Called when more output buffer space is available for this socket. + * We try not to wake our writers until they can make "significant" + * progress, otherwise we'll waste resources thrashing kernel_sendmsg + * with a bunch of small requests. + */ +static void xs_udp_write_space(struct sock *sk) +{ + read_lock_bh(&sk->sk_callback_lock); + + /* from net/core/sock.c:sock_def_write_space */ + if (sock_writeable(sk)) + xs_write_space(sk); + + read_unlock_bh(&sk->sk_callback_lock); +} + +/** + * xs_tcp_write_space - callback invoked when socket buffer space + * becomes available + * @sk: socket whose state has changed + * + * Called when more output buffer space is available for this socket. + * We try not to wake our writers until they can make "significant" + * progress, otherwise we'll waste resources thrashing kernel_sendmsg + * with a bunch of small requests. + */ +static void xs_tcp_write_space(struct sock *sk) +{ + read_lock_bh(&sk->sk_callback_lock); + + /* from net/core/stream.c:sk_stream_write_space */ + if (sk_stream_is_writeable(sk)) + xs_write_space(sk); + + read_unlock_bh(&sk->sk_callback_lock); +} + +static void xs_udp_do_set_buffer_size(struct rpc_xprt *xprt) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + struct sock *sk = transport->inet; + + if (transport->rcvsize) { + sk->sk_userlocks |= SOCK_RCVBUF_LOCK; + sk->sk_rcvbuf = transport->rcvsize * xprt->max_reqs * 2; + } + if (transport->sndsize) { + sk->sk_userlocks |= SOCK_SNDBUF_LOCK; + sk->sk_sndbuf = transport->sndsize * xprt->max_reqs * 2; + sk->sk_write_space(sk); + } +} + +/** + * xs_udp_set_buffer_size - set send and receive limits + * @xprt: generic transport + * @sndsize: requested size of send buffer, in bytes + * @rcvsize: requested size of receive buffer, in bytes + * + * Set socket send and receive buffer size limits. + */ +static void xs_udp_set_buffer_size(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + + transport->sndsize = 0; + if (sndsize) + transport->sndsize = sndsize + 1024; + transport->rcvsize = 0; + if (rcvsize) + transport->rcvsize = rcvsize + 1024; + + xs_udp_do_set_buffer_size(xprt); +} + +/** + * xs_udp_timer - called when a retransmit timeout occurs on a UDP transport + * @task: task that timed out + * + * Adjust the congestion window after a retransmit timeout has occurred. + */ +static void xs_udp_timer(struct rpc_xprt *xprt, struct rpc_task *task) +{ + spin_lock_bh(&xprt->transport_lock); + xprt_adjust_cwnd(xprt, task, -ETIMEDOUT); + spin_unlock_bh(&xprt->transport_lock); +} + +static unsigned short xs_get_random_port(void) +{ + unsigned short range = xprt_max_resvport - xprt_min_resvport + 1; + unsigned short rand = (unsigned short) prandom_u32() % range; + return rand + xprt_min_resvport; +} + +/** + * xs_set_reuseaddr_port - set the socket's port and address reuse options + * @sock: socket + * + * Note that this function has to be called on all sockets that share the + * same port, and it must be called before binding. + */ +static void xs_sock_set_reuseport(struct socket *sock) +{ + int opt = 1; + + kernel_setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, + (char *)&opt, sizeof(opt)); +} + +static unsigned short xs_sock_getport(struct socket *sock) +{ + struct sockaddr_storage buf; + unsigned short port = 0; + + if (kernel_getsockname(sock, (struct sockaddr *)&buf) < 0) + goto out; + switch (buf.ss_family) { + case AF_INET6: + port = ntohs(((struct sockaddr_in6 *)&buf)->sin6_port); + break; + case AF_INET: + port = ntohs(((struct sockaddr_in *)&buf)->sin_port); + } +out: + return port; +} + +/** + * xs_set_port - reset the port number in the remote endpoint address + * @xprt: generic transport + * @port: new port number + * + */ +static void xs_set_port(struct rpc_xprt *xprt, unsigned short port) +{ + dprintk("RPC: setting port for xprt %p to %u\n", xprt, port); + + rpc_set_port(xs_addr(xprt), port); + xs_update_peer_port(xprt); +} + +static void xs_set_srcport(struct sock_xprt *transport, struct socket *sock) +{ + if (transport->srcport == 0) + transport->srcport = xs_sock_getport(sock); +} + +static unsigned short xs_get_srcport(struct sock_xprt *transport) +{ + unsigned short port = transport->srcport; + + if (port == 0 && transport->xprt.resvport) + port = xs_get_random_port(); + return port; +} + +static unsigned short xs_next_srcport(struct sock_xprt *transport, unsigned short port) +{ + if (transport->srcport != 0) + transport->srcport = 0; + if (!transport->xprt.resvport) + return 0; + if (port <= xprt_min_resvport || port > xprt_max_resvport) + return xprt_max_resvport; + return --port; +} +static int xs_bind(struct sock_xprt *transport, struct socket *sock) +{ + struct sockaddr_storage myaddr; + int err, nloop = 0; + unsigned short port = xs_get_srcport(transport); + unsigned short last; + + /* + * If we are asking for any ephemeral port (i.e. port == 0 && + * transport->xprt.resvport == 0), don't bind. Let the local + * port selection happen implicitly when the socket is used + * (for example at connect time). + * + * This ensures that we can continue to establish TCP + * connections even when all local ephemeral ports are already + * a part of some TCP connection. This makes no difference + * for UDP sockets, but also doens't harm them. + * + * If we're asking for any reserved port (i.e. port == 0 && + * transport->xprt.resvport == 1) xs_get_srcport above will + * ensure that port is non-zero and we will bind as needed. + */ + if (port == 0) + return 0; + + memcpy(&myaddr, &transport->srcaddr, transport->xprt.addrlen); + do { + rpc_set_port((struct sockaddr *)&myaddr, port); + err = kernel_bind(sock, (struct sockaddr *)&myaddr, + transport->xprt.addrlen); + if (err == 0) { + transport->srcport = port; + break; + } + last = port; + port = xs_next_srcport(transport, port); + if (port > last) + nloop++; + } while (err == -EADDRINUSE && nloop != 2); + + if (myaddr.ss_family == AF_INET) + dprintk("RPC: %s %pI4:%u: %s (%d)\n", __func__, + &((struct sockaddr_in *)&myaddr)->sin_addr, + port, err ? "failed" : "ok", err); + else + dprintk("RPC: %s %pI6:%u: %s (%d)\n", __func__, + &((struct sockaddr_in6 *)&myaddr)->sin6_addr, + port, err ? "failed" : "ok", err); + return err; +} + +/* + * We don't support autobind on AF_LOCAL sockets + */ +static void xs_local_rpcbind(struct rpc_task *task) +{ + xprt_set_bound(task->tk_xprt); +} + +static void xs_local_set_port(struct rpc_xprt *xprt, unsigned short port) +{ +} + +#ifdef CONFIG_DEBUG_LOCK_ALLOC +static struct lock_class_key xs_key[2]; +static struct lock_class_key xs_slock_key[2]; + +static inline void xs_reclassify_socketu(struct socket *sock) +{ + struct sock *sk = sock->sk; + + sock_lock_init_class_and_name(sk, "slock-AF_LOCAL-RPC", + &xs_slock_key[1], "sk_lock-AF_LOCAL-RPC", &xs_key[1]); +} + +static inline void xs_reclassify_socket4(struct socket *sock) +{ + struct sock *sk = sock->sk; + + sock_lock_init_class_and_name(sk, "slock-AF_INET-RPC", + &xs_slock_key[0], "sk_lock-AF_INET-RPC", &xs_key[0]); +} + +static inline void xs_reclassify_socket6(struct socket *sock) +{ + struct sock *sk = sock->sk; + + sock_lock_init_class_and_name(sk, "slock-AF_INET6-RPC", + &xs_slock_key[1], "sk_lock-AF_INET6-RPC", &xs_key[1]); +} + +static inline void xs_reclassify_socket(int family, struct socket *sock) +{ + if (WARN_ON_ONCE(!sock_allow_reclassification(sock->sk))) + return; + + switch (family) { + case AF_LOCAL: + xs_reclassify_socketu(sock); + break; + case AF_INET: + xs_reclassify_socket4(sock); + break; + case AF_INET6: + xs_reclassify_socket6(sock); + break; + } +} +#else +static inline void xs_reclassify_socket(int family, struct socket *sock) +{ +} +#endif + +static void xs_dummy_setup_socket(struct work_struct *work) +{ +} + +static struct socket *xs_create_sock(struct rpc_xprt *xprt, + struct sock_xprt *transport, int family, int type, + int protocol, bool reuseport) +{ + struct socket *sock; + int err; + + err = __sock_create(xprt->xprt_net, family, type, protocol, &sock, 1); + if (err < 0) { + dprintk("RPC: can't create %d transport socket (%d).\n", + protocol, -err); + goto out; + } + xs_reclassify_socket(family, sock); + + if (reuseport) + xs_sock_set_reuseport(sock); + + err = xs_bind(transport, sock); + if (err) { + sock_release(sock); + goto out; + } + + return sock; +out: + return ERR_PTR(err); +} + +static int xs_local_finish_connecting(struct rpc_xprt *xprt, + struct socket *sock) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, + xprt); + + if (!transport->inet) { + struct sock *sk = sock->sk; + + write_lock_bh(&sk->sk_callback_lock); + + xs_save_old_callbacks(transport, sk); + + sk->sk_user_data = xprt; + sk->sk_data_ready = xs_data_ready; + sk->sk_write_space = xs_udp_write_space; + sock_set_flag(sk, SOCK_FASYNC); + sk->sk_error_report = xs_error_report; + sk->sk_allocation = GFP_NOIO; + + xprt_clear_connected(xprt); + + /* Reset to new socket */ + transport->sock = sock; + transport->inet = sk; + + write_unlock_bh(&sk->sk_callback_lock); + } + + /* Tell the socket layer to start connecting... */ + xprt->stat.connect_count++; + xprt->stat.connect_start = jiffies; + return kernel_connect(sock, xs_addr(xprt), xprt->addrlen, 0); +} + +/** + * xs_local_setup_socket - create AF_LOCAL socket, connect to a local endpoint + * @transport: socket transport to connect + */ +static int xs_local_setup_socket(struct sock_xprt *transport) +{ + struct rpc_xprt *xprt = &transport->xprt; + struct socket *sock; + int status = -EIO; + + status = __sock_create(xprt->xprt_net, AF_LOCAL, + SOCK_STREAM, 0, &sock, 1); + if (status < 0) { + dprintk("RPC: can't create AF_LOCAL " + "transport socket (%d).\n", -status); + goto out; + } + xs_reclassify_socket(AF_LOCAL, sock); + + dprintk("RPC: worker connecting xprt %p via AF_LOCAL to %s\n", + xprt, xprt->address_strings[RPC_DISPLAY_ADDR]); + + status = xs_local_finish_connecting(xprt, sock); + trace_rpc_socket_connect(xprt, sock, status); + switch (status) { + case 0: + dprintk("RPC: xprt %p connected to %s\n", + xprt, xprt->address_strings[RPC_DISPLAY_ADDR]); + xprt_set_connected(xprt); + case -ENOBUFS: + break; + case -ENOENT: + dprintk("RPC: xprt %p: socket %s does not exist\n", + xprt, xprt->address_strings[RPC_DISPLAY_ADDR]); + break; + case -ECONNREFUSED: + dprintk("RPC: xprt %p: connection refused for %s\n", + xprt, xprt->address_strings[RPC_DISPLAY_ADDR]); + break; + default: + printk(KERN_ERR "%s: unhandled error (%d) connecting to %s\n", + __func__, -status, + xprt->address_strings[RPC_DISPLAY_ADDR]); + } + +out: + xprt_clear_connecting(xprt); + xprt_wake_pending_tasks(xprt, status); + return status; +} + +static void xs_local_connect(struct rpc_xprt *xprt, struct rpc_task *task) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + int ret; + + if (RPC_IS_ASYNC(task)) { + /* + * We want the AF_LOCAL connect to be resolved in the + * filesystem namespace of the process making the rpc + * call. Thus we connect synchronously. + * + * If we want to support asynchronous AF_LOCAL calls, + * we'll need to figure out how to pass a namespace to + * connect. + */ + rpc_exit(task, -ENOTCONN); + return; + } + ret = xs_local_setup_socket(transport); + if (ret && !RPC_IS_SOFTCONN(task)) + msleep_interruptible(15000); +} + +#if IS_ENABLED(CONFIG_SUNRPC_SWAP) +/* + * Note that this should be called with XPRT_LOCKED held (or when we otherwise + * know that we have exclusive access to the socket), to guard against + * races with xs_reset_transport. + */ +static void xs_set_memalloc(struct rpc_xprt *xprt) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, + xprt); + + /* + * If there's no sock, then we have nothing to set. The + * reconnecting process will get it for us. + */ + if (!transport->inet) + return; + if (atomic_read(&xprt->swapper)) + sk_set_memalloc(transport->inet); +} + +/** + * xs_enable_swap - Tag this transport as being used for swap. + * @xprt: transport to tag + * + * Take a reference to this transport on behalf of the rpc_clnt, and + * optionally mark it for swapping if it wasn't already. + */ +static int +xs_enable_swap(struct rpc_xprt *xprt) +{ + struct sock_xprt *xs = container_of(xprt, struct sock_xprt, xprt); + + if (atomic_inc_return(&xprt->swapper) != 1) + return 0; + if (wait_on_bit_lock(&xprt->state, XPRT_LOCKED, TASK_KILLABLE)) + return -ERESTARTSYS; + if (xs->inet) + sk_set_memalloc(xs->inet); + xprt_release_xprt(xprt, NULL); + return 0; +} + +/** + * xs_disable_swap - Untag this transport as being used for swap. + * @xprt: transport to tag + * + * Drop a "swapper" reference to this xprt on behalf of the rpc_clnt. If the + * swapper refcount goes to 0, untag the socket as a memalloc socket. + */ +static void +xs_disable_swap(struct rpc_xprt *xprt) +{ + struct sock_xprt *xs = container_of(xprt, struct sock_xprt, xprt); + + if (!atomic_dec_and_test(&xprt->swapper)) + return; + if (wait_on_bit_lock(&xprt->state, XPRT_LOCKED, TASK_KILLABLE)) + return; + if (xs->inet) + sk_clear_memalloc(xs->inet); + xprt_release_xprt(xprt, NULL); +} +#else +static void xs_set_memalloc(struct rpc_xprt *xprt) +{ +} + +static int +xs_enable_swap(struct rpc_xprt *xprt) +{ + return -EINVAL; +} + +static void +xs_disable_swap(struct rpc_xprt *xprt) +{ +} +#endif + +static void xs_udp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + + if (!transport->inet) { + struct sock *sk = sock->sk; + + write_lock_bh(&sk->sk_callback_lock); + + xs_save_old_callbacks(transport, sk); + + sk->sk_user_data = xprt; + sk->sk_data_ready = xs_data_ready; + sk->sk_write_space = xs_udp_write_space; + sock_set_flag(sk, SOCK_FASYNC); + sk->sk_allocation = GFP_NOIO; + + xprt_set_connected(xprt); + + /* Reset to new socket */ + transport->sock = sock; + transport->inet = sk; + + xs_set_memalloc(xprt); + + write_unlock_bh(&sk->sk_callback_lock); + } + xs_udp_do_set_buffer_size(xprt); + + xprt->stat.connect_start = jiffies; +} + +static void xs_udp_setup_socket(struct work_struct *work) +{ + struct sock_xprt *transport = + container_of(work, struct sock_xprt, connect_worker.work); + struct rpc_xprt *xprt = &transport->xprt; + struct socket *sock; + int status = -EIO; + + sock = xs_create_sock(xprt, transport, + xs_addr(xprt)->sa_family, SOCK_DGRAM, + IPPROTO_UDP, false); + if (IS_ERR(sock)) + goto out; + + dprintk("RPC: worker connecting xprt %p via %s to " + "%s (port %s)\n", xprt, + xprt->address_strings[RPC_DISPLAY_PROTO], + xprt->address_strings[RPC_DISPLAY_ADDR], + xprt->address_strings[RPC_DISPLAY_PORT]); + + xs_udp_finish_connecting(xprt, sock); + trace_rpc_socket_connect(xprt, sock, 0); + status = 0; +out: + xprt_clear_connecting(xprt); + xprt_unlock_connect(xprt, transport); + xprt_wake_pending_tasks(xprt, status); +} + +/** + * xs_tcp_shutdown - gracefully shut down a TCP socket + * @xprt: transport + * + * Initiates a graceful shutdown of the TCP socket by calling the + * equivalent of shutdown(SHUT_RDWR); + */ +static void xs_tcp_shutdown(struct rpc_xprt *xprt) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + struct socket *sock = transport->sock; + int skst = transport->inet ? transport->inet->sk_state : TCP_CLOSE; + + if (sock == NULL) + return; + switch (skst) { + default: + kernel_sock_shutdown(sock, SHUT_RDWR); + trace_rpc_socket_shutdown(xprt, sock); + break; + case TCP_CLOSE: + case TCP_TIME_WAIT: + xs_reset_transport(transport); + } +} + +static void xs_tcp_set_socket_timeouts(struct rpc_xprt *xprt, + struct socket *sock) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + unsigned int keepidle; + unsigned int keepcnt; + unsigned int opt_on = 1; + unsigned int timeo; + + spin_lock_bh(&xprt->transport_lock); + keepidle = DIV_ROUND_UP(xprt->timeout->to_initval, HZ); + keepcnt = xprt->timeout->to_retries + 1; + timeo = jiffies_to_msecs(xprt->timeout->to_initval) * + (xprt->timeout->to_retries + 1); + clear_bit(XPRT_SOCK_UPD_TIMEOUT, &transport->sock_state); + spin_unlock_bh(&xprt->transport_lock); + + /* TCP Keepalive options */ + kernel_setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, + (char *)&opt_on, sizeof(opt_on)); + kernel_setsockopt(sock, SOL_TCP, TCP_KEEPIDLE, + (char *)&keepidle, sizeof(keepidle)); + kernel_setsockopt(sock, SOL_TCP, TCP_KEEPINTVL, + (char *)&keepidle, sizeof(keepidle)); + kernel_setsockopt(sock, SOL_TCP, TCP_KEEPCNT, + (char *)&keepcnt, sizeof(keepcnt)); + + /* TCP user timeout (see RFC5482) */ + kernel_setsockopt(sock, SOL_TCP, TCP_USER_TIMEOUT, + (char *)&timeo, sizeof(timeo)); +} + +static void xs_tcp_set_connect_timeout(struct rpc_xprt *xprt, + unsigned long connect_timeout, + unsigned long reconnect_timeout) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + struct rpc_timeout to; + unsigned long initval; + + spin_lock_bh(&xprt->transport_lock); + if (reconnect_timeout < xprt->max_reconnect_timeout) + xprt->max_reconnect_timeout = reconnect_timeout; + if (connect_timeout < xprt->connect_timeout) { + memcpy(&to, xprt->timeout, sizeof(to)); + initval = DIV_ROUND_UP(connect_timeout, to.to_retries + 1); + /* Arbitrary lower limit */ + if (initval < XS_TCP_INIT_REEST_TO << 1) + initval = XS_TCP_INIT_REEST_TO << 1; + to.to_initval = initval; + to.to_maxval = initval; + memcpy(&transport->tcp_timeout, &to, + sizeof(transport->tcp_timeout)); + xprt->timeout = &transport->tcp_timeout; + xprt->connect_timeout = connect_timeout; + } + set_bit(XPRT_SOCK_UPD_TIMEOUT, &transport->sock_state); + spin_unlock_bh(&xprt->transport_lock); +} + +static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + int ret = -ENOTCONN; + + if (!transport->inet) { + struct sock *sk = sock->sk; + unsigned int addr_pref = IPV6_PREFER_SRC_PUBLIC; + + /* Avoid temporary address, they are bad for long-lived + * connections such as NFS mounts. + * RFC4941, section 3.6 suggests that: + * Individual applications, which have specific + * knowledge about the normal duration of connections, + * MAY override this as appropriate. + */ + kernel_setsockopt(sock, SOL_IPV6, IPV6_ADDR_PREFERENCES, + (char *)&addr_pref, sizeof(addr_pref)); + + xs_tcp_set_socket_timeouts(xprt, sock); + + write_lock_bh(&sk->sk_callback_lock); + + xs_save_old_callbacks(transport, sk); + + sk->sk_user_data = xprt; + sk->sk_data_ready = xs_data_ready; + sk->sk_state_change = xs_tcp_state_change; + sk->sk_write_space = xs_tcp_write_space; + sock_set_flag(sk, SOCK_FASYNC); + sk->sk_error_report = xs_error_report; + sk->sk_allocation = GFP_NOIO; + + /* socket options */ + sock_reset_flag(sk, SOCK_LINGER); + tcp_sk(sk)->nonagle |= TCP_NAGLE_OFF; + + xprt_clear_connected(xprt); + + /* Reset to new socket */ + transport->sock = sock; + transport->inet = sk; + + write_unlock_bh(&sk->sk_callback_lock); + } + + if (!xprt_bound(xprt)) + goto out; + + xs_set_memalloc(xprt); + + /* Tell the socket layer to start connecting... */ + xprt->stat.connect_count++; + xprt->stat.connect_start = jiffies; + set_bit(XPRT_SOCK_CONNECTING, &transport->sock_state); + ret = kernel_connect(sock, xs_addr(xprt), xprt->addrlen, O_NONBLOCK); + switch (ret) { + case 0: + xs_set_srcport(transport, sock); + /* fall through */ + case -EINPROGRESS: + /* SYN_SENT! */ + if (xprt->reestablish_timeout < XS_TCP_INIT_REEST_TO) + xprt->reestablish_timeout = XS_TCP_INIT_REEST_TO; + break; + case -EADDRNOTAVAIL: + /* Source port number is unavailable. Try a new one! */ + transport->srcport = 0; + } +out: + return ret; +} + +/** + * xs_tcp_setup_socket - create a TCP socket and connect to a remote endpoint + * + * Invoked by a work queue tasklet. + */ +static void xs_tcp_setup_socket(struct work_struct *work) +{ + struct sock_xprt *transport = + container_of(work, struct sock_xprt, connect_worker.work); + struct socket *sock = transport->sock; + struct rpc_xprt *xprt = &transport->xprt; + int status = -EIO; + + if (!sock) { + sock = xs_create_sock(xprt, transport, + xs_addr(xprt)->sa_family, SOCK_STREAM, + IPPROTO_TCP, true); + if (IS_ERR(sock)) { + status = PTR_ERR(sock); + goto out; + } + } + + dprintk("RPC: worker connecting xprt %p via %s to " + "%s (port %s)\n", xprt, + xprt->address_strings[RPC_DISPLAY_PROTO], + xprt->address_strings[RPC_DISPLAY_ADDR], + xprt->address_strings[RPC_DISPLAY_PORT]); + + status = xs_tcp_finish_connecting(xprt, sock); + trace_rpc_socket_connect(xprt, sock, status); + dprintk("RPC: %p connect status %d connected %d sock state %d\n", + xprt, -status, xprt_connected(xprt), + sock->sk->sk_state); + switch (status) { + default: + printk("%s: connect returned unhandled error %d\n", + __func__, status); + /* fall through */ + case -EADDRNOTAVAIL: + /* We're probably in TIME_WAIT. Get rid of existing socket, + * and retry + */ + xs_tcp_force_close(xprt); + break; + case 0: + case -EINPROGRESS: + case -EALREADY: + xprt_unlock_connect(xprt, transport); + return; + case -EINVAL: + /* Happens, for instance, if the user specified a link + * local IPv6 address without a scope-id. + */ + case -ECONNREFUSED: + case -ECONNRESET: + case -ENETDOWN: + case -ENETUNREACH: + case -EHOSTUNREACH: + case -EADDRINUSE: + case -ENOBUFS: + /* + * xs_tcp_force_close() wakes tasks with -EIO. + * We need to wake them first to ensure the + * correct error code. + */ + xprt_wake_pending_tasks(xprt, status); + xs_tcp_force_close(xprt); + goto out; + } + status = -EAGAIN; +out: + xprt_clear_connecting(xprt); + xprt_unlock_connect(xprt, transport); + xprt_wake_pending_tasks(xprt, status); +} + +static unsigned long xs_reconnect_delay(const struct rpc_xprt *xprt) +{ + unsigned long start, now = jiffies; + + start = xprt->stat.connect_start + xprt->reestablish_timeout; + if (time_after(start, now)) + return start - now; + return 0; +} + +static void xs_reconnect_backoff(struct rpc_xprt *xprt) +{ + xprt->reestablish_timeout <<= 1; + if (xprt->reestablish_timeout > xprt->max_reconnect_timeout) + xprt->reestablish_timeout = xprt->max_reconnect_timeout; + if (xprt->reestablish_timeout < XS_TCP_INIT_REEST_TO) + xprt->reestablish_timeout = XS_TCP_INIT_REEST_TO; +} + +/** + * xs_connect - connect a socket to a remote endpoint + * @xprt: pointer to transport structure + * @task: address of RPC task that manages state of connect request + * + * TCP: If the remote end dropped the connection, delay reconnecting. + * + * UDP socket connects are synchronous, but we use a work queue anyway + * to guarantee that even unprivileged user processes can set up a + * socket on a privileged port. + * + * If a UDP socket connect fails, the delay behavior here prevents + * retry floods (hard mounts). + */ +static void xs_connect(struct rpc_xprt *xprt, struct rpc_task *task) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + unsigned long delay = 0; + + WARN_ON_ONCE(!xprt_lock_connect(xprt, task, transport)); + + if (transport->sock != NULL) { + dprintk("RPC: xs_connect delayed xprt %p for %lu " + "seconds\n", + xprt, xprt->reestablish_timeout / HZ); + + /* Start by resetting any existing state */ + xs_reset_transport(transport); + + delay = xs_reconnect_delay(xprt); + xs_reconnect_backoff(xprt); + + } else + dprintk("RPC: xs_connect scheduled xprt %p\n", xprt); + + queue_delayed_work(xprtiod_workqueue, + &transport->connect_worker, + delay); +} + +/** + * xs_local_print_stats - display AF_LOCAL socket-specifc stats + * @xprt: rpc_xprt struct containing statistics + * @seq: output file + * + */ +static void xs_local_print_stats(struct rpc_xprt *xprt, struct seq_file *seq) +{ + long idle_time = 0; + + if (xprt_connected(xprt)) + idle_time = (long)(jiffies - xprt->last_used) / HZ; + + seq_printf(seq, "\txprt:\tlocal %lu %lu %lu %ld %lu %lu %lu " + "%llu %llu %lu %llu %llu\n", + xprt->stat.bind_count, + xprt->stat.connect_count, + xprt->stat.connect_time, + idle_time, + xprt->stat.sends, + xprt->stat.recvs, + xprt->stat.bad_xids, + xprt->stat.req_u, + xprt->stat.bklog_u, + xprt->stat.max_slots, + xprt->stat.sending_u, + xprt->stat.pending_u); +} + +/** + * xs_udp_print_stats - display UDP socket-specifc stats + * @xprt: rpc_xprt struct containing statistics + * @seq: output file + * + */ +static void xs_udp_print_stats(struct rpc_xprt *xprt, struct seq_file *seq) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + + seq_printf(seq, "\txprt:\tudp %u %lu %lu %lu %lu %llu %llu " + "%lu %llu %llu\n", + transport->srcport, + xprt->stat.bind_count, + xprt->stat.sends, + xprt->stat.recvs, + xprt->stat.bad_xids, + xprt->stat.req_u, + xprt->stat.bklog_u, + xprt->stat.max_slots, + xprt->stat.sending_u, + xprt->stat.pending_u); +} + +/** + * xs_tcp_print_stats - display TCP socket-specifc stats + * @xprt: rpc_xprt struct containing statistics + * @seq: output file + * + */ +static void xs_tcp_print_stats(struct rpc_xprt *xprt, struct seq_file *seq) +{ + struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); + long idle_time = 0; + + if (xprt_connected(xprt)) + idle_time = (long)(jiffies - xprt->last_used) / HZ; + + seq_printf(seq, "\txprt:\ttcp %u %lu %lu %lu %ld %lu %lu %lu " + "%llu %llu %lu %llu %llu\n", + transport->srcport, + xprt->stat.bind_count, + xprt->stat.connect_count, + xprt->stat.connect_time, + idle_time, + xprt->stat.sends, + xprt->stat.recvs, + xprt->stat.bad_xids, + xprt->stat.req_u, + xprt->stat.bklog_u, + xprt->stat.max_slots, + xprt->stat.sending_u, + xprt->stat.pending_u); +} + +/* + * Allocate a bunch of pages for a scratch buffer for the rpc code. The reason + * we allocate pages instead doing a kmalloc like rpc_malloc is because we want + * to use the server side send routines. + */ +static int bc_malloc(struct rpc_task *task) +{ + struct rpc_rqst *rqst = task->tk_rqstp; + size_t size = rqst->rq_callsize; + struct page *page; + struct rpc_buffer *buf; + + if (size > PAGE_SIZE - sizeof(struct rpc_buffer)) { + WARN_ONCE(1, "xprtsock: large bc buffer request (size %zu)\n", + size); + return -EINVAL; + } + + page = alloc_page(GFP_KERNEL); + if (!page) + return -ENOMEM; + + buf = page_address(page); + buf->len = PAGE_SIZE; + + rqst->rq_buffer = buf->data; + rqst->rq_rbuffer = (char *)rqst->rq_buffer + rqst->rq_callsize; + return 0; +} + +/* + * Free the space allocated in the bc_alloc routine + */ +static void bc_free(struct rpc_task *task) +{ + void *buffer = task->tk_rqstp->rq_buffer; + struct rpc_buffer *buf; + + buf = container_of(buffer, struct rpc_buffer, data); + free_page((unsigned long)buf); +} + +/* + * Use the svc_sock to send the callback. Must be called with svsk->sk_mutex + * held. Borrows heavily from svc_tcp_sendto and xs_tcp_send_request. + */ +static int bc_sendto(struct rpc_rqst *req) +{ + int len; + struct xdr_buf *xbufp = &req->rq_snd_buf; + struct rpc_xprt *xprt = req->rq_xprt; + struct sock_xprt *transport = + container_of(xprt, struct sock_xprt, xprt); + struct socket *sock = transport->sock; + unsigned long headoff; + unsigned long tailoff; + + xs_encode_stream_record_marker(xbufp); + + tailoff = (unsigned long)xbufp->tail[0].iov_base & ~PAGE_MASK; + headoff = (unsigned long)xbufp->head[0].iov_base & ~PAGE_MASK; + len = svc_send_common(sock, xbufp, + virt_to_page(xbufp->head[0].iov_base), headoff, + xbufp->tail[0].iov_base, tailoff); + + if (len != xbufp->len) { + printk(KERN_NOTICE "Error sending entire callback!\n"); + len = -EAGAIN; + } + + return len; +} + +/* + * The send routine. Borrows from svc_send + */ +static int bc_send_request(struct rpc_task *task) +{ + struct rpc_rqst *req = task->tk_rqstp; + struct svc_xprt *xprt; + int len; + + dprintk("sending request with xid: %08x\n", ntohl(req->rq_xid)); + /* + * Get the server socket associated with this callback xprt + */ + xprt = req->rq_xprt->bc_xprt; + + /* + * Grab the mutex to serialize data as the connection is shared + * with the fore channel + */ + if (!mutex_trylock(&xprt->xpt_mutex)) { + rpc_sleep_on(&xprt->xpt_bc_pending, task, NULL); + if (!mutex_trylock(&xprt->xpt_mutex)) + return -EAGAIN; + rpc_wake_up_queued_task(&xprt->xpt_bc_pending, task); + } + if (test_bit(XPT_DEAD, &xprt->xpt_flags)) + len = -ENOTCONN; + else + len = bc_sendto(req); + mutex_unlock(&xprt->xpt_mutex); + + if (len > 0) + len = 0; + + return len; +} + +/* + * The close routine. Since this is client initiated, we do nothing + */ + +static void bc_close(struct rpc_xprt *xprt) +{ +} + +/* + * The xprt destroy routine. Again, because this connection is client + * initiated, we do nothing + */ + +static void bc_destroy(struct rpc_xprt *xprt) +{ + dprintk("RPC: bc_destroy xprt %p\n", xprt); + + xs_xprt_free(xprt); + module_put(THIS_MODULE); +} + +static const struct rpc_xprt_ops xs_local_ops = { + .reserve_xprt = xprt_reserve_xprt, + .release_xprt = xs_tcp_release_xprt, + .alloc_slot = xprt_alloc_slot, + .free_slot = xprt_free_slot, + .rpcbind = xs_local_rpcbind, + .set_port = xs_local_set_port, + .connect = xs_local_connect, + .buf_alloc = rpc_malloc, + .buf_free = rpc_free, + .send_request = xs_local_send_request, + .set_retrans_timeout = xprt_set_retrans_timeout_def, + .close = xs_close, + .destroy = xs_destroy, + .print_stats = xs_local_print_stats, + .enable_swap = xs_enable_swap, + .disable_swap = xs_disable_swap, +}; + +static const struct rpc_xprt_ops xs_udp_ops = { + .set_buffer_size = xs_udp_set_buffer_size, + .reserve_xprt = xprt_reserve_xprt_cong, + .release_xprt = xprt_release_xprt_cong, + .alloc_slot = xprt_alloc_slot, + .free_slot = xprt_free_slot, + .rpcbind = rpcb_getport_async, + .set_port = xs_set_port, + .connect = xs_connect, + .buf_alloc = rpc_malloc, + .buf_free = rpc_free, + .send_request = xs_udp_send_request, + .set_retrans_timeout = xprt_set_retrans_timeout_rtt, + .timer = xs_udp_timer, + .release_request = xprt_release_rqst_cong, + .close = xs_close, + .destroy = xs_destroy, + .print_stats = xs_udp_print_stats, + .enable_swap = xs_enable_swap, + .disable_swap = xs_disable_swap, + .inject_disconnect = xs_inject_disconnect, +}; + +static const struct rpc_xprt_ops xs_tcp_ops = { + .reserve_xprt = xprt_reserve_xprt, + .release_xprt = xs_tcp_release_xprt, + .alloc_slot = xprt_lock_and_alloc_slot, + .free_slot = xprt_free_slot, + .rpcbind = rpcb_getport_async, + .set_port = xs_set_port, + .connect = xs_connect, + .buf_alloc = rpc_malloc, + .buf_free = rpc_free, + .send_request = xs_tcp_send_request, + .set_retrans_timeout = xprt_set_retrans_timeout_def, + .close = xs_tcp_shutdown, + .destroy = xs_destroy, + .set_connect_timeout = xs_tcp_set_connect_timeout, + .print_stats = xs_tcp_print_stats, + .enable_swap = xs_enable_swap, + .disable_swap = xs_disable_swap, + .inject_disconnect = xs_inject_disconnect, +#ifdef CONFIG_SUNRPC_BACKCHANNEL + .bc_setup = xprt_setup_bc, + .bc_up = xs_tcp_bc_up, + .bc_maxpayload = xs_tcp_bc_maxpayload, + .bc_free_rqst = xprt_free_bc_rqst, + .bc_destroy = xprt_destroy_bc, +#endif +}; + +/* + * The rpc_xprt_ops for the server backchannel + */ + +static const struct rpc_xprt_ops bc_tcp_ops = { + .reserve_xprt = xprt_reserve_xprt, + .release_xprt = xprt_release_xprt, + .alloc_slot = xprt_alloc_slot, + .free_slot = xprt_free_slot, + .buf_alloc = bc_malloc, + .buf_free = bc_free, + .send_request = bc_send_request, + .set_retrans_timeout = xprt_set_retrans_timeout_def, + .close = bc_close, + .destroy = bc_destroy, + .print_stats = xs_tcp_print_stats, + .enable_swap = xs_enable_swap, + .disable_swap = xs_disable_swap, + .inject_disconnect = xs_inject_disconnect, +}; + +static int xs_init_anyaddr(const int family, struct sockaddr *sap) +{ + static const struct sockaddr_in sin = { + .sin_family = AF_INET, + .sin_addr.s_addr = htonl(INADDR_ANY), + }; + static const struct sockaddr_in6 sin6 = { + .sin6_family = AF_INET6, + .sin6_addr = IN6ADDR_ANY_INIT, + }; + + switch (family) { + case AF_LOCAL: + break; + case AF_INET: + memcpy(sap, &sin, sizeof(sin)); + break; + case AF_INET6: + memcpy(sap, &sin6, sizeof(sin6)); + break; + default: + dprintk("RPC: %s: Bad address family\n", __func__); + return -EAFNOSUPPORT; + } + return 0; +} + +static struct rpc_xprt *xs_setup_xprt(struct xprt_create *args, + unsigned int slot_table_size, + unsigned int max_slot_table_size) +{ + struct rpc_xprt *xprt; + struct sock_xprt *new; + + if (args->addrlen > sizeof(xprt->addr)) { + dprintk("RPC: xs_setup_xprt: address too large\n"); + return ERR_PTR(-EBADF); + } + + xprt = xprt_alloc(args->net, sizeof(*new), slot_table_size, + max_slot_table_size); + if (xprt == NULL) { + dprintk("RPC: xs_setup_xprt: couldn't allocate " + "rpc_xprt\n"); + return ERR_PTR(-ENOMEM); + } + + new = container_of(xprt, struct sock_xprt, xprt); + mutex_init(&new->recv_mutex); + memcpy(&xprt->addr, args->dstaddr, args->addrlen); + xprt->addrlen = args->addrlen; + if (args->srcaddr) + memcpy(&new->srcaddr, args->srcaddr, args->addrlen); + else { + int err; + err = xs_init_anyaddr(args->dstaddr->sa_family, + (struct sockaddr *)&new->srcaddr); + if (err != 0) { + xprt_free(xprt); + return ERR_PTR(err); + } + } + + return xprt; +} + +static const struct rpc_timeout xs_local_default_timeout = { + .to_initval = 10 * HZ, + .to_maxval = 10 * HZ, + .to_retries = 2, +}; + +/** + * xs_setup_local - Set up transport to use an AF_LOCAL socket + * @args: rpc transport creation arguments + * + * AF_LOCAL is a "tpi_cots_ord" transport, just like TCP + */ +static struct rpc_xprt *xs_setup_local(struct xprt_create *args) +{ + struct sockaddr_un *sun = (struct sockaddr_un *)args->dstaddr; + struct sock_xprt *transport; + struct rpc_xprt *xprt; + struct rpc_xprt *ret; + + xprt = xs_setup_xprt(args, xprt_tcp_slot_table_entries, + xprt_max_tcp_slot_table_entries); + if (IS_ERR(xprt)) + return xprt; + transport = container_of(xprt, struct sock_xprt, xprt); + + xprt->prot = 0; + xprt->tsh_size = sizeof(rpc_fraghdr) / sizeof(u32); + xprt->max_payload = RPC_MAX_FRAGMENT_SIZE; + + xprt->bind_timeout = XS_BIND_TO; + xprt->reestablish_timeout = XS_TCP_INIT_REEST_TO; + xprt->idle_timeout = XS_IDLE_DISC_TO; + + xprt->ops = &xs_local_ops; + xprt->timeout = &xs_local_default_timeout; + + INIT_WORK(&transport->recv_worker, xs_local_data_receive_workfn); + INIT_DELAYED_WORK(&transport->connect_worker, + xs_dummy_setup_socket); + + switch (sun->sun_family) { + case AF_LOCAL: + if (sun->sun_path[0] != '/') { + dprintk("RPC: bad AF_LOCAL address: %s\n", + sun->sun_path); + ret = ERR_PTR(-EINVAL); + goto out_err; + } + xprt_set_bound(xprt); + xs_format_peer_addresses(xprt, "local", RPCBIND_NETID_LOCAL); + ret = ERR_PTR(xs_local_setup_socket(transport)); + if (ret) + goto out_err; + break; + default: + ret = ERR_PTR(-EAFNOSUPPORT); + goto out_err; + } + + dprintk("RPC: set up xprt to %s via AF_LOCAL\n", + xprt->address_strings[RPC_DISPLAY_ADDR]); + + if (try_module_get(THIS_MODULE)) + return xprt; + ret = ERR_PTR(-EINVAL); +out_err: + xs_xprt_free(xprt); + return ret; +} + +static const struct rpc_timeout xs_udp_default_timeout = { + .to_initval = 5 * HZ, + .to_maxval = 30 * HZ, + .to_increment = 5 * HZ, + .to_retries = 5, +}; + +/** + * xs_setup_udp - Set up transport to use a UDP socket + * @args: rpc transport creation arguments + * + */ +static struct rpc_xprt *xs_setup_udp(struct xprt_create *args) +{ + struct sockaddr *addr = args->dstaddr; + struct rpc_xprt *xprt; + struct sock_xprt *transport; + struct rpc_xprt *ret; + + xprt = xs_setup_xprt(args, xprt_udp_slot_table_entries, + xprt_udp_slot_table_entries); + if (IS_ERR(xprt)) + return xprt; + transport = container_of(xprt, struct sock_xprt, xprt); + + xprt->prot = IPPROTO_UDP; + xprt->tsh_size = 0; + /* XXX: header size can vary due to auth type, IPv6, etc. */ + xprt->max_payload = (1U << 16) - (MAX_HEADER << 3); + + xprt->bind_timeout = XS_BIND_TO; + xprt->reestablish_timeout = XS_UDP_REEST_TO; + xprt->idle_timeout = XS_IDLE_DISC_TO; + + xprt->ops = &xs_udp_ops; + + xprt->timeout = &xs_udp_default_timeout; + + INIT_WORK(&transport->recv_worker, xs_udp_data_receive_workfn); + INIT_DELAYED_WORK(&transport->connect_worker, xs_udp_setup_socket); + + switch (addr->sa_family) { + case AF_INET: + if (((struct sockaddr_in *)addr)->sin_port != htons(0)) + xprt_set_bound(xprt); + + xs_format_peer_addresses(xprt, "udp", RPCBIND_NETID_UDP); + break; + case AF_INET6: + if (((struct sockaddr_in6 *)addr)->sin6_port != htons(0)) + xprt_set_bound(xprt); + + xs_format_peer_addresses(xprt, "udp", RPCBIND_NETID_UDP6); + break; + default: + ret = ERR_PTR(-EAFNOSUPPORT); + goto out_err; + } + + if (xprt_bound(xprt)) + dprintk("RPC: set up xprt to %s (port %s) via %s\n", + xprt->address_strings[RPC_DISPLAY_ADDR], + xprt->address_strings[RPC_DISPLAY_PORT], + xprt->address_strings[RPC_DISPLAY_PROTO]); + else + dprintk("RPC: set up xprt to %s (autobind) via %s\n", + xprt->address_strings[RPC_DISPLAY_ADDR], + xprt->address_strings[RPC_DISPLAY_PROTO]); + + if (try_module_get(THIS_MODULE)) + return xprt; + ret = ERR_PTR(-EINVAL); +out_err: + xs_xprt_free(xprt); + return ret; +} + +static const struct rpc_timeout xs_tcp_default_timeout = { + .to_initval = 60 * HZ, + .to_maxval = 60 * HZ, + .to_retries = 2, +}; + +/** + * xs_setup_tcp - Set up transport to use a TCP socket + * @args: rpc transport creation arguments + * + */ +static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args) +{ + struct sockaddr *addr = args->dstaddr; + struct rpc_xprt *xprt; + struct sock_xprt *transport; + struct rpc_xprt *ret; + unsigned int max_slot_table_size = xprt_max_tcp_slot_table_entries; + + if (args->flags & XPRT_CREATE_INFINITE_SLOTS) + max_slot_table_size = RPC_MAX_SLOT_TABLE_LIMIT; + + xprt = xs_setup_xprt(args, xprt_tcp_slot_table_entries, + max_slot_table_size); + if (IS_ERR(xprt)) + return xprt; + transport = container_of(xprt, struct sock_xprt, xprt); + + xprt->prot = IPPROTO_TCP; + xprt->tsh_size = sizeof(rpc_fraghdr) / sizeof(u32); + xprt->max_payload = RPC_MAX_FRAGMENT_SIZE; + + xprt->bind_timeout = XS_BIND_TO; + xprt->reestablish_timeout = XS_TCP_INIT_REEST_TO; + xprt->idle_timeout = XS_IDLE_DISC_TO; + + xprt->ops = &xs_tcp_ops; + xprt->timeout = &xs_tcp_default_timeout; + + xprt->max_reconnect_timeout = xprt->timeout->to_maxval; + xprt->connect_timeout = xprt->timeout->to_initval * + (xprt->timeout->to_retries + 1); + + INIT_WORK(&transport->recv_worker, xs_tcp_data_receive_workfn); + INIT_DELAYED_WORK(&transport->connect_worker, xs_tcp_setup_socket); + + switch (addr->sa_family) { + case AF_INET: + if (((struct sockaddr_in *)addr)->sin_port != htons(0)) + xprt_set_bound(xprt); + + xs_format_peer_addresses(xprt, "tcp", RPCBIND_NETID_TCP); + break; + case AF_INET6: + if (((struct sockaddr_in6 *)addr)->sin6_port != htons(0)) + xprt_set_bound(xprt); + + xs_format_peer_addresses(xprt, "tcp", RPCBIND_NETID_TCP6); + break; + default: + ret = ERR_PTR(-EAFNOSUPPORT); + goto out_err; + } + + if (xprt_bound(xprt)) + dprintk("RPC: set up xprt to %s (port %s) via %s\n", + xprt->address_strings[RPC_DISPLAY_ADDR], + xprt->address_strings[RPC_DISPLAY_PORT], + xprt->address_strings[RPC_DISPLAY_PROTO]); + else + dprintk("RPC: set up xprt to %s (autobind) via %s\n", + xprt->address_strings[RPC_DISPLAY_ADDR], + xprt->address_strings[RPC_DISPLAY_PROTO]); + + if (try_module_get(THIS_MODULE)) + return xprt; + ret = ERR_PTR(-EINVAL); +out_err: + xs_xprt_free(xprt); + return ret; +} + +/** + * xs_setup_bc_tcp - Set up transport to use a TCP backchannel socket + * @args: rpc transport creation arguments + * + */ +static struct rpc_xprt *xs_setup_bc_tcp(struct xprt_create *args) +{ + struct sockaddr *addr = args->dstaddr; + struct rpc_xprt *xprt; + struct sock_xprt *transport; + struct svc_sock *bc_sock; + struct rpc_xprt *ret; + + xprt = xs_setup_xprt(args, xprt_tcp_slot_table_entries, + xprt_tcp_slot_table_entries); + if (IS_ERR(xprt)) + return xprt; + transport = container_of(xprt, struct sock_xprt, xprt); + + xprt->prot = IPPROTO_TCP; + xprt->tsh_size = sizeof(rpc_fraghdr) / sizeof(u32); + xprt->max_payload = RPC_MAX_FRAGMENT_SIZE; + xprt->timeout = &xs_tcp_default_timeout; + + /* backchannel */ + xprt_set_bound(xprt); + xprt->bind_timeout = 0; + xprt->reestablish_timeout = 0; + xprt->idle_timeout = 0; + + xprt->ops = &bc_tcp_ops; + + switch (addr->sa_family) { + case AF_INET: + xs_format_peer_addresses(xprt, "tcp", + RPCBIND_NETID_TCP); + break; + case AF_INET6: + xs_format_peer_addresses(xprt, "tcp", + RPCBIND_NETID_TCP6); + break; + default: + ret = ERR_PTR(-EAFNOSUPPORT); + goto out_err; + } + + dprintk("RPC: set up xprt to %s (port %s) via %s\n", + xprt->address_strings[RPC_DISPLAY_ADDR], + xprt->address_strings[RPC_DISPLAY_PORT], + xprt->address_strings[RPC_DISPLAY_PROTO]); + + /* + * Once we've associated a backchannel xprt with a connection, + * we want to keep it around as long as the connection lasts, + * in case we need to start using it for a backchannel again; + * this reference won't be dropped until bc_xprt is destroyed. + */ + xprt_get(xprt); + args->bc_xprt->xpt_bc_xprt = xprt; + xprt->bc_xprt = args->bc_xprt; + bc_sock = container_of(args->bc_xprt, struct svc_sock, sk_xprt); + transport->sock = bc_sock->sk_sock; + transport->inet = bc_sock->sk_sk; + + /* + * Since we don't want connections for the backchannel, we set + * the xprt status to connected + */ + xprt_set_connected(xprt); + + if (try_module_get(THIS_MODULE)) + return xprt; + + args->bc_xprt->xpt_bc_xprt = NULL; + args->bc_xprt->xpt_bc_xps = NULL; + xprt_put(xprt); + ret = ERR_PTR(-EINVAL); +out_err: + xs_xprt_free(xprt); + return ret; +} + +static struct xprt_class xs_local_transport = { + .list = LIST_HEAD_INIT(xs_local_transport.list), + .name = "named UNIX socket", + .owner = THIS_MODULE, + .ident = XPRT_TRANSPORT_LOCAL, + .setup = xs_setup_local, +}; + +static struct xprt_class xs_udp_transport = { + .list = LIST_HEAD_INIT(xs_udp_transport.list), + .name = "udp", + .owner = THIS_MODULE, + .ident = XPRT_TRANSPORT_UDP, + .setup = xs_setup_udp, +}; + +static struct xprt_class xs_tcp_transport = { + .list = LIST_HEAD_INIT(xs_tcp_transport.list), + .name = "tcp", + .owner = THIS_MODULE, + .ident = XPRT_TRANSPORT_TCP, + .setup = xs_setup_tcp, +}; + +static struct xprt_class xs_bc_tcp_transport = { + .list = LIST_HEAD_INIT(xs_bc_tcp_transport.list), + .name = "tcp NFSv4.1 backchannel", + .owner = THIS_MODULE, + .ident = XPRT_TRANSPORT_BC_TCP, + .setup = xs_setup_bc_tcp, +}; + +/** + * init_socket_xprt - set up xprtsock's sysctls, register with RPC client + * + */ +int init_socket_xprt(void) +{ +#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) + if (!sunrpc_table_header) + sunrpc_table_header = register_sysctl_table(sunrpc_table); +#endif + + xprt_register_transport(&xs_local_transport); + xprt_register_transport(&xs_udp_transport); + xprt_register_transport(&xs_tcp_transport); + xprt_register_transport(&xs_bc_tcp_transport); + + return 0; +} + +/** + * cleanup_socket_xprt - remove xprtsock's sysctls, unregister + * + */ +void cleanup_socket_xprt(void) +{ +#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) + if (sunrpc_table_header) { + unregister_sysctl_table(sunrpc_table_header); + sunrpc_table_header = NULL; + } +#endif + + xprt_unregister_transport(&xs_local_transport); + xprt_unregister_transport(&xs_udp_transport); + xprt_unregister_transport(&xs_tcp_transport); + xprt_unregister_transport(&xs_bc_tcp_transport); +} + +static int param_set_uint_minmax(const char *val, + const struct kernel_param *kp, + unsigned int min, unsigned int max) +{ + unsigned int num; + int ret; + + if (!val) + return -EINVAL; + ret = kstrtouint(val, 0, &num); + if (ret) + return ret; + if (num < min || num > max) + return -EINVAL; + *((unsigned int *)kp->arg) = num; + return 0; +} + +static int param_set_portnr(const char *val, const struct kernel_param *kp) +{ + if (kp->arg == &xprt_min_resvport) + return param_set_uint_minmax(val, kp, + RPC_MIN_RESVPORT, + xprt_max_resvport); + return param_set_uint_minmax(val, kp, + xprt_min_resvport, + RPC_MAX_RESVPORT); +} + +static const struct kernel_param_ops param_ops_portnr = { + .set = param_set_portnr, + .get = param_get_uint, +}; + +#define param_check_portnr(name, p) \ + __param_check(name, p, unsigned int); + +module_param_named(min_resvport, xprt_min_resvport, portnr, 0644); +module_param_named(max_resvport, xprt_max_resvport, portnr, 0644); + +static int param_set_slot_table_size(const char *val, + const struct kernel_param *kp) +{ + return param_set_uint_minmax(val, kp, + RPC_MIN_SLOT_TABLE, + RPC_MAX_SLOT_TABLE); +} + +static const struct kernel_param_ops param_ops_slot_table_size = { + .set = param_set_slot_table_size, + .get = param_get_uint, +}; + +#define param_check_slot_table_size(name, p) \ + __param_check(name, p, unsigned int); + +static int param_set_max_slot_table_size(const char *val, + const struct kernel_param *kp) +{ + return param_set_uint_minmax(val, kp, + RPC_MIN_SLOT_TABLE, + RPC_MAX_SLOT_TABLE_LIMIT); +} + +static const struct kernel_param_ops param_ops_max_slot_table_size = { + .set = param_set_max_slot_table_size, + .get = param_get_uint, +}; + +#define param_check_max_slot_table_size(name, p) \ + __param_check(name, p, unsigned int); + +module_param_named(tcp_slot_table_entries, xprt_tcp_slot_table_entries, + slot_table_size, 0644); +module_param_named(tcp_max_slot_table_entries, xprt_max_tcp_slot_table_entries, + max_slot_table_size, 0644); +module_param_named(udp_slot_table_entries, xprt_udp_slot_table_entries, + slot_table_size, 0644); \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/sunrpc/xprtsock.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/sunrpc/xprtsock.c.yml new file mode 100644 index 00000000000..12bea039ca6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/net/sunrpc/xprtsock.c.yml @@ -0,0 +1,16 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 1998 Red Hat TCP + - (c) 1998 Red Hat TCP + - (c) 1999 Dave Airlie, University of Limerick, Ireland + - (c) 1999 Trond Myklebust + - (c) 2005 Chuck Lever +holders: + - Red Hat TCP + - Red Hat TCP + - Dave Airlie, University of Limerick, Ireland + - Trond Myklebust + - Chuck Lever diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci b/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci new file mode 100644 index 00000000000..29b6cff7fcf --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: GPL-2.0 +/// Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE +/// for debugfs files. +/// +//# Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file() +//# imposes some significant overhead as compared to +//# DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe(). +// +// Copyright (C): 2016 Nicolai Stange +// Options: --no-includes +// + +virtual context +virtual patch +virtual org +virtual report + +@dsa@ +declarer name DEFINE_SIMPLE_ATTRIBUTE; +identifier dsa_fops; +expression dsa_get, dsa_set, dsa_fmt; +position p; +@@ +DEFINE_SIMPLE_ATTRIBUTE@p(dsa_fops, dsa_get, dsa_set, dsa_fmt); + +@dcf@ +expression name, mode, parent, data; +identifier dsa.dsa_fops; +@@ +debugfs_create_file(name, mode, parent, data, &dsa_fops) + + +@context_dsa depends on context && dcf@ +declarer name DEFINE_DEBUGFS_ATTRIBUTE; +identifier dsa.dsa_fops; +expression dsa.dsa_get, dsa.dsa_set, dsa.dsa_fmt; +@@ +* DEFINE_SIMPLE_ATTRIBUTE(dsa_fops, dsa_get, dsa_set, dsa_fmt); + + +@patch_dcf depends on patch expression@ +expression name, mode, parent, data; +identifier dsa.dsa_fops; +@@ +- debugfs_create_file(name, mode, parent, data, &dsa_fops) ++ debugfs_create_file_unsafe(name, mode, parent, data, &dsa_fops) + +@patch_dsa depends on patch_dcf && patch@ +identifier dsa.dsa_fops; +expression dsa.dsa_get, dsa.dsa_set, dsa.dsa_fmt; +@@ +- DEFINE_SIMPLE_ATTRIBUTE(dsa_fops, dsa_get, dsa_set, dsa_fmt); ++ DEFINE_DEBUGFS_ATTRIBUTE(dsa_fops, dsa_get, dsa_set, dsa_fmt); + + +@script:python depends on org && dcf@ +fops << dsa.dsa_fops; +p << dsa.p; +@@ +msg="%s should be defined with DEFINE_DEBUGFS_ATTRIBUTE" % (fops) +coccilib.org.print_todo(p[0], msg) + +@script:python depends on report && dcf@ +fops << dsa.dsa_fops; +p << dsa.p; +@@ +msg="WARNING: %s should be defined with DEFINE_DEBUGFS_ATTRIBUTE" % (fops) +coccilib.report.print_report(p[0], msg) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci.yml new file mode 100644 index 00000000000..8b16db63706 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2016 Nicolai Stange Options +holders: + - Nicolai Stange Options diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/drm-get-put.cocci b/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/drm-get-put.cocci new file mode 100644 index 00000000000..7abacad1699 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/drm-get-put.cocci @@ -0,0 +1,78 @@ +// SPDX-License-Identifier: GPL-2.0 +/// +/// Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and +/// drm_*_unreference() helpers. +/// +// Confidence: High +// Copyright: (C) 2017 NVIDIA Corporation +// Options: --no-includes --include-headers +// + +virtual patch +virtual report + +@depends on patch@ +expression object; +@@ + +( +- drm_connector_reference(object) ++ drm_connector_get(object) +| +- drm_connector_unreference(object) ++ drm_connector_put(object) +| +- drm_framebuffer_reference(object) ++ drm_framebuffer_get(object) +| +- drm_framebuffer_unreference(object) ++ drm_framebuffer_put(object) +| +- drm_gem_object_reference(object) ++ drm_gem_object_get(object) +| +- drm_gem_object_unreference(object) ++ drm_gem_object_put(object) +| +- __drm_gem_object_unreference(object) ++ __drm_gem_object_put(object) +| +- drm_gem_object_unreference_unlocked(object) ++ drm_gem_object_put_unlocked(object) +| +- drm_dev_unref(object) ++ drm_dev_put(object) +) + +@r depends on report@ +expression object; +position p; +@@ + +( +drm_connector_unreference@p(object) +| +drm_connector_reference@p(object) +| +drm_framebuffer_unreference@p(object) +| +drm_framebuffer_reference@p(object) +| +drm_gem_object_unreference@p(object) +| +drm_gem_object_reference@p(object) +| +__drm_gem_object_unreference(object) +| +drm_gem_object_unreference_unlocked(object) +| +drm_dev_unref@p(object) +) + +@script:python depends on report@ +object << r.object; +p << r.p; +@@ + +msg="WARNING: use get/put helpers to reference and dereference %s" % (object) +coccilib.report.print_report(p[0], msg) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/drm-get-put.cocci.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/drm-get-put.cocci.yml new file mode 100644 index 00000000000..7798da4dd7a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/drm-get-put.cocci.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2017 NVIDIA Corporation Options +holders: + - NVIDIA Corporation Options diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/pm_runtime.cocci b/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/pm_runtime.cocci new file mode 100644 index 00000000000..fff3c371f4d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/pm_runtime.cocci @@ -0,0 +1,113 @@ +/// Make sure pm_runtime_* calls does not use unnecessary IS_ERR_VALUE +/// +// Keywords: pm_runtime +// Confidence: Medium +// Copyright (C) 2013 Texas Instruments Incorporated - GPLv2. +// URL: http://coccinelle.lip6.fr/ +// Options: --include-headers + +virtual patch +virtual context +virtual org +virtual report + +//---------------------------------------------------------- +// Detection +//---------------------------------------------------------- + +@runtime_bad_err_handle exists@ +expression ret; +position p; +@@ +( +ret@p = \(pm_runtime_idle\| + pm_runtime_suspend\| + pm_runtime_autosuspend\| + pm_runtime_resume\| + pm_request_idle\| + pm_request_resume\| + pm_request_autosuspend\| + pm_runtime_get\| + pm_runtime_get_sync\| + pm_runtime_put\| + pm_runtime_put_autosuspend\| + pm_runtime_put_sync\| + pm_runtime_put_sync_suspend\| + pm_runtime_put_sync_autosuspend\| + pm_runtime_set_active\| + pm_schedule_suspend\| + pm_runtime_barrier\| + pm_generic_runtime_suspend\| + pm_generic_runtime_resume\)(...); +... +IS_ERR_VALUE(ret) +... +) + +//---------------------------------------------------------- +// For context mode +//---------------------------------------------------------- + +@depends on context@ +identifier pm_runtime_api; +expression ret; +position runtime_bad_err_handle.p; +@@ +( +ret@p = pm_runtime_api(...); +... +* IS_ERR_VALUE(ret) +... +) + +//---------------------------------------------------------- +// For patch mode +//---------------------------------------------------------- + +@depends on patch@ +identifier pm_runtime_api; +expression ret; +position runtime_bad_err_handle.p; +@@ +( +ret@p = pm_runtime_api(...); +... +- IS_ERR_VALUE(ret) ++ ret < 0 +... +) + +//---------------------------------------------------------- +// For org and report mode +//---------------------------------------------------------- + +@r depends on (org || report) exists@ +position p1, p2; +identifier pm_runtime_api; +expression ret; +position runtime_bad_err_handle.p; +@@ +( +ret@p = pm_runtime_api@p1(...); +... +IS_ERR_VALUE@p2(ret) +... +) + +@script:python depends on org@ +p1 << r.p1; +p2 << r.p2; +pm_runtime_api << r.pm_runtime_api; +@@ + +cocci.print_main(pm_runtime_api,p1) +cocci.print_secs("IS_ERR_VALUE",p2) + +@script:python depends on report@ +p1 << r.p1; +p2 << r.p2; +pm_runtime_api << r.pm_runtime_api; +@@ + +msg = "%s returns < 0 as error. Unecessary IS_ERR_VALUE at line %s" % (pm_runtime_api, p2[0].line) +coccilib.report.print_report(p1[0],msg) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/pm_runtime.cocci.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/pm_runtime.cocci.yml new file mode 100644 index 00000000000..52f2576a997 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/scripts/coccinelle/api/pm_runtime.cocci.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2013 Texas Instruments Incorporated - GPLv2 +holders: + - Texas Instruments Incorporated - GPLv2 diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/core/seq/seq_memory.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/core/seq/seq_memory.c new file mode 100644 index 00000000000..b0947c49193 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/core/seq/seq_memory.c @@ -0,0 +1,518 @@ +/* + * ALSA sequencer Memory Manager + * Copyright (c) 1998 by Frank van de Pol + * Jaroslav Kysela + * 2000 by Takashi Iwai + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include +#include + +#include +#include "seq_memory.h" +#include "seq_queue.h" +#include "seq_info.h" +#include "seq_lock.h" + +static inline int snd_seq_pool_available(struct snd_seq_pool *pool) +{ + return pool->total_elements - atomic_read(&pool->counter); +} + +static inline int snd_seq_output_ok(struct snd_seq_pool *pool) +{ + return snd_seq_pool_available(pool) >= pool->room; +} + +/* + * Variable length event: + * The event like sysex uses variable length type. + * The external data may be stored in three different formats. + * 1) kernel space + * This is the normal case. + * ext.data.len = length + * ext.data.ptr = buffer pointer + * 2) user space + * When an event is generated via read(), the external data is + * kept in user space until expanded. + * ext.data.len = length | SNDRV_SEQ_EXT_USRPTR + * ext.data.ptr = userspace pointer + * 3) chained cells + * When the variable length event is enqueued (in prioq or fifo), + * the external data is decomposed to several cells. + * ext.data.len = length | SNDRV_SEQ_EXT_CHAINED + * ext.data.ptr = the additiona cell head + * -> cell.next -> cell.next -> .. + */ + +/* + * exported: + * call dump function to expand external data. + */ + +static int get_var_len(const struct snd_seq_event *event) +{ + if ((event->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARIABLE) + return -EINVAL; + + return event->data.ext.len & ~SNDRV_SEQ_EXT_MASK; +} + +int snd_seq_dump_var_event(const struct snd_seq_event *event, + snd_seq_dump_func_t func, void *private_data) +{ + int len, err; + struct snd_seq_event_cell *cell; + + if ((len = get_var_len(event)) <= 0) + return len; + + if (event->data.ext.len & SNDRV_SEQ_EXT_USRPTR) { + char buf[32]; + char __user *curptr = (char __force __user *)event->data.ext.ptr; + while (len > 0) { + int size = sizeof(buf); + if (len < size) + size = len; + if (copy_from_user(buf, curptr, size)) + return -EFAULT; + err = func(private_data, buf, size); + if (err < 0) + return err; + curptr += size; + len -= size; + } + return 0; + } + if (!(event->data.ext.len & SNDRV_SEQ_EXT_CHAINED)) + return func(private_data, event->data.ext.ptr, len); + + cell = (struct snd_seq_event_cell *)event->data.ext.ptr; + for (; len > 0 && cell; cell = cell->next) { + int size = sizeof(struct snd_seq_event); + if (len < size) + size = len; + err = func(private_data, &cell->event, size); + if (err < 0) + return err; + len -= size; + } + return 0; +} +EXPORT_SYMBOL(snd_seq_dump_var_event); + + +/* + * exported: + * expand the variable length event to linear buffer space. + */ + +static int seq_copy_in_kernel(char **bufptr, const void *src, int size) +{ + memcpy(*bufptr, src, size); + *bufptr += size; + return 0; +} + +static int seq_copy_in_user(char __user **bufptr, const void *src, int size) +{ + if (copy_to_user(*bufptr, src, size)) + return -EFAULT; + *bufptr += size; + return 0; +} + +int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char *buf, + int in_kernel, int size_aligned) +{ + int len, newlen; + int err; + + if ((len = get_var_len(event)) < 0) + return len; + newlen = len; + if (size_aligned > 0) + newlen = roundup(len, size_aligned); + if (count < newlen) + return -EAGAIN; + + if (event->data.ext.len & SNDRV_SEQ_EXT_USRPTR) { + if (! in_kernel) + return -EINVAL; + if (copy_from_user(buf, (void __force __user *)event->data.ext.ptr, len)) + return -EFAULT; + return newlen; + } + err = snd_seq_dump_var_event(event, + in_kernel ? (snd_seq_dump_func_t)seq_copy_in_kernel : + (snd_seq_dump_func_t)seq_copy_in_user, + &buf); + return err < 0 ? err : newlen; +} +EXPORT_SYMBOL(snd_seq_expand_var_event); + +/* + * release this cell, free extended data if available + */ + +static inline void free_cell(struct snd_seq_pool *pool, + struct snd_seq_event_cell *cell) +{ + cell->next = pool->free; + pool->free = cell; + atomic_dec(&pool->counter); +} + +void snd_seq_cell_free(struct snd_seq_event_cell * cell) +{ + unsigned long flags; + struct snd_seq_pool *pool; + + if (snd_BUG_ON(!cell)) + return; + pool = cell->pool; + if (snd_BUG_ON(!pool)) + return; + + spin_lock_irqsave(&pool->lock, flags); + free_cell(pool, cell); + if (snd_seq_ev_is_variable(&cell->event)) { + if (cell->event.data.ext.len & SNDRV_SEQ_EXT_CHAINED) { + struct snd_seq_event_cell *curp, *nextptr; + curp = cell->event.data.ext.ptr; + for (; curp; curp = nextptr) { + nextptr = curp->next; + curp->next = pool->free; + free_cell(pool, curp); + } + } + } + if (waitqueue_active(&pool->output_sleep)) { + /* has enough space now? */ + if (snd_seq_output_ok(pool)) + wake_up(&pool->output_sleep); + } + spin_unlock_irqrestore(&pool->lock, flags); +} + + +/* + * allocate an event cell. + */ +static int snd_seq_cell_alloc(struct snd_seq_pool *pool, + struct snd_seq_event_cell **cellp, + int nonblock, struct file *file, + struct mutex *mutexp) +{ + struct snd_seq_event_cell *cell; + unsigned long flags; + int err = -EAGAIN; + wait_queue_entry_t wait; + + if (pool == NULL) + return -EINVAL; + + *cellp = NULL; + + init_waitqueue_entry(&wait, current); + spin_lock_irqsave(&pool->lock, flags); + if (pool->ptr == NULL) { /* not initialized */ + pr_debug("ALSA: seq: pool is not initialized\n"); + err = -EINVAL; + goto __error; + } + while (pool->free == NULL && ! nonblock && ! pool->closing) { + + set_current_state(TASK_INTERRUPTIBLE); + add_wait_queue(&pool->output_sleep, &wait); + spin_unlock_irq(&pool->lock); + if (mutexp) + mutex_unlock(mutexp); + schedule(); + if (mutexp) + mutex_lock(mutexp); + spin_lock_irq(&pool->lock); + remove_wait_queue(&pool->output_sleep, &wait); + /* interrupted? */ + if (signal_pending(current)) { + err = -ERESTARTSYS; + goto __error; + } + } + if (pool->closing) { /* closing.. */ + err = -ENOMEM; + goto __error; + } + + cell = pool->free; + if (cell) { + int used; + pool->free = cell->next; + atomic_inc(&pool->counter); + used = atomic_read(&pool->counter); + if (pool->max_used < used) + pool->max_used = used; + pool->event_alloc_success++; + /* clear cell pointers */ + cell->next = NULL; + err = 0; + } else + pool->event_alloc_failures++; + *cellp = cell; + +__error: + spin_unlock_irqrestore(&pool->lock, flags); + return err; +} + + +/* + * duplicate the event to a cell. + * if the event has external data, the data is decomposed to additional + * cells. + */ +int snd_seq_event_dup(struct snd_seq_pool *pool, struct snd_seq_event *event, + struct snd_seq_event_cell **cellp, int nonblock, + struct file *file, struct mutex *mutexp) +{ + int ncells, err; + unsigned int extlen; + struct snd_seq_event_cell *cell; + + *cellp = NULL; + + ncells = 0; + extlen = 0; + if (snd_seq_ev_is_variable(event)) { + extlen = event->data.ext.len & ~SNDRV_SEQ_EXT_MASK; + ncells = (extlen + sizeof(struct snd_seq_event) - 1) / sizeof(struct snd_seq_event); + } + if (ncells >= pool->total_elements) + return -ENOMEM; + + err = snd_seq_cell_alloc(pool, &cell, nonblock, file, mutexp); + if (err < 0) + return err; + + /* copy the event */ + cell->event = *event; + + /* decompose */ + if (snd_seq_ev_is_variable(event)) { + int len = extlen; + int is_chained = event->data.ext.len & SNDRV_SEQ_EXT_CHAINED; + int is_usrptr = event->data.ext.len & SNDRV_SEQ_EXT_USRPTR; + struct snd_seq_event_cell *src, *tmp, *tail; + char *buf; + + cell->event.data.ext.len = extlen | SNDRV_SEQ_EXT_CHAINED; + cell->event.data.ext.ptr = NULL; + + src = (struct snd_seq_event_cell *)event->data.ext.ptr; + buf = (char *)event->data.ext.ptr; + tail = NULL; + + while (ncells-- > 0) { + int size = sizeof(struct snd_seq_event); + if (len < size) + size = len; + err = snd_seq_cell_alloc(pool, &tmp, nonblock, file, + mutexp); + if (err < 0) + goto __error; + if (cell->event.data.ext.ptr == NULL) + cell->event.data.ext.ptr = tmp; + if (tail) + tail->next = tmp; + tail = tmp; + /* copy chunk */ + if (is_chained && src) { + tmp->event = src->event; + src = src->next; + } else if (is_usrptr) { + if (copy_from_user(&tmp->event, (char __force __user *)buf, size)) { + err = -EFAULT; + goto __error; + } + } else { + memcpy(&tmp->event, buf, size); + } + buf += size; + len -= size; + } + } + + *cellp = cell; + return 0; + +__error: + snd_seq_cell_free(cell); + return err; +} + + +/* poll wait */ +int snd_seq_pool_poll_wait(struct snd_seq_pool *pool, struct file *file, + poll_table *wait) +{ + poll_wait(file, &pool->output_sleep, wait); + return snd_seq_output_ok(pool); +} + + +/* allocate room specified number of events */ +int snd_seq_pool_init(struct snd_seq_pool *pool) +{ + int cell; + struct snd_seq_event_cell *cellptr; + unsigned long flags; + + if (snd_BUG_ON(!pool)) + return -EINVAL; + + cellptr = vmalloc(array_size(sizeof(struct snd_seq_event_cell), + pool->size)); + if (!cellptr) + return -ENOMEM; + + /* add new cells to the free cell list */ + spin_lock_irqsave(&pool->lock, flags); + if (pool->ptr) { + spin_unlock_irqrestore(&pool->lock, flags); + vfree(cellptr); + return 0; + } + + pool->ptr = cellptr; + pool->free = NULL; + + for (cell = 0; cell < pool->size; cell++) { + cellptr = pool->ptr + cell; + cellptr->pool = pool; + cellptr->next = pool->free; + pool->free = cellptr; + } + pool->room = (pool->size + 1) / 2; + + /* init statistics */ + pool->max_used = 0; + pool->total_elements = pool->size; + spin_unlock_irqrestore(&pool->lock, flags); + return 0; +} + +/* refuse the further insertion to the pool */ +void snd_seq_pool_mark_closing(struct snd_seq_pool *pool) +{ + unsigned long flags; + + if (snd_BUG_ON(!pool)) + return; + spin_lock_irqsave(&pool->lock, flags); + pool->closing = 1; + spin_unlock_irqrestore(&pool->lock, flags); +} + +/* remove events */ +int snd_seq_pool_done(struct snd_seq_pool *pool) +{ + unsigned long flags; + struct snd_seq_event_cell *ptr; + + if (snd_BUG_ON(!pool)) + return -EINVAL; + + /* wait for closing all threads */ + if (waitqueue_active(&pool->output_sleep)) + wake_up(&pool->output_sleep); + + while (atomic_read(&pool->counter) > 0) + schedule_timeout_uninterruptible(1); + + /* release all resources */ + spin_lock_irqsave(&pool->lock, flags); + ptr = pool->ptr; + pool->ptr = NULL; + pool->free = NULL; + pool->total_elements = 0; + spin_unlock_irqrestore(&pool->lock, flags); + + vfree(ptr); + + spin_lock_irqsave(&pool->lock, flags); + pool->closing = 0; + spin_unlock_irqrestore(&pool->lock, flags); + + return 0; +} + + +/* init new memory pool */ +struct snd_seq_pool *snd_seq_pool_new(int poolsize) +{ + struct snd_seq_pool *pool; + + /* create pool block */ + pool = kzalloc(sizeof(*pool), GFP_KERNEL); + if (!pool) + return NULL; + spin_lock_init(&pool->lock); + pool->ptr = NULL; + pool->free = NULL; + pool->total_elements = 0; + atomic_set(&pool->counter, 0); + pool->closing = 0; + init_waitqueue_head(&pool->output_sleep); + + pool->size = poolsize; + + /* init statistics */ + pool->max_used = 0; + return pool; +} + +/* remove memory pool */ +int snd_seq_pool_delete(struct snd_seq_pool **ppool) +{ + struct snd_seq_pool *pool = *ppool; + + *ppool = NULL; + if (pool == NULL) + return 0; + snd_seq_pool_mark_closing(pool); + snd_seq_pool_done(pool); + kfree(pool); + return 0; +} + +/* exported to seq_clientmgr.c */ +void snd_seq_info_pool(struct snd_info_buffer *buffer, + struct snd_seq_pool *pool, char *space) +{ + if (pool == NULL) + return; + snd_iprintf(buffer, "%sPool size : %d\n", space, pool->total_elements); + snd_iprintf(buffer, "%sCells in use : %d\n", space, atomic_read(&pool->counter)); + snd_iprintf(buffer, "%sPeak cells in use : %d\n", space, pool->max_used); + snd_iprintf(buffer, "%sAlloc success : %d\n", space, pool->event_alloc_success); + snd_iprintf(buffer, "%sAlloc failures : %d\n", space, pool->event_alloc_failures); +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/core/seq/seq_memory.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/core/seq/seq_memory.c.yml new file mode 100644 index 00000000000..460203b6ab2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/core/seq/seq_memory.c.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998 by Frank van de Pol Jaroslav Kysela + 2000 by Takashi Iwai +holders: + - Frank van de Pol Jaroslav Kysela by Takashi Iwai diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/isa/msnd/msnd_midi.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/isa/msnd/msnd_midi.c new file mode 100644 index 00000000000..0a974e5a8a0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/isa/msnd/msnd_midi.c @@ -0,0 +1,182 @@ +/* + * Copyright (c) by Jaroslav Kysela + * Copyright (c) 2009 by Krzysztof Helt + * Routines for control of MPU-401 in UART mode + * + * MPU-401 supports UART mode which is not capable generate transmit + * interrupts thus output is done via polling. Also, if irq < 0, then + * input is done also via polling. Do not expect good performance. + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "msnd.h" + +#define MSNDMIDI_MODE_BIT_INPUT 0 +#define MSNDMIDI_MODE_BIT_OUTPUT 1 +#define MSNDMIDI_MODE_BIT_INPUT_TRIGGER 2 +#define MSNDMIDI_MODE_BIT_OUTPUT_TRIGGER 3 + +struct snd_msndmidi { + struct snd_msnd *dev; + + unsigned long mode; /* MSNDMIDI_MODE_XXXX */ + + struct snd_rawmidi_substream *substream_input; + + spinlock_t input_lock; +}; + +/* + * input/output open/close - protected by open_mutex in rawmidi.c + */ +static int snd_msndmidi_input_open(struct snd_rawmidi_substream *substream) +{ + struct snd_msndmidi *mpu; + + snd_printdd("snd_msndmidi_input_open()\n"); + + mpu = substream->rmidi->private_data; + + mpu->substream_input = substream; + + snd_msnd_enable_irq(mpu->dev); + + snd_msnd_send_dsp_cmd(mpu->dev, HDEX_MIDI_IN_START); + set_bit(MSNDMIDI_MODE_BIT_INPUT, &mpu->mode); + return 0; +} + +static int snd_msndmidi_input_close(struct snd_rawmidi_substream *substream) +{ + struct snd_msndmidi *mpu; + + mpu = substream->rmidi->private_data; + snd_msnd_send_dsp_cmd(mpu->dev, HDEX_MIDI_IN_STOP); + clear_bit(MSNDMIDI_MODE_BIT_INPUT, &mpu->mode); + mpu->substream_input = NULL; + snd_msnd_disable_irq(mpu->dev); + return 0; +} + +static void snd_msndmidi_input_drop(struct snd_msndmidi *mpu) +{ + u16 tail; + + tail = readw(mpu->dev->MIDQ + JQS_wTail); + writew(tail, mpu->dev->MIDQ + JQS_wHead); +} + +/* + * trigger input + */ +static void snd_msndmidi_input_trigger(struct snd_rawmidi_substream *substream, + int up) +{ + unsigned long flags; + struct snd_msndmidi *mpu; + + snd_printdd("snd_msndmidi_input_trigger(, %i)\n", up); + + mpu = substream->rmidi->private_data; + spin_lock_irqsave(&mpu->input_lock, flags); + if (up) { + if (!test_and_set_bit(MSNDMIDI_MODE_BIT_INPUT_TRIGGER, + &mpu->mode)) + snd_msndmidi_input_drop(mpu); + } else { + clear_bit(MSNDMIDI_MODE_BIT_INPUT_TRIGGER, &mpu->mode); + } + spin_unlock_irqrestore(&mpu->input_lock, flags); + if (up) + snd_msndmidi_input_read(mpu); +} + +void snd_msndmidi_input_read(void *mpuv) +{ + unsigned long flags; + struct snd_msndmidi *mpu = mpuv; + void __iomem *pwMIDQData = mpu->dev->mappedbase + MIDQ_DATA_BUFF; + u16 head, tail, size; + + spin_lock_irqsave(&mpu->input_lock, flags); + head = readw(mpu->dev->MIDQ + JQS_wHead); + tail = readw(mpu->dev->MIDQ + JQS_wTail); + size = readw(mpu->dev->MIDQ + JQS_wSize); + if (head > size || tail > size) + goto out; + while (head != tail) { + unsigned char val = readw(pwMIDQData + 2 * head); + + if (test_bit(MSNDMIDI_MODE_BIT_INPUT_TRIGGER, &mpu->mode)) + snd_rawmidi_receive(mpu->substream_input, &val, 1); + if (++head > size) + head = 0; + writew(head, mpu->dev->MIDQ + JQS_wHead); + } + out: + spin_unlock_irqrestore(&mpu->input_lock, flags); +} +EXPORT_SYMBOL(snd_msndmidi_input_read); + +static const struct snd_rawmidi_ops snd_msndmidi_input = { + .open = snd_msndmidi_input_open, + .close = snd_msndmidi_input_close, + .trigger = snd_msndmidi_input_trigger, +}; + +static void snd_msndmidi_free(struct snd_rawmidi *rmidi) +{ + struct snd_msndmidi *mpu = rmidi->private_data; + kfree(mpu); +} + +int snd_msndmidi_new(struct snd_card *card, int device) +{ + struct snd_msnd *chip = card->private_data; + struct snd_msndmidi *mpu; + struct snd_rawmidi *rmidi; + int err; + + err = snd_rawmidi_new(card, "MSND-MIDI", device, 1, 1, &rmidi); + if (err < 0) + return err; + mpu = kzalloc(sizeof(*mpu), GFP_KERNEL); + if (mpu == NULL) { + snd_device_free(card, rmidi); + return -ENOMEM; + } + mpu->dev = chip; + chip->msndmidi_mpu = mpu; + rmidi->private_data = mpu; + rmidi->private_free = snd_msndmidi_free; + spin_lock_init(&mpu->input_lock); + strcpy(rmidi->name, "MSND MIDI"); + snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, + &snd_msndmidi_input); + rmidi->info_flags |= SNDRV_RAWMIDI_INFO_INPUT; + return 0; +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/isa/msnd/msnd_midi.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/isa/msnd/msnd_midi.c.yml new file mode 100644 index 00000000000..b76b8101833 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/isa/msnd/msnd_midi.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) by Jaroslav Kysela + - Copyright (c) 2009 by Krzysztof Helt Routines +holders: + - Jaroslav Kysela + - Krzysztof Helt Routines diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/parisc/harmony.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/parisc/harmony.c new file mode 100644 index 00000000000..46cdd84cb8d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/parisc/harmony.c @@ -0,0 +1,1034 @@ +/* Hewlett-Packard Harmony audio driver + * + * This is a driver for the Harmony audio chipset found + * on the LASI ASIC of various early HP PA-RISC workstations. + * + * Copyright (C) 2004, Kyle McMartin + * + * Based on the previous Harmony incarnations by, + * Copyright 2000 (c) Linuxcare Canada, Alex deVries + * Copyright 2000-2003 (c) Helge Deller + * Copyright 2001 (c) Matthieu Delahaye + * Copyright 2001 (c) Jean-Christophe Vaugeois + * Copyright 2003 (c) Laurent Canet + * Copyright 2004 (c) Stuart Brady + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, version 2, as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Notes: + * - graveyard and silence buffers last for lifetime of + * the driver. playback and capture buffers are allocated + * per _open()/_close(). + * + * TODO: + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "harmony.h" + +static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */ +static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ +module_param(index, int, 0444); +MODULE_PARM_DESC(index, "Index value for Harmony driver."); +module_param(id, charp, 0444); +MODULE_PARM_DESC(id, "ID string for Harmony driver."); + + +static const struct parisc_device_id snd_harmony_devtable[] __initconst = { + /* bushmaster / flounder */ + { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0007A }, + /* 712 / 715 */ + { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0007B }, + /* pace */ + { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0007E }, + /* outfield / coral II */ + { HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0007F }, + { 0, } +}; + +MODULE_DEVICE_TABLE(parisc, snd_harmony_devtable); + +#define NAME "harmony" +#define PFX NAME ": " + +static const unsigned int snd_harmony_rates[] = { + 5512, 6615, 8000, 9600, + 11025, 16000, 18900, 22050, + 27428, 32000, 33075, 37800, + 44100, 48000 +}; + +static const unsigned int rate_bits[14] = { + HARMONY_SR_5KHZ, HARMONY_SR_6KHZ, HARMONY_SR_8KHZ, + HARMONY_SR_9KHZ, HARMONY_SR_11KHZ, HARMONY_SR_16KHZ, + HARMONY_SR_18KHZ, HARMONY_SR_22KHZ, HARMONY_SR_27KHZ, + HARMONY_SR_32KHZ, HARMONY_SR_33KHZ, HARMONY_SR_37KHZ, + HARMONY_SR_44KHZ, HARMONY_SR_48KHZ +}; + +static const struct snd_pcm_hw_constraint_list hw_constraint_rates = { + .count = ARRAY_SIZE(snd_harmony_rates), + .list = snd_harmony_rates, + .mask = 0, +}; + +static inline unsigned long +harmony_read(struct snd_harmony *h, unsigned r) +{ + return __raw_readl(h->iobase + r); +} + +static inline void +harmony_write(struct snd_harmony *h, unsigned r, unsigned long v) +{ + __raw_writel(v, h->iobase + r); +} + +static inline void +harmony_wait_for_control(struct snd_harmony *h) +{ + while (harmony_read(h, HARMONY_CNTL) & HARMONY_CNTL_C) ; +} + +static inline void +harmony_reset(struct snd_harmony *h) +{ + harmony_write(h, HARMONY_RESET, 1); + mdelay(50); + harmony_write(h, HARMONY_RESET, 0); +} + +static void +harmony_disable_interrupts(struct snd_harmony *h) +{ + u32 dstatus; + harmony_wait_for_control(h); + dstatus = harmony_read(h, HARMONY_DSTATUS); + dstatus &= ~HARMONY_DSTATUS_IE; + harmony_write(h, HARMONY_DSTATUS, dstatus); +} + +static void +harmony_enable_interrupts(struct snd_harmony *h) +{ + u32 dstatus; + harmony_wait_for_control(h); + dstatus = harmony_read(h, HARMONY_DSTATUS); + dstatus |= HARMONY_DSTATUS_IE; + harmony_write(h, HARMONY_DSTATUS, dstatus); +} + +static void +harmony_mute(struct snd_harmony *h) +{ + unsigned long flags; + + spin_lock_irqsave(&h->mixer_lock, flags); + harmony_wait_for_control(h); + harmony_write(h, HARMONY_GAINCTL, HARMONY_GAIN_SILENCE); + spin_unlock_irqrestore(&h->mixer_lock, flags); +} + +static void +harmony_unmute(struct snd_harmony *h) +{ + unsigned long flags; + + spin_lock_irqsave(&h->mixer_lock, flags); + harmony_wait_for_control(h); + harmony_write(h, HARMONY_GAINCTL, h->st.gain); + spin_unlock_irqrestore(&h->mixer_lock, flags); +} + +static void +harmony_set_control(struct snd_harmony *h) +{ + u32 ctrl; + unsigned long flags; + + spin_lock_irqsave(&h->lock, flags); + + ctrl = (HARMONY_CNTL_C | + (h->st.format << 6) | + (h->st.stereo << 5) | + (h->st.rate)); + + harmony_wait_for_control(h); + harmony_write(h, HARMONY_CNTL, ctrl); + + spin_unlock_irqrestore(&h->lock, flags); +} + +static irqreturn_t +snd_harmony_interrupt(int irq, void *dev) +{ + u32 dstatus; + struct snd_harmony *h = dev; + + spin_lock(&h->lock); + harmony_disable_interrupts(h); + harmony_wait_for_control(h); + dstatus = harmony_read(h, HARMONY_DSTATUS); + spin_unlock(&h->lock); + + if (dstatus & HARMONY_DSTATUS_PN) { + if (h->psubs && h->st.playing) { + spin_lock(&h->lock); + h->pbuf.buf += h->pbuf.count; /* PAGE_SIZE */ + h->pbuf.buf %= h->pbuf.size; /* MAX_BUFS*PAGE_SIZE */ + + harmony_write(h, HARMONY_PNXTADD, + h->pbuf.addr + h->pbuf.buf); + h->stats.play_intr++; + spin_unlock(&h->lock); + snd_pcm_period_elapsed(h->psubs); + } else { + spin_lock(&h->lock); + harmony_write(h, HARMONY_PNXTADD, h->sdma.addr); + h->stats.silence_intr++; + spin_unlock(&h->lock); + } + } + + if (dstatus & HARMONY_DSTATUS_RN) { + if (h->csubs && h->st.capturing) { + spin_lock(&h->lock); + h->cbuf.buf += h->cbuf.count; + h->cbuf.buf %= h->cbuf.size; + + harmony_write(h, HARMONY_RNXTADD, + h->cbuf.addr + h->cbuf.buf); + h->stats.rec_intr++; + spin_unlock(&h->lock); + snd_pcm_period_elapsed(h->csubs); + } else { + spin_lock(&h->lock); + harmony_write(h, HARMONY_RNXTADD, h->gdma.addr); + h->stats.graveyard_intr++; + spin_unlock(&h->lock); + } + } + + spin_lock(&h->lock); + harmony_enable_interrupts(h); + spin_unlock(&h->lock); + + return IRQ_HANDLED; +} + +static unsigned int +snd_harmony_rate_bits(int rate) +{ + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(snd_harmony_rates); i++) + if (snd_harmony_rates[i] == rate) + return rate_bits[i]; + + return HARMONY_SR_44KHZ; +} + +static const struct snd_pcm_hardware snd_harmony_playback = +{ + .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_JOINT_DUPLEX | SNDRV_PCM_INFO_MMAP_VALID | + SNDRV_PCM_INFO_BLOCK_TRANSFER), + .formats = (SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_MU_LAW | + SNDRV_PCM_FMTBIT_A_LAW), + .rates = (SNDRV_PCM_RATE_5512 | SNDRV_PCM_RATE_8000_48000 | + SNDRV_PCM_RATE_KNOT), + .rate_min = 5512, + .rate_max = 48000, + .channels_min = 1, + .channels_max = 2, + .buffer_bytes_max = MAX_BUF_SIZE, + .period_bytes_min = BUF_SIZE, + .period_bytes_max = BUF_SIZE, + .periods_min = 1, + .periods_max = MAX_BUFS, + .fifo_size = 0, +}; + +static const struct snd_pcm_hardware snd_harmony_capture = +{ + .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_JOINT_DUPLEX | SNDRV_PCM_INFO_MMAP_VALID | + SNDRV_PCM_INFO_BLOCK_TRANSFER), + .formats = (SNDRV_PCM_FMTBIT_S16_BE | SNDRV_PCM_FMTBIT_MU_LAW | + SNDRV_PCM_FMTBIT_A_LAW), + .rates = (SNDRV_PCM_RATE_5512 | SNDRV_PCM_RATE_8000_48000 | + SNDRV_PCM_RATE_KNOT), + .rate_min = 5512, + .rate_max = 48000, + .channels_min = 1, + .channels_max = 2, + .buffer_bytes_max = MAX_BUF_SIZE, + .period_bytes_min = BUF_SIZE, + .period_bytes_max = BUF_SIZE, + .periods_min = 1, + .periods_max = MAX_BUFS, + .fifo_size = 0, +}; + +static int +snd_harmony_playback_trigger(struct snd_pcm_substream *ss, int cmd) +{ + struct snd_harmony *h = snd_pcm_substream_chip(ss); + + if (h->st.capturing) + return -EBUSY; + + spin_lock(&h->lock); + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + h->st.playing = 1; + harmony_write(h, HARMONY_PNXTADD, h->pbuf.addr); + harmony_write(h, HARMONY_RNXTADD, h->gdma.addr); + harmony_unmute(h); + harmony_enable_interrupts(h); + break; + case SNDRV_PCM_TRIGGER_STOP: + h->st.playing = 0; + harmony_mute(h); + harmony_write(h, HARMONY_PNXTADD, h->sdma.addr); + harmony_disable_interrupts(h); + break; + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + case SNDRV_PCM_TRIGGER_SUSPEND: + default: + spin_unlock(&h->lock); + snd_BUG(); + return -EINVAL; + } + spin_unlock(&h->lock); + + return 0; +} + +static int +snd_harmony_capture_trigger(struct snd_pcm_substream *ss, int cmd) +{ + struct snd_harmony *h = snd_pcm_substream_chip(ss); + + if (h->st.playing) + return -EBUSY; + + spin_lock(&h->lock); + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + h->st.capturing = 1; + harmony_write(h, HARMONY_PNXTADD, h->sdma.addr); + harmony_write(h, HARMONY_RNXTADD, h->cbuf.addr); + harmony_unmute(h); + harmony_enable_interrupts(h); + break; + case SNDRV_PCM_TRIGGER_STOP: + h->st.capturing = 0; + harmony_mute(h); + harmony_write(h, HARMONY_RNXTADD, h->gdma.addr); + harmony_disable_interrupts(h); + break; + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + case SNDRV_PCM_TRIGGER_SUSPEND: + default: + spin_unlock(&h->lock); + snd_BUG(); + return -EINVAL; + } + spin_unlock(&h->lock); + + return 0; +} + +static int +snd_harmony_set_data_format(struct snd_harmony *h, int fmt, int force) +{ + int o = h->st.format; + int n; + + switch(fmt) { + case SNDRV_PCM_FORMAT_S16_BE: + n = HARMONY_DF_16BIT_LINEAR; + break; + case SNDRV_PCM_FORMAT_A_LAW: + n = HARMONY_DF_8BIT_ALAW; + break; + case SNDRV_PCM_FORMAT_MU_LAW: + n = HARMONY_DF_8BIT_ULAW; + break; + default: + n = HARMONY_DF_16BIT_LINEAR; + break; + } + + if (force || o != n) { + snd_pcm_format_set_silence(fmt, h->sdma.area, SILENCE_BUFSZ / + (snd_pcm_format_physical_width(fmt) + / 8)); + } + + return n; +} + +static int +snd_harmony_playback_prepare(struct snd_pcm_substream *ss) +{ + struct snd_harmony *h = snd_pcm_substream_chip(ss); + struct snd_pcm_runtime *rt = ss->runtime; + + if (h->st.capturing) + return -EBUSY; + + h->pbuf.size = snd_pcm_lib_buffer_bytes(ss); + h->pbuf.count = snd_pcm_lib_period_bytes(ss); + if (h->pbuf.buf >= h->pbuf.size) + h->pbuf.buf = 0; + h->st.playing = 0; + + h->st.rate = snd_harmony_rate_bits(rt->rate); + h->st.format = snd_harmony_set_data_format(h, rt->format, 0); + + if (rt->channels == 2) + h->st.stereo = HARMONY_SS_STEREO; + else + h->st.stereo = HARMONY_SS_MONO; + + harmony_set_control(h); + + h->pbuf.addr = rt->dma_addr; + + return 0; +} + +static int +snd_harmony_capture_prepare(struct snd_pcm_substream *ss) +{ + struct snd_harmony *h = snd_pcm_substream_chip(ss); + struct snd_pcm_runtime *rt = ss->runtime; + + if (h->st.playing) + return -EBUSY; + + h->cbuf.size = snd_pcm_lib_buffer_bytes(ss); + h->cbuf.count = snd_pcm_lib_period_bytes(ss); + if (h->cbuf.buf >= h->cbuf.size) + h->cbuf.buf = 0; + h->st.capturing = 0; + + h->st.rate = snd_harmony_rate_bits(rt->rate); + h->st.format = snd_harmony_set_data_format(h, rt->format, 0); + + if (rt->channels == 2) + h->st.stereo = HARMONY_SS_STEREO; + else + h->st.stereo = HARMONY_SS_MONO; + + harmony_set_control(h); + + h->cbuf.addr = rt->dma_addr; + + return 0; +} + +static snd_pcm_uframes_t +snd_harmony_playback_pointer(struct snd_pcm_substream *ss) +{ + struct snd_pcm_runtime *rt = ss->runtime; + struct snd_harmony *h = snd_pcm_substream_chip(ss); + unsigned long pcuradd; + unsigned long played; + + if (!(h->st.playing) || (h->psubs == NULL)) + return 0; + + if ((h->pbuf.addr == 0) || (h->pbuf.size == 0)) + return 0; + + pcuradd = harmony_read(h, HARMONY_PCURADD); + played = pcuradd - h->pbuf.addr; + +#ifdef HARMONY_DEBUG + printk(KERN_DEBUG PFX "playback_pointer is 0x%lx-0x%lx = %d bytes\n", + pcuradd, h->pbuf.addr, played); +#endif + + if (pcuradd > h->pbuf.addr + h->pbuf.size) { + return 0; + } + + return bytes_to_frames(rt, played); +} + +static snd_pcm_uframes_t +snd_harmony_capture_pointer(struct snd_pcm_substream *ss) +{ + struct snd_pcm_runtime *rt = ss->runtime; + struct snd_harmony *h = snd_pcm_substream_chip(ss); + unsigned long rcuradd; + unsigned long caught; + + if (!(h->st.capturing) || (h->csubs == NULL)) + return 0; + + if ((h->cbuf.addr == 0) || (h->cbuf.size == 0)) + return 0; + + rcuradd = harmony_read(h, HARMONY_RCURADD); + caught = rcuradd - h->cbuf.addr; + +#ifdef HARMONY_DEBUG + printk(KERN_DEBUG PFX "capture_pointer is 0x%lx-0x%lx = %d bytes\n", + rcuradd, h->cbuf.addr, caught); +#endif + + if (rcuradd > h->cbuf.addr + h->cbuf.size) { + return 0; + } + + return bytes_to_frames(rt, caught); +} + +static int +snd_harmony_playback_open(struct snd_pcm_substream *ss) +{ + struct snd_harmony *h = snd_pcm_substream_chip(ss); + struct snd_pcm_runtime *rt = ss->runtime; + int err; + + h->psubs = ss; + rt->hw = snd_harmony_playback; + snd_pcm_hw_constraint_list(rt, 0, SNDRV_PCM_HW_PARAM_RATE, + &hw_constraint_rates); + + err = snd_pcm_hw_constraint_integer(rt, SNDRV_PCM_HW_PARAM_PERIODS); + if (err < 0) + return err; + + return 0; +} + +static int +snd_harmony_capture_open(struct snd_pcm_substream *ss) +{ + struct snd_harmony *h = snd_pcm_substream_chip(ss); + struct snd_pcm_runtime *rt = ss->runtime; + int err; + + h->csubs = ss; + rt->hw = snd_harmony_capture; + snd_pcm_hw_constraint_list(rt, 0, SNDRV_PCM_HW_PARAM_RATE, + &hw_constraint_rates); + + err = snd_pcm_hw_constraint_integer(rt, SNDRV_PCM_HW_PARAM_PERIODS); + if (err < 0) + return err; + + return 0; +} + +static int +snd_harmony_playback_close(struct snd_pcm_substream *ss) +{ + struct snd_harmony *h = snd_pcm_substream_chip(ss); + h->psubs = NULL; + return 0; +} + +static int +snd_harmony_capture_close(struct snd_pcm_substream *ss) +{ + struct snd_harmony *h = snd_pcm_substream_chip(ss); + h->csubs = NULL; + return 0; +} + +static int +snd_harmony_hw_params(struct snd_pcm_substream *ss, + struct snd_pcm_hw_params *hw) +{ + int err; + struct snd_harmony *h = snd_pcm_substream_chip(ss); + + err = snd_pcm_lib_malloc_pages(ss, params_buffer_bytes(hw)); + if (err > 0 && h->dma.type == SNDRV_DMA_TYPE_CONTINUOUS) + ss->runtime->dma_addr = __pa(ss->runtime->dma_area); + + return err; +} + +static int +snd_harmony_hw_free(struct snd_pcm_substream *ss) +{ + return snd_pcm_lib_free_pages(ss); +} + +static const struct snd_pcm_ops snd_harmony_playback_ops = { + .open = snd_harmony_playback_open, + .close = snd_harmony_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_harmony_hw_params, + .hw_free = snd_harmony_hw_free, + .prepare = snd_harmony_playback_prepare, + .trigger = snd_harmony_playback_trigger, + .pointer = snd_harmony_playback_pointer, +}; + +static const struct snd_pcm_ops snd_harmony_capture_ops = { + .open = snd_harmony_capture_open, + .close = snd_harmony_capture_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_harmony_hw_params, + .hw_free = snd_harmony_hw_free, + .prepare = snd_harmony_capture_prepare, + .trigger = snd_harmony_capture_trigger, + .pointer = snd_harmony_capture_pointer, +}; + +static int +snd_harmony_pcm_init(struct snd_harmony *h) +{ + struct snd_pcm *pcm; + int err; + + if (snd_BUG_ON(!h)) + return -EINVAL; + + harmony_disable_interrupts(h); + + err = snd_pcm_new(h->card, "harmony", 0, 1, 1, &pcm); + if (err < 0) + return err; + + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, + &snd_harmony_playback_ops); + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, + &snd_harmony_capture_ops); + + pcm->private_data = h; + pcm->info_flags = 0; + strcpy(pcm->name, "harmony"); + h->pcm = pcm; + + h->psubs = NULL; + h->csubs = NULL; + + /* initialize graveyard buffer */ + h->dma.type = SNDRV_DMA_TYPE_DEV; + h->dma.dev = &h->dev->dev; + err = snd_dma_alloc_pages(h->dma.type, + h->dma.dev, + BUF_SIZE*GRAVEYARD_BUFS, + &h->gdma); + if (err < 0) { + printk(KERN_ERR PFX "cannot allocate graveyard buffer!\n"); + return err; + } + + /* initialize silence buffers */ + err = snd_dma_alloc_pages(h->dma.type, + h->dma.dev, + BUF_SIZE*SILENCE_BUFS, + &h->sdma); + if (err < 0) { + printk(KERN_ERR PFX "cannot allocate silence buffer!\n"); + return err; + } + + /* pre-allocate space for DMA */ + err = snd_pcm_lib_preallocate_pages_for_all(pcm, h->dma.type, + h->dma.dev, + MAX_BUF_SIZE, + MAX_BUF_SIZE); + if (err < 0) { + printk(KERN_ERR PFX "buffer allocation error: %d\n", err); + return err; + } + + h->st.format = snd_harmony_set_data_format(h, + SNDRV_PCM_FORMAT_S16_BE, 1); + + return 0; +} + +static void +snd_harmony_set_new_gain(struct snd_harmony *h) +{ + harmony_wait_for_control(h); + harmony_write(h, HARMONY_GAINCTL, h->st.gain); +} + +static int +snd_harmony_mixercontrol_info(struct snd_kcontrol *kc, + struct snd_ctl_elem_info *uinfo) +{ + int mask = (kc->private_value >> 16) & 0xff; + int left_shift = (kc->private_value) & 0xff; + int right_shift = (kc->private_value >> 8) & 0xff; + + uinfo->type = mask == 1 ? SNDRV_CTL_ELEM_TYPE_BOOLEAN : + SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = left_shift == right_shift ? 1 : 2; + uinfo->value.integer.min = 0; + uinfo->value.integer.max = mask; + + return 0; +} + +static int +snd_harmony_volume_get(struct snd_kcontrol *kc, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_harmony *h = snd_kcontrol_chip(kc); + int shift_left = (kc->private_value) & 0xff; + int shift_right = (kc->private_value >> 8) & 0xff; + int mask = (kc->private_value >> 16) & 0xff; + int invert = (kc->private_value >> 24) & 0xff; + int left, right; + + spin_lock_irq(&h->mixer_lock); + + left = (h->st.gain >> shift_left) & mask; + right = (h->st.gain >> shift_right) & mask; + if (invert) { + left = mask - left; + right = mask - right; + } + + ucontrol->value.integer.value[0] = left; + if (shift_left != shift_right) + ucontrol->value.integer.value[1] = right; + + spin_unlock_irq(&h->mixer_lock); + + return 0; +} + +static int +snd_harmony_volume_put(struct snd_kcontrol *kc, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_harmony *h = snd_kcontrol_chip(kc); + int shift_left = (kc->private_value) & 0xff; + int shift_right = (kc->private_value >> 8) & 0xff; + int mask = (kc->private_value >> 16) & 0xff; + int invert = (kc->private_value >> 24) & 0xff; + int left, right; + int old_gain = h->st.gain; + + spin_lock_irq(&h->mixer_lock); + + left = ucontrol->value.integer.value[0] & mask; + if (invert) + left = mask - left; + h->st.gain &= ~( (mask << shift_left ) ); + h->st.gain |= (left << shift_left); + + if (shift_left != shift_right) { + right = ucontrol->value.integer.value[1] & mask; + if (invert) + right = mask - right; + h->st.gain &= ~( (mask << shift_right) ); + h->st.gain |= (right << shift_right); + } + + snd_harmony_set_new_gain(h); + + spin_unlock_irq(&h->mixer_lock); + + return h->st.gain != old_gain; +} + +static int +snd_harmony_captureroute_info(struct snd_kcontrol *kc, + struct snd_ctl_elem_info *uinfo) +{ + static const char * const texts[2] = { "Line", "Mic" }; + + return snd_ctl_enum_info(uinfo, 1, 2, texts); +} + +static int +snd_harmony_captureroute_get(struct snd_kcontrol *kc, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_harmony *h = snd_kcontrol_chip(kc); + int value; + + spin_lock_irq(&h->mixer_lock); + + value = (h->st.gain >> HARMONY_GAIN_IS_SHIFT) & 1; + ucontrol->value.enumerated.item[0] = value; + + spin_unlock_irq(&h->mixer_lock); + + return 0; +} + +static int +snd_harmony_captureroute_put(struct snd_kcontrol *kc, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_harmony *h = snd_kcontrol_chip(kc); + int value; + int old_gain = h->st.gain; + + spin_lock_irq(&h->mixer_lock); + + value = ucontrol->value.enumerated.item[0] & 1; + h->st.gain &= ~HARMONY_GAIN_IS_MASK; + h->st.gain |= value << HARMONY_GAIN_IS_SHIFT; + + snd_harmony_set_new_gain(h); + + spin_unlock_irq(&h->mixer_lock); + + return h->st.gain != old_gain; +} + +#define HARMONY_CONTROLS ARRAY_SIZE(snd_harmony_controls) + +#define HARMONY_VOLUME(xname, left_shift, right_shift, mask, invert) \ +{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ + .info = snd_harmony_mixercontrol_info, \ + .get = snd_harmony_volume_get, .put = snd_harmony_volume_put, \ + .private_value = ((left_shift) | ((right_shift) << 8) | \ + ((mask) << 16) | ((invert) << 24)) } + +static struct snd_kcontrol_new snd_harmony_controls[] = { + HARMONY_VOLUME("Master Playback Volume", HARMONY_GAIN_LO_SHIFT, + HARMONY_GAIN_RO_SHIFT, HARMONY_GAIN_OUT, 1), + HARMONY_VOLUME("Capture Volume", HARMONY_GAIN_LI_SHIFT, + HARMONY_GAIN_RI_SHIFT, HARMONY_GAIN_IN, 0), + HARMONY_VOLUME("Monitor Volume", HARMONY_GAIN_MA_SHIFT, + HARMONY_GAIN_MA_SHIFT, HARMONY_GAIN_MA, 1), + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Input Route", + .info = snd_harmony_captureroute_info, + .get = snd_harmony_captureroute_get, + .put = snd_harmony_captureroute_put + }, + HARMONY_VOLUME("Internal Speaker Switch", HARMONY_GAIN_SE_SHIFT, + HARMONY_GAIN_SE_SHIFT, 1, 0), + HARMONY_VOLUME("Line-Out Switch", HARMONY_GAIN_LE_SHIFT, + HARMONY_GAIN_LE_SHIFT, 1, 0), + HARMONY_VOLUME("Headphones Switch", HARMONY_GAIN_HE_SHIFT, + HARMONY_GAIN_HE_SHIFT, 1, 0), +}; + +static void +snd_harmony_mixer_reset(struct snd_harmony *h) +{ + harmony_mute(h); + harmony_reset(h); + h->st.gain = HARMONY_GAIN_DEFAULT; + harmony_unmute(h); +} + +static int +snd_harmony_mixer_init(struct snd_harmony *h) +{ + struct snd_card *card; + int idx, err; + + if (snd_BUG_ON(!h)) + return -EINVAL; + card = h->card; + strcpy(card->mixername, "Harmony Gain control interface"); + + for (idx = 0; idx < HARMONY_CONTROLS; idx++) { + err = snd_ctl_add(card, + snd_ctl_new1(&snd_harmony_controls[idx], h)); + if (err < 0) + return err; + } + + snd_harmony_mixer_reset(h); + + return 0; +} + +static int +snd_harmony_free(struct snd_harmony *h) +{ + if (h->gdma.addr) + snd_dma_free_pages(&h->gdma); + if (h->sdma.addr) + snd_dma_free_pages(&h->sdma); + + if (h->irq >= 0) + free_irq(h->irq, h); + + iounmap(h->iobase); + kfree(h); + return 0; +} + +static int +snd_harmony_dev_free(struct snd_device *dev) +{ + struct snd_harmony *h = dev->device_data; + return snd_harmony_free(h); +} + +static int +snd_harmony_create(struct snd_card *card, + struct parisc_device *padev, + struct snd_harmony **rchip) +{ + int err; + struct snd_harmony *h; + static struct snd_device_ops ops = { + .dev_free = snd_harmony_dev_free, + }; + + *rchip = NULL; + + h = kzalloc(sizeof(*h), GFP_KERNEL); + if (h == NULL) + return -ENOMEM; + + h->hpa = padev->hpa.start; + h->card = card; + h->dev = padev; + h->irq = -1; + h->iobase = ioremap_nocache(padev->hpa.start, HARMONY_SIZE); + if (h->iobase == NULL) { + printk(KERN_ERR PFX "unable to remap hpa 0x%lx\n", + (unsigned long)padev->hpa.start); + err = -EBUSY; + goto free_and_ret; + } + + err = request_irq(padev->irq, snd_harmony_interrupt, 0, + "harmony", h); + if (err) { + printk(KERN_ERR PFX "could not obtain interrupt %d", + padev->irq); + goto free_and_ret; + } + h->irq = padev->irq; + + spin_lock_init(&h->mixer_lock); + spin_lock_init(&h->lock); + + if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, + h, &ops)) < 0) { + goto free_and_ret; + } + + *rchip = h; + + return 0; + +free_and_ret: + snd_harmony_free(h); + return err; +} + +static int __init +snd_harmony_probe(struct parisc_device *padev) +{ + int err; + struct snd_card *card; + struct snd_harmony *h; + + err = snd_card_new(&padev->dev, index, id, THIS_MODULE, 0, &card); + if (err < 0) + return err; + + err = snd_harmony_create(card, padev, &h); + if (err < 0) + goto free_and_ret; + + err = snd_harmony_pcm_init(h); + if (err < 0) + goto free_and_ret; + + err = snd_harmony_mixer_init(h); + if (err < 0) + goto free_and_ret; + + strcpy(card->driver, "harmony"); + strcpy(card->shortname, "Harmony"); + sprintf(card->longname, "%s at 0x%lx, irq %i", + card->shortname, h->hpa, h->irq); + + err = snd_card_register(card); + if (err < 0) + goto free_and_ret; + + parisc_set_drvdata(padev, card); + return 0; + +free_and_ret: + snd_card_free(card); + return err; +} + +static int __exit +snd_harmony_remove(struct parisc_device *padev) +{ + snd_card_free(parisc_get_drvdata(padev)); + return 0; +} + +static struct parisc_driver snd_harmony_driver __refdata = { + .name = "harmony", + .id_table = snd_harmony_devtable, + .probe = snd_harmony_probe, + .remove = __exit_p(snd_harmony_remove), +}; + +static int __init +alsa_harmony_init(void) +{ + return register_parisc_driver(&snd_harmony_driver); +} + +static void __exit +alsa_harmony_fini(void) +{ + unregister_parisc_driver(&snd_harmony_driver); +} + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Kyle McMartin "); +MODULE_DESCRIPTION("Harmony sound driver"); + +module_init(alsa_harmony_init); +module_exit(alsa_harmony_fini); \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/parisc/harmony.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/parisc/harmony.c.yml new file mode 100644 index 00000000000..2c71ab661c6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/parisc/harmony.c.yml @@ -0,0 +1,20 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2004, Kyle McMartin + - Copyright 2000 (c) Linuxcare Canada, Alex + - Copyright 2000-2003 (c) Helge Deller Copyright 2001 + - (c) Matthieu Delahaye Copyright 2001 + - (c) Jean-Christophe Vaugeois Copyright 2003 + - (c) Laurent Canet Copyright 2004 + - (c) Stuart Brady +holders: + - Kyle McMartin + - Linuxcare Canada, Alex + - Helge Deller + - Matthieu Delahaye + - Jean-Christophe Vaugeois + - Laurent Canet + - Stuart Brady diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/au88x0/au88x0_xtalk.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/au88x0/au88x0_xtalk.h new file mode 100644 index 00000000000..666547f95f3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/au88x0/au88x0_xtalk.h @@ -0,0 +1,61 @@ +/*************************************************************************** + * au88x0_cxtalk.h + * + * Wed Nov 19 19:07:17 2003 + * Copyright 2003 mjander + * mjander@users.sourceforge.org + ****************************************************************************/ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/* The crosstalk canceler supports 5 stereo input channels. The result is + available at one single output route pair (stereo). */ + +#ifndef _AU88X0_CXTALK_H +#define _AU88X0_CXTALK_H + +#include "au88x0.h" + +#define XTDLINE_SZ 32 +#define XTGAINS_SZ 10 +#define XTINST_SZ 4 + +#define XT_HEADPHONE 1 +#define XT_SPEAKER0 2 +#define XT_SPEAKER1 3 +#define XT_DIAMOND 4 + +typedef u32 xtalk_dline_t[XTDLINE_SZ]; +typedef u16 xtalk_gains_t[XTGAINS_SZ]; +typedef u16 xtalk_instate_t[XTINST_SZ]; +typedef u16 xtalk_coefs_t[5][5]; +typedef u16 xtalk_state_t[5][4]; + +static void vortex_XtalkHw_SetGains(vortex_t * vortex, + xtalk_gains_t const gains); +static void vortex_XtalkHw_SetGainsAllChan(vortex_t * vortex); +static void vortex_XtalkHw_SetSampleRate(vortex_t * vortex, u32 sr); +static void vortex_XtalkHw_ProgramPipe(vortex_t * vortex); +static void vortex_XtalkHw_ProgramPipe(vortex_t * vortex); +static void vortex_XtalkHw_ProgramXtalkWide(vortex_t * vortex); +static void vortex_XtalkHw_ProgramXtalkNarrow(vortex_t * vortex); +static void vortex_XtalkHw_ProgramDiamondXtalk(vortex_t * vortex); +static void vortex_XtalkHw_Enable(vortex_t * vortex); +static void vortex_XtalkHw_Disable(vortex_t * vortex); +static void vortex_XtalkHw_init(vortex_t * vortex); + +#endif /* _AU88X0_CXTALK_H */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/au88x0/au88x0_xtalk.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/au88x0/au88x0_xtalk.h.yml new file mode 100644 index 00000000000..4ad3b6e208c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/au88x0/au88x0_xtalk.h.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2003 mjander mjander@users.sourceforge.org +holders: + - mjander diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/cs46xx/cs46xx.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/cs46xx/cs46xx.h new file mode 100644 index 00000000000..ebb9278cedc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/cs46xx/cs46xx.h @@ -0,0 +1,1749 @@ +#ifndef __SOUND_CS46XX_H +#define __SOUND_CS46XX_H + +/* + * Copyright (c) by Jaroslav Kysela , + * Cirrus Logic, Inc. + * Definitions for Cirrus Logic CS46xx chips + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include "cs46xx_dsp_spos.h" + +/* + * Direct registers + */ + +/* + * The following define the offsets of the registers accessed via base address + * register zero on the CS46xx part. + */ +#define BA0_HISR 0x00000000 +#define BA0_HSR0 0x00000004 +#define BA0_HICR 0x00000008 +#define BA0_DMSR 0x00000100 +#define BA0_HSAR 0x00000110 +#define BA0_HDAR 0x00000114 +#define BA0_HDMR 0x00000118 +#define BA0_HDCR 0x0000011C +#define BA0_PFMC 0x00000200 +#define BA0_PFCV1 0x00000204 +#define BA0_PFCV2 0x00000208 +#define BA0_PCICFG00 0x00000300 +#define BA0_PCICFG04 0x00000304 +#define BA0_PCICFG08 0x00000308 +#define BA0_PCICFG0C 0x0000030C +#define BA0_PCICFG10 0x00000310 +#define BA0_PCICFG14 0x00000314 +#define BA0_PCICFG18 0x00000318 +#define BA0_PCICFG1C 0x0000031C +#define BA0_PCICFG20 0x00000320 +#define BA0_PCICFG24 0x00000324 +#define BA0_PCICFG28 0x00000328 +#define BA0_PCICFG2C 0x0000032C +#define BA0_PCICFG30 0x00000330 +#define BA0_PCICFG34 0x00000334 +#define BA0_PCICFG38 0x00000338 +#define BA0_PCICFG3C 0x0000033C +#define BA0_CLKCR1 0x00000400 +#define BA0_CLKCR2 0x00000404 +#define BA0_PLLM 0x00000408 +#define BA0_PLLCC 0x0000040C +#define BA0_FRR 0x00000410 +#define BA0_CFL1 0x00000414 +#define BA0_CFL2 0x00000418 +#define BA0_SERMC1 0x00000420 +#define BA0_SERMC2 0x00000424 +#define BA0_SERC1 0x00000428 +#define BA0_SERC2 0x0000042C +#define BA0_SERC3 0x00000430 +#define BA0_SERC4 0x00000434 +#define BA0_SERC5 0x00000438 +#define BA0_SERBSP 0x0000043C +#define BA0_SERBST 0x00000440 +#define BA0_SERBCM 0x00000444 +#define BA0_SERBAD 0x00000448 +#define BA0_SERBCF 0x0000044C +#define BA0_SERBWP 0x00000450 +#define BA0_SERBRP 0x00000454 +#ifndef NO_CS4612 +#define BA0_ASER_FADDR 0x00000458 +#endif +#define BA0_ACCTL 0x00000460 +#define BA0_ACSTS 0x00000464 +#define BA0_ACOSV 0x00000468 +#define BA0_ACCAD 0x0000046C +#define BA0_ACCDA 0x00000470 +#define BA0_ACISV 0x00000474 +#define BA0_ACSAD 0x00000478 +#define BA0_ACSDA 0x0000047C +#define BA0_JSPT 0x00000480 +#define BA0_JSCTL 0x00000484 +#define BA0_JSC1 0x00000488 +#define BA0_JSC2 0x0000048C +#define BA0_MIDCR 0x00000490 +#define BA0_MIDSR 0x00000494 +#define BA0_MIDWP 0x00000498 +#define BA0_MIDRP 0x0000049C +#define BA0_JSIO 0x000004A0 +#ifndef NO_CS4612 +#define BA0_ASER_MASTER 0x000004A4 +#endif +#define BA0_CFGI 0x000004B0 +#define BA0_SSVID 0x000004B4 +#define BA0_GPIOR 0x000004B8 +#ifndef NO_CS4612 +#define BA0_EGPIODR 0x000004BC +#define BA0_EGPIOPTR 0x000004C0 +#define BA0_EGPIOTR 0x000004C4 +#define BA0_EGPIOWR 0x000004C8 +#define BA0_EGPIOSR 0x000004CC +#define BA0_SERC6 0x000004D0 +#define BA0_SERC7 0x000004D4 +#define BA0_SERACC 0x000004D8 +#define BA0_ACCTL2 0x000004E0 +#define BA0_ACSTS2 0x000004E4 +#define BA0_ACOSV2 0x000004E8 +#define BA0_ACCAD2 0x000004EC +#define BA0_ACCDA2 0x000004F0 +#define BA0_ACISV2 0x000004F4 +#define BA0_ACSAD2 0x000004F8 +#define BA0_ACSDA2 0x000004FC +#define BA0_IOTAC0 0x00000500 +#define BA0_IOTAC1 0x00000504 +#define BA0_IOTAC2 0x00000508 +#define BA0_IOTAC3 0x0000050C +#define BA0_IOTAC4 0x00000510 +#define BA0_IOTAC5 0x00000514 +#define BA0_IOTAC6 0x00000518 +#define BA0_IOTAC7 0x0000051C +#define BA0_IOTAC8 0x00000520 +#define BA0_IOTAC9 0x00000524 +#define BA0_IOTAC10 0x00000528 +#define BA0_IOTAC11 0x0000052C +#define BA0_IOTFR0 0x00000540 +#define BA0_IOTFR1 0x00000544 +#define BA0_IOTFR2 0x00000548 +#define BA0_IOTFR3 0x0000054C +#define BA0_IOTFR4 0x00000550 +#define BA0_IOTFR5 0x00000554 +#define BA0_IOTFR6 0x00000558 +#define BA0_IOTFR7 0x0000055C +#define BA0_IOTFIFO 0x00000580 +#define BA0_IOTRRD 0x00000584 +#define BA0_IOTFP 0x00000588 +#define BA0_IOTCR 0x0000058C +#define BA0_DPCID 0x00000590 +#define BA0_DPCIA 0x00000594 +#define BA0_DPCIC 0x00000598 +#define BA0_PCPCIR 0x00000600 +#define BA0_PCPCIG 0x00000604 +#define BA0_PCPCIEN 0x00000608 +#define BA0_EPCIPMC 0x00000610 +#endif + +/* + * The following define the offsets of the registers and memories accessed via + * base address register one on the CS46xx part. + */ +#define BA1_SP_DMEM0 0x00000000 +#define BA1_SP_DMEM1 0x00010000 +#define BA1_SP_PMEM 0x00020000 +#define BA1_SP_REG 0x00030000 +#define BA1_SPCR 0x00030000 +#define BA1_DREG 0x00030004 +#define BA1_DSRWP 0x00030008 +#define BA1_TWPR 0x0003000C +#define BA1_SPWR 0x00030010 +#define BA1_SPIR 0x00030014 +#define BA1_FGR1 0x00030020 +#define BA1_SPCS 0x00030028 +#define BA1_SDSR 0x0003002C +#define BA1_FRMT 0x00030030 +#define BA1_FRCC 0x00030034 +#define BA1_FRSC 0x00030038 +#define BA1_OMNI_MEM 0x000E0000 + + +/* + * The following defines are for the flags in the host interrupt status + * register. + */ +#define HISR_VC_MASK 0x0000FFFF +#define HISR_VC0 0x00000001 +#define HISR_VC1 0x00000002 +#define HISR_VC2 0x00000004 +#define HISR_VC3 0x00000008 +#define HISR_VC4 0x00000010 +#define HISR_VC5 0x00000020 +#define HISR_VC6 0x00000040 +#define HISR_VC7 0x00000080 +#define HISR_VC8 0x00000100 +#define HISR_VC9 0x00000200 +#define HISR_VC10 0x00000400 +#define HISR_VC11 0x00000800 +#define HISR_VC12 0x00001000 +#define HISR_VC13 0x00002000 +#define HISR_VC14 0x00004000 +#define HISR_VC15 0x00008000 +#define HISR_INT0 0x00010000 +#define HISR_INT1 0x00020000 +#define HISR_DMAI 0x00040000 +#define HISR_FROVR 0x00080000 +#define HISR_MIDI 0x00100000 +#ifdef NO_CS4612 +#define HISR_RESERVED 0x0FE00000 +#else +#define HISR_SBINT 0x00200000 +#define HISR_RESERVED 0x0FC00000 +#endif +#define HISR_H0P 0x40000000 +#define HISR_INTENA 0x80000000 + +/* + * The following defines are for the flags in the host signal register 0. + */ +#define HSR0_VC_MASK 0xFFFFFFFF +#define HSR0_VC16 0x00000001 +#define HSR0_VC17 0x00000002 +#define HSR0_VC18 0x00000004 +#define HSR0_VC19 0x00000008 +#define HSR0_VC20 0x00000010 +#define HSR0_VC21 0x00000020 +#define HSR0_VC22 0x00000040 +#define HSR0_VC23 0x00000080 +#define HSR0_VC24 0x00000100 +#define HSR0_VC25 0x00000200 +#define HSR0_VC26 0x00000400 +#define HSR0_VC27 0x00000800 +#define HSR0_VC28 0x00001000 +#define HSR0_VC29 0x00002000 +#define HSR0_VC30 0x00004000 +#define HSR0_VC31 0x00008000 +#define HSR0_VC32 0x00010000 +#define HSR0_VC33 0x00020000 +#define HSR0_VC34 0x00040000 +#define HSR0_VC35 0x00080000 +#define HSR0_VC36 0x00100000 +#define HSR0_VC37 0x00200000 +#define HSR0_VC38 0x00400000 +#define HSR0_VC39 0x00800000 +#define HSR0_VC40 0x01000000 +#define HSR0_VC41 0x02000000 +#define HSR0_VC42 0x04000000 +#define HSR0_VC43 0x08000000 +#define HSR0_VC44 0x10000000 +#define HSR0_VC45 0x20000000 +#define HSR0_VC46 0x40000000 +#define HSR0_VC47 0x80000000 + +/* + * The following defines are for the flags in the host interrupt control + * register. + */ +#define HICR_IEV 0x00000001 +#define HICR_CHGM 0x00000002 + +/* + * The following defines are for the flags in the DMA status register. + */ +#define DMSR_HP 0x00000001 +#define DMSR_HR 0x00000002 +#define DMSR_SP 0x00000004 +#define DMSR_SR 0x00000008 + +/* + * The following defines are for the flags in the host DMA source address + * register. + */ +#define HSAR_HOST_ADDR_MASK 0xFFFFFFFF +#define HSAR_DSP_ADDR_MASK 0x0000FFFF +#define HSAR_MEMID_MASK 0x000F0000 +#define HSAR_MEMID_SP_DMEM0 0x00000000 +#define HSAR_MEMID_SP_DMEM1 0x00010000 +#define HSAR_MEMID_SP_PMEM 0x00020000 +#define HSAR_MEMID_SP_DEBUG 0x00030000 +#define HSAR_MEMID_OMNI_MEM 0x000E0000 +#define HSAR_END 0x40000000 +#define HSAR_ERR 0x80000000 + +/* + * The following defines are for the flags in the host DMA destination address + * register. + */ +#define HDAR_HOST_ADDR_MASK 0xFFFFFFFF +#define HDAR_DSP_ADDR_MASK 0x0000FFFF +#define HDAR_MEMID_MASK 0x000F0000 +#define HDAR_MEMID_SP_DMEM0 0x00000000 +#define HDAR_MEMID_SP_DMEM1 0x00010000 +#define HDAR_MEMID_SP_PMEM 0x00020000 +#define HDAR_MEMID_SP_DEBUG 0x00030000 +#define HDAR_MEMID_OMNI_MEM 0x000E0000 +#define HDAR_END 0x40000000 +#define HDAR_ERR 0x80000000 + +/* + * The following defines are for the flags in the host DMA control register. + */ +#define HDMR_AC_MASK 0x0000F000 +#define HDMR_AC_8_16 0x00001000 +#define HDMR_AC_M_S 0x00002000 +#define HDMR_AC_B_L 0x00004000 +#define HDMR_AC_S_U 0x00008000 + +/* + * The following defines are for the flags in the host DMA control register. + */ +#define HDCR_COUNT_MASK 0x000003FF +#define HDCR_DONE 0x00004000 +#define HDCR_OPT 0x00008000 +#define HDCR_WBD 0x00400000 +#define HDCR_WBS 0x00800000 +#define HDCR_DMS_MASK 0x07000000 +#define HDCR_DMS_LINEAR 0x00000000 +#define HDCR_DMS_16_DWORDS 0x01000000 +#define HDCR_DMS_32_DWORDS 0x02000000 +#define HDCR_DMS_64_DWORDS 0x03000000 +#define HDCR_DMS_128_DWORDS 0x04000000 +#define HDCR_DMS_256_DWORDS 0x05000000 +#define HDCR_DMS_512_DWORDS 0x06000000 +#define HDCR_DMS_1024_DWORDS 0x07000000 +#define HDCR_DH 0x08000000 +#define HDCR_SMS_MASK 0x70000000 +#define HDCR_SMS_LINEAR 0x00000000 +#define HDCR_SMS_16_DWORDS 0x10000000 +#define HDCR_SMS_32_DWORDS 0x20000000 +#define HDCR_SMS_64_DWORDS 0x30000000 +#define HDCR_SMS_128_DWORDS 0x40000000 +#define HDCR_SMS_256_DWORDS 0x50000000 +#define HDCR_SMS_512_DWORDS 0x60000000 +#define HDCR_SMS_1024_DWORDS 0x70000000 +#define HDCR_SH 0x80000000 +#define HDCR_COUNT_SHIFT 0 + +/* + * The following defines are for the flags in the performance monitor control + * register. + */ +#define PFMC_C1SS_MASK 0x0000001F +#define PFMC_C1EV 0x00000020 +#define PFMC_C1RS 0x00008000 +#define PFMC_C2SS_MASK 0x001F0000 +#define PFMC_C2EV 0x00200000 +#define PFMC_C2RS 0x80000000 +#define PFMC_C1SS_SHIFT 0 +#define PFMC_C2SS_SHIFT 16 +#define PFMC_BUS_GRANT 0 +#define PFMC_GRANT_AFTER_REQ 1 +#define PFMC_TRANSACTION 2 +#define PFMC_DWORD_TRANSFER 3 +#define PFMC_SLAVE_READ 4 +#define PFMC_SLAVE_WRITE 5 +#define PFMC_PREEMPTION 6 +#define PFMC_DISCONNECT_RETRY 7 +#define PFMC_INTERRUPT 8 +#define PFMC_BUS_OWNERSHIP 9 +#define PFMC_TRANSACTION_LAG 10 +#define PFMC_PCI_CLOCK 11 +#define PFMC_SERIAL_CLOCK 12 +#define PFMC_SP_CLOCK 13 + +/* + * The following defines are for the flags in the performance counter value 1 + * register. + */ +#define PFCV1_PC1V_MASK 0xFFFFFFFF +#define PFCV1_PC1V_SHIFT 0 + +/* + * The following defines are for the flags in the performance counter value 2 + * register. + */ +#define PFCV2_PC2V_MASK 0xFFFFFFFF +#define PFCV2_PC2V_SHIFT 0 + +/* + * The following defines are for the flags in the clock control register 1. + */ +#define CLKCR1_OSCS 0x00000001 +#define CLKCR1_OSCP 0x00000002 +#define CLKCR1_PLLSS_MASK 0x0000000C +#define CLKCR1_PLLSS_SERIAL 0x00000000 +#define CLKCR1_PLLSS_CRYSTAL 0x00000004 +#define CLKCR1_PLLSS_PCI 0x00000008 +#define CLKCR1_PLLSS_RESERVED 0x0000000C +#define CLKCR1_PLLP 0x00000010 +#define CLKCR1_SWCE 0x00000020 +#define CLKCR1_PLLOS 0x00000040 + +/* + * The following defines are for the flags in the clock control register 2. + */ +#define CLKCR2_PDIVS_MASK 0x0000000F +#define CLKCR2_PDIVS_1 0x00000001 +#define CLKCR2_PDIVS_2 0x00000002 +#define CLKCR2_PDIVS_4 0x00000004 +#define CLKCR2_PDIVS_7 0x00000007 +#define CLKCR2_PDIVS_8 0x00000008 +#define CLKCR2_PDIVS_16 0x00000000 + +/* + * The following defines are for the flags in the PLL multiplier register. + */ +#define PLLM_MASK 0x000000FF +#define PLLM_SHIFT 0 + +/* + * The following defines are for the flags in the PLL capacitor coefficient + * register. + */ +#define PLLCC_CDR_MASK 0x00000007 +#ifndef NO_CS4610 +#define PLLCC_CDR_240_350_MHZ 0x00000000 +#define PLLCC_CDR_184_265_MHZ 0x00000001 +#define PLLCC_CDR_144_205_MHZ 0x00000002 +#define PLLCC_CDR_111_160_MHZ 0x00000003 +#define PLLCC_CDR_87_123_MHZ 0x00000004 +#define PLLCC_CDR_67_96_MHZ 0x00000005 +#define PLLCC_CDR_52_74_MHZ 0x00000006 +#define PLLCC_CDR_45_58_MHZ 0x00000007 +#endif +#ifndef NO_CS4612 +#define PLLCC_CDR_271_398_MHZ 0x00000000 +#define PLLCC_CDR_227_330_MHZ 0x00000001 +#define PLLCC_CDR_167_239_MHZ 0x00000002 +#define PLLCC_CDR_150_215_MHZ 0x00000003 +#define PLLCC_CDR_107_154_MHZ 0x00000004 +#define PLLCC_CDR_98_140_MHZ 0x00000005 +#define PLLCC_CDR_73_104_MHZ 0x00000006 +#define PLLCC_CDR_63_90_MHZ 0x00000007 +#endif +#define PLLCC_LPF_MASK 0x000000F8 +#ifndef NO_CS4610 +#define PLLCC_LPF_23850_60000_KHZ 0x00000000 +#define PLLCC_LPF_7960_26290_KHZ 0x00000008 +#define PLLCC_LPF_4160_10980_KHZ 0x00000018 +#define PLLCC_LPF_1740_4580_KHZ 0x00000038 +#define PLLCC_LPF_724_1910_KHZ 0x00000078 +#define PLLCC_LPF_317_798_KHZ 0x000000F8 +#endif +#ifndef NO_CS4612 +#define PLLCC_LPF_25580_64530_KHZ 0x00000000 +#define PLLCC_LPF_14360_37270_KHZ 0x00000008 +#define PLLCC_LPF_6100_16020_KHZ 0x00000018 +#define PLLCC_LPF_2540_6690_KHZ 0x00000038 +#define PLLCC_LPF_1050_2780_KHZ 0x00000078 +#define PLLCC_LPF_450_1160_KHZ 0x000000F8 +#endif + +/* + * The following defines are for the flags in the feature reporting register. + */ +#define FRR_FAB_MASK 0x00000003 +#define FRR_MASK_MASK 0x0000001C +#ifdef NO_CS4612 +#define FRR_CFOP_MASK 0x000000E0 +#else +#define FRR_CFOP_MASK 0x00000FE0 +#endif +#define FRR_CFOP_NOT_DVD 0x00000020 +#define FRR_CFOP_A3D 0x00000040 +#define FRR_CFOP_128_PIN 0x00000080 +#ifndef NO_CS4612 +#define FRR_CFOP_CS4280 0x00000800 +#endif +#define FRR_FAB_SHIFT 0 +#define FRR_MASK_SHIFT 2 +#define FRR_CFOP_SHIFT 5 + +/* + * The following defines are for the flags in the configuration load 1 + * register. + */ +#define CFL1_CLOCK_SOURCE_MASK 0x00000003 +#define CFL1_CLOCK_SOURCE_CS423X 0x00000000 +#define CFL1_CLOCK_SOURCE_AC97 0x00000001 +#define CFL1_CLOCK_SOURCE_CRYSTAL 0x00000002 +#define CFL1_CLOCK_SOURCE_DUAL_AC97 0x00000003 +#define CFL1_VALID_DATA_MASK 0x000000FF + +/* + * The following defines are for the flags in the configuration load 2 + * register. + */ +#define CFL2_VALID_DATA_MASK 0x000000FF + +/* + * The following defines are for the flags in the serial port master control + * register 1. + */ +#define SERMC1_MSPE 0x00000001 +#define SERMC1_PTC_MASK 0x0000000E +#define SERMC1_PTC_CS423X 0x00000000 +#define SERMC1_PTC_AC97 0x00000002 +#define SERMC1_PTC_DAC 0x00000004 +#define SERMC1_PLB 0x00000010 +#define SERMC1_XLB 0x00000020 + +/* + * The following defines are for the flags in the serial port master control + * register 2. + */ +#define SERMC2_LROE 0x00000001 +#define SERMC2_MCOE 0x00000002 +#define SERMC2_MCDIV 0x00000004 + +/* + * The following defines are for the flags in the serial port 1 configuration + * register. + */ +#define SERC1_SO1EN 0x00000001 +#define SERC1_SO1F_MASK 0x0000000E +#define SERC1_SO1F_CS423X 0x00000000 +#define SERC1_SO1F_AC97 0x00000002 +#define SERC1_SO1F_DAC 0x00000004 +#define SERC1_SO1F_SPDIF 0x00000006 + +/* + * The following defines are for the flags in the serial port 2 configuration + * register. + */ +#define SERC2_SI1EN 0x00000001 +#define SERC2_SI1F_MASK 0x0000000E +#define SERC2_SI1F_CS423X 0x00000000 +#define SERC2_SI1F_AC97 0x00000002 +#define SERC2_SI1F_ADC 0x00000004 +#define SERC2_SI1F_SPDIF 0x00000006 + +/* + * The following defines are for the flags in the serial port 3 configuration + * register. + */ +#define SERC3_SO2EN 0x00000001 +#define SERC3_SO2F_MASK 0x00000006 +#define SERC3_SO2F_DAC 0x00000000 +#define SERC3_SO2F_SPDIF 0x00000002 + +/* + * The following defines are for the flags in the serial port 4 configuration + * register. + */ +#define SERC4_SO3EN 0x00000001 +#define SERC4_SO3F_MASK 0x00000006 +#define SERC4_SO3F_DAC 0x00000000 +#define SERC4_SO3F_SPDIF 0x00000002 + +/* + * The following defines are for the flags in the serial port 5 configuration + * register. + */ +#define SERC5_SI2EN 0x00000001 +#define SERC5_SI2F_MASK 0x00000006 +#define SERC5_SI2F_ADC 0x00000000 +#define SERC5_SI2F_SPDIF 0x00000002 + +/* + * The following defines are for the flags in the serial port backdoor sample + * pointer register. + */ +#define SERBSP_FSP_MASK 0x0000000F +#define SERBSP_FSP_SHIFT 0 + +/* + * The following defines are for the flags in the serial port backdoor status + * register. + */ +#define SERBST_RRDY 0x00000001 +#define SERBST_WBSY 0x00000002 + +/* + * The following defines are for the flags in the serial port backdoor command + * register. + */ +#define SERBCM_RDC 0x00000001 +#define SERBCM_WRC 0x00000002 + +/* + * The following defines are for the flags in the serial port backdoor address + * register. + */ +#ifdef NO_CS4612 +#define SERBAD_FAD_MASK 0x000000FF +#else +#define SERBAD_FAD_MASK 0x000001FF +#endif +#define SERBAD_FAD_SHIFT 0 + +/* + * The following defines are for the flags in the serial port backdoor + * configuration register. + */ +#define SERBCF_HBP 0x00000001 + +/* + * The following defines are for the flags in the serial port backdoor write + * port register. + */ +#define SERBWP_FWD_MASK 0x000FFFFF +#define SERBWP_FWD_SHIFT 0 + +/* + * The following defines are for the flags in the serial port backdoor read + * port register. + */ +#define SERBRP_FRD_MASK 0x000FFFFF +#define SERBRP_FRD_SHIFT 0 + +/* + * The following defines are for the flags in the async FIFO address register. + */ +#ifndef NO_CS4612 +#define ASER_FADDR_A1_MASK 0x000001FF +#define ASER_FADDR_EN1 0x00008000 +#define ASER_FADDR_A2_MASK 0x01FF0000 +#define ASER_FADDR_EN2 0x80000000 +#define ASER_FADDR_A1_SHIFT 0 +#define ASER_FADDR_A2_SHIFT 16 +#endif + +/* + * The following defines are for the flags in the AC97 control register. + */ +#define ACCTL_RSTN 0x00000001 +#define ACCTL_ESYN 0x00000002 +#define ACCTL_VFRM 0x00000004 +#define ACCTL_DCV 0x00000008 +#define ACCTL_CRW 0x00000010 +#define ACCTL_ASYN 0x00000020 +#ifndef NO_CS4612 +#define ACCTL_TC 0x00000040 +#endif + +/* + * The following defines are for the flags in the AC97 status register. + */ +#define ACSTS_CRDY 0x00000001 +#define ACSTS_VSTS 0x00000002 +#ifndef NO_CS4612 +#define ACSTS_WKUP 0x00000004 +#endif + +/* + * The following defines are for the flags in the AC97 output slot valid + * register. + */ +#define ACOSV_SLV3 0x00000001 +#define ACOSV_SLV4 0x00000002 +#define ACOSV_SLV5 0x00000004 +#define ACOSV_SLV6 0x00000008 +#define ACOSV_SLV7 0x00000010 +#define ACOSV_SLV8 0x00000020 +#define ACOSV_SLV9 0x00000040 +#define ACOSV_SLV10 0x00000080 +#define ACOSV_SLV11 0x00000100 +#define ACOSV_SLV12 0x00000200 + +/* + * The following defines are for the flags in the AC97 command address + * register. + */ +#define ACCAD_CI_MASK 0x0000007F +#define ACCAD_CI_SHIFT 0 + +/* + * The following defines are for the flags in the AC97 command data register. + */ +#define ACCDA_CD_MASK 0x0000FFFF +#define ACCDA_CD_SHIFT 0 + +/* + * The following defines are for the flags in the AC97 input slot valid + * register. + */ +#define ACISV_ISV3 0x00000001 +#define ACISV_ISV4 0x00000002 +#define ACISV_ISV5 0x00000004 +#define ACISV_ISV6 0x00000008 +#define ACISV_ISV7 0x00000010 +#define ACISV_ISV8 0x00000020 +#define ACISV_ISV9 0x00000040 +#define ACISV_ISV10 0x00000080 +#define ACISV_ISV11 0x00000100 +#define ACISV_ISV12 0x00000200 + +/* + * The following defines are for the flags in the AC97 status address + * register. + */ +#define ACSAD_SI_MASK 0x0000007F +#define ACSAD_SI_SHIFT 0 + +/* + * The following defines are for the flags in the AC97 status data register. + */ +#define ACSDA_SD_MASK 0x0000FFFF +#define ACSDA_SD_SHIFT 0 + +/* + * The following defines are for the flags in the joystick poll/trigger + * register. + */ +#define JSPT_CAX 0x00000001 +#define JSPT_CAY 0x00000002 +#define JSPT_CBX 0x00000004 +#define JSPT_CBY 0x00000008 +#define JSPT_BA1 0x00000010 +#define JSPT_BA2 0x00000020 +#define JSPT_BB1 0x00000040 +#define JSPT_BB2 0x00000080 + +/* + * The following defines are for the flags in the joystick control register. + */ +#define JSCTL_SP_MASK 0x00000003 +#define JSCTL_SP_SLOW 0x00000000 +#define JSCTL_SP_MEDIUM_SLOW 0x00000001 +#define JSCTL_SP_MEDIUM_FAST 0x00000002 +#define JSCTL_SP_FAST 0x00000003 +#define JSCTL_ARE 0x00000004 + +/* + * The following defines are for the flags in the joystick coordinate pair 1 + * readback register. + */ +#define JSC1_Y1V_MASK 0x0000FFFF +#define JSC1_X1V_MASK 0xFFFF0000 +#define JSC1_Y1V_SHIFT 0 +#define JSC1_X1V_SHIFT 16 + +/* + * The following defines are for the flags in the joystick coordinate pair 2 + * readback register. + */ +#define JSC2_Y2V_MASK 0x0000FFFF +#define JSC2_X2V_MASK 0xFFFF0000 +#define JSC2_Y2V_SHIFT 0 +#define JSC2_X2V_SHIFT 16 + +/* + * The following defines are for the flags in the MIDI control register. + */ +#define MIDCR_TXE 0x00000001 /* Enable transmitting. */ +#define MIDCR_RXE 0x00000002 /* Enable receiving. */ +#define MIDCR_RIE 0x00000004 /* Interrupt upon tx ready. */ +#define MIDCR_TIE 0x00000008 /* Interrupt upon rx ready. */ +#define MIDCR_MLB 0x00000010 /* Enable midi loopback. */ +#define MIDCR_MRST 0x00000020 /* Reset interface. */ + +/* + * The following defines are for the flags in the MIDI status register. + */ +#define MIDSR_TBF 0x00000001 /* Tx FIFO is full. */ +#define MIDSR_RBE 0x00000002 /* Rx FIFO is empty. */ + +/* + * The following defines are for the flags in the MIDI write port register. + */ +#define MIDWP_MWD_MASK 0x000000FF +#define MIDWP_MWD_SHIFT 0 + +/* + * The following defines are for the flags in the MIDI read port register. + */ +#define MIDRP_MRD_MASK 0x000000FF +#define MIDRP_MRD_SHIFT 0 + +/* + * The following defines are for the flags in the joystick GPIO register. + */ +#define JSIO_DAX 0x00000001 +#define JSIO_DAY 0x00000002 +#define JSIO_DBX 0x00000004 +#define JSIO_DBY 0x00000008 +#define JSIO_AXOE 0x00000010 +#define JSIO_AYOE 0x00000020 +#define JSIO_BXOE 0x00000040 +#define JSIO_BYOE 0x00000080 + +/* + * The following defines are for the flags in the master async/sync serial + * port enable register. + */ +#ifndef NO_CS4612 +#define ASER_MASTER_ME 0x00000001 +#endif + +/* + * The following defines are for the flags in the configuration interface + * register. + */ +#define CFGI_CLK 0x00000001 +#define CFGI_DOUT 0x00000002 +#define CFGI_DIN_EEN 0x00000004 +#define CFGI_EELD 0x00000008 + +/* + * The following defines are for the flags in the subsystem ID and vendor ID + * register. + */ +#define SSVID_VID_MASK 0x0000FFFF +#define SSVID_SID_MASK 0xFFFF0000 +#define SSVID_VID_SHIFT 0 +#define SSVID_SID_SHIFT 16 + +/* + * The following defines are for the flags in the GPIO pin interface register. + */ +#define GPIOR_VOLDN 0x00000001 +#define GPIOR_VOLUP 0x00000002 +#define GPIOR_SI2D 0x00000004 +#define GPIOR_SI2OE 0x00000008 + +/* + * The following defines are for the flags in the extended GPIO pin direction + * register. + */ +#ifndef NO_CS4612 +#define EGPIODR_GPOE0 0x00000001 +#define EGPIODR_GPOE1 0x00000002 +#define EGPIODR_GPOE2 0x00000004 +#define EGPIODR_GPOE3 0x00000008 +#define EGPIODR_GPOE4 0x00000010 +#define EGPIODR_GPOE5 0x00000020 +#define EGPIODR_GPOE6 0x00000040 +#define EGPIODR_GPOE7 0x00000080 +#define EGPIODR_GPOE8 0x00000100 +#endif + +/* + * The following defines are for the flags in the extended GPIO pin polarity/ + * type register. + */ +#ifndef NO_CS4612 +#define EGPIOPTR_GPPT0 0x00000001 +#define EGPIOPTR_GPPT1 0x00000002 +#define EGPIOPTR_GPPT2 0x00000004 +#define EGPIOPTR_GPPT3 0x00000008 +#define EGPIOPTR_GPPT4 0x00000010 +#define EGPIOPTR_GPPT5 0x00000020 +#define EGPIOPTR_GPPT6 0x00000040 +#define EGPIOPTR_GPPT7 0x00000080 +#define EGPIOPTR_GPPT8 0x00000100 +#endif + +/* + * The following defines are for the flags in the extended GPIO pin sticky + * register. + */ +#ifndef NO_CS4612 +#define EGPIOTR_GPS0 0x00000001 +#define EGPIOTR_GPS1 0x00000002 +#define EGPIOTR_GPS2 0x00000004 +#define EGPIOTR_GPS3 0x00000008 +#define EGPIOTR_GPS4 0x00000010 +#define EGPIOTR_GPS5 0x00000020 +#define EGPIOTR_GPS6 0x00000040 +#define EGPIOTR_GPS7 0x00000080 +#define EGPIOTR_GPS8 0x00000100 +#endif + +/* + * The following defines are for the flags in the extended GPIO ping wakeup + * register. + */ +#ifndef NO_CS4612 +#define EGPIOWR_GPW0 0x00000001 +#define EGPIOWR_GPW1 0x00000002 +#define EGPIOWR_GPW2 0x00000004 +#define EGPIOWR_GPW3 0x00000008 +#define EGPIOWR_GPW4 0x00000010 +#define EGPIOWR_GPW5 0x00000020 +#define EGPIOWR_GPW6 0x00000040 +#define EGPIOWR_GPW7 0x00000080 +#define EGPIOWR_GPW8 0x00000100 +#endif + +/* + * The following defines are for the flags in the extended GPIO pin status + * register. + */ +#ifndef NO_CS4612 +#define EGPIOSR_GPS0 0x00000001 +#define EGPIOSR_GPS1 0x00000002 +#define EGPIOSR_GPS2 0x00000004 +#define EGPIOSR_GPS3 0x00000008 +#define EGPIOSR_GPS4 0x00000010 +#define EGPIOSR_GPS5 0x00000020 +#define EGPIOSR_GPS6 0x00000040 +#define EGPIOSR_GPS7 0x00000080 +#define EGPIOSR_GPS8 0x00000100 +#endif + +/* + * The following defines are for the flags in the serial port 6 configuration + * register. + */ +#ifndef NO_CS4612 +#define SERC6_ASDO2EN 0x00000001 +#endif + +/* + * The following defines are for the flags in the serial port 7 configuration + * register. + */ +#ifndef NO_CS4612 +#define SERC7_ASDI2EN 0x00000001 +#define SERC7_POSILB 0x00000002 +#define SERC7_SIPOLB 0x00000004 +#define SERC7_SOSILB 0x00000008 +#define SERC7_SISOLB 0x00000010 +#endif + +/* + * The following defines are for the flags in the serial port AC link + * configuration register. + */ +#ifndef NO_CS4612 +#define SERACC_CHIP_TYPE_MASK 0x00000001 +#define SERACC_CHIP_TYPE_1_03 0x00000000 +#define SERACC_CHIP_TYPE_2_0 0x00000001 +#define SERACC_TWO_CODECS 0x00000002 +#define SERACC_MDM 0x00000004 +#define SERACC_HSP 0x00000008 +#define SERACC_ODT 0x00000010 /* only CS4630 */ +#endif + +/* + * The following defines are for the flags in the AC97 control register 2. + */ +#ifndef NO_CS4612 +#define ACCTL2_RSTN 0x00000001 +#define ACCTL2_ESYN 0x00000002 +#define ACCTL2_VFRM 0x00000004 +#define ACCTL2_DCV 0x00000008 +#define ACCTL2_CRW 0x00000010 +#define ACCTL2_ASYN 0x00000020 +#endif + +/* + * The following defines are for the flags in the AC97 status register 2. + */ +#ifndef NO_CS4612 +#define ACSTS2_CRDY 0x00000001 +#define ACSTS2_VSTS 0x00000002 +#endif + +/* + * The following defines are for the flags in the AC97 output slot valid + * register 2. + */ +#ifndef NO_CS4612 +#define ACOSV2_SLV3 0x00000001 +#define ACOSV2_SLV4 0x00000002 +#define ACOSV2_SLV5 0x00000004 +#define ACOSV2_SLV6 0x00000008 +#define ACOSV2_SLV7 0x00000010 +#define ACOSV2_SLV8 0x00000020 +#define ACOSV2_SLV9 0x00000040 +#define ACOSV2_SLV10 0x00000080 +#define ACOSV2_SLV11 0x00000100 +#define ACOSV2_SLV12 0x00000200 +#endif + +/* + * The following defines are for the flags in the AC97 command address + * register 2. + */ +#ifndef NO_CS4612 +#define ACCAD2_CI_MASK 0x0000007F +#define ACCAD2_CI_SHIFT 0 +#endif + +/* + * The following defines are for the flags in the AC97 command data register + * 2. + */ +#ifndef NO_CS4612 +#define ACCDA2_CD_MASK 0x0000FFFF +#define ACCDA2_CD_SHIFT 0 +#endif + +/* + * The following defines are for the flags in the AC97 input slot valid + * register 2. + */ +#ifndef NO_CS4612 +#define ACISV2_ISV3 0x00000001 +#define ACISV2_ISV4 0x00000002 +#define ACISV2_ISV5 0x00000004 +#define ACISV2_ISV6 0x00000008 +#define ACISV2_ISV7 0x00000010 +#define ACISV2_ISV8 0x00000020 +#define ACISV2_ISV9 0x00000040 +#define ACISV2_ISV10 0x00000080 +#define ACISV2_ISV11 0x00000100 +#define ACISV2_ISV12 0x00000200 +#endif + +/* + * The following defines are for the flags in the AC97 status address + * register 2. + */ +#ifndef NO_CS4612 +#define ACSAD2_SI_MASK 0x0000007F +#define ACSAD2_SI_SHIFT 0 +#endif + +/* + * The following defines are for the flags in the AC97 status data register 2. + */ +#ifndef NO_CS4612 +#define ACSDA2_SD_MASK 0x0000FFFF +#define ACSDA2_SD_SHIFT 0 +#endif + +/* + * The following defines are for the flags in the I/O trap address and control + * registers (all 12). + */ +#ifndef NO_CS4612 +#define IOTAC_SA_MASK 0x0000FFFF +#define IOTAC_MSK_MASK 0x000F0000 +#define IOTAC_IODC_MASK 0x06000000 +#define IOTAC_IODC_16_BIT 0x00000000 +#define IOTAC_IODC_10_BIT 0x02000000 +#define IOTAC_IODC_12_BIT 0x04000000 +#define IOTAC_WSPI 0x08000000 +#define IOTAC_RSPI 0x10000000 +#define IOTAC_WSE 0x20000000 +#define IOTAC_WE 0x40000000 +#define IOTAC_RE 0x80000000 +#define IOTAC_SA_SHIFT 0 +#define IOTAC_MSK_SHIFT 16 +#endif + +/* + * The following defines are for the flags in the I/O trap fast read registers + * (all 8). + */ +#ifndef NO_CS4612 +#define IOTFR_D_MASK 0x0000FFFF +#define IOTFR_A_MASK 0x000F0000 +#define IOTFR_R_MASK 0x0F000000 +#define IOTFR_ALL 0x40000000 +#define IOTFR_VL 0x80000000 +#define IOTFR_D_SHIFT 0 +#define IOTFR_A_SHIFT 16 +#define IOTFR_R_SHIFT 24 +#endif + +/* + * The following defines are for the flags in the I/O trap FIFO register. + */ +#ifndef NO_CS4612 +#define IOTFIFO_BA_MASK 0x00003FFF +#define IOTFIFO_S_MASK 0x00FF0000 +#define IOTFIFO_OF 0x40000000 +#define IOTFIFO_SPIOF 0x80000000 +#define IOTFIFO_BA_SHIFT 0 +#define IOTFIFO_S_SHIFT 16 +#endif + +/* + * The following defines are for the flags in the I/O trap retry read data + * register. + */ +#ifndef NO_CS4612 +#define IOTRRD_D_MASK 0x0000FFFF +#define IOTRRD_RDV 0x80000000 +#define IOTRRD_D_SHIFT 0 +#endif + +/* + * The following defines are for the flags in the I/O trap FIFO pointer + * register. + */ +#ifndef NO_CS4612 +#define IOTFP_CA_MASK 0x00003FFF +#define IOTFP_PA_MASK 0x3FFF0000 +#define IOTFP_CA_SHIFT 0 +#define IOTFP_PA_SHIFT 16 +#endif + +/* + * The following defines are for the flags in the I/O trap control register. + */ +#ifndef NO_CS4612 +#define IOTCR_ITD 0x00000001 +#define IOTCR_HRV 0x00000002 +#define IOTCR_SRV 0x00000004 +#define IOTCR_DTI 0x00000008 +#define IOTCR_DFI 0x00000010 +#define IOTCR_DDP 0x00000020 +#define IOTCR_JTE 0x00000040 +#define IOTCR_PPE 0x00000080 +#endif + +/* + * The following defines are for the flags in the direct PCI data register. + */ +#ifndef NO_CS4612 +#define DPCID_D_MASK 0xFFFFFFFF +#define DPCID_D_SHIFT 0 +#endif + +/* + * The following defines are for the flags in the direct PCI address register. + */ +#ifndef NO_CS4612 +#define DPCIA_A_MASK 0xFFFFFFFF +#define DPCIA_A_SHIFT 0 +#endif + +/* + * The following defines are for the flags in the direct PCI command register. + */ +#ifndef NO_CS4612 +#define DPCIC_C_MASK 0x0000000F +#define DPCIC_C_IOREAD 0x00000002 +#define DPCIC_C_IOWRITE 0x00000003 +#define DPCIC_BE_MASK 0x000000F0 +#endif + +/* + * The following defines are for the flags in the PC/PCI request register. + */ +#ifndef NO_CS4612 +#define PCPCIR_RDC_MASK 0x00000007 +#define PCPCIR_C_MASK 0x00007000 +#define PCPCIR_REQ 0x00008000 +#define PCPCIR_RDC_SHIFT 0 +#define PCPCIR_C_SHIFT 12 +#endif + +/* + * The following defines are for the flags in the PC/PCI grant register. + */ +#ifndef NO_CS4612 +#define PCPCIG_GDC_MASK 0x00000007 +#define PCPCIG_VL 0x00008000 +#define PCPCIG_GDC_SHIFT 0 +#endif + +/* + * The following defines are for the flags in the PC/PCI master enable + * register. + */ +#ifndef NO_CS4612 +#define PCPCIEN_EN 0x00000001 +#endif + +/* + * The following defines are for the flags in the extended PCI power + * management control register. + */ +#ifndef NO_CS4612 +#define EPCIPMC_GWU 0x00000001 +#define EPCIPMC_FSPC 0x00000002 +#endif + +/* + * The following defines are for the flags in the SP control register. + */ +#define SPCR_RUN 0x00000001 +#define SPCR_STPFR 0x00000002 +#define SPCR_RUNFR 0x00000004 +#define SPCR_TICK 0x00000008 +#define SPCR_DRQEN 0x00000020 +#define SPCR_RSTSP 0x00000040 +#define SPCR_OREN 0x00000080 +#ifndef NO_CS4612 +#define SPCR_PCIINT 0x00000100 +#define SPCR_OINTD 0x00000200 +#define SPCR_CRE 0x00008000 +#endif + +/* + * The following defines are for the flags in the debug index register. + */ +#define DREG_REGID_MASK 0x0000007F +#define DREG_DEBUG 0x00000080 +#define DREG_RGBK_MASK 0x00000700 +#define DREG_TRAP 0x00000800 +#if !defined(NO_CS4612) +#if !defined(NO_CS4615) +#define DREG_TRAPX 0x00001000 +#endif +#endif +#define DREG_REGID_SHIFT 0 +#define DREG_RGBK_SHIFT 8 +#define DREG_RGBK_REGID_MASK 0x0000077F +#define DREG_REGID_R0 0x00000010 +#define DREG_REGID_R1 0x00000011 +#define DREG_REGID_R2 0x00000012 +#define DREG_REGID_R3 0x00000013 +#define DREG_REGID_R4 0x00000014 +#define DREG_REGID_R5 0x00000015 +#define DREG_REGID_R6 0x00000016 +#define DREG_REGID_R7 0x00000017 +#define DREG_REGID_R8 0x00000018 +#define DREG_REGID_R9 0x00000019 +#define DREG_REGID_RA 0x0000001A +#define DREG_REGID_RB 0x0000001B +#define DREG_REGID_RC 0x0000001C +#define DREG_REGID_RD 0x0000001D +#define DREG_REGID_RE 0x0000001E +#define DREG_REGID_RF 0x0000001F +#define DREG_REGID_RA_BUS_LOW 0x00000020 +#define DREG_REGID_RA_BUS_HIGH 0x00000038 +#define DREG_REGID_YBUS_LOW 0x00000050 +#define DREG_REGID_YBUS_HIGH 0x00000058 +#define DREG_REGID_TRAP_0 0x00000100 +#define DREG_REGID_TRAP_1 0x00000101 +#define DREG_REGID_TRAP_2 0x00000102 +#define DREG_REGID_TRAP_3 0x00000103 +#define DREG_REGID_TRAP_4 0x00000104 +#define DREG_REGID_TRAP_5 0x00000105 +#define DREG_REGID_TRAP_6 0x00000106 +#define DREG_REGID_TRAP_7 0x00000107 +#define DREG_REGID_INDIRECT_ADDRESS 0x0000010E +#define DREG_REGID_TOP_OF_STACK 0x0000010F +#if !defined(NO_CS4612) +#if !defined(NO_CS4615) +#define DREG_REGID_TRAP_8 0x00000110 +#define DREG_REGID_TRAP_9 0x00000111 +#define DREG_REGID_TRAP_10 0x00000112 +#define DREG_REGID_TRAP_11 0x00000113 +#define DREG_REGID_TRAP_12 0x00000114 +#define DREG_REGID_TRAP_13 0x00000115 +#define DREG_REGID_TRAP_14 0x00000116 +#define DREG_REGID_TRAP_15 0x00000117 +#define DREG_REGID_TRAP_16 0x00000118 +#define DREG_REGID_TRAP_17 0x00000119 +#define DREG_REGID_TRAP_18 0x0000011A +#define DREG_REGID_TRAP_19 0x0000011B +#define DREG_REGID_TRAP_20 0x0000011C +#define DREG_REGID_TRAP_21 0x0000011D +#define DREG_REGID_TRAP_22 0x0000011E +#define DREG_REGID_TRAP_23 0x0000011F +#endif +#endif +#define DREG_REGID_RSA0_LOW 0x00000200 +#define DREG_REGID_RSA0_HIGH 0x00000201 +#define DREG_REGID_RSA1_LOW 0x00000202 +#define DREG_REGID_RSA1_HIGH 0x00000203 +#define DREG_REGID_RSA2 0x00000204 +#define DREG_REGID_RSA3 0x00000205 +#define DREG_REGID_RSI0_LOW 0x00000206 +#define DREG_REGID_RSI0_HIGH 0x00000207 +#define DREG_REGID_RSI1 0x00000208 +#define DREG_REGID_RSI2 0x00000209 +#define DREG_REGID_SAGUSTATUS 0x0000020A +#define DREG_REGID_RSCONFIG01_LOW 0x0000020B +#define DREG_REGID_RSCONFIG01_HIGH 0x0000020C +#define DREG_REGID_RSCONFIG23_LOW 0x0000020D +#define DREG_REGID_RSCONFIG23_HIGH 0x0000020E +#define DREG_REGID_RSDMA01E 0x0000020F +#define DREG_REGID_RSDMA23E 0x00000210 +#define DREG_REGID_RSD0_LOW 0x00000211 +#define DREG_REGID_RSD0_HIGH 0x00000212 +#define DREG_REGID_RSD1_LOW 0x00000213 +#define DREG_REGID_RSD1_HIGH 0x00000214 +#define DREG_REGID_RSD2_LOW 0x00000215 +#define DREG_REGID_RSD2_HIGH 0x00000216 +#define DREG_REGID_RSD3_LOW 0x00000217 +#define DREG_REGID_RSD3_HIGH 0x00000218 +#define DREG_REGID_SRAR_HIGH 0x0000021A +#define DREG_REGID_SRAR_LOW 0x0000021B +#define DREG_REGID_DMA_STATE 0x0000021C +#define DREG_REGID_CURRENT_DMA_STREAM 0x0000021D +#define DREG_REGID_NEXT_DMA_STREAM 0x0000021E +#define DREG_REGID_CPU_STATUS 0x00000300 +#define DREG_REGID_MAC_MODE 0x00000301 +#define DREG_REGID_STACK_AND_REPEAT 0x00000302 +#define DREG_REGID_INDEX0 0x00000304 +#define DREG_REGID_INDEX1 0x00000305 +#define DREG_REGID_DMA_STATE_0_3 0x00000400 +#define DREG_REGID_DMA_STATE_4_7 0x00000404 +#define DREG_REGID_DMA_STATE_8_11 0x00000408 +#define DREG_REGID_DMA_STATE_12_15 0x0000040C +#define DREG_REGID_DMA_STATE_16_19 0x00000410 +#define DREG_REGID_DMA_STATE_20_23 0x00000414 +#define DREG_REGID_DMA_STATE_24_27 0x00000418 +#define DREG_REGID_DMA_STATE_28_31 0x0000041C +#define DREG_REGID_DMA_STATE_32_35 0x00000420 +#define DREG_REGID_DMA_STATE_36_39 0x00000424 +#define DREG_REGID_DMA_STATE_40_43 0x00000428 +#define DREG_REGID_DMA_STATE_44_47 0x0000042C +#define DREG_REGID_DMA_STATE_48_51 0x00000430 +#define DREG_REGID_DMA_STATE_52_55 0x00000434 +#define DREG_REGID_DMA_STATE_56_59 0x00000438 +#define DREG_REGID_DMA_STATE_60_63 0x0000043C +#define DREG_REGID_DMA_STATE_64_67 0x00000440 +#define DREG_REGID_DMA_STATE_68_71 0x00000444 +#define DREG_REGID_DMA_STATE_72_75 0x00000448 +#define DREG_REGID_DMA_STATE_76_79 0x0000044C +#define DREG_REGID_DMA_STATE_80_83 0x00000450 +#define DREG_REGID_DMA_STATE_84_87 0x00000454 +#define DREG_REGID_DMA_STATE_88_91 0x00000458 +#define DREG_REGID_DMA_STATE_92_95 0x0000045C +#define DREG_REGID_TRAP_SELECT 0x00000500 +#define DREG_REGID_TRAP_WRITE_0 0x00000500 +#define DREG_REGID_TRAP_WRITE_1 0x00000501 +#define DREG_REGID_TRAP_WRITE_2 0x00000502 +#define DREG_REGID_TRAP_WRITE_3 0x00000503 +#define DREG_REGID_TRAP_WRITE_4 0x00000504 +#define DREG_REGID_TRAP_WRITE_5 0x00000505 +#define DREG_REGID_TRAP_WRITE_6 0x00000506 +#define DREG_REGID_TRAP_WRITE_7 0x00000507 +#if !defined(NO_CS4612) +#if !defined(NO_CS4615) +#define DREG_REGID_TRAP_WRITE_8 0x00000510 +#define DREG_REGID_TRAP_WRITE_9 0x00000511 +#define DREG_REGID_TRAP_WRITE_10 0x00000512 +#define DREG_REGID_TRAP_WRITE_11 0x00000513 +#define DREG_REGID_TRAP_WRITE_12 0x00000514 +#define DREG_REGID_TRAP_WRITE_13 0x00000515 +#define DREG_REGID_TRAP_WRITE_14 0x00000516 +#define DREG_REGID_TRAP_WRITE_15 0x00000517 +#define DREG_REGID_TRAP_WRITE_16 0x00000518 +#define DREG_REGID_TRAP_WRITE_17 0x00000519 +#define DREG_REGID_TRAP_WRITE_18 0x0000051A +#define DREG_REGID_TRAP_WRITE_19 0x0000051B +#define DREG_REGID_TRAP_WRITE_20 0x0000051C +#define DREG_REGID_TRAP_WRITE_21 0x0000051D +#define DREG_REGID_TRAP_WRITE_22 0x0000051E +#define DREG_REGID_TRAP_WRITE_23 0x0000051F +#endif +#endif +#define DREG_REGID_MAC0_ACC0_LOW 0x00000600 +#define DREG_REGID_MAC0_ACC1_LOW 0x00000601 +#define DREG_REGID_MAC0_ACC2_LOW 0x00000602 +#define DREG_REGID_MAC0_ACC3_LOW 0x00000603 +#define DREG_REGID_MAC1_ACC0_LOW 0x00000604 +#define DREG_REGID_MAC1_ACC1_LOW 0x00000605 +#define DREG_REGID_MAC1_ACC2_LOW 0x00000606 +#define DREG_REGID_MAC1_ACC3_LOW 0x00000607 +#define DREG_REGID_MAC0_ACC0_MID 0x00000608 +#define DREG_REGID_MAC0_ACC1_MID 0x00000609 +#define DREG_REGID_MAC0_ACC2_MID 0x0000060A +#define DREG_REGID_MAC0_ACC3_MID 0x0000060B +#define DREG_REGID_MAC1_ACC0_MID 0x0000060C +#define DREG_REGID_MAC1_ACC1_MID 0x0000060D +#define DREG_REGID_MAC1_ACC2_MID 0x0000060E +#define DREG_REGID_MAC1_ACC3_MID 0x0000060F +#define DREG_REGID_MAC0_ACC0_HIGH 0x00000610 +#define DREG_REGID_MAC0_ACC1_HIGH 0x00000611 +#define DREG_REGID_MAC0_ACC2_HIGH 0x00000612 +#define DREG_REGID_MAC0_ACC3_HIGH 0x00000613 +#define DREG_REGID_MAC1_ACC0_HIGH 0x00000614 +#define DREG_REGID_MAC1_ACC1_HIGH 0x00000615 +#define DREG_REGID_MAC1_ACC2_HIGH 0x00000616 +#define DREG_REGID_MAC1_ACC3_HIGH 0x00000617 +#define DREG_REGID_RSHOUT_LOW 0x00000620 +#define DREG_REGID_RSHOUT_MID 0x00000628 +#define DREG_REGID_RSHOUT_HIGH 0x00000630 + +/* + * The following defines are for the flags in the DMA stream requestor write + */ +#define DSRWP_DSR_MASK 0x0000000F +#define DSRWP_DSR_BG_RQ 0x00000001 +#define DSRWP_DSR_PRIORITY_MASK 0x00000006 +#define DSRWP_DSR_PRIORITY_0 0x00000000 +#define DSRWP_DSR_PRIORITY_1 0x00000002 +#define DSRWP_DSR_PRIORITY_2 0x00000004 +#define DSRWP_DSR_PRIORITY_3 0x00000006 +#define DSRWP_DSR_RQ_PENDING 0x00000008 + +/* + * The following defines are for the flags in the trap write port register. + */ +#define TWPR_TW_MASK 0x0000FFFF +#define TWPR_TW_SHIFT 0 + +/* + * The following defines are for the flags in the stack pointer write + * register. + */ +#define SPWR_STKP_MASK 0x0000000F +#define SPWR_STKP_SHIFT 0 + +/* + * The following defines are for the flags in the SP interrupt register. + */ +#define SPIR_FRI 0x00000001 +#define SPIR_DOI 0x00000002 +#define SPIR_GPI2 0x00000004 +#define SPIR_GPI3 0x00000008 +#define SPIR_IP0 0x00000010 +#define SPIR_IP1 0x00000020 +#define SPIR_IP2 0x00000040 +#define SPIR_IP3 0x00000080 + +/* + * The following defines are for the flags in the functional group 1 register. + */ +#define FGR1_F1S_MASK 0x0000FFFF +#define FGR1_F1S_SHIFT 0 + +/* + * The following defines are for the flags in the SP clock status register. + */ +#define SPCS_FRI 0x00000001 +#define SPCS_DOI 0x00000002 +#define SPCS_GPI2 0x00000004 +#define SPCS_GPI3 0x00000008 +#define SPCS_IP0 0x00000010 +#define SPCS_IP1 0x00000020 +#define SPCS_IP2 0x00000040 +#define SPCS_IP3 0x00000080 +#define SPCS_SPRUN 0x00000100 +#define SPCS_SLEEP 0x00000200 +#define SPCS_FG 0x00000400 +#define SPCS_ORUN 0x00000800 +#define SPCS_IRQ 0x00001000 +#define SPCS_FGN_MASK 0x0000E000 +#define SPCS_FGN_SHIFT 13 + +/* + * The following defines are for the flags in the SP DMA requestor status + * register. + */ +#define SDSR_DCS_MASK 0x000000FF +#define SDSR_DCS_SHIFT 0 +#define SDSR_DCS_NONE 0x00000007 + +/* + * The following defines are for the flags in the frame timer register. + */ +#define FRMT_FTV_MASK 0x0000FFFF +#define FRMT_FTV_SHIFT 0 + +/* + * The following defines are for the flags in the frame timer current count + * register. + */ +#define FRCC_FCC_MASK 0x0000FFFF +#define FRCC_FCC_SHIFT 0 + +/* + * The following defines are for the flags in the frame timer save count + * register. + */ +#define FRSC_FCS_MASK 0x0000FFFF +#define FRSC_FCS_SHIFT 0 + +/* + * The following define the various flags stored in the scatter/gather + * descriptors. + */ +#define DMA_SG_NEXT_ENTRY_MASK 0x00000FF8 +#define DMA_SG_SAMPLE_END_MASK 0x0FFF0000 +#define DMA_SG_SAMPLE_END_FLAG 0x10000000 +#define DMA_SG_LOOP_END_FLAG 0x20000000 +#define DMA_SG_SIGNAL_END_FLAG 0x40000000 +#define DMA_SG_SIGNAL_PAGE_FLAG 0x80000000 +#define DMA_SG_NEXT_ENTRY_SHIFT 3 +#define DMA_SG_SAMPLE_END_SHIFT 16 + +/* + * The following define the offsets of the fields within the on-chip generic + * DMA requestor. + */ +#define DMA_RQ_CONTROL1 0x00000000 +#define DMA_RQ_CONTROL2 0x00000004 +#define DMA_RQ_SOURCE_ADDR 0x00000008 +#define DMA_RQ_DESTINATION_ADDR 0x0000000C +#define DMA_RQ_NEXT_PAGE_ADDR 0x00000010 +#define DMA_RQ_NEXT_PAGE_SGDESC 0x00000014 +#define DMA_RQ_LOOP_START_ADDR 0x00000018 +#define DMA_RQ_POST_LOOP_ADDR 0x0000001C +#define DMA_RQ_PAGE_MAP_ADDR 0x00000020 + +/* + * The following defines are for the flags in the first control word of the + * on-chip generic DMA requestor. + */ +#define DMA_RQ_C1_COUNT_MASK 0x000003FF +#define DMA_RQ_C1_DESTINATION_SCATTER 0x00001000 +#define DMA_RQ_C1_SOURCE_GATHER 0x00002000 +#define DMA_RQ_C1_DONE_FLAG 0x00004000 +#define DMA_RQ_C1_OPTIMIZE_STATE 0x00008000 +#define DMA_RQ_C1_SAMPLE_END_STATE_MASK 0x00030000 +#define DMA_RQ_C1_FULL_PAGE 0x00000000 +#define DMA_RQ_C1_BEFORE_SAMPLE_END 0x00010000 +#define DMA_RQ_C1_PAGE_MAP_ERROR 0x00020000 +#define DMA_RQ_C1_AT_SAMPLE_END 0x00030000 +#define DMA_RQ_C1_LOOP_END_STATE_MASK 0x000C0000 +#define DMA_RQ_C1_NOT_LOOP_END 0x00000000 +#define DMA_RQ_C1_BEFORE_LOOP_END 0x00040000 +#define DMA_RQ_C1_2PAGE_LOOP_BEGIN 0x00080000 +#define DMA_RQ_C1_LOOP_BEGIN 0x000C0000 +#define DMA_RQ_C1_PAGE_MAP_MASK 0x00300000 +#define DMA_RQ_C1_PM_NONE_PENDING 0x00000000 +#define DMA_RQ_C1_PM_NEXT_PENDING 0x00100000 +#define DMA_RQ_C1_PM_RESERVED 0x00200000 +#define DMA_RQ_C1_PM_LOOP_NEXT_PENDING 0x00300000 +#define DMA_RQ_C1_WRITEBACK_DEST_FLAG 0x00400000 +#define DMA_RQ_C1_WRITEBACK_SRC_FLAG 0x00800000 +#define DMA_RQ_C1_DEST_SIZE_MASK 0x07000000 +#define DMA_RQ_C1_DEST_LINEAR 0x00000000 +#define DMA_RQ_C1_DEST_MOD16 0x01000000 +#define DMA_RQ_C1_DEST_MOD32 0x02000000 +#define DMA_RQ_C1_DEST_MOD64 0x03000000 +#define DMA_RQ_C1_DEST_MOD128 0x04000000 +#define DMA_RQ_C1_DEST_MOD256 0x05000000 +#define DMA_RQ_C1_DEST_MOD512 0x06000000 +#define DMA_RQ_C1_DEST_MOD1024 0x07000000 +#define DMA_RQ_C1_DEST_ON_HOST 0x08000000 +#define DMA_RQ_C1_SOURCE_SIZE_MASK 0x70000000 +#define DMA_RQ_C1_SOURCE_LINEAR 0x00000000 +#define DMA_RQ_C1_SOURCE_MOD16 0x10000000 +#define DMA_RQ_C1_SOURCE_MOD32 0x20000000 +#define DMA_RQ_C1_SOURCE_MOD64 0x30000000 +#define DMA_RQ_C1_SOURCE_MOD128 0x40000000 +#define DMA_RQ_C1_SOURCE_MOD256 0x50000000 +#define DMA_RQ_C1_SOURCE_MOD512 0x60000000 +#define DMA_RQ_C1_SOURCE_MOD1024 0x70000000 +#define DMA_RQ_C1_SOURCE_ON_HOST 0x80000000 +#define DMA_RQ_C1_COUNT_SHIFT 0 + +/* + * The following defines are for the flags in the second control word of the + * on-chip generic DMA requestor. + */ +#define DMA_RQ_C2_VIRTUAL_CHANNEL_MASK 0x0000003F +#define DMA_RQ_C2_VIRTUAL_SIGNAL_MASK 0x00000300 +#define DMA_RQ_C2_NO_VIRTUAL_SIGNAL 0x00000000 +#define DMA_RQ_C2_SIGNAL_EVERY_DMA 0x00000100 +#define DMA_RQ_C2_SIGNAL_SOURCE_PINGPONG 0x00000200 +#define DMA_RQ_C2_SIGNAL_DEST_PINGPONG 0x00000300 +#define DMA_RQ_C2_AUDIO_CONVERT_MASK 0x0000F000 +#define DMA_RQ_C2_AC_NONE 0x00000000 +#define DMA_RQ_C2_AC_8_TO_16_BIT 0x00001000 +#define DMA_RQ_C2_AC_MONO_TO_STEREO 0x00002000 +#define DMA_RQ_C2_AC_ENDIAN_CONVERT 0x00004000 +#define DMA_RQ_C2_AC_SIGNED_CONVERT 0x00008000 +#define DMA_RQ_C2_LOOP_END_MASK 0x0FFF0000 +#define DMA_RQ_C2_LOOP_MASK 0x30000000 +#define DMA_RQ_C2_NO_LOOP 0x00000000 +#define DMA_RQ_C2_ONE_PAGE_LOOP 0x10000000 +#define DMA_RQ_C2_TWO_PAGE_LOOP 0x20000000 +#define DMA_RQ_C2_MULTI_PAGE_LOOP 0x30000000 +#define DMA_RQ_C2_SIGNAL_LOOP_BACK 0x40000000 +#define DMA_RQ_C2_SIGNAL_POST_BEGIN_PAGE 0x80000000 +#define DMA_RQ_C2_VIRTUAL_CHANNEL_SHIFT 0 +#define DMA_RQ_C2_LOOP_END_SHIFT 16 + +/* + * The following defines are for the flags in the source and destination words + * of the on-chip generic DMA requestor. + */ +#define DMA_RQ_SD_ADDRESS_MASK 0x0000FFFF +#define DMA_RQ_SD_MEMORY_ID_MASK 0x000F0000 +#define DMA_RQ_SD_SP_PARAM_ADDR 0x00000000 +#define DMA_RQ_SD_SP_SAMPLE_ADDR 0x00010000 +#define DMA_RQ_SD_SP_PROGRAM_ADDR 0x00020000 +#define DMA_RQ_SD_SP_DEBUG_ADDR 0x00030000 +#define DMA_RQ_SD_OMNIMEM_ADDR 0x000E0000 +#define DMA_RQ_SD_END_FLAG 0x40000000 +#define DMA_RQ_SD_ERROR_FLAG 0x80000000 +#define DMA_RQ_SD_ADDRESS_SHIFT 0 + +/* + * The following defines are for the flags in the page map address word of the + * on-chip generic DMA requestor. + */ +#define DMA_RQ_PMA_LOOP_THIRD_PAGE_ENTRY_MASK 0x00000FF8 +#define DMA_RQ_PMA_PAGE_TABLE_MASK 0xFFFFF000 +#define DMA_RQ_PMA_LOOP_THIRD_PAGE_ENTRY_SHIFT 3 +#define DMA_RQ_PMA_PAGE_TABLE_SHIFT 12 + +#define BA1_VARIDEC_BUF_1 0x000 + +#define BA1_PDTC 0x0c0 /* BA1_PLAY_DMA_TRANSACTION_COUNT_REG */ +#define BA1_PFIE 0x0c4 /* BA1_PLAY_FORMAT_&_INTERRUPT_ENABLE_REG */ +#define BA1_PBA 0x0c8 /* BA1_PLAY_BUFFER_ADDRESS */ +#define BA1_PVOL 0x0f8 /* BA1_PLAY_VOLUME_REG */ +#define BA1_PSRC 0x288 /* BA1_PLAY_SAMPLE_RATE_CORRECTION_REG */ +#define BA1_PCTL 0x2a4 /* BA1_PLAY_CONTROL_REG */ +#define BA1_PPI 0x2b4 /* BA1_PLAY_PHASE_INCREMENT_REG */ + +#define BA1_CCTL 0x064 /* BA1_CAPTURE_CONTROL_REG */ +#define BA1_CIE 0x104 /* BA1_CAPTURE_INTERRUPT_ENABLE_REG */ +#define BA1_CBA 0x10c /* BA1_CAPTURE_BUFFER_ADDRESS */ +#define BA1_CSRC 0x2c8 /* BA1_CAPTURE_SAMPLE_RATE_CORRECTION_REG */ +#define BA1_CCI 0x2d8 /* BA1_CAPTURE_COEFFICIENT_INCREMENT_REG */ +#define BA1_CD 0x2e0 /* BA1_CAPTURE_DELAY_REG */ +#define BA1_CPI 0x2f4 /* BA1_CAPTURE_PHASE_INCREMENT_REG */ +#define BA1_CVOL 0x2f8 /* BA1_CAPTURE_VOLUME_REG */ + +#define BA1_CFG1 0x134 /* BA1_CAPTURE_FRAME_GROUP_1_REG */ +#define BA1_CFG2 0x138 /* BA1_CAPTURE_FRAME_GROUP_2_REG */ +#define BA1_CCST 0x13c /* BA1_CAPTURE_CONSTANT_REG */ +#define BA1_CSPB 0x340 /* BA1_CAPTURE_SPB_ADDRESS */ + +/* + * + */ + +#define CS46XX_MODE_OUTPUT (1<<0) /* MIDI UART - output */ +#define CS46XX_MODE_INPUT (1<<1) /* MIDI UART - input */ + +/* + * + */ + +#define SAVE_REG_MAX 0x10 +#define POWER_DOWN_ALL 0x7f0f + +/* maxinum number of AC97 codecs connected, AC97 2.0 defined 4 */ +#define MAX_NR_AC97 4 +#define CS46XX_PRIMARY_CODEC_INDEX 0 +#define CS46XX_SECONDARY_CODEC_INDEX 1 +#define CS46XX_SECONDARY_CODEC_OFFSET 0x80 +#define CS46XX_DSP_CAPTURE_CHANNEL 1 + +/* capture */ +#define CS46XX_DSP_CAPTURE_CHANNEL 1 + +/* mixer */ +#define CS46XX_MIXER_SPDIF_INPUT_ELEMENT 1 +#define CS46XX_MIXER_SPDIF_OUTPUT_ELEMENT 2 + + +struct snd_cs46xx_pcm { + struct snd_dma_buffer hw_buf; + + unsigned int ctl; + unsigned int shift; /* Shift count to trasform frames in bytes */ + struct snd_pcm_indirect pcm_rec; + struct snd_pcm_substream *substream; + + struct dsp_pcm_channel_descriptor * pcm_channel; + + int pcm_channel_id; /* Fron Rear, Center Lfe ... */ +}; + +struct snd_cs46xx_region { + char name[24]; + unsigned long base; + void __iomem *remap_addr; + unsigned long size; + struct resource *resource; +}; + +struct snd_cs46xx { + int irq; + unsigned long ba0_addr; + unsigned long ba1_addr; + union { + struct { + struct snd_cs46xx_region ba0; + struct snd_cs46xx_region data0; + struct snd_cs46xx_region data1; + struct snd_cs46xx_region pmem; + struct snd_cs46xx_region reg; + } name; + struct snd_cs46xx_region idx[5]; + } region; + + unsigned int mode; + + struct { + struct snd_dma_buffer hw_buf; + + unsigned int ctl; + unsigned int shift; /* Shift count to trasform frames in bytes */ + struct snd_pcm_indirect pcm_rec; + struct snd_pcm_substream *substream; + } capt; + + + int nr_ac97_codecs; + struct snd_ac97_bus *ac97_bus; + struct snd_ac97 *ac97[MAX_NR_AC97]; + + struct pci_dev *pci; + struct snd_card *card; + struct snd_pcm *pcm; + + struct snd_rawmidi *rmidi; + struct snd_rawmidi_substream *midi_input; + struct snd_rawmidi_substream *midi_output; + + spinlock_t reg_lock; + unsigned int midcr; + unsigned int uartm; + + int amplifier; + void (*amplifier_ctrl)(struct snd_cs46xx *, int); + void (*active_ctrl)(struct snd_cs46xx *, int); + void (*mixer_init)(struct snd_cs46xx *); + + int acpi_port; + struct snd_kcontrol *eapd_switch; /* for amplifier hack */ + int accept_valid; /* accept mmap valid (for OSS) */ + int in_suspend; + + struct gameport *gameport; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + struct mutex spos_mutex; + + struct dsp_spos_instance * dsp_spos_instance; + + struct snd_pcm *pcm_rear; + struct snd_pcm *pcm_center_lfe; + struct snd_pcm *pcm_iec958; + +#define CS46XX_DSP_MODULES 5 + struct dsp_module_desc *modules[CS46XX_DSP_MODULES]; +#else /* for compatibility */ + struct snd_cs46xx_pcm *playback_pcm; + unsigned int play_ctl; + + struct ba1_struct *ba1; +#endif + +#ifdef CONFIG_PM_SLEEP + u32 *saved_regs; +#endif +}; + +int snd_cs46xx_create(struct snd_card *card, + struct pci_dev *pci, + int external_amp, int thinkpad, + struct snd_cs46xx **rcodec); +extern const struct dev_pm_ops snd_cs46xx_pm; + +int snd_cs46xx_pcm(struct snd_cs46xx *chip, int device); +int snd_cs46xx_pcm_rear(struct snd_cs46xx *chip, int device); +int snd_cs46xx_pcm_iec958(struct snd_cs46xx *chip, int device); +int snd_cs46xx_pcm_center_lfe(struct snd_cs46xx *chip, int device); +int snd_cs46xx_mixer(struct snd_cs46xx *chip, int spdif_device); +int snd_cs46xx_midi(struct snd_cs46xx *chip, int device); +int snd_cs46xx_start_dsp(struct snd_cs46xx *chip); +int snd_cs46xx_gameport(struct snd_cs46xx *chip); + +#endif /* __SOUND_CS46XX_H */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/cs46xx/cs46xx.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/cs46xx/cs46xx.h.yml new file mode 100644 index 00000000000..c3f0b2167e1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/cs46xx/cs46xx.h.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) by Jaroslav Kysela , Cirrus Logic, Inc. +holders: + - Jaroslav Kysela , Cirrus Logic, Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/cs46xx/cs46xx_lib.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/cs46xx/cs46xx_lib.c new file mode 100644 index 00000000000..a284192d370 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/cs46xx/cs46xx_lib.c @@ -0,0 +1,4052 @@ +/* + * Copyright (c) by Jaroslav Kysela + * Abramo Bagnara + * Cirrus Logic, Inc. + * Routines for control of Cirrus Logic CS461x chips + * + * KNOWN BUGS: + * - Sometimes the SPDIF input DSP tasks get's unsynchronized + * and the SPDIF get somewhat "distorcionated", or/and left right channel + * are swapped. To get around this problem when it happens, mute and unmute + * the SPDIF input mixer control. + * - On the Hercules Game Theater XP the amplifier are sometimes turned + * off on inadecuate moments which causes distorcions on sound. + * + * TODO: + * - Secondary CODEC on some soundcards + * - SPDIF input support for other sample rates then 48khz + * - Posibility to mix the SPDIF output with analog sources. + * - PCM channels for Center and LFE on secondary codec + * + * NOTE: with CONFIG_SND_CS46XX_NEW_DSP unset uses old DSP image (which + * is default configuration), no SPDIF, no secondary codec, no + * multi channel PCM. But known to work. + * + * FINALLY: A credit to the developers Tom and Jordan + * at Cirrus for have helping me out with the DSP, however we + * still don't have sufficient documentation and technical + * references to be able to implement all fancy feutures + * supported by the cs46xx DSP's. + * Benny + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include "cs46xx.h" + +#include "cs46xx_lib.h" +#include "dsp_spos.h" + +static void amp_voyetra(struct snd_cs46xx *chip, int change); + +#ifdef CONFIG_SND_CS46XX_NEW_DSP +static const struct snd_pcm_ops snd_cs46xx_playback_rear_ops; +static const struct snd_pcm_ops snd_cs46xx_playback_indirect_rear_ops; +static const struct snd_pcm_ops snd_cs46xx_playback_clfe_ops; +static const struct snd_pcm_ops snd_cs46xx_playback_indirect_clfe_ops; +static const struct snd_pcm_ops snd_cs46xx_playback_iec958_ops; +static const struct snd_pcm_ops snd_cs46xx_playback_indirect_iec958_ops; +#endif + +static const struct snd_pcm_ops snd_cs46xx_playback_ops; +static const struct snd_pcm_ops snd_cs46xx_playback_indirect_ops; +static const struct snd_pcm_ops snd_cs46xx_capture_ops; +static const struct snd_pcm_ops snd_cs46xx_capture_indirect_ops; + +static unsigned short snd_cs46xx_codec_read(struct snd_cs46xx *chip, + unsigned short reg, + int codec_index) +{ + int count; + unsigned short result,tmp; + u32 offset = 0; + + if (snd_BUG_ON(codec_index != CS46XX_PRIMARY_CODEC_INDEX && + codec_index != CS46XX_SECONDARY_CODEC_INDEX)) + return 0xffff; + + chip->active_ctrl(chip, 1); + + if (codec_index == CS46XX_SECONDARY_CODEC_INDEX) + offset = CS46XX_SECONDARY_CODEC_OFFSET; + + /* + * 1. Write ACCAD = Command Address Register = 46Ch for AC97 register address + * 2. Write ACCDA = Command Data Register = 470h for data to write to AC97 + * 3. Write ACCTL = Control Register = 460h for initiating the write7---55 + * 4. Read ACCTL = 460h, DCV should be reset by now and 460h = 17h + * 5. if DCV not cleared, break and return error + * 6. Read ACSTS = Status Register = 464h, check VSTS bit + */ + + snd_cs46xx_peekBA0(chip, BA0_ACSDA + offset); + + tmp = snd_cs46xx_peekBA0(chip, BA0_ACCTL); + if ((tmp & ACCTL_VFRM) == 0) { + dev_warn(chip->card->dev, "ACCTL_VFRM not set 0x%x\n", tmp); + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, (tmp & (~ACCTL_ESYN)) | ACCTL_VFRM ); + msleep(50); + tmp = snd_cs46xx_peekBA0(chip, BA0_ACCTL + offset); + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, tmp | ACCTL_ESYN | ACCTL_VFRM ); + + } + + /* + * Setup the AC97 control registers on the CS461x to send the + * appropriate command to the AC97 to perform the read. + * ACCAD = Command Address Register = 46Ch + * ACCDA = Command Data Register = 470h + * ACCTL = Control Register = 460h + * set DCV - will clear when process completed + * set CRW - Read command + * set VFRM - valid frame enabled + * set ESYN - ASYNC generation enabled + * set RSTN - ARST# inactive, AC97 codec not reset + */ + + snd_cs46xx_pokeBA0(chip, BA0_ACCAD, reg); + snd_cs46xx_pokeBA0(chip, BA0_ACCDA, 0); + if (codec_index == CS46XX_PRIMARY_CODEC_INDEX) { + snd_cs46xx_pokeBA0(chip, BA0_ACCTL,/* clear ACCTL_DCV */ ACCTL_CRW | + ACCTL_VFRM | ACCTL_ESYN | + ACCTL_RSTN); + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_DCV | ACCTL_CRW | + ACCTL_VFRM | ACCTL_ESYN | + ACCTL_RSTN); + } else { + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_DCV | ACCTL_TC | + ACCTL_CRW | ACCTL_VFRM | ACCTL_ESYN | + ACCTL_RSTN); + } + + /* + * Wait for the read to occur. + */ + for (count = 0; count < 1000; count++) { + /* + * First, we want to wait for a short time. + */ + udelay(10); + /* + * Now, check to see if the read has completed. + * ACCTL = 460h, DCV should be reset by now and 460h = 17h + */ + if (!(snd_cs46xx_peekBA0(chip, BA0_ACCTL) & ACCTL_DCV)) + goto ok1; + } + + dev_err(chip->card->dev, + "AC'97 read problem (ACCTL_DCV), reg = 0x%x\n", reg); + result = 0xffff; + goto end; + + ok1: + /* + * Wait for the valid status bit to go active. + */ + for (count = 0; count < 100; count++) { + /* + * Read the AC97 status register. + * ACSTS = Status Register = 464h + * VSTS - Valid Status + */ + if (snd_cs46xx_peekBA0(chip, BA0_ACSTS + offset) & ACSTS_VSTS) + goto ok2; + udelay(10); + } + + dev_err(chip->card->dev, + "AC'97 read problem (ACSTS_VSTS), codec_index %d, reg = 0x%x\n", + codec_index, reg); + result = 0xffff; + goto end; + + ok2: + /* + * Read the data returned from the AC97 register. + * ACSDA = Status Data Register = 474h + */ +#if 0 + dev_dbg(chip->card->dev, + "e) reg = 0x%x, val = 0x%x, BA0_ACCAD = 0x%x\n", reg, + snd_cs46xx_peekBA0(chip, BA0_ACSDA), + snd_cs46xx_peekBA0(chip, BA0_ACCAD)); +#endif + + //snd_cs46xx_peekBA0(chip, BA0_ACCAD); + result = snd_cs46xx_peekBA0(chip, BA0_ACSDA + offset); + end: + chip->active_ctrl(chip, -1); + return result; +} + +static unsigned short snd_cs46xx_ac97_read(struct snd_ac97 * ac97, + unsigned short reg) +{ + struct snd_cs46xx *chip = ac97->private_data; + unsigned short val; + int codec_index = ac97->num; + + if (snd_BUG_ON(codec_index != CS46XX_PRIMARY_CODEC_INDEX && + codec_index != CS46XX_SECONDARY_CODEC_INDEX)) + return 0xffff; + + val = snd_cs46xx_codec_read(chip, reg, codec_index); + + return val; +} + + +static void snd_cs46xx_codec_write(struct snd_cs46xx *chip, + unsigned short reg, + unsigned short val, + int codec_index) +{ + int count; + + if (snd_BUG_ON(codec_index != CS46XX_PRIMARY_CODEC_INDEX && + codec_index != CS46XX_SECONDARY_CODEC_INDEX)) + return; + + chip->active_ctrl(chip, 1); + + /* + * 1. Write ACCAD = Command Address Register = 46Ch for AC97 register address + * 2. Write ACCDA = Command Data Register = 470h for data to write to AC97 + * 3. Write ACCTL = Control Register = 460h for initiating the write + * 4. Read ACCTL = 460h, DCV should be reset by now and 460h = 07h + * 5. if DCV not cleared, break and return error + */ + + /* + * Setup the AC97 control registers on the CS461x to send the + * appropriate command to the AC97 to perform the read. + * ACCAD = Command Address Register = 46Ch + * ACCDA = Command Data Register = 470h + * ACCTL = Control Register = 460h + * set DCV - will clear when process completed + * reset CRW - Write command + * set VFRM - valid frame enabled + * set ESYN - ASYNC generation enabled + * set RSTN - ARST# inactive, AC97 codec not reset + */ + snd_cs46xx_pokeBA0(chip, BA0_ACCAD , reg); + snd_cs46xx_pokeBA0(chip, BA0_ACCDA , val); + snd_cs46xx_peekBA0(chip, BA0_ACCTL); + + if (codec_index == CS46XX_PRIMARY_CODEC_INDEX) { + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, /* clear ACCTL_DCV */ ACCTL_VFRM | + ACCTL_ESYN | ACCTL_RSTN); + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_DCV | ACCTL_VFRM | + ACCTL_ESYN | ACCTL_RSTN); + } else { + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_DCV | ACCTL_TC | + ACCTL_VFRM | ACCTL_ESYN | ACCTL_RSTN); + } + + for (count = 0; count < 4000; count++) { + /* + * First, we want to wait for a short time. + */ + udelay(10); + /* + * Now, check to see if the write has completed. + * ACCTL = 460h, DCV should be reset by now and 460h = 07h + */ + if (!(snd_cs46xx_peekBA0(chip, BA0_ACCTL) & ACCTL_DCV)) { + goto end; + } + } + dev_err(chip->card->dev, + "AC'97 write problem, codec_index = %d, reg = 0x%x, val = 0x%x\n", + codec_index, reg, val); + end: + chip->active_ctrl(chip, -1); +} + +static void snd_cs46xx_ac97_write(struct snd_ac97 *ac97, + unsigned short reg, + unsigned short val) +{ + struct snd_cs46xx *chip = ac97->private_data; + int codec_index = ac97->num; + + if (snd_BUG_ON(codec_index != CS46XX_PRIMARY_CODEC_INDEX && + codec_index != CS46XX_SECONDARY_CODEC_INDEX)) + return; + + snd_cs46xx_codec_write(chip, reg, val, codec_index); +} + + +/* + * Chip initialization + */ + +int snd_cs46xx_download(struct snd_cs46xx *chip, + u32 *src, + unsigned long offset, + unsigned long len) +{ + void __iomem *dst; + unsigned int bank = offset >> 16; + offset = offset & 0xffff; + + if (snd_BUG_ON((offset & 3) || (len & 3))) + return -EINVAL; + dst = chip->region.idx[bank+1].remap_addr + offset; + len /= sizeof(u32); + + /* writel already converts 32-bit value to right endianess */ + while (len-- > 0) { + writel(*src++, dst); + dst += sizeof(u32); + } + return 0; +} + +static inline void memcpy_le32(void *dst, const void *src, unsigned int len) +{ +#ifdef __LITTLE_ENDIAN + memcpy(dst, src, len); +#else + u32 *_dst = dst; + const __le32 *_src = src; + len /= 4; + while (len-- > 0) + *_dst++ = le32_to_cpu(*_src++); +#endif +} + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + +static const char *module_names[CS46XX_DSP_MODULES] = { + "cwc4630", "cwcasync", "cwcsnoop", "cwcbinhack", "cwcdma" +}; + +MODULE_FIRMWARE("cs46xx/cwc4630"); +MODULE_FIRMWARE("cs46xx/cwcasync"); +MODULE_FIRMWARE("cs46xx/cwcsnoop"); +MODULE_FIRMWARE("cs46xx/cwcbinhack"); +MODULE_FIRMWARE("cs46xx/cwcdma"); + +static void free_module_desc(struct dsp_module_desc *module) +{ + if (!module) + return; + kfree(module->module_name); + kfree(module->symbol_table.symbols); + if (module->segments) { + int i; + for (i = 0; i < module->nsegments; i++) + kfree(module->segments[i].data); + kfree(module->segments); + } + kfree(module); +} + +/* firmware binary format: + * le32 nsymbols; + * struct { + * le32 address; + * char symbol_name[DSP_MAX_SYMBOL_NAME]; + * le32 symbol_type; + * } symbols[nsymbols]; + * le32 nsegments; + * struct { + * le32 segment_type; + * le32 offset; + * le32 size; + * le32 data[size]; + * } segments[nsegments]; + */ + +static int load_firmware(struct snd_cs46xx *chip, + struct dsp_module_desc **module_ret, + const char *fw_name) +{ + int i, err; + unsigned int nums, fwlen, fwsize; + const __le32 *fwdat; + struct dsp_module_desc *module = NULL; + const struct firmware *fw; + char fw_path[32]; + + sprintf(fw_path, "cs46xx/%s", fw_name); + err = request_firmware(&fw, fw_path, &chip->pci->dev); + if (err < 0) + return err; + fwsize = fw->size / 4; + if (fwsize < 2) { + err = -EINVAL; + goto error; + } + + err = -ENOMEM; + module = kzalloc(sizeof(*module), GFP_KERNEL); + if (!module) + goto error; + module->module_name = kstrdup(fw_name, GFP_KERNEL); + if (!module->module_name) + goto error; + + fwlen = 0; + fwdat = (const __le32 *)fw->data; + nums = module->symbol_table.nsymbols = le32_to_cpu(fwdat[fwlen++]); + if (nums >= 40) + goto error_inval; + module->symbol_table.symbols = + kcalloc(nums, sizeof(struct dsp_symbol_entry), GFP_KERNEL); + if (!module->symbol_table.symbols) + goto error; + for (i = 0; i < nums; i++) { + struct dsp_symbol_entry *entry = + &module->symbol_table.symbols[i]; + if (fwlen + 2 + DSP_MAX_SYMBOL_NAME / 4 > fwsize) + goto error_inval; + entry->address = le32_to_cpu(fwdat[fwlen++]); + memcpy(entry->symbol_name, &fwdat[fwlen], DSP_MAX_SYMBOL_NAME - 1); + fwlen += DSP_MAX_SYMBOL_NAME / 4; + entry->symbol_type = le32_to_cpu(fwdat[fwlen++]); + } + + if (fwlen >= fwsize) + goto error_inval; + nums = module->nsegments = le32_to_cpu(fwdat[fwlen++]); + if (nums > 10) + goto error_inval; + module->segments = + kcalloc(nums, sizeof(struct dsp_segment_desc), GFP_KERNEL); + if (!module->segments) + goto error; + for (i = 0; i < nums; i++) { + struct dsp_segment_desc *entry = &module->segments[i]; + if (fwlen + 3 > fwsize) + goto error_inval; + entry->segment_type = le32_to_cpu(fwdat[fwlen++]); + entry->offset = le32_to_cpu(fwdat[fwlen++]); + entry->size = le32_to_cpu(fwdat[fwlen++]); + if (fwlen + entry->size > fwsize) + goto error_inval; + entry->data = kmalloc_array(entry->size, 4, GFP_KERNEL); + if (!entry->data) + goto error; + memcpy_le32(entry->data, &fwdat[fwlen], entry->size * 4); + fwlen += entry->size; + } + + *module_ret = module; + release_firmware(fw); + return 0; + + error_inval: + err = -EINVAL; + error: + free_module_desc(module); + release_firmware(fw); + return err; +} + +int snd_cs46xx_clear_BA1(struct snd_cs46xx *chip, + unsigned long offset, + unsigned long len) +{ + void __iomem *dst; + unsigned int bank = offset >> 16; + offset = offset & 0xffff; + + if (snd_BUG_ON((offset & 3) || (len & 3))) + return -EINVAL; + dst = chip->region.idx[bank+1].remap_addr + offset; + len /= sizeof(u32); + + /* writel already converts 32-bit value to right endianess */ + while (len-- > 0) { + writel(0, dst); + dst += sizeof(u32); + } + return 0; +} + +#else /* old DSP image */ + +struct ba1_struct { + struct { + u32 offset; + u32 size; + } memory[BA1_MEMORY_COUNT]; + u32 map[BA1_DWORD_SIZE]; +}; + +MODULE_FIRMWARE("cs46xx/ba1"); + +static int load_firmware(struct snd_cs46xx *chip) +{ + const struct firmware *fw; + int i, size, err; + + err = request_firmware(&fw, "cs46xx/ba1", &chip->pci->dev); + if (err < 0) + return err; + if (fw->size != sizeof(*chip->ba1)) { + err = -EINVAL; + goto error; + } + + chip->ba1 = vmalloc(sizeof(*chip->ba1)); + if (!chip->ba1) { + err = -ENOMEM; + goto error; + } + + memcpy_le32(chip->ba1, fw->data, sizeof(*chip->ba1)); + + /* sanity check */ + size = 0; + for (i = 0; i < BA1_MEMORY_COUNT; i++) + size += chip->ba1->memory[i].size; + if (size > BA1_DWORD_SIZE * 4) + err = -EINVAL; + + error: + release_firmware(fw); + return err; +} + +int snd_cs46xx_download_image(struct snd_cs46xx *chip) +{ + int idx, err; + unsigned int offset = 0; + struct ba1_struct *ba1 = chip->ba1; + + for (idx = 0; idx < BA1_MEMORY_COUNT; idx++) { + err = snd_cs46xx_download(chip, + &ba1->map[offset], + ba1->memory[idx].offset, + ba1->memory[idx].size); + if (err < 0) + return err; + offset += ba1->memory[idx].size >> 2; + } + return 0; +} +#endif /* CONFIG_SND_CS46XX_NEW_DSP */ + +/* + * Chip reset + */ + +static void snd_cs46xx_reset(struct snd_cs46xx *chip) +{ + int idx; + + /* + * Write the reset bit of the SP control register. + */ + snd_cs46xx_poke(chip, BA1_SPCR, SPCR_RSTSP); + + /* + * Write the control register. + */ + snd_cs46xx_poke(chip, BA1_SPCR, SPCR_DRQEN); + + /* + * Clear the trap registers. + */ + for (idx = 0; idx < 8; idx++) { + snd_cs46xx_poke(chip, BA1_DREG, DREG_REGID_TRAP_SELECT + idx); + snd_cs46xx_poke(chip, BA1_TWPR, 0xFFFF); + } + snd_cs46xx_poke(chip, BA1_DREG, 0); + + /* + * Set the frame timer to reflect the number of cycles per frame. + */ + snd_cs46xx_poke(chip, BA1_FRMT, 0xadf); +} + +static int cs46xx_wait_for_fifo(struct snd_cs46xx * chip,int retry_timeout) +{ + u32 i, status = 0; + /* + * Make sure the previous FIFO write operation has completed. + */ + for(i = 0; i < 50; i++){ + status = snd_cs46xx_peekBA0(chip, BA0_SERBST); + + if( !(status & SERBST_WBSY) ) + break; + + mdelay(retry_timeout); + } + + if(status & SERBST_WBSY) { + dev_err(chip->card->dev, + "failure waiting for FIFO command to complete\n"); + return -EINVAL; + } + + return 0; +} + +static void snd_cs46xx_clear_serial_FIFOs(struct snd_cs46xx *chip) +{ + int idx, powerdown = 0; + unsigned int tmp; + + /* + * See if the devices are powered down. If so, we must power them up first + * or they will not respond. + */ + tmp = snd_cs46xx_peekBA0(chip, BA0_CLKCR1); + if (!(tmp & CLKCR1_SWCE)) { + snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, tmp | CLKCR1_SWCE); + powerdown = 1; + } + + /* + * We want to clear out the serial port FIFOs so we don't end up playing + * whatever random garbage happens to be in them. We fill the sample FIFOS + * with zero (silence). + */ + snd_cs46xx_pokeBA0(chip, BA0_SERBWP, 0); + + /* + * Fill all 256 sample FIFO locations. + */ + for (idx = 0; idx < 0xFF; idx++) { + /* + * Make sure the previous FIFO write operation has completed. + */ + if (cs46xx_wait_for_fifo(chip,1)) { + dev_dbg(chip->card->dev, + "failed waiting for FIFO at addr (%02X)\n", + idx); + + if (powerdown) + snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, tmp); + + break; + } + /* + * Write the serial port FIFO index. + */ + snd_cs46xx_pokeBA0(chip, BA0_SERBAD, idx); + /* + * Tell the serial port to load the new value into the FIFO location. + */ + snd_cs46xx_pokeBA0(chip, BA0_SERBCM, SERBCM_WRC); + } + /* + * Now, if we powered up the devices, then power them back down again. + * This is kinda ugly, but should never happen. + */ + if (powerdown) + snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, tmp); +} + +static void snd_cs46xx_proc_start(struct snd_cs46xx *chip) +{ + int cnt; + + /* + * Set the frame timer to reflect the number of cycles per frame. + */ + snd_cs46xx_poke(chip, BA1_FRMT, 0xadf); + /* + * Turn on the run, run at frame, and DMA enable bits in the local copy of + * the SP control register. + */ + snd_cs46xx_poke(chip, BA1_SPCR, SPCR_RUN | SPCR_RUNFR | SPCR_DRQEN); + /* + * Wait until the run at frame bit resets itself in the SP control + * register. + */ + for (cnt = 0; cnt < 25; cnt++) { + udelay(50); + if (!(snd_cs46xx_peek(chip, BA1_SPCR) & SPCR_RUNFR)) + break; + } + + if (snd_cs46xx_peek(chip, BA1_SPCR) & SPCR_RUNFR) + dev_err(chip->card->dev, "SPCR_RUNFR never reset\n"); +} + +static void snd_cs46xx_proc_stop(struct snd_cs46xx *chip) +{ + /* + * Turn off the run, run at frame, and DMA enable bits in the local copy of + * the SP control register. + */ + snd_cs46xx_poke(chip, BA1_SPCR, 0); +} + +/* + * Sample rate routines + */ + +#define GOF_PER_SEC 200 + +static void snd_cs46xx_set_play_sample_rate(struct snd_cs46xx *chip, unsigned int rate) +{ + unsigned long flags; + unsigned int tmp1, tmp2; + unsigned int phiIncr; + unsigned int correctionPerGOF, correctionPerSec; + + /* + * Compute the values used to drive the actual sample rate conversion. + * The following formulas are being computed, using inline assembly + * since we need to use 64 bit arithmetic to compute the values: + * + * phiIncr = floor((Fs,in * 2^26) / Fs,out) + * correctionPerGOF = floor((Fs,in * 2^26 - Fs,out * phiIncr) / + * GOF_PER_SEC) + * ulCorrectionPerSec = Fs,in * 2^26 - Fs,out * phiIncr -M + * GOF_PER_SEC * correctionPerGOF + * + * i.e. + * + * phiIncr:other = dividend:remainder((Fs,in * 2^26) / Fs,out) + * correctionPerGOF:correctionPerSec = + * dividend:remainder(ulOther / GOF_PER_SEC) + */ + tmp1 = rate << 16; + phiIncr = tmp1 / 48000; + tmp1 -= phiIncr * 48000; + tmp1 <<= 10; + phiIncr <<= 10; + tmp2 = tmp1 / 48000; + phiIncr += tmp2; + tmp1 -= tmp2 * 48000; + correctionPerGOF = tmp1 / GOF_PER_SEC; + tmp1 -= correctionPerGOF * GOF_PER_SEC; + correctionPerSec = tmp1; + + /* + * Fill in the SampleRateConverter control block. + */ + spin_lock_irqsave(&chip->reg_lock, flags); + snd_cs46xx_poke(chip, BA1_PSRC, + ((correctionPerSec << 16) & 0xFFFF0000) | (correctionPerGOF & 0xFFFF)); + snd_cs46xx_poke(chip, BA1_PPI, phiIncr); + spin_unlock_irqrestore(&chip->reg_lock, flags); +} + +static void snd_cs46xx_set_capture_sample_rate(struct snd_cs46xx *chip, unsigned int rate) +{ + unsigned long flags; + unsigned int phiIncr, coeffIncr, tmp1, tmp2; + unsigned int correctionPerGOF, correctionPerSec, initialDelay; + unsigned int frameGroupLength, cnt; + + /* + * We can only decimate by up to a factor of 1/9th the hardware rate. + * Correct the value if an attempt is made to stray outside that limit. + */ + if ((rate * 9) < 48000) + rate = 48000 / 9; + + /* + * We can not capture at at rate greater than the Input Rate (48000). + * Return an error if an attempt is made to stray outside that limit. + */ + if (rate > 48000) + rate = 48000; + + /* + * Compute the values used to drive the actual sample rate conversion. + * The following formulas are being computed, using inline assembly + * since we need to use 64 bit arithmetic to compute the values: + * + * coeffIncr = -floor((Fs,out * 2^23) / Fs,in) + * phiIncr = floor((Fs,in * 2^26) / Fs,out) + * correctionPerGOF = floor((Fs,in * 2^26 - Fs,out * phiIncr) / + * GOF_PER_SEC) + * correctionPerSec = Fs,in * 2^26 - Fs,out * phiIncr - + * GOF_PER_SEC * correctionPerGOF + * initialDelay = ceil((24 * Fs,in) / Fs,out) + * + * i.e. + * + * coeffIncr = neg(dividend((Fs,out * 2^23) / Fs,in)) + * phiIncr:ulOther = dividend:remainder((Fs,in * 2^26) / Fs,out) + * correctionPerGOF:correctionPerSec = + * dividend:remainder(ulOther / GOF_PER_SEC) + * initialDelay = dividend(((24 * Fs,in) + Fs,out - 1) / Fs,out) + */ + + tmp1 = rate << 16; + coeffIncr = tmp1 / 48000; + tmp1 -= coeffIncr * 48000; + tmp1 <<= 7; + coeffIncr <<= 7; + coeffIncr += tmp1 / 48000; + coeffIncr ^= 0xFFFFFFFF; + coeffIncr++; + tmp1 = 48000 << 16; + phiIncr = tmp1 / rate; + tmp1 -= phiIncr * rate; + tmp1 <<= 10; + phiIncr <<= 10; + tmp2 = tmp1 / rate; + phiIncr += tmp2; + tmp1 -= tmp2 * rate; + correctionPerGOF = tmp1 / GOF_PER_SEC; + tmp1 -= correctionPerGOF * GOF_PER_SEC; + correctionPerSec = tmp1; + initialDelay = ((48000 * 24) + rate - 1) / rate; + + /* + * Fill in the VariDecimate control block. + */ + spin_lock_irqsave(&chip->reg_lock, flags); + snd_cs46xx_poke(chip, BA1_CSRC, + ((correctionPerSec << 16) & 0xFFFF0000) | (correctionPerGOF & 0xFFFF)); + snd_cs46xx_poke(chip, BA1_CCI, coeffIncr); + snd_cs46xx_poke(chip, BA1_CD, + (((BA1_VARIDEC_BUF_1 + (initialDelay << 2)) << 16) & 0xFFFF0000) | 0x80); + snd_cs46xx_poke(chip, BA1_CPI, phiIncr); + spin_unlock_irqrestore(&chip->reg_lock, flags); + + /* + * Figure out the frame group length for the write back task. Basically, + * this is just the factors of 24000 (2^6*3*5^3) that are not present in + * the output sample rate. + */ + frameGroupLength = 1; + for (cnt = 2; cnt <= 64; cnt *= 2) { + if (((rate / cnt) * cnt) != rate) + frameGroupLength *= 2; + } + if (((rate / 3) * 3) != rate) { + frameGroupLength *= 3; + } + for (cnt = 5; cnt <= 125; cnt *= 5) { + if (((rate / cnt) * cnt) != rate) + frameGroupLength *= 5; + } + + /* + * Fill in the WriteBack control block. + */ + spin_lock_irqsave(&chip->reg_lock, flags); + snd_cs46xx_poke(chip, BA1_CFG1, frameGroupLength); + snd_cs46xx_poke(chip, BA1_CFG2, (0x00800000 | frameGroupLength)); + snd_cs46xx_poke(chip, BA1_CCST, 0x0000FFFF); + snd_cs46xx_poke(chip, BA1_CSPB, ((65536 * rate) / 24000)); + snd_cs46xx_poke(chip, (BA1_CSPB + 4), 0x0000FFFF); + spin_unlock_irqrestore(&chip->reg_lock, flags); +} + +/* + * PCM part + */ + +static void snd_cs46xx_pb_trans_copy(struct snd_pcm_substream *substream, + struct snd_pcm_indirect *rec, size_t bytes) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_cs46xx_pcm * cpcm = runtime->private_data; + memcpy(cpcm->hw_buf.area + rec->hw_data, runtime->dma_area + rec->sw_data, bytes); +} + +static int snd_cs46xx_playback_transfer(struct snd_pcm_substream *substream) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_cs46xx_pcm * cpcm = runtime->private_data; + return snd_pcm_indirect_playback_transfer(substream, &cpcm->pcm_rec, + snd_cs46xx_pb_trans_copy); +} + +static void snd_cs46xx_cp_trans_copy(struct snd_pcm_substream *substream, + struct snd_pcm_indirect *rec, size_t bytes) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + memcpy(runtime->dma_area + rec->sw_data, + chip->capt.hw_buf.area + rec->hw_data, bytes); +} + +static int snd_cs46xx_capture_transfer(struct snd_pcm_substream *substream) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + return snd_pcm_indirect_capture_transfer(substream, &chip->capt.pcm_rec, + snd_cs46xx_cp_trans_copy); +} + +static snd_pcm_uframes_t snd_cs46xx_playback_direct_pointer(struct snd_pcm_substream *substream) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + size_t ptr; + struct snd_cs46xx_pcm *cpcm = substream->runtime->private_data; + + if (snd_BUG_ON(!cpcm->pcm_channel)) + return -ENXIO; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + ptr = snd_cs46xx_peek(chip, (cpcm->pcm_channel->pcm_reader_scb->address + 2) << 2); +#else + ptr = snd_cs46xx_peek(chip, BA1_PBA); +#endif + ptr -= cpcm->hw_buf.addr; + return ptr >> cpcm->shift; +} + +static snd_pcm_uframes_t snd_cs46xx_playback_indirect_pointer(struct snd_pcm_substream *substream) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + size_t ptr; + struct snd_cs46xx_pcm *cpcm = substream->runtime->private_data; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + if (snd_BUG_ON(!cpcm->pcm_channel)) + return -ENXIO; + ptr = snd_cs46xx_peek(chip, (cpcm->pcm_channel->pcm_reader_scb->address + 2) << 2); +#else + ptr = snd_cs46xx_peek(chip, BA1_PBA); +#endif + ptr -= cpcm->hw_buf.addr; + return snd_pcm_indirect_playback_pointer(substream, &cpcm->pcm_rec, ptr); +} + +static snd_pcm_uframes_t snd_cs46xx_capture_direct_pointer(struct snd_pcm_substream *substream) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + size_t ptr = snd_cs46xx_peek(chip, BA1_CBA) - chip->capt.hw_buf.addr; + return ptr >> chip->capt.shift; +} + +static snd_pcm_uframes_t snd_cs46xx_capture_indirect_pointer(struct snd_pcm_substream *substream) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + size_t ptr = snd_cs46xx_peek(chip, BA1_CBA) - chip->capt.hw_buf.addr; + return snd_pcm_indirect_capture_pointer(substream, &chip->capt.pcm_rec, ptr); +} + +static int snd_cs46xx_playback_trigger(struct snd_pcm_substream *substream, + int cmd) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + /*struct snd_pcm_runtime *runtime = substream->runtime;*/ + int result = 0; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + struct snd_cs46xx_pcm *cpcm = substream->runtime->private_data; + if (! cpcm->pcm_channel) { + return -ENXIO; + } +#endif + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + case SNDRV_PCM_TRIGGER_RESUME: +#ifdef CONFIG_SND_CS46XX_NEW_DSP + /* magic value to unmute PCM stream playback volume */ + snd_cs46xx_poke(chip, (cpcm->pcm_channel->pcm_reader_scb->address + + SCBVolumeCtrl) << 2, 0x80008000); + + if (cpcm->pcm_channel->unlinked) + cs46xx_dsp_pcm_link(chip,cpcm->pcm_channel); + + if (substream->runtime->periods != CS46XX_FRAGS) + snd_cs46xx_playback_transfer(substream); +#else + spin_lock(&chip->reg_lock); + if (substream->runtime->periods != CS46XX_FRAGS) + snd_cs46xx_playback_transfer(substream); + { unsigned int tmp; + tmp = snd_cs46xx_peek(chip, BA1_PCTL); + tmp &= 0x0000ffff; + snd_cs46xx_poke(chip, BA1_PCTL, chip->play_ctl | tmp); + } + spin_unlock(&chip->reg_lock); +#endif + break; + case SNDRV_PCM_TRIGGER_STOP: + case SNDRV_PCM_TRIGGER_SUSPEND: +#ifdef CONFIG_SND_CS46XX_NEW_DSP + /* magic mute channel */ + snd_cs46xx_poke(chip, (cpcm->pcm_channel->pcm_reader_scb->address + + SCBVolumeCtrl) << 2, 0xffffffff); + + if (!cpcm->pcm_channel->unlinked) + cs46xx_dsp_pcm_unlink(chip,cpcm->pcm_channel); +#else + spin_lock(&chip->reg_lock); + { unsigned int tmp; + tmp = snd_cs46xx_peek(chip, BA1_PCTL); + tmp &= 0x0000ffff; + snd_cs46xx_poke(chip, BA1_PCTL, tmp); + } + spin_unlock(&chip->reg_lock); +#endif + break; + default: + result = -EINVAL; + break; + } + + return result; +} + +static int snd_cs46xx_capture_trigger(struct snd_pcm_substream *substream, + int cmd) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + unsigned int tmp; + int result = 0; + + spin_lock(&chip->reg_lock); + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + case SNDRV_PCM_TRIGGER_RESUME: + tmp = snd_cs46xx_peek(chip, BA1_CCTL); + tmp &= 0xffff0000; + snd_cs46xx_poke(chip, BA1_CCTL, chip->capt.ctl | tmp); + break; + case SNDRV_PCM_TRIGGER_STOP: + case SNDRV_PCM_TRIGGER_SUSPEND: + tmp = snd_cs46xx_peek(chip, BA1_CCTL); + tmp &= 0xffff0000; + snd_cs46xx_poke(chip, BA1_CCTL, tmp); + break; + default: + result = -EINVAL; + break; + } + spin_unlock(&chip->reg_lock); + + return result; +} + +#ifdef CONFIG_SND_CS46XX_NEW_DSP +static int _cs46xx_adjust_sample_rate (struct snd_cs46xx *chip, struct snd_cs46xx_pcm *cpcm, + int sample_rate) +{ + + /* If PCMReaderSCB and SrcTaskSCB not created yet ... */ + if ( cpcm->pcm_channel == NULL) { + cpcm->pcm_channel = cs46xx_dsp_create_pcm_channel (chip, sample_rate, + cpcm, cpcm->hw_buf.addr,cpcm->pcm_channel_id); + if (cpcm->pcm_channel == NULL) { + dev_err(chip->card->dev, + "failed to create virtual PCM channel\n"); + return -ENOMEM; + } + cpcm->pcm_channel->sample_rate = sample_rate; + } else + /* if sample rate is changed */ + if ((int)cpcm->pcm_channel->sample_rate != sample_rate) { + int unlinked = cpcm->pcm_channel->unlinked; + cs46xx_dsp_destroy_pcm_channel (chip,cpcm->pcm_channel); + + if ( (cpcm->pcm_channel = cs46xx_dsp_create_pcm_channel (chip, sample_rate, cpcm, + cpcm->hw_buf.addr, + cpcm->pcm_channel_id)) == NULL) { + dev_err(chip->card->dev, + "failed to re-create virtual PCM channel\n"); + return -ENOMEM; + } + + if (!unlinked) cs46xx_dsp_pcm_link (chip,cpcm->pcm_channel); + cpcm->pcm_channel->sample_rate = sample_rate; + } + + return 0; +} +#endif + + +static int snd_cs46xx_playback_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *hw_params) +{ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_cs46xx_pcm *cpcm; + int err; +#ifdef CONFIG_SND_CS46XX_NEW_DSP + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + int sample_rate = params_rate(hw_params); + int period_size = params_period_bytes(hw_params); +#endif + cpcm = runtime->private_data; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + if (snd_BUG_ON(!sample_rate)) + return -ENXIO; + + mutex_lock(&chip->spos_mutex); + + if (_cs46xx_adjust_sample_rate (chip,cpcm,sample_rate)) { + mutex_unlock(&chip->spos_mutex); + return -ENXIO; + } + + snd_BUG_ON(!cpcm->pcm_channel); + if (!cpcm->pcm_channel) { + mutex_unlock(&chip->spos_mutex); + return -ENXIO; + } + + + if (cs46xx_dsp_pcm_channel_set_period (chip,cpcm->pcm_channel,period_size)) { + mutex_unlock(&chip->spos_mutex); + return -EINVAL; + } + + dev_dbg(chip->card->dev, + "period_size (%d), periods (%d) buffer_size(%d)\n", + period_size, params_periods(hw_params), + params_buffer_bytes(hw_params)); +#endif + + if (params_periods(hw_params) == CS46XX_FRAGS) { + if (runtime->dma_area != cpcm->hw_buf.area) + snd_pcm_lib_free_pages(substream); + runtime->dma_area = cpcm->hw_buf.area; + runtime->dma_addr = cpcm->hw_buf.addr; + runtime->dma_bytes = cpcm->hw_buf.bytes; + + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + if (cpcm->pcm_channel_id == DSP_PCM_MAIN_CHANNEL) { + substream->ops = &snd_cs46xx_playback_ops; + } else if (cpcm->pcm_channel_id == DSP_PCM_REAR_CHANNEL) { + substream->ops = &snd_cs46xx_playback_rear_ops; + } else if (cpcm->pcm_channel_id == DSP_PCM_CENTER_LFE_CHANNEL) { + substream->ops = &snd_cs46xx_playback_clfe_ops; + } else if (cpcm->pcm_channel_id == DSP_IEC958_CHANNEL) { + substream->ops = &snd_cs46xx_playback_iec958_ops; + } else { + snd_BUG(); + } +#else + substream->ops = &snd_cs46xx_playback_ops; +#endif + + } else { + if (runtime->dma_area == cpcm->hw_buf.area) { + runtime->dma_area = NULL; + runtime->dma_addr = 0; + runtime->dma_bytes = 0; + } + if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) { +#ifdef CONFIG_SND_CS46XX_NEW_DSP + mutex_unlock(&chip->spos_mutex); +#endif + return err; + } + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + if (cpcm->pcm_channel_id == DSP_PCM_MAIN_CHANNEL) { + substream->ops = &snd_cs46xx_playback_indirect_ops; + } else if (cpcm->pcm_channel_id == DSP_PCM_REAR_CHANNEL) { + substream->ops = &snd_cs46xx_playback_indirect_rear_ops; + } else if (cpcm->pcm_channel_id == DSP_PCM_CENTER_LFE_CHANNEL) { + substream->ops = &snd_cs46xx_playback_indirect_clfe_ops; + } else if (cpcm->pcm_channel_id == DSP_IEC958_CHANNEL) { + substream->ops = &snd_cs46xx_playback_indirect_iec958_ops; + } else { + snd_BUG(); + } +#else + substream->ops = &snd_cs46xx_playback_indirect_ops; +#endif + + } + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + mutex_unlock(&chip->spos_mutex); +#endif + + return 0; +} + +static int snd_cs46xx_playback_hw_free(struct snd_pcm_substream *substream) +{ + /*struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);*/ + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_cs46xx_pcm *cpcm; + + cpcm = runtime->private_data; + + /* if play_back open fails, then this function + is called and cpcm can actually be NULL here */ + if (!cpcm) return -ENXIO; + + if (runtime->dma_area != cpcm->hw_buf.area) + snd_pcm_lib_free_pages(substream); + + runtime->dma_area = NULL; + runtime->dma_addr = 0; + runtime->dma_bytes = 0; + + return 0; +} + +static int snd_cs46xx_playback_prepare(struct snd_pcm_substream *substream) +{ + unsigned int tmp; + unsigned int pfie; + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_cs46xx_pcm *cpcm; + + cpcm = runtime->private_data; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + if (snd_BUG_ON(!cpcm->pcm_channel)) + return -ENXIO; + + pfie = snd_cs46xx_peek(chip, (cpcm->pcm_channel->pcm_reader_scb->address + 1) << 2 ); + pfie &= ~0x0000f03f; +#else + /* old dsp */ + pfie = snd_cs46xx_peek(chip, BA1_PFIE); + pfie &= ~0x0000f03f; +#endif + + cpcm->shift = 2; + /* if to convert from stereo to mono */ + if (runtime->channels == 1) { + cpcm->shift--; + pfie |= 0x00002000; + } + /* if to convert from 8 bit to 16 bit */ + if (snd_pcm_format_width(runtime->format) == 8) { + cpcm->shift--; + pfie |= 0x00001000; + } + /* if to convert to unsigned */ + if (snd_pcm_format_unsigned(runtime->format)) + pfie |= 0x00008000; + + /* Never convert byte order when sample stream is 8 bit */ + if (snd_pcm_format_width(runtime->format) != 8) { + /* convert from big endian to little endian */ + if (snd_pcm_format_big_endian(runtime->format)) + pfie |= 0x00004000; + } + + memset(&cpcm->pcm_rec, 0, sizeof(cpcm->pcm_rec)); + cpcm->pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); + cpcm->pcm_rec.hw_buffer_size = runtime->period_size * CS46XX_FRAGS << cpcm->shift; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + + tmp = snd_cs46xx_peek(chip, (cpcm->pcm_channel->pcm_reader_scb->address) << 2); + tmp &= ~0x000003ff; + tmp |= (4 << cpcm->shift) - 1; + /* playback transaction count register */ + snd_cs46xx_poke(chip, (cpcm->pcm_channel->pcm_reader_scb->address) << 2, tmp); + + /* playback format && interrupt enable */ + snd_cs46xx_poke(chip, (cpcm->pcm_channel->pcm_reader_scb->address + 1) << 2, pfie | cpcm->pcm_channel->pcm_slot); +#else + snd_cs46xx_poke(chip, BA1_PBA, cpcm->hw_buf.addr); + tmp = snd_cs46xx_peek(chip, BA1_PDTC); + tmp &= ~0x000003ff; + tmp |= (4 << cpcm->shift) - 1; + snd_cs46xx_poke(chip, BA1_PDTC, tmp); + snd_cs46xx_poke(chip, BA1_PFIE, pfie); + snd_cs46xx_set_play_sample_rate(chip, runtime->rate); +#endif + + return 0; +} + +static int snd_cs46xx_capture_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *hw_params) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + int err; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + cs46xx_dsp_pcm_ostream_set_period (chip, params_period_bytes(hw_params)); +#endif + if (runtime->periods == CS46XX_FRAGS) { + if (runtime->dma_area != chip->capt.hw_buf.area) + snd_pcm_lib_free_pages(substream); + runtime->dma_area = chip->capt.hw_buf.area; + runtime->dma_addr = chip->capt.hw_buf.addr; + runtime->dma_bytes = chip->capt.hw_buf.bytes; + substream->ops = &snd_cs46xx_capture_ops; + } else { + if (runtime->dma_area == chip->capt.hw_buf.area) { + runtime->dma_area = NULL; + runtime->dma_addr = 0; + runtime->dma_bytes = 0; + } + if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0) + return err; + substream->ops = &snd_cs46xx_capture_indirect_ops; + } + + return 0; +} + +static int snd_cs46xx_capture_hw_free(struct snd_pcm_substream *substream) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + + if (runtime->dma_area != chip->capt.hw_buf.area) + snd_pcm_lib_free_pages(substream); + runtime->dma_area = NULL; + runtime->dma_addr = 0; + runtime->dma_bytes = 0; + + return 0; +} + +static int snd_cs46xx_capture_prepare(struct snd_pcm_substream *substream) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + + snd_cs46xx_poke(chip, BA1_CBA, chip->capt.hw_buf.addr); + chip->capt.shift = 2; + memset(&chip->capt.pcm_rec, 0, sizeof(chip->capt.pcm_rec)); + chip->capt.pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); + chip->capt.pcm_rec.hw_buffer_size = runtime->period_size * CS46XX_FRAGS << 2; + snd_cs46xx_set_capture_sample_rate(chip, runtime->rate); + + return 0; +} + +static irqreturn_t snd_cs46xx_interrupt(int irq, void *dev_id) +{ + struct snd_cs46xx *chip = dev_id; + u32 status1; +#ifdef CONFIG_SND_CS46XX_NEW_DSP + struct dsp_spos_instance * ins = chip->dsp_spos_instance; + u32 status2; + int i; + struct snd_cs46xx_pcm *cpcm = NULL; +#endif + + /* + * Read the Interrupt Status Register to clear the interrupt + */ + status1 = snd_cs46xx_peekBA0(chip, BA0_HISR); + if ((status1 & 0x7fffffff) == 0) { + snd_cs46xx_pokeBA0(chip, BA0_HICR, HICR_CHGM | HICR_IEV); + return IRQ_NONE; + } + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + status2 = snd_cs46xx_peekBA0(chip, BA0_HSR0); + + for (i = 0; i < DSP_MAX_PCM_CHANNELS; ++i) { + if (i <= 15) { + if ( status1 & (1 << i) ) { + if (i == CS46XX_DSP_CAPTURE_CHANNEL) { + if (chip->capt.substream) + snd_pcm_period_elapsed(chip->capt.substream); + } else { + if (ins->pcm_channels[i].active && + ins->pcm_channels[i].private_data && + !ins->pcm_channels[i].unlinked) { + cpcm = ins->pcm_channels[i].private_data; + snd_pcm_period_elapsed(cpcm->substream); + } + } + } + } else { + if ( status2 & (1 << (i - 16))) { + if (ins->pcm_channels[i].active && + ins->pcm_channels[i].private_data && + !ins->pcm_channels[i].unlinked) { + cpcm = ins->pcm_channels[i].private_data; + snd_pcm_period_elapsed(cpcm->substream); + } + } + } + } + +#else + /* old dsp */ + if ((status1 & HISR_VC0) && chip->playback_pcm) { + if (chip->playback_pcm->substream) + snd_pcm_period_elapsed(chip->playback_pcm->substream); + } + if ((status1 & HISR_VC1) && chip->pcm) { + if (chip->capt.substream) + snd_pcm_period_elapsed(chip->capt.substream); + } +#endif + + if ((status1 & HISR_MIDI) && chip->rmidi) { + unsigned char c; + + spin_lock(&chip->reg_lock); + while ((snd_cs46xx_peekBA0(chip, BA0_MIDSR) & MIDSR_RBE) == 0) { + c = snd_cs46xx_peekBA0(chip, BA0_MIDRP); + if ((chip->midcr & MIDCR_RIE) == 0) + continue; + snd_rawmidi_receive(chip->midi_input, &c, 1); + } + while ((snd_cs46xx_peekBA0(chip, BA0_MIDSR) & MIDSR_TBF) == 0) { + if ((chip->midcr & MIDCR_TIE) == 0) + break; + if (snd_rawmidi_transmit(chip->midi_output, &c, 1) != 1) { + chip->midcr &= ~MIDCR_TIE; + snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); + break; + } + snd_cs46xx_pokeBA0(chip, BA0_MIDWP, c); + } + spin_unlock(&chip->reg_lock); + } + /* + * EOI to the PCI part....reenables interrupts + */ + snd_cs46xx_pokeBA0(chip, BA0_HICR, HICR_CHGM | HICR_IEV); + + return IRQ_HANDLED; +} + +static const struct snd_pcm_hardware snd_cs46xx_playback = +{ + .info = (SNDRV_PCM_INFO_MMAP | + SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_BLOCK_TRANSFER /*|*/ + /*SNDRV_PCM_INFO_RESUME*/), + .formats = (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 | + SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE | + SNDRV_PCM_FMTBIT_U16_LE | SNDRV_PCM_FMTBIT_U16_BE), + .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, + .rate_min = 5500, + .rate_max = 48000, + .channels_min = 1, + .channels_max = 2, + .buffer_bytes_max = (256 * 1024), + .period_bytes_min = CS46XX_MIN_PERIOD_SIZE, + .period_bytes_max = CS46XX_MAX_PERIOD_SIZE, + .periods_min = CS46XX_FRAGS, + .periods_max = 1024, + .fifo_size = 0, +}; + +static const struct snd_pcm_hardware snd_cs46xx_capture = +{ + .info = (SNDRV_PCM_INFO_MMAP | + SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_BLOCK_TRANSFER /*|*/ + /*SNDRV_PCM_INFO_RESUME*/), + .formats = SNDRV_PCM_FMTBIT_S16_LE, + .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000, + .rate_min = 5500, + .rate_max = 48000, + .channels_min = 2, + .channels_max = 2, + .buffer_bytes_max = (256 * 1024), + .period_bytes_min = CS46XX_MIN_PERIOD_SIZE, + .period_bytes_max = CS46XX_MAX_PERIOD_SIZE, + .periods_min = CS46XX_FRAGS, + .periods_max = 1024, + .fifo_size = 0, +}; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + +static const unsigned int period_sizes[] = { 32, 64, 128, 256, 512, 1024, 2048 }; + +static const struct snd_pcm_hw_constraint_list hw_constraints_period_sizes = { + .count = ARRAY_SIZE(period_sizes), + .list = period_sizes, + .mask = 0 +}; + +#endif + +static void snd_cs46xx_pcm_free_substream(struct snd_pcm_runtime *runtime) +{ + kfree(runtime->private_data); +} + +static int _cs46xx_playback_open_channel (struct snd_pcm_substream *substream,int pcm_channel_id) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + struct snd_cs46xx_pcm * cpcm; + struct snd_pcm_runtime *runtime = substream->runtime; + + cpcm = kzalloc(sizeof(*cpcm), GFP_KERNEL); + if (cpcm == NULL) + return -ENOMEM; + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), + PAGE_SIZE, &cpcm->hw_buf) < 0) { + kfree(cpcm); + return -ENOMEM; + } + + runtime->hw = snd_cs46xx_playback; + runtime->private_data = cpcm; + runtime->private_free = snd_cs46xx_pcm_free_substream; + + cpcm->substream = substream; +#ifdef CONFIG_SND_CS46XX_NEW_DSP + mutex_lock(&chip->spos_mutex); + cpcm->pcm_channel = NULL; + cpcm->pcm_channel_id = pcm_channel_id; + + + snd_pcm_hw_constraint_list(runtime, 0, + SNDRV_PCM_HW_PARAM_PERIOD_BYTES, + &hw_constraints_period_sizes); + + mutex_unlock(&chip->spos_mutex); +#else + chip->playback_pcm = cpcm; /* HACK */ +#endif + + if (chip->accept_valid) + substream->runtime->hw.info |= SNDRV_PCM_INFO_MMAP_VALID; + chip->active_ctrl(chip, 1); + + return 0; +} + +static int snd_cs46xx_playback_open(struct snd_pcm_substream *substream) +{ + dev_dbg(substream->pcm->card->dev, "open front channel\n"); + return _cs46xx_playback_open_channel(substream,DSP_PCM_MAIN_CHANNEL); +} + +#ifdef CONFIG_SND_CS46XX_NEW_DSP +static int snd_cs46xx_playback_open_rear(struct snd_pcm_substream *substream) +{ + dev_dbg(substream->pcm->card->dev, "open rear channel\n"); + return _cs46xx_playback_open_channel(substream,DSP_PCM_REAR_CHANNEL); +} + +static int snd_cs46xx_playback_open_clfe(struct snd_pcm_substream *substream) +{ + dev_dbg(substream->pcm->card->dev, "open center - LFE channel\n"); + return _cs46xx_playback_open_channel(substream,DSP_PCM_CENTER_LFE_CHANNEL); +} + +static int snd_cs46xx_playback_open_iec958(struct snd_pcm_substream *substream) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + + dev_dbg(chip->card->dev, "open raw iec958 channel\n"); + + mutex_lock(&chip->spos_mutex); + cs46xx_iec958_pre_open (chip); + mutex_unlock(&chip->spos_mutex); + + return _cs46xx_playback_open_channel(substream,DSP_IEC958_CHANNEL); +} + +static int snd_cs46xx_playback_close(struct snd_pcm_substream *substream); + +static int snd_cs46xx_playback_close_iec958(struct snd_pcm_substream *substream) +{ + int err; + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + + dev_dbg(chip->card->dev, "close raw iec958 channel\n"); + + err = snd_cs46xx_playback_close(substream); + + mutex_lock(&chip->spos_mutex); + cs46xx_iec958_post_close (chip); + mutex_unlock(&chip->spos_mutex); + + return err; +} +#endif + +static int snd_cs46xx_capture_open(struct snd_pcm_substream *substream) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), + PAGE_SIZE, &chip->capt.hw_buf) < 0) + return -ENOMEM; + chip->capt.substream = substream; + substream->runtime->hw = snd_cs46xx_capture; + + if (chip->accept_valid) + substream->runtime->hw.info |= SNDRV_PCM_INFO_MMAP_VALID; + + chip->active_ctrl(chip, 1); + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_pcm_hw_constraint_list(substream->runtime, 0, + SNDRV_PCM_HW_PARAM_PERIOD_BYTES, + &hw_constraints_period_sizes); +#endif + return 0; +} + +static int snd_cs46xx_playback_close(struct snd_pcm_substream *substream) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_cs46xx_pcm * cpcm; + + cpcm = runtime->private_data; + + /* when playback_open fails, then cpcm can be NULL */ + if (!cpcm) return -ENXIO; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + mutex_lock(&chip->spos_mutex); + if (cpcm->pcm_channel) { + cs46xx_dsp_destroy_pcm_channel(chip,cpcm->pcm_channel); + cpcm->pcm_channel = NULL; + } + mutex_unlock(&chip->spos_mutex); +#else + chip->playback_pcm = NULL; +#endif + + cpcm->substream = NULL; + snd_dma_free_pages(&cpcm->hw_buf); + chip->active_ctrl(chip, -1); + + return 0; +} + +static int snd_cs46xx_capture_close(struct snd_pcm_substream *substream) +{ + struct snd_cs46xx *chip = snd_pcm_substream_chip(substream); + + chip->capt.substream = NULL; + snd_dma_free_pages(&chip->capt.hw_buf); + chip->active_ctrl(chip, -1); + + return 0; +} + +#ifdef CONFIG_SND_CS46XX_NEW_DSP +static const struct snd_pcm_ops snd_cs46xx_playback_rear_ops = { + .open = snd_cs46xx_playback_open_rear, + .close = snd_cs46xx_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_cs46xx_playback_hw_params, + .hw_free = snd_cs46xx_playback_hw_free, + .prepare = snd_cs46xx_playback_prepare, + .trigger = snd_cs46xx_playback_trigger, + .pointer = snd_cs46xx_playback_direct_pointer, +}; + +static const struct snd_pcm_ops snd_cs46xx_playback_indirect_rear_ops = { + .open = snd_cs46xx_playback_open_rear, + .close = snd_cs46xx_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_cs46xx_playback_hw_params, + .hw_free = snd_cs46xx_playback_hw_free, + .prepare = snd_cs46xx_playback_prepare, + .trigger = snd_cs46xx_playback_trigger, + .pointer = snd_cs46xx_playback_indirect_pointer, + .ack = snd_cs46xx_playback_transfer, +}; + +static const struct snd_pcm_ops snd_cs46xx_playback_clfe_ops = { + .open = snd_cs46xx_playback_open_clfe, + .close = snd_cs46xx_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_cs46xx_playback_hw_params, + .hw_free = snd_cs46xx_playback_hw_free, + .prepare = snd_cs46xx_playback_prepare, + .trigger = snd_cs46xx_playback_trigger, + .pointer = snd_cs46xx_playback_direct_pointer, +}; + +static const struct snd_pcm_ops snd_cs46xx_playback_indirect_clfe_ops = { + .open = snd_cs46xx_playback_open_clfe, + .close = snd_cs46xx_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_cs46xx_playback_hw_params, + .hw_free = snd_cs46xx_playback_hw_free, + .prepare = snd_cs46xx_playback_prepare, + .trigger = snd_cs46xx_playback_trigger, + .pointer = snd_cs46xx_playback_indirect_pointer, + .ack = snd_cs46xx_playback_transfer, +}; + +static const struct snd_pcm_ops snd_cs46xx_playback_iec958_ops = { + .open = snd_cs46xx_playback_open_iec958, + .close = snd_cs46xx_playback_close_iec958, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_cs46xx_playback_hw_params, + .hw_free = snd_cs46xx_playback_hw_free, + .prepare = snd_cs46xx_playback_prepare, + .trigger = snd_cs46xx_playback_trigger, + .pointer = snd_cs46xx_playback_direct_pointer, +}; + +static const struct snd_pcm_ops snd_cs46xx_playback_indirect_iec958_ops = { + .open = snd_cs46xx_playback_open_iec958, + .close = snd_cs46xx_playback_close_iec958, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_cs46xx_playback_hw_params, + .hw_free = snd_cs46xx_playback_hw_free, + .prepare = snd_cs46xx_playback_prepare, + .trigger = snd_cs46xx_playback_trigger, + .pointer = snd_cs46xx_playback_indirect_pointer, + .ack = snd_cs46xx_playback_transfer, +}; + +#endif + +static const struct snd_pcm_ops snd_cs46xx_playback_ops = { + .open = snd_cs46xx_playback_open, + .close = snd_cs46xx_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_cs46xx_playback_hw_params, + .hw_free = snd_cs46xx_playback_hw_free, + .prepare = snd_cs46xx_playback_prepare, + .trigger = snd_cs46xx_playback_trigger, + .pointer = snd_cs46xx_playback_direct_pointer, +}; + +static const struct snd_pcm_ops snd_cs46xx_playback_indirect_ops = { + .open = snd_cs46xx_playback_open, + .close = snd_cs46xx_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_cs46xx_playback_hw_params, + .hw_free = snd_cs46xx_playback_hw_free, + .prepare = snd_cs46xx_playback_prepare, + .trigger = snd_cs46xx_playback_trigger, + .pointer = snd_cs46xx_playback_indirect_pointer, + .ack = snd_cs46xx_playback_transfer, +}; + +static const struct snd_pcm_ops snd_cs46xx_capture_ops = { + .open = snd_cs46xx_capture_open, + .close = snd_cs46xx_capture_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_cs46xx_capture_hw_params, + .hw_free = snd_cs46xx_capture_hw_free, + .prepare = snd_cs46xx_capture_prepare, + .trigger = snd_cs46xx_capture_trigger, + .pointer = snd_cs46xx_capture_direct_pointer, +}; + +static const struct snd_pcm_ops snd_cs46xx_capture_indirect_ops = { + .open = snd_cs46xx_capture_open, + .close = snd_cs46xx_capture_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_cs46xx_capture_hw_params, + .hw_free = snd_cs46xx_capture_hw_free, + .prepare = snd_cs46xx_capture_prepare, + .trigger = snd_cs46xx_capture_trigger, + .pointer = snd_cs46xx_capture_indirect_pointer, + .ack = snd_cs46xx_capture_transfer, +}; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP +#define MAX_PLAYBACK_CHANNELS (DSP_MAX_PCM_CHANNELS - 1) +#else +#define MAX_PLAYBACK_CHANNELS 1 +#endif + +int snd_cs46xx_pcm(struct snd_cs46xx *chip, int device) +{ + struct snd_pcm *pcm; + int err; + + if ((err = snd_pcm_new(chip->card, "CS46xx", device, MAX_PLAYBACK_CHANNELS, 1, &pcm)) < 0) + return err; + + pcm->private_data = chip; + + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_cs46xx_playback_ops); + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_cs46xx_capture_ops); + + /* global setup */ + pcm->info_flags = 0; + strcpy(pcm->name, "CS46xx"); + chip->pcm = pcm; + + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, + snd_dma_pci_data(chip->pci), 64*1024, 256*1024); + + return 0; +} + + +#ifdef CONFIG_SND_CS46XX_NEW_DSP +int snd_cs46xx_pcm_rear(struct snd_cs46xx *chip, int device) +{ + struct snd_pcm *pcm; + int err; + + if ((err = snd_pcm_new(chip->card, "CS46xx - Rear", device, MAX_PLAYBACK_CHANNELS, 0, &pcm)) < 0) + return err; + + pcm->private_data = chip; + + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_cs46xx_playback_rear_ops); + + /* global setup */ + pcm->info_flags = 0; + strcpy(pcm->name, "CS46xx - Rear"); + chip->pcm_rear = pcm; + + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, + snd_dma_pci_data(chip->pci), 64*1024, 256*1024); + + return 0; +} + +int snd_cs46xx_pcm_center_lfe(struct snd_cs46xx *chip, int device) +{ + struct snd_pcm *pcm; + int err; + + if ((err = snd_pcm_new(chip->card, "CS46xx - Center LFE", device, MAX_PLAYBACK_CHANNELS, 0, &pcm)) < 0) + return err; + + pcm->private_data = chip; + + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_cs46xx_playback_clfe_ops); + + /* global setup */ + pcm->info_flags = 0; + strcpy(pcm->name, "CS46xx - Center LFE"); + chip->pcm_center_lfe = pcm; + + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, + snd_dma_pci_data(chip->pci), 64*1024, 256*1024); + + return 0; +} + +int snd_cs46xx_pcm_iec958(struct snd_cs46xx *chip, int device) +{ + struct snd_pcm *pcm; + int err; + + if ((err = snd_pcm_new(chip->card, "CS46xx - IEC958", device, 1, 0, &pcm)) < 0) + return err; + + pcm->private_data = chip; + + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_cs46xx_playback_iec958_ops); + + /* global setup */ + pcm->info_flags = 0; + strcpy(pcm->name, "CS46xx - IEC958"); + chip->pcm_iec958 = pcm; + + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, + snd_dma_pci_data(chip->pci), 64*1024, 256*1024); + + return 0; +} +#endif + +/* + * Mixer routines + */ +static void snd_cs46xx_mixer_free_ac97_bus(struct snd_ac97_bus *bus) +{ + struct snd_cs46xx *chip = bus->private_data; + + chip->ac97_bus = NULL; +} + +static void snd_cs46xx_mixer_free_ac97(struct snd_ac97 *ac97) +{ + struct snd_cs46xx *chip = ac97->private_data; + + if (snd_BUG_ON(ac97 != chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] && + ac97 != chip->ac97[CS46XX_SECONDARY_CODEC_INDEX])) + return; + + if (ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]) { + chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] = NULL; + chip->eapd_switch = NULL; + } + else + chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] = NULL; +} + +static int snd_cs46xx_vol_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = 2; + uinfo->value.integer.min = 0; + uinfo->value.integer.max = 0x7fff; + return 0; +} + +static int snd_cs46xx_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + int reg = kcontrol->private_value; + unsigned int val = snd_cs46xx_peek(chip, reg); + ucontrol->value.integer.value[0] = 0xffff - (val >> 16); + ucontrol->value.integer.value[1] = 0xffff - (val & 0xffff); + return 0; +} + +static int snd_cs46xx_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + int reg = kcontrol->private_value; + unsigned int val = ((0xffff - ucontrol->value.integer.value[0]) << 16 | + (0xffff - ucontrol->value.integer.value[1])); + unsigned int old = snd_cs46xx_peek(chip, reg); + int change = (old != val); + + if (change) { + snd_cs46xx_poke(chip, reg, val); + } + + return change; +} + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + +static int snd_cs46xx_vol_dac_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + + ucontrol->value.integer.value[0] = chip->dsp_spos_instance->dac_volume_left; + ucontrol->value.integer.value[1] = chip->dsp_spos_instance->dac_volume_right; + + return 0; +} + +static int snd_cs46xx_vol_dac_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + int change = 0; + + if (chip->dsp_spos_instance->dac_volume_right != ucontrol->value.integer.value[0] || + chip->dsp_spos_instance->dac_volume_left != ucontrol->value.integer.value[1]) { + cs46xx_dsp_set_dac_volume(chip, + ucontrol->value.integer.value[0], + ucontrol->value.integer.value[1]); + change = 1; + } + + return change; +} + +#if 0 +static int snd_cs46xx_vol_iec958_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + + ucontrol->value.integer.value[0] = chip->dsp_spos_instance->spdif_input_volume_left; + ucontrol->value.integer.value[1] = chip->dsp_spos_instance->spdif_input_volume_right; + return 0; +} + +static int snd_cs46xx_vol_iec958_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + int change = 0; + + if (chip->dsp_spos_instance->spdif_input_volume_left != ucontrol->value.integer.value[0] || + chip->dsp_spos_instance->spdif_input_volume_right!= ucontrol->value.integer.value[1]) { + cs46xx_dsp_set_iec958_volume (chip, + ucontrol->value.integer.value[0], + ucontrol->value.integer.value[1]); + change = 1; + } + + return change; +} +#endif + +#define snd_mixer_boolean_info snd_ctl_boolean_mono_info + +static int snd_cs46xx_iec958_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + int reg = kcontrol->private_value; + + if (reg == CS46XX_MIXER_SPDIF_OUTPUT_ELEMENT) + ucontrol->value.integer.value[0] = (chip->dsp_spos_instance->spdif_status_out & DSP_SPDIF_STATUS_OUTPUT_ENABLED); + else + ucontrol->value.integer.value[0] = chip->dsp_spos_instance->spdif_status_in; + + return 0; +} + +static int snd_cs46xx_iec958_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + int change, res; + + switch (kcontrol->private_value) { + case CS46XX_MIXER_SPDIF_OUTPUT_ELEMENT: + mutex_lock(&chip->spos_mutex); + change = (chip->dsp_spos_instance->spdif_status_out & DSP_SPDIF_STATUS_OUTPUT_ENABLED); + if (ucontrol->value.integer.value[0] && !change) + cs46xx_dsp_enable_spdif_out(chip); + else if (change && !ucontrol->value.integer.value[0]) + cs46xx_dsp_disable_spdif_out(chip); + + res = (change != (chip->dsp_spos_instance->spdif_status_out & DSP_SPDIF_STATUS_OUTPUT_ENABLED)); + mutex_unlock(&chip->spos_mutex); + break; + case CS46XX_MIXER_SPDIF_INPUT_ELEMENT: + change = chip->dsp_spos_instance->spdif_status_in; + if (ucontrol->value.integer.value[0] && !change) { + cs46xx_dsp_enable_spdif_in(chip); + /* restore volume */ + } + else if (change && !ucontrol->value.integer.value[0]) + cs46xx_dsp_disable_spdif_in(chip); + + res = (change != chip->dsp_spos_instance->spdif_status_in); + break; + default: + res = -EINVAL; + snd_BUG(); /* should never happen ... */ + } + + return res; +} + +static int snd_cs46xx_adc_capture_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + struct dsp_spos_instance * ins = chip->dsp_spos_instance; + + if (ins->adc_input != NULL) + ucontrol->value.integer.value[0] = 1; + else + ucontrol->value.integer.value[0] = 0; + + return 0; +} + +static int snd_cs46xx_adc_capture_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + struct dsp_spos_instance * ins = chip->dsp_spos_instance; + int change = 0; + + if (ucontrol->value.integer.value[0] && !ins->adc_input) { + cs46xx_dsp_enable_adc_capture(chip); + change = 1; + } else if (!ucontrol->value.integer.value[0] && ins->adc_input) { + cs46xx_dsp_disable_adc_capture(chip); + change = 1; + } + return change; +} + +static int snd_cs46xx_pcm_capture_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + struct dsp_spos_instance * ins = chip->dsp_spos_instance; + + if (ins->pcm_input != NULL) + ucontrol->value.integer.value[0] = 1; + else + ucontrol->value.integer.value[0] = 0; + + return 0; +} + + +static int snd_cs46xx_pcm_capture_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + struct dsp_spos_instance * ins = chip->dsp_spos_instance; + int change = 0; + + if (ucontrol->value.integer.value[0] && !ins->pcm_input) { + cs46xx_dsp_enable_pcm_capture(chip); + change = 1; + } else if (!ucontrol->value.integer.value[0] && ins->pcm_input) { + cs46xx_dsp_disable_pcm_capture(chip); + change = 1; + } + + return change; +} + +static int snd_herc_spdif_select_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + + int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR); + + if (val1 & EGPIODR_GPOE0) + ucontrol->value.integer.value[0] = 1; + else + ucontrol->value.integer.value[0] = 0; + + return 0; +} + +/* + * Game Theatre XP card - EGPIO[0] is used to select SPDIF input optical or coaxial. + */ +static int snd_herc_spdif_select_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR); + int val2 = snd_cs46xx_peekBA0(chip, BA0_EGPIOPTR); + + if (ucontrol->value.integer.value[0]) { + /* optical is default */ + snd_cs46xx_pokeBA0(chip, BA0_EGPIODR, + EGPIODR_GPOE0 | val1); /* enable EGPIO0 output */ + snd_cs46xx_pokeBA0(chip, BA0_EGPIOPTR, + EGPIOPTR_GPPT0 | val2); /* open-drain on output */ + } else { + /* coaxial */ + snd_cs46xx_pokeBA0(chip, BA0_EGPIODR, val1 & ~EGPIODR_GPOE0); /* disable */ + snd_cs46xx_pokeBA0(chip, BA0_EGPIOPTR, val2 & ~EGPIOPTR_GPPT0); /* disable */ + } + + /* checking diff from the EGPIO direction register + should be enough */ + return (val1 != (int)snd_cs46xx_peekBA0(chip, BA0_EGPIODR)); +} + + +static int snd_cs46xx_spdif_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_IEC958; + uinfo->count = 1; + return 0; +} + +static int snd_cs46xx_spdif_default_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + struct dsp_spos_instance * ins = chip->dsp_spos_instance; + + mutex_lock(&chip->spos_mutex); + ucontrol->value.iec958.status[0] = _wrap_all_bits((ins->spdif_csuv_default >> 24) & 0xff); + ucontrol->value.iec958.status[1] = _wrap_all_bits((ins->spdif_csuv_default >> 16) & 0xff); + ucontrol->value.iec958.status[2] = 0; + ucontrol->value.iec958.status[3] = _wrap_all_bits((ins->spdif_csuv_default) & 0xff); + mutex_unlock(&chip->spos_mutex); + + return 0; +} + +static int snd_cs46xx_spdif_default_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx * chip = snd_kcontrol_chip(kcontrol); + struct dsp_spos_instance * ins = chip->dsp_spos_instance; + unsigned int val; + int change; + + mutex_lock(&chip->spos_mutex); + val = ((unsigned int)_wrap_all_bits(ucontrol->value.iec958.status[0]) << 24) | + ((unsigned int)_wrap_all_bits(ucontrol->value.iec958.status[2]) << 16) | + ((unsigned int)_wrap_all_bits(ucontrol->value.iec958.status[3])) | + /* left and right validity bit */ + (1 << 13) | (1 << 12); + + + change = (unsigned int)ins->spdif_csuv_default != val; + ins->spdif_csuv_default = val; + + if ( !(ins->spdif_status_out & DSP_SPDIF_STATUS_PLAYBACK_OPEN) ) + cs46xx_poke_via_dsp (chip,SP_SPDOUT_CSUV,val); + + mutex_unlock(&chip->spos_mutex); + + return change; +} + +static int snd_cs46xx_spdif_mask_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + ucontrol->value.iec958.status[0] = 0xff; + ucontrol->value.iec958.status[1] = 0xff; + ucontrol->value.iec958.status[2] = 0x00; + ucontrol->value.iec958.status[3] = 0xff; + return 0; +} + +static int snd_cs46xx_spdif_stream_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + struct dsp_spos_instance * ins = chip->dsp_spos_instance; + + mutex_lock(&chip->spos_mutex); + ucontrol->value.iec958.status[0] = _wrap_all_bits((ins->spdif_csuv_stream >> 24) & 0xff); + ucontrol->value.iec958.status[1] = _wrap_all_bits((ins->spdif_csuv_stream >> 16) & 0xff); + ucontrol->value.iec958.status[2] = 0; + ucontrol->value.iec958.status[3] = _wrap_all_bits((ins->spdif_csuv_stream) & 0xff); + mutex_unlock(&chip->spos_mutex); + + return 0; +} + +static int snd_cs46xx_spdif_stream_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx * chip = snd_kcontrol_chip(kcontrol); + struct dsp_spos_instance * ins = chip->dsp_spos_instance; + unsigned int val; + int change; + + mutex_lock(&chip->spos_mutex); + val = ((unsigned int)_wrap_all_bits(ucontrol->value.iec958.status[0]) << 24) | + ((unsigned int)_wrap_all_bits(ucontrol->value.iec958.status[1]) << 16) | + ((unsigned int)_wrap_all_bits(ucontrol->value.iec958.status[3])) | + /* left and right validity bit */ + (1 << 13) | (1 << 12); + + + change = ins->spdif_csuv_stream != val; + ins->spdif_csuv_stream = val; + + if ( ins->spdif_status_out & DSP_SPDIF_STATUS_PLAYBACK_OPEN ) + cs46xx_poke_via_dsp (chip,SP_SPDOUT_CSUV,val); + + mutex_unlock(&chip->spos_mutex); + + return change; +} + +#endif /* CONFIG_SND_CS46XX_NEW_DSP */ + + +static struct snd_kcontrol_new snd_cs46xx_controls[] = { +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "DAC Volume", + .info = snd_cs46xx_vol_info, +#ifndef CONFIG_SND_CS46XX_NEW_DSP + .get = snd_cs46xx_vol_get, + .put = snd_cs46xx_vol_put, + .private_value = BA1_PVOL, +#else + .get = snd_cs46xx_vol_dac_get, + .put = snd_cs46xx_vol_dac_put, +#endif +}, + +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "ADC Volume", + .info = snd_cs46xx_vol_info, + .get = snd_cs46xx_vol_get, + .put = snd_cs46xx_vol_put, +#ifndef CONFIG_SND_CS46XX_NEW_DSP + .private_value = BA1_CVOL, +#else + .private_value = (VARIDECIMATE_SCB_ADDR + 0xE) << 2, +#endif +}, +#ifdef CONFIG_SND_CS46XX_NEW_DSP +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "ADC Capture Switch", + .info = snd_mixer_boolean_info, + .get = snd_cs46xx_adc_capture_get, + .put = snd_cs46xx_adc_capture_put +}, +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "DAC Capture Switch", + .info = snd_mixer_boolean_info, + .get = snd_cs46xx_pcm_capture_get, + .put = snd_cs46xx_pcm_capture_put +}, +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = SNDRV_CTL_NAME_IEC958("Output ",NONE,SWITCH), + .info = snd_mixer_boolean_info, + .get = snd_cs46xx_iec958_get, + .put = snd_cs46xx_iec958_put, + .private_value = CS46XX_MIXER_SPDIF_OUTPUT_ELEMENT, +}, +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = SNDRV_CTL_NAME_IEC958("Input ",NONE,SWITCH), + .info = snd_mixer_boolean_info, + .get = snd_cs46xx_iec958_get, + .put = snd_cs46xx_iec958_put, + .private_value = CS46XX_MIXER_SPDIF_INPUT_ELEMENT, +}, +#if 0 +/* Input IEC958 volume does not work for the moment. (Benny) */ +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = SNDRV_CTL_NAME_IEC958("Input ",NONE,VOLUME), + .info = snd_cs46xx_vol_info, + .get = snd_cs46xx_vol_iec958_get, + .put = snd_cs46xx_vol_iec958_put, + .private_value = (ASYNCRX_SCB_ADDR + 0xE) << 2, +}, +#endif +{ + .iface = SNDRV_CTL_ELEM_IFACE_PCM, + .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,DEFAULT), + .info = snd_cs46xx_spdif_info, + .get = snd_cs46xx_spdif_default_get, + .put = snd_cs46xx_spdif_default_put, +}, +{ + .iface = SNDRV_CTL_ELEM_IFACE_PCM, + .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,MASK), + .info = snd_cs46xx_spdif_info, + .get = snd_cs46xx_spdif_mask_get, + .access = SNDRV_CTL_ELEM_ACCESS_READ +}, +{ + .iface = SNDRV_CTL_ELEM_IFACE_PCM, + .name = SNDRV_CTL_NAME_IEC958("",PLAYBACK,PCM_STREAM), + .info = snd_cs46xx_spdif_info, + .get = snd_cs46xx_spdif_stream_get, + .put = snd_cs46xx_spdif_stream_put +}, + +#endif +}; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP +/* set primary cs4294 codec into Extended Audio Mode */ +static int snd_cs46xx_front_dup_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + unsigned short val; + val = snd_ac97_read(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX], AC97_CSR_ACMODE); + ucontrol->value.integer.value[0] = (val & 0x200) ? 0 : 1; + return 0; +} + +static int snd_cs46xx_front_dup_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_cs46xx *chip = snd_kcontrol_chip(kcontrol); + return snd_ac97_update_bits(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX], + AC97_CSR_ACMODE, 0x200, + ucontrol->value.integer.value[0] ? 0 : 0x200); +} + +static const struct snd_kcontrol_new snd_cs46xx_front_dup_ctl = { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Duplicate Front", + .info = snd_mixer_boolean_info, + .get = snd_cs46xx_front_dup_get, + .put = snd_cs46xx_front_dup_put, +}; +#endif + +#ifdef CONFIG_SND_CS46XX_NEW_DSP +/* Only available on the Hercules Game Theater XP soundcard */ +static struct snd_kcontrol_new snd_hercules_controls[] = { +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Optical/Coaxial SPDIF Input Switch", + .info = snd_mixer_boolean_info, + .get = snd_herc_spdif_select_get, + .put = snd_herc_spdif_select_put, +}, +}; + + +static void snd_cs46xx_codec_reset (struct snd_ac97 * ac97) +{ + unsigned long end_time; + int err; + + /* reset to defaults */ + snd_ac97_write(ac97, AC97_RESET, 0); + + /* set the desired CODEC mode */ + if (ac97->num == CS46XX_PRIMARY_CODEC_INDEX) { + dev_dbg(ac97->bus->card->dev, "CODEC1 mode %04x\n", 0x0); + snd_cs46xx_ac97_write(ac97, AC97_CSR_ACMODE, 0x0); + } else if (ac97->num == CS46XX_SECONDARY_CODEC_INDEX) { + dev_dbg(ac97->bus->card->dev, "CODEC2 mode %04x\n", 0x3); + snd_cs46xx_ac97_write(ac97, AC97_CSR_ACMODE, 0x3); + } else { + snd_BUG(); /* should never happen ... */ + } + + udelay(50); + + /* it's necessary to wait awhile until registers are accessible after RESET */ + /* because the PCM or MASTER volume registers can be modified, */ + /* the REC_GAIN register is used for tests */ + end_time = jiffies + HZ; + do { + unsigned short ext_mid; + + /* use preliminary reads to settle the communication */ + snd_ac97_read(ac97, AC97_RESET); + snd_ac97_read(ac97, AC97_VENDOR_ID1); + snd_ac97_read(ac97, AC97_VENDOR_ID2); + /* modem? */ + ext_mid = snd_ac97_read(ac97, AC97_EXTENDED_MID); + if (ext_mid != 0xffff && (ext_mid & 1) != 0) + return; + + /* test if we can write to the record gain volume register */ + snd_ac97_write(ac97, AC97_REC_GAIN, 0x8a05); + if ((err = snd_ac97_read(ac97, AC97_REC_GAIN)) == 0x8a05) + return; + + msleep(10); + } while (time_after_eq(end_time, jiffies)); + + dev_err(ac97->bus->card->dev, + "CS46xx secondary codec doesn't respond!\n"); +} +#endif + +static int cs46xx_detect_codec(struct snd_cs46xx *chip, int codec) +{ + int idx, err; + struct snd_ac97_template ac97; + + memset(&ac97, 0, sizeof(ac97)); + ac97.private_data = chip; + ac97.private_free = snd_cs46xx_mixer_free_ac97; + ac97.num = codec; + if (chip->amplifier_ctrl == amp_voyetra) + ac97.scaps = AC97_SCAP_INV_EAPD; + + if (codec == CS46XX_SECONDARY_CODEC_INDEX) { + snd_cs46xx_codec_write(chip, AC97_RESET, 0, codec); + udelay(10); + if (snd_cs46xx_codec_read(chip, AC97_RESET, codec) & 0x8000) { + dev_dbg(chip->card->dev, + "secondary codec not present\n"); + return -ENXIO; + } + } + + snd_cs46xx_codec_write(chip, AC97_MASTER, 0x8000, codec); + for (idx = 0; idx < 100; ++idx) { + if (snd_cs46xx_codec_read(chip, AC97_MASTER, codec) == 0x8000) { + err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97[codec]); + return err; + } + msleep(10); + } + dev_dbg(chip->card->dev, "codec %d detection timeout\n", codec); + return -ENXIO; +} + +int snd_cs46xx_mixer(struct snd_cs46xx *chip, int spdif_device) +{ + struct snd_card *card = chip->card; + struct snd_ctl_elem_id id; + int err; + unsigned int idx; + static struct snd_ac97_bus_ops ops = { +#ifdef CONFIG_SND_CS46XX_NEW_DSP + .reset = snd_cs46xx_codec_reset, +#endif + .write = snd_cs46xx_ac97_write, + .read = snd_cs46xx_ac97_read, + }; + + /* detect primary codec */ + chip->nr_ac97_codecs = 0; + dev_dbg(chip->card->dev, "detecting primary codec\n"); + if ((err = snd_ac97_bus(card, 0, &ops, chip, &chip->ac97_bus)) < 0) + return err; + chip->ac97_bus->private_free = snd_cs46xx_mixer_free_ac97_bus; + + if (cs46xx_detect_codec(chip, CS46XX_PRIMARY_CODEC_INDEX) < 0) + return -ENXIO; + chip->nr_ac97_codecs = 1; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + dev_dbg(chip->card->dev, "detecting secondary codec\n"); + /* try detect a secondary codec */ + if (! cs46xx_detect_codec(chip, CS46XX_SECONDARY_CODEC_INDEX)) + chip->nr_ac97_codecs = 2; +#endif /* CONFIG_SND_CS46XX_NEW_DSP */ + + /* add cs4630 mixer controls */ + for (idx = 0; idx < ARRAY_SIZE(snd_cs46xx_controls); idx++) { + struct snd_kcontrol *kctl; + kctl = snd_ctl_new1(&snd_cs46xx_controls[idx], chip); + if (kctl && kctl->id.iface == SNDRV_CTL_ELEM_IFACE_PCM) + kctl->id.device = spdif_device; + if ((err = snd_ctl_add(card, kctl)) < 0) + return err; + } + + /* get EAPD mixer switch (for voyetra hack) */ + memset(&id, 0, sizeof(id)); + id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; + strcpy(id.name, "External Amplifier"); + chip->eapd_switch = snd_ctl_find_id(chip->card, &id); + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + if (chip->nr_ac97_codecs == 1) { + unsigned int id2 = chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]->id & 0xffff; + if ((id2 & 0xfff0) == 0x5920) { /* CS4294 and CS4298 */ + err = snd_ctl_add(card, snd_ctl_new1(&snd_cs46xx_front_dup_ctl, chip)); + if (err < 0) + return err; + snd_ac97_write_cache(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX], + AC97_CSR_ACMODE, 0x200); + } + } + /* do soundcard specific mixer setup */ + if (chip->mixer_init) { + dev_dbg(chip->card->dev, "calling chip->mixer_init(chip);\n"); + chip->mixer_init(chip); + } +#endif + + /* turn on amplifier */ + chip->amplifier_ctrl(chip, 1); + + return 0; +} + +/* + * RawMIDI interface + */ + +static void snd_cs46xx_midi_reset(struct snd_cs46xx *chip) +{ + snd_cs46xx_pokeBA0(chip, BA0_MIDCR, MIDCR_MRST); + udelay(100); + snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); +} + +static int snd_cs46xx_midi_input_open(struct snd_rawmidi_substream *substream) +{ + struct snd_cs46xx *chip = substream->rmidi->private_data; + + chip->active_ctrl(chip, 1); + spin_lock_irq(&chip->reg_lock); + chip->uartm |= CS46XX_MODE_INPUT; + chip->midcr |= MIDCR_RXE; + chip->midi_input = substream; + if (!(chip->uartm & CS46XX_MODE_OUTPUT)) { + snd_cs46xx_midi_reset(chip); + } else { + snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); + } + spin_unlock_irq(&chip->reg_lock); + return 0; +} + +static int snd_cs46xx_midi_input_close(struct snd_rawmidi_substream *substream) +{ + struct snd_cs46xx *chip = substream->rmidi->private_data; + + spin_lock_irq(&chip->reg_lock); + chip->midcr &= ~(MIDCR_RXE | MIDCR_RIE); + chip->midi_input = NULL; + if (!(chip->uartm & CS46XX_MODE_OUTPUT)) { + snd_cs46xx_midi_reset(chip); + } else { + snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); + } + chip->uartm &= ~CS46XX_MODE_INPUT; + spin_unlock_irq(&chip->reg_lock); + chip->active_ctrl(chip, -1); + return 0; +} + +static int snd_cs46xx_midi_output_open(struct snd_rawmidi_substream *substream) +{ + struct snd_cs46xx *chip = substream->rmidi->private_data; + + chip->active_ctrl(chip, 1); + + spin_lock_irq(&chip->reg_lock); + chip->uartm |= CS46XX_MODE_OUTPUT; + chip->midcr |= MIDCR_TXE; + chip->midi_output = substream; + if (!(chip->uartm & CS46XX_MODE_INPUT)) { + snd_cs46xx_midi_reset(chip); + } else { + snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); + } + spin_unlock_irq(&chip->reg_lock); + return 0; +} + +static int snd_cs46xx_midi_output_close(struct snd_rawmidi_substream *substream) +{ + struct snd_cs46xx *chip = substream->rmidi->private_data; + + spin_lock_irq(&chip->reg_lock); + chip->midcr &= ~(MIDCR_TXE | MIDCR_TIE); + chip->midi_output = NULL; + if (!(chip->uartm & CS46XX_MODE_INPUT)) { + snd_cs46xx_midi_reset(chip); + } else { + snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); + } + chip->uartm &= ~CS46XX_MODE_OUTPUT; + spin_unlock_irq(&chip->reg_lock); + chip->active_ctrl(chip, -1); + return 0; +} + +static void snd_cs46xx_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) +{ + unsigned long flags; + struct snd_cs46xx *chip = substream->rmidi->private_data; + + spin_lock_irqsave(&chip->reg_lock, flags); + if (up) { + if ((chip->midcr & MIDCR_RIE) == 0) { + chip->midcr |= MIDCR_RIE; + snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); + } + } else { + if (chip->midcr & MIDCR_RIE) { + chip->midcr &= ~MIDCR_RIE; + snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); + } + } + spin_unlock_irqrestore(&chip->reg_lock, flags); +} + +static void snd_cs46xx_midi_output_trigger(struct snd_rawmidi_substream *substream, int up) +{ + unsigned long flags; + struct snd_cs46xx *chip = substream->rmidi->private_data; + unsigned char byte; + + spin_lock_irqsave(&chip->reg_lock, flags); + if (up) { + if ((chip->midcr & MIDCR_TIE) == 0) { + chip->midcr |= MIDCR_TIE; + /* fill UART FIFO buffer at first, and turn Tx interrupts only if necessary */ + while ((chip->midcr & MIDCR_TIE) && + (snd_cs46xx_peekBA0(chip, BA0_MIDSR) & MIDSR_TBF) == 0) { + if (snd_rawmidi_transmit(substream, &byte, 1) != 1) { + chip->midcr &= ~MIDCR_TIE; + } else { + snd_cs46xx_pokeBA0(chip, BA0_MIDWP, byte); + } + } + snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); + } + } else { + if (chip->midcr & MIDCR_TIE) { + chip->midcr &= ~MIDCR_TIE; + snd_cs46xx_pokeBA0(chip, BA0_MIDCR, chip->midcr); + } + } + spin_unlock_irqrestore(&chip->reg_lock, flags); +} + +static const struct snd_rawmidi_ops snd_cs46xx_midi_output = +{ + .open = snd_cs46xx_midi_output_open, + .close = snd_cs46xx_midi_output_close, + .trigger = snd_cs46xx_midi_output_trigger, +}; + +static const struct snd_rawmidi_ops snd_cs46xx_midi_input = +{ + .open = snd_cs46xx_midi_input_open, + .close = snd_cs46xx_midi_input_close, + .trigger = snd_cs46xx_midi_input_trigger, +}; + +int snd_cs46xx_midi(struct snd_cs46xx *chip, int device) +{ + struct snd_rawmidi *rmidi; + int err; + + if ((err = snd_rawmidi_new(chip->card, "CS46XX", device, 1, 1, &rmidi)) < 0) + return err; + strcpy(rmidi->name, "CS46XX"); + snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_cs46xx_midi_output); + snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, &snd_cs46xx_midi_input); + rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT | SNDRV_RAWMIDI_INFO_INPUT | SNDRV_RAWMIDI_INFO_DUPLEX; + rmidi->private_data = chip; + chip->rmidi = rmidi; + return 0; +} + + +/* + * gameport interface + */ + +#if IS_REACHABLE(CONFIG_GAMEPORT) + +static void snd_cs46xx_gameport_trigger(struct gameport *gameport) +{ + struct snd_cs46xx *chip = gameport_get_port_data(gameport); + + if (snd_BUG_ON(!chip)) + return; + snd_cs46xx_pokeBA0(chip, BA0_JSPT, 0xFF); //outb(gameport->io, 0xFF); +} + +static unsigned char snd_cs46xx_gameport_read(struct gameport *gameport) +{ + struct snd_cs46xx *chip = gameport_get_port_data(gameport); + + if (snd_BUG_ON(!chip)) + return 0; + return snd_cs46xx_peekBA0(chip, BA0_JSPT); //inb(gameport->io); +} + +static int snd_cs46xx_gameport_cooked_read(struct gameport *gameport, int *axes, int *buttons) +{ + struct snd_cs46xx *chip = gameport_get_port_data(gameport); + unsigned js1, js2, jst; + + if (snd_BUG_ON(!chip)) + return 0; + + js1 = snd_cs46xx_peekBA0(chip, BA0_JSC1); + js2 = snd_cs46xx_peekBA0(chip, BA0_JSC2); + jst = snd_cs46xx_peekBA0(chip, BA0_JSPT); + + *buttons = (~jst >> 4) & 0x0F; + + axes[0] = ((js1 & JSC1_Y1V_MASK) >> JSC1_Y1V_SHIFT) & 0xFFFF; + axes[1] = ((js1 & JSC1_X1V_MASK) >> JSC1_X1V_SHIFT) & 0xFFFF; + axes[2] = ((js2 & JSC2_Y2V_MASK) >> JSC2_Y2V_SHIFT) & 0xFFFF; + axes[3] = ((js2 & JSC2_X2V_MASK) >> JSC2_X2V_SHIFT) & 0xFFFF; + + for(jst=0;jst<4;++jst) + if(axes[jst]==0xFFFF) axes[jst] = -1; + return 0; +} + +static int snd_cs46xx_gameport_open(struct gameport *gameport, int mode) +{ + switch (mode) { + case GAMEPORT_MODE_COOKED: + return 0; + case GAMEPORT_MODE_RAW: + return 0; + default: + return -1; + } + return 0; +} + +int snd_cs46xx_gameport(struct snd_cs46xx *chip) +{ + struct gameport *gp; + + chip->gameport = gp = gameport_allocate_port(); + if (!gp) { + dev_err(chip->card->dev, + "cannot allocate memory for gameport\n"); + return -ENOMEM; + } + + gameport_set_name(gp, "CS46xx Gameport"); + gameport_set_phys(gp, "pci%s/gameport0", pci_name(chip->pci)); + gameport_set_dev_parent(gp, &chip->pci->dev); + gameport_set_port_data(gp, chip); + + gp->open = snd_cs46xx_gameport_open; + gp->read = snd_cs46xx_gameport_read; + gp->trigger = snd_cs46xx_gameport_trigger; + gp->cooked_read = snd_cs46xx_gameport_cooked_read; + + snd_cs46xx_pokeBA0(chip, BA0_JSIO, 0xFF); // ? + snd_cs46xx_pokeBA0(chip, BA0_JSCTL, JSCTL_SP_MEDIUM_SLOW); + + gameport_register_port(gp); + + return 0; +} + +static inline void snd_cs46xx_remove_gameport(struct snd_cs46xx *chip) +{ + if (chip->gameport) { + gameport_unregister_port(chip->gameport); + chip->gameport = NULL; + } +} +#else +int snd_cs46xx_gameport(struct snd_cs46xx *chip) { return -ENOSYS; } +static inline void snd_cs46xx_remove_gameport(struct snd_cs46xx *chip) { } +#endif /* CONFIG_GAMEPORT */ + +#ifdef CONFIG_SND_PROC_FS +/* + * proc interface + */ + +static ssize_t snd_cs46xx_io_read(struct snd_info_entry *entry, + void *file_private_data, + struct file *file, char __user *buf, + size_t count, loff_t pos) +{ + struct snd_cs46xx_region *region = entry->private_data; + + if (copy_to_user_fromio(buf, region->remap_addr + pos, count)) + return -EFAULT; + return count; +} + +static struct snd_info_entry_ops snd_cs46xx_proc_io_ops = { + .read = snd_cs46xx_io_read, +}; + +static int snd_cs46xx_proc_init(struct snd_card *card, struct snd_cs46xx *chip) +{ + struct snd_info_entry *entry; + int idx; + + for (idx = 0; idx < 5; idx++) { + struct snd_cs46xx_region *region = &chip->region.idx[idx]; + if (! snd_card_proc_new(card, region->name, &entry)) { + entry->content = SNDRV_INFO_CONTENT_DATA; + entry->private_data = chip; + entry->c.ops = &snd_cs46xx_proc_io_ops; + entry->size = region->size; + entry->mode = S_IFREG | 0400; + } + } +#ifdef CONFIG_SND_CS46XX_NEW_DSP + cs46xx_dsp_proc_init(card, chip); +#endif + return 0; +} + +static int snd_cs46xx_proc_done(struct snd_cs46xx *chip) +{ +#ifdef CONFIG_SND_CS46XX_NEW_DSP + cs46xx_dsp_proc_done(chip); +#endif + return 0; +} +#else /* !CONFIG_SND_PROC_FS */ +#define snd_cs46xx_proc_init(card, chip) +#define snd_cs46xx_proc_done(chip) +#endif + +/* + * stop the h/w + */ +static void snd_cs46xx_hw_stop(struct snd_cs46xx *chip) +{ + unsigned int tmp; + + tmp = snd_cs46xx_peek(chip, BA1_PFIE); + tmp &= ~0x0000f03f; + tmp |= 0x00000010; + snd_cs46xx_poke(chip, BA1_PFIE, tmp); /* playback interrupt disable */ + + tmp = snd_cs46xx_peek(chip, BA1_CIE); + tmp &= ~0x0000003f; + tmp |= 0x00000011; + snd_cs46xx_poke(chip, BA1_CIE, tmp); /* capture interrupt disable */ + + /* + * Stop playback DMA. + */ + tmp = snd_cs46xx_peek(chip, BA1_PCTL); + snd_cs46xx_poke(chip, BA1_PCTL, tmp & 0x0000ffff); + + /* + * Stop capture DMA. + */ + tmp = snd_cs46xx_peek(chip, BA1_CCTL); + snd_cs46xx_poke(chip, BA1_CCTL, tmp & 0xffff0000); + + /* + * Reset the processor. + */ + snd_cs46xx_reset(chip); + + snd_cs46xx_proc_stop(chip); + + /* + * Power down the PLL. + */ + snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, 0); + + /* + * Turn off the Processor by turning off the software clock enable flag in + * the clock control register. + */ + tmp = snd_cs46xx_peekBA0(chip, BA0_CLKCR1) & ~CLKCR1_SWCE; + snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, tmp); +} + + +static int snd_cs46xx_free(struct snd_cs46xx *chip) +{ + int idx; + + if (snd_BUG_ON(!chip)) + return -EINVAL; + + if (chip->active_ctrl) + chip->active_ctrl(chip, 1); + + snd_cs46xx_remove_gameport(chip); + + if (chip->amplifier_ctrl) + chip->amplifier_ctrl(chip, -chip->amplifier); /* force to off */ + + snd_cs46xx_proc_done(chip); + + if (chip->region.idx[0].resource) + snd_cs46xx_hw_stop(chip); + + if (chip->irq >= 0) + free_irq(chip->irq, chip); + + if (chip->active_ctrl) + chip->active_ctrl(chip, -chip->amplifier); + + for (idx = 0; idx < 5; idx++) { + struct snd_cs46xx_region *region = &chip->region.idx[idx]; + + iounmap(region->remap_addr); + release_and_free_resource(region->resource); + } + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + if (chip->dsp_spos_instance) { + cs46xx_dsp_spos_destroy(chip); + chip->dsp_spos_instance = NULL; + } + for (idx = 0; idx < CS46XX_DSP_MODULES; idx++) + free_module_desc(chip->modules[idx]); +#else + vfree(chip->ba1); +#endif + +#ifdef CONFIG_PM_SLEEP + kfree(chip->saved_regs); +#endif + + pci_disable_device(chip->pci); + kfree(chip); + return 0; +} + +static int snd_cs46xx_dev_free(struct snd_device *device) +{ + struct snd_cs46xx *chip = device->device_data; + return snd_cs46xx_free(chip); +} + +/* + * initialize chip + */ +static int snd_cs46xx_chip_init(struct snd_cs46xx *chip) +{ + int timeout; + + /* + * First, blast the clock control register to zero so that the PLL starts + * out in a known state, and blast the master serial port control register + * to zero so that the serial ports also start out in a known state. + */ + snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, 0); + snd_cs46xx_pokeBA0(chip, BA0_SERMC1, 0); + + /* + * If we are in AC97 mode, then we must set the part to a host controlled + * AC-link. Otherwise, we won't be able to bring up the link. + */ +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_cs46xx_pokeBA0(chip, BA0_SERACC, SERACC_HSP | SERACC_CHIP_TYPE_2_0 | + SERACC_TWO_CODECS); /* 2.00 dual codecs */ + /* snd_cs46xx_pokeBA0(chip, BA0_SERACC, SERACC_HSP | SERACC_CHIP_TYPE_2_0); */ /* 2.00 codec */ +#else + snd_cs46xx_pokeBA0(chip, BA0_SERACC, SERACC_HSP | SERACC_CHIP_TYPE_1_03); /* 1.03 codec */ +#endif + + /* + * Drive the ARST# pin low for a minimum of 1uS (as defined in the AC97 + * spec) and then drive it high. This is done for non AC97 modes since + * there might be logic external to the CS461x that uses the ARST# line + * for a reset. + */ + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, 0); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_cs46xx_pokeBA0(chip, BA0_ACCTL2, 0); +#endif + udelay(50); + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_RSTN); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_cs46xx_pokeBA0(chip, BA0_ACCTL2, ACCTL_RSTN); +#endif + + /* + * The first thing we do here is to enable sync generation. As soon + * as we start receiving bit clock, we'll start producing the SYNC + * signal. + */ + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_ESYN | ACCTL_RSTN); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_cs46xx_pokeBA0(chip, BA0_ACCTL2, ACCTL_ESYN | ACCTL_RSTN); +#endif + + /* + * Now wait for a short while to allow the AC97 part to start + * generating bit clock (so we don't try to start the PLL without an + * input clock). + */ + mdelay(10); + + /* + * Set the serial port timing configuration, so that + * the clock control circuit gets its clock from the correct place. + */ + snd_cs46xx_pokeBA0(chip, BA0_SERMC1, SERMC1_PTC_AC97); + + /* + * Write the selected clock control setup to the hardware. Do not turn on + * SWCE yet (if requested), so that the devices clocked by the output of + * PLL are not clocked until the PLL is stable. + */ + snd_cs46xx_pokeBA0(chip, BA0_PLLCC, PLLCC_LPF_1050_2780_KHZ | PLLCC_CDR_73_104_MHZ); + snd_cs46xx_pokeBA0(chip, BA0_PLLM, 0x3a); + snd_cs46xx_pokeBA0(chip, BA0_CLKCR2, CLKCR2_PDIVS_8); + + /* + * Power up the PLL. + */ + snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, CLKCR1_PLLP); + + /* + * Wait until the PLL has stabilized. + */ + msleep(100); + + /* + * Turn on clocking of the core so that we can setup the serial ports. + */ + snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, CLKCR1_PLLP | CLKCR1_SWCE); + + /* + * Enable FIFO Host Bypass + */ + snd_cs46xx_pokeBA0(chip, BA0_SERBCF, SERBCF_HBP); + + /* + * Fill the serial port FIFOs with silence. + */ + snd_cs46xx_clear_serial_FIFOs(chip); + + /* + * Set the serial port FIFO pointer to the first sample in the FIFO. + */ + /* snd_cs46xx_pokeBA0(chip, BA0_SERBSP, 0); */ + + /* + * Write the serial port configuration to the part. The master + * enable bit is not set until all other values have been written. + */ + snd_cs46xx_pokeBA0(chip, BA0_SERC1, SERC1_SO1F_AC97 | SERC1_SO1EN); + snd_cs46xx_pokeBA0(chip, BA0_SERC2, SERC2_SI1F_AC97 | SERC1_SO1EN); + snd_cs46xx_pokeBA0(chip, BA0_SERMC1, SERMC1_PTC_AC97 | SERMC1_MSPE); + + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_cs46xx_pokeBA0(chip, BA0_SERC7, SERC7_ASDI2EN); + snd_cs46xx_pokeBA0(chip, BA0_SERC3, 0); + snd_cs46xx_pokeBA0(chip, BA0_SERC4, 0); + snd_cs46xx_pokeBA0(chip, BA0_SERC5, 0); + snd_cs46xx_pokeBA0(chip, BA0_SERC6, 1); +#endif + + mdelay(5); + + + /* + * Wait for the codec ready signal from the AC97 codec. + */ + timeout = 150; + while (timeout-- > 0) { + /* + * Read the AC97 status register to see if we've seen a CODEC READY + * signal from the AC97 codec. + */ + if (snd_cs46xx_peekBA0(chip, BA0_ACSTS) & ACSTS_CRDY) + goto ok1; + msleep(10); + } + + + dev_err(chip->card->dev, + "create - never read codec ready from AC'97\n"); + dev_err(chip->card->dev, + "it is not probably bug, try to use CS4236 driver\n"); + return -EIO; + ok1: +#ifdef CONFIG_SND_CS46XX_NEW_DSP + { + int count; + for (count = 0; count < 150; count++) { + /* First, we want to wait for a short time. */ + udelay(25); + + if (snd_cs46xx_peekBA0(chip, BA0_ACSTS2) & ACSTS_CRDY) + break; + } + + /* + * Make sure CODEC is READY. + */ + if (!(snd_cs46xx_peekBA0(chip, BA0_ACSTS2) & ACSTS_CRDY)) + dev_dbg(chip->card->dev, + "never read card ready from secondary AC'97\n"); + } +#endif + + /* + * Assert the vaid frame signal so that we can start sending commands + * to the AC97 codec. + */ + snd_cs46xx_pokeBA0(chip, BA0_ACCTL, ACCTL_VFRM | ACCTL_ESYN | ACCTL_RSTN); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_cs46xx_pokeBA0(chip, BA0_ACCTL2, ACCTL_VFRM | ACCTL_ESYN | ACCTL_RSTN); +#endif + + + /* + * Wait until we've sampled input slots 3 and 4 as valid, meaning that + * the codec is pumping ADC data across the AC-link. + */ + timeout = 150; + while (timeout-- > 0) { + /* + * Read the input slot valid register and see if input slots 3 and + * 4 are valid yet. + */ + if ((snd_cs46xx_peekBA0(chip, BA0_ACISV) & (ACISV_ISV3 | ACISV_ISV4)) == (ACISV_ISV3 | ACISV_ISV4)) + goto ok2; + msleep(10); + } + +#ifndef CONFIG_SND_CS46XX_NEW_DSP + dev_err(chip->card->dev, + "create - never read ISV3 & ISV4 from AC'97\n"); + return -EIO; +#else + /* This may happen on a cold boot with a Terratec SiXPack 5.1. + Reloading the driver may help, if there's other soundcards + with the same problem I would like to know. (Benny) */ + + dev_err(chip->card->dev, "never read ISV3 & ISV4 from AC'97\n"); + dev_err(chip->card->dev, + "Try reloading the ALSA driver, if you find something\n"); + dev_err(chip->card->dev, + "broken or not working on your soundcard upon\n"); + dev_err(chip->card->dev, + "this message please report to alsa-devel@alsa-project.org\n"); + + return -EIO; +#endif + ok2: + + /* + * Now, assert valid frame and the slot 3 and 4 valid bits. This will + * commense the transfer of digital audio data to the AC97 codec. + */ + + snd_cs46xx_pokeBA0(chip, BA0_ACOSV, ACOSV_SLV3 | ACOSV_SLV4); + + + /* + * Power down the DAC and ADC. We will power them up (if) when we need + * them. + */ + /* snd_cs46xx_pokeBA0(chip, BA0_AC97_POWERDOWN, 0x300); */ + + /* + * Turn off the Processor by turning off the software clock enable flag in + * the clock control register. + */ + /* tmp = snd_cs46xx_peekBA0(chip, BA0_CLKCR1) & ~CLKCR1_SWCE; */ + /* snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, tmp); */ + + return 0; +} + +/* + * start and load DSP + */ + +static void cs46xx_enable_stream_irqs(struct snd_cs46xx *chip) +{ + unsigned int tmp; + + snd_cs46xx_pokeBA0(chip, BA0_HICR, HICR_IEV | HICR_CHGM); + + tmp = snd_cs46xx_peek(chip, BA1_PFIE); + tmp &= ~0x0000f03f; + snd_cs46xx_poke(chip, BA1_PFIE, tmp); /* playback interrupt enable */ + + tmp = snd_cs46xx_peek(chip, BA1_CIE); + tmp &= ~0x0000003f; + tmp |= 0x00000001; + snd_cs46xx_poke(chip, BA1_CIE, tmp); /* capture interrupt enable */ +} + +int snd_cs46xx_start_dsp(struct snd_cs46xx *chip) +{ + unsigned int tmp; +#ifdef CONFIG_SND_CS46XX_NEW_DSP + int i; +#endif + int err; + + /* + * Reset the processor. + */ + snd_cs46xx_reset(chip); + /* + * Download the image to the processor. + */ +#ifdef CONFIG_SND_CS46XX_NEW_DSP + for (i = 0; i < CS46XX_DSP_MODULES; i++) { + err = load_firmware(chip, &chip->modules[i], module_names[i]); + if (err < 0) { + dev_err(chip->card->dev, "firmware load error [%s]\n", + module_names[i]); + return err; + } + err = cs46xx_dsp_load_module(chip, chip->modules[i]); + if (err < 0) { + dev_err(chip->card->dev, "image download error [%s]\n", + module_names[i]); + return err; + } + } + + if (cs46xx_dsp_scb_and_task_init(chip) < 0) + return -EIO; +#else + err = load_firmware(chip); + if (err < 0) + return err; + + /* old image */ + err = snd_cs46xx_download_image(chip); + if (err < 0) { + dev_err(chip->card->dev, "image download error\n"); + return err; + } + + /* + * Stop playback DMA. + */ + tmp = snd_cs46xx_peek(chip, BA1_PCTL); + chip->play_ctl = tmp & 0xffff0000; + snd_cs46xx_poke(chip, BA1_PCTL, tmp & 0x0000ffff); +#endif + + /* + * Stop capture DMA. + */ + tmp = snd_cs46xx_peek(chip, BA1_CCTL); + chip->capt.ctl = tmp & 0x0000ffff; + snd_cs46xx_poke(chip, BA1_CCTL, tmp & 0xffff0000); + + mdelay(5); + + snd_cs46xx_set_play_sample_rate(chip, 8000); + snd_cs46xx_set_capture_sample_rate(chip, 8000); + + snd_cs46xx_proc_start(chip); + + cs46xx_enable_stream_irqs(chip); + +#ifndef CONFIG_SND_CS46XX_NEW_DSP + /* set the attenuation to 0dB */ + snd_cs46xx_poke(chip, BA1_PVOL, 0x80008000); + snd_cs46xx_poke(chip, BA1_CVOL, 0x80008000); +#endif + + return 0; +} + + +/* + * AMP control - null AMP + */ + +static void amp_none(struct snd_cs46xx *chip, int change) +{ +} + +#ifdef CONFIG_SND_CS46XX_NEW_DSP +static int voyetra_setup_eapd_slot(struct snd_cs46xx *chip) +{ + + u32 idx, valid_slots,tmp,powerdown = 0; + u16 modem_power,pin_config,logic_type; + + dev_dbg(chip->card->dev, "cs46xx_setup_eapd_slot()+\n"); + + /* + * See if the devices are powered down. If so, we must power them up first + * or they will not respond. + */ + tmp = snd_cs46xx_peekBA0(chip, BA0_CLKCR1); + + if (!(tmp & CLKCR1_SWCE)) { + snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, tmp | CLKCR1_SWCE); + powerdown = 1; + } + + /* + * Clear PRA. The Bonzo chip will be used for GPIO not for modem + * stuff. + */ + if(chip->nr_ac97_codecs != 2) { + dev_err(chip->card->dev, + "cs46xx_setup_eapd_slot() - no secondary codec configured\n"); + return -EINVAL; + } + + modem_power = snd_cs46xx_codec_read (chip, + AC97_EXTENDED_MSTATUS, + CS46XX_SECONDARY_CODEC_INDEX); + modem_power &=0xFEFF; + + snd_cs46xx_codec_write(chip, + AC97_EXTENDED_MSTATUS, modem_power, + CS46XX_SECONDARY_CODEC_INDEX); + + /* + * Set GPIO pin's 7 and 8 so that they are configured for output. + */ + pin_config = snd_cs46xx_codec_read (chip, + AC97_GPIO_CFG, + CS46XX_SECONDARY_CODEC_INDEX); + pin_config &=0x27F; + + snd_cs46xx_codec_write(chip, + AC97_GPIO_CFG, pin_config, + CS46XX_SECONDARY_CODEC_INDEX); + + /* + * Set GPIO pin's 7 and 8 so that they are compatible with CMOS logic. + */ + + logic_type = snd_cs46xx_codec_read(chip, AC97_GPIO_POLARITY, + CS46XX_SECONDARY_CODEC_INDEX); + logic_type &=0x27F; + + snd_cs46xx_codec_write (chip, AC97_GPIO_POLARITY, logic_type, + CS46XX_SECONDARY_CODEC_INDEX); + + valid_slots = snd_cs46xx_peekBA0(chip, BA0_ACOSV); + valid_slots |= 0x200; + snd_cs46xx_pokeBA0(chip, BA0_ACOSV, valid_slots); + + if ( cs46xx_wait_for_fifo(chip,1) ) { + dev_dbg(chip->card->dev, "FIFO is busy\n"); + + return -EINVAL; + } + + /* + * Fill slots 12 with the correct value for the GPIO pins. + */ + for(idx = 0x90; idx <= 0x9F; idx++) { + /* + * Initialize the fifo so that bits 7 and 8 are on. + * + * Remember that the GPIO pins in bonzo are shifted by 4 bits to + * the left. 0x1800 corresponds to bits 7 and 8. + */ + snd_cs46xx_pokeBA0(chip, BA0_SERBWP, 0x1800); + + /* + * Wait for command to complete + */ + if ( cs46xx_wait_for_fifo(chip,200) ) { + dev_dbg(chip->card->dev, + "failed waiting for FIFO at addr (%02X)\n", + idx); + + return -EINVAL; + } + + /* + * Write the serial port FIFO index. + */ + snd_cs46xx_pokeBA0(chip, BA0_SERBAD, idx); + + /* + * Tell the serial port to load the new value into the FIFO location. + */ + snd_cs46xx_pokeBA0(chip, BA0_SERBCM, SERBCM_WRC); + } + + /* wait for last command to complete */ + cs46xx_wait_for_fifo(chip,200); + + /* + * Now, if we powered up the devices, then power them back down again. + * This is kinda ugly, but should never happen. + */ + if (powerdown) + snd_cs46xx_pokeBA0(chip, BA0_CLKCR1, tmp); + + return 0; +} +#endif + +/* + * Crystal EAPD mode + */ + +static void amp_voyetra(struct snd_cs46xx *chip, int change) +{ + /* Manage the EAPD bit on the Crystal 4297 + and the Analog AD1885 */ + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + int old = chip->amplifier; +#endif + int oval, val; + + chip->amplifier += change; + oval = snd_cs46xx_codec_read(chip, AC97_POWERDOWN, + CS46XX_PRIMARY_CODEC_INDEX); + val = oval; + if (chip->amplifier) { + /* Turn the EAPD amp on */ + val |= 0x8000; + } else { + /* Turn the EAPD amp off */ + val &= ~0x8000; + } + if (val != oval) { + snd_cs46xx_codec_write(chip, AC97_POWERDOWN, val, + CS46XX_PRIMARY_CODEC_INDEX); + if (chip->eapd_switch) + snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, + &chip->eapd_switch->id); + } + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + if (chip->amplifier && !old) { + voyetra_setup_eapd_slot(chip); + } +#endif +} + +static void hercules_init(struct snd_cs46xx *chip) +{ + /* default: AMP off, and SPDIF input optical */ + snd_cs46xx_pokeBA0(chip, BA0_EGPIODR, EGPIODR_GPOE0); + snd_cs46xx_pokeBA0(chip, BA0_EGPIOPTR, EGPIODR_GPOE0); +} + + +/* + * Game Theatre XP card - EGPIO[2] is used to enable the external amp. + */ +static void amp_hercules(struct snd_cs46xx *chip, int change) +{ + int old = chip->amplifier; + int val1 = snd_cs46xx_peekBA0(chip, BA0_EGPIODR); + int val2 = snd_cs46xx_peekBA0(chip, BA0_EGPIOPTR); + + chip->amplifier += change; + if (chip->amplifier && !old) { + dev_dbg(chip->card->dev, "Hercules amplifier ON\n"); + + snd_cs46xx_pokeBA0(chip, BA0_EGPIODR, + EGPIODR_GPOE2 | val1); /* enable EGPIO2 output */ + snd_cs46xx_pokeBA0(chip, BA0_EGPIOPTR, + EGPIOPTR_GPPT2 | val2); /* open-drain on output */ + } else if (old && !chip->amplifier) { + dev_dbg(chip->card->dev, "Hercules amplifier OFF\n"); + snd_cs46xx_pokeBA0(chip, BA0_EGPIODR, val1 & ~EGPIODR_GPOE2); /* disable */ + snd_cs46xx_pokeBA0(chip, BA0_EGPIOPTR, val2 & ~EGPIOPTR_GPPT2); /* disable */ + } +} + +static void voyetra_mixer_init (struct snd_cs46xx *chip) +{ + dev_dbg(chip->card->dev, "initializing Voyetra mixer\n"); + + /* Enable SPDIF out */ + snd_cs46xx_pokeBA0(chip, BA0_EGPIODR, EGPIODR_GPOE0); + snd_cs46xx_pokeBA0(chip, BA0_EGPIOPTR, EGPIODR_GPOE0); +} + +static void hercules_mixer_init (struct snd_cs46xx *chip) +{ +#ifdef CONFIG_SND_CS46XX_NEW_DSP + unsigned int idx; + int err; + struct snd_card *card = chip->card; +#endif + + /* set EGPIO to default */ + hercules_init(chip); + + dev_dbg(chip->card->dev, "initializing Hercules mixer\n"); + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + if (chip->in_suspend) + return; + + for (idx = 0 ; idx < ARRAY_SIZE(snd_hercules_controls); idx++) { + struct snd_kcontrol *kctl; + + kctl = snd_ctl_new1(&snd_hercules_controls[idx], chip); + if ((err = snd_ctl_add(card, kctl)) < 0) { + dev_err(card->dev, + "failed to initialize Hercules mixer (%d)\n", + err); + break; + } + } +#endif +} + + +#if 0 +/* + * Untested + */ + +static void amp_voyetra_4294(struct snd_cs46xx *chip, int change) +{ + chip->amplifier += change; + + if (chip->amplifier) { + /* Switch the GPIO pins 7 and 8 to open drain */ + snd_cs46xx_codec_write(chip, 0x4C, + snd_cs46xx_codec_read(chip, 0x4C) & 0xFE7F); + snd_cs46xx_codec_write(chip, 0x4E, + snd_cs46xx_codec_read(chip, 0x4E) | 0x0180); + /* Now wake the AMP (this might be backwards) */ + snd_cs46xx_codec_write(chip, 0x54, + snd_cs46xx_codec_read(chip, 0x54) & ~0x0180); + } else { + snd_cs46xx_codec_write(chip, 0x54, + snd_cs46xx_codec_read(chip, 0x54) | 0x0180); + } +} +#endif + + +/* + * Handle the CLKRUN on a thinkpad. We must disable CLKRUN support + * whenever we need to beat on the chip. + * + * The original idea and code for this hack comes from David Kaiser at + * Linuxcare. Perhaps one day Crystal will document their chips well + * enough to make them useful. + */ + +static void clkrun_hack(struct snd_cs46xx *chip, int change) +{ + u16 control, nval; + + if (!chip->acpi_port) + return; + + chip->amplifier += change; + + /* Read ACPI port */ + nval = control = inw(chip->acpi_port + 0x10); + + /* Flip CLKRUN off while running */ + if (! chip->amplifier) + nval |= 0x2000; + else + nval &= ~0x2000; + if (nval != control) + outw(nval, chip->acpi_port + 0x10); +} + + +/* + * detect intel piix4 + */ +static void clkrun_init(struct snd_cs46xx *chip) +{ + struct pci_dev *pdev; + u8 pp; + + chip->acpi_port = 0; + + pdev = pci_get_device(PCI_VENDOR_ID_INTEL, + PCI_DEVICE_ID_INTEL_82371AB_3, NULL); + if (pdev == NULL) + return; /* Not a thinkpad thats for sure */ + + /* Find the control port */ + pci_read_config_byte(pdev, 0x41, &pp); + chip->acpi_port = pp << 8; + pci_dev_put(pdev); +} + + +/* + * Card subid table + */ + +struct cs_card_type +{ + u16 vendor; + u16 id; + char *name; + void (*init)(struct snd_cs46xx *); + void (*amp)(struct snd_cs46xx *, int); + void (*active)(struct snd_cs46xx *, int); + void (*mixer_init)(struct snd_cs46xx *); +}; + +static struct cs_card_type cards[] = { + { + .vendor = 0x1489, + .id = 0x7001, + .name = "Genius Soundmaker 128 value", + /* nothing special */ + }, + { + .vendor = 0x5053, + .id = 0x3357, + .name = "Voyetra", + .amp = amp_voyetra, + .mixer_init = voyetra_mixer_init, + }, + { + .vendor = 0x1071, + .id = 0x6003, + .name = "Mitac MI6020/21", + .amp = amp_voyetra, + }, + /* Hercules Game Theatre XP */ + { + .vendor = 0x14af, /* Guillemot Corporation */ + .id = 0x0050, + .name = "Hercules Game Theatre XP", + .amp = amp_hercules, + .mixer_init = hercules_mixer_init, + }, + { + .vendor = 0x1681, + .id = 0x0050, + .name = "Hercules Game Theatre XP", + .amp = amp_hercules, + .mixer_init = hercules_mixer_init, + }, + { + .vendor = 0x1681, + .id = 0x0051, + .name = "Hercules Game Theatre XP", + .amp = amp_hercules, + .mixer_init = hercules_mixer_init, + + }, + { + .vendor = 0x1681, + .id = 0x0052, + .name = "Hercules Game Theatre XP", + .amp = amp_hercules, + .mixer_init = hercules_mixer_init, + }, + { + .vendor = 0x1681, + .id = 0x0053, + .name = "Hercules Game Theatre XP", + .amp = amp_hercules, + .mixer_init = hercules_mixer_init, + }, + { + .vendor = 0x1681, + .id = 0x0054, + .name = "Hercules Game Theatre XP", + .amp = amp_hercules, + .mixer_init = hercules_mixer_init, + }, + /* Herculess Fortissimo */ + { + .vendor = 0x1681, + .id = 0xa010, + .name = "Hercules Gamesurround Fortissimo II", + }, + { + .vendor = 0x1681, + .id = 0xa011, + .name = "Hercules Gamesurround Fortissimo III 7.1", + }, + /* Teratec */ + { + .vendor = 0x153b, + .id = 0x112e, + .name = "Terratec DMX XFire 1024", + }, + { + .vendor = 0x153b, + .id = 0x1136, + .name = "Terratec SiXPack 5.1", + }, + /* Not sure if the 570 needs the clkrun hack */ + { + .vendor = PCI_VENDOR_ID_IBM, + .id = 0x0132, + .name = "Thinkpad 570", + .init = clkrun_init, + .active = clkrun_hack, + }, + { + .vendor = PCI_VENDOR_ID_IBM, + .id = 0x0153, + .name = "Thinkpad 600X/A20/T20", + .init = clkrun_init, + .active = clkrun_hack, + }, + { + .vendor = PCI_VENDOR_ID_IBM, + .id = 0x1010, + .name = "Thinkpad 600E (unsupported)", + }, + {} /* terminator */ +}; + + +/* + * APM support + */ +#ifdef CONFIG_PM_SLEEP +static unsigned int saved_regs[] = { + BA0_ACOSV, + /*BA0_ASER_FADDR,*/ + BA0_ASER_MASTER, + BA1_PVOL, + BA1_CVOL, +}; + +static int snd_cs46xx_suspend(struct device *dev) +{ + struct snd_card *card = dev_get_drvdata(dev); + struct snd_cs46xx *chip = card->private_data; + int i, amp_saved; + + snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); + chip->in_suspend = 1; + snd_pcm_suspend_all(chip->pcm); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + snd_pcm_suspend_all(chip->pcm_rear); + snd_pcm_suspend_all(chip->pcm_center_lfe); + snd_pcm_suspend_all(chip->pcm_iec958); +#endif + // chip->ac97_powerdown = snd_cs46xx_codec_read(chip, AC97_POWER_CONTROL); + // chip->ac97_general_purpose = snd_cs46xx_codec_read(chip, BA0_AC97_GENERAL_PURPOSE); + + snd_ac97_suspend(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]); + snd_ac97_suspend(chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]); + + /* save some registers */ + for (i = 0; i < ARRAY_SIZE(saved_regs); i++) + chip->saved_regs[i] = snd_cs46xx_peekBA0(chip, saved_regs[i]); + + amp_saved = chip->amplifier; + /* turn off amp */ + chip->amplifier_ctrl(chip, -chip->amplifier); + snd_cs46xx_hw_stop(chip); + /* disable CLKRUN */ + chip->active_ctrl(chip, -chip->amplifier); + chip->amplifier = amp_saved; /* restore the status */ + return 0; +} + +static int snd_cs46xx_resume(struct device *dev) +{ + struct snd_card *card = dev_get_drvdata(dev); + struct snd_cs46xx *chip = card->private_data; + int amp_saved; +#ifdef CONFIG_SND_CS46XX_NEW_DSP + int i; +#endif + unsigned int tmp; + + amp_saved = chip->amplifier; + chip->amplifier = 0; + chip->active_ctrl(chip, 1); /* force to on */ + + snd_cs46xx_chip_init(chip); + + snd_cs46xx_reset(chip); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + cs46xx_dsp_resume(chip); + /* restore some registers */ + for (i = 0; i < ARRAY_SIZE(saved_regs); i++) + snd_cs46xx_pokeBA0(chip, saved_regs[i], chip->saved_regs[i]); +#else + snd_cs46xx_download_image(chip); +#endif + +#if 0 + snd_cs46xx_codec_write(chip, BA0_AC97_GENERAL_PURPOSE, + chip->ac97_general_purpose); + snd_cs46xx_codec_write(chip, AC97_POWER_CONTROL, + chip->ac97_powerdown); + mdelay(10); + snd_cs46xx_codec_write(chip, BA0_AC97_POWERDOWN, + chip->ac97_powerdown); + mdelay(5); +#endif + + snd_ac97_resume(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]); + snd_ac97_resume(chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]); + + /* + * Stop capture DMA. + */ + tmp = snd_cs46xx_peek(chip, BA1_CCTL); + chip->capt.ctl = tmp & 0x0000ffff; + snd_cs46xx_poke(chip, BA1_CCTL, tmp & 0xffff0000); + + mdelay(5); + + /* reset playback/capture */ + snd_cs46xx_set_play_sample_rate(chip, 8000); + snd_cs46xx_set_capture_sample_rate(chip, 8000); + snd_cs46xx_proc_start(chip); + + cs46xx_enable_stream_irqs(chip); + + if (amp_saved) + chip->amplifier_ctrl(chip, 1); /* turn amp on */ + else + chip->active_ctrl(chip, -1); /* disable CLKRUN */ + chip->amplifier = amp_saved; + chip->in_suspend = 0; + snd_power_change_state(card, SNDRV_CTL_POWER_D0); + return 0; +} + +SIMPLE_DEV_PM_OPS(snd_cs46xx_pm, snd_cs46xx_suspend, snd_cs46xx_resume); +#endif /* CONFIG_PM_SLEEP */ + + +/* + */ + +int snd_cs46xx_create(struct snd_card *card, + struct pci_dev *pci, + int external_amp, int thinkpad, + struct snd_cs46xx **rchip) +{ + struct snd_cs46xx *chip; + int err, idx; + struct snd_cs46xx_region *region; + struct cs_card_type *cp; + u16 ss_card, ss_vendor; + static struct snd_device_ops ops = { + .dev_free = snd_cs46xx_dev_free, + }; + + *rchip = NULL; + + /* enable PCI device */ + if ((err = pci_enable_device(pci)) < 0) + return err; + + chip = kzalloc(sizeof(*chip), GFP_KERNEL); + if (chip == NULL) { + pci_disable_device(pci); + return -ENOMEM; + } + spin_lock_init(&chip->reg_lock); +#ifdef CONFIG_SND_CS46XX_NEW_DSP + mutex_init(&chip->spos_mutex); +#endif + chip->card = card; + chip->pci = pci; + chip->irq = -1; + chip->ba0_addr = pci_resource_start(pci, 0); + chip->ba1_addr = pci_resource_start(pci, 1); + if (chip->ba0_addr == 0 || chip->ba0_addr == (unsigned long)~0 || + chip->ba1_addr == 0 || chip->ba1_addr == (unsigned long)~0) { + dev_err(chip->card->dev, + "wrong address(es) - ba0 = 0x%lx, ba1 = 0x%lx\n", + chip->ba0_addr, chip->ba1_addr); + snd_cs46xx_free(chip); + return -ENOMEM; + } + + region = &chip->region.name.ba0; + strcpy(region->name, "CS46xx_BA0"); + region->base = chip->ba0_addr; + region->size = CS46XX_BA0_SIZE; + + region = &chip->region.name.data0; + strcpy(region->name, "CS46xx_BA1_data0"); + region->base = chip->ba1_addr + BA1_SP_DMEM0; + region->size = CS46XX_BA1_DATA0_SIZE; + + region = &chip->region.name.data1; + strcpy(region->name, "CS46xx_BA1_data1"); + region->base = chip->ba1_addr + BA1_SP_DMEM1; + region->size = CS46XX_BA1_DATA1_SIZE; + + region = &chip->region.name.pmem; + strcpy(region->name, "CS46xx_BA1_pmem"); + region->base = chip->ba1_addr + BA1_SP_PMEM; + region->size = CS46XX_BA1_PRG_SIZE; + + region = &chip->region.name.reg; + strcpy(region->name, "CS46xx_BA1_reg"); + region->base = chip->ba1_addr + BA1_SP_REG; + region->size = CS46XX_BA1_REG_SIZE; + + /* set up amp and clkrun hack */ + pci_read_config_word(pci, PCI_SUBSYSTEM_VENDOR_ID, &ss_vendor); + pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &ss_card); + + for (cp = &cards[0]; cp->name; cp++) { + if (cp->vendor == ss_vendor && cp->id == ss_card) { + dev_dbg(chip->card->dev, "hack for %s enabled\n", + cp->name); + + chip->amplifier_ctrl = cp->amp; + chip->active_ctrl = cp->active; + chip->mixer_init = cp->mixer_init; + + if (cp->init) + cp->init(chip); + break; + } + } + + if (external_amp) { + dev_info(chip->card->dev, + "Crystal EAPD support forced on.\n"); + chip->amplifier_ctrl = amp_voyetra; + } + + if (thinkpad) { + dev_info(chip->card->dev, + "Activating CLKRUN hack for Thinkpad.\n"); + chip->active_ctrl = clkrun_hack; + clkrun_init(chip); + } + + if (chip->amplifier_ctrl == NULL) + chip->amplifier_ctrl = amp_none; + if (chip->active_ctrl == NULL) + chip->active_ctrl = amp_none; + + chip->active_ctrl(chip, 1); /* enable CLKRUN */ + + pci_set_master(pci); + + for (idx = 0; idx < 5; idx++) { + region = &chip->region.idx[idx]; + if ((region->resource = request_mem_region(region->base, region->size, + region->name)) == NULL) { + dev_err(chip->card->dev, + "unable to request memory region 0x%lx-0x%lx\n", + region->base, region->base + region->size - 1); + snd_cs46xx_free(chip); + return -EBUSY; + } + region->remap_addr = ioremap_nocache(region->base, region->size); + if (region->remap_addr == NULL) { + dev_err(chip->card->dev, + "%s ioremap problem\n", region->name); + snd_cs46xx_free(chip); + return -ENOMEM; + } + } + + if (request_irq(pci->irq, snd_cs46xx_interrupt, IRQF_SHARED, + KBUILD_MODNAME, chip)) { + dev_err(chip->card->dev, "unable to grab IRQ %d\n", pci->irq); + snd_cs46xx_free(chip); + return -EBUSY; + } + chip->irq = pci->irq; + +#ifdef CONFIG_SND_CS46XX_NEW_DSP + chip->dsp_spos_instance = cs46xx_dsp_spos_create(chip); + if (chip->dsp_spos_instance == NULL) { + snd_cs46xx_free(chip); + return -ENOMEM; + } +#endif + + err = snd_cs46xx_chip_init(chip); + if (err < 0) { + snd_cs46xx_free(chip); + return err; + } + + if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { + snd_cs46xx_free(chip); + return err; + } + + snd_cs46xx_proc_init(card, chip); + +#ifdef CONFIG_PM_SLEEP + chip->saved_regs = kmalloc_array(ARRAY_SIZE(saved_regs), + sizeof(*chip->saved_regs), + GFP_KERNEL); + if (!chip->saved_regs) { + snd_cs46xx_free(chip); + return -ENOMEM; + } +#endif + + chip->active_ctrl(chip, -1); /* disable CLKRUN */ + + *rchip = chip; + return 0; +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/cs46xx/cs46xx_lib.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/cs46xx/cs46xx_lib.c.yml new file mode 100644 index 00000000000..c397acb7a6b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/cs46xx/cs46xx_lib.c.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) by Jaroslav Kysela Abramo Bagnara + Cirrus Logic, Inc. Routines +holders: + - Jaroslav Kysela Abramo Bagnara Cirrus Logic, Inc. Routines diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emu10k1_main.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emu10k1_main.c new file mode 100644 index 00000000000..43ab25a1d86 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emu10k1_main.c @@ -0,0 +1,2178 @@ +/* + * Copyright (c) by Jaroslav Kysela + * Creative Labs, Inc. + * Routines for control of EMU10K1 chips + * + * Copyright (c) by James Courtier-Dutton + * Added support for Audigy 2 Value. + * Added EMU 1010 support. + * General bug fixes and enhancements. + * + * + * BUGS: + * -- + * + * TODO: + * -- + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include +#include +#include +#include "p16v.h" +#include "tina2.h" +#include "p17v.h" + + +#define HANA_FILENAME "emu/hana.fw" +#define DOCK_FILENAME "emu/audio_dock.fw" +#define EMU1010B_FILENAME "emu/emu1010b.fw" +#define MICRO_DOCK_FILENAME "emu/micro_dock.fw" +#define EMU0404_FILENAME "emu/emu0404.fw" +#define EMU1010_NOTEBOOK_FILENAME "emu/emu1010_notebook.fw" + +MODULE_FIRMWARE(HANA_FILENAME); +MODULE_FIRMWARE(DOCK_FILENAME); +MODULE_FIRMWARE(EMU1010B_FILENAME); +MODULE_FIRMWARE(MICRO_DOCK_FILENAME); +MODULE_FIRMWARE(EMU0404_FILENAME); +MODULE_FIRMWARE(EMU1010_NOTEBOOK_FILENAME); + + +/************************************************************************* + * EMU10K1 init / done + *************************************************************************/ + +void snd_emu10k1_voice_init(struct snd_emu10k1 *emu, int ch) +{ + snd_emu10k1_ptr_write(emu, DCYSUSV, ch, 0); + snd_emu10k1_ptr_write(emu, IP, ch, 0); + snd_emu10k1_ptr_write(emu, VTFT, ch, 0xffff); + snd_emu10k1_ptr_write(emu, CVCF, ch, 0xffff); + snd_emu10k1_ptr_write(emu, PTRX, ch, 0); + snd_emu10k1_ptr_write(emu, CPF, ch, 0); + snd_emu10k1_ptr_write(emu, CCR, ch, 0); + + snd_emu10k1_ptr_write(emu, PSST, ch, 0); + snd_emu10k1_ptr_write(emu, DSL, ch, 0x10); + snd_emu10k1_ptr_write(emu, CCCA, ch, 0); + snd_emu10k1_ptr_write(emu, Z1, ch, 0); + snd_emu10k1_ptr_write(emu, Z2, ch, 0); + snd_emu10k1_ptr_write(emu, FXRT, ch, 0x32100000); + + snd_emu10k1_ptr_write(emu, ATKHLDM, ch, 0); + snd_emu10k1_ptr_write(emu, DCYSUSM, ch, 0); + snd_emu10k1_ptr_write(emu, IFATN, ch, 0xffff); + snd_emu10k1_ptr_write(emu, PEFE, ch, 0); + snd_emu10k1_ptr_write(emu, FMMOD, ch, 0); + snd_emu10k1_ptr_write(emu, TREMFRQ, ch, 24); /* 1 Hz */ + snd_emu10k1_ptr_write(emu, FM2FRQ2, ch, 24); /* 1 Hz */ + snd_emu10k1_ptr_write(emu, TEMPENV, ch, 0); + + /*** these are last so OFF prevents writing ***/ + snd_emu10k1_ptr_write(emu, LFOVAL2, ch, 0); + snd_emu10k1_ptr_write(emu, LFOVAL1, ch, 0); + snd_emu10k1_ptr_write(emu, ATKHLDV, ch, 0); + snd_emu10k1_ptr_write(emu, ENVVOL, ch, 0); + snd_emu10k1_ptr_write(emu, ENVVAL, ch, 0); + + /* Audigy extra stuffs */ + if (emu->audigy) { + snd_emu10k1_ptr_write(emu, 0x4c, ch, 0); /* ?? */ + snd_emu10k1_ptr_write(emu, 0x4d, ch, 0); /* ?? */ + snd_emu10k1_ptr_write(emu, 0x4e, ch, 0); /* ?? */ + snd_emu10k1_ptr_write(emu, 0x4f, ch, 0); /* ?? */ + snd_emu10k1_ptr_write(emu, A_FXRT1, ch, 0x03020100); + snd_emu10k1_ptr_write(emu, A_FXRT2, ch, 0x3f3f3f3f); + snd_emu10k1_ptr_write(emu, A_SENDAMOUNTS, ch, 0); + } +} + +static unsigned int spi_dac_init[] = { + 0x00ff, + 0x02ff, + 0x0400, + 0x0520, + 0x0600, + 0x08ff, + 0x0aff, + 0x0cff, + 0x0eff, + 0x10ff, + 0x1200, + 0x1400, + 0x1480, + 0x1800, + 0x1aff, + 0x1cff, + 0x1e00, + 0x0530, + 0x0602, + 0x0622, + 0x1400, +}; + +static unsigned int i2c_adc_init[][2] = { + { 0x17, 0x00 }, /* Reset */ + { 0x07, 0x00 }, /* Timeout */ + { 0x0b, 0x22 }, /* Interface control */ + { 0x0c, 0x22 }, /* Master mode control */ + { 0x0d, 0x08 }, /* Powerdown control */ + { 0x0e, 0xcf }, /* Attenuation Left 0x01 = -103dB, 0xff = 24dB */ + { 0x0f, 0xcf }, /* Attenuation Right 0.5dB steps */ + { 0x10, 0x7b }, /* ALC Control 1 */ + { 0x11, 0x00 }, /* ALC Control 2 */ + { 0x12, 0x32 }, /* ALC Control 3 */ + { 0x13, 0x00 }, /* Noise gate control */ + { 0x14, 0xa6 }, /* Limiter control */ + { 0x15, ADC_MUX_2 }, /* ADC Mixer control. Mic for A2ZS Notebook */ +}; + +static int snd_emu10k1_init(struct snd_emu10k1 *emu, int enable_ir, int resume) +{ + unsigned int silent_page; + int ch; + u32 tmp; + + /* disable audio and lock cache */ + outl(HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | + HCFG_MUTEBUTTONENABLE, emu->port + HCFG); + + /* reset recording buffers */ + snd_emu10k1_ptr_write(emu, MICBS, 0, ADCBS_BUFSIZE_NONE); + snd_emu10k1_ptr_write(emu, MICBA, 0, 0); + snd_emu10k1_ptr_write(emu, FXBS, 0, ADCBS_BUFSIZE_NONE); + snd_emu10k1_ptr_write(emu, FXBA, 0, 0); + snd_emu10k1_ptr_write(emu, ADCBS, 0, ADCBS_BUFSIZE_NONE); + snd_emu10k1_ptr_write(emu, ADCBA, 0, 0); + + /* disable channel interrupt */ + outl(0, emu->port + INTE); + snd_emu10k1_ptr_write(emu, CLIEL, 0, 0); + snd_emu10k1_ptr_write(emu, CLIEH, 0, 0); + snd_emu10k1_ptr_write(emu, SOLEL, 0, 0); + snd_emu10k1_ptr_write(emu, SOLEH, 0, 0); + + if (emu->audigy) { + /* set SPDIF bypass mode */ + snd_emu10k1_ptr_write(emu, SPBYPASS, 0, SPBYPASS_FORMAT); + /* enable rear left + rear right AC97 slots */ + snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_REAR_RIGHT | + AC97SLOT_REAR_LEFT); + } + + /* init envelope engine */ + for (ch = 0; ch < NUM_G; ch++) + snd_emu10k1_voice_init(emu, ch); + + snd_emu10k1_ptr_write(emu, SPCS0, 0, emu->spdif_bits[0]); + snd_emu10k1_ptr_write(emu, SPCS1, 0, emu->spdif_bits[1]); + snd_emu10k1_ptr_write(emu, SPCS2, 0, emu->spdif_bits[2]); + + if (emu->card_capabilities->ca0151_chip) { /* audigy2 */ + /* Hacks for Alice3 to work independent of haP16V driver */ + /* Setup SRCMulti_I2S SamplingRate */ + tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, 0); + tmp &= 0xfffff1ff; + tmp |= (0x2<<9); + snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, 0, tmp); + + /* Setup SRCSel (Enable Spdif,I2S SRCMulti) */ + snd_emu10k1_ptr20_write(emu, SRCSel, 0, 0x14); + /* Setup SRCMulti Input Audio Enable */ + /* Use 0xFFFFFFFF to enable P16V sounds. */ + snd_emu10k1_ptr20_write(emu, SRCMULTI_ENABLE, 0, 0xFFFFFFFF); + + /* Enabled Phased (8-channel) P16V playback */ + outl(0x0201, emu->port + HCFG2); + /* Set playback routing. */ + snd_emu10k1_ptr20_write(emu, CAPTURE_P16V_SOURCE, 0, 0x78e4); + } + if (emu->card_capabilities->ca0108_chip) { /* audigy2 Value */ + /* Hacks for Alice3 to work independent of haP16V driver */ + dev_info(emu->card->dev, "Audigy2 value: Special config.\n"); + /* Setup SRCMulti_I2S SamplingRate */ + tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, 0); + tmp &= 0xfffff1ff; + tmp |= (0x2<<9); + snd_emu10k1_ptr_write(emu, A_SPDIF_SAMPLERATE, 0, tmp); + + /* Setup SRCSel (Enable Spdif,I2S SRCMulti) */ + outl(0x600000, emu->port + 0x20); + outl(0x14, emu->port + 0x24); + + /* Setup SRCMulti Input Audio Enable */ + outl(0x7b0000, emu->port + 0x20); + outl(0xFF000000, emu->port + 0x24); + + /* Setup SPDIF Out Audio Enable */ + /* The Audigy 2 Value has a separate SPDIF out, + * so no need for a mixer switch + */ + outl(0x7a0000, emu->port + 0x20); + outl(0xFF000000, emu->port + 0x24); + tmp = inl(emu->port + A_IOCFG) & ~0x8; /* Clear bit 3 */ + outl(tmp, emu->port + A_IOCFG); + } + if (emu->card_capabilities->spi_dac) { /* Audigy 2 ZS Notebook with DAC Wolfson WM8768/WM8568 */ + int size, n; + + size = ARRAY_SIZE(spi_dac_init); + for (n = 0; n < size; n++) + snd_emu10k1_spi_write(emu, spi_dac_init[n]); + + snd_emu10k1_ptr20_write(emu, 0x60, 0, 0x10); + /* Enable GPIOs + * GPIO0: Unknown + * GPIO1: Speakers-enabled. + * GPIO2: Unknown + * GPIO3: Unknown + * GPIO4: IEC958 Output on. + * GPIO5: Unknown + * GPIO6: Unknown + * GPIO7: Unknown + */ + outl(0x76, emu->port + A_IOCFG); /* Windows uses 0x3f76 */ + } + if (emu->card_capabilities->i2c_adc) { /* Audigy 2 ZS Notebook with ADC Wolfson WM8775 */ + int size, n; + + snd_emu10k1_ptr20_write(emu, P17V_I2S_SRC_SEL, 0, 0x2020205f); + tmp = inl(emu->port + A_IOCFG); + outl(tmp | 0x4, emu->port + A_IOCFG); /* Set bit 2 for mic input */ + tmp = inl(emu->port + A_IOCFG); + size = ARRAY_SIZE(i2c_adc_init); + for (n = 0; n < size; n++) + snd_emu10k1_i2c_write(emu, i2c_adc_init[n][0], i2c_adc_init[n][1]); + for (n = 0; n < 4; n++) { + emu->i2c_capture_volume[n][0] = 0xcf; + emu->i2c_capture_volume[n][1] = 0xcf; + } + } + + + snd_emu10k1_ptr_write(emu, PTB, 0, emu->ptb_pages.addr); + snd_emu10k1_ptr_write(emu, TCB, 0, 0); /* taken from original driver */ + snd_emu10k1_ptr_write(emu, TCBS, 0, 4); /* taken from original driver */ + + silent_page = (emu->silent_page.addr << emu->address_mode) | (emu->address_mode ? MAP_PTI_MASK1 : MAP_PTI_MASK0); + for (ch = 0; ch < NUM_G; ch++) { + snd_emu10k1_ptr_write(emu, MAPA, ch, silent_page); + snd_emu10k1_ptr_write(emu, MAPB, ch, silent_page); + } + + if (emu->card_capabilities->emu_model) { + outl(HCFG_AUTOMUTE_ASYNC | + HCFG_EMU32_SLAVE | + HCFG_AUDIOENABLE, emu->port + HCFG); + /* + * Hokay, setup HCFG + * Mute Disable Audio = 0 + * Lock Tank Memory = 1 + * Lock Sound Memory = 0 + * Auto Mute = 1 + */ + } else if (emu->audigy) { + if (emu->revision == 4) /* audigy2 */ + outl(HCFG_AUDIOENABLE | + HCFG_AC3ENABLE_CDSPDIF | + HCFG_AC3ENABLE_GPSPDIF | + HCFG_AUTOMUTE | HCFG_JOYENABLE, emu->port + HCFG); + else + outl(HCFG_AUTOMUTE | HCFG_JOYENABLE, emu->port + HCFG); + /* FIXME: Remove all these emu->model and replace it with a card recognition parameter, + * e.g. card_capabilities->joystick */ + } else if (emu->model == 0x20 || + emu->model == 0xc400 || + (emu->model == 0x21 && emu->revision < 6)) + outl(HCFG_LOCKTANKCACHE_MASK | HCFG_AUTOMUTE, emu->port + HCFG); + else + /* With on-chip joystick */ + outl(HCFG_LOCKTANKCACHE_MASK | HCFG_AUTOMUTE | HCFG_JOYENABLE, emu->port + HCFG); + + if (enable_ir) { /* enable IR for SB Live */ + if (emu->card_capabilities->emu_model) { + ; /* Disable all access to A_IOCFG for the emu1010 */ + } else if (emu->card_capabilities->i2c_adc) { + ; /* Disable A_IOCFG for Audigy 2 ZS Notebook */ + } else if (emu->audigy) { + unsigned int reg = inl(emu->port + A_IOCFG); + outl(reg | A_IOCFG_GPOUT2, emu->port + A_IOCFG); + udelay(500); + outl(reg | A_IOCFG_GPOUT1 | A_IOCFG_GPOUT2, emu->port + A_IOCFG); + udelay(100); + outl(reg, emu->port + A_IOCFG); + } else { + unsigned int reg = inl(emu->port + HCFG); + outl(reg | HCFG_GPOUT2, emu->port + HCFG); + udelay(500); + outl(reg | HCFG_GPOUT1 | HCFG_GPOUT2, emu->port + HCFG); + udelay(100); + outl(reg, emu->port + HCFG); + } + } + + if (emu->card_capabilities->emu_model) { + ; /* Disable all access to A_IOCFG for the emu1010 */ + } else if (emu->card_capabilities->i2c_adc) { + ; /* Disable A_IOCFG for Audigy 2 ZS Notebook */ + } else if (emu->audigy) { /* enable analog output */ + unsigned int reg = inl(emu->port + A_IOCFG); + outl(reg | A_IOCFG_GPOUT0, emu->port + A_IOCFG); + } + + if (emu->address_mode == 0) { + /* use 16M in 4G */ + outl(inl(emu->port + HCFG) | HCFG_EXPANDED_MEM, emu->port + HCFG); + } + + return 0; +} + +static void snd_emu10k1_audio_enable(struct snd_emu10k1 *emu) +{ + /* + * Enable the audio bit + */ + outl(inl(emu->port + HCFG) | HCFG_AUDIOENABLE, emu->port + HCFG); + + /* Enable analog/digital outs on audigy */ + if (emu->card_capabilities->emu_model) { + ; /* Disable all access to A_IOCFG for the emu1010 */ + } else if (emu->card_capabilities->i2c_adc) { + ; /* Disable A_IOCFG for Audigy 2 ZS Notebook */ + } else if (emu->audigy) { + outl(inl(emu->port + A_IOCFG) & ~0x44, emu->port + A_IOCFG); + + if (emu->card_capabilities->ca0151_chip) { /* audigy2 */ + /* Unmute Analog now. Set GPO6 to 1 for Apollo. + * This has to be done after init ALice3 I2SOut beyond 48KHz. + * So, sequence is important. */ + outl(inl(emu->port + A_IOCFG) | 0x0040, emu->port + A_IOCFG); + } else if (emu->card_capabilities->ca0108_chip) { /* audigy2 value */ + /* Unmute Analog now. */ + outl(inl(emu->port + A_IOCFG) | 0x0060, emu->port + A_IOCFG); + } else { + /* Disable routing from AC97 line out to Front speakers */ + outl(inl(emu->port + A_IOCFG) | 0x0080, emu->port + A_IOCFG); + } + } + +#if 0 + { + unsigned int tmp; + /* FIXME: the following routine disables LiveDrive-II !! */ + /* TOSLink detection */ + emu->tos_link = 0; + tmp = inl(emu->port + HCFG); + if (tmp & (HCFG_GPINPUT0 | HCFG_GPINPUT1)) { + outl(tmp|0x800, emu->port + HCFG); + udelay(50); + if (tmp != (inl(emu->port + HCFG) & ~0x800)) { + emu->tos_link = 1; + outl(tmp, emu->port + HCFG); + } + } + } +#endif + + snd_emu10k1_intr_enable(emu, INTE_PCIERRORENABLE); +} + +int snd_emu10k1_done(struct snd_emu10k1 *emu) +{ + int ch; + + outl(0, emu->port + INTE); + + /* + * Shutdown the chip + */ + for (ch = 0; ch < NUM_G; ch++) + snd_emu10k1_ptr_write(emu, DCYSUSV, ch, 0); + for (ch = 0; ch < NUM_G; ch++) { + snd_emu10k1_ptr_write(emu, VTFT, ch, 0); + snd_emu10k1_ptr_write(emu, CVCF, ch, 0); + snd_emu10k1_ptr_write(emu, PTRX, ch, 0); + snd_emu10k1_ptr_write(emu, CPF, ch, 0); + } + + /* reset recording buffers */ + snd_emu10k1_ptr_write(emu, MICBS, 0, 0); + snd_emu10k1_ptr_write(emu, MICBA, 0, 0); + snd_emu10k1_ptr_write(emu, FXBS, 0, 0); + snd_emu10k1_ptr_write(emu, FXBA, 0, 0); + snd_emu10k1_ptr_write(emu, FXWC, 0, 0); + snd_emu10k1_ptr_write(emu, ADCBS, 0, ADCBS_BUFSIZE_NONE); + snd_emu10k1_ptr_write(emu, ADCBA, 0, 0); + snd_emu10k1_ptr_write(emu, TCBS, 0, TCBS_BUFFSIZE_16K); + snd_emu10k1_ptr_write(emu, TCB, 0, 0); + if (emu->audigy) + snd_emu10k1_ptr_write(emu, A_DBG, 0, A_DBG_SINGLE_STEP); + else + snd_emu10k1_ptr_write(emu, DBG, 0, EMU10K1_DBG_SINGLE_STEP); + + /* disable channel interrupt */ + snd_emu10k1_ptr_write(emu, CLIEL, 0, 0); + snd_emu10k1_ptr_write(emu, CLIEH, 0, 0); + snd_emu10k1_ptr_write(emu, SOLEL, 0, 0); + snd_emu10k1_ptr_write(emu, SOLEH, 0, 0); + + /* disable audio and lock cache */ + outl(HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE, emu->port + HCFG); + snd_emu10k1_ptr_write(emu, PTB, 0, 0); + + return 0; +} + +/************************************************************************* + * ECARD functional implementation + *************************************************************************/ + +/* In A1 Silicon, these bits are in the HC register */ +#define HOOKN_BIT (1L << 12) +#define HANDN_BIT (1L << 11) +#define PULSEN_BIT (1L << 10) + +#define EC_GDI1 (1 << 13) +#define EC_GDI0 (1 << 14) + +#define EC_NUM_CONTROL_BITS 20 + +#define EC_AC3_DATA_SELN 0x0001L +#define EC_EE_DATA_SEL 0x0002L +#define EC_EE_CNTRL_SELN 0x0004L +#define EC_EECLK 0x0008L +#define EC_EECS 0x0010L +#define EC_EESDO 0x0020L +#define EC_TRIM_CSN 0x0040L +#define EC_TRIM_SCLK 0x0080L +#define EC_TRIM_SDATA 0x0100L +#define EC_TRIM_MUTEN 0x0200L +#define EC_ADCCAL 0x0400L +#define EC_ADCRSTN 0x0800L +#define EC_DACCAL 0x1000L +#define EC_DACMUTEN 0x2000L +#define EC_LEDN 0x4000L + +#define EC_SPDIF0_SEL_SHIFT 15 +#define EC_SPDIF1_SEL_SHIFT 17 +#define EC_SPDIF0_SEL_MASK (0x3L << EC_SPDIF0_SEL_SHIFT) +#define EC_SPDIF1_SEL_MASK (0x7L << EC_SPDIF1_SEL_SHIFT) +#define EC_SPDIF0_SELECT(_x) (((_x) << EC_SPDIF0_SEL_SHIFT) & EC_SPDIF0_SEL_MASK) +#define EC_SPDIF1_SELECT(_x) (((_x) << EC_SPDIF1_SEL_SHIFT) & EC_SPDIF1_SEL_MASK) +#define EC_CURRENT_PROM_VERSION 0x01 /* Self-explanatory. This should + * be incremented any time the EEPROM's + * format is changed. */ + +#define EC_EEPROM_SIZE 0x40 /* ECARD EEPROM has 64 16-bit words */ + +/* Addresses for special values stored in to EEPROM */ +#define EC_PROM_VERSION_ADDR 0x20 /* Address of the current prom version */ +#define EC_BOARDREV0_ADDR 0x21 /* LSW of board rev */ +#define EC_BOARDREV1_ADDR 0x22 /* MSW of board rev */ + +#define EC_LAST_PROMFILE_ADDR 0x2f + +#define EC_SERIALNUM_ADDR 0x30 /* First word of serial number. The + * can be up to 30 characters in length + * and is stored as a NULL-terminated + * ASCII string. Any unused bytes must be + * filled with zeros */ +#define EC_CHECKSUM_ADDR 0x3f /* Location at which checksum is stored */ + + +/* Most of this stuff is pretty self-evident. According to the hardware + * dudes, we need to leave the ADCCAL bit low in order to avoid a DC + * offset problem. Weird. + */ +#define EC_RAW_RUN_MODE (EC_DACMUTEN | EC_ADCRSTN | EC_TRIM_MUTEN | \ + EC_TRIM_CSN) + + +#define EC_DEFAULT_ADC_GAIN 0xC4C4 +#define EC_DEFAULT_SPDIF0_SEL 0x0 +#define EC_DEFAULT_SPDIF1_SEL 0x4 + +/************************************************************************** + * @func Clock bits into the Ecard's control latch. The Ecard uses a + * control latch will is loaded bit-serially by toggling the Modem control + * lines from function 2 on the E8010. This function hides these details + * and presents the illusion that we are actually writing to a distinct + * register. + */ + +static void snd_emu10k1_ecard_write(struct snd_emu10k1 *emu, unsigned int value) +{ + unsigned short count; + unsigned int data; + unsigned long hc_port; + unsigned int hc_value; + + hc_port = emu->port + HCFG; + hc_value = inl(hc_port) & ~(HOOKN_BIT | HANDN_BIT | PULSEN_BIT); + outl(hc_value, hc_port); + + for (count = 0; count < EC_NUM_CONTROL_BITS; count++) { + + /* Set up the value */ + data = ((value & 0x1) ? PULSEN_BIT : 0); + value >>= 1; + + outl(hc_value | data, hc_port); + + /* Clock the shift register */ + outl(hc_value | data | HANDN_BIT, hc_port); + outl(hc_value | data, hc_port); + } + + /* Latch the bits */ + outl(hc_value | HOOKN_BIT, hc_port); + outl(hc_value, hc_port); +} + +/************************************************************************** + * @func Set the gain of the ECARD's CS3310 Trim/gain controller. The + * trim value consists of a 16bit value which is composed of two + * 8 bit gain/trim values, one for the left channel and one for the + * right channel. The following table maps from the Gain/Attenuation + * value in decibels into the corresponding bit pattern for a single + * channel. + */ + +static void snd_emu10k1_ecard_setadcgain(struct snd_emu10k1 *emu, + unsigned short gain) +{ + unsigned int bit; + + /* Enable writing to the TRIM registers */ + snd_emu10k1_ecard_write(emu, emu->ecard_ctrl & ~EC_TRIM_CSN); + + /* Do it again to insure that we meet hold time requirements */ + snd_emu10k1_ecard_write(emu, emu->ecard_ctrl & ~EC_TRIM_CSN); + + for (bit = (1 << 15); bit; bit >>= 1) { + unsigned int value; + + value = emu->ecard_ctrl & ~(EC_TRIM_CSN | EC_TRIM_SDATA); + + if (gain & bit) + value |= EC_TRIM_SDATA; + + /* Clock the bit */ + snd_emu10k1_ecard_write(emu, value); + snd_emu10k1_ecard_write(emu, value | EC_TRIM_SCLK); + snd_emu10k1_ecard_write(emu, value); + } + + snd_emu10k1_ecard_write(emu, emu->ecard_ctrl); +} + +static int snd_emu10k1_ecard_init(struct snd_emu10k1 *emu) +{ + unsigned int hc_value; + + /* Set up the initial settings */ + emu->ecard_ctrl = EC_RAW_RUN_MODE | + EC_SPDIF0_SELECT(EC_DEFAULT_SPDIF0_SEL) | + EC_SPDIF1_SELECT(EC_DEFAULT_SPDIF1_SEL); + + /* Step 0: Set the codec type in the hardware control register + * and enable audio output */ + hc_value = inl(emu->port + HCFG); + outl(hc_value | HCFG_AUDIOENABLE | HCFG_CODECFORMAT_I2S, emu->port + HCFG); + inl(emu->port + HCFG); + + /* Step 1: Turn off the led and deassert TRIM_CS */ + snd_emu10k1_ecard_write(emu, EC_ADCCAL | EC_LEDN | EC_TRIM_CSN); + + /* Step 2: Calibrate the ADC and DAC */ + snd_emu10k1_ecard_write(emu, EC_DACCAL | EC_LEDN | EC_TRIM_CSN); + + /* Step 3: Wait for awhile; XXX We can't get away with this + * under a real operating system; we'll need to block and wait that + * way. */ + snd_emu10k1_wait(emu, 48000); + + /* Step 4: Switch off the DAC and ADC calibration. Note + * That ADC_CAL is actually an inverted signal, so we assert + * it here to stop calibration. */ + snd_emu10k1_ecard_write(emu, EC_ADCCAL | EC_LEDN | EC_TRIM_CSN); + + /* Step 4: Switch into run mode */ + snd_emu10k1_ecard_write(emu, emu->ecard_ctrl); + + /* Step 5: Set the analog input gain */ + snd_emu10k1_ecard_setadcgain(emu, EC_DEFAULT_ADC_GAIN); + + return 0; +} + +static int snd_emu10k1_cardbus_init(struct snd_emu10k1 *emu) +{ + unsigned long special_port; + unsigned int value; + + /* Special initialisation routine + * before the rest of the IO-Ports become active. + */ + special_port = emu->port + 0x38; + value = inl(special_port); + outl(0x00d00000, special_port); + value = inl(special_port); + outl(0x00d00001, special_port); + value = inl(special_port); + outl(0x00d0005f, special_port); + value = inl(special_port); + outl(0x00d0007f, special_port); + value = inl(special_port); + outl(0x0090007f, special_port); + value = inl(special_port); + + snd_emu10k1_ptr20_write(emu, TINA2_VOLUME, 0, 0xfefefefe); /* Defaults to 0x30303030 */ + /* Delay to give time for ADC chip to switch on. It needs 113ms */ + msleep(200); + return 0; +} + +static int snd_emu1010_load_firmware_entry(struct snd_emu10k1 *emu, + const struct firmware *fw_entry) +{ + int n, i; + int reg; + int value; + unsigned int write_post; + unsigned long flags; + + if (!fw_entry) + return -EIO; + + /* The FPGA is a Xilinx Spartan IIE XC2S50E */ + /* GPIO7 -> FPGA PGMN + * GPIO6 -> FPGA CCLK + * GPIO5 -> FPGA DIN + * FPGA CONFIG OFF -> FPGA PGMN + */ + spin_lock_irqsave(&emu->emu_lock, flags); + outl(0x00, emu->port + A_IOCFG); /* Set PGMN low for 1uS. */ + write_post = inl(emu->port + A_IOCFG); + udelay(100); + outl(0x80, emu->port + A_IOCFG); /* Leave bit 7 set during netlist setup. */ + write_post = inl(emu->port + A_IOCFG); + udelay(100); /* Allow FPGA memory to clean */ + for (n = 0; n < fw_entry->size; n++) { + value = fw_entry->data[n]; + for (i = 0; i < 8; i++) { + reg = 0x80; + if (value & 0x1) + reg = reg | 0x20; + value = value >> 1; + outl(reg, emu->port + A_IOCFG); + write_post = inl(emu->port + A_IOCFG); + outl(reg | 0x40, emu->port + A_IOCFG); + write_post = inl(emu->port + A_IOCFG); + } + } + /* After programming, set GPIO bit 4 high again. */ + outl(0x10, emu->port + A_IOCFG); + write_post = inl(emu->port + A_IOCFG); + spin_unlock_irqrestore(&emu->emu_lock, flags); + + return 0; +} + +/* firmware file names, per model, init-fw and dock-fw (optional) */ +static const char * const firmware_names[5][2] = { + [EMU_MODEL_EMU1010] = { + HANA_FILENAME, DOCK_FILENAME + }, + [EMU_MODEL_EMU1010B] = { + EMU1010B_FILENAME, MICRO_DOCK_FILENAME + }, + [EMU_MODEL_EMU1616] = { + EMU1010_NOTEBOOK_FILENAME, MICRO_DOCK_FILENAME + }, + [EMU_MODEL_EMU0404] = { + EMU0404_FILENAME, NULL + }, +}; + +static int snd_emu1010_load_firmware(struct snd_emu10k1 *emu, int dock, + const struct firmware **fw) +{ + const char *filename; + int err; + + if (!*fw) { + filename = firmware_names[emu->card_capabilities->emu_model][dock]; + if (!filename) + return 0; + err = request_firmware(fw, filename, &emu->pci->dev); + if (err) + return err; + } + + return snd_emu1010_load_firmware_entry(emu, *fw); +} + +static void emu1010_firmware_work(struct work_struct *work) +{ + struct snd_emu10k1 *emu; + u32 tmp, tmp2, reg; + int err; + + emu = container_of(work, struct snd_emu10k1, + emu1010.firmware_work.work); + if (emu->card->shutdown) + return; +#ifdef CONFIG_PM_SLEEP + if (emu->suspend) + return; +#endif + snd_emu1010_fpga_read(emu, EMU_HANA_IRQ_STATUS, &tmp); /* IRQ Status */ + snd_emu1010_fpga_read(emu, EMU_HANA_OPTION_CARDS, ®); /* OPTIONS: Which cards are attached to the EMU */ + if (reg & EMU_HANA_OPTION_DOCK_OFFLINE) { + /* Audio Dock attached */ + /* Return to Audio Dock programming mode */ + dev_info(emu->card->dev, + "emu1010: Loading Audio Dock Firmware\n"); + snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, + EMU_HANA_FPGA_CONFIG_AUDIODOCK); + err = snd_emu1010_load_firmware(emu, 1, &emu->dock_fw); + if (err < 0) + goto next; + + snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, 0); + snd_emu1010_fpga_read(emu, EMU_HANA_IRQ_STATUS, &tmp); + dev_info(emu->card->dev, + "emu1010: EMU_HANA+DOCK_IRQ_STATUS = 0x%x\n", tmp); + /* ID, should read & 0x7f = 0x55 when FPGA programmed. */ + snd_emu1010_fpga_read(emu, EMU_HANA_ID, &tmp); + dev_info(emu->card->dev, + "emu1010: EMU_HANA+DOCK_ID = 0x%x\n", tmp); + if ((tmp & 0x1f) != 0x15) { + /* FPGA failed to be programmed */ + dev_info(emu->card->dev, + "emu1010: Loading Audio Dock Firmware file failed, reg = 0x%x\n", + tmp); + goto next; + } + dev_info(emu->card->dev, + "emu1010: Audio Dock Firmware loaded\n"); + snd_emu1010_fpga_read(emu, EMU_DOCK_MAJOR_REV, &tmp); + snd_emu1010_fpga_read(emu, EMU_DOCK_MINOR_REV, &tmp2); + dev_info(emu->card->dev, "Audio Dock ver: %u.%u\n", tmp, tmp2); + /* Sync clocking between 1010 and Dock */ + /* Allow DLL to settle */ + msleep(10); + /* Unmute all. Default is muted after a firmware load */ + snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_UNMUTE); + } else if (!reg && emu->emu1010.last_reg) { + /* Audio Dock removed */ + dev_info(emu->card->dev, "emu1010: Audio Dock detached\n"); + /* Unmute all */ + snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, EMU_UNMUTE); + } + + next: + emu->emu1010.last_reg = reg; + if (!emu->card->shutdown) + schedule_delayed_work(&emu->emu1010.firmware_work, + msecs_to_jiffies(1000)); +} + +/* + * EMU-1010 - details found out from this driver, official MS Win drivers, + * testing the card: + * + * Audigy2 (aka Alice2): + * --------------------- + * * communication over PCI + * * conversion of 32-bit data coming over EMU32 links from HANA FPGA + * to 2 x 16-bit, using internal DSP instructions + * * slave mode, clock supplied by HANA + * * linked to HANA using: + * 32 x 32-bit serial EMU32 output channels + * 16 x EMU32 input channels + * (?) x I2S I/O channels (?) + * + * FPGA (aka HANA): + * --------------- + * * provides all (?) physical inputs and outputs of the card + * (ADC, DAC, SPDIF I/O, ADAT I/O, etc.) + * * provides clock signal for the card and Alice2 + * * two crystals - for 44.1kHz and 48kHz multiples + * * provides internal routing of signal sources to signal destinations + * * inputs/outputs to Alice2 - see above + * + * Current status of the driver: + * ---------------------------- + * * only 44.1/48kHz supported (the MS Win driver supports up to 192 kHz) + * * PCM device nb. 2: + * 16 x 16-bit playback - snd_emu10k1_fx8010_playback_ops + * 16 x 32-bit capture - snd_emu10k1_capture_efx_ops + */ +static int snd_emu10k1_emu1010_init(struct snd_emu10k1 *emu) +{ + unsigned int i; + u32 tmp, tmp2, reg; + int err; + + dev_info(emu->card->dev, "emu1010: Special config.\n"); + /* AC97 2.1, Any 16Meg of 4Gig address, Auto-Mute, EMU32 Slave, + * Lock Sound Memory Cache, Lock Tank Memory Cache, + * Mute all codecs. + */ + outl(0x0005a00c, emu->port + HCFG); + /* AC97 2.1, Any 16Meg of 4Gig address, Auto-Mute, EMU32 Slave, + * Lock Tank Memory Cache, + * Mute all codecs. + */ + outl(0x0005a004, emu->port + HCFG); + /* AC97 2.1, Any 16Meg of 4Gig address, Auto-Mute, EMU32 Slave, + * Mute all codecs. + */ + outl(0x0005a000, emu->port + HCFG); + /* AC97 2.1, Any 16Meg of 4Gig address, Auto-Mute, EMU32 Slave, + * Mute all codecs. + */ + outl(0x0005a000, emu->port + HCFG); + + /* Disable 48Volt power to Audio Dock */ + snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_PWR, 0); + + /* ID, should read & 0x7f = 0x55. (Bit 7 is the IRQ bit) */ + snd_emu1010_fpga_read(emu, EMU_HANA_ID, ®); + dev_dbg(emu->card->dev, "reg1 = 0x%x\n", reg); + if ((reg & 0x3f) == 0x15) { + /* FPGA netlist already present so clear it */ + /* Return to programming mode */ + + snd_emu1010_fpga_write(emu, EMU_HANA_FPGA_CONFIG, 0x02); + } + snd_emu1010_fpga_read(emu, EMU_HANA_ID, ®); + dev_dbg(emu->card->dev, "reg2 = 0x%x\n", reg); + if ((reg & 0x3f) == 0x15) { + /* FPGA failed to return to programming mode */ + dev_info(emu->card->dev, + "emu1010: FPGA failed to return to programming mode\n"); + return -ENODEV; + } + dev_info(emu->card->dev, "emu1010: EMU_HANA_ID = 0x%x\n", reg); + + err = snd_emu1010_load_firmware(emu, 0, &emu->firmware); + if (err < 0) { + dev_info(emu->card->dev, "emu1010: Loading Firmware failed\n"); + return err; + } + + /* ID, should read & 0x7f = 0x55 when FPGA programmed. */ + snd_emu1010_fpga_read(emu, EMU_HANA_ID, ®); + if ((reg & 0x3f) != 0x15) { + /* FPGA failed to be programmed */ + dev_info(emu->card->dev, + "emu1010: Loading Hana Firmware file failed, reg = 0x%x\n", + reg); + return -ENODEV; + } + + dev_info(emu->card->dev, "emu1010: Hana Firmware loaded\n"); + snd_emu1010_fpga_read(emu, EMU_HANA_MAJOR_REV, &tmp); + snd_emu1010_fpga_read(emu, EMU_HANA_MINOR_REV, &tmp2); + dev_info(emu->card->dev, "emu1010: Hana version: %u.%u\n", tmp, tmp2); + /* Enable 48Volt power to Audio Dock */ + snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_PWR, EMU_HANA_DOCK_PWR_ON); + + snd_emu1010_fpga_read(emu, EMU_HANA_OPTION_CARDS, ®); + dev_info(emu->card->dev, "emu1010: Card options = 0x%x\n", reg); + snd_emu1010_fpga_read(emu, EMU_HANA_OPTION_CARDS, ®); + dev_info(emu->card->dev, "emu1010: Card options = 0x%x\n", reg); + snd_emu1010_fpga_read(emu, EMU_HANA_OPTICAL_TYPE, &tmp); + /* Optical -> ADAT I/O */ + /* 0 : SPDIF + * 1 : ADAT + */ + emu->emu1010.optical_in = 1; /* IN_ADAT */ + emu->emu1010.optical_out = 1; /* IN_ADAT */ + tmp = 0; + tmp = (emu->emu1010.optical_in ? EMU_HANA_OPTICAL_IN_ADAT : 0) | + (emu->emu1010.optical_out ? EMU_HANA_OPTICAL_OUT_ADAT : 0); + snd_emu1010_fpga_write(emu, EMU_HANA_OPTICAL_TYPE, tmp); + snd_emu1010_fpga_read(emu, EMU_HANA_ADC_PADS, &tmp); + /* Set no attenuation on Audio Dock pads. */ + snd_emu1010_fpga_write(emu, EMU_HANA_ADC_PADS, 0x00); + emu->emu1010.adc_pads = 0x00; + snd_emu1010_fpga_read(emu, EMU_HANA_DOCK_MISC, &tmp); + /* Unmute Audio dock DACs, Headphone source DAC-4. */ + snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_MISC, 0x30); + snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_LEDS_2, 0x12); + snd_emu1010_fpga_read(emu, EMU_HANA_DAC_PADS, &tmp); + /* DAC PADs. */ + snd_emu1010_fpga_write(emu, EMU_HANA_DAC_PADS, 0x0f); + emu->emu1010.dac_pads = 0x0f; + snd_emu1010_fpga_read(emu, EMU_HANA_DOCK_MISC, &tmp); + snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_MISC, 0x30); + snd_emu1010_fpga_read(emu, EMU_HANA_SPDIF_MODE, &tmp); + /* SPDIF Format. Set Consumer mode, 24bit, copy enable */ + snd_emu1010_fpga_write(emu, EMU_HANA_SPDIF_MODE, 0x10); + /* MIDI routing */ + snd_emu1010_fpga_write(emu, EMU_HANA_MIDI_IN, 0x19); + /* Unknown. */ + snd_emu1010_fpga_write(emu, EMU_HANA_MIDI_OUT, 0x0c); + /* IRQ Enable: All on */ + /* snd_emu1010_fpga_write(emu, 0x09, 0x0f ); */ + /* IRQ Enable: All off */ + snd_emu1010_fpga_write(emu, EMU_HANA_IRQ_ENABLE, 0x00); + + snd_emu1010_fpga_read(emu, EMU_HANA_OPTION_CARDS, ®); + dev_info(emu->card->dev, "emu1010: Card options3 = 0x%x\n", reg); + /* Default WCLK set to 48kHz. */ + snd_emu1010_fpga_write(emu, EMU_HANA_DEFCLOCK, 0x00); + /* Word Clock source, Internal 48kHz x1 */ + snd_emu1010_fpga_write(emu, EMU_HANA_WCLOCK, EMU_HANA_WCLOCK_INT_48K); + /* snd_emu1010_fpga_write(emu, EMU_HANA_WCLOCK, EMU_HANA_WCLOCK_INT_48K | EMU_HANA_WCLOCK_4X); */ + /* Audio Dock LEDs. */ + snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_LEDS_2, 0x12); + +#if 0 + /* For 96kHz */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_0, EMU_SRC_HAMOA_ADC_LEFT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_1, EMU_SRC_HAMOA_ADC_RIGHT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_4, EMU_SRC_HAMOA_ADC_LEFT2); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_5, EMU_SRC_HAMOA_ADC_RIGHT2); +#endif +#if 0 + /* For 192kHz */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_0, EMU_SRC_HAMOA_ADC_LEFT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_1, EMU_SRC_HAMOA_ADC_RIGHT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_2, EMU_SRC_HAMOA_ADC_LEFT2); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_3, EMU_SRC_HAMOA_ADC_RIGHT2); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_4, EMU_SRC_HAMOA_ADC_LEFT3); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_5, EMU_SRC_HAMOA_ADC_RIGHT3); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_6, EMU_SRC_HAMOA_ADC_LEFT4); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_7, EMU_SRC_HAMOA_ADC_RIGHT4); +#endif +#if 1 + /* For 48kHz */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_0, EMU_SRC_DOCK_MIC_A1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_1, EMU_SRC_DOCK_MIC_B1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_2, EMU_SRC_HAMOA_ADC_LEFT2); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_3, EMU_SRC_HAMOA_ADC_LEFT2); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_4, EMU_SRC_DOCK_ADC1_LEFT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_5, EMU_SRC_DOCK_ADC1_RIGHT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_6, EMU_SRC_DOCK_ADC2_LEFT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_7, EMU_SRC_DOCK_ADC2_RIGHT1); + /* Pavel Hofman - setting defaults for 8 more capture channels + * Defaults only, users will set their own values anyways, let's + * just copy/paste. + */ + + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_8, EMU_SRC_DOCK_MIC_A1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_9, EMU_SRC_DOCK_MIC_B1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_A, EMU_SRC_HAMOA_ADC_LEFT2); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_B, EMU_SRC_HAMOA_ADC_LEFT2); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_C, EMU_SRC_DOCK_ADC1_LEFT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_D, EMU_SRC_DOCK_ADC1_RIGHT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_E, EMU_SRC_DOCK_ADC2_LEFT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_F, EMU_SRC_DOCK_ADC2_RIGHT1); +#endif +#if 0 + /* Original */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_4, EMU_SRC_HANA_ADAT); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_5, EMU_SRC_HANA_ADAT + 1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_6, EMU_SRC_HANA_ADAT + 2); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_7, EMU_SRC_HANA_ADAT + 3); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_8, EMU_SRC_HANA_ADAT + 4); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_9, EMU_SRC_HANA_ADAT + 5); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_A, EMU_SRC_HANA_ADAT + 6); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_B, EMU_SRC_HANA_ADAT + 7); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_C, EMU_SRC_DOCK_MIC_A1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_D, EMU_SRC_DOCK_MIC_B1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_E, EMU_SRC_HAMOA_ADC_LEFT2); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE2_EMU32_F, EMU_SRC_HAMOA_ADC_LEFT2); +#endif + for (i = 0; i < 0x20; i++) { + /* AudioDock Elink <- Silence */ + snd_emu1010_fpga_link_dst_src_write(emu, 0x0100 + i, EMU_SRC_SILENCE); + } + for (i = 0; i < 4; i++) { + /* Hana SPDIF Out <- Silence */ + snd_emu1010_fpga_link_dst_src_write(emu, 0x0200 + i, EMU_SRC_SILENCE); + } + for (i = 0; i < 7; i++) { + /* Hamoa DAC <- Silence */ + snd_emu1010_fpga_link_dst_src_write(emu, 0x0300 + i, EMU_SRC_SILENCE); + } + for (i = 0; i < 7; i++) { + /* Hana ADAT Out <- Silence */ + snd_emu1010_fpga_link_dst_src_write(emu, EMU_DST_HANA_ADAT + i, EMU_SRC_SILENCE); + } + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE_I2S0_LEFT, EMU_SRC_DOCK_ADC1_LEFT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE_I2S0_RIGHT, EMU_SRC_DOCK_ADC1_RIGHT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE_I2S1_LEFT, EMU_SRC_DOCK_ADC2_LEFT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE_I2S1_RIGHT, EMU_SRC_DOCK_ADC2_RIGHT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE_I2S2_LEFT, EMU_SRC_DOCK_ADC3_LEFT1); + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_ALICE_I2S2_RIGHT, EMU_SRC_DOCK_ADC3_RIGHT1); + snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, 0x01); /* Unmute all */ + + snd_emu1010_fpga_read(emu, EMU_HANA_OPTION_CARDS, &tmp); + + /* AC97 1.03, Any 32Meg of 2Gig address, Auto-Mute, EMU32 Slave, + * Lock Sound Memory Cache, Lock Tank Memory Cache, + * Mute all codecs. + */ + outl(0x0000a000, emu->port + HCFG); + /* AC97 1.03, Any 32Meg of 2Gig address, Auto-Mute, EMU32 Slave, + * Lock Sound Memory Cache, Lock Tank Memory Cache, + * Un-Mute all codecs. + */ + outl(0x0000a001, emu->port + HCFG); + + /* Initial boot complete. Now patches */ + + snd_emu1010_fpga_read(emu, EMU_HANA_OPTION_CARDS, &tmp); + snd_emu1010_fpga_write(emu, EMU_HANA_MIDI_IN, 0x19); /* MIDI Route */ + snd_emu1010_fpga_write(emu, EMU_HANA_MIDI_OUT, 0x0c); /* Unknown */ + snd_emu1010_fpga_write(emu, EMU_HANA_MIDI_IN, 0x19); /* MIDI Route */ + snd_emu1010_fpga_write(emu, EMU_HANA_MIDI_OUT, 0x0c); /* Unknown */ + snd_emu1010_fpga_read(emu, EMU_HANA_SPDIF_MODE, &tmp); + snd_emu1010_fpga_write(emu, EMU_HANA_SPDIF_MODE, 0x10); /* SPDIF Format spdif (or 0x11 for aes/ebu) */ + +#if 0 + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HAMOA_DAC_LEFT1, EMU_SRC_ALICE_EMU32B + 2); /* ALICE2 bus 0xa2 */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HAMOA_DAC_RIGHT1, EMU_SRC_ALICE_EMU32B + 3); /* ALICE2 bus 0xa3 */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HANA_SPDIF_LEFT1, EMU_SRC_ALICE_EMU32A + 2); /* ALICE2 bus 0xb2 */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HANA_SPDIF_RIGHT1, EMU_SRC_ALICE_EMU32A + 3); /* ALICE2 bus 0xb3 */ +#endif + /* Default outputs */ + if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1616) { + /* 1616(M) cardbus default outputs */ + /* ALICE2 bus 0xa0 */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_DAC1_LEFT1, EMU_SRC_ALICE_EMU32A + 0); + emu->emu1010.output_source[0] = 17; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_DAC1_RIGHT1, EMU_SRC_ALICE_EMU32A + 1); + emu->emu1010.output_source[1] = 18; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_DAC2_LEFT1, EMU_SRC_ALICE_EMU32A + 2); + emu->emu1010.output_source[2] = 19; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_DAC2_RIGHT1, EMU_SRC_ALICE_EMU32A + 3); + emu->emu1010.output_source[3] = 20; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_DAC3_LEFT1, EMU_SRC_ALICE_EMU32A + 4); + emu->emu1010.output_source[4] = 21; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_DAC3_RIGHT1, EMU_SRC_ALICE_EMU32A + 5); + emu->emu1010.output_source[5] = 22; + /* ALICE2 bus 0xa0 */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_MANA_DAC_LEFT, EMU_SRC_ALICE_EMU32A + 0); + emu->emu1010.output_source[16] = 17; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_MANA_DAC_RIGHT, EMU_SRC_ALICE_EMU32A + 1); + emu->emu1010.output_source[17] = 18; + } else { + /* ALICE2 bus 0xa0 */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_DAC1_LEFT1, EMU_SRC_ALICE_EMU32A + 0); + emu->emu1010.output_source[0] = 21; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_DAC1_RIGHT1, EMU_SRC_ALICE_EMU32A + 1); + emu->emu1010.output_source[1] = 22; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_DAC2_LEFT1, EMU_SRC_ALICE_EMU32A + 2); + emu->emu1010.output_source[2] = 23; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_DAC2_RIGHT1, EMU_SRC_ALICE_EMU32A + 3); + emu->emu1010.output_source[3] = 24; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_DAC3_LEFT1, EMU_SRC_ALICE_EMU32A + 4); + emu->emu1010.output_source[4] = 25; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_DAC3_RIGHT1, EMU_SRC_ALICE_EMU32A + 5); + emu->emu1010.output_source[5] = 26; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_DAC4_LEFT1, EMU_SRC_ALICE_EMU32A + 6); + emu->emu1010.output_source[6] = 27; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_DAC4_RIGHT1, EMU_SRC_ALICE_EMU32A + 7); + emu->emu1010.output_source[7] = 28; + /* ALICE2 bus 0xa0 */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_PHONES_LEFT1, EMU_SRC_ALICE_EMU32A + 0); + emu->emu1010.output_source[8] = 21; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_PHONES_RIGHT1, EMU_SRC_ALICE_EMU32A + 1); + emu->emu1010.output_source[9] = 22; + /* ALICE2 bus 0xa0 */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_SPDIF_LEFT1, EMU_SRC_ALICE_EMU32A + 0); + emu->emu1010.output_source[10] = 21; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_DOCK_SPDIF_RIGHT1, EMU_SRC_ALICE_EMU32A + 1); + emu->emu1010.output_source[11] = 22; + /* ALICE2 bus 0xa0 */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HANA_SPDIF_LEFT1, EMU_SRC_ALICE_EMU32A + 0); + emu->emu1010.output_source[12] = 21; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HANA_SPDIF_RIGHT1, EMU_SRC_ALICE_EMU32A + 1); + emu->emu1010.output_source[13] = 22; + /* ALICE2 bus 0xa0 */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HAMOA_DAC_LEFT1, EMU_SRC_ALICE_EMU32A + 0); + emu->emu1010.output_source[14] = 21; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HAMOA_DAC_RIGHT1, EMU_SRC_ALICE_EMU32A + 1); + emu->emu1010.output_source[15] = 22; + /* ALICE2 bus 0xa0 */ + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HANA_ADAT, EMU_SRC_ALICE_EMU32A + 0); + emu->emu1010.output_source[16] = 21; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HANA_ADAT + 1, EMU_SRC_ALICE_EMU32A + 1); + emu->emu1010.output_source[17] = 22; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HANA_ADAT + 2, EMU_SRC_ALICE_EMU32A + 2); + emu->emu1010.output_source[18] = 23; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HANA_ADAT + 3, EMU_SRC_ALICE_EMU32A + 3); + emu->emu1010.output_source[19] = 24; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HANA_ADAT + 4, EMU_SRC_ALICE_EMU32A + 4); + emu->emu1010.output_source[20] = 25; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HANA_ADAT + 5, EMU_SRC_ALICE_EMU32A + 5); + emu->emu1010.output_source[21] = 26; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HANA_ADAT + 6, EMU_SRC_ALICE_EMU32A + 6); + emu->emu1010.output_source[22] = 27; + snd_emu1010_fpga_link_dst_src_write(emu, + EMU_DST_HANA_ADAT + 7, EMU_SRC_ALICE_EMU32A + 7); + emu->emu1010.output_source[23] = 28; + } + /* TEMP: Select SPDIF in/out */ + /* snd_emu1010_fpga_write(emu, EMU_HANA_OPTICAL_TYPE, 0x0); */ /* Output spdif */ + + /* TEMP: Select 48kHz SPDIF out */ + snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, 0x0); /* Mute all */ + snd_emu1010_fpga_write(emu, EMU_HANA_DEFCLOCK, 0x0); /* Default fallback clock 48kHz */ + /* Word Clock source, Internal 48kHz x1 */ + snd_emu1010_fpga_write(emu, EMU_HANA_WCLOCK, EMU_HANA_WCLOCK_INT_48K); + /* snd_emu1010_fpga_write(emu, EMU_HANA_WCLOCK, EMU_HANA_WCLOCK_INT_48K | EMU_HANA_WCLOCK_4X); */ + emu->emu1010.internal_clock = 1; /* 48000 */ + snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_LEDS_2, 0x12); /* Set LEDs on Audio Dock */ + snd_emu1010_fpga_write(emu, EMU_HANA_UNMUTE, 0x1); /* Unmute all */ + /* snd_emu1010_fpga_write(emu, 0x7, 0x0); */ /* Mute all */ + /* snd_emu1010_fpga_write(emu, 0x7, 0x1); */ /* Unmute all */ + /* snd_emu1010_fpga_write(emu, 0xe, 0x12); */ /* Set LEDs on Audio Dock */ + + return 0; +} +/* + * Create the EMU10K1 instance + */ + +#ifdef CONFIG_PM_SLEEP +static int alloc_pm_buffer(struct snd_emu10k1 *emu); +static void free_pm_buffer(struct snd_emu10k1 *emu); +#endif + +static int snd_emu10k1_free(struct snd_emu10k1 *emu) +{ + if (emu->port) { /* avoid access to already used hardware */ + snd_emu10k1_fx8010_tram_setup(emu, 0); + snd_emu10k1_done(emu); + snd_emu10k1_free_efx(emu); + } + if (emu->card_capabilities->emu_model == EMU_MODEL_EMU1010) { + /* Disable 48Volt power to Audio Dock */ + snd_emu1010_fpga_write(emu, EMU_HANA_DOCK_PWR, 0); + } + cancel_delayed_work_sync(&emu->emu1010.firmware_work); + release_firmware(emu->firmware); + release_firmware(emu->dock_fw); + if (emu->irq >= 0) + free_irq(emu->irq, emu); + snd_util_memhdr_free(emu->memhdr); + if (emu->silent_page.area) + snd_dma_free_pages(&emu->silent_page); + if (emu->ptb_pages.area) + snd_dma_free_pages(&emu->ptb_pages); + vfree(emu->page_ptr_table); + vfree(emu->page_addr_table); +#ifdef CONFIG_PM_SLEEP + free_pm_buffer(emu); +#endif + if (emu->port) + pci_release_regions(emu->pci); + if (emu->card_capabilities->ca0151_chip) /* P16V */ + snd_p16v_free(emu); + pci_disable_device(emu->pci); + kfree(emu); + return 0; +} + +static int snd_emu10k1_dev_free(struct snd_device *device) +{ + struct snd_emu10k1 *emu = device->device_data; + return snd_emu10k1_free(emu); +} + +static struct snd_emu_chip_details emu_chip_details[] = { + /* Audigy 5/Rx SB1550 */ + /* Tested by michael@gernoth.net 28 Mar 2015 */ + /* DSP: CA10300-IAT LF + * DAC: Cirrus Logic CS4382-KQZ + * ADC: Philips 1361T + * AC97: Sigmatel STAC9750 + * CA0151: None + */ + {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10241102, + .driver = "Audigy2", .name = "SB Audigy 5/Rx [SB1550]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .spk71 = 1, + .adc_1361t = 1, /* 24 bit capture instead of 16bit */ + .ac97_chip = 1}, + /* Audigy4 (Not PRO) SB0610 */ + /* Tested by James@superbug.co.uk 4th April 2006 */ + /* A_IOCFG bits + * Output + * 0: ? + * 1: ? + * 2: ? + * 3: 0 - Digital Out, 1 - Line in + * 4: ? + * 5: ? + * 6: ? + * 7: ? + * Input + * 8: ? + * 9: ? + * A: Green jack sense (Front) + * B: ? + * C: Black jack sense (Rear/Side Right) + * D: Yellow jack sense (Center/LFE/Side Left) + * E: ? + * F: ? + * + * Digital Out/Line in switch using A_IOCFG bit 3 (0x08) + * 0 - Digital Out + * 1 - Line in + */ + /* Mic input not tested. + * Analog CD input not tested + * Digital Out not tested. + * Line in working. + * Audio output 5.1 working. Side outputs not working. + */ + /* DSP: CA10300-IAT LF + * DAC: Cirrus Logic CS4382-KQZ + * ADC: Philips 1361T + * AC97: Sigmatel STAC9750 + * CA0151: None + */ + {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10211102, + .driver = "Audigy2", .name = "SB Audigy 4 [SB0610]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .spk71 = 1, + .adc_1361t = 1, /* 24 bit capture instead of 16bit */ + .ac97_chip = 1} , + /* Audigy 2 Value AC3 out does not work yet. + * Need to find out how to turn off interpolators. + */ + /* Tested by James@superbug.co.uk 3rd July 2005 */ + /* DSP: CA0108-IAT + * DAC: CS4382-KQ + * ADC: Philips 1361T + * AC97: STAC9750 + * CA0151: None + */ + {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x10011102, + .driver = "Audigy2", .name = "SB Audigy 2 Value [SB0400]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .spk71 = 1, + .ac97_chip = 1} , + /* Audigy 2 ZS Notebook Cardbus card.*/ + /* Tested by James@superbug.co.uk 6th November 2006 */ + /* Audio output 7.1/Headphones working. + * Digital output working. (AC3 not checked, only PCM) + * Audio Mic/Line inputs working. + * Digital input not tested. + */ + /* DSP: Tina2 + * DAC: Wolfson WM8768/WM8568 + * ADC: Wolfson WM8775 + * AC97: None + * CA0151: None + */ + /* Tested by James@superbug.co.uk 4th April 2006 */ + /* A_IOCFG bits + * Output + * 0: Not Used + * 1: 0 = Mute all the 7.1 channel out. 1 = unmute. + * 2: Analog input 0 = line in, 1 = mic in + * 3: Not Used + * 4: Digital output 0 = off, 1 = on. + * 5: Not Used + * 6: Not Used + * 7: Not Used + * Input + * All bits 1 (0x3fxx) means nothing plugged in. + * 8-9: 0 = Line in/Mic, 2 = Optical in, 3 = Nothing. + * A-B: 0 = Headphones, 2 = Optical out, 3 = Nothing. + * C-D: 2 = Front/Rear/etc, 3 = nothing. + * E-F: Always 0 + * + */ + {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x20011102, + .driver = "Audigy2", .name = "Audigy 2 ZS Notebook [SB0530]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .ca_cardbus_chip = 1, + .spi_dac = 1, + .i2c_adc = 1, + .spk71 = 1} , + /* Tested by James@superbug.co.uk 4th Nov 2007. */ + {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x42011102, + .driver = "Audigy2", .name = "E-mu 1010 Notebook [MAEM8950]", + .id = "EMU1010", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .ca_cardbus_chip = 1, + .spk71 = 1 , + .emu_model = EMU_MODEL_EMU1616}, + /* Tested by James@superbug.co.uk 4th Nov 2007. */ + /* This is MAEM8960, 0202 is MAEM 8980 */ + {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40041102, + .driver = "Audigy2", .name = "E-mu 1010b PCI [MAEM8960]", + .id = "EMU1010", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .spk71 = 1, + .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 new revision */ + /* Tested by Maxim Kachur 17th Oct 2012. */ + /* This is MAEM8986, 0202 is MAEM8980 */ + {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40071102, + .driver = "Audigy2", .name = "E-mu 1010 PCIe [MAEM8986]", + .id = "EMU1010", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .spk71 = 1, + .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 PCIe */ + /* Tested by James@superbug.co.uk 8th July 2005. */ + /* This is MAEM8810, 0202 is MAEM8820 */ + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40011102, + .driver = "Audigy2", .name = "E-mu 1010 [MAEM8810]", + .id = "EMU1010", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .spk71 = 1, + .emu_model = EMU_MODEL_EMU1010}, /* EMU 1010 old revision */ + /* EMU0404b */ + {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40021102, + .driver = "Audigy2", .name = "E-mu 0404b PCI [MAEM8852]", + .id = "EMU0404", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .spk71 = 1, + .emu_model = EMU_MODEL_EMU0404}, /* EMU 0404 new revision */ + /* Tested by James@superbug.co.uk 20-3-2007. */ + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40021102, + .driver = "Audigy2", .name = "E-mu 0404 [MAEM8850]", + .id = "EMU0404", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .spk71 = 1, + .emu_model = EMU_MODEL_EMU0404}, /* EMU 0404 */ + /* EMU0404 PCIe */ + {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40051102, + .driver = "Audigy2", .name = "E-mu 0404 PCIe [MAEM8984]", + .id = "EMU0404", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .spk71 = 1, + .emu_model = EMU_MODEL_EMU0404}, /* EMU 0404 PCIe ver_03 */ + /* Note that all E-mu cards require kernel 2.6 or newer. */ + {.vendor = 0x1102, .device = 0x0008, + .driver = "Audigy2", .name = "SB Audigy 2 Value [Unknown]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0108_chip = 1, + .ac97_chip = 1} , + /* Tested by James@superbug.co.uk 3rd July 2005 */ + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20071102, + .driver = "Audigy2", .name = "SB Audigy 4 PRO [SB0380]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, + .ac97_chip = 1} , + /* Tested by shane-alsa@cm.nu 5th Nov 2005 */ + /* The 0x20061102 does have SB0350 written on it + * Just like 0x20021102 + */ + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20061102, + .driver = "Audigy2", .name = "SB Audigy 2 [SB0350b]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, + .invert_shared_spdif = 1, /* digital/analog switch swapped */ + .ac97_chip = 1} , + /* 0x20051102 also has SB0350 written on it, treated as Audigy 2 ZS by + Creative's Windows driver */ + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20051102, + .driver = "Audigy2", .name = "SB Audigy 2 ZS [SB0350a]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, + .invert_shared_spdif = 1, /* digital/analog switch swapped */ + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20021102, + .driver = "Audigy2", .name = "SB Audigy 2 ZS [SB0350]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, + .invert_shared_spdif = 1, /* digital/analog switch swapped */ + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x20011102, + .driver = "Audigy2", .name = "SB Audigy 2 ZS [SB0360]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, + .invert_shared_spdif = 1, /* digital/analog switch swapped */ + .ac97_chip = 1} , + /* Audigy 2 */ + /* Tested by James@superbug.co.uk 3rd July 2005 */ + /* DSP: CA0102-IAT + * DAC: CS4382-KQ + * ADC: Philips 1361T + * AC97: STAC9721 + * CA0151: Yes + */ + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10071102, + .driver = "Audigy2", .name = "SB Audigy 2 [SB0240]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, + .adc_1361t = 1, /* 24 bit capture instead of 16bit */ + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10051102, + .driver = "Audigy2", .name = "Audigy 2 Platinum EX [SB0280]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1} , + /* Dell OEM/Creative Labs Audigy 2 ZS */ + /* See ALSA bug#1365 */ + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10031102, + .driver = "Audigy2", .name = "SB Audigy 2 ZS [SB0353]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, + .invert_shared_spdif = 1, /* digital/analog switch swapped */ + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x10021102, + .driver = "Audigy2", .name = "SB Audigy 2 Platinum [SB0240P]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spk71 = 1, + .spdif_bug = 1, + .invert_shared_spdif = 1, /* digital/analog switch swapped */ + .adc_1361t = 1, /* 24 bit capture instead of 16bit. Fixes ALSA bug#324 */ + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .revision = 0x04, + .driver = "Audigy2", .name = "SB Audigy 2 [Unknown]", + .id = "Audigy2", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ca0151_chip = 1, + .spdif_bug = 1, + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x00531102, + .driver = "Audigy", .name = "SB Audigy 1 [SB0092]", + .id = "Audigy", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x00521102, + .driver = "Audigy", .name = "SB Audigy 1 ES [SB0160]", + .id = "Audigy", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .spdif_bug = 1, + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x00511102, + .driver = "Audigy", .name = "SB Audigy 1 [SB0090]", + .id = "Audigy", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0004, + .driver = "Audigy", .name = "Audigy 1 [Unknown]", + .id = "Audigy", + .emu10k2_chip = 1, + .ca0102_chip = 1, + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x100a1102, + .driver = "EMU10K1", .name = "SB Live! 5.1 [SB0220]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x806b1102, + .driver = "EMU10K1", .name = "SB Live! [SB0105]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x806a1102, + .driver = "EMU10K1", .name = "SB Live! Value [SB0103]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80691102, + .driver = "EMU10K1", .name = "SB Live! Value [SB0101]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + /* Tested by ALSA bug#1680 26th December 2005 */ + /* note: It really has SB0220 written on the card, */ + /* but it's SB0228 according to kx.inf */ + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80661102, + .driver = "EMU10K1", .name = "SB Live! 5.1 Dell OEM [SB0228]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + /* Tested by Thomas Zehetbauer 27th Aug 2005 */ + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80651102, + .driver = "EMU10K1", .name = "SB Live! 5.1 [SB0220]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80641102, + .driver = "EMU10K1", .name = "SB Live! 5.1", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + /* Tested by alsa bugtrack user "hus" bug #1297 12th Aug 2005 */ + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80611102, + .driver = "EMU10K1", .name = "SB Live! 5.1 [SB0060]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 2, /* ac97 is optional; both SBLive 5.1 and platinum + * share the same IDs! + */ + .sblive51 = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80511102, + .driver = "EMU10K1", .name = "SB Live! Value [CT4850]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80401102, + .driver = "EMU10K1", .name = "SB Live! Platinum [CT4760P]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80321102, + .driver = "EMU10K1", .name = "SB Live! Value [CT4871]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80311102, + .driver = "EMU10K1", .name = "SB Live! Value [CT4831]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80281102, + .driver = "EMU10K1", .name = "SB Live! Value [CT4870]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + /* Tested by James@superbug.co.uk 3rd July 2005 */ + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80271102, + .driver = "EMU10K1", .name = "SB Live! Value [CT4832]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80261102, + .driver = "EMU10K1", .name = "SB Live! Value [CT4830]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80231102, + .driver = "EMU10K1", .name = "SB PCI512 [CT4790]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x80221102, + .driver = "EMU10K1", .name = "SB Live! Value [CT4780]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x40011102, + .driver = "EMU10K1", .name = "E-mu APS [PC545]", + .id = "APS", + .emu10k1_chip = 1, + .ecard = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x00211102, + .driver = "EMU10K1", .name = "SB Live! [CT4620]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + {.vendor = 0x1102, .device = 0x0002, .subsystem = 0x00201102, + .driver = "EMU10K1", .name = "SB Live! Value [CT4670]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + {.vendor = 0x1102, .device = 0x0002, + .driver = "EMU10K1", .name = "SB Live! [Unknown]", + .id = "Live", + .emu10k1_chip = 1, + .ac97_chip = 1, + .sblive51 = 1} , + { } /* terminator */ +}; + +/* + * The chip (at least the Audigy 2 CA0102 chip, but most likely others, too) + * has a problem that from time to time it likes to do few DMA reads a bit + * beyond its normal allocation and gets very confused if these reads get + * blocked by a IOMMU. + * + * This behaviour has been observed for the first (reserved) page + * (for which it happens multiple times at every playback), often for various + * synth pages and sometimes for PCM playback buffers and the page table + * memory itself. + * + * As a workaround let's widen these DMA allocations by an extra page if we + * detect that the device is behind a non-passthrough IOMMU. + */ +static void snd_emu10k1_detect_iommu(struct snd_emu10k1 *emu) +{ + struct iommu_domain *domain; + + emu->iommu_workaround = false; + + if (!iommu_present(emu->card->dev->bus)) + return; + + domain = iommu_get_domain_for_dev(emu->card->dev); + if (domain && domain->type == IOMMU_DOMAIN_IDENTITY) + return; + + dev_notice(emu->card->dev, + "non-passthrough IOMMU detected, widening DMA allocations"); + emu->iommu_workaround = true; +} + +int snd_emu10k1_create(struct snd_card *card, + struct pci_dev *pci, + unsigned short extin_mask, + unsigned short extout_mask, + long max_cache_bytes, + int enable_ir, + uint subsystem, + struct snd_emu10k1 **remu) +{ + struct snd_emu10k1 *emu; + int idx, err; + int is_audigy; + size_t page_table_size; + unsigned int silent_page; + const struct snd_emu_chip_details *c; + static struct snd_device_ops ops = { + .dev_free = snd_emu10k1_dev_free, + }; + + *remu = NULL; + + /* enable PCI device */ + err = pci_enable_device(pci); + if (err < 0) + return err; + + emu = kzalloc(sizeof(*emu), GFP_KERNEL); + if (emu == NULL) { + pci_disable_device(pci); + return -ENOMEM; + } + emu->card = card; + spin_lock_init(&emu->reg_lock); + spin_lock_init(&emu->emu_lock); + spin_lock_init(&emu->spi_lock); + spin_lock_init(&emu->i2c_lock); + spin_lock_init(&emu->voice_lock); + spin_lock_init(&emu->synth_lock); + spin_lock_init(&emu->memblk_lock); + mutex_init(&emu->fx8010.lock); + INIT_LIST_HEAD(&emu->mapped_link_head); + INIT_LIST_HEAD(&emu->mapped_order_link_head); + emu->pci = pci; + emu->irq = -1; + emu->synth = NULL; + emu->get_synth_voice = NULL; + INIT_DELAYED_WORK(&emu->emu1010.firmware_work, emu1010_firmware_work); + /* read revision & serial */ + emu->revision = pci->revision; + pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &emu->serial); + pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &emu->model); + dev_dbg(card->dev, + "vendor = 0x%x, device = 0x%x, subsystem_vendor_id = 0x%x, subsystem_id = 0x%x\n", + pci->vendor, pci->device, emu->serial, emu->model); + + for (c = emu_chip_details; c->vendor; c++) { + if (c->vendor == pci->vendor && c->device == pci->device) { + if (subsystem) { + if (c->subsystem && (c->subsystem == subsystem)) + break; + else + continue; + } else { + if (c->subsystem && (c->subsystem != emu->serial)) + continue; + if (c->revision && c->revision != emu->revision) + continue; + } + break; + } + } + if (c->vendor == 0) { + dev_err(card->dev, "emu10k1: Card not recognised\n"); + kfree(emu); + pci_disable_device(pci); + return -ENOENT; + } + emu->card_capabilities = c; + if (c->subsystem && !subsystem) + dev_dbg(card->dev, "Sound card name = %s\n", c->name); + else if (subsystem) + dev_dbg(card->dev, "Sound card name = %s, " + "vendor = 0x%x, device = 0x%x, subsystem = 0x%x. " + "Forced to subsystem = 0x%x\n", c->name, + pci->vendor, pci->device, emu->serial, c->subsystem); + else + dev_dbg(card->dev, "Sound card name = %s, " + "vendor = 0x%x, device = 0x%x, subsystem = 0x%x.\n", + c->name, pci->vendor, pci->device, + emu->serial); + + if (!*card->id && c->id) { + int i, n = 0; + strlcpy(card->id, c->id, sizeof(card->id)); + for (;;) { + for (i = 0; i < snd_ecards_limit; i++) { + if (snd_cards[i] && !strcmp(snd_cards[i]->id, card->id)) + break; + } + if (i >= snd_ecards_limit) + break; + n++; + if (n >= SNDRV_CARDS) + break; + snprintf(card->id, sizeof(card->id), "%s_%d", c->id, n); + } + } + + is_audigy = emu->audigy = c->emu10k2_chip; + + snd_emu10k1_detect_iommu(emu); + + /* set addressing mode */ + emu->address_mode = is_audigy ? 0 : 1; + /* set the DMA transfer mask */ + emu->dma_mask = emu->address_mode ? EMU10K1_DMA_MASK : AUDIGY_DMA_MASK; + if (dma_set_mask_and_coherent(&pci->dev, emu->dma_mask) < 0) { + dev_err(card->dev, + "architecture does not support PCI busmaster DMA with mask 0x%lx\n", + emu->dma_mask); + kfree(emu); + pci_disable_device(pci); + return -ENXIO; + } + if (is_audigy) + emu->gpr_base = A_FXGPREGBASE; + else + emu->gpr_base = FXGPREGBASE; + + err = pci_request_regions(pci, "EMU10K1"); + if (err < 0) { + kfree(emu); + pci_disable_device(pci); + return err; + } + emu->port = pci_resource_start(pci, 0); + + emu->max_cache_pages = max_cache_bytes >> PAGE_SHIFT; + + page_table_size = sizeof(u32) * (emu->address_mode ? MAXPAGES1 : + MAXPAGES0); + if (snd_emu10k1_alloc_pages_maybe_wider(emu, page_table_size, + &emu->ptb_pages) < 0) { + err = -ENOMEM; + goto error; + } + dev_dbg(card->dev, "page table address range is %.8lx:%.8lx\n", + (unsigned long)emu->ptb_pages.addr, + (unsigned long)(emu->ptb_pages.addr + emu->ptb_pages.bytes)); + + emu->page_ptr_table = vmalloc(array_size(sizeof(void *), + emu->max_cache_pages)); + emu->page_addr_table = vmalloc(array_size(sizeof(unsigned long), + emu->max_cache_pages)); + if (emu->page_ptr_table == NULL || emu->page_addr_table == NULL) { + err = -ENOMEM; + goto error; + } + + if (snd_emu10k1_alloc_pages_maybe_wider(emu, EMUPAGESIZE, + &emu->silent_page) < 0) { + err = -ENOMEM; + goto error; + } + dev_dbg(card->dev, "silent page range is %.8lx:%.8lx\n", + (unsigned long)emu->silent_page.addr, + (unsigned long)(emu->silent_page.addr + + emu->silent_page.bytes)); + + emu->memhdr = snd_util_memhdr_new(emu->max_cache_pages * PAGE_SIZE); + if (emu->memhdr == NULL) { + err = -ENOMEM; + goto error; + } + emu->memhdr->block_extra_size = sizeof(struct snd_emu10k1_memblk) - + sizeof(struct snd_util_memblk); + + pci_set_master(pci); + + emu->fx8010.fxbus_mask = 0x303f; + if (extin_mask == 0) + extin_mask = 0x3fcf; + if (extout_mask == 0) + extout_mask = 0x7fff; + emu->fx8010.extin_mask = extin_mask; + emu->fx8010.extout_mask = extout_mask; + emu->enable_ir = enable_ir; + + if (emu->card_capabilities->ca_cardbus_chip) { + err = snd_emu10k1_cardbus_init(emu); + if (err < 0) + goto error; + } + if (emu->card_capabilities->ecard) { + err = snd_emu10k1_ecard_init(emu); + if (err < 0) + goto error; + } else if (emu->card_capabilities->emu_model) { + err = snd_emu10k1_emu1010_init(emu); + if (err < 0) { + snd_emu10k1_free(emu); + return err; + } + } else { + /* 5.1: Enable the additional AC97 Slots. If the emu10k1 version + does not support this, it shouldn't do any harm */ + snd_emu10k1_ptr_write(emu, AC97SLOT, 0, + AC97SLOT_CNTR|AC97SLOT_LFE); + } + + /* initialize TRAM setup */ + emu->fx8010.itram_size = (16 * 1024)/2; + emu->fx8010.etram_pages.area = NULL; + emu->fx8010.etram_pages.bytes = 0; + + /* irq handler must be registered after I/O ports are activated */ + if (request_irq(pci->irq, snd_emu10k1_interrupt, IRQF_SHARED, + KBUILD_MODNAME, emu)) { + err = -EBUSY; + goto error; + } + emu->irq = pci->irq; + + /* + * Init to 0x02109204 : + * Clock accuracy = 0 (1000ppm) + * Sample Rate = 2 (48kHz) + * Audio Channel = 1 (Left of 2) + * Source Number = 0 (Unspecified) + * Generation Status = 1 (Original for Cat Code 12) + * Cat Code = 12 (Digital Signal Mixer) + * Mode = 0 (Mode 0) + * Emphasis = 0 (None) + * CP = 1 (Copyright unasserted) + * AN = 0 (Audio data) + * P = 0 (Consumer) + */ + emu->spdif_bits[0] = emu->spdif_bits[1] = + emu->spdif_bits[2] = SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 | + SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | + SPCS_GENERATIONSTATUS | 0x00001200 | + 0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT; + + /* Clear silent pages and set up pointers */ + memset(emu->silent_page.area, 0, emu->silent_page.bytes); + silent_page = emu->silent_page.addr << emu->address_mode; + for (idx = 0; idx < (emu->address_mode ? MAXPAGES1 : MAXPAGES0); idx++) + ((u32 *)emu->ptb_pages.area)[idx] = cpu_to_le32(silent_page | idx); + + /* set up voice indices */ + for (idx = 0; idx < NUM_G; idx++) { + emu->voices[idx].emu = emu; + emu->voices[idx].number = idx; + } + + err = snd_emu10k1_init(emu, enable_ir, 0); + if (err < 0) + goto error; +#ifdef CONFIG_PM_SLEEP + err = alloc_pm_buffer(emu); + if (err < 0) + goto error; +#endif + + /* Initialize the effect engine */ + err = snd_emu10k1_init_efx(emu); + if (err < 0) + goto error; + snd_emu10k1_audio_enable(emu); + + err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, emu, &ops); + if (err < 0) + goto error; + +#ifdef CONFIG_SND_PROC_FS + snd_emu10k1_proc_init(emu); +#endif + + *remu = emu; + return 0; + + error: + snd_emu10k1_free(emu); + return err; +} + +#ifdef CONFIG_PM_SLEEP +static unsigned char saved_regs[] = { + CPF, PTRX, CVCF, VTFT, Z1, Z2, PSST, DSL, CCCA, CCR, CLP, + FXRT, MAPA, MAPB, ENVVOL, ATKHLDV, DCYSUSV, LFOVAL1, ENVVAL, + ATKHLDM, DCYSUSM, LFOVAL2, IP, IFATN, PEFE, FMMOD, TREMFRQ, FM2FRQ2, + TEMPENV, ADCCR, FXWC, MICBA, ADCBA, FXBA, + MICBS, ADCBS, FXBS, CDCS, GPSCS, SPCS0, SPCS1, SPCS2, + SPBYPASS, AC97SLOT, CDSRCS, GPSRCS, ZVSRCS, MICIDX, ADCIDX, FXIDX, + 0xff /* end */ +}; +static unsigned char saved_regs_audigy[] = { + A_ADCIDX, A_MICIDX, A_FXWC1, A_FXWC2, A_SAMPLE_RATE, + A_FXRT2, A_SENDAMOUNTS, A_FXRT1, + 0xff /* end */ +}; + +static int alloc_pm_buffer(struct snd_emu10k1 *emu) +{ + int size; + + size = ARRAY_SIZE(saved_regs); + if (emu->audigy) + size += ARRAY_SIZE(saved_regs_audigy); + emu->saved_ptr = vmalloc(array3_size(4, NUM_G, size)); + if (!emu->saved_ptr) + return -ENOMEM; + if (snd_emu10k1_efx_alloc_pm_buffer(emu) < 0) + return -ENOMEM; + if (emu->card_capabilities->ca0151_chip && + snd_p16v_alloc_pm_buffer(emu) < 0) + return -ENOMEM; + return 0; +} + +static void free_pm_buffer(struct snd_emu10k1 *emu) +{ + vfree(emu->saved_ptr); + snd_emu10k1_efx_free_pm_buffer(emu); + if (emu->card_capabilities->ca0151_chip) + snd_p16v_free_pm_buffer(emu); +} + +void snd_emu10k1_suspend_regs(struct snd_emu10k1 *emu) +{ + int i; + unsigned char *reg; + unsigned int *val; + + val = emu->saved_ptr; + for (reg = saved_regs; *reg != 0xff; reg++) + for (i = 0; i < NUM_G; i++, val++) + *val = snd_emu10k1_ptr_read(emu, *reg, i); + if (emu->audigy) { + for (reg = saved_regs_audigy; *reg != 0xff; reg++) + for (i = 0; i < NUM_G; i++, val++) + *val = snd_emu10k1_ptr_read(emu, *reg, i); + } + if (emu->audigy) + emu->saved_a_iocfg = inl(emu->port + A_IOCFG); + emu->saved_hcfg = inl(emu->port + HCFG); +} + +void snd_emu10k1_resume_init(struct snd_emu10k1 *emu) +{ + if (emu->card_capabilities->ca_cardbus_chip) + snd_emu10k1_cardbus_init(emu); + if (emu->card_capabilities->ecard) + snd_emu10k1_ecard_init(emu); + else if (emu->card_capabilities->emu_model) + snd_emu10k1_emu1010_init(emu); + else + snd_emu10k1_ptr_write(emu, AC97SLOT, 0, AC97SLOT_CNTR|AC97SLOT_LFE); + snd_emu10k1_init(emu, emu->enable_ir, 1); +} + +void snd_emu10k1_resume_regs(struct snd_emu10k1 *emu) +{ + int i; + unsigned char *reg; + unsigned int *val; + + snd_emu10k1_audio_enable(emu); + + /* resore for spdif */ + if (emu->audigy) + outl(emu->saved_a_iocfg, emu->port + A_IOCFG); + outl(emu->saved_hcfg, emu->port + HCFG); + + val = emu->saved_ptr; + for (reg = saved_regs; *reg != 0xff; reg++) + for (i = 0; i < NUM_G; i++, val++) + snd_emu10k1_ptr_write(emu, *reg, i, *val); + if (emu->audigy) { + for (reg = saved_regs_audigy; *reg != 0xff; reg++) + for (i = 0; i < NUM_G; i++, val++) + snd_emu10k1_ptr_write(emu, *reg, i, *val); + } +} +#endif \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emu10k1_main.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emu10k1_main.c.yml new file mode 100644 index 00000000000..f2b039b3ff8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emu10k1_main.c.yml @@ -0,0 +1,25 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) by Jaroslav Kysela Creative Labs, Inc. Routines + - Copyright (c) by James Courtier-Dutton +holders: + - Jaroslav Kysela Creative Labs, Inc. Routines + - James Courtier-Dutton +authors: + - michael@gernoth.net + - James@superbug.co.uk + - James@superbug.co.uk + - James@superbug.co.uk + - James@superbug.co.uk + - James@superbug.co.uk + - James@superbug.co.uk + - Maxim Kachur + - James@superbug.co.uk + - James@superbug.co.uk + - James@superbug.co.uk + - shane-alsa@cm.nu + - James@superbug.co.uk + - James@superbug.co.uk diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emufx.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emufx.c new file mode 100644 index 00000000000..ee5c9bc4b79 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emufx.c @@ -0,0 +1,2794 @@ +/* + * Copyright (c) by Jaroslav Kysela + * Creative Labs, Inc. + * Routines for effect processor FX8010 + * + * Copyright (c) by James Courtier-Dutton + * Added EMU 1010 support. + * + * BUGS: + * -- + * + * TODO: + * -- + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#if 0 /* for testing purposes - digital out -> capture */ +#define EMU10K1_CAPTURE_DIGITAL_OUT +#endif +#if 0 /* for testing purposes - set S/PDIF to AC3 output */ +#define EMU10K1_SET_AC3_IEC958 +#endif +#if 0 /* for testing purposes - feed the front signal to Center/LFE outputs */ +#define EMU10K1_CENTER_LFE_FROM_FRONT +#endif + +static bool high_res_gpr_volume; +module_param(high_res_gpr_volume, bool, 0444); +MODULE_PARM_DESC(high_res_gpr_volume, "GPR mixer controls use 31-bit range."); + +/* + * Tables + */ + +static char *fxbuses[16] = { + /* 0x00 */ "PCM Left", + /* 0x01 */ "PCM Right", + /* 0x02 */ "PCM Surround Left", + /* 0x03 */ "PCM Surround Right", + /* 0x04 */ "MIDI Left", + /* 0x05 */ "MIDI Right", + /* 0x06 */ "Center", + /* 0x07 */ "LFE", + /* 0x08 */ NULL, + /* 0x09 */ NULL, + /* 0x0a */ NULL, + /* 0x0b */ NULL, + /* 0x0c */ "MIDI Reverb", + /* 0x0d */ "MIDI Chorus", + /* 0x0e */ NULL, + /* 0x0f */ NULL +}; + +static char *creative_ins[16] = { + /* 0x00 */ "AC97 Left", + /* 0x01 */ "AC97 Right", + /* 0x02 */ "TTL IEC958 Left", + /* 0x03 */ "TTL IEC958 Right", + /* 0x04 */ "Zoom Video Left", + /* 0x05 */ "Zoom Video Right", + /* 0x06 */ "Optical IEC958 Left", + /* 0x07 */ "Optical IEC958 Right", + /* 0x08 */ "Line/Mic 1 Left", + /* 0x09 */ "Line/Mic 1 Right", + /* 0x0a */ "Coaxial IEC958 Left", + /* 0x0b */ "Coaxial IEC958 Right", + /* 0x0c */ "Line/Mic 2 Left", + /* 0x0d */ "Line/Mic 2 Right", + /* 0x0e */ NULL, + /* 0x0f */ NULL +}; + +static char *audigy_ins[16] = { + /* 0x00 */ "AC97 Left", + /* 0x01 */ "AC97 Right", + /* 0x02 */ "Audigy CD Left", + /* 0x03 */ "Audigy CD Right", + /* 0x04 */ "Optical IEC958 Left", + /* 0x05 */ "Optical IEC958 Right", + /* 0x06 */ NULL, + /* 0x07 */ NULL, + /* 0x08 */ "Line/Mic 2 Left", + /* 0x09 */ "Line/Mic 2 Right", + /* 0x0a */ "SPDIF Left", + /* 0x0b */ "SPDIF Right", + /* 0x0c */ "Aux2 Left", + /* 0x0d */ "Aux2 Right", + /* 0x0e */ NULL, + /* 0x0f */ NULL +}; + +static char *creative_outs[32] = { + /* 0x00 */ "AC97 Left", + /* 0x01 */ "AC97 Right", + /* 0x02 */ "Optical IEC958 Left", + /* 0x03 */ "Optical IEC958 Right", + /* 0x04 */ "Center", + /* 0x05 */ "LFE", + /* 0x06 */ "Headphone Left", + /* 0x07 */ "Headphone Right", + /* 0x08 */ "Surround Left", + /* 0x09 */ "Surround Right", + /* 0x0a */ "PCM Capture Left", + /* 0x0b */ "PCM Capture Right", + /* 0x0c */ "MIC Capture", + /* 0x0d */ "AC97 Surround Left", + /* 0x0e */ "AC97 Surround Right", + /* 0x0f */ NULL, + /* 0x10 */ NULL, + /* 0x11 */ "Analog Center", + /* 0x12 */ "Analog LFE", + /* 0x13 */ NULL, + /* 0x14 */ NULL, + /* 0x15 */ NULL, + /* 0x16 */ NULL, + /* 0x17 */ NULL, + /* 0x18 */ NULL, + /* 0x19 */ NULL, + /* 0x1a */ NULL, + /* 0x1b */ NULL, + /* 0x1c */ NULL, + /* 0x1d */ NULL, + /* 0x1e */ NULL, + /* 0x1f */ NULL, +}; + +static char *audigy_outs[32] = { + /* 0x00 */ "Digital Front Left", + /* 0x01 */ "Digital Front Right", + /* 0x02 */ "Digital Center", + /* 0x03 */ "Digital LEF", + /* 0x04 */ "Headphone Left", + /* 0x05 */ "Headphone Right", + /* 0x06 */ "Digital Rear Left", + /* 0x07 */ "Digital Rear Right", + /* 0x08 */ "Front Left", + /* 0x09 */ "Front Right", + /* 0x0a */ "Center", + /* 0x0b */ "LFE", + /* 0x0c */ NULL, + /* 0x0d */ NULL, + /* 0x0e */ "Rear Left", + /* 0x0f */ "Rear Right", + /* 0x10 */ "AC97 Front Left", + /* 0x11 */ "AC97 Front Right", + /* 0x12 */ "ADC Capture Left", + /* 0x13 */ "ADC Capture Right", + /* 0x14 */ NULL, + /* 0x15 */ NULL, + /* 0x16 */ NULL, + /* 0x17 */ NULL, + /* 0x18 */ NULL, + /* 0x19 */ NULL, + /* 0x1a */ NULL, + /* 0x1b */ NULL, + /* 0x1c */ NULL, + /* 0x1d */ NULL, + /* 0x1e */ NULL, + /* 0x1f */ NULL, +}; + +static const u32 bass_table[41][5] = { + { 0x3e4f844f, 0x84ed4cc3, 0x3cc69927, 0x7b03553a, 0xc4da8486 }, + { 0x3e69a17a, 0x84c280fb, 0x3cd77cd4, 0x7b2f2a6f, 0xc4b08d1d }, + { 0x3e82ff42, 0x849991d5, 0x3ce7466b, 0x7b5917c6, 0xc48863ee }, + { 0x3e9bab3c, 0x847267f0, 0x3cf5ffe8, 0x7b813560, 0xc461f22c }, + { 0x3eb3b275, 0x844ced29, 0x3d03b295, 0x7ba79a1c, 0xc43d223b }, + { 0x3ecb2174, 0x84290c8b, 0x3d106714, 0x7bcc5ba3, 0xc419dfa5 }, + { 0x3ee2044b, 0x8406b244, 0x3d1c2561, 0x7bef8e77, 0xc3f8170f }, + { 0x3ef86698, 0x83e5cb96, 0x3d26f4d8, 0x7c114600, 0xc3d7b625 }, + { 0x3f0e5390, 0x83c646c9, 0x3d30dc39, 0x7c319498, 0xc3b8ab97 }, + { 0x3f23d60b, 0x83a81321, 0x3d39e1af, 0x7c508b9c, 0xc39ae704 }, + { 0x3f38f884, 0x838b20d2, 0x3d420ad2, 0x7c6e3b75, 0xc37e58f1 }, + { 0x3f4dc52c, 0x836f60ef, 0x3d495cab, 0x7c8ab3a6, 0xc362f2be }, + { 0x3f6245e8, 0x8354c565, 0x3d4fdbb8, 0x7ca602d6, 0xc348a69b }, + { 0x3f76845f, 0x833b40ec, 0x3d558bf0, 0x7cc036df, 0xc32f677c }, + { 0x3f8a8a03, 0x8322c6fb, 0x3d5a70c4, 0x7cd95cd7, 0xc317290b }, + { 0x3f9e6014, 0x830b4bc3, 0x3d5e8d25, 0x7cf1811a, 0xc2ffdfa5 }, + { 0x3fb20fae, 0x82f4c420, 0x3d61e37f, 0x7d08af56, 0xc2e9804a }, + { 0x3fc5a1cc, 0x82df2592, 0x3d6475c3, 0x7d1ef294, 0xc2d40096 }, + { 0x3fd91f55, 0x82ca6632, 0x3d664564, 0x7d345541, 0xc2bf56b9 }, + { 0x3fec9120, 0x82b67cac, 0x3d675356, 0x7d48e138, 0xc2ab796e }, + { 0x40000000, 0x82a36037, 0x3d67a012, 0x7d5c9fc9, 0xc2985fee }, + { 0x401374c7, 0x8291088a, 0x3d672b93, 0x7d6f99c3, 0xc28601f2 }, + { 0x4026f857, 0x827f6dd7, 0x3d65f559, 0x7d81d77c, 0xc27457a3 }, + { 0x403a939f, 0x826e88c5, 0x3d63fc63, 0x7d9360d4, 0xc2635996 }, + { 0x404e4faf, 0x825e5266, 0x3d613f32, 0x7da43d42, 0xc25300c6 }, + { 0x406235ba, 0x824ec434, 0x3d5dbbc3, 0x7db473d7, 0xc243468e }, + { 0x40764f1f, 0x823fd80c, 0x3d596f8f, 0x7dc40b44, 0xc23424a2 }, + { 0x408aa576, 0x82318824, 0x3d545787, 0x7dd309e2, 0xc2259509 }, + { 0x409f4296, 0x8223cf0b, 0x3d4e7012, 0x7de175b5, 0xc2179218 }, + { 0x40b430a0, 0x8216a7a1, 0x3d47b505, 0x7def5475, 0xc20a1670 }, + { 0x40c97a0a, 0x820a0d12, 0x3d4021a1, 0x7dfcab8d, 0xc1fd1cf5 }, + { 0x40df29a6, 0x81fdfad6, 0x3d37b08d, 0x7e098028, 0xc1f0a0ca }, + { 0x40f54ab1, 0x81f26ca9, 0x3d2e5bd1, 0x7e15d72b, 0xc1e49d52 }, + { 0x410be8da, 0x81e75e89, 0x3d241cce, 0x7e21b544, 0xc1d90e24 }, + { 0x41231051, 0x81dcccb3, 0x3d18ec37, 0x7e2d1ee6, 0xc1cdef10 }, + { 0x413acdd0, 0x81d2b39e, 0x3d0cc20a, 0x7e38184e, 0xc1c33c13 }, + { 0x41532ea7, 0x81c90ffb, 0x3cff9585, 0x7e42a58b, 0xc1b8f15a }, + { 0x416c40cd, 0x81bfdeb2, 0x3cf15d21, 0x7e4cca7c, 0xc1af0b3f }, + { 0x418612ea, 0x81b71cdc, 0x3ce20e85, 0x7e568ad3, 0xc1a58640 }, + { 0x41a0b465, 0x81aec7c5, 0x3cd19e7c, 0x7e5fea1e, 0xc19c5f03 }, + { 0x41bc3573, 0x81a6dcea, 0x3cc000e9, 0x7e68ebc2, 0xc1939250 } +}; + +static const u32 treble_table[41][5] = { + { 0x0125cba9, 0xfed5debd, 0x00599b6c, 0x0d2506da, 0xfa85b354 }, + { 0x0142f67e, 0xfeb03163, 0x0066cd0f, 0x0d14c69d, 0xfa914473 }, + { 0x016328bd, 0xfe860158, 0x0075b7f2, 0x0d03eb27, 0xfa9d32d2 }, + { 0x0186b438, 0xfe56c982, 0x00869234, 0x0cf27048, 0xfaa97fca }, + { 0x01adf358, 0xfe21f5fe, 0x00999842, 0x0ce051c2, 0xfab62ca5 }, + { 0x01d949fa, 0xfde6e287, 0x00af0d8d, 0x0ccd8b4a, 0xfac33aa7 }, + { 0x02092669, 0xfda4d8bf, 0x00c73d4c, 0x0cba1884, 0xfad0ab07 }, + { 0x023e0268, 0xfd5b0e4a, 0x00e27b54, 0x0ca5f509, 0xfade7ef2 }, + { 0x0278645c, 0xfd08a2b0, 0x01012509, 0x0c911c63, 0xfaecb788 }, + { 0x02b8e091, 0xfcac9d1a, 0x0123a262, 0x0c7b8a14, 0xfafb55df }, + { 0x03001a9a, 0xfc45e9ce, 0x014a6709, 0x0c65398f, 0xfb0a5aff }, + { 0x034ec6d7, 0xfbd3576b, 0x0175f397, 0x0c4e2643, 0xfb19c7e4 }, + { 0x03a5ac15, 0xfb5393ee, 0x01a6d6ed, 0x0c364b94, 0xfb299d7c }, + { 0x0405a562, 0xfac52968, 0x01ddafae, 0x0c1da4e2, 0xfb39dca5 }, + { 0x046fa3fe, 0xfa267a66, 0x021b2ddd, 0x0c042d8d, 0xfb4a8631 }, + { 0x04e4b17f, 0xf975be0f, 0x0260149f, 0x0be9e0f2, 0xfb5b9ae0 }, + { 0x0565f220, 0xf8b0fbe5, 0x02ad3c29, 0x0bceba73, 0xfb6d1b60 }, + { 0x05f4a745, 0xf7d60722, 0x030393d4, 0x0bb2b578, 0xfb7f084d }, + { 0x06923236, 0xf6e279bd, 0x03642465, 0x0b95cd75, 0xfb916233 }, + { 0x07401713, 0xf5d3aef9, 0x03d01283, 0x0b77fded, 0xfba42984 }, + { 0x08000000, 0xf4a6bd88, 0x0448a161, 0x0b594278, 0xfbb75e9f }, + { 0x08d3c097, 0xf3587131, 0x04cf35a4, 0x0b3996c9, 0xfbcb01cb }, + { 0x09bd59a2, 0xf1e543f9, 0x05655880, 0x0b18f6b2, 0xfbdf1333 }, + { 0x0abefd0f, 0xf04956ca, 0x060cbb12, 0x0af75e2c, 0xfbf392e8 }, + { 0x0bdb123e, 0xee806984, 0x06c739fe, 0x0ad4c962, 0xfc0880dd }, + { 0x0d143a94, 0xec85d287, 0x0796e150, 0x0ab134b0, 0xfc1ddce5 }, + { 0x0e6d5664, 0xea547598, 0x087df0a0, 0x0a8c9cb6, 0xfc33a6ad }, + { 0x0fe98a2a, 0xe7e6ba35, 0x097edf83, 0x0a66fe5b, 0xfc49ddc2 }, + { 0x118c4421, 0xe536813a, 0x0a9c6248, 0x0a4056d7, 0xfc608185 }, + { 0x1359422e, 0xe23d19eb, 0x0bd96efb, 0x0a18a3bf, 0xfc77912c }, + { 0x1554982b, 0xdef33645, 0x0d3942bd, 0x09efe312, 0xfc8f0bc1 }, + { 0x1782b68a, 0xdb50deb1, 0x0ebf676d, 0x09c6133f, 0xfca6f019 }, + { 0x19e8715d, 0xd74d64fd, 0x106fb999, 0x099b3337, 0xfcbf3cd6 }, + { 0x1c8b07b8, 0xd2df56ab, 0x124e6ec8, 0x096f4274, 0xfcd7f060 }, + { 0x1f702b6d, 0xcdfc6e92, 0x14601c10, 0x0942410b, 0xfcf108e5 }, + { 0x229e0933, 0xc89985cd, 0x16a9bcfa, 0x09142fb5, 0xfd0a8451 }, + { 0x261b5118, 0xc2aa8409, 0x1930bab6, 0x08e50fdc, 0xfd24604d }, + { 0x29ef3f5d, 0xbc224f28, 0x1bfaf396, 0x08b4e3aa, 0xfd3e9a3b }, + { 0x2e21a59b, 0xb4f2ba46, 0x1f0ec2d6, 0x0883ae15, 0xfd592f33 }, + { 0x32baf44b, 0xad0c7429, 0x227308a3, 0x085172eb, 0xfd741bfd }, + { 0x37c4448b, 0xa45ef51d, 0x262f3267, 0x081e36dc, 0xfd8f5d14 } +}; + +/* dB gain = (float) 20 * log10( float(db_table_value) / 0x8000000 ) */ +static const u32 db_table[101] = { + 0x00000000, 0x01571f82, 0x01674b41, 0x01783a1b, 0x0189f540, + 0x019c8651, 0x01aff763, 0x01c45306, 0x01d9a446, 0x01eff6b8, + 0x0207567a, 0x021fd03d, 0x0239714c, 0x02544792, 0x027061a1, + 0x028dcebb, 0x02ac9edc, 0x02cce2bf, 0x02eeabe8, 0x03120cb0, + 0x0337184e, 0x035de2df, 0x03868173, 0x03b10a18, 0x03dd93e9, + 0x040c3713, 0x043d0cea, 0x04702ff3, 0x04a5bbf2, 0x04ddcdfb, + 0x0518847f, 0x0555ff62, 0x05966005, 0x05d9c95d, 0x06206005, + 0x066a4a52, 0x06b7b067, 0x0708bc4c, 0x075d9a01, 0x07b6779d, + 0x08138561, 0x0874f5d5, 0x08dafde1, 0x0945d4ed, 0x09b5b4fd, + 0x0a2adad1, 0x0aa58605, 0x0b25f936, 0x0bac7a24, 0x0c3951d8, + 0x0ccccccc, 0x0d673b17, 0x0e08f093, 0x0eb24510, 0x0f639481, + 0x101d3f2d, 0x10dfa9e6, 0x11ab3e3f, 0x12806ac3, 0x135fa333, + 0x144960c5, 0x153e2266, 0x163e6cfe, 0x174acbb7, 0x1863d04d, + 0x198a1357, 0x1abe349f, 0x1c00db77, 0x1d52b712, 0x1eb47ee6, + 0x2026f30f, 0x21aadcb6, 0x23410e7e, 0x24ea64f9, 0x26a7c71d, + 0x287a26c4, 0x2a62812c, 0x2c61df84, 0x2e795779, 0x30aa0bcf, + 0x32f52cfe, 0x355bf9d8, 0x37dfc033, 0x3a81dda4, 0x3d43c038, + 0x4026e73c, 0x432ce40f, 0x46575af8, 0x49a8040f, 0x4d20ac2a, + 0x50c335d3, 0x54919a57, 0x588dead1, 0x5cba514a, 0x611911ea, + 0x65ac8c2f, 0x6a773c39, 0x6f7bbc23, 0x74bcc56c, 0x7a3d3272, + 0x7fffffff, +}; + +/* EMU10k1/EMU10k2 DSP control db gain */ +static const DECLARE_TLV_DB_SCALE(snd_emu10k1_db_scale1, -4000, 40, 1); +static const DECLARE_TLV_DB_LINEAR(snd_emu10k1_db_linear, TLV_DB_GAIN_MUTE, 0); + +/* EMU10K1 bass/treble db gain */ +static const DECLARE_TLV_DB_SCALE(snd_emu10k1_bass_treble_db_scale, -1200, 60, 0); + +static const u32 onoff_table[2] = { + 0x00000000, 0x00000001 +}; + +/* + * controls + */ + +static int snd_emu10k1_gpr_ctl_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) +{ + struct snd_emu10k1_fx8010_ctl *ctl = + (struct snd_emu10k1_fx8010_ctl *) kcontrol->private_value; + + if (ctl->min == 0 && ctl->max == 1) + uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; + else + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = ctl->vcount; + uinfo->value.integer.min = ctl->min; + uinfo->value.integer.max = ctl->max; + return 0; +} + +static int snd_emu10k1_gpr_ctl_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) +{ + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1_fx8010_ctl *ctl = + (struct snd_emu10k1_fx8010_ctl *) kcontrol->private_value; + unsigned long flags; + unsigned int i; + + spin_lock_irqsave(&emu->reg_lock, flags); + for (i = 0; i < ctl->vcount; i++) + ucontrol->value.integer.value[i] = ctl->value[i]; + spin_unlock_irqrestore(&emu->reg_lock, flags); + return 0; +} + +static int snd_emu10k1_gpr_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) +{ + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); + struct snd_emu10k1_fx8010_ctl *ctl = + (struct snd_emu10k1_fx8010_ctl *) kcontrol->private_value; + unsigned long flags; + unsigned int nval, val; + unsigned int i, j; + int change = 0; + + spin_lock_irqsave(&emu->reg_lock, flags); + for (i = 0; i < ctl->vcount; i++) { + nval = ucontrol->value.integer.value[i]; + if (nval < ctl->min) + nval = ctl->min; + if (nval > ctl->max) + nval = ctl->max; + if (nval != ctl->value[i]) + change = 1; + val = ctl->value[i] = nval; + switch (ctl->translation) { + case EMU10K1_GPR_TRANSLATION_NONE: + snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[i], 0, val); + break; + case EMU10K1_GPR_TRANSLATION_TABLE100: + snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[i], 0, db_table[val]); + break; + case EMU10K1_GPR_TRANSLATION_BASS: + if ((ctl->count % 5) != 0 || (ctl->count / 5) != ctl->vcount) { + change = -EIO; + goto __error; + } + for (j = 0; j < 5; j++) + snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[j * ctl->vcount + i], 0, bass_table[val][j]); + break; + case EMU10K1_GPR_TRANSLATION_TREBLE: + if ((ctl->count % 5) != 0 || (ctl->count / 5) != ctl->vcount) { + change = -EIO; + goto __error; + } + for (j = 0; j < 5; j++) + snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[j * ctl->vcount + i], 0, treble_table[val][j]); + break; + case EMU10K1_GPR_TRANSLATION_ONOFF: + snd_emu10k1_ptr_write(emu, emu->gpr_base + ctl->gpr[i], 0, onoff_table[val]); + break; + } + } + __error: + spin_unlock_irqrestore(&emu->reg_lock, flags); + return change; +} + +/* + * Interrupt handler + */ + +static void snd_emu10k1_fx8010_interrupt(struct snd_emu10k1 *emu) +{ + struct snd_emu10k1_fx8010_irq *irq, *nirq; + + irq = emu->fx8010.irq_handlers; + while (irq) { + nirq = irq->next; /* irq ptr can be removed from list */ + if (snd_emu10k1_ptr_read(emu, emu->gpr_base + irq->gpr_running, 0) & 0xffff0000) { + if (irq->handler) + irq->handler(emu, irq->private_data); + snd_emu10k1_ptr_write(emu, emu->gpr_base + irq->gpr_running, 0, 1); + } + irq = nirq; + } +} + +int snd_emu10k1_fx8010_register_irq_handler(struct snd_emu10k1 *emu, + snd_fx8010_irq_handler_t *handler, + unsigned char gpr_running, + void *private_data, + struct snd_emu10k1_fx8010_irq *irq) +{ + unsigned long flags; + + irq->handler = handler; + irq->gpr_running = gpr_running; + irq->private_data = private_data; + irq->next = NULL; + spin_lock_irqsave(&emu->fx8010.irq_lock, flags); + if (emu->fx8010.irq_handlers == NULL) { + emu->fx8010.irq_handlers = irq; + emu->dsp_interrupt = snd_emu10k1_fx8010_interrupt; + snd_emu10k1_intr_enable(emu, INTE_FXDSPENABLE); + } else { + irq->next = emu->fx8010.irq_handlers; + emu->fx8010.irq_handlers = irq; + } + spin_unlock_irqrestore(&emu->fx8010.irq_lock, flags); + return 0; +} + +int snd_emu10k1_fx8010_unregister_irq_handler(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_irq *irq) +{ + struct snd_emu10k1_fx8010_irq *tmp; + unsigned long flags; + + spin_lock_irqsave(&emu->fx8010.irq_lock, flags); + if ((tmp = emu->fx8010.irq_handlers) == irq) { + emu->fx8010.irq_handlers = tmp->next; + if (emu->fx8010.irq_handlers == NULL) { + snd_emu10k1_intr_disable(emu, INTE_FXDSPENABLE); + emu->dsp_interrupt = NULL; + } + } else { + while (tmp && tmp->next != irq) + tmp = tmp->next; + if (tmp) + tmp->next = tmp->next->next; + } + spin_unlock_irqrestore(&emu->fx8010.irq_lock, flags); + return 0; +} + +/************************************************************************* + * EMU10K1 effect manager + *************************************************************************/ + +static void snd_emu10k1_write_op(struct snd_emu10k1_fx8010_code *icode, + unsigned int *ptr, + u32 op, u32 r, u32 a, u32 x, u32 y) +{ + u_int32_t *code; + if (snd_BUG_ON(*ptr >= 512)) + return; + code = (u_int32_t __force *)icode->code + (*ptr) * 2; + set_bit(*ptr, icode->code_valid); + code[0] = ((x & 0x3ff) << 10) | (y & 0x3ff); + code[1] = ((op & 0x0f) << 20) | ((r & 0x3ff) << 10) | (a & 0x3ff); + (*ptr)++; +} + +#define OP(icode, ptr, op, r, a, x, y) \ + snd_emu10k1_write_op(icode, ptr, op, r, a, x, y) + +static void snd_emu10k1_audigy_write_op(struct snd_emu10k1_fx8010_code *icode, + unsigned int *ptr, + u32 op, u32 r, u32 a, u32 x, u32 y) +{ + u_int32_t *code; + if (snd_BUG_ON(*ptr >= 1024)) + return; + code = (u_int32_t __force *)icode->code + (*ptr) * 2; + set_bit(*ptr, icode->code_valid); + code[0] = ((x & 0x7ff) << 12) | (y & 0x7ff); + code[1] = ((op & 0x0f) << 24) | ((r & 0x7ff) << 12) | (a & 0x7ff); + (*ptr)++; +} + +#define A_OP(icode, ptr, op, r, a, x, y) \ + snd_emu10k1_audigy_write_op(icode, ptr, op, r, a, x, y) + +static void snd_emu10k1_efx_write(struct snd_emu10k1 *emu, unsigned int pc, unsigned int data) +{ + pc += emu->audigy ? A_MICROCODEBASE : MICROCODEBASE; + snd_emu10k1_ptr_write(emu, pc, 0, data); +} + +unsigned int snd_emu10k1_efx_read(struct snd_emu10k1 *emu, unsigned int pc) +{ + pc += emu->audigy ? A_MICROCODEBASE : MICROCODEBASE; + return snd_emu10k1_ptr_read(emu, pc, 0); +} + +static int snd_emu10k1_gpr_poke(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_code *icode, + bool in_kernel) +{ + int gpr; + u32 val; + + for (gpr = 0; gpr < (emu->audigy ? 0x200 : 0x100); gpr++) { + if (!test_bit(gpr, icode->gpr_valid)) + continue; + if (in_kernel) + val = *(__force u32 *)&icode->gpr_map[gpr]; + else if (get_user(val, &icode->gpr_map[gpr])) + return -EFAULT; + snd_emu10k1_ptr_write(emu, emu->gpr_base + gpr, 0, val); + } + return 0; +} + +static int snd_emu10k1_gpr_peek(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_code *icode) +{ + int gpr; + u32 val; + + for (gpr = 0; gpr < (emu->audigy ? 0x200 : 0x100); gpr++) { + set_bit(gpr, icode->gpr_valid); + val = snd_emu10k1_ptr_read(emu, emu->gpr_base + gpr, 0); + if (put_user(val, &icode->gpr_map[gpr])) + return -EFAULT; + } + return 0; +} + +static int snd_emu10k1_tram_poke(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_code *icode, + bool in_kernel) +{ + int tram; + u32 addr, val; + + for (tram = 0; tram < (emu->audigy ? 0x100 : 0xa0); tram++) { + if (!test_bit(tram, icode->tram_valid)) + continue; + if (in_kernel) { + val = *(__force u32 *)&icode->tram_data_map[tram]; + addr = *(__force u32 *)&icode->tram_addr_map[tram]; + } else { + if (get_user(val, &icode->tram_data_map[tram]) || + get_user(addr, &icode->tram_addr_map[tram])) + return -EFAULT; + } + snd_emu10k1_ptr_write(emu, TANKMEMDATAREGBASE + tram, 0, val); + if (!emu->audigy) { + snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + tram, 0, addr); + } else { + snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + tram, 0, addr << 12); + snd_emu10k1_ptr_write(emu, A_TANKMEMCTLREGBASE + tram, 0, addr >> 20); + } + } + return 0; +} + +static int snd_emu10k1_tram_peek(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_code *icode) +{ + int tram; + u32 val, addr; + + memset(icode->tram_valid, 0, sizeof(icode->tram_valid)); + for (tram = 0; tram < (emu->audigy ? 0x100 : 0xa0); tram++) { + set_bit(tram, icode->tram_valid); + val = snd_emu10k1_ptr_read(emu, TANKMEMDATAREGBASE + tram, 0); + if (!emu->audigy) { + addr = snd_emu10k1_ptr_read(emu, TANKMEMADDRREGBASE + tram, 0); + } else { + addr = snd_emu10k1_ptr_read(emu, TANKMEMADDRREGBASE + tram, 0) >> 12; + addr |= snd_emu10k1_ptr_read(emu, A_TANKMEMCTLREGBASE + tram, 0) << 20; + } + if (put_user(val, &icode->tram_data_map[tram]) || + put_user(addr, &icode->tram_addr_map[tram])) + return -EFAULT; + } + return 0; +} + +static int snd_emu10k1_code_poke(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_code *icode, + bool in_kernel) +{ + u32 pc, lo, hi; + + for (pc = 0; pc < (emu->audigy ? 2*1024 : 2*512); pc += 2) { + if (!test_bit(pc / 2, icode->code_valid)) + continue; + if (in_kernel) { + lo = *(__force u32 *)&icode->code[pc + 0]; + hi = *(__force u32 *)&icode->code[pc + 1]; + } else { + if (get_user(lo, &icode->code[pc + 0]) || + get_user(hi, &icode->code[pc + 1])) + return -EFAULT; + } + snd_emu10k1_efx_write(emu, pc + 0, lo); + snd_emu10k1_efx_write(emu, pc + 1, hi); + } + return 0; +} + +static int snd_emu10k1_code_peek(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_code *icode) +{ + u32 pc; + + memset(icode->code_valid, 0, sizeof(icode->code_valid)); + for (pc = 0; pc < (emu->audigy ? 2*1024 : 2*512); pc += 2) { + set_bit(pc / 2, icode->code_valid); + if (put_user(snd_emu10k1_efx_read(emu, pc + 0), &icode->code[pc + 0])) + return -EFAULT; + if (put_user(snd_emu10k1_efx_read(emu, pc + 1), &icode->code[pc + 1])) + return -EFAULT; + } + return 0; +} + +static struct snd_emu10k1_fx8010_ctl * +snd_emu10k1_look_for_ctl(struct snd_emu10k1 *emu, struct snd_ctl_elem_id *id) +{ + struct snd_emu10k1_fx8010_ctl *ctl; + struct snd_kcontrol *kcontrol; + + list_for_each_entry(ctl, &emu->fx8010.gpr_ctl, list) { + kcontrol = ctl->kcontrol; + if (kcontrol->id.iface == id->iface && + !strcmp(kcontrol->id.name, id->name) && + kcontrol->id.index == id->index) + return ctl; + } + return NULL; +} + +#define MAX_TLV_SIZE 256 + +static unsigned int *copy_tlv(const unsigned int __user *_tlv, bool in_kernel) +{ + unsigned int data[2]; + unsigned int *tlv; + + if (!_tlv) + return NULL; + if (in_kernel) + memcpy(data, (__force void *)_tlv, sizeof(data)); + else if (copy_from_user(data, _tlv, sizeof(data))) + return NULL; + if (data[1] >= MAX_TLV_SIZE) + return NULL; + tlv = kmalloc(data[1] + sizeof(data), GFP_KERNEL); + if (!tlv) + return NULL; + memcpy(tlv, data, sizeof(data)); + if (in_kernel) { + memcpy(tlv + 2, (__force void *)(_tlv + 2), data[1]); + } else if (copy_from_user(tlv + 2, _tlv + 2, data[1])) { + kfree(tlv); + return NULL; + } + return tlv; +} + +static int copy_gctl(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_control_gpr *gctl, + struct snd_emu10k1_fx8010_control_gpr __user *_gctl, + int idx, bool in_kernel) +{ + struct snd_emu10k1_fx8010_control_old_gpr __user *octl; + + if (emu->support_tlv) { + if (in_kernel) + memcpy(gctl, (__force void *)&_gctl[idx], sizeof(*gctl)); + else if (copy_from_user(gctl, &_gctl[idx], sizeof(*gctl))) + return -EFAULT; + return 0; + } + + octl = (struct snd_emu10k1_fx8010_control_old_gpr __user *)_gctl; + if (in_kernel) + memcpy(gctl, (__force void *)&octl[idx], sizeof(*octl)); + else if (copy_from_user(gctl, &octl[idx], sizeof(*octl))) + return -EFAULT; + gctl->tlv = NULL; + return 0; +} + +static int copy_gctl_to_user(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_control_gpr __user *_gctl, + struct snd_emu10k1_fx8010_control_gpr *gctl, + int idx) +{ + struct snd_emu10k1_fx8010_control_old_gpr __user *octl; + + if (emu->support_tlv) + return copy_to_user(&_gctl[idx], gctl, sizeof(*gctl)); + + octl = (struct snd_emu10k1_fx8010_control_old_gpr __user *)_gctl; + return copy_to_user(&octl[idx], gctl, sizeof(*octl)); +} + +static int snd_emu10k1_verify_controls(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_code *icode, + bool in_kernel) +{ + unsigned int i; + struct snd_ctl_elem_id __user *_id; + struct snd_ctl_elem_id id; + struct snd_emu10k1_fx8010_control_gpr *gctl; + int err; + + for (i = 0, _id = icode->gpr_del_controls; + i < icode->gpr_del_control_count; i++, _id++) { + if (in_kernel) + id = *(__force struct snd_ctl_elem_id *)_id; + else if (copy_from_user(&id, _id, sizeof(id))) + return -EFAULT; + if (snd_emu10k1_look_for_ctl(emu, &id) == NULL) + return -ENOENT; + } + gctl = kmalloc(sizeof(*gctl), GFP_KERNEL); + if (! gctl) + return -ENOMEM; + err = 0; + for (i = 0; i < icode->gpr_add_control_count; i++) { + if (copy_gctl(emu, gctl, icode->gpr_add_controls, i, + in_kernel)) { + err = -EFAULT; + goto __error; + } + if (snd_emu10k1_look_for_ctl(emu, &gctl->id)) + continue; + down_read(&emu->card->controls_rwsem); + if (snd_ctl_find_id(emu->card, &gctl->id) != NULL) { + up_read(&emu->card->controls_rwsem); + err = -EEXIST; + goto __error; + } + up_read(&emu->card->controls_rwsem); + if (gctl->id.iface != SNDRV_CTL_ELEM_IFACE_MIXER && + gctl->id.iface != SNDRV_CTL_ELEM_IFACE_PCM) { + err = -EINVAL; + goto __error; + } + } + for (i = 0; i < icode->gpr_list_control_count; i++) { + /* FIXME: we need to check the WRITE access */ + if (copy_gctl(emu, gctl, icode->gpr_list_controls, i, + in_kernel)) { + err = -EFAULT; + goto __error; + } + } + __error: + kfree(gctl); + return err; +} + +static void snd_emu10k1_ctl_private_free(struct snd_kcontrol *kctl) +{ + struct snd_emu10k1_fx8010_ctl *ctl; + + ctl = (struct snd_emu10k1_fx8010_ctl *) kctl->private_value; + kctl->private_value = 0; + list_del(&ctl->list); + kfree(ctl); + kfree(kctl->tlv.p); +} + +static int snd_emu10k1_add_controls(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_code *icode, + bool in_kernel) +{ + unsigned int i, j; + struct snd_emu10k1_fx8010_control_gpr *gctl; + struct snd_emu10k1_fx8010_ctl *ctl, *nctl; + struct snd_kcontrol_new knew; + struct snd_kcontrol *kctl; + struct snd_ctl_elem_value *val; + int err = 0; + + val = kmalloc(sizeof(*val), GFP_KERNEL); + gctl = kmalloc(sizeof(*gctl), GFP_KERNEL); + nctl = kmalloc(sizeof(*nctl), GFP_KERNEL); + if (!val || !gctl || !nctl) { + err = -ENOMEM; + goto __error; + } + + for (i = 0; i < icode->gpr_add_control_count; i++) { + if (copy_gctl(emu, gctl, icode->gpr_add_controls, i, + in_kernel)) { + err = -EFAULT; + goto __error; + } + if (gctl->id.iface != SNDRV_CTL_ELEM_IFACE_MIXER && + gctl->id.iface != SNDRV_CTL_ELEM_IFACE_PCM) { + err = -EINVAL; + goto __error; + } + if (! gctl->id.name[0]) { + err = -EINVAL; + goto __error; + } + ctl = snd_emu10k1_look_for_ctl(emu, &gctl->id); + memset(&knew, 0, sizeof(knew)); + knew.iface = gctl->id.iface; + knew.name = gctl->id.name; + knew.index = gctl->id.index; + knew.device = gctl->id.device; + knew.subdevice = gctl->id.subdevice; + knew.info = snd_emu10k1_gpr_ctl_info; + knew.tlv.p = copy_tlv((__force const unsigned int __user *)gctl->tlv, in_kernel); + if (knew.tlv.p) + knew.access = SNDRV_CTL_ELEM_ACCESS_READWRITE | + SNDRV_CTL_ELEM_ACCESS_TLV_READ; + knew.get = snd_emu10k1_gpr_ctl_get; + knew.put = snd_emu10k1_gpr_ctl_put; + memset(nctl, 0, sizeof(*nctl)); + nctl->vcount = gctl->vcount; + nctl->count = gctl->count; + for (j = 0; j < 32; j++) { + nctl->gpr[j] = gctl->gpr[j]; + nctl->value[j] = ~gctl->value[j]; /* inverted, we want to write new value in gpr_ctl_put() */ + val->value.integer.value[j] = gctl->value[j]; + } + nctl->min = gctl->min; + nctl->max = gctl->max; + nctl->translation = gctl->translation; + if (ctl == NULL) { + ctl = kmalloc(sizeof(*ctl), GFP_KERNEL); + if (ctl == NULL) { + err = -ENOMEM; + kfree(knew.tlv.p); + goto __error; + } + knew.private_value = (unsigned long)ctl; + *ctl = *nctl; + if ((err = snd_ctl_add(emu->card, kctl = snd_ctl_new1(&knew, emu))) < 0) { + kfree(ctl); + kfree(knew.tlv.p); + goto __error; + } + kctl->private_free = snd_emu10k1_ctl_private_free; + ctl->kcontrol = kctl; + list_add_tail(&ctl->list, &emu->fx8010.gpr_ctl); + } else { + /* overwrite */ + nctl->list = ctl->list; + nctl->kcontrol = ctl->kcontrol; + *ctl = *nctl; + snd_ctl_notify(emu->card, SNDRV_CTL_EVENT_MASK_VALUE | + SNDRV_CTL_EVENT_MASK_INFO, &ctl->kcontrol->id); + } + snd_emu10k1_gpr_ctl_put(ctl->kcontrol, val); + } + __error: + kfree(nctl); + kfree(gctl); + kfree(val); + return err; +} + +static int snd_emu10k1_del_controls(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_code *icode, + bool in_kernel) +{ + unsigned int i; + struct snd_ctl_elem_id id; + struct snd_ctl_elem_id __user *_id; + struct snd_emu10k1_fx8010_ctl *ctl; + struct snd_card *card = emu->card; + + for (i = 0, _id = icode->gpr_del_controls; + i < icode->gpr_del_control_count; i++, _id++) { + if (in_kernel) + id = *(__force struct snd_ctl_elem_id *)_id; + else if (copy_from_user(&id, _id, sizeof(id))) + return -EFAULT; + down_write(&card->controls_rwsem); + ctl = snd_emu10k1_look_for_ctl(emu, &id); + if (ctl) + snd_ctl_remove(card, ctl->kcontrol); + up_write(&card->controls_rwsem); + } + return 0; +} + +static int snd_emu10k1_list_controls(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_code *icode) +{ + unsigned int i = 0, j; + unsigned int total = 0; + struct snd_emu10k1_fx8010_control_gpr *gctl; + struct snd_emu10k1_fx8010_ctl *ctl; + struct snd_ctl_elem_id *id; + + gctl = kmalloc(sizeof(*gctl), GFP_KERNEL); + if (! gctl) + return -ENOMEM; + + list_for_each_entry(ctl, &emu->fx8010.gpr_ctl, list) { + total++; + if (icode->gpr_list_controls && + i < icode->gpr_list_control_count) { + memset(gctl, 0, sizeof(*gctl)); + id = &ctl->kcontrol->id; + gctl->id.iface = id->iface; + strlcpy(gctl->id.name, id->name, sizeof(gctl->id.name)); + gctl->id.index = id->index; + gctl->id.device = id->device; + gctl->id.subdevice = id->subdevice; + gctl->vcount = ctl->vcount; + gctl->count = ctl->count; + for (j = 0; j < 32; j++) { + gctl->gpr[j] = ctl->gpr[j]; + gctl->value[j] = ctl->value[j]; + } + gctl->min = ctl->min; + gctl->max = ctl->max; + gctl->translation = ctl->translation; + if (copy_gctl_to_user(emu, icode->gpr_list_controls, + gctl, i)) { + kfree(gctl); + return -EFAULT; + } + i++; + } + } + icode->gpr_list_control_total = total; + kfree(gctl); + return 0; +} + +static int snd_emu10k1_icode_poke(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_code *icode, + bool in_kernel) +{ + int err = 0; + + mutex_lock(&emu->fx8010.lock); + err = snd_emu10k1_verify_controls(emu, icode, in_kernel); + if (err < 0) + goto __error; + strlcpy(emu->fx8010.name, icode->name, sizeof(emu->fx8010.name)); + /* stop FX processor - this may be dangerous, but it's better to miss + some samples than generate wrong ones - [jk] */ + if (emu->audigy) + snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg | A_DBG_SINGLE_STEP); + else + snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg | EMU10K1_DBG_SINGLE_STEP); + /* ok, do the main job */ + err = snd_emu10k1_del_controls(emu, icode, in_kernel); + if (err < 0) + goto __error; + err = snd_emu10k1_gpr_poke(emu, icode, in_kernel); + if (err < 0) + goto __error; + err = snd_emu10k1_tram_poke(emu, icode, in_kernel); + if (err < 0) + goto __error; + err = snd_emu10k1_code_poke(emu, icode, in_kernel); + if (err < 0) + goto __error; + err = snd_emu10k1_add_controls(emu, icode, in_kernel); + if (err < 0) + goto __error; + /* start FX processor when the DSP code is updated */ + if (emu->audigy) + snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg); + else + snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg); + __error: + mutex_unlock(&emu->fx8010.lock); + return err; +} + +static int snd_emu10k1_icode_peek(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_code *icode) +{ + int err; + + mutex_lock(&emu->fx8010.lock); + strlcpy(icode->name, emu->fx8010.name, sizeof(icode->name)); + /* ok, do the main job */ + err = snd_emu10k1_gpr_peek(emu, icode); + if (err >= 0) + err = snd_emu10k1_tram_peek(emu, icode); + if (err >= 0) + err = snd_emu10k1_code_peek(emu, icode); + if (err >= 0) + err = snd_emu10k1_list_controls(emu, icode); + mutex_unlock(&emu->fx8010.lock); + return err; +} + +static int snd_emu10k1_ipcm_poke(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_pcm_rec *ipcm) +{ + unsigned int i; + int err = 0; + struct snd_emu10k1_fx8010_pcm *pcm; + + if (ipcm->substream >= EMU10K1_FX8010_PCM_COUNT) + return -EINVAL; + ipcm->substream = array_index_nospec(ipcm->substream, + EMU10K1_FX8010_PCM_COUNT); + if (ipcm->channels > 32) + return -EINVAL; + pcm = &emu->fx8010.pcm[ipcm->substream]; + mutex_lock(&emu->fx8010.lock); + spin_lock_irq(&emu->reg_lock); + if (pcm->opened) { + err = -EBUSY; + goto __error; + } + if (ipcm->channels == 0) { /* remove */ + pcm->valid = 0; + } else { + /* FIXME: we need to add universal code to the PCM transfer routine */ + if (ipcm->channels != 2) { + err = -EINVAL; + goto __error; + } + pcm->valid = 1; + pcm->opened = 0; + pcm->channels = ipcm->channels; + pcm->tram_start = ipcm->tram_start; + pcm->buffer_size = ipcm->buffer_size; + pcm->gpr_size = ipcm->gpr_size; + pcm->gpr_count = ipcm->gpr_count; + pcm->gpr_tmpcount = ipcm->gpr_tmpcount; + pcm->gpr_ptr = ipcm->gpr_ptr; + pcm->gpr_trigger = ipcm->gpr_trigger; + pcm->gpr_running = ipcm->gpr_running; + for (i = 0; i < pcm->channels; i++) + pcm->etram[i] = ipcm->etram[i]; + } + __error: + spin_unlock_irq(&emu->reg_lock); + mutex_unlock(&emu->fx8010.lock); + return err; +} + +static int snd_emu10k1_ipcm_peek(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_pcm_rec *ipcm) +{ + unsigned int i; + int err = 0; + struct snd_emu10k1_fx8010_pcm *pcm; + + if (ipcm->substream >= EMU10K1_FX8010_PCM_COUNT) + return -EINVAL; + ipcm->substream = array_index_nospec(ipcm->substream, + EMU10K1_FX8010_PCM_COUNT); + pcm = &emu->fx8010.pcm[ipcm->substream]; + mutex_lock(&emu->fx8010.lock); + spin_lock_irq(&emu->reg_lock); + ipcm->channels = pcm->channels; + ipcm->tram_start = pcm->tram_start; + ipcm->buffer_size = pcm->buffer_size; + ipcm->gpr_size = pcm->gpr_size; + ipcm->gpr_ptr = pcm->gpr_ptr; + ipcm->gpr_count = pcm->gpr_count; + ipcm->gpr_tmpcount = pcm->gpr_tmpcount; + ipcm->gpr_trigger = pcm->gpr_trigger; + ipcm->gpr_running = pcm->gpr_running; + for (i = 0; i < pcm->channels; i++) + ipcm->etram[i] = pcm->etram[i]; + ipcm->res1 = ipcm->res2 = 0; + ipcm->pad = 0; + spin_unlock_irq(&emu->reg_lock); + mutex_unlock(&emu->fx8010.lock); + return err; +} + +#define SND_EMU10K1_GPR_CONTROLS 44 +#define SND_EMU10K1_INPUTS 12 +#define SND_EMU10K1_PLAYBACK_CHANNELS 8 +#define SND_EMU10K1_CAPTURE_CHANNELS 4 + +static void +snd_emu10k1_init_mono_control(struct snd_emu10k1_fx8010_control_gpr *ctl, + const char *name, int gpr, int defval) +{ + ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; + strcpy(ctl->id.name, name); + ctl->vcount = ctl->count = 1; + ctl->gpr[0] = gpr + 0; ctl->value[0] = defval; + if (high_res_gpr_volume) { + ctl->min = 0; + ctl->max = 0x7fffffff; + ctl->tlv = snd_emu10k1_db_linear; + ctl->translation = EMU10K1_GPR_TRANSLATION_NONE; + } else { + ctl->min = 0; + ctl->max = 100; + ctl->tlv = snd_emu10k1_db_scale1; + ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100; + } +} + +static void +snd_emu10k1_init_stereo_control(struct snd_emu10k1_fx8010_control_gpr *ctl, + const char *name, int gpr, int defval) +{ + ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; + strcpy(ctl->id.name, name); + ctl->vcount = ctl->count = 2; + ctl->gpr[0] = gpr + 0; ctl->value[0] = defval; + ctl->gpr[1] = gpr + 1; ctl->value[1] = defval; + if (high_res_gpr_volume) { + ctl->min = 0; + ctl->max = 0x7fffffff; + ctl->tlv = snd_emu10k1_db_linear; + ctl->translation = EMU10K1_GPR_TRANSLATION_NONE; + } else { + ctl->min = 0; + ctl->max = 100; + ctl->tlv = snd_emu10k1_db_scale1; + ctl->translation = EMU10K1_GPR_TRANSLATION_TABLE100; + } +} + +static void +snd_emu10k1_init_mono_onoff_control(struct snd_emu10k1_fx8010_control_gpr *ctl, + const char *name, int gpr, int defval) +{ + ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; + strcpy(ctl->id.name, name); + ctl->vcount = ctl->count = 1; + ctl->gpr[0] = gpr + 0; ctl->value[0] = defval; + ctl->min = 0; + ctl->max = 1; + ctl->translation = EMU10K1_GPR_TRANSLATION_ONOFF; +} + +static void +snd_emu10k1_init_stereo_onoff_control(struct snd_emu10k1_fx8010_control_gpr *ctl, + const char *name, int gpr, int defval) +{ + ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; + strcpy(ctl->id.name, name); + ctl->vcount = ctl->count = 2; + ctl->gpr[0] = gpr + 0; ctl->value[0] = defval; + ctl->gpr[1] = gpr + 1; ctl->value[1] = defval; + ctl->min = 0; + ctl->max = 1; + ctl->translation = EMU10K1_GPR_TRANSLATION_ONOFF; +} + +/* + * Used for emu1010 - conversion from 32-bit capture inputs from HANA + * to 2 x 16-bit registers in audigy - their values are read via DMA. + * Conversion is performed by Audigy DSP instructions of FX8010. + */ +static int snd_emu10k1_audigy_dsp_convert_32_to_2x16( + struct snd_emu10k1_fx8010_code *icode, + u32 *ptr, int tmp, int bit_shifter16, + int reg_in, int reg_out) +{ + A_OP(icode, ptr, iACC3, A_GPR(tmp + 1), reg_in, A_C_00000000, A_C_00000000); + A_OP(icode, ptr, iANDXOR, A_GPR(tmp), A_GPR(tmp + 1), A_GPR(bit_shifter16 - 1), A_C_00000000); + A_OP(icode, ptr, iTSTNEG, A_GPR(tmp + 2), A_GPR(tmp), A_C_80000000, A_GPR(bit_shifter16 - 2)); + A_OP(icode, ptr, iANDXOR, A_GPR(tmp + 2), A_GPR(tmp + 2), A_C_80000000, A_C_00000000); + A_OP(icode, ptr, iANDXOR, A_GPR(tmp), A_GPR(tmp), A_GPR(bit_shifter16 - 3), A_C_00000000); + A_OP(icode, ptr, iMACINT0, A_GPR(tmp), A_C_00000000, A_GPR(tmp), A_C_00010000); + A_OP(icode, ptr, iANDXOR, reg_out, A_GPR(tmp), A_C_ffffffff, A_GPR(tmp + 2)); + A_OP(icode, ptr, iACC3, reg_out + 1, A_GPR(tmp + 1), A_C_00000000, A_C_00000000); + return 1; +} + +/* + * initial DSP configuration for Audigy + */ + +static int _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu) +{ + int err, i, z, gpr, nctl; + int bit_shifter16; + const int playback = 10; + const int capture = playback + (SND_EMU10K1_PLAYBACK_CHANNELS * 2); /* we reserve 10 voices */ + const int stereo_mix = capture + 2; + const int tmp = 0x88; + u32 ptr; + struct snd_emu10k1_fx8010_code *icode = NULL; + struct snd_emu10k1_fx8010_control_gpr *controls = NULL, *ctl; + u32 *gpr_map; + + err = -ENOMEM; + icode = kzalloc(sizeof(*icode), GFP_KERNEL); + if (!icode) + return err; + + icode->gpr_map = (u_int32_t __user *) kcalloc(512 + 256 + 256 + 2 * 1024, + sizeof(u_int32_t), GFP_KERNEL); + if (!icode->gpr_map) + goto __err_gpr; + controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, + sizeof(*controls), GFP_KERNEL); + if (!controls) + goto __err_ctrls; + + gpr_map = (u32 __force *)icode->gpr_map; + + icode->tram_data_map = icode->gpr_map + 512; + icode->tram_addr_map = icode->tram_data_map + 256; + icode->code = icode->tram_addr_map + 256; + + /* clear free GPRs */ + for (i = 0; i < 512; i++) + set_bit(i, icode->gpr_valid); + + /* clear TRAM data & address lines */ + for (i = 0; i < 256; i++) + set_bit(i, icode->tram_valid); + + strcpy(icode->name, "Audigy DSP code for ALSA"); + ptr = 0; + nctl = 0; + gpr = stereo_mix + 10; + gpr_map[gpr++] = 0x00007fff; + gpr_map[gpr++] = 0x00008000; + gpr_map[gpr++] = 0x0000ffff; + bit_shifter16 = gpr; + + /* stop FX processor */ + snd_emu10k1_ptr_write(emu, A_DBG, 0, (emu->fx8010.dbg = 0) | A_DBG_SINGLE_STEP); + +#if 1 + /* PCM front Playback Volume (independent from stereo mix) + * playback = 0 + ( gpr * FXBUS_PCM_LEFT_FRONT >> 31) + * where gpr contains attenuation from corresponding mixer control + * (snd_emu10k1_init_stereo_control) + */ + A_OP(icode, &ptr, iMAC0, A_GPR(playback), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT_FRONT)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+1), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_FRONT)); + snd_emu10k1_init_stereo_control(&controls[nctl++], "PCM Front Playback Volume", gpr, 100); + gpr += 2; + + /* PCM Surround Playback (independent from stereo mix) */ + A_OP(icode, &ptr, iMAC0, A_GPR(playback+2), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT_REAR)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+3), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_REAR)); + snd_emu10k1_init_stereo_control(&controls[nctl++], "PCM Surround Playback Volume", gpr, 100); + gpr += 2; + + /* PCM Side Playback (independent from stereo mix) */ + if (emu->card_capabilities->spk71) { + A_OP(icode, &ptr, iMAC0, A_GPR(playback+6), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT_SIDE)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+7), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_SIDE)); + snd_emu10k1_init_stereo_control(&controls[nctl++], "PCM Side Playback Volume", gpr, 100); + gpr += 2; + } + + /* PCM Center Playback (independent from stereo mix) */ + A_OP(icode, &ptr, iMAC0, A_GPR(playback+4), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_CENTER)); + snd_emu10k1_init_mono_control(&controls[nctl++], "PCM Center Playback Volume", gpr, 100); + gpr++; + + /* PCM LFE Playback (independent from stereo mix) */ + A_OP(icode, &ptr, iMAC0, A_GPR(playback+5), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LFE)); + snd_emu10k1_init_mono_control(&controls[nctl++], "PCM LFE Playback Volume", gpr, 100); + gpr++; + + /* + * Stereo Mix + */ + /* Wave (PCM) Playback Volume (will be renamed later) */ + A_OP(icode, &ptr, iMAC0, A_GPR(stereo_mix), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT)); + A_OP(icode, &ptr, iMAC0, A_GPR(stereo_mix+1), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT)); + snd_emu10k1_init_stereo_control(&controls[nctl++], "Wave Playback Volume", gpr, 100); + gpr += 2; + + /* Synth Playback */ + A_OP(icode, &ptr, iMAC0, A_GPR(stereo_mix+0), A_GPR(stereo_mix+0), A_GPR(gpr), A_FXBUS(FXBUS_MIDI_LEFT)); + A_OP(icode, &ptr, iMAC0, A_GPR(stereo_mix+1), A_GPR(stereo_mix+1), A_GPR(gpr+1), A_FXBUS(FXBUS_MIDI_RIGHT)); + snd_emu10k1_init_stereo_control(&controls[nctl++], "Synth Playback Volume", gpr, 100); + gpr += 2; + + /* Wave (PCM) Capture */ + A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT)); + A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT)); + snd_emu10k1_init_stereo_control(&controls[nctl++], "PCM Capture Volume", gpr, 0); + gpr += 2; + + /* Synth Capture */ + A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_GPR(capture+0), A_GPR(gpr), A_FXBUS(FXBUS_MIDI_LEFT)); + A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_GPR(capture+1), A_GPR(gpr+1), A_FXBUS(FXBUS_MIDI_RIGHT)); + snd_emu10k1_init_stereo_control(&controls[nctl++], "Synth Capture Volume", gpr, 0); + gpr += 2; + + /* + * inputs + */ +#define A_ADD_VOLUME_IN(var,vol,input) \ +A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input)) + + /* emu1212 DSP 0 and DSP 1 Capture */ + if (emu->card_capabilities->emu_model) { + if (emu->card_capabilities->ca0108_chip) { + /* Note:JCD:No longer bit shift lower 16bits to upper 16bits of 32bit value. */ + A_OP(icode, &ptr, iMACINT0, A_GPR(tmp), A_C_00000000, A3_EMU32IN(0x0), A_C_00000001); + A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_GPR(capture+0), A_GPR(gpr), A_GPR(tmp)); + A_OP(icode, &ptr, iMACINT0, A_GPR(tmp), A_C_00000000, A3_EMU32IN(0x1), A_C_00000001); + A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_GPR(capture+1), A_GPR(gpr), A_GPR(tmp)); + } else { + A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_GPR(capture+0), A_GPR(gpr), A_P16VIN(0x0)); + A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_GPR(capture+1), A_GPR(gpr+1), A_P16VIN(0x1)); + } + snd_emu10k1_init_stereo_control(&controls[nctl++], "EMU Capture Volume", gpr, 0); + gpr += 2; + } + /* AC'97 Playback Volume - used only for mic (renamed later) */ + A_ADD_VOLUME_IN(stereo_mix, gpr, A_EXTIN_AC97_L); + A_ADD_VOLUME_IN(stereo_mix+1, gpr+1, A_EXTIN_AC97_R); + snd_emu10k1_init_stereo_control(&controls[nctl++], "AMic Playback Volume", gpr, 0); + gpr += 2; + /* AC'97 Capture Volume - used only for mic */ + A_ADD_VOLUME_IN(capture, gpr, A_EXTIN_AC97_L); + A_ADD_VOLUME_IN(capture+1, gpr+1, A_EXTIN_AC97_R); + snd_emu10k1_init_stereo_control(&controls[nctl++], "Mic Capture Volume", gpr, 0); + gpr += 2; + + /* mic capture buffer */ + A_OP(icode, &ptr, iINTERP, A_EXTOUT(A_EXTOUT_MIC_CAP), A_EXTIN(A_EXTIN_AC97_L), 0xcd, A_EXTIN(A_EXTIN_AC97_R)); + + /* Audigy CD Playback Volume */ + A_ADD_VOLUME_IN(stereo_mix, gpr, A_EXTIN_SPDIF_CD_L); + A_ADD_VOLUME_IN(stereo_mix+1, gpr+1, A_EXTIN_SPDIF_CD_R); + snd_emu10k1_init_stereo_control(&controls[nctl++], + emu->card_capabilities->ac97_chip ? "Audigy CD Playback Volume" : "CD Playback Volume", + gpr, 0); + gpr += 2; + /* Audigy CD Capture Volume */ + A_ADD_VOLUME_IN(capture, gpr, A_EXTIN_SPDIF_CD_L); + A_ADD_VOLUME_IN(capture+1, gpr+1, A_EXTIN_SPDIF_CD_R); + snd_emu10k1_init_stereo_control(&controls[nctl++], + emu->card_capabilities->ac97_chip ? "Audigy CD Capture Volume" : "CD Capture Volume", + gpr, 0); + gpr += 2; + + /* Optical SPDIF Playback Volume */ + A_ADD_VOLUME_IN(stereo_mix, gpr, A_EXTIN_OPT_SPDIF_L); + A_ADD_VOLUME_IN(stereo_mix+1, gpr+1, A_EXTIN_OPT_SPDIF_R); + snd_emu10k1_init_stereo_control(&controls[nctl++], SNDRV_CTL_NAME_IEC958("Optical ",PLAYBACK,VOLUME), gpr, 0); + gpr += 2; + /* Optical SPDIF Capture Volume */ + A_ADD_VOLUME_IN(capture, gpr, A_EXTIN_OPT_SPDIF_L); + A_ADD_VOLUME_IN(capture+1, gpr+1, A_EXTIN_OPT_SPDIF_R); + snd_emu10k1_init_stereo_control(&controls[nctl++], SNDRV_CTL_NAME_IEC958("Optical ",CAPTURE,VOLUME), gpr, 0); + gpr += 2; + + /* Line2 Playback Volume */ + A_ADD_VOLUME_IN(stereo_mix, gpr, A_EXTIN_LINE2_L); + A_ADD_VOLUME_IN(stereo_mix+1, gpr+1, A_EXTIN_LINE2_R); + snd_emu10k1_init_stereo_control(&controls[nctl++], + emu->card_capabilities->ac97_chip ? "Line2 Playback Volume" : "Line Playback Volume", + gpr, 0); + gpr += 2; + /* Line2 Capture Volume */ + A_ADD_VOLUME_IN(capture, gpr, A_EXTIN_LINE2_L); + A_ADD_VOLUME_IN(capture+1, gpr+1, A_EXTIN_LINE2_R); + snd_emu10k1_init_stereo_control(&controls[nctl++], + emu->card_capabilities->ac97_chip ? "Line2 Capture Volume" : "Line Capture Volume", + gpr, 0); + gpr += 2; + + /* Philips ADC Playback Volume */ + A_ADD_VOLUME_IN(stereo_mix, gpr, A_EXTIN_ADC_L); + A_ADD_VOLUME_IN(stereo_mix+1, gpr+1, A_EXTIN_ADC_R); + snd_emu10k1_init_stereo_control(&controls[nctl++], "Analog Mix Playback Volume", gpr, 0); + gpr += 2; + /* Philips ADC Capture Volume */ + A_ADD_VOLUME_IN(capture, gpr, A_EXTIN_ADC_L); + A_ADD_VOLUME_IN(capture+1, gpr+1, A_EXTIN_ADC_R); + snd_emu10k1_init_stereo_control(&controls[nctl++], "Analog Mix Capture Volume", gpr, 0); + gpr += 2; + + /* Aux2 Playback Volume */ + A_ADD_VOLUME_IN(stereo_mix, gpr, A_EXTIN_AUX2_L); + A_ADD_VOLUME_IN(stereo_mix+1, gpr+1, A_EXTIN_AUX2_R); + snd_emu10k1_init_stereo_control(&controls[nctl++], + emu->card_capabilities->ac97_chip ? "Aux2 Playback Volume" : "Aux Playback Volume", + gpr, 0); + gpr += 2; + /* Aux2 Capture Volume */ + A_ADD_VOLUME_IN(capture, gpr, A_EXTIN_AUX2_L); + A_ADD_VOLUME_IN(capture+1, gpr+1, A_EXTIN_AUX2_R); + snd_emu10k1_init_stereo_control(&controls[nctl++], + emu->card_capabilities->ac97_chip ? "Aux2 Capture Volume" : "Aux Capture Volume", + gpr, 0); + gpr += 2; + + /* Stereo Mix Front Playback Volume */ + A_OP(icode, &ptr, iMAC0, A_GPR(playback), A_GPR(playback), A_GPR(gpr), A_GPR(stereo_mix)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+1), A_GPR(playback+1), A_GPR(gpr+1), A_GPR(stereo_mix+1)); + snd_emu10k1_init_stereo_control(&controls[nctl++], "Front Playback Volume", gpr, 100); + gpr += 2; + + /* Stereo Mix Surround Playback */ + A_OP(icode, &ptr, iMAC0, A_GPR(playback+2), A_GPR(playback+2), A_GPR(gpr), A_GPR(stereo_mix)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+3), A_GPR(playback+3), A_GPR(gpr+1), A_GPR(stereo_mix+1)); + snd_emu10k1_init_stereo_control(&controls[nctl++], "Surround Playback Volume", gpr, 0); + gpr += 2; + + /* Stereo Mix Center Playback */ + /* Center = sub = Left/2 + Right/2 */ + A_OP(icode, &ptr, iINTERP, A_GPR(tmp), A_GPR(stereo_mix), 0xcd, A_GPR(stereo_mix+1)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+4), A_GPR(playback+4), A_GPR(gpr), A_GPR(tmp)); + snd_emu10k1_init_mono_control(&controls[nctl++], "Center Playback Volume", gpr, 0); + gpr++; + + /* Stereo Mix LFE Playback */ + A_OP(icode, &ptr, iMAC0, A_GPR(playback+5), A_GPR(playback+5), A_GPR(gpr), A_GPR(tmp)); + snd_emu10k1_init_mono_control(&controls[nctl++], "LFE Playback Volume", gpr, 0); + gpr++; + + if (emu->card_capabilities->spk71) { + /* Stereo Mix Side Playback */ + A_OP(icode, &ptr, iMAC0, A_GPR(playback+6), A_GPR(playback+6), A_GPR(gpr), A_GPR(stereo_mix)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+7), A_GPR(playback+7), A_GPR(gpr+1), A_GPR(stereo_mix+1)); + snd_emu10k1_init_stereo_control(&controls[nctl++], "Side Playback Volume", gpr, 0); + gpr += 2; + } + + /* + * outputs + */ +#define A_PUT_OUTPUT(out,src) A_OP(icode, &ptr, iACC3, A_EXTOUT(out), A_C_00000000, A_C_00000000, A_GPR(src)) +#define A_PUT_STEREO_OUTPUT(out1,out2,src) \ + {A_PUT_OUTPUT(out1,src); A_PUT_OUTPUT(out2,src+1);} + +#define _A_SWITCH(icode, ptr, dst, src, sw) \ + A_OP((icode), ptr, iMACINT0, dst, A_C_00000000, src, sw); +#define A_SWITCH(icode, ptr, dst, src, sw) \ + _A_SWITCH(icode, ptr, A_GPR(dst), A_GPR(src), A_GPR(sw)) +#define _A_SWITCH_NEG(icode, ptr, dst, src) \ + A_OP((icode), ptr, iANDXOR, dst, src, A_C_00000001, A_C_00000001); +#define A_SWITCH_NEG(icode, ptr, dst, src) \ + _A_SWITCH_NEG(icode, ptr, A_GPR(dst), A_GPR(src)) + + + /* + * Process tone control + */ + A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 0), A_GPR(playback + 0), A_C_00000000, A_C_00000000); /* left */ + A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 1), A_GPR(playback + 1), A_C_00000000, A_C_00000000); /* right */ + A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 2), A_GPR(playback + 2), A_C_00000000, A_C_00000000); /* rear left */ + A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 3), A_GPR(playback + 3), A_C_00000000, A_C_00000000); /* rear right */ + A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 4), A_GPR(playback + 4), A_C_00000000, A_C_00000000); /* center */ + A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 5), A_GPR(playback + 5), A_C_00000000, A_C_00000000); /* LFE */ + if (emu->card_capabilities->spk71) { + A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 6), A_GPR(playback + 6), A_C_00000000, A_C_00000000); /* side left */ + A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 7), A_GPR(playback + 7), A_C_00000000, A_C_00000000); /* side right */ + } + + + ctl = &controls[nctl + 0]; + ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; + strcpy(ctl->id.name, "Tone Control - Bass"); + ctl->vcount = 2; + ctl->count = 10; + ctl->min = 0; + ctl->max = 40; + ctl->value[0] = ctl->value[1] = 20; + ctl->translation = EMU10K1_GPR_TRANSLATION_BASS; + ctl = &controls[nctl + 1]; + ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; + strcpy(ctl->id.name, "Tone Control - Treble"); + ctl->vcount = 2; + ctl->count = 10; + ctl->min = 0; + ctl->max = 40; + ctl->value[0] = ctl->value[1] = 20; + ctl->translation = EMU10K1_GPR_TRANSLATION_TREBLE; + +#define BASS_GPR 0x8c +#define TREBLE_GPR 0x96 + + for (z = 0; z < 5; z++) { + int j; + for (j = 0; j < 2; j++) { + controls[nctl + 0].gpr[z * 2 + j] = BASS_GPR + z * 2 + j; + controls[nctl + 1].gpr[z * 2 + j] = TREBLE_GPR + z * 2 + j; + } + } + for (z = 0; z < 4; z++) { /* front/rear/center-lfe/side */ + int j, k, l, d; + for (j = 0; j < 2; j++) { /* left/right */ + k = 0xb0 + (z * 8) + (j * 4); + l = 0xe0 + (z * 8) + (j * 4); + d = playback + SND_EMU10K1_PLAYBACK_CHANNELS + z * 2 + j; + + A_OP(icode, &ptr, iMAC0, A_C_00000000, A_C_00000000, A_GPR(d), A_GPR(BASS_GPR + 0 + j)); + A_OP(icode, &ptr, iMACMV, A_GPR(k+1), A_GPR(k), A_GPR(k+1), A_GPR(BASS_GPR + 4 + j)); + A_OP(icode, &ptr, iMACMV, A_GPR(k), A_GPR(d), A_GPR(k), A_GPR(BASS_GPR + 2 + j)); + A_OP(icode, &ptr, iMACMV, A_GPR(k+3), A_GPR(k+2), A_GPR(k+3), A_GPR(BASS_GPR + 8 + j)); + A_OP(icode, &ptr, iMAC0, A_GPR(k+2), A_GPR_ACCU, A_GPR(k+2), A_GPR(BASS_GPR + 6 + j)); + A_OP(icode, &ptr, iACC3, A_GPR(k+2), A_GPR(k+2), A_GPR(k+2), A_C_00000000); + + A_OP(icode, &ptr, iMAC0, A_C_00000000, A_C_00000000, A_GPR(k+2), A_GPR(TREBLE_GPR + 0 + j)); + A_OP(icode, &ptr, iMACMV, A_GPR(l+1), A_GPR(l), A_GPR(l+1), A_GPR(TREBLE_GPR + 4 + j)); + A_OP(icode, &ptr, iMACMV, A_GPR(l), A_GPR(k+2), A_GPR(l), A_GPR(TREBLE_GPR + 2 + j)); + A_OP(icode, &ptr, iMACMV, A_GPR(l+3), A_GPR(l+2), A_GPR(l+3), A_GPR(TREBLE_GPR + 8 + j)); + A_OP(icode, &ptr, iMAC0, A_GPR(l+2), A_GPR_ACCU, A_GPR(l+2), A_GPR(TREBLE_GPR + 6 + j)); + A_OP(icode, &ptr, iMACINT0, A_GPR(l+2), A_C_00000000, A_GPR(l+2), A_C_00000010); + + A_OP(icode, &ptr, iACC3, A_GPR(d), A_GPR(l+2), A_C_00000000, A_C_00000000); + + if (z == 2) /* center */ + break; + } + } + nctl += 2; + +#undef BASS_GPR +#undef TREBLE_GPR + + for (z = 0; z < 8; z++) { + A_SWITCH(icode, &ptr, tmp + 0, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, gpr + 0); + A_SWITCH_NEG(icode, &ptr, tmp + 1, gpr + 0); + A_SWITCH(icode, &ptr, tmp + 1, playback + z, tmp + 1); + A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000); + } + snd_emu10k1_init_stereo_onoff_control(controls + nctl++, "Tone Control - Switch", gpr, 0); + gpr += 2; + + /* Master volume (will be renamed later) */ + A_OP(icode, &ptr, iMAC0, A_GPR(playback+0+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+0+SND_EMU10K1_PLAYBACK_CHANNELS)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+1+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+1+SND_EMU10K1_PLAYBACK_CHANNELS)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+2+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+2+SND_EMU10K1_PLAYBACK_CHANNELS)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+3+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+3+SND_EMU10K1_PLAYBACK_CHANNELS)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+4+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+4+SND_EMU10K1_PLAYBACK_CHANNELS)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+5+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+5+SND_EMU10K1_PLAYBACK_CHANNELS)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+6+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+6+SND_EMU10K1_PLAYBACK_CHANNELS)); + A_OP(icode, &ptr, iMAC0, A_GPR(playback+7+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+7+SND_EMU10K1_PLAYBACK_CHANNELS)); + snd_emu10k1_init_mono_control(&controls[nctl++], "Wave Master Playback Volume", gpr, 0); + gpr += 2; + + /* analog speakers */ + A_PUT_STEREO_OUTPUT(A_EXTOUT_AFRONT_L, A_EXTOUT_AFRONT_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS); + A_PUT_STEREO_OUTPUT(A_EXTOUT_AREAR_L, A_EXTOUT_AREAR_R, playback+2 + SND_EMU10K1_PLAYBACK_CHANNELS); + A_PUT_OUTPUT(A_EXTOUT_ACENTER, playback+4 + SND_EMU10K1_PLAYBACK_CHANNELS); + A_PUT_OUTPUT(A_EXTOUT_ALFE, playback+5 + SND_EMU10K1_PLAYBACK_CHANNELS); + if (emu->card_capabilities->spk71) + A_PUT_STEREO_OUTPUT(A_EXTOUT_ASIDE_L, A_EXTOUT_ASIDE_R, playback+6 + SND_EMU10K1_PLAYBACK_CHANNELS); + + /* headphone */ + A_PUT_STEREO_OUTPUT(A_EXTOUT_HEADPHONE_L, A_EXTOUT_HEADPHONE_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS); + + /* digital outputs */ + /* A_PUT_STEREO_OUTPUT(A_EXTOUT_FRONT_L, A_EXTOUT_FRONT_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS); */ + if (emu->card_capabilities->emu_model) { + /* EMU1010 Outputs from PCM Front, Rear, Center, LFE, Side */ + dev_info(emu->card->dev, "EMU outputs on\n"); + for (z = 0; z < 8; z++) { + if (emu->card_capabilities->ca0108_chip) { + A_OP(icode, &ptr, iACC3, A3_EMU32OUT(z), A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), A_C_00000000, A_C_00000000); + } else { + A_OP(icode, &ptr, iACC3, A_EMU32OUTL(z), A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), A_C_00000000, A_C_00000000); + } + } + } + + /* IEC958 Optical Raw Playback Switch */ + gpr_map[gpr++] = 0; + gpr_map[gpr++] = 0x1008; + gpr_map[gpr++] = 0xffff0000; + for (z = 0; z < 2; z++) { + A_OP(icode, &ptr, iMAC0, A_GPR(tmp + 2), A_FXBUS(FXBUS_PT_LEFT + z), A_C_00000000, A_C_00000000); + A_OP(icode, &ptr, iSKIP, A_GPR_COND, A_GPR_COND, A_GPR(gpr - 2), A_C_00000001); + A_OP(icode, &ptr, iACC3, A_GPR(tmp + 2), A_C_00000000, A_C_00010000, A_GPR(tmp + 2)); + A_OP(icode, &ptr, iANDXOR, A_GPR(tmp + 2), A_GPR(tmp + 2), A_GPR(gpr - 1), A_C_00000000); + A_SWITCH(icode, &ptr, tmp + 0, tmp + 2, gpr + z); + A_SWITCH_NEG(icode, &ptr, tmp + 1, gpr + z); + A_SWITCH(icode, &ptr, tmp + 1, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, tmp + 1); + if ((z==1) && (emu->card_capabilities->spdif_bug)) { + /* Due to a SPDIF output bug on some Audigy cards, this code delays the Right channel by 1 sample */ + dev_info(emu->card->dev, + "Installing spdif_bug patch: %s\n", + emu->card_capabilities->name); + A_OP(icode, &ptr, iACC3, A_EXTOUT(A_EXTOUT_FRONT_L + z), A_GPR(gpr - 3), A_C_00000000, A_C_00000000); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 3), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000); + } else { + A_OP(icode, &ptr, iACC3, A_EXTOUT(A_EXTOUT_FRONT_L + z), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000); + } + } + snd_emu10k1_init_stereo_onoff_control(controls + nctl++, SNDRV_CTL_NAME_IEC958("Optical Raw ",PLAYBACK,SWITCH), gpr, 0); + gpr += 2; + + A_PUT_STEREO_OUTPUT(A_EXTOUT_REAR_L, A_EXTOUT_REAR_R, playback+2 + SND_EMU10K1_PLAYBACK_CHANNELS); + A_PUT_OUTPUT(A_EXTOUT_CENTER, playback+4 + SND_EMU10K1_PLAYBACK_CHANNELS); + A_PUT_OUTPUT(A_EXTOUT_LFE, playback+5 + SND_EMU10K1_PLAYBACK_CHANNELS); + + /* ADC buffer */ +#ifdef EMU10K1_CAPTURE_DIGITAL_OUT + A_PUT_STEREO_OUTPUT(A_EXTOUT_ADC_CAP_L, A_EXTOUT_ADC_CAP_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS); +#else + A_PUT_OUTPUT(A_EXTOUT_ADC_CAP_L, capture); + A_PUT_OUTPUT(A_EXTOUT_ADC_CAP_R, capture+1); +#endif + + if (emu->card_capabilities->emu_model) { + if (emu->card_capabilities->ca0108_chip) { + dev_info(emu->card->dev, "EMU2 inputs on\n"); + for (z = 0; z < 0x10; z++) { + snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, + bit_shifter16, + A3_EMU32IN(z), + A_FXBUS2(z*2) ); + } + } else { + dev_info(emu->card->dev, "EMU inputs on\n"); + /* Capture 16 (originally 8) channels of S32_LE sound */ + + /* + dev_dbg(emu->card->dev, "emufx.c: gpr=0x%x, tmp=0x%x\n", + gpr, tmp); + */ + /* For the EMU1010: How to get 32bit values from the DSP. High 16bits into L, low 16bits into R. */ + /* A_P16VIN(0) is delayed by one sample, + * so all other A_P16VIN channels will need to also be delayed + */ + /* Left ADC in. 1 of 2 */ + snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_P16VIN(0x0), A_FXBUS2(0) ); + /* Right ADC in 1 of 2 */ + gpr_map[gpr++] = 0x00000000; + /* Delaying by one sample: instead of copying the input + * value A_P16VIN to output A_FXBUS2 as in the first channel, + * we use an auxiliary register, delaying the value by one + * sample + */ + snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(2) ); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x1), A_C_00000000, A_C_00000000); + gpr_map[gpr++] = 0x00000000; + snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(4) ); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x2), A_C_00000000, A_C_00000000); + gpr_map[gpr++] = 0x00000000; + snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(6) ); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x3), A_C_00000000, A_C_00000000); + /* For 96kHz mode */ + /* Left ADC in. 2 of 2 */ + gpr_map[gpr++] = 0x00000000; + snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0x8) ); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x4), A_C_00000000, A_C_00000000); + /* Right ADC in 2 of 2 */ + gpr_map[gpr++] = 0x00000000; + snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0xa) ); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x5), A_C_00000000, A_C_00000000); + gpr_map[gpr++] = 0x00000000; + snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0xc) ); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x6), A_C_00000000, A_C_00000000); + gpr_map[gpr++] = 0x00000000; + snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0xe) ); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x7), A_C_00000000, A_C_00000000); + /* Pavel Hofman - we still have voices, A_FXBUS2s, and + * A_P16VINs available - + * let's add 8 more capture channels - total of 16 + */ + gpr_map[gpr++] = 0x00000000; + snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, + bit_shifter16, + A_GPR(gpr - 1), + A_FXBUS2(0x10)); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x8), + A_C_00000000, A_C_00000000); + gpr_map[gpr++] = 0x00000000; + snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, + bit_shifter16, + A_GPR(gpr - 1), + A_FXBUS2(0x12)); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x9), + A_C_00000000, A_C_00000000); + gpr_map[gpr++] = 0x00000000; + snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, + bit_shifter16, + A_GPR(gpr - 1), + A_FXBUS2(0x14)); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xa), + A_C_00000000, A_C_00000000); + gpr_map[gpr++] = 0x00000000; + snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, + bit_shifter16, + A_GPR(gpr - 1), + A_FXBUS2(0x16)); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xb), + A_C_00000000, A_C_00000000); + gpr_map[gpr++] = 0x00000000; + snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, + bit_shifter16, + A_GPR(gpr - 1), + A_FXBUS2(0x18)); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xc), + A_C_00000000, A_C_00000000); + gpr_map[gpr++] = 0x00000000; + snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, + bit_shifter16, + A_GPR(gpr - 1), + A_FXBUS2(0x1a)); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xd), + A_C_00000000, A_C_00000000); + gpr_map[gpr++] = 0x00000000; + snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, + bit_shifter16, + A_GPR(gpr - 1), + A_FXBUS2(0x1c)); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xe), + A_C_00000000, A_C_00000000); + gpr_map[gpr++] = 0x00000000; + snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, + bit_shifter16, + A_GPR(gpr - 1), + A_FXBUS2(0x1e)); + A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xf), + A_C_00000000, A_C_00000000); + } + +#if 0 + for (z = 4; z < 8; z++) { + A_OP(icode, &ptr, iACC3, A_FXBUS2(z), A_C_00000000, A_C_00000000, A_C_00000000); + } + for (z = 0xc; z < 0x10; z++) { + A_OP(icode, &ptr, iACC3, A_FXBUS2(z), A_C_00000000, A_C_00000000, A_C_00000000); + } +#endif + } else { + /* EFX capture - capture the 16 EXTINs */ + /* Capture 16 channels of S16_LE sound */ + for (z = 0; z < 16; z++) { + A_OP(icode, &ptr, iACC3, A_FXBUS2(z), A_C_00000000, A_C_00000000, A_EXTIN(z)); + } + } + +#endif /* JCD test */ + /* + * ok, set up done.. + */ + + if (gpr > tmp) { + snd_BUG(); + err = -EIO; + goto __err; + } + /* clear remaining instruction memory */ + while (ptr < 0x400) + A_OP(icode, &ptr, 0x0f, 0xc0, 0xc0, 0xcf, 0xc0); + + icode->gpr_add_control_count = nctl; + icode->gpr_add_controls = (struct snd_emu10k1_fx8010_control_gpr __user *)controls; + emu->support_tlv = 1; /* support TLV */ + err = snd_emu10k1_icode_poke(emu, icode, true); + emu->support_tlv = 0; /* clear again */ + +__err: + kfree(controls); +__err_ctrls: + kfree((void __force *)icode->gpr_map); +__err_gpr: + kfree(icode); + return err; +} + + +/* + * initial DSP configuration for Emu10k1 + */ + +/* when volume = max, then copy only to avoid volume modification */ +/* with iMAC0 (negative values) */ +static void _volume(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) +{ + OP(icode, ptr, iMAC0, dst, C_00000000, src, vol); + OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); + OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000001); + OP(icode, ptr, iACC3, dst, src, C_00000000, C_00000000); +} +static void _volume_add(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) +{ + OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); + OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002); + OP(icode, ptr, iMACINT0, dst, dst, src, C_00000001); + OP(icode, ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000001); + OP(icode, ptr, iMAC0, dst, dst, src, vol); +} +static void _volume_out(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) +{ + OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); + OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002); + OP(icode, ptr, iACC3, dst, src, C_00000000, C_00000000); + OP(icode, ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000001); + OP(icode, ptr, iMAC0, dst, C_00000000, src, vol); +} + +#define VOLUME(icode, ptr, dst, src, vol) \ + _volume(icode, ptr, GPR(dst), GPR(src), GPR(vol)) +#define VOLUME_IN(icode, ptr, dst, src, vol) \ + _volume(icode, ptr, GPR(dst), EXTIN(src), GPR(vol)) +#define VOLUME_ADD(icode, ptr, dst, src, vol) \ + _volume_add(icode, ptr, GPR(dst), GPR(src), GPR(vol)) +#define VOLUME_ADDIN(icode, ptr, dst, src, vol) \ + _volume_add(icode, ptr, GPR(dst), EXTIN(src), GPR(vol)) +#define VOLUME_OUT(icode, ptr, dst, src, vol) \ + _volume_out(icode, ptr, EXTOUT(dst), GPR(src), GPR(vol)) +#define _SWITCH(icode, ptr, dst, src, sw) \ + OP((icode), ptr, iMACINT0, dst, C_00000000, src, sw); +#define SWITCH(icode, ptr, dst, src, sw) \ + _SWITCH(icode, ptr, GPR(dst), GPR(src), GPR(sw)) +#define SWITCH_IN(icode, ptr, dst, src, sw) \ + _SWITCH(icode, ptr, GPR(dst), EXTIN(src), GPR(sw)) +#define _SWITCH_NEG(icode, ptr, dst, src) \ + OP((icode), ptr, iANDXOR, dst, src, C_00000001, C_00000001); +#define SWITCH_NEG(icode, ptr, dst, src) \ + _SWITCH_NEG(icode, ptr, GPR(dst), GPR(src)) + + +static int _snd_emu10k1_init_efx(struct snd_emu10k1 *emu) +{ + int err, i, z, gpr, tmp, playback, capture; + u32 ptr; + struct snd_emu10k1_fx8010_code *icode; + struct snd_emu10k1_fx8010_pcm_rec *ipcm = NULL; + struct snd_emu10k1_fx8010_control_gpr *controls = NULL, *ctl; + u32 *gpr_map; + + err = -ENOMEM; + icode = kzalloc(sizeof(*icode), GFP_KERNEL); + if (!icode) + return err; + + icode->gpr_map = (u_int32_t __user *) kcalloc(256 + 160 + 160 + 2 * 512, + sizeof(u_int32_t), GFP_KERNEL); + if (!icode->gpr_map) + goto __err_gpr; + + controls = kcalloc(SND_EMU10K1_GPR_CONTROLS, + sizeof(struct snd_emu10k1_fx8010_control_gpr), + GFP_KERNEL); + if (!controls) + goto __err_ctrls; + + ipcm = kzalloc(sizeof(*ipcm), GFP_KERNEL); + if (!ipcm) + goto __err_ipcm; + + gpr_map = (u32 __force *)icode->gpr_map; + + icode->tram_data_map = icode->gpr_map + 256; + icode->tram_addr_map = icode->tram_data_map + 160; + icode->code = icode->tram_addr_map + 160; + + /* clear free GPRs */ + for (i = 0; i < 256; i++) + set_bit(i, icode->gpr_valid); + + /* clear TRAM data & address lines */ + for (i = 0; i < 160; i++) + set_bit(i, icode->tram_valid); + + strcpy(icode->name, "SB Live! FX8010 code for ALSA v1.2 by Jaroslav Kysela"); + ptr = 0; i = 0; + /* we have 12 inputs */ + playback = SND_EMU10K1_INPUTS; + /* we have 6 playback channels and tone control doubles */ + capture = playback + (SND_EMU10K1_PLAYBACK_CHANNELS * 2); + gpr = capture + SND_EMU10K1_CAPTURE_CHANNELS; + tmp = 0x88; /* we need 4 temporary GPR */ + /* from 0x8c to 0xff is the area for tone control */ + + /* stop FX processor */ + snd_emu10k1_ptr_write(emu, DBG, 0, (emu->fx8010.dbg = 0) | EMU10K1_DBG_SINGLE_STEP); + + /* + * Process FX Buses + */ + OP(icode, &ptr, iMACINT0, GPR(0), C_00000000, FXBUS(FXBUS_PCM_LEFT), C_00000004); + OP(icode, &ptr, iMACINT0, GPR(1), C_00000000, FXBUS(FXBUS_PCM_RIGHT), C_00000004); + OP(icode, &ptr, iMACINT0, GPR(2), C_00000000, FXBUS(FXBUS_MIDI_LEFT), C_00000004); + OP(icode, &ptr, iMACINT0, GPR(3), C_00000000, FXBUS(FXBUS_MIDI_RIGHT), C_00000004); + OP(icode, &ptr, iMACINT0, GPR(4), C_00000000, FXBUS(FXBUS_PCM_LEFT_REAR), C_00000004); + OP(icode, &ptr, iMACINT0, GPR(5), C_00000000, FXBUS(FXBUS_PCM_RIGHT_REAR), C_00000004); + OP(icode, &ptr, iMACINT0, GPR(6), C_00000000, FXBUS(FXBUS_PCM_CENTER), C_00000004); + OP(icode, &ptr, iMACINT0, GPR(7), C_00000000, FXBUS(FXBUS_PCM_LFE), C_00000004); + OP(icode, &ptr, iMACINT0, GPR(8), C_00000000, C_00000000, C_00000000); /* S/PDIF left */ + OP(icode, &ptr, iMACINT0, GPR(9), C_00000000, C_00000000, C_00000000); /* S/PDIF right */ + OP(icode, &ptr, iMACINT0, GPR(10), C_00000000, FXBUS(FXBUS_PCM_LEFT_FRONT), C_00000004); + OP(icode, &ptr, iMACINT0, GPR(11), C_00000000, FXBUS(FXBUS_PCM_RIGHT_FRONT), C_00000004); + + /* Raw S/PDIF PCM */ + ipcm->substream = 0; + ipcm->channels = 2; + ipcm->tram_start = 0; + ipcm->buffer_size = (64 * 1024) / 2; + ipcm->gpr_size = gpr++; + ipcm->gpr_ptr = gpr++; + ipcm->gpr_count = gpr++; + ipcm->gpr_tmpcount = gpr++; + ipcm->gpr_trigger = gpr++; + ipcm->gpr_running = gpr++; + ipcm->etram[0] = 0; + ipcm->etram[1] = 1; + + gpr_map[gpr + 0] = 0xfffff000; + gpr_map[gpr + 1] = 0xffff0000; + gpr_map[gpr + 2] = 0x70000000; + gpr_map[gpr + 3] = 0x00000007; + gpr_map[gpr + 4] = 0x001f << 11; + gpr_map[gpr + 5] = 0x001c << 11; + gpr_map[gpr + 6] = (0x22 - 0x01) - 1; /* skip at 01 to 22 */ + gpr_map[gpr + 7] = (0x22 - 0x06) - 1; /* skip at 06 to 22 */ + gpr_map[gpr + 8] = 0x2000000 + (2<<11); + gpr_map[gpr + 9] = 0x4000000 + (2<<11); + gpr_map[gpr + 10] = 1<<11; + gpr_map[gpr + 11] = (0x24 - 0x0a) - 1; /* skip at 0a to 24 */ + gpr_map[gpr + 12] = 0; + + /* if the trigger flag is not set, skip */ + /* 00: */ OP(icode, &ptr, iMAC0, C_00000000, GPR(ipcm->gpr_trigger), C_00000000, C_00000000); + /* 01: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_ZERO, GPR(gpr + 6)); + /* if the running flag is set, we're running */ + /* 02: */ OP(icode, &ptr, iMAC0, C_00000000, GPR(ipcm->gpr_running), C_00000000, C_00000000); + /* 03: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000004); + /* wait until ((GPR_DBAC>>11) & 0x1f) == 0x1c) */ + /* 04: */ OP(icode, &ptr, iANDXOR, GPR(tmp + 0), GPR_DBAC, GPR(gpr + 4), C_00000000); + /* 05: */ OP(icode, &ptr, iMACINT0, C_00000000, GPR(tmp + 0), C_ffffffff, GPR(gpr + 5)); + /* 06: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, GPR(gpr + 7)); + /* 07: */ OP(icode, &ptr, iACC3, GPR(gpr + 12), C_00000010, C_00000001, C_00000000); + + /* 08: */ OP(icode, &ptr, iANDXOR, GPR(ipcm->gpr_running), GPR(ipcm->gpr_running), C_00000000, C_00000001); + /* 09: */ OP(icode, &ptr, iACC3, GPR(gpr + 12), GPR(gpr + 12), C_ffffffff, C_00000000); + /* 0a: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, GPR(gpr + 11)); + /* 0b: */ OP(icode, &ptr, iACC3, GPR(gpr + 12), C_00000001, C_00000000, C_00000000); + + /* 0c: */ OP(icode, &ptr, iANDXOR, GPR(tmp + 0), ETRAM_DATA(ipcm->etram[0]), GPR(gpr + 0), C_00000000); + /* 0d: */ OP(icode, &ptr, iLOG, GPR(tmp + 0), GPR(tmp + 0), GPR(gpr + 3), C_00000000); + /* 0e: */ OP(icode, &ptr, iANDXOR, GPR(8), GPR(tmp + 0), GPR(gpr + 1), GPR(gpr + 2)); + /* 0f: */ OP(icode, &ptr, iSKIP, C_00000000, GPR_COND, CC_REG_MINUS, C_00000001); + /* 10: */ OP(icode, &ptr, iANDXOR, GPR(8), GPR(8), GPR(gpr + 1), GPR(gpr + 2)); + + /* 11: */ OP(icode, &ptr, iANDXOR, GPR(tmp + 0), ETRAM_DATA(ipcm->etram[1]), GPR(gpr + 0), C_00000000); + /* 12: */ OP(icode, &ptr, iLOG, GPR(tmp + 0), GPR(tmp + 0), GPR(gpr + 3), C_00000000); + /* 13: */ OP(icode, &ptr, iANDXOR, GPR(9), GPR(tmp + 0), GPR(gpr + 1), GPR(gpr + 2)); + /* 14: */ OP(icode, &ptr, iSKIP, C_00000000, GPR_COND, CC_REG_MINUS, C_00000001); + /* 15: */ OP(icode, &ptr, iANDXOR, GPR(9), GPR(9), GPR(gpr + 1), GPR(gpr + 2)); + + /* 16: */ OP(icode, &ptr, iACC3, GPR(tmp + 0), GPR(ipcm->gpr_ptr), C_00000001, C_00000000); + /* 17: */ OP(icode, &ptr, iMACINT0, C_00000000, GPR(tmp + 0), C_ffffffff, GPR(ipcm->gpr_size)); + /* 18: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_MINUS, C_00000001); + /* 19: */ OP(icode, &ptr, iACC3, GPR(tmp + 0), C_00000000, C_00000000, C_00000000); + /* 1a: */ OP(icode, &ptr, iACC3, GPR(ipcm->gpr_ptr), GPR(tmp + 0), C_00000000, C_00000000); + + /* 1b: */ OP(icode, &ptr, iACC3, GPR(ipcm->gpr_tmpcount), GPR(ipcm->gpr_tmpcount), C_ffffffff, C_00000000); + /* 1c: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002); + /* 1d: */ OP(icode, &ptr, iACC3, GPR(ipcm->gpr_tmpcount), GPR(ipcm->gpr_count), C_00000000, C_00000000); + /* 1e: */ OP(icode, &ptr, iACC3, GPR_IRQ, C_80000000, C_00000000, C_00000000); + /* 1f: */ OP(icode, &ptr, iANDXOR, GPR(ipcm->gpr_running), GPR(ipcm->gpr_running), C_00000001, C_00010000); + + /* 20: */ OP(icode, &ptr, iANDXOR, GPR(ipcm->gpr_running), GPR(ipcm->gpr_running), C_00010000, C_00000001); + /* 21: */ OP(icode, &ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000002); + + /* 22: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[0]), GPR(gpr + 8), GPR_DBAC, C_ffffffff); + /* 23: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[1]), GPR(gpr + 9), GPR_DBAC, C_ffffffff); + + /* 24: */ + gpr += 13; + + /* Wave Playback Volume */ + for (z = 0; z < 2; z++) + VOLUME(icode, &ptr, playback + z, z, gpr + z); + snd_emu10k1_init_stereo_control(controls + i++, "Wave Playback Volume", gpr, 100); + gpr += 2; + + /* Wave Surround Playback Volume */ + for (z = 0; z < 2; z++) + VOLUME(icode, &ptr, playback + 2 + z, z, gpr + z); + snd_emu10k1_init_stereo_control(controls + i++, "Wave Surround Playback Volume", gpr, 0); + gpr += 2; + + /* Wave Center/LFE Playback Volume */ + OP(icode, &ptr, iACC3, GPR(tmp + 0), FXBUS(FXBUS_PCM_LEFT), FXBUS(FXBUS_PCM_RIGHT), C_00000000); + OP(icode, &ptr, iMACINT0, GPR(tmp + 0), C_00000000, GPR(tmp + 0), C_00000002); + VOLUME(icode, &ptr, playback + 4, tmp + 0, gpr); + snd_emu10k1_init_mono_control(controls + i++, "Wave Center Playback Volume", gpr++, 0); + VOLUME(icode, &ptr, playback + 5, tmp + 0, gpr); + snd_emu10k1_init_mono_control(controls + i++, "Wave LFE Playback Volume", gpr++, 0); + + /* Wave Capture Volume + Switch */ + for (z = 0; z < 2; z++) { + SWITCH(icode, &ptr, tmp + 0, z, gpr + 2 + z); + VOLUME(icode, &ptr, capture + z, tmp + 0, gpr + z); + } + snd_emu10k1_init_stereo_control(controls + i++, "Wave Capture Volume", gpr, 0); + snd_emu10k1_init_stereo_onoff_control(controls + i++, "Wave Capture Switch", gpr + 2, 0); + gpr += 4; + + /* Synth Playback Volume */ + for (z = 0; z < 2; z++) + VOLUME_ADD(icode, &ptr, playback + z, 2 + z, gpr + z); + snd_emu10k1_init_stereo_control(controls + i++, "Synth Playback Volume", gpr, 100); + gpr += 2; + + /* Synth Capture Volume + Switch */ + for (z = 0; z < 2; z++) { + SWITCH(icode, &ptr, tmp + 0, 2 + z, gpr + 2 + z); + VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); + } + snd_emu10k1_init_stereo_control(controls + i++, "Synth Capture Volume", gpr, 0); + snd_emu10k1_init_stereo_onoff_control(controls + i++, "Synth Capture Switch", gpr + 2, 0); + gpr += 4; + + /* Surround Digital Playback Volume (renamed later without Digital) */ + for (z = 0; z < 2; z++) + VOLUME_ADD(icode, &ptr, playback + 2 + z, 4 + z, gpr + z); + snd_emu10k1_init_stereo_control(controls + i++, "Surround Digital Playback Volume", gpr, 100); + gpr += 2; + + /* Surround Capture Volume + Switch */ + for (z = 0; z < 2; z++) { + SWITCH(icode, &ptr, tmp + 0, 4 + z, gpr + 2 + z); + VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); + } + snd_emu10k1_init_stereo_control(controls + i++, "Surround Capture Volume", gpr, 0); + snd_emu10k1_init_stereo_onoff_control(controls + i++, "Surround Capture Switch", gpr + 2, 0); + gpr += 4; + + /* Center Playback Volume (renamed later without Digital) */ + VOLUME_ADD(icode, &ptr, playback + 4, 6, gpr); + snd_emu10k1_init_mono_control(controls + i++, "Center Digital Playback Volume", gpr++, 100); + + /* LFE Playback Volume + Switch (renamed later without Digital) */ + VOLUME_ADD(icode, &ptr, playback + 5, 7, gpr); + snd_emu10k1_init_mono_control(controls + i++, "LFE Digital Playback Volume", gpr++, 100); + + /* Front Playback Volume */ + for (z = 0; z < 2; z++) + VOLUME_ADD(icode, &ptr, playback + z, 10 + z, gpr + z); + snd_emu10k1_init_stereo_control(controls + i++, "Front Playback Volume", gpr, 100); + gpr += 2; + + /* Front Capture Volume + Switch */ + for (z = 0; z < 2; z++) { + SWITCH(icode, &ptr, tmp + 0, 10 + z, gpr + 2); + VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); + } + snd_emu10k1_init_stereo_control(controls + i++, "Front Capture Volume", gpr, 0); + snd_emu10k1_init_mono_onoff_control(controls + i++, "Front Capture Switch", gpr + 2, 0); + gpr += 3; + + /* + * Process inputs + */ + + if (emu->fx8010.extin_mask & ((1<fx8010.extin_mask & ((1<fx8010.extin_mask & ((1<fx8010.extin_mask & ((1<fx8010.extin_mask & ((1<fx8010.extin_mask & ((1<fx8010.extin_mask & ((1<id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; + strcpy(ctl->id.name, "Tone Control - Bass"); + ctl->vcount = 2; + ctl->count = 10; + ctl->min = 0; + ctl->max = 40; + ctl->value[0] = ctl->value[1] = 20; + ctl->tlv = snd_emu10k1_bass_treble_db_scale; + ctl->translation = EMU10K1_GPR_TRANSLATION_BASS; + ctl = &controls[i + 1]; + ctl->id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; + strcpy(ctl->id.name, "Tone Control - Treble"); + ctl->vcount = 2; + ctl->count = 10; + ctl->min = 0; + ctl->max = 40; + ctl->value[0] = ctl->value[1] = 20; + ctl->tlv = snd_emu10k1_bass_treble_db_scale; + ctl->translation = EMU10K1_GPR_TRANSLATION_TREBLE; + +#define BASS_GPR 0x8c +#define TREBLE_GPR 0x96 + + for (z = 0; z < 5; z++) { + int j; + for (j = 0; j < 2; j++) { + controls[i + 0].gpr[z * 2 + j] = BASS_GPR + z * 2 + j; + controls[i + 1].gpr[z * 2 + j] = TREBLE_GPR + z * 2 + j; + } + } + for (z = 0; z < 3; z++) { /* front/rear/center-lfe */ + int j, k, l, d; + for (j = 0; j < 2; j++) { /* left/right */ + k = 0xa0 + (z * 8) + (j * 4); + l = 0xd0 + (z * 8) + (j * 4); + d = playback + SND_EMU10K1_PLAYBACK_CHANNELS + z * 2 + j; + + OP(icode, &ptr, iMAC0, C_00000000, C_00000000, GPR(d), GPR(BASS_GPR + 0 + j)); + OP(icode, &ptr, iMACMV, GPR(k+1), GPR(k), GPR(k+1), GPR(BASS_GPR + 4 + j)); + OP(icode, &ptr, iMACMV, GPR(k), GPR(d), GPR(k), GPR(BASS_GPR + 2 + j)); + OP(icode, &ptr, iMACMV, GPR(k+3), GPR(k+2), GPR(k+3), GPR(BASS_GPR + 8 + j)); + OP(icode, &ptr, iMAC0, GPR(k+2), GPR_ACCU, GPR(k+2), GPR(BASS_GPR + 6 + j)); + OP(icode, &ptr, iACC3, GPR(k+2), GPR(k+2), GPR(k+2), C_00000000); + + OP(icode, &ptr, iMAC0, C_00000000, C_00000000, GPR(k+2), GPR(TREBLE_GPR + 0 + j)); + OP(icode, &ptr, iMACMV, GPR(l+1), GPR(l), GPR(l+1), GPR(TREBLE_GPR + 4 + j)); + OP(icode, &ptr, iMACMV, GPR(l), GPR(k+2), GPR(l), GPR(TREBLE_GPR + 2 + j)); + OP(icode, &ptr, iMACMV, GPR(l+3), GPR(l+2), GPR(l+3), GPR(TREBLE_GPR + 8 + j)); + OP(icode, &ptr, iMAC0, GPR(l+2), GPR_ACCU, GPR(l+2), GPR(TREBLE_GPR + 6 + j)); + OP(icode, &ptr, iMACINT0, GPR(l+2), C_00000000, GPR(l+2), C_00000010); + + OP(icode, &ptr, iACC3, GPR(d), GPR(l+2), C_00000000, C_00000000); + + if (z == 2) /* center */ + break; + } + } + i += 2; + +#undef BASS_GPR +#undef TREBLE_GPR + + for (z = 0; z < 6; z++) { + SWITCH(icode, &ptr, tmp + 0, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, gpr + 0); + SWITCH_NEG(icode, &ptr, tmp + 1, gpr + 0); + SWITCH(icode, &ptr, tmp + 1, playback + z, tmp + 1); + OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), GPR(tmp + 0), GPR(tmp + 1), C_00000000); + } + snd_emu10k1_init_stereo_onoff_control(controls + i++, "Tone Control - Switch", gpr, 0); + gpr += 2; + + /* + * Process outputs + */ + if (emu->fx8010.extout_mask & ((1<fx8010.extout_mask & ((1<fx8010.extout_mask & ((1<fx8010.extout_mask & ((1<fx8010.extout_mask & ((1<fx8010.extout_mask & (1<fx8010.extout_mask & (1<fx8010.extout_mask & (1<card_capabilities->sblive51) { + /* On the Live! 5.1, FXBUS2(1) and FXBUS(2) are shared with EXTOUT_ACENTER + * and EXTOUT_ALFE, so we can't connect inputs to them for multitrack recording. + * + * Since only 14 of the 16 EXTINs are used, this is not a big problem. + * We route AC97L and R to FX capture 14 and 15, SPDIF CD in to FX capture + * 0 and 3, then the rest of the EXTINs to the corresponding FX capture + * channel. Multitrack recorders will still see the center/lfe output signal + * on the second and third channels. + */ + OP(icode, &ptr, iACC3, FXBUS2(14), C_00000000, C_00000000, EXTIN(0)); + OP(icode, &ptr, iACC3, FXBUS2(15), C_00000000, C_00000000, EXTIN(1)); + OP(icode, &ptr, iACC3, FXBUS2(0), C_00000000, C_00000000, EXTIN(2)); + OP(icode, &ptr, iACC3, FXBUS2(3), C_00000000, C_00000000, EXTIN(3)); + for (z = 4; z < 14; z++) + OP(icode, &ptr, iACC3, FXBUS2(z), C_00000000, C_00000000, EXTIN(z)); + } else { + for (z = 0; z < 16; z++) + OP(icode, &ptr, iACC3, FXBUS2(z), C_00000000, C_00000000, EXTIN(z)); + } + + + if (gpr > tmp) { + snd_BUG(); + err = -EIO; + goto __err; + } + if (i > SND_EMU10K1_GPR_CONTROLS) { + snd_BUG(); + err = -EIO; + goto __err; + } + + /* clear remaining instruction memory */ + while (ptr < 0x200) + OP(icode, &ptr, iACC3, C_00000000, C_00000000, C_00000000, C_00000000); + + if ((err = snd_emu10k1_fx8010_tram_setup(emu, ipcm->buffer_size)) < 0) + goto __err; + icode->gpr_add_control_count = i; + icode->gpr_add_controls = (struct snd_emu10k1_fx8010_control_gpr __user *)controls; + emu->support_tlv = 1; /* support TLV */ + err = snd_emu10k1_icode_poke(emu, icode, true); + emu->support_tlv = 0; /* clear again */ + if (err >= 0) + err = snd_emu10k1_ipcm_poke(emu, ipcm); +__err: + kfree(ipcm); +__err_ipcm: + kfree(controls); +__err_ctrls: + kfree((void __force *)icode->gpr_map); +__err_gpr: + kfree(icode); + return err; +} + +int snd_emu10k1_init_efx(struct snd_emu10k1 *emu) +{ + spin_lock_init(&emu->fx8010.irq_lock); + INIT_LIST_HEAD(&emu->fx8010.gpr_ctl); + if (emu->audigy) + return _snd_emu10k1_audigy_init_efx(emu); + else + return _snd_emu10k1_init_efx(emu); +} + +void snd_emu10k1_free_efx(struct snd_emu10k1 *emu) +{ + /* stop processor */ + if (emu->audigy) + snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg = A_DBG_SINGLE_STEP); + else + snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg = EMU10K1_DBG_SINGLE_STEP); +} + +#if 0 /* FIXME: who use them? */ +int snd_emu10k1_fx8010_tone_control_activate(struct snd_emu10k1 *emu, int output) +{ + if (output < 0 || output >= 6) + return -EINVAL; + snd_emu10k1_ptr_write(emu, emu->gpr_base + 0x94 + output, 0, 1); + return 0; +} + +int snd_emu10k1_fx8010_tone_control_deactivate(struct snd_emu10k1 *emu, int output) +{ + if (output < 0 || output >= 6) + return -EINVAL; + snd_emu10k1_ptr_write(emu, emu->gpr_base + 0x94 + output, 0, 0); + return 0; +} +#endif + +int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size) +{ + u8 size_reg = 0; + + /* size is in samples */ + if (size != 0) { + size = (size - 1) >> 13; + + while (size) { + size >>= 1; + size_reg++; + } + size = 0x2000 << size_reg; + } + if ((emu->fx8010.etram_pages.bytes / 2) == size) + return 0; + spin_lock_irq(&emu->emu_lock); + outl(HCFG_LOCKTANKCACHE_MASK | inl(emu->port + HCFG), emu->port + HCFG); + spin_unlock_irq(&emu->emu_lock); + snd_emu10k1_ptr_write(emu, TCB, 0, 0); + snd_emu10k1_ptr_write(emu, TCBS, 0, 0); + if (emu->fx8010.etram_pages.area != NULL) { + snd_dma_free_pages(&emu->fx8010.etram_pages); + emu->fx8010.etram_pages.area = NULL; + emu->fx8010.etram_pages.bytes = 0; + } + + if (size > 0) { + if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), + size * 2, &emu->fx8010.etram_pages) < 0) + return -ENOMEM; + memset(emu->fx8010.etram_pages.area, 0, size * 2); + snd_emu10k1_ptr_write(emu, TCB, 0, emu->fx8010.etram_pages.addr); + snd_emu10k1_ptr_write(emu, TCBS, 0, size_reg); + spin_lock_irq(&emu->emu_lock); + outl(inl(emu->port + HCFG) & ~HCFG_LOCKTANKCACHE_MASK, emu->port + HCFG); + spin_unlock_irq(&emu->emu_lock); + } + + return 0; +} + +static int snd_emu10k1_fx8010_open(struct snd_hwdep * hw, struct file *file) +{ + return 0; +} + +static void copy_string(char *dst, char *src, char *null, int idx) +{ + if (src == NULL) + sprintf(dst, "%s %02X", null, idx); + else + strcpy(dst, src); +} + +static void snd_emu10k1_fx8010_info(struct snd_emu10k1 *emu, + struct snd_emu10k1_fx8010_info *info) +{ + char **fxbus, **extin, **extout; + unsigned short fxbus_mask, extin_mask, extout_mask; + int res; + + info->internal_tram_size = emu->fx8010.itram_size; + info->external_tram_size = emu->fx8010.etram_pages.bytes / 2; + fxbus = fxbuses; + extin = emu->audigy ? audigy_ins : creative_ins; + extout = emu->audigy ? audigy_outs : creative_outs; + fxbus_mask = emu->fx8010.fxbus_mask; + extin_mask = emu->fx8010.extin_mask; + extout_mask = emu->fx8010.extout_mask; + for (res = 0; res < 16; res++, fxbus++, extin++, extout++) { + copy_string(info->fxbus_names[res], fxbus_mask & (1 << res) ? *fxbus : NULL, "FXBUS", res); + copy_string(info->extin_names[res], extin_mask & (1 << res) ? *extin : NULL, "Unused", res); + copy_string(info->extout_names[res], extout_mask & (1 << res) ? *extout : NULL, "Unused", res); + } + for (res = 16; res < 32; res++, extout++) + copy_string(info->extout_names[res], extout_mask & (1 << res) ? *extout : NULL, "Unused", res); + info->gpr_controls = emu->fx8010.gpr_count; +} + +static int snd_emu10k1_fx8010_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg) +{ + struct snd_emu10k1 *emu = hw->private_data; + struct snd_emu10k1_fx8010_info *info; + struct snd_emu10k1_fx8010_code *icode; + struct snd_emu10k1_fx8010_pcm_rec *ipcm; + unsigned int addr; + void __user *argp = (void __user *)arg; + int res; + + switch (cmd) { + case SNDRV_EMU10K1_IOCTL_PVERSION: + emu->support_tlv = 1; + return put_user(SNDRV_EMU10K1_VERSION, (int __user *)argp); + case SNDRV_EMU10K1_IOCTL_INFO: + info = kzalloc(sizeof(*info), GFP_KERNEL); + if (!info) + return -ENOMEM; + snd_emu10k1_fx8010_info(emu, info); + if (copy_to_user(argp, info, sizeof(*info))) { + kfree(info); + return -EFAULT; + } + kfree(info); + return 0; + case SNDRV_EMU10K1_IOCTL_CODE_POKE: + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + + icode = memdup_user(argp, sizeof(*icode)); + if (IS_ERR(icode)) + return PTR_ERR(icode); + res = snd_emu10k1_icode_poke(emu, icode, false); + kfree(icode); + return res; + case SNDRV_EMU10K1_IOCTL_CODE_PEEK: + icode = memdup_user(argp, sizeof(*icode)); + if (IS_ERR(icode)) + return PTR_ERR(icode); + res = snd_emu10k1_icode_peek(emu, icode); + if (res == 0 && copy_to_user(argp, icode, sizeof(*icode))) { + kfree(icode); + return -EFAULT; + } + kfree(icode); + return res; + case SNDRV_EMU10K1_IOCTL_PCM_POKE: + ipcm = memdup_user(argp, sizeof(*ipcm)); + if (IS_ERR(ipcm)) + return PTR_ERR(ipcm); + res = snd_emu10k1_ipcm_poke(emu, ipcm); + kfree(ipcm); + return res; + case SNDRV_EMU10K1_IOCTL_PCM_PEEK: + ipcm = memdup_user(argp, sizeof(*ipcm)); + if (IS_ERR(ipcm)) + return PTR_ERR(ipcm); + res = snd_emu10k1_ipcm_peek(emu, ipcm); + if (res == 0 && copy_to_user(argp, ipcm, sizeof(*ipcm))) { + kfree(ipcm); + return -EFAULT; + } + kfree(ipcm); + return res; + case SNDRV_EMU10K1_IOCTL_TRAM_SETUP: + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + if (get_user(addr, (unsigned int __user *)argp)) + return -EFAULT; + mutex_lock(&emu->fx8010.lock); + res = snd_emu10k1_fx8010_tram_setup(emu, addr); + mutex_unlock(&emu->fx8010.lock); + return res; + case SNDRV_EMU10K1_IOCTL_STOP: + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + if (emu->audigy) + snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg |= A_DBG_SINGLE_STEP); + else + snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg |= EMU10K1_DBG_SINGLE_STEP); + return 0; + case SNDRV_EMU10K1_IOCTL_CONTINUE: + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + if (emu->audigy) + snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg = 0); + else + snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg = 0); + return 0; + case SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER: + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + if (emu->audigy) + snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg | A_DBG_ZC); + else + snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg | EMU10K1_DBG_ZC); + udelay(10); + if (emu->audigy) + snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg); + else + snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg); + return 0; + case SNDRV_EMU10K1_IOCTL_SINGLE_STEP: + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + if (get_user(addr, (unsigned int __user *)argp)) + return -EFAULT; + if (addr > 0x1ff) + return -EINVAL; + if (emu->audigy) + snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg |= A_DBG_SINGLE_STEP | addr); + else + snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg |= EMU10K1_DBG_SINGLE_STEP | addr); + udelay(10); + if (emu->audigy) + snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg |= A_DBG_SINGLE_STEP | A_DBG_STEP_ADDR | addr); + else + snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg |= EMU10K1_DBG_SINGLE_STEP | EMU10K1_DBG_STEP | addr); + return 0; + case SNDRV_EMU10K1_IOCTL_DBG_READ: + if (emu->audigy) + addr = snd_emu10k1_ptr_read(emu, A_DBG, 0); + else + addr = snd_emu10k1_ptr_read(emu, DBG, 0); + if (put_user(addr, (unsigned int __user *)argp)) + return -EFAULT; + return 0; + } + return -ENOTTY; +} + +static int snd_emu10k1_fx8010_release(struct snd_hwdep * hw, struct file *file) +{ + return 0; +} + +int snd_emu10k1_fx8010_new(struct snd_emu10k1 *emu, int device) +{ + struct snd_hwdep *hw; + int err; + + if ((err = snd_hwdep_new(emu->card, "FX8010", device, &hw)) < 0) + return err; + strcpy(hw->name, "EMU10K1 (FX8010)"); + hw->iface = SNDRV_HWDEP_IFACE_EMU10K1; + hw->ops.open = snd_emu10k1_fx8010_open; + hw->ops.ioctl = snd_emu10k1_fx8010_ioctl; + hw->ops.release = snd_emu10k1_fx8010_release; + hw->private_data = emu; + return 0; +} + +#ifdef CONFIG_PM_SLEEP +int snd_emu10k1_efx_alloc_pm_buffer(struct snd_emu10k1 *emu) +{ + int len; + + len = emu->audigy ? 0x200 : 0x100; + emu->saved_gpr = kmalloc_array(len, 4, GFP_KERNEL); + if (! emu->saved_gpr) + return -ENOMEM; + len = emu->audigy ? 0x100 : 0xa0; + emu->tram_val_saved = kmalloc_array(len, 4, GFP_KERNEL); + emu->tram_addr_saved = kmalloc_array(len, 4, GFP_KERNEL); + if (! emu->tram_val_saved || ! emu->tram_addr_saved) + return -ENOMEM; + len = emu->audigy ? 2 * 1024 : 2 * 512; + emu->saved_icode = vmalloc(array_size(len, 4)); + if (! emu->saved_icode) + return -ENOMEM; + return 0; +} + +void snd_emu10k1_efx_free_pm_buffer(struct snd_emu10k1 *emu) +{ + kfree(emu->saved_gpr); + kfree(emu->tram_val_saved); + kfree(emu->tram_addr_saved); + vfree(emu->saved_icode); +} + +/* + * save/restore GPR, TRAM and codes + */ +void snd_emu10k1_efx_suspend(struct snd_emu10k1 *emu) +{ + int i, len; + + len = emu->audigy ? 0x200 : 0x100; + for (i = 0; i < len; i++) + emu->saved_gpr[i] = snd_emu10k1_ptr_read(emu, emu->gpr_base + i, 0); + + len = emu->audigy ? 0x100 : 0xa0; + for (i = 0; i < len; i++) { + emu->tram_val_saved[i] = snd_emu10k1_ptr_read(emu, TANKMEMDATAREGBASE + i, 0); + emu->tram_addr_saved[i] = snd_emu10k1_ptr_read(emu, TANKMEMADDRREGBASE + i, 0); + if (emu->audigy) { + emu->tram_addr_saved[i] >>= 12; + emu->tram_addr_saved[i] |= + snd_emu10k1_ptr_read(emu, A_TANKMEMCTLREGBASE + i, 0) << 20; + } + } + + len = emu->audigy ? 2 * 1024 : 2 * 512; + for (i = 0; i < len; i++) + emu->saved_icode[i] = snd_emu10k1_efx_read(emu, i); +} + +void snd_emu10k1_efx_resume(struct snd_emu10k1 *emu) +{ + int i, len; + + /* set up TRAM */ + if (emu->fx8010.etram_pages.bytes > 0) { + unsigned size, size_reg = 0; + size = emu->fx8010.etram_pages.bytes / 2; + size = (size - 1) >> 13; + while (size) { + size >>= 1; + size_reg++; + } + outl(HCFG_LOCKTANKCACHE_MASK | inl(emu->port + HCFG), emu->port + HCFG); + snd_emu10k1_ptr_write(emu, TCB, 0, emu->fx8010.etram_pages.addr); + snd_emu10k1_ptr_write(emu, TCBS, 0, size_reg); + outl(inl(emu->port + HCFG) & ~HCFG_LOCKTANKCACHE_MASK, emu->port + HCFG); + } + + if (emu->audigy) + snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg | A_DBG_SINGLE_STEP); + else + snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg | EMU10K1_DBG_SINGLE_STEP); + + len = emu->audigy ? 0x200 : 0x100; + for (i = 0; i < len; i++) + snd_emu10k1_ptr_write(emu, emu->gpr_base + i, 0, emu->saved_gpr[i]); + + len = emu->audigy ? 0x100 : 0xa0; + for (i = 0; i < len; i++) { + snd_emu10k1_ptr_write(emu, TANKMEMDATAREGBASE + i, 0, + emu->tram_val_saved[i]); + if (! emu->audigy) + snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + i, 0, + emu->tram_addr_saved[i]); + else { + snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + i, 0, + emu->tram_addr_saved[i] << 12); + snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + i, 0, + emu->tram_addr_saved[i] >> 20); + } + } + + len = emu->audigy ? 2 * 1024 : 2 * 512; + for (i = 0; i < len; i++) + snd_emu10k1_efx_write(emu, i, emu->saved_icode[i]); + + /* start FX processor when the DSP code is updated */ + if (emu->audigy) + snd_emu10k1_ptr_write(emu, A_DBG, 0, emu->fx8010.dbg); + else + snd_emu10k1_ptr_write(emu, DBG, 0, emu->fx8010.dbg); +} +#endif \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emufx.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emufx.c.yml new file mode 100644 index 00000000000..bc4b2e04efb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emufx.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) by Jaroslav Kysela Creative Labs, Inc. Routines + - Copyright (c) by James Courtier-Dutton +holders: + - Jaroslav Kysela Creative Labs, Inc. Routines + - James Courtier-Dutton diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emupcm.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emupcm.c new file mode 100644 index 00000000000..66b941049be --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emupcm.c @@ -0,0 +1,1867 @@ +/* + * Copyright (c) by Jaroslav Kysela + * Creative Labs, Inc. + * Routines for control of EMU10K1 chips / PCM routines + * Multichannel PCM support Copyright (c) Lee Revell + * + * BUGS: + * -- + * + * TODO: + * -- + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include + +static void snd_emu10k1_pcm_interrupt(struct snd_emu10k1 *emu, + struct snd_emu10k1_voice *voice) +{ + struct snd_emu10k1_pcm *epcm; + + if ((epcm = voice->epcm) == NULL) + return; + if (epcm->substream == NULL) + return; +#if 0 + dev_dbg(emu->card->dev, + "IRQ: position = 0x%x, period = 0x%x, size = 0x%x\n", + epcm->substream->runtime->hw->pointer(emu, epcm->substream), + snd_pcm_lib_period_bytes(epcm->substream), + snd_pcm_lib_buffer_bytes(epcm->substream)); +#endif + snd_pcm_period_elapsed(epcm->substream); +} + +static void snd_emu10k1_pcm_ac97adc_interrupt(struct snd_emu10k1 *emu, + unsigned int status) +{ +#if 0 + if (status & IPR_ADCBUFHALFFULL) { + if (emu->pcm_capture_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) + return; + } +#endif + snd_pcm_period_elapsed(emu->pcm_capture_substream); +} + +static void snd_emu10k1_pcm_ac97mic_interrupt(struct snd_emu10k1 *emu, + unsigned int status) +{ +#if 0 + if (status & IPR_MICBUFHALFFULL) { + if (emu->pcm_capture_mic_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) + return; + } +#endif + snd_pcm_period_elapsed(emu->pcm_capture_mic_substream); +} + +static void snd_emu10k1_pcm_efx_interrupt(struct snd_emu10k1 *emu, + unsigned int status) +{ +#if 0 + if (status & IPR_EFXBUFHALFFULL) { + if (emu->pcm_capture_efx_substream->runtime->mode == SNDRV_PCM_MODE_FRAME) + return; + } +#endif + snd_pcm_period_elapsed(emu->pcm_capture_efx_substream); +} + +static snd_pcm_uframes_t snd_emu10k1_efx_playback_pointer(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_pcm *epcm = runtime->private_data; + unsigned int ptr; + + if (!epcm->running) + return 0; + ptr = snd_emu10k1_ptr_read(emu, CCCA, epcm->voices[0]->number) & 0x00ffffff; + ptr += runtime->buffer_size; + ptr -= epcm->ccca_start_addr; + ptr %= runtime->buffer_size; + + return ptr; +} + +static int snd_emu10k1_pcm_channel_alloc(struct snd_emu10k1_pcm * epcm, int voices) +{ + int err, i; + + if (epcm->voices[1] != NULL && voices < 2) { + snd_emu10k1_voice_free(epcm->emu, epcm->voices[1]); + epcm->voices[1] = NULL; + } + for (i = 0; i < voices; i++) { + if (epcm->voices[i] == NULL) + break; + } + if (i == voices) + return 0; /* already allocated */ + + for (i = 0; i < ARRAY_SIZE(epcm->voices); i++) { + if (epcm->voices[i]) { + snd_emu10k1_voice_free(epcm->emu, epcm->voices[i]); + epcm->voices[i] = NULL; + } + } + err = snd_emu10k1_voice_alloc(epcm->emu, + epcm->type == PLAYBACK_EMUVOICE ? EMU10K1_PCM : EMU10K1_EFX, + voices, + &epcm->voices[0]); + + if (err < 0) + return err; + epcm->voices[0]->epcm = epcm; + if (voices > 1) { + for (i = 1; i < voices; i++) { + epcm->voices[i] = &epcm->emu->voices[epcm->voices[0]->number + i]; + epcm->voices[i]->epcm = epcm; + } + } + if (epcm->extra == NULL) { + err = snd_emu10k1_voice_alloc(epcm->emu, + epcm->type == PLAYBACK_EMUVOICE ? EMU10K1_PCM : EMU10K1_EFX, + 1, + &epcm->extra); + if (err < 0) { + /* + dev_dbg(emu->card->dev, "pcm_channel_alloc: " + "failed extra: voices=%d, frame=%d\n", + voices, frame); + */ + for (i = 0; i < voices; i++) { + snd_emu10k1_voice_free(epcm->emu, epcm->voices[i]); + epcm->voices[i] = NULL; + } + return err; + } + epcm->extra->epcm = epcm; + epcm->extra->interrupt = snd_emu10k1_pcm_interrupt; + } + return 0; +} + +static const unsigned int capture_period_sizes[31] = { + 384, 448, 512, 640, + 384*2, 448*2, 512*2, 640*2, + 384*4, 448*4, 512*4, 640*4, + 384*8, 448*8, 512*8, 640*8, + 384*16, 448*16, 512*16, 640*16, + 384*32, 448*32, 512*32, 640*32, + 384*64, 448*64, 512*64, 640*64, + 384*128,448*128,512*128 +}; + +static const struct snd_pcm_hw_constraint_list hw_constraints_capture_period_sizes = { + .count = 31, + .list = capture_period_sizes, + .mask = 0 +}; + +static const unsigned int capture_rates[8] = { + 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000 +}; + +static const struct snd_pcm_hw_constraint_list hw_constraints_capture_rates = { + .count = 8, + .list = capture_rates, + .mask = 0 +}; + +static unsigned int snd_emu10k1_capture_rate_reg(unsigned int rate) +{ + switch (rate) { + case 8000: return ADCCR_SAMPLERATE_8; + case 11025: return ADCCR_SAMPLERATE_11; + case 16000: return ADCCR_SAMPLERATE_16; + case 22050: return ADCCR_SAMPLERATE_22; + case 24000: return ADCCR_SAMPLERATE_24; + case 32000: return ADCCR_SAMPLERATE_32; + case 44100: return ADCCR_SAMPLERATE_44; + case 48000: return ADCCR_SAMPLERATE_48; + default: + snd_BUG(); + return ADCCR_SAMPLERATE_8; + } +} + +static unsigned int snd_emu10k1_audigy_capture_rate_reg(unsigned int rate) +{ + switch (rate) { + case 8000: return A_ADCCR_SAMPLERATE_8; + case 11025: return A_ADCCR_SAMPLERATE_11; + case 12000: return A_ADCCR_SAMPLERATE_12; /* really supported? */ + case 16000: return ADCCR_SAMPLERATE_16; + case 22050: return ADCCR_SAMPLERATE_22; + case 24000: return ADCCR_SAMPLERATE_24; + case 32000: return ADCCR_SAMPLERATE_32; + case 44100: return ADCCR_SAMPLERATE_44; + case 48000: return ADCCR_SAMPLERATE_48; + default: + snd_BUG(); + return A_ADCCR_SAMPLERATE_8; + } +} + +static unsigned int emu10k1_calc_pitch_target(unsigned int rate) +{ + unsigned int pitch_target; + + pitch_target = (rate << 8) / 375; + pitch_target = (pitch_target >> 1) + (pitch_target & 1); + return pitch_target; +} + +#define PITCH_48000 0x00004000 +#define PITCH_96000 0x00008000 +#define PITCH_85000 0x00007155 +#define PITCH_80726 0x00006ba2 +#define PITCH_67882 0x00005a82 +#define PITCH_57081 0x00004c1c + +static unsigned int emu10k1_select_interprom(unsigned int pitch_target) +{ + if (pitch_target == PITCH_48000) + return CCCA_INTERPROM_0; + else if (pitch_target < PITCH_48000) + return CCCA_INTERPROM_1; + else if (pitch_target >= PITCH_96000) + return CCCA_INTERPROM_0; + else if (pitch_target >= PITCH_85000) + return CCCA_INTERPROM_6; + else if (pitch_target >= PITCH_80726) + return CCCA_INTERPROM_5; + else if (pitch_target >= PITCH_67882) + return CCCA_INTERPROM_4; + else if (pitch_target >= PITCH_57081) + return CCCA_INTERPROM_3; + else + return CCCA_INTERPROM_2; +} + +/* + * calculate cache invalidate size + * + * stereo: channel is stereo + * w_16: using 16bit samples + * + * returns: cache invalidate size in samples + */ +static inline int emu10k1_ccis(int stereo, int w_16) +{ + if (w_16) { + return stereo ? 24 : 26; + } else { + return stereo ? 24*2 : 26*2; + } +} + +static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu, + int master, int extra, + struct snd_emu10k1_voice *evoice, + unsigned int start_addr, + unsigned int end_addr, + struct snd_emu10k1_pcm_mixer *mix) +{ + struct snd_pcm_substream *substream = evoice->epcm->substream; + struct snd_pcm_runtime *runtime = substream->runtime; + unsigned int silent_page, tmp; + int voice, stereo, w_16; + unsigned char send_amount[8]; + unsigned char send_routing[8]; + unsigned long flags; + unsigned int pitch_target; + unsigned int ccis; + + voice = evoice->number; + stereo = runtime->channels == 2; + w_16 = snd_pcm_format_width(runtime->format) == 16; + + if (!extra && stereo) { + start_addr >>= 1; + end_addr >>= 1; + } + if (w_16) { + start_addr >>= 1; + end_addr >>= 1; + } + + spin_lock_irqsave(&emu->reg_lock, flags); + + /* volume parameters */ + if (extra) { + memset(send_routing, 0, sizeof(send_routing)); + send_routing[0] = 0; + send_routing[1] = 1; + send_routing[2] = 2; + send_routing[3] = 3; + memset(send_amount, 0, sizeof(send_amount)); + } else { + /* mono, left, right (master voice = left) */ + tmp = stereo ? (master ? 1 : 2) : 0; + memcpy(send_routing, &mix->send_routing[tmp][0], 8); + memcpy(send_amount, &mix->send_volume[tmp][0], 8); + } + + ccis = emu10k1_ccis(stereo, w_16); + + if (master) { + evoice->epcm->ccca_start_addr = start_addr + ccis; + if (extra) { + start_addr += ccis; + end_addr += ccis + emu->delay_pcm_irq; + } + if (stereo && !extra) { + snd_emu10k1_ptr_write(emu, CPF, voice, CPF_STEREO_MASK); + snd_emu10k1_ptr_write(emu, CPF, (voice + 1), CPF_STEREO_MASK); + } else { + snd_emu10k1_ptr_write(emu, CPF, voice, 0); + } + } + + /* setup routing */ + if (emu->audigy) { + snd_emu10k1_ptr_write(emu, A_FXRT1, voice, + snd_emu10k1_compose_audigy_fxrt1(send_routing)); + snd_emu10k1_ptr_write(emu, A_FXRT2, voice, + snd_emu10k1_compose_audigy_fxrt2(send_routing)); + snd_emu10k1_ptr_write(emu, A_SENDAMOUNTS, voice, + ((unsigned int)send_amount[4] << 24) | + ((unsigned int)send_amount[5] << 16) | + ((unsigned int)send_amount[6] << 8) | + (unsigned int)send_amount[7]); + } else + snd_emu10k1_ptr_write(emu, FXRT, voice, + snd_emu10k1_compose_send_routing(send_routing)); + /* Stop CA */ + /* Assumption that PT is already 0 so no harm overwriting */ + snd_emu10k1_ptr_write(emu, PTRX, voice, (send_amount[0] << 8) | send_amount[1]); + snd_emu10k1_ptr_write(emu, DSL, voice, end_addr | (send_amount[3] << 24)); + snd_emu10k1_ptr_write(emu, PSST, voice, + (start_addr + (extra ? emu->delay_pcm_irq : 0)) | + (send_amount[2] << 24)); + if (emu->card_capabilities->emu_model) + pitch_target = PITCH_48000; /* Disable interpolators on emu1010 card */ + else + pitch_target = emu10k1_calc_pitch_target(runtime->rate); + if (extra) + snd_emu10k1_ptr_write(emu, CCCA, voice, start_addr | + emu10k1_select_interprom(pitch_target) | + (w_16 ? 0 : CCCA_8BITSELECT)); + else + snd_emu10k1_ptr_write(emu, CCCA, voice, (start_addr + ccis) | + emu10k1_select_interprom(pitch_target) | + (w_16 ? 0 : CCCA_8BITSELECT)); + /* Clear filter delay memory */ + snd_emu10k1_ptr_write(emu, Z1, voice, 0); + snd_emu10k1_ptr_write(emu, Z2, voice, 0); + /* invalidate maps */ + silent_page = ((unsigned int)emu->silent_page.addr << emu->address_mode) | (emu->address_mode ? MAP_PTI_MASK1 : MAP_PTI_MASK0); + snd_emu10k1_ptr_write(emu, MAPA, voice, silent_page); + snd_emu10k1_ptr_write(emu, MAPB, voice, silent_page); + /* modulation envelope */ + snd_emu10k1_ptr_write(emu, CVCF, voice, 0xffff); + snd_emu10k1_ptr_write(emu, VTFT, voice, 0xffff); + snd_emu10k1_ptr_write(emu, ATKHLDM, voice, 0); + snd_emu10k1_ptr_write(emu, DCYSUSM, voice, 0x007f); + snd_emu10k1_ptr_write(emu, LFOVAL1, voice, 0x8000); + snd_emu10k1_ptr_write(emu, LFOVAL2, voice, 0x8000); + snd_emu10k1_ptr_write(emu, FMMOD, voice, 0); + snd_emu10k1_ptr_write(emu, TREMFRQ, voice, 0); + snd_emu10k1_ptr_write(emu, FM2FRQ2, voice, 0); + snd_emu10k1_ptr_write(emu, ENVVAL, voice, 0x8000); + /* volume envelope */ + snd_emu10k1_ptr_write(emu, ATKHLDV, voice, 0x7f7f); + snd_emu10k1_ptr_write(emu, ENVVOL, voice, 0x0000); + /* filter envelope */ + snd_emu10k1_ptr_write(emu, PEFE_FILTERAMOUNT, voice, 0x7f); + /* pitch envelope */ + snd_emu10k1_ptr_write(emu, PEFE_PITCHAMOUNT, voice, 0); + + spin_unlock_irqrestore(&emu->reg_lock, flags); +} + +static int snd_emu10k1_playback_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *hw_params) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_pcm *epcm = runtime->private_data; + size_t alloc_size; + int err; + + if ((err = snd_emu10k1_pcm_channel_alloc(epcm, params_channels(hw_params))) < 0) + return err; + + alloc_size = params_buffer_bytes(hw_params); + if (emu->iommu_workaround) + alloc_size += EMUPAGESIZE; + err = snd_pcm_lib_malloc_pages(substream, alloc_size); + if (err < 0) + return err; + if (emu->iommu_workaround && runtime->dma_bytes >= EMUPAGESIZE) + runtime->dma_bytes -= EMUPAGESIZE; + if (err > 0) { /* change */ + int mapped; + if (epcm->memblk != NULL) + snd_emu10k1_free_pages(emu, epcm->memblk); + epcm->memblk = snd_emu10k1_alloc_pages(emu, substream); + epcm->start_addr = 0; + if (! epcm->memblk) + return -ENOMEM; + mapped = ((struct snd_emu10k1_memblk *)epcm->memblk)->mapped_page; + if (mapped < 0) + return -ENOMEM; + epcm->start_addr = mapped << PAGE_SHIFT; + } + return 0; +} + +static int snd_emu10k1_playback_hw_free(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_pcm *epcm; + + if (runtime->private_data == NULL) + return 0; + epcm = runtime->private_data; + if (epcm->extra) { + snd_emu10k1_voice_free(epcm->emu, epcm->extra); + epcm->extra = NULL; + } + if (epcm->voices[1]) { + snd_emu10k1_voice_free(epcm->emu, epcm->voices[1]); + epcm->voices[1] = NULL; + } + if (epcm->voices[0]) { + snd_emu10k1_voice_free(epcm->emu, epcm->voices[0]); + epcm->voices[0] = NULL; + } + if (epcm->memblk) { + snd_emu10k1_free_pages(emu, epcm->memblk); + epcm->memblk = NULL; + epcm->start_addr = 0; + } + snd_pcm_lib_free_pages(substream); + return 0; +} + +static int snd_emu10k1_efx_playback_hw_free(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_pcm *epcm; + int i; + + if (runtime->private_data == NULL) + return 0; + epcm = runtime->private_data; + if (epcm->extra) { + snd_emu10k1_voice_free(epcm->emu, epcm->extra); + epcm->extra = NULL; + } + for (i = 0; i < NUM_EFX_PLAYBACK; i++) { + if (epcm->voices[i]) { + snd_emu10k1_voice_free(epcm->emu, epcm->voices[i]); + epcm->voices[i] = NULL; + } + } + if (epcm->memblk) { + snd_emu10k1_free_pages(emu, epcm->memblk); + epcm->memblk = NULL; + epcm->start_addr = 0; + } + snd_pcm_lib_free_pages(substream); + return 0; +} + +static int snd_emu10k1_playback_prepare(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_pcm *epcm = runtime->private_data; + unsigned int start_addr, end_addr; + + start_addr = epcm->start_addr; + end_addr = snd_pcm_lib_period_bytes(substream); + if (runtime->channels == 2) { + start_addr >>= 1; + end_addr >>= 1; + } + end_addr += start_addr; + snd_emu10k1_pcm_init_voice(emu, 1, 1, epcm->extra, + start_addr, end_addr, NULL); + start_addr = epcm->start_addr; + end_addr = epcm->start_addr + snd_pcm_lib_buffer_bytes(substream); + snd_emu10k1_pcm_init_voice(emu, 1, 0, epcm->voices[0], + start_addr, end_addr, + &emu->pcm_mixer[substream->number]); + if (epcm->voices[1]) + snd_emu10k1_pcm_init_voice(emu, 0, 0, epcm->voices[1], + start_addr, end_addr, + &emu->pcm_mixer[substream->number]); + return 0; +} + +static int snd_emu10k1_efx_playback_prepare(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_pcm *epcm = runtime->private_data; + unsigned int start_addr, end_addr; + unsigned int channel_size; + int i; + + start_addr = epcm->start_addr; + end_addr = epcm->start_addr + snd_pcm_lib_buffer_bytes(substream); + + /* + * the kX driver leaves some space between voices + */ + channel_size = ( end_addr - start_addr ) / NUM_EFX_PLAYBACK; + + snd_emu10k1_pcm_init_voice(emu, 1, 1, epcm->extra, + start_addr, start_addr + (channel_size / 2), NULL); + + /* only difference with the master voice is we use it for the pointer */ + snd_emu10k1_pcm_init_voice(emu, 1, 0, epcm->voices[0], + start_addr, start_addr + channel_size, + &emu->efx_pcm_mixer[0]); + + start_addr += channel_size; + for (i = 1; i < NUM_EFX_PLAYBACK; i++) { + snd_emu10k1_pcm_init_voice(emu, 0, 0, epcm->voices[i], + start_addr, start_addr + channel_size, + &emu->efx_pcm_mixer[i]); + start_addr += channel_size; + } + + return 0; +} + +static const struct snd_pcm_hardware snd_emu10k1_efx_playback = +{ + .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_NONINTERLEAVED | + SNDRV_PCM_INFO_BLOCK_TRANSFER | + SNDRV_PCM_INFO_RESUME | + SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE), + .formats = SNDRV_PCM_FMTBIT_S16_LE, + .rates = SNDRV_PCM_RATE_48000, + .rate_min = 48000, + .rate_max = 48000, + .channels_min = NUM_EFX_PLAYBACK, + .channels_max = NUM_EFX_PLAYBACK, + .buffer_bytes_max = (64*1024), + .period_bytes_min = 64, + .period_bytes_max = (64*1024), + .periods_min = 2, + .periods_max = 2, + .fifo_size = 0, +}; + +static int snd_emu10k1_capture_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *hw_params) +{ + return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); +} + +static int snd_emu10k1_capture_hw_free(struct snd_pcm_substream *substream) +{ + return snd_pcm_lib_free_pages(substream); +} + +static int snd_emu10k1_capture_prepare(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_pcm *epcm = runtime->private_data; + int idx; + + /* zeroing the buffer size will stop capture */ + snd_emu10k1_ptr_write(emu, epcm->capture_bs_reg, 0, 0); + switch (epcm->type) { + case CAPTURE_AC97ADC: + snd_emu10k1_ptr_write(emu, ADCCR, 0, 0); + break; + case CAPTURE_EFX: + if (emu->audigy) { + snd_emu10k1_ptr_write(emu, A_FXWC1, 0, 0); + snd_emu10k1_ptr_write(emu, A_FXWC2, 0, 0); + } else + snd_emu10k1_ptr_write(emu, FXWC, 0, 0); + break; + default: + break; + } + snd_emu10k1_ptr_write(emu, epcm->capture_ba_reg, 0, runtime->dma_addr); + epcm->capture_bufsize = snd_pcm_lib_buffer_bytes(substream); + epcm->capture_bs_val = 0; + for (idx = 0; idx < 31; idx++) { + if (capture_period_sizes[idx] == epcm->capture_bufsize) { + epcm->capture_bs_val = idx + 1; + break; + } + } + if (epcm->capture_bs_val == 0) { + snd_BUG(); + epcm->capture_bs_val++; + } + if (epcm->type == CAPTURE_AC97ADC) { + epcm->capture_cr_val = emu->audigy ? A_ADCCR_LCHANENABLE : ADCCR_LCHANENABLE; + if (runtime->channels > 1) + epcm->capture_cr_val |= emu->audigy ? A_ADCCR_RCHANENABLE : ADCCR_RCHANENABLE; + epcm->capture_cr_val |= emu->audigy ? + snd_emu10k1_audigy_capture_rate_reg(runtime->rate) : + snd_emu10k1_capture_rate_reg(runtime->rate); + } + return 0; +} + +static void snd_emu10k1_playback_invalidate_cache(struct snd_emu10k1 *emu, int extra, struct snd_emu10k1_voice *evoice) +{ + struct snd_pcm_runtime *runtime; + unsigned int voice, stereo, i, ccis, cra = 64, cs, sample; + + if (evoice == NULL) + return; + runtime = evoice->epcm->substream->runtime; + voice = evoice->number; + stereo = (!extra && runtime->channels == 2); + sample = snd_pcm_format_width(runtime->format) == 16 ? 0 : 0x80808080; + ccis = emu10k1_ccis(stereo, sample == 0); + /* set cs to 2 * number of cache registers beside the invalidated */ + cs = (sample == 0) ? (32-ccis) : (64-ccis+1) >> 1; + if (cs > 16) cs = 16; + for (i = 0; i < cs; i++) { + snd_emu10k1_ptr_write(emu, CD0 + i, voice, sample); + if (stereo) { + snd_emu10k1_ptr_write(emu, CD0 + i, voice + 1, sample); + } + } + /* reset cache */ + snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice, 0); + snd_emu10k1_ptr_write(emu, CCR_READADDRESS, voice, cra); + if (stereo) { + snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice + 1, 0); + snd_emu10k1_ptr_write(emu, CCR_READADDRESS, voice + 1, cra); + } + /* fill cache */ + snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice, ccis); + if (stereo) { + snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice+1, ccis); + } +} + +static void snd_emu10k1_playback_prepare_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice, + int master, int extra, + struct snd_emu10k1_pcm_mixer *mix) +{ + struct snd_pcm_substream *substream; + struct snd_pcm_runtime *runtime; + unsigned int attn, vattn; + unsigned int voice, tmp; + + if (evoice == NULL) /* skip second voice for mono */ + return; + substream = evoice->epcm->substream; + runtime = substream->runtime; + voice = evoice->number; + + attn = extra ? 0 : 0x00ff; + tmp = runtime->channels == 2 ? (master ? 1 : 2) : 0; + vattn = mix != NULL ? (mix->attn[tmp] << 16) : 0; + snd_emu10k1_ptr_write(emu, IFATN, voice, attn); + snd_emu10k1_ptr_write(emu, VTFT, voice, vattn | 0xffff); + snd_emu10k1_ptr_write(emu, CVCF, voice, vattn | 0xffff); + snd_emu10k1_ptr_write(emu, DCYSUSV, voice, 0x7f7f); + snd_emu10k1_voice_clear_loop_stop(emu, voice); +} + +static void snd_emu10k1_playback_trigger_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice, int master, int extra) +{ + struct snd_pcm_substream *substream; + struct snd_pcm_runtime *runtime; + unsigned int voice, pitch, pitch_target; + + if (evoice == NULL) /* skip second voice for mono */ + return; + substream = evoice->epcm->substream; + runtime = substream->runtime; + voice = evoice->number; + + pitch = snd_emu10k1_rate_to_pitch(runtime->rate) >> 8; + if (emu->card_capabilities->emu_model) + pitch_target = PITCH_48000; /* Disable interpolators on emu1010 card */ + else + pitch_target = emu10k1_calc_pitch_target(runtime->rate); + snd_emu10k1_ptr_write(emu, PTRX_PITCHTARGET, voice, pitch_target); + if (master || evoice->epcm->type == PLAYBACK_EFX) + snd_emu10k1_ptr_write(emu, CPF_CURRENTPITCH, voice, pitch_target); + snd_emu10k1_ptr_write(emu, IP, voice, pitch); + if (extra) + snd_emu10k1_voice_intr_enable(emu, voice); +} + +static void snd_emu10k1_playback_stop_voice(struct snd_emu10k1 *emu, struct snd_emu10k1_voice *evoice) +{ + unsigned int voice; + + if (evoice == NULL) + return; + voice = evoice->number; + snd_emu10k1_voice_intr_disable(emu, voice); + snd_emu10k1_ptr_write(emu, PTRX_PITCHTARGET, voice, 0); + snd_emu10k1_ptr_write(emu, CPF_CURRENTPITCH, voice, 0); + snd_emu10k1_ptr_write(emu, IFATN, voice, 0xffff); + snd_emu10k1_ptr_write(emu, VTFT, voice, 0xffff); + snd_emu10k1_ptr_write(emu, CVCF, voice, 0xffff); + snd_emu10k1_ptr_write(emu, IP, voice, 0); +} + +static inline void snd_emu10k1_playback_mangle_extra(struct snd_emu10k1 *emu, + struct snd_emu10k1_pcm *epcm, + struct snd_pcm_substream *substream, + struct snd_pcm_runtime *runtime) +{ + unsigned int ptr, period_pos; + + /* try to sychronize the current position for the interrupt + source voice */ + period_pos = runtime->status->hw_ptr - runtime->hw_ptr_interrupt; + period_pos %= runtime->period_size; + ptr = snd_emu10k1_ptr_read(emu, CCCA, epcm->extra->number); + ptr &= ~0x00ffffff; + ptr |= epcm->ccca_start_addr + period_pos; + snd_emu10k1_ptr_write(emu, CCCA, epcm->extra->number, ptr); +} + +static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream, + int cmd) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_pcm *epcm = runtime->private_data; + struct snd_emu10k1_pcm_mixer *mix; + int result = 0; + + /* + dev_dbg(emu->card->dev, + "trigger - emu10k1 = 0x%x, cmd = %i, pointer = %i\n", + (int)emu, cmd, substream->ops->pointer(substream)) + */ + spin_lock(&emu->reg_lock); + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + snd_emu10k1_playback_invalidate_cache(emu, 1, epcm->extra); /* do we need this? */ + snd_emu10k1_playback_invalidate_cache(emu, 0, epcm->voices[0]); + /* fall through */ + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + case SNDRV_PCM_TRIGGER_RESUME: + if (cmd == SNDRV_PCM_TRIGGER_PAUSE_RELEASE) + snd_emu10k1_playback_mangle_extra(emu, epcm, substream, runtime); + mix = &emu->pcm_mixer[substream->number]; + snd_emu10k1_playback_prepare_voice(emu, epcm->voices[0], 1, 0, mix); + snd_emu10k1_playback_prepare_voice(emu, epcm->voices[1], 0, 0, mix); + snd_emu10k1_playback_prepare_voice(emu, epcm->extra, 1, 1, NULL); + snd_emu10k1_playback_trigger_voice(emu, epcm->voices[0], 1, 0); + snd_emu10k1_playback_trigger_voice(emu, epcm->voices[1], 0, 0); + snd_emu10k1_playback_trigger_voice(emu, epcm->extra, 1, 1); + epcm->running = 1; + break; + case SNDRV_PCM_TRIGGER_STOP: + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: + case SNDRV_PCM_TRIGGER_SUSPEND: + epcm->running = 0; + snd_emu10k1_playback_stop_voice(emu, epcm->voices[0]); + snd_emu10k1_playback_stop_voice(emu, epcm->voices[1]); + snd_emu10k1_playback_stop_voice(emu, epcm->extra); + break; + default: + result = -EINVAL; + break; + } + spin_unlock(&emu->reg_lock); + return result; +} + +static int snd_emu10k1_capture_trigger(struct snd_pcm_substream *substream, + int cmd) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_pcm *epcm = runtime->private_data; + int result = 0; + + spin_lock(&emu->reg_lock); + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + case SNDRV_PCM_TRIGGER_RESUME: + /* hmm this should cause full and half full interrupt to be raised? */ + outl(epcm->capture_ipr, emu->port + IPR); + snd_emu10k1_intr_enable(emu, epcm->capture_inte); + /* + dev_dbg(emu->card->dev, "adccr = 0x%x, adcbs = 0x%x\n", + epcm->adccr, epcm->adcbs); + */ + switch (epcm->type) { + case CAPTURE_AC97ADC: + snd_emu10k1_ptr_write(emu, ADCCR, 0, epcm->capture_cr_val); + break; + case CAPTURE_EFX: + if (emu->audigy) { + snd_emu10k1_ptr_write(emu, A_FXWC1, 0, epcm->capture_cr_val); + snd_emu10k1_ptr_write(emu, A_FXWC2, 0, epcm->capture_cr_val2); + dev_dbg(emu->card->dev, + "cr_val=0x%x, cr_val2=0x%x\n", + epcm->capture_cr_val, + epcm->capture_cr_val2); + } else + snd_emu10k1_ptr_write(emu, FXWC, 0, epcm->capture_cr_val); + break; + default: + break; + } + snd_emu10k1_ptr_write(emu, epcm->capture_bs_reg, 0, epcm->capture_bs_val); + epcm->running = 1; + epcm->first_ptr = 1; + break; + case SNDRV_PCM_TRIGGER_STOP: + case SNDRV_PCM_TRIGGER_SUSPEND: + epcm->running = 0; + snd_emu10k1_intr_disable(emu, epcm->capture_inte); + outl(epcm->capture_ipr, emu->port + IPR); + snd_emu10k1_ptr_write(emu, epcm->capture_bs_reg, 0, 0); + switch (epcm->type) { + case CAPTURE_AC97ADC: + snd_emu10k1_ptr_write(emu, ADCCR, 0, 0); + break; + case CAPTURE_EFX: + if (emu->audigy) { + snd_emu10k1_ptr_write(emu, A_FXWC1, 0, 0); + snd_emu10k1_ptr_write(emu, A_FXWC2, 0, 0); + } else + snd_emu10k1_ptr_write(emu, FXWC, 0, 0); + break; + default: + break; + } + break; + default: + result = -EINVAL; + } + spin_unlock(&emu->reg_lock); + return result; +} + +static snd_pcm_uframes_t snd_emu10k1_playback_pointer(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_pcm *epcm = runtime->private_data; + unsigned int ptr; + + if (!epcm->running) + return 0; + ptr = snd_emu10k1_ptr_read(emu, CCCA, epcm->voices[0]->number) & 0x00ffffff; +#if 0 /* Perex's code */ + ptr += runtime->buffer_size; + ptr -= epcm->ccca_start_addr; + ptr %= runtime->buffer_size; +#else /* EMU10K1 Open Source code from Creative */ + if (ptr < epcm->ccca_start_addr) + ptr += runtime->buffer_size - epcm->ccca_start_addr; + else { + ptr -= epcm->ccca_start_addr; + if (ptr >= runtime->buffer_size) + ptr -= runtime->buffer_size; + } +#endif + /* + dev_dbg(emu->card->dev, + "ptr = 0x%lx, buffer_size = 0x%lx, period_size = 0x%lx\n", + (long)ptr, (long)runtime->buffer_size, + (long)runtime->period_size); + */ + return ptr; +} + + +static int snd_emu10k1_efx_playback_trigger(struct snd_pcm_substream *substream, + int cmd) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_pcm *epcm = runtime->private_data; + int i; + int result = 0; + + spin_lock(&emu->reg_lock); + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + /* prepare voices */ + for (i = 0; i < NUM_EFX_PLAYBACK; i++) { + snd_emu10k1_playback_invalidate_cache(emu, 0, epcm->voices[i]); + } + snd_emu10k1_playback_invalidate_cache(emu, 1, epcm->extra); + + /* fall through */ + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + case SNDRV_PCM_TRIGGER_RESUME: + snd_emu10k1_playback_prepare_voice(emu, epcm->extra, 1, 1, NULL); + snd_emu10k1_playback_prepare_voice(emu, epcm->voices[0], 0, 0, + &emu->efx_pcm_mixer[0]); + for (i = 1; i < NUM_EFX_PLAYBACK; i++) + snd_emu10k1_playback_prepare_voice(emu, epcm->voices[i], 0, 0, + &emu->efx_pcm_mixer[i]); + snd_emu10k1_playback_trigger_voice(emu, epcm->voices[0], 0, 0); + snd_emu10k1_playback_trigger_voice(emu, epcm->extra, 1, 1); + for (i = 1; i < NUM_EFX_PLAYBACK; i++) + snd_emu10k1_playback_trigger_voice(emu, epcm->voices[i], 0, 0); + epcm->running = 1; + break; + case SNDRV_PCM_TRIGGER_SUSPEND: + case SNDRV_PCM_TRIGGER_STOP: + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: + epcm->running = 0; + for (i = 0; i < NUM_EFX_PLAYBACK; i++) { + snd_emu10k1_playback_stop_voice(emu, epcm->voices[i]); + } + snd_emu10k1_playback_stop_voice(emu, epcm->extra); + break; + default: + result = -EINVAL; + break; + } + spin_unlock(&emu->reg_lock); + return result; +} + + +static snd_pcm_uframes_t snd_emu10k1_capture_pointer(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_pcm *epcm = runtime->private_data; + unsigned int ptr; + + if (!epcm->running) + return 0; + if (epcm->first_ptr) { + udelay(50); /* hack, it takes awhile until capture is started */ + epcm->first_ptr = 0; + } + ptr = snd_emu10k1_ptr_read(emu, epcm->capture_idx_reg, 0) & 0x0000ffff; + return bytes_to_frames(runtime, ptr); +} + +/* + * Playback support device description + */ + +static const struct snd_pcm_hardware snd_emu10k1_playback = +{ + .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_BLOCK_TRANSFER | + SNDRV_PCM_INFO_RESUME | + SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE), + .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, + .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_96000, + .rate_min = 4000, + .rate_max = 96000, + .channels_min = 1, + .channels_max = 2, + .buffer_bytes_max = (128*1024), + .period_bytes_min = 64, + .period_bytes_max = (128*1024), + .periods_min = 1, + .periods_max = 1024, + .fifo_size = 0, +}; + +/* + * Capture support device description + */ + +static const struct snd_pcm_hardware snd_emu10k1_capture = +{ + .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_BLOCK_TRANSFER | + SNDRV_PCM_INFO_RESUME | + SNDRV_PCM_INFO_MMAP_VALID), + .formats = SNDRV_PCM_FMTBIT_S16_LE, + .rates = SNDRV_PCM_RATE_8000_48000, + .rate_min = 8000, + .rate_max = 48000, + .channels_min = 1, + .channels_max = 2, + .buffer_bytes_max = (64*1024), + .period_bytes_min = 384, + .period_bytes_max = (64*1024), + .periods_min = 2, + .periods_max = 2, + .fifo_size = 0, +}; + +static const struct snd_pcm_hardware snd_emu10k1_capture_efx = +{ + .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_BLOCK_TRANSFER | + SNDRV_PCM_INFO_RESUME | + SNDRV_PCM_INFO_MMAP_VALID), + .formats = SNDRV_PCM_FMTBIT_S16_LE, + .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | + SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | + SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000, + .rate_min = 44100, + .rate_max = 192000, + .channels_min = 8, + .channels_max = 8, + .buffer_bytes_max = (64*1024), + .period_bytes_min = 384, + .period_bytes_max = (64*1024), + .periods_min = 2, + .periods_max = 2, + .fifo_size = 0, +}; + +/* + * + */ + +static void snd_emu10k1_pcm_mixer_notify1(struct snd_emu10k1 *emu, struct snd_kcontrol *kctl, int idx, int activate) +{ + struct snd_ctl_elem_id id; + + if (! kctl) + return; + if (activate) + kctl->vd[idx].access &= ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; + else + kctl->vd[idx].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE; + snd_ctl_notify(emu->card, SNDRV_CTL_EVENT_MASK_VALUE | + SNDRV_CTL_EVENT_MASK_INFO, + snd_ctl_build_ioff(&id, kctl, idx)); +} + +static void snd_emu10k1_pcm_mixer_notify(struct snd_emu10k1 *emu, int idx, int activate) +{ + snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_send_routing, idx, activate); + snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_send_volume, idx, activate); + snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_attn, idx, activate); +} + +static void snd_emu10k1_pcm_efx_mixer_notify(struct snd_emu10k1 *emu, int idx, int activate) +{ + snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_send_routing, idx, activate); + snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_send_volume, idx, activate); + snd_emu10k1_pcm_mixer_notify1(emu, emu->ctl_efx_attn, idx, activate); +} + +static void snd_emu10k1_pcm_free_substream(struct snd_pcm_runtime *runtime) +{ + kfree(runtime->private_data); +} + +static int snd_emu10k1_efx_playback_close(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_emu10k1_pcm_mixer *mix; + int i; + + for (i = 0; i < NUM_EFX_PLAYBACK; i++) { + mix = &emu->efx_pcm_mixer[i]; + mix->epcm = NULL; + snd_emu10k1_pcm_efx_mixer_notify(emu, i, 0); + } + return 0; +} + +static int snd_emu10k1_efx_playback_open(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_emu10k1_pcm *epcm; + struct snd_emu10k1_pcm_mixer *mix; + struct snd_pcm_runtime *runtime = substream->runtime; + int i; + + epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); + if (epcm == NULL) + return -ENOMEM; + epcm->emu = emu; + epcm->type = PLAYBACK_EFX; + epcm->substream = substream; + + emu->pcm_playback_efx_substream = substream; + + runtime->private_data = epcm; + runtime->private_free = snd_emu10k1_pcm_free_substream; + runtime->hw = snd_emu10k1_efx_playback; + + for (i = 0; i < NUM_EFX_PLAYBACK; i++) { + mix = &emu->efx_pcm_mixer[i]; + mix->send_routing[0][0] = i; + memset(&mix->send_volume, 0, sizeof(mix->send_volume)); + mix->send_volume[0][0] = 255; + mix->attn[0] = 0xffff; + mix->epcm = epcm; + snd_emu10k1_pcm_efx_mixer_notify(emu, i, 1); + } + return 0; +} + +static int snd_emu10k1_playback_open(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_emu10k1_pcm *epcm; + struct snd_emu10k1_pcm_mixer *mix; + struct snd_pcm_runtime *runtime = substream->runtime; + int i, err, sample_rate; + + epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); + if (epcm == NULL) + return -ENOMEM; + epcm->emu = emu; + epcm->type = PLAYBACK_EMUVOICE; + epcm->substream = substream; + runtime->private_data = epcm; + runtime->private_free = snd_emu10k1_pcm_free_substream; + runtime->hw = snd_emu10k1_playback; + if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) { + kfree(epcm); + return err; + } + if ((err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 256, UINT_MAX)) < 0) { + kfree(epcm); + return err; + } + if (emu->card_capabilities->emu_model && emu->emu1010.internal_clock == 0) + sample_rate = 44100; + else + sample_rate = 48000; + err = snd_pcm_hw_rule_noresample(runtime, sample_rate); + if (err < 0) { + kfree(epcm); + return err; + } + mix = &emu->pcm_mixer[substream->number]; + for (i = 0; i < 4; i++) + mix->send_routing[0][i] = mix->send_routing[1][i] = mix->send_routing[2][i] = i; + memset(&mix->send_volume, 0, sizeof(mix->send_volume)); + mix->send_volume[0][0] = mix->send_volume[0][1] = + mix->send_volume[1][0] = mix->send_volume[2][1] = 255; + mix->attn[0] = mix->attn[1] = mix->attn[2] = 0xffff; + mix->epcm = epcm; + snd_emu10k1_pcm_mixer_notify(emu, substream->number, 1); + return 0; +} + +static int snd_emu10k1_playback_close(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_emu10k1_pcm_mixer *mix = &emu->pcm_mixer[substream->number]; + + mix->epcm = NULL; + snd_emu10k1_pcm_mixer_notify(emu, substream->number, 0); + return 0; +} + +static int snd_emu10k1_capture_open(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_pcm *epcm; + + epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); + if (epcm == NULL) + return -ENOMEM; + epcm->emu = emu; + epcm->type = CAPTURE_AC97ADC; + epcm->substream = substream; + epcm->capture_ipr = IPR_ADCBUFFULL|IPR_ADCBUFHALFFULL; + epcm->capture_inte = INTE_ADCBUFENABLE; + epcm->capture_ba_reg = ADCBA; + epcm->capture_bs_reg = ADCBS; + epcm->capture_idx_reg = emu->audigy ? A_ADCIDX : ADCIDX; + runtime->private_data = epcm; + runtime->private_free = snd_emu10k1_pcm_free_substream; + runtime->hw = snd_emu10k1_capture; + emu->capture_interrupt = snd_emu10k1_pcm_ac97adc_interrupt; + emu->pcm_capture_substream = substream; + snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_period_sizes); + snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_capture_rates); + return 0; +} + +static int snd_emu10k1_capture_close(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + + emu->capture_interrupt = NULL; + emu->pcm_capture_substream = NULL; + return 0; +} + +static int snd_emu10k1_capture_mic_open(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_emu10k1_pcm *epcm; + struct snd_pcm_runtime *runtime = substream->runtime; + + epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); + if (epcm == NULL) + return -ENOMEM; + epcm->emu = emu; + epcm->type = CAPTURE_AC97MIC; + epcm->substream = substream; + epcm->capture_ipr = IPR_MICBUFFULL|IPR_MICBUFHALFFULL; + epcm->capture_inte = INTE_MICBUFENABLE; + epcm->capture_ba_reg = MICBA; + epcm->capture_bs_reg = MICBS; + epcm->capture_idx_reg = emu->audigy ? A_MICIDX : MICIDX; + substream->runtime->private_data = epcm; + substream->runtime->private_free = snd_emu10k1_pcm_free_substream; + runtime->hw = snd_emu10k1_capture; + runtime->hw.rates = SNDRV_PCM_RATE_8000; + runtime->hw.rate_min = runtime->hw.rate_max = 8000; + runtime->hw.channels_min = 1; + emu->capture_mic_interrupt = snd_emu10k1_pcm_ac97mic_interrupt; + emu->pcm_capture_mic_substream = substream; + snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_period_sizes); + return 0; +} + +static int snd_emu10k1_capture_mic_close(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + + emu->capture_interrupt = NULL; + emu->pcm_capture_mic_substream = NULL; + return 0; +} + +static int snd_emu10k1_capture_efx_open(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_emu10k1_pcm *epcm; + struct snd_pcm_runtime *runtime = substream->runtime; + int nefx = emu->audigy ? 64 : 32; + int idx; + + epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); + if (epcm == NULL) + return -ENOMEM; + epcm->emu = emu; + epcm->type = CAPTURE_EFX; + epcm->substream = substream; + epcm->capture_ipr = IPR_EFXBUFFULL|IPR_EFXBUFHALFFULL; + epcm->capture_inte = INTE_EFXBUFENABLE; + epcm->capture_ba_reg = FXBA; + epcm->capture_bs_reg = FXBS; + epcm->capture_idx_reg = FXIDX; + substream->runtime->private_data = epcm; + substream->runtime->private_free = snd_emu10k1_pcm_free_substream; + runtime->hw = snd_emu10k1_capture_efx; + runtime->hw.rates = SNDRV_PCM_RATE_48000; + runtime->hw.rate_min = runtime->hw.rate_max = 48000; + spin_lock_irq(&emu->reg_lock); + if (emu->card_capabilities->emu_model) { + /* Nb. of channels has been increased to 16 */ + /* TODO + * SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE + * SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 | + * SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | + * SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000 + * rate_min = 44100, + * rate_max = 192000, + * channels_min = 16, + * channels_max = 16, + * Need to add mixer control to fix sample rate + * + * There are 32 mono channels of 16bits each. + * 24bit Audio uses 2x channels over 16bit + * 96kHz uses 2x channels over 48kHz + * 192kHz uses 4x channels over 48kHz + * So, for 48kHz 24bit, one has 16 channels + * for 96kHz 24bit, one has 8 channels + * for 192kHz 24bit, one has 4 channels + * + */ +#if 1 + switch (emu->emu1010.internal_clock) { + case 0: + /* For 44.1kHz */ + runtime->hw.rates = SNDRV_PCM_RATE_44100; + runtime->hw.rate_min = runtime->hw.rate_max = 44100; + runtime->hw.channels_min = + runtime->hw.channels_max = 16; + break; + case 1: + /* For 48kHz */ + runtime->hw.rates = SNDRV_PCM_RATE_48000; + runtime->hw.rate_min = runtime->hw.rate_max = 48000; + runtime->hw.channels_min = + runtime->hw.channels_max = 16; + break; + } +#endif +#if 0 + /* For 96kHz */ + runtime->hw.rates = SNDRV_PCM_RATE_96000; + runtime->hw.rate_min = runtime->hw.rate_max = 96000; + runtime->hw.channels_min = runtime->hw.channels_max = 4; +#endif +#if 0 + /* For 192kHz */ + runtime->hw.rates = SNDRV_PCM_RATE_192000; + runtime->hw.rate_min = runtime->hw.rate_max = 192000; + runtime->hw.channels_min = runtime->hw.channels_max = 2; +#endif + runtime->hw.formats = SNDRV_PCM_FMTBIT_S32_LE; + /* efx_voices_mask[0] is expected to be zero + * efx_voices_mask[1] is expected to have 32bits set + */ + } else { + runtime->hw.channels_min = runtime->hw.channels_max = 0; + for (idx = 0; idx < nefx; idx++) { + if (emu->efx_voices_mask[idx/32] & (1 << (idx%32))) { + runtime->hw.channels_min++; + runtime->hw.channels_max++; + } + } + } + epcm->capture_cr_val = emu->efx_voices_mask[0]; + epcm->capture_cr_val2 = emu->efx_voices_mask[1]; + spin_unlock_irq(&emu->reg_lock); + emu->capture_efx_interrupt = snd_emu10k1_pcm_efx_interrupt; + emu->pcm_capture_efx_substream = substream; + snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, &hw_constraints_capture_period_sizes); + return 0; +} + +static int snd_emu10k1_capture_efx_close(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + + emu->capture_interrupt = NULL; + emu->pcm_capture_efx_substream = NULL; + return 0; +} + +static const struct snd_pcm_ops snd_emu10k1_playback_ops = { + .open = snd_emu10k1_playback_open, + .close = snd_emu10k1_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_emu10k1_playback_hw_params, + .hw_free = snd_emu10k1_playback_hw_free, + .prepare = snd_emu10k1_playback_prepare, + .trigger = snd_emu10k1_playback_trigger, + .pointer = snd_emu10k1_playback_pointer, + .page = snd_pcm_sgbuf_ops_page, +}; + +static const struct snd_pcm_ops snd_emu10k1_capture_ops = { + .open = snd_emu10k1_capture_open, + .close = snd_emu10k1_capture_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_emu10k1_capture_hw_params, + .hw_free = snd_emu10k1_capture_hw_free, + .prepare = snd_emu10k1_capture_prepare, + .trigger = snd_emu10k1_capture_trigger, + .pointer = snd_emu10k1_capture_pointer, +}; + +/* EFX playback */ +static const struct snd_pcm_ops snd_emu10k1_efx_playback_ops = { + .open = snd_emu10k1_efx_playback_open, + .close = snd_emu10k1_efx_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_emu10k1_playback_hw_params, + .hw_free = snd_emu10k1_efx_playback_hw_free, + .prepare = snd_emu10k1_efx_playback_prepare, + .trigger = snd_emu10k1_efx_playback_trigger, + .pointer = snd_emu10k1_efx_playback_pointer, + .page = snd_pcm_sgbuf_ops_page, +}; + +int snd_emu10k1_pcm(struct snd_emu10k1 *emu, int device) +{ + struct snd_pcm *pcm; + struct snd_pcm_substream *substream; + int err; + + if ((err = snd_pcm_new(emu->card, "emu10k1", device, 32, 1, &pcm)) < 0) + return err; + + pcm->private_data = emu; + + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_playback_ops); + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_ops); + + pcm->info_flags = 0; + pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; + strcpy(pcm->name, "ADC Capture/Standard PCM Playback"); + emu->pcm = pcm; + + for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next) + if ((err = snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV_SG, snd_dma_pci_data(emu->pci), 64*1024, 64*1024)) < 0) + return err; + + for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; substream; substream = substream->next) + snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), 64*1024, 64*1024); + + return 0; +} + +int snd_emu10k1_pcm_multi(struct snd_emu10k1 *emu, int device) +{ + struct snd_pcm *pcm; + struct snd_pcm_substream *substream; + int err; + + if ((err = snd_pcm_new(emu->card, "emu10k1", device, 1, 0, &pcm)) < 0) + return err; + + pcm->private_data = emu; + + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_efx_playback_ops); + + pcm->info_flags = 0; + pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX; + strcpy(pcm->name, "Multichannel Playback"); + emu->pcm_multi = pcm; + + for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next) + if ((err = snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV_SG, snd_dma_pci_data(emu->pci), 64*1024, 64*1024)) < 0) + return err; + + return 0; +} + + +static const struct snd_pcm_ops snd_emu10k1_capture_mic_ops = { + .open = snd_emu10k1_capture_mic_open, + .close = snd_emu10k1_capture_mic_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_emu10k1_capture_hw_params, + .hw_free = snd_emu10k1_capture_hw_free, + .prepare = snd_emu10k1_capture_prepare, + .trigger = snd_emu10k1_capture_trigger, + .pointer = snd_emu10k1_capture_pointer, +}; + +int snd_emu10k1_pcm_mic(struct snd_emu10k1 *emu, int device) +{ + struct snd_pcm *pcm; + int err; + + if ((err = snd_pcm_new(emu->card, "emu10k1 mic", device, 0, 1, &pcm)) < 0) + return err; + + pcm->private_data = emu; + + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_mic_ops); + + pcm->info_flags = 0; + strcpy(pcm->name, "Mic Capture"); + emu->pcm_mic = pcm; + + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), 64*1024, 64*1024); + + return 0; +} + +static int snd_emu10k1_pcm_efx_voices_mask_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) +{ + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); + int nefx = emu->audigy ? 64 : 32; + uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; + uinfo->count = nefx; + uinfo->value.integer.min = 0; + uinfo->value.integer.max = 1; + return 0; +} + +static int snd_emu10k1_pcm_efx_voices_mask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) +{ + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); + int nefx = emu->audigy ? 64 : 32; + int idx; + + spin_lock_irq(&emu->reg_lock); + for (idx = 0; idx < nefx; idx++) + ucontrol->value.integer.value[idx] = (emu->efx_voices_mask[idx / 32] & (1 << (idx % 32))) ? 1 : 0; + spin_unlock_irq(&emu->reg_lock); + return 0; +} + +static int snd_emu10k1_pcm_efx_voices_mask_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) +{ + struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); + unsigned int nval[2], bits; + int nefx = emu->audigy ? 64 : 32; + int nefxb = emu->audigy ? 7 : 6; + int change, idx; + + nval[0] = nval[1] = 0; + for (idx = 0, bits = 0; idx < nefx; idx++) + if (ucontrol->value.integer.value[idx]) { + nval[idx / 32] |= 1 << (idx % 32); + bits++; + } + + for (idx = 0; idx < nefxb; idx++) + if (1 << idx == bits) + break; + + if (idx >= nefxb) + return -EINVAL; + + spin_lock_irq(&emu->reg_lock); + change = (nval[0] != emu->efx_voices_mask[0]) || + (nval[1] != emu->efx_voices_mask[1]); + emu->efx_voices_mask[0] = nval[0]; + emu->efx_voices_mask[1] = nval[1]; + spin_unlock_irq(&emu->reg_lock); + return change; +} + +static const struct snd_kcontrol_new snd_emu10k1_pcm_efx_voices_mask = { + .iface = SNDRV_CTL_ELEM_IFACE_PCM, + .name = "Captured FX8010 Outputs", + .info = snd_emu10k1_pcm_efx_voices_mask_info, + .get = snd_emu10k1_pcm_efx_voices_mask_get, + .put = snd_emu10k1_pcm_efx_voices_mask_put +}; + +static const struct snd_pcm_ops snd_emu10k1_capture_efx_ops = { + .open = snd_emu10k1_capture_efx_open, + .close = snd_emu10k1_capture_efx_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_emu10k1_capture_hw_params, + .hw_free = snd_emu10k1_capture_hw_free, + .prepare = snd_emu10k1_capture_prepare, + .trigger = snd_emu10k1_capture_trigger, + .pointer = snd_emu10k1_capture_pointer, +}; + + +/* EFX playback */ + +#define INITIAL_TRAM_SHIFT 14 +#define INITIAL_TRAM_POS(size) ((((size) / 2) - INITIAL_TRAM_SHIFT) - 1) + +static void snd_emu10k1_fx8010_playback_irq(struct snd_emu10k1 *emu, void *private_data) +{ + struct snd_pcm_substream *substream = private_data; + snd_pcm_period_elapsed(substream); +} + +static void snd_emu10k1_fx8010_playback_tram_poke1(unsigned short *dst_left, + unsigned short *dst_right, + unsigned short *src, + unsigned int count, + unsigned int tram_shift) +{ + /* + dev_dbg(emu->card->dev, + "tram_poke1: dst_left = 0x%p, dst_right = 0x%p, " + "src = 0x%p, count = 0x%x\n", + dst_left, dst_right, src, count); + */ + if ((tram_shift & 1) == 0) { + while (count--) { + *dst_left-- = *src++; + *dst_right-- = *src++; + } + } else { + while (count--) { + *dst_right-- = *src++; + *dst_left-- = *src++; + } + } +} + +static void fx8010_pb_trans_copy(struct snd_pcm_substream *substream, + struct snd_pcm_indirect *rec, size_t bytes) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; + unsigned int tram_size = pcm->buffer_size; + unsigned short *src = (unsigned short *)(substream->runtime->dma_area + rec->sw_data); + unsigned int frames = bytes >> 2, count; + unsigned int tram_pos = pcm->tram_pos; + unsigned int tram_shift = pcm->tram_shift; + + while (frames > tram_pos) { + count = tram_pos + 1; + snd_emu10k1_fx8010_playback_tram_poke1((unsigned short *)emu->fx8010.etram_pages.area + tram_pos, + (unsigned short *)emu->fx8010.etram_pages.area + tram_pos + tram_size / 2, + src, count, tram_shift); + src += count * 2; + frames -= count; + tram_pos = (tram_size / 2) - 1; + tram_shift++; + } + snd_emu10k1_fx8010_playback_tram_poke1((unsigned short *)emu->fx8010.etram_pages.area + tram_pos, + (unsigned short *)emu->fx8010.etram_pages.area + tram_pos + tram_size / 2, + src, frames, tram_shift); + tram_pos -= frames; + pcm->tram_pos = tram_pos; + pcm->tram_shift = tram_shift; +} + +static int snd_emu10k1_fx8010_playback_transfer(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; + + return snd_pcm_indirect_playback_transfer(substream, &pcm->pcm_rec, + fx8010_pb_trans_copy); +} + +static int snd_emu10k1_fx8010_playback_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *hw_params) +{ + return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); +} + +static int snd_emu10k1_fx8010_playback_hw_free(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; + unsigned int i; + + for (i = 0; i < pcm->channels; i++) + snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, 0); + snd_pcm_lib_free_pages(substream); + return 0; +} + +static int snd_emu10k1_fx8010_playback_prepare(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; + unsigned int i; + + /* + dev_dbg(emu->card->dev, "prepare: etram_pages = 0x%p, dma_area = 0x%x, " + "buffer_size = 0x%x (0x%x)\n", + emu->fx8010.etram_pages, runtime->dma_area, + runtime->buffer_size, runtime->buffer_size << 2); + */ + memset(&pcm->pcm_rec, 0, sizeof(pcm->pcm_rec)); + pcm->pcm_rec.hw_buffer_size = pcm->buffer_size * 2; /* byte size */ + pcm->pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); + pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size); + pcm->tram_shift = 0; + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_running, 0, 0); /* reset */ + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0); /* reset */ + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_size, 0, runtime->buffer_size); + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_ptr, 0, 0); /* reset ptr number */ + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_count, 0, runtime->period_size); + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_tmpcount, 0, runtime->period_size); + for (i = 0; i < pcm->channels; i++) + snd_emu10k1_ptr_write(emu, TANKMEMADDRREGBASE + 0x80 + pcm->etram[i], 0, (TANKMEMADDRREG_READ|TANKMEMADDRREG_ALIGN) + i * (runtime->buffer_size / pcm->channels)); + return 0; +} + +static int snd_emu10k1_fx8010_playback_trigger(struct snd_pcm_substream *substream, int cmd) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; + int result = 0; + + spin_lock(&emu->reg_lock); + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + /* follow thru */ + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + case SNDRV_PCM_TRIGGER_RESUME: +#ifdef EMU10K1_SET_AC3_IEC958 + { + int i; + for (i = 0; i < 3; i++) { + unsigned int bits; + bits = SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 | + SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | SPCS_GENERATIONSTATUS | + 0x00001200 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT | SPCS_NOTAUDIODATA; + snd_emu10k1_ptr_write(emu, SPCS0 + i, 0, bits); + } + } +#endif + result = snd_emu10k1_fx8010_register_irq_handler(emu, snd_emu10k1_fx8010_playback_irq, pcm->gpr_running, substream, &pcm->irq); + if (result < 0) + goto __err; + snd_emu10k1_fx8010_playback_transfer(substream); /* roll the ball */ + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 1); + break; + case SNDRV_PCM_TRIGGER_STOP: + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: + case SNDRV_PCM_TRIGGER_SUSPEND: + snd_emu10k1_fx8010_unregister_irq_handler(emu, &pcm->irq); + snd_emu10k1_ptr_write(emu, emu->gpr_base + pcm->gpr_trigger, 0, 0); + pcm->tram_pos = INITIAL_TRAM_POS(pcm->buffer_size); + pcm->tram_shift = 0; + break; + default: + result = -EINVAL; + break; + } + __err: + spin_unlock(&emu->reg_lock); + return result; +} + +static snd_pcm_uframes_t snd_emu10k1_fx8010_playback_pointer(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; + size_t ptr; /* byte pointer */ + + if (!snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_trigger, 0)) + return 0; + ptr = snd_emu10k1_ptr_read(emu, emu->gpr_base + pcm->gpr_ptr, 0) << 2; + return snd_pcm_indirect_playback_pointer(substream, &pcm->pcm_rec, ptr); +} + +static const struct snd_pcm_hardware snd_emu10k1_fx8010_playback = +{ + .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_RESUME | + /* SNDRV_PCM_INFO_MMAP_VALID | */ SNDRV_PCM_INFO_PAUSE), + .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE, + .rates = SNDRV_PCM_RATE_48000, + .rate_min = 48000, + .rate_max = 48000, + .channels_min = 1, + .channels_max = 1, + .buffer_bytes_max = (128*1024), + .period_bytes_min = 1024, + .period_bytes_max = (128*1024), + .periods_min = 2, + .periods_max = 1024, + .fifo_size = 0, +}; + +static int snd_emu10k1_fx8010_playback_open(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_pcm_runtime *runtime = substream->runtime; + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; + + runtime->hw = snd_emu10k1_fx8010_playback; + runtime->hw.channels_min = runtime->hw.channels_max = pcm->channels; + runtime->hw.period_bytes_max = (pcm->buffer_size * 2) / 2; + spin_lock_irq(&emu->reg_lock); + if (pcm->valid == 0) { + spin_unlock_irq(&emu->reg_lock); + return -ENODEV; + } + pcm->opened = 1; + spin_unlock_irq(&emu->reg_lock); + return 0; +} + +static int snd_emu10k1_fx8010_playback_close(struct snd_pcm_substream *substream) +{ + struct snd_emu10k1 *emu = snd_pcm_substream_chip(substream); + struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; + + spin_lock_irq(&emu->reg_lock); + pcm->opened = 0; + spin_unlock_irq(&emu->reg_lock); + return 0; +} + +static const struct snd_pcm_ops snd_emu10k1_fx8010_playback_ops = { + .open = snd_emu10k1_fx8010_playback_open, + .close = snd_emu10k1_fx8010_playback_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_emu10k1_fx8010_playback_hw_params, + .hw_free = snd_emu10k1_fx8010_playback_hw_free, + .prepare = snd_emu10k1_fx8010_playback_prepare, + .trigger = snd_emu10k1_fx8010_playback_trigger, + .pointer = snd_emu10k1_fx8010_playback_pointer, + .ack = snd_emu10k1_fx8010_playback_transfer, +}; + +int snd_emu10k1_pcm_efx(struct snd_emu10k1 *emu, int device) +{ + struct snd_pcm *pcm; + struct snd_kcontrol *kctl; + int err; + + if ((err = snd_pcm_new(emu->card, "emu10k1 efx", device, 8, 1, &pcm)) < 0) + return err; + + pcm->private_data = emu; + + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_emu10k1_fx8010_playback_ops); + snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_emu10k1_capture_efx_ops); + + pcm->info_flags = 0; + strcpy(pcm->name, "Multichannel Capture/PT Playback"); + emu->pcm_efx = pcm; + + /* EFX capture - record the "FXBUS2" channels, by default we connect the EXTINs + * to these + */ + + /* emu->efx_voices_mask[0] = FXWC_DEFAULTROUTE_C | FXWC_DEFAULTROUTE_A; */ + if (emu->audigy) { + emu->efx_voices_mask[0] = 0; + if (emu->card_capabilities->emu_model) + /* Pavel Hofman - 32 voices will be used for + * capture (write mode) - + * each bit = corresponding voice + */ + emu->efx_voices_mask[1] = 0xffffffff; + else + emu->efx_voices_mask[1] = 0xffff; + } else { + emu->efx_voices_mask[0] = 0xffff0000; + emu->efx_voices_mask[1] = 0; + } + /* For emu1010, the control has to set 32 upper bits (voices) + * out of the 64 bits (voices) to true for the 16-channels capture + * to work correctly. Correct A_FXWC2 initial value (0xffffffff) + * is already defined but the snd_emu10k1_pcm_efx_voices_mask + * control can override this register's value. + */ + kctl = snd_ctl_new1(&snd_emu10k1_pcm_efx_voices_mask, emu); + if (!kctl) + return -ENOMEM; + kctl->id.device = device; + err = snd_ctl_add(emu->card, kctl); + if (err < 0) + return err; + + snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci), 64*1024, 64*1024); + + return 0; +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emupcm.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emupcm.c.yml new file mode 100644 index 00000000000..abd028b02a7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emupcm.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) by Jaroslav Kysela Creative Labs, Inc. Routines + - Copyright (c) Lee Revell +holders: + - Jaroslav Kysela Creative Labs, Inc. Routines + - Lee Revell diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emuproc.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emuproc.c new file mode 100644 index 00000000000..f23399d0dfd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emuproc.c @@ -0,0 +1,656 @@ +/* + * Copyright (c) by Jaroslav Kysela + * Creative Labs, Inc. + * Routines for control of EMU10K1 chips / proc interface routines + * + * Copyright (c) by James Courtier-Dutton + * Added EMU 1010 support. + * + * BUGS: + * -- + * + * TODO: + * -- + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include "p16v.h" + +static void snd_emu10k1_proc_spdif_status(struct snd_emu10k1 * emu, + struct snd_info_buffer *buffer, + char *title, + int status_reg, + int rate_reg) +{ + static char *clkaccy[4] = { "1000ppm", "50ppm", "variable", "unknown" }; + static int samplerate[16] = { 44100, 1, 48000, 32000, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; + static char *channel[16] = { "unspec", "left", "right", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15" }; + static char *emphasis[8] = { "none", "50/15 usec 2 channel", "2", "3", "4", "5", "6", "7" }; + unsigned int status, rate = 0; + + status = snd_emu10k1_ptr_read(emu, status_reg, 0); + + snd_iprintf(buffer, "\n%s\n", title); + + if (status != 0xffffffff) { + snd_iprintf(buffer, "Professional Mode : %s\n", (status & SPCS_PROFESSIONAL) ? "yes" : "no"); + snd_iprintf(buffer, "Not Audio Data : %s\n", (status & SPCS_NOTAUDIODATA) ? "yes" : "no"); + snd_iprintf(buffer, "Copyright : %s\n", (status & SPCS_COPYRIGHT) ? "yes" : "no"); + snd_iprintf(buffer, "Emphasis : %s\n", emphasis[(status & SPCS_EMPHASISMASK) >> 3]); + snd_iprintf(buffer, "Mode : %i\n", (status & SPCS_MODEMASK) >> 6); + snd_iprintf(buffer, "Category Code : 0x%x\n", (status & SPCS_CATEGORYCODEMASK) >> 8); + snd_iprintf(buffer, "Generation Status : %s\n", status & SPCS_GENERATIONSTATUS ? "original" : "copy"); + snd_iprintf(buffer, "Source Mask : %i\n", (status & SPCS_SOURCENUMMASK) >> 16); + snd_iprintf(buffer, "Channel Number : %s\n", channel[(status & SPCS_CHANNELNUMMASK) >> 20]); + snd_iprintf(buffer, "Sample Rate : %iHz\n", samplerate[(status & SPCS_SAMPLERATEMASK) >> 24]); + snd_iprintf(buffer, "Clock Accuracy : %s\n", clkaccy[(status & SPCS_CLKACCYMASK) >> 28]); + + if (rate_reg > 0) { + rate = snd_emu10k1_ptr_read(emu, rate_reg, 0); + snd_iprintf(buffer, "S/PDIF Valid : %s\n", rate & SRCS_SPDIFVALID ? "on" : "off"); + snd_iprintf(buffer, "S/PDIF Locked : %s\n", rate & SRCS_SPDIFLOCKED ? "on" : "off"); + snd_iprintf(buffer, "Rate Locked : %s\n", rate & SRCS_RATELOCKED ? "on" : "off"); + /* From ((Rate * 48000 ) / 262144); */ + snd_iprintf(buffer, "Estimated Sample Rate : %d\n", ((rate & 0xFFFFF ) * 375) >> 11); + } + } else { + snd_iprintf(buffer, "No signal detected.\n"); + } + +} + +static void snd_emu10k1_proc_read(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + /* FIXME - output names are in emufx.c too */ + static char *creative_outs[32] = { + /* 00 */ "AC97 Left", + /* 01 */ "AC97 Right", + /* 02 */ "Optical IEC958 Left", + /* 03 */ "Optical IEC958 Right", + /* 04 */ "Center", + /* 05 */ "LFE", + /* 06 */ "Headphone Left", + /* 07 */ "Headphone Right", + /* 08 */ "Surround Left", + /* 09 */ "Surround Right", + /* 10 */ "PCM Capture Left", + /* 11 */ "PCM Capture Right", + /* 12 */ "MIC Capture", + /* 13 */ "AC97 Surround Left", + /* 14 */ "AC97 Surround Right", + /* 15 */ "???", + /* 16 */ "???", + /* 17 */ "Analog Center", + /* 18 */ "Analog LFE", + /* 19 */ "???", + /* 20 */ "???", + /* 21 */ "???", + /* 22 */ "???", + /* 23 */ "???", + /* 24 */ "???", + /* 25 */ "???", + /* 26 */ "???", + /* 27 */ "???", + /* 28 */ "???", + /* 29 */ "???", + /* 30 */ "???", + /* 31 */ "???" + }; + + static char *audigy_outs[64] = { + /* 00 */ "Digital Front Left", + /* 01 */ "Digital Front Right", + /* 02 */ "Digital Center", + /* 03 */ "Digital LEF", + /* 04 */ "Headphone Left", + /* 05 */ "Headphone Right", + /* 06 */ "Digital Rear Left", + /* 07 */ "Digital Rear Right", + /* 08 */ "Front Left", + /* 09 */ "Front Right", + /* 10 */ "Center", + /* 11 */ "LFE", + /* 12 */ "???", + /* 13 */ "???", + /* 14 */ "Rear Left", + /* 15 */ "Rear Right", + /* 16 */ "AC97 Front Left", + /* 17 */ "AC97 Front Right", + /* 18 */ "ADC Capture Left", + /* 19 */ "ADC Capture Right", + /* 20 */ "???", + /* 21 */ "???", + /* 22 */ "???", + /* 23 */ "???", + /* 24 */ "???", + /* 25 */ "???", + /* 26 */ "???", + /* 27 */ "???", + /* 28 */ "???", + /* 29 */ "???", + /* 30 */ "???", + /* 31 */ "???", + /* 32 */ "FXBUS2_0", + /* 33 */ "FXBUS2_1", + /* 34 */ "FXBUS2_2", + /* 35 */ "FXBUS2_3", + /* 36 */ "FXBUS2_4", + /* 37 */ "FXBUS2_5", + /* 38 */ "FXBUS2_6", + /* 39 */ "FXBUS2_7", + /* 40 */ "FXBUS2_8", + /* 41 */ "FXBUS2_9", + /* 42 */ "FXBUS2_10", + /* 43 */ "FXBUS2_11", + /* 44 */ "FXBUS2_12", + /* 45 */ "FXBUS2_13", + /* 46 */ "FXBUS2_14", + /* 47 */ "FXBUS2_15", + /* 48 */ "FXBUS2_16", + /* 49 */ "FXBUS2_17", + /* 50 */ "FXBUS2_18", + /* 51 */ "FXBUS2_19", + /* 52 */ "FXBUS2_20", + /* 53 */ "FXBUS2_21", + /* 54 */ "FXBUS2_22", + /* 55 */ "FXBUS2_23", + /* 56 */ "FXBUS2_24", + /* 57 */ "FXBUS2_25", + /* 58 */ "FXBUS2_26", + /* 59 */ "FXBUS2_27", + /* 60 */ "FXBUS2_28", + /* 61 */ "FXBUS2_29", + /* 62 */ "FXBUS2_30", + /* 63 */ "FXBUS2_31" + }; + + struct snd_emu10k1 *emu = entry->private_data; + unsigned int val, val1; + int nefx = emu->audigy ? 64 : 32; + char **outputs = emu->audigy ? audigy_outs : creative_outs; + int idx; + + snd_iprintf(buffer, "EMU10K1\n\n"); + snd_iprintf(buffer, "Card : %s\n", + emu->audigy ? "Audigy" : (emu->card_capabilities->ecard ? "EMU APS" : "Creative")); + snd_iprintf(buffer, "Internal TRAM (words) : 0x%x\n", emu->fx8010.itram_size); + snd_iprintf(buffer, "External TRAM (words) : 0x%x\n", (int)emu->fx8010.etram_pages.bytes / 2); + snd_iprintf(buffer, "\n"); + snd_iprintf(buffer, "Effect Send Routing :\n"); + for (idx = 0; idx < NUM_G; idx++) { + val = emu->audigy ? + snd_emu10k1_ptr_read(emu, A_FXRT1, idx) : + snd_emu10k1_ptr_read(emu, FXRT, idx); + val1 = emu->audigy ? + snd_emu10k1_ptr_read(emu, A_FXRT2, idx) : + 0; + if (emu->audigy) { + snd_iprintf(buffer, "Ch%i: A=%i, B=%i, C=%i, D=%i, ", + idx, + val & 0x3f, + (val >> 8) & 0x3f, + (val >> 16) & 0x3f, + (val >> 24) & 0x3f); + snd_iprintf(buffer, "E=%i, F=%i, G=%i, H=%i\n", + val1 & 0x3f, + (val1 >> 8) & 0x3f, + (val1 >> 16) & 0x3f, + (val1 >> 24) & 0x3f); + } else { + snd_iprintf(buffer, "Ch%i: A=%i, B=%i, C=%i, D=%i\n", + idx, + (val >> 16) & 0x0f, + (val >> 20) & 0x0f, + (val >> 24) & 0x0f, + (val >> 28) & 0x0f); + } + } + snd_iprintf(buffer, "\nCaptured FX Outputs :\n"); + for (idx = 0; idx < nefx; idx++) { + if (emu->efx_voices_mask[idx/32] & (1 << (idx%32))) + snd_iprintf(buffer, " Output %02i [%s]\n", idx, outputs[idx]); + } + snd_iprintf(buffer, "\nAll FX Outputs :\n"); + for (idx = 0; idx < (emu->audigy ? 64 : 32); idx++) + snd_iprintf(buffer, " Output %02i [%s]\n", idx, outputs[idx]); +} + +static void snd_emu10k1_proc_spdif_read(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + struct snd_emu10k1 *emu = entry->private_data; + u32 value; + u32 value2; + u32 rate; + + if (emu->card_capabilities->emu_model) { + snd_emu1010_fpga_read(emu, 0x38, &value); + if ((value & 0x1) == 0) { + snd_emu1010_fpga_read(emu, 0x2a, &value); + snd_emu1010_fpga_read(emu, 0x2b, &value2); + rate = 0x1770000 / (((value << 5) | value2)+1); + snd_iprintf(buffer, "ADAT Locked : %u\n", rate); + } else { + snd_iprintf(buffer, "ADAT Unlocked\n"); + } + snd_emu1010_fpga_read(emu, 0x20, &value); + if ((value & 0x4) == 0) { + snd_emu1010_fpga_read(emu, 0x28, &value); + snd_emu1010_fpga_read(emu, 0x29, &value2); + rate = 0x1770000 / (((value << 5) | value2)+1); + snd_iprintf(buffer, "SPDIF Locked : %d\n", rate); + } else { + snd_iprintf(buffer, "SPDIF Unlocked\n"); + } + } else { + snd_emu10k1_proc_spdif_status(emu, buffer, "CD-ROM S/PDIF In", CDCS, CDSRCS); + snd_emu10k1_proc_spdif_status(emu, buffer, "Optical or Coax S/PDIF In", GPSCS, GPSRCS); + } +#if 0 + val = snd_emu10k1_ptr_read(emu, ZVSRCS, 0); + snd_iprintf(buffer, "\nZoomed Video\n"); + snd_iprintf(buffer, "Rate Locked : %s\n", val & SRCS_RATELOCKED ? "on" : "off"); + snd_iprintf(buffer, "Estimated Sample Rate : 0x%x\n", val & SRCS_ESTSAMPLERATE); +#endif +} + +static void snd_emu10k1_proc_rates_read(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + static int samplerate[8] = { 44100, 48000, 96000, 192000, 4, 5, 6, 7 }; + struct snd_emu10k1 *emu = entry->private_data; + unsigned int val, tmp, n; + val = snd_emu10k1_ptr20_read(emu, CAPTURE_RATE_STATUS, 0); + for (n = 0; n < 4; n++) { + tmp = val >> (16 + (n*4)); + if (tmp & 0x8) snd_iprintf(buffer, "Channel %d: Rate=%d\n", n, samplerate[tmp & 0x7]); + else snd_iprintf(buffer, "Channel %d: No input\n", n); + } +} + +static void snd_emu10k1_proc_acode_read(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + u32 pc; + struct snd_emu10k1 *emu = entry->private_data; + + snd_iprintf(buffer, "FX8010 Instruction List '%s'\n", emu->fx8010.name); + snd_iprintf(buffer, " Code dump :\n"); + for (pc = 0; pc < (emu->audigy ? 1024 : 512); pc++) { + u32 low, high; + + low = snd_emu10k1_efx_read(emu, pc * 2); + high = snd_emu10k1_efx_read(emu, pc * 2 + 1); + if (emu->audigy) + snd_iprintf(buffer, " OP(0x%02x, 0x%03x, 0x%03x, 0x%03x, 0x%03x) /* 0x%04x: 0x%08x%08x */\n", + (high >> 24) & 0x0f, + (high >> 12) & 0x7ff, + (high >> 0) & 0x7ff, + (low >> 12) & 0x7ff, + (low >> 0) & 0x7ff, + pc, + high, low); + else + snd_iprintf(buffer, " OP(0x%02x, 0x%03x, 0x%03x, 0x%03x, 0x%03x) /* 0x%04x: 0x%08x%08x */\n", + (high >> 20) & 0x0f, + (high >> 10) & 0x3ff, + (high >> 0) & 0x3ff, + (low >> 10) & 0x3ff, + (low >> 0) & 0x3ff, + pc, + high, low); + } +} + +#define TOTAL_SIZE_GPR (0x100*4) +#define A_TOTAL_SIZE_GPR (0x200*4) +#define TOTAL_SIZE_TANKMEM_DATA (0xa0*4) +#define TOTAL_SIZE_TANKMEM_ADDR (0xa0*4) +#define A_TOTAL_SIZE_TANKMEM_DATA (0x100*4) +#define A_TOTAL_SIZE_TANKMEM_ADDR (0x100*4) +#define TOTAL_SIZE_CODE (0x200*8) +#define A_TOTAL_SIZE_CODE (0x400*8) + +static ssize_t snd_emu10k1_fx8010_read(struct snd_info_entry *entry, + void *file_private_data, + struct file *file, char __user *buf, + size_t count, loff_t pos) +{ + struct snd_emu10k1 *emu = entry->private_data; + unsigned int offset; + int tram_addr = 0; + unsigned int *tmp; + long res; + unsigned int idx; + + if (!strcmp(entry->name, "fx8010_tram_addr")) { + offset = TANKMEMADDRREGBASE; + tram_addr = 1; + } else if (!strcmp(entry->name, "fx8010_tram_data")) { + offset = TANKMEMDATAREGBASE; + } else if (!strcmp(entry->name, "fx8010_code")) { + offset = emu->audigy ? A_MICROCODEBASE : MICROCODEBASE; + } else { + offset = emu->audigy ? A_FXGPREGBASE : FXGPREGBASE; + } + + tmp = kmalloc(count + 8, GFP_KERNEL); + if (!tmp) + return -ENOMEM; + for (idx = 0; idx < ((pos & 3) + count + 3) >> 2; idx++) { + unsigned int val; + val = snd_emu10k1_ptr_read(emu, offset + idx + (pos >> 2), 0); + if (tram_addr && emu->audigy) { + val >>= 11; + val |= snd_emu10k1_ptr_read(emu, 0x100 + idx + (pos >> 2), 0) << 20; + } + tmp[idx] = val; + } + if (copy_to_user(buf, ((char *)tmp) + (pos & 3), count)) + res = -EFAULT; + else + res = count; + kfree(tmp); + return res; +} + +static void snd_emu10k1_proc_voices_read(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + struct snd_emu10k1 *emu = entry->private_data; + struct snd_emu10k1_voice *voice; + int idx; + + snd_iprintf(buffer, "ch\tuse\tpcm\tefx\tsynth\tmidi\n"); + for (idx = 0; idx < NUM_G; idx++) { + voice = &emu->voices[idx]; + snd_iprintf(buffer, "%i\t%i\t%i\t%i\t%i\t%i\n", + idx, + voice->use, + voice->pcm, + voice->efx, + voice->synth, + voice->midi); + } +} + +#ifdef CONFIG_SND_DEBUG +static void snd_emu_proc_emu1010_reg_read(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + struct snd_emu10k1 *emu = entry->private_data; + u32 value; + int i; + snd_iprintf(buffer, "EMU1010 Registers:\n\n"); + + for(i = 0; i < 0x40; i+=1) { + snd_emu1010_fpga_read(emu, i, &value); + snd_iprintf(buffer, "%02X: %08X, %02X\n", i, value, (value >> 8) & 0x7f); + } +} + +static void snd_emu_proc_io_reg_read(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + struct snd_emu10k1 *emu = entry->private_data; + unsigned long value; + unsigned long flags; + int i; + snd_iprintf(buffer, "IO Registers:\n\n"); + for(i = 0; i < 0x40; i+=4) { + spin_lock_irqsave(&emu->emu_lock, flags); + value = inl(emu->port + i); + spin_unlock_irqrestore(&emu->emu_lock, flags); + snd_iprintf(buffer, "%02X: %08lX\n", i, value); + } +} + +static void snd_emu_proc_io_reg_write(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + struct snd_emu10k1 *emu = entry->private_data; + unsigned long flags; + char line[64]; + u32 reg, val; + while (!snd_info_get_line(buffer, line, sizeof(line))) { + if (sscanf(line, "%x %x", ®, &val) != 2) + continue; + if (reg < 0x40 && val <= 0xffffffff) { + spin_lock_irqsave(&emu->emu_lock, flags); + outl(val, emu->port + (reg & 0xfffffffc)); + spin_unlock_irqrestore(&emu->emu_lock, flags); + } + } +} + +static unsigned int snd_ptr_read(struct snd_emu10k1 * emu, + unsigned int iobase, + unsigned int reg, + unsigned int chn) +{ + unsigned long flags; + unsigned int regptr, val; + + regptr = (reg << 16) | chn; + + spin_lock_irqsave(&emu->emu_lock, flags); + outl(regptr, emu->port + iobase + PTR); + val = inl(emu->port + iobase + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); + return val; +} + +static void snd_ptr_write(struct snd_emu10k1 *emu, + unsigned int iobase, + unsigned int reg, + unsigned int chn, + unsigned int data) +{ + unsigned int regptr; + unsigned long flags; + + regptr = (reg << 16) | chn; + + spin_lock_irqsave(&emu->emu_lock, flags); + outl(regptr, emu->port + iobase + PTR); + outl(data, emu->port + iobase + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + + +static void snd_emu_proc_ptr_reg_read(struct snd_info_entry *entry, + struct snd_info_buffer *buffer, int iobase, int offset, int length, int voices) +{ + struct snd_emu10k1 *emu = entry->private_data; + unsigned long value; + int i,j; + if (offset+length > 0xa0) { + snd_iprintf(buffer, "Input values out of range\n"); + return; + } + snd_iprintf(buffer, "Registers 0x%x\n", iobase); + for(i = offset; i < offset+length; i++) { + snd_iprintf(buffer, "%02X: ",i); + for (j = 0; j < voices; j++) { + if(iobase == 0) + value = snd_ptr_read(emu, 0, i, j); + else + value = snd_ptr_read(emu, 0x20, i, j); + snd_iprintf(buffer, "%08lX ", value); + } + snd_iprintf(buffer, "\n"); + } +} + +static void snd_emu_proc_ptr_reg_write(struct snd_info_entry *entry, + struct snd_info_buffer *buffer, int iobase) +{ + struct snd_emu10k1 *emu = entry->private_data; + char line[64]; + unsigned int reg, channel_id , val; + while (!snd_info_get_line(buffer, line, sizeof(line))) { + if (sscanf(line, "%x %x %x", ®, &channel_id, &val) != 3) + continue; + if (reg < 0xa0 && val <= 0xffffffff && channel_id <= 3) + snd_ptr_write(emu, iobase, reg, channel_id, val); + } +} + +static void snd_emu_proc_ptr_reg_write00(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + snd_emu_proc_ptr_reg_write(entry, buffer, 0); +} + +static void snd_emu_proc_ptr_reg_write20(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + snd_emu_proc_ptr_reg_write(entry, buffer, 0x20); +} + + +static void snd_emu_proc_ptr_reg_read00a(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0, 0x40, 64); +} + +static void snd_emu_proc_ptr_reg_read00b(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0x40, 0x40, 64); +} + +static void snd_emu_proc_ptr_reg_read20a(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0, 0x40, 4); +} + +static void snd_emu_proc_ptr_reg_read20b(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x40, 0x40, 4); +} + +static void snd_emu_proc_ptr_reg_read20c(struct snd_info_entry *entry, + struct snd_info_buffer * buffer) +{ + snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x80, 0x20, 4); +} +#endif + +static struct snd_info_entry_ops snd_emu10k1_proc_ops_fx8010 = { + .read = snd_emu10k1_fx8010_read, +}; + +int snd_emu10k1_proc_init(struct snd_emu10k1 *emu) +{ + struct snd_info_entry *entry; +#ifdef CONFIG_SND_DEBUG + if (emu->card_capabilities->emu_model) { + if (! snd_card_proc_new(emu->card, "emu1010_regs", &entry)) + snd_info_set_text_ops(entry, emu, snd_emu_proc_emu1010_reg_read); + } + if (! snd_card_proc_new(emu->card, "io_regs", &entry)) { + snd_info_set_text_ops(entry, emu, snd_emu_proc_io_reg_read); + entry->c.text.write = snd_emu_proc_io_reg_write; + entry->mode |= 0200; + } + if (! snd_card_proc_new(emu->card, "ptr_regs00a", &entry)) { + snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read00a); + entry->c.text.write = snd_emu_proc_ptr_reg_write00; + entry->mode |= 0200; + } + if (! snd_card_proc_new(emu->card, "ptr_regs00b", &entry)) { + snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read00b); + entry->c.text.write = snd_emu_proc_ptr_reg_write00; + entry->mode |= 0200; + } + if (! snd_card_proc_new(emu->card, "ptr_regs20a", &entry)) { + snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20a); + entry->c.text.write = snd_emu_proc_ptr_reg_write20; + entry->mode |= 0200; + } + if (! snd_card_proc_new(emu->card, "ptr_regs20b", &entry)) { + snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20b); + entry->c.text.write = snd_emu_proc_ptr_reg_write20; + entry->mode |= 0200; + } + if (! snd_card_proc_new(emu->card, "ptr_regs20c", &entry)) { + snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20c); + entry->c.text.write = snd_emu_proc_ptr_reg_write20; + entry->mode |= 0200; + } +#endif + + if (! snd_card_proc_new(emu->card, "emu10k1", &entry)) + snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_read); + + if (emu->card_capabilities->emu10k2_chip) { + if (! snd_card_proc_new(emu->card, "spdif-in", &entry)) + snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_spdif_read); + } + if (emu->card_capabilities->ca0151_chip) { + if (! snd_card_proc_new(emu->card, "capture-rates", &entry)) + snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_rates_read); + } + + if (! snd_card_proc_new(emu->card, "voices", &entry)) + snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_voices_read); + + if (! snd_card_proc_new(emu->card, "fx8010_gpr", &entry)) { + entry->content = SNDRV_INFO_CONTENT_DATA; + entry->private_data = emu; + entry->mode = S_IFREG | 0444 /*| S_IWUSR*/; + entry->size = emu->audigy ? A_TOTAL_SIZE_GPR : TOTAL_SIZE_GPR; + entry->c.ops = &snd_emu10k1_proc_ops_fx8010; + } + if (! snd_card_proc_new(emu->card, "fx8010_tram_data", &entry)) { + entry->content = SNDRV_INFO_CONTENT_DATA; + entry->private_data = emu; + entry->mode = S_IFREG | 0444 /*| S_IWUSR*/; + entry->size = emu->audigy ? A_TOTAL_SIZE_TANKMEM_DATA : TOTAL_SIZE_TANKMEM_DATA ; + entry->c.ops = &snd_emu10k1_proc_ops_fx8010; + } + if (! snd_card_proc_new(emu->card, "fx8010_tram_addr", &entry)) { + entry->content = SNDRV_INFO_CONTENT_DATA; + entry->private_data = emu; + entry->mode = S_IFREG | 0444 /*| S_IWUSR*/; + entry->size = emu->audigy ? A_TOTAL_SIZE_TANKMEM_ADDR : TOTAL_SIZE_TANKMEM_ADDR ; + entry->c.ops = &snd_emu10k1_proc_ops_fx8010; + } + if (! snd_card_proc_new(emu->card, "fx8010_code", &entry)) { + entry->content = SNDRV_INFO_CONTENT_DATA; + entry->private_data = emu; + entry->mode = S_IFREG | 0444 /*| S_IWUSR*/; + entry->size = emu->audigy ? A_TOTAL_SIZE_CODE : TOTAL_SIZE_CODE; + entry->c.ops = &snd_emu10k1_proc_ops_fx8010; + } + if (! snd_card_proc_new(emu->card, "fx8010_acode", &entry)) { + entry->content = SNDRV_INFO_CONTENT_TEXT; + entry->private_data = emu; + entry->mode = S_IFREG | 0444 /*| S_IWUSR*/; + entry->c.text.read = snd_emu10k1_proc_acode_read; + } + return 0; +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emuproc.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emuproc.c.yml new file mode 100644 index 00000000000..bc4b2e04efb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/emuproc.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) by Jaroslav Kysela Creative Labs, Inc. Routines + - Copyright (c) by James Courtier-Dutton +holders: + - Jaroslav Kysela Creative Labs, Inc. Routines + - James Courtier-Dutton diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/io.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/io.c new file mode 100644 index 00000000000..9cb6d30751a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/io.c @@ -0,0 +1,579 @@ +/* + * Copyright (c) by Jaroslav Kysela + * Creative Labs, Inc. + * Routines for control of EMU10K1 chips + * + * BUGS: + * -- + * + * TODO: + * -- + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include +#include "p17v.h" + +unsigned int snd_emu10k1_ptr_read(struct snd_emu10k1 * emu, unsigned int reg, unsigned int chn) +{ + unsigned long flags; + unsigned int regptr, val; + unsigned int mask; + + mask = emu->audigy ? A_PTR_ADDRESS_MASK : PTR_ADDRESS_MASK; + regptr = ((reg << 16) & mask) | (chn & PTR_CHANNELNUM_MASK); + + if (reg & 0xff000000) { + unsigned char size, offset; + + size = (reg >> 24) & 0x3f; + offset = (reg >> 16) & 0x1f; + mask = ((1 << size) - 1) << offset; + + spin_lock_irqsave(&emu->emu_lock, flags); + outl(regptr, emu->port + PTR); + val = inl(emu->port + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); + + return (val & mask) >> offset; + } else { + spin_lock_irqsave(&emu->emu_lock, flags); + outl(regptr, emu->port + PTR); + val = inl(emu->port + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); + return val; + } +} + +EXPORT_SYMBOL(snd_emu10k1_ptr_read); + +void snd_emu10k1_ptr_write(struct snd_emu10k1 *emu, unsigned int reg, unsigned int chn, unsigned int data) +{ + unsigned int regptr; + unsigned long flags; + unsigned int mask; + + if (snd_BUG_ON(!emu)) + return; + mask = emu->audigy ? A_PTR_ADDRESS_MASK : PTR_ADDRESS_MASK; + regptr = ((reg << 16) & mask) | (chn & PTR_CHANNELNUM_MASK); + + if (reg & 0xff000000) { + unsigned char size, offset; + + size = (reg >> 24) & 0x3f; + offset = (reg >> 16) & 0x1f; + mask = ((1 << size) - 1) << offset; + data = (data << offset) & mask; + + spin_lock_irqsave(&emu->emu_lock, flags); + outl(regptr, emu->port + PTR); + data |= inl(emu->port + DATA) & ~mask; + outl(data, emu->port + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); + } else { + spin_lock_irqsave(&emu->emu_lock, flags); + outl(regptr, emu->port + PTR); + outl(data, emu->port + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); + } +} + +EXPORT_SYMBOL(snd_emu10k1_ptr_write); + +unsigned int snd_emu10k1_ptr20_read(struct snd_emu10k1 * emu, + unsigned int reg, + unsigned int chn) +{ + unsigned long flags; + unsigned int regptr, val; + + regptr = (reg << 16) | chn; + + spin_lock_irqsave(&emu->emu_lock, flags); + outl(regptr, emu->port + 0x20 + PTR); + val = inl(emu->port + 0x20 + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); + return val; +} + +void snd_emu10k1_ptr20_write(struct snd_emu10k1 *emu, + unsigned int reg, + unsigned int chn, + unsigned int data) +{ + unsigned int regptr; + unsigned long flags; + + regptr = (reg << 16) | chn; + + spin_lock_irqsave(&emu->emu_lock, flags); + outl(regptr, emu->port + 0x20 + PTR); + outl(data, emu->port + 0x20 + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + +int snd_emu10k1_spi_write(struct snd_emu10k1 * emu, + unsigned int data) +{ + unsigned int reset, set; + unsigned int reg, tmp; + int n, result; + int err = 0; + + /* This function is not re-entrant, so protect against it. */ + spin_lock(&emu->spi_lock); + if (emu->card_capabilities->ca0108_chip) + reg = 0x3c; /* PTR20, reg 0x3c */ + else { + /* For other chip types the SPI register + * is currently unknown. */ + err = 1; + goto spi_write_exit; + } + if (data > 0xffff) { + /* Only 16bit values allowed */ + err = 1; + goto spi_write_exit; + } + + tmp = snd_emu10k1_ptr20_read(emu, reg, 0); + reset = (tmp & ~0x3ffff) | 0x20000; /* Set xxx20000 */ + set = reset | 0x10000; /* Set xxx1xxxx */ + snd_emu10k1_ptr20_write(emu, reg, 0, reset | data); + tmp = snd_emu10k1_ptr20_read(emu, reg, 0); /* write post */ + snd_emu10k1_ptr20_write(emu, reg, 0, set | data); + result = 1; + /* Wait for status bit to return to 0 */ + for (n = 0; n < 100; n++) { + udelay(10); + tmp = snd_emu10k1_ptr20_read(emu, reg, 0); + if (!(tmp & 0x10000)) { + result = 0; + break; + } + } + if (result) { + /* Timed out */ + err = 1; + goto spi_write_exit; + } + snd_emu10k1_ptr20_write(emu, reg, 0, reset | data); + tmp = snd_emu10k1_ptr20_read(emu, reg, 0); /* Write post */ + err = 0; +spi_write_exit: + spin_unlock(&emu->spi_lock); + return err; +} + +/* The ADC does not support i2c read, so only write is implemented */ +int snd_emu10k1_i2c_write(struct snd_emu10k1 *emu, + u32 reg, + u32 value) +{ + u32 tmp; + int timeout = 0; + int status; + int retry; + int err = 0; + + if ((reg > 0x7f) || (value > 0x1ff)) { + dev_err(emu->card->dev, "i2c_write: invalid values.\n"); + return -EINVAL; + } + + /* This function is not re-entrant, so protect against it. */ + spin_lock(&emu->i2c_lock); + + tmp = reg << 25 | value << 16; + + /* This controls the I2C connected to the WM8775 ADC Codec */ + snd_emu10k1_ptr20_write(emu, P17V_I2C_1, 0, tmp); + tmp = snd_emu10k1_ptr20_read(emu, P17V_I2C_1, 0); /* write post */ + + for (retry = 0; retry < 10; retry++) { + /* Send the data to i2c */ + tmp = 0; + tmp = tmp | (I2C_A_ADC_LAST|I2C_A_ADC_START|I2C_A_ADC_ADD); + snd_emu10k1_ptr20_write(emu, P17V_I2C_ADDR, 0, tmp); + + /* Wait till the transaction ends */ + while (1) { + mdelay(1); + status = snd_emu10k1_ptr20_read(emu, P17V_I2C_ADDR, 0); + timeout++; + if ((status & I2C_A_ADC_START) == 0) + break; + + if (timeout > 1000) { + dev_warn(emu->card->dev, + "emu10k1:I2C:timeout status=0x%x\n", + status); + break; + } + } + //Read back and see if the transaction is successful + if ((status & I2C_A_ADC_ABORT) == 0) + break; + } + + if (retry == 10) { + dev_err(emu->card->dev, "Writing to ADC failed!\n"); + dev_err(emu->card->dev, "status=0x%x, reg=%d, value=%d\n", + status, reg, value); + /* dump_stack(); */ + err = -EINVAL; + } + + spin_unlock(&emu->i2c_lock); + return err; +} + +int snd_emu1010_fpga_write(struct snd_emu10k1 * emu, u32 reg, u32 value) +{ + unsigned long flags; + + if (reg > 0x3f) + return 1; + reg += 0x40; /* 0x40 upwards are registers. */ + if (value > 0x3f) /* 0 to 0x3f are values */ + return 1; + spin_lock_irqsave(&emu->emu_lock, flags); + outl(reg, emu->port + A_IOCFG); + udelay(10); + outl(reg | 0x80, emu->port + A_IOCFG); /* High bit clocks the value into the fpga. */ + udelay(10); + outl(value, emu->port + A_IOCFG); + udelay(10); + outl(value | 0x80 , emu->port + A_IOCFG); /* High bit clocks the value into the fpga. */ + spin_unlock_irqrestore(&emu->emu_lock, flags); + + return 0; +} + +int snd_emu1010_fpga_read(struct snd_emu10k1 * emu, u32 reg, u32 *value) +{ + unsigned long flags; + if (reg > 0x3f) + return 1; + reg += 0x40; /* 0x40 upwards are registers. */ + spin_lock_irqsave(&emu->emu_lock, flags); + outl(reg, emu->port + A_IOCFG); + udelay(10); + outl(reg | 0x80, emu->port + A_IOCFG); /* High bit clocks the value into the fpga. */ + udelay(10); + *value = ((inl(emu->port + A_IOCFG) >> 8) & 0x7f); + spin_unlock_irqrestore(&emu->emu_lock, flags); + + return 0; +} + +/* Each Destination has one and only one Source, + * but one Source can feed any number of Destinations simultaneously. + */ +int snd_emu1010_fpga_link_dst_src_write(struct snd_emu10k1 * emu, u32 dst, u32 src) +{ + snd_emu1010_fpga_write(emu, 0x00, ((dst >> 8) & 0x3f) ); + snd_emu1010_fpga_write(emu, 0x01, (dst & 0x3f) ); + snd_emu1010_fpga_write(emu, 0x02, ((src >> 8) & 0x3f) ); + snd_emu1010_fpga_write(emu, 0x03, (src & 0x3f) ); + + return 0; +} + +void snd_emu10k1_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb) +{ + unsigned long flags; + unsigned int enable; + + spin_lock_irqsave(&emu->emu_lock, flags); + enable = inl(emu->port + INTE) | intrenb; + outl(enable, emu->port + INTE); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + +void snd_emu10k1_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb) +{ + unsigned long flags; + unsigned int enable; + + spin_lock_irqsave(&emu->emu_lock, flags); + enable = inl(emu->port + INTE) & ~intrenb; + outl(enable, emu->port + INTE); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + +void snd_emu10k1_voice_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum) +{ + unsigned long flags; + unsigned int val; + + spin_lock_irqsave(&emu->emu_lock, flags); + /* voice interrupt */ + if (voicenum >= 32) { + outl(CLIEH << 16, emu->port + PTR); + val = inl(emu->port + DATA); + val |= 1 << (voicenum - 32); + } else { + outl(CLIEL << 16, emu->port + PTR); + val = inl(emu->port + DATA); + val |= 1 << voicenum; + } + outl(val, emu->port + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + +void snd_emu10k1_voice_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum) +{ + unsigned long flags; + unsigned int val; + + spin_lock_irqsave(&emu->emu_lock, flags); + /* voice interrupt */ + if (voicenum >= 32) { + outl(CLIEH << 16, emu->port + PTR); + val = inl(emu->port + DATA); + val &= ~(1 << (voicenum - 32)); + } else { + outl(CLIEL << 16, emu->port + PTR); + val = inl(emu->port + DATA); + val &= ~(1 << voicenum); + } + outl(val, emu->port + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + +void snd_emu10k1_voice_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum) +{ + unsigned long flags; + + spin_lock_irqsave(&emu->emu_lock, flags); + /* voice interrupt */ + if (voicenum >= 32) { + outl(CLIPH << 16, emu->port + PTR); + voicenum = 1 << (voicenum - 32); + } else { + outl(CLIPL << 16, emu->port + PTR); + voicenum = 1 << voicenum; + } + outl(voicenum, emu->port + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + +void snd_emu10k1_voice_half_loop_intr_enable(struct snd_emu10k1 *emu, unsigned int voicenum) +{ + unsigned long flags; + unsigned int val; + + spin_lock_irqsave(&emu->emu_lock, flags); + /* voice interrupt */ + if (voicenum >= 32) { + outl(HLIEH << 16, emu->port + PTR); + val = inl(emu->port + DATA); + val |= 1 << (voicenum - 32); + } else { + outl(HLIEL << 16, emu->port + PTR); + val = inl(emu->port + DATA); + val |= 1 << voicenum; + } + outl(val, emu->port + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + +void snd_emu10k1_voice_half_loop_intr_disable(struct snd_emu10k1 *emu, unsigned int voicenum) +{ + unsigned long flags; + unsigned int val; + + spin_lock_irqsave(&emu->emu_lock, flags); + /* voice interrupt */ + if (voicenum >= 32) { + outl(HLIEH << 16, emu->port + PTR); + val = inl(emu->port + DATA); + val &= ~(1 << (voicenum - 32)); + } else { + outl(HLIEL << 16, emu->port + PTR); + val = inl(emu->port + DATA); + val &= ~(1 << voicenum); + } + outl(val, emu->port + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + +void snd_emu10k1_voice_half_loop_intr_ack(struct snd_emu10k1 *emu, unsigned int voicenum) +{ + unsigned long flags; + + spin_lock_irqsave(&emu->emu_lock, flags); + /* voice interrupt */ + if (voicenum >= 32) { + outl(HLIPH << 16, emu->port + PTR); + voicenum = 1 << (voicenum - 32); + } else { + outl(HLIPL << 16, emu->port + PTR); + voicenum = 1 << voicenum; + } + outl(voicenum, emu->port + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + +void snd_emu10k1_voice_set_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum) +{ + unsigned long flags; + unsigned int sol; + + spin_lock_irqsave(&emu->emu_lock, flags); + /* voice interrupt */ + if (voicenum >= 32) { + outl(SOLEH << 16, emu->port + PTR); + sol = inl(emu->port + DATA); + sol |= 1 << (voicenum - 32); + } else { + outl(SOLEL << 16, emu->port + PTR); + sol = inl(emu->port + DATA); + sol |= 1 << voicenum; + } + outl(sol, emu->port + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + +void snd_emu10k1_voice_clear_loop_stop(struct snd_emu10k1 *emu, unsigned int voicenum) +{ + unsigned long flags; + unsigned int sol; + + spin_lock_irqsave(&emu->emu_lock, flags); + /* voice interrupt */ + if (voicenum >= 32) { + outl(SOLEH << 16, emu->port + PTR); + sol = inl(emu->port + DATA); + sol &= ~(1 << (voicenum - 32)); + } else { + outl(SOLEL << 16, emu->port + PTR); + sol = inl(emu->port + DATA); + sol &= ~(1 << voicenum); + } + outl(sol, emu->port + DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + +void snd_emu10k1_wait(struct snd_emu10k1 *emu, unsigned int wait) +{ + volatile unsigned count; + unsigned int newtime = 0, curtime; + + curtime = inl(emu->port + WC) >> 6; + while (wait-- > 0) { + count = 0; + while (count++ < 16384) { + newtime = inl(emu->port + WC) >> 6; + if (newtime != curtime) + break; + } + if (count > 16384) + break; + curtime = newtime; + } +} + +unsigned short snd_emu10k1_ac97_read(struct snd_ac97 *ac97, unsigned short reg) +{ + struct snd_emu10k1 *emu = ac97->private_data; + unsigned long flags; + unsigned short val; + + spin_lock_irqsave(&emu->emu_lock, flags); + outb(reg, emu->port + AC97ADDRESS); + val = inw(emu->port + AC97DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); + return val; +} + +void snd_emu10k1_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short data) +{ + struct snd_emu10k1 *emu = ac97->private_data; + unsigned long flags; + + spin_lock_irqsave(&emu->emu_lock, flags); + outb(reg, emu->port + AC97ADDRESS); + outw(data, emu->port + AC97DATA); + spin_unlock_irqrestore(&emu->emu_lock, flags); +} + +/* + * convert rate to pitch + */ + +unsigned int snd_emu10k1_rate_to_pitch(unsigned int rate) +{ + static u32 logMagTable[128] = { + 0x00000, 0x02dfc, 0x05b9e, 0x088e6, 0x0b5d6, 0x0e26f, 0x10eb3, 0x13aa2, + 0x1663f, 0x1918a, 0x1bc84, 0x1e72e, 0x2118b, 0x23b9a, 0x2655d, 0x28ed5, + 0x2b803, 0x2e0e8, 0x30985, 0x331db, 0x359eb, 0x381b6, 0x3a93d, 0x3d081, + 0x3f782, 0x41e42, 0x444c1, 0x46b01, 0x49101, 0x4b6c4, 0x4dc49, 0x50191, + 0x5269e, 0x54b6f, 0x57006, 0x59463, 0x5b888, 0x5dc74, 0x60029, 0x623a7, + 0x646ee, 0x66a00, 0x68cdd, 0x6af86, 0x6d1fa, 0x6f43c, 0x7164b, 0x73829, + 0x759d4, 0x77b4f, 0x79c9a, 0x7bdb5, 0x7dea1, 0x7ff5e, 0x81fed, 0x8404e, + 0x86082, 0x88089, 0x8a064, 0x8c014, 0x8df98, 0x8fef1, 0x91e20, 0x93d26, + 0x95c01, 0x97ab4, 0x9993e, 0x9b79f, 0x9d5d9, 0x9f3ec, 0xa11d8, 0xa2f9d, + 0xa4d3c, 0xa6ab5, 0xa8808, 0xaa537, 0xac241, 0xadf26, 0xafbe7, 0xb1885, + 0xb3500, 0xb5157, 0xb6d8c, 0xb899f, 0xba58f, 0xbc15e, 0xbdd0c, 0xbf899, + 0xc1404, 0xc2f50, 0xc4a7b, 0xc6587, 0xc8073, 0xc9b3f, 0xcb5ed, 0xcd07c, + 0xceaec, 0xd053f, 0xd1f73, 0xd398a, 0xd5384, 0xd6d60, 0xd8720, 0xda0c3, + 0xdba4a, 0xdd3b4, 0xded03, 0xe0636, 0xe1f4e, 0xe384a, 0xe512c, 0xe69f3, + 0xe829f, 0xe9b31, 0xeb3a9, 0xecc08, 0xee44c, 0xefc78, 0xf148a, 0xf2c83, + 0xf4463, 0xf5c2a, 0xf73da, 0xf8b71, 0xfa2f0, 0xfba57, 0xfd1a7, 0xfe8df + }; + static char logSlopeTable[128] = { + 0x5c, 0x5c, 0x5b, 0x5a, 0x5a, 0x59, 0x58, 0x58, + 0x57, 0x56, 0x56, 0x55, 0x55, 0x54, 0x53, 0x53, + 0x52, 0x52, 0x51, 0x51, 0x50, 0x50, 0x4f, 0x4f, + 0x4e, 0x4d, 0x4d, 0x4d, 0x4c, 0x4c, 0x4b, 0x4b, + 0x4a, 0x4a, 0x49, 0x49, 0x48, 0x48, 0x47, 0x47, + 0x47, 0x46, 0x46, 0x45, 0x45, 0x45, 0x44, 0x44, + 0x43, 0x43, 0x43, 0x42, 0x42, 0x42, 0x41, 0x41, + 0x41, 0x40, 0x40, 0x40, 0x3f, 0x3f, 0x3f, 0x3e, + 0x3e, 0x3e, 0x3d, 0x3d, 0x3d, 0x3c, 0x3c, 0x3c, + 0x3b, 0x3b, 0x3b, 0x3b, 0x3a, 0x3a, 0x3a, 0x39, + 0x39, 0x39, 0x39, 0x38, 0x38, 0x38, 0x38, 0x37, + 0x37, 0x37, 0x37, 0x36, 0x36, 0x36, 0x36, 0x35, + 0x35, 0x35, 0x35, 0x34, 0x34, 0x34, 0x34, 0x34, + 0x33, 0x33, 0x33, 0x33, 0x32, 0x32, 0x32, 0x32, + 0x32, 0x31, 0x31, 0x31, 0x31, 0x31, 0x30, 0x30, + 0x30, 0x30, 0x30, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f + }; + int i; + + if (rate == 0) + return 0; /* Bail out if no leading "1" */ + rate *= 11185; /* Scale 48000 to 0x20002380 */ + for (i = 31; i > 0; i--) { + if (rate & 0x80000000) { /* Detect leading "1" */ + return (((unsigned int) (i - 15) << 20) + + logMagTable[0x7f & (rate >> 24)] + + (0x7f & (rate >> 17)) * + logSlopeTable[0x7f & (rate >> 24)]); + } + rate <<= 1; + } + + return 0; /* Should never reach this point */ +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/io.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/io.c.yml new file mode 100644 index 00000000000..919f61183c2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/io.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) by Jaroslav Kysela Creative Labs, Inc. Routines +holders: + - Jaroslav Kysela Creative Labs, Inc. Routines diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/irq.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/irq.c new file mode 100644 index 00000000000..d959bc2f8e4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/irq.c @@ -0,0 +1,213 @@ +/* + * Copyright (c) by Jaroslav Kysela + * Creative Labs, Inc. + * Routines for IRQ control of EMU10K1 chips + * + * BUGS: + * -- + * + * TODO: + * -- + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include + +irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id) +{ + struct snd_emu10k1 *emu = dev_id; + unsigned int status, status2, orig_status, orig_status2; + int handled = 0; + int timeout = 0; + + while (((status = inl(emu->port + IPR)) != 0) && (timeout < 1000)) { + timeout++; + orig_status = status; + handled = 1; + if ((status & 0xffffffff) == 0xffffffff) { + dev_info(emu->card->dev, + "Suspected sound card removal\n"); + break; + } + if (status & IPR_PCIERROR) { + dev_err(emu->card->dev, "interrupt: PCI error\n"); + snd_emu10k1_intr_disable(emu, INTE_PCIERRORENABLE); + status &= ~IPR_PCIERROR; + } + if (status & (IPR_VOLINCR|IPR_VOLDECR|IPR_MUTE)) { + if (emu->hwvol_interrupt) + emu->hwvol_interrupt(emu, status); + else + snd_emu10k1_intr_disable(emu, INTE_VOLINCRENABLE|INTE_VOLDECRENABLE|INTE_MUTEENABLE); + status &= ~(IPR_VOLINCR|IPR_VOLDECR|IPR_MUTE); + } + if (status & IPR_CHANNELLOOP) { + int voice; + int voice_max = status & IPR_CHANNELNUMBERMASK; + u32 val; + struct snd_emu10k1_voice *pvoice = emu->voices; + + val = snd_emu10k1_ptr_read(emu, CLIPL, 0); + for (voice = 0; voice <= voice_max; voice++) { + if (voice == 0x20) + val = snd_emu10k1_ptr_read(emu, CLIPH, 0); + if (val & 1) { + if (pvoice->use && pvoice->interrupt != NULL) { + pvoice->interrupt(emu, pvoice); + snd_emu10k1_voice_intr_ack(emu, voice); + } else { + snd_emu10k1_voice_intr_disable(emu, voice); + } + } + val >>= 1; + pvoice++; + } + val = snd_emu10k1_ptr_read(emu, HLIPL, 0); + for (voice = 0; voice <= voice_max; voice++) { + if (voice == 0x20) + val = snd_emu10k1_ptr_read(emu, HLIPH, 0); + if (val & 1) { + if (pvoice->use && pvoice->interrupt != NULL) { + pvoice->interrupt(emu, pvoice); + snd_emu10k1_voice_half_loop_intr_ack(emu, voice); + } else { + snd_emu10k1_voice_half_loop_intr_disable(emu, voice); + } + } + val >>= 1; + pvoice++; + } + status &= ~IPR_CHANNELLOOP; + } + status &= ~IPR_CHANNELNUMBERMASK; + if (status & (IPR_ADCBUFFULL|IPR_ADCBUFHALFFULL)) { + if (emu->capture_interrupt) + emu->capture_interrupt(emu, status); + else + snd_emu10k1_intr_disable(emu, INTE_ADCBUFENABLE); + status &= ~(IPR_ADCBUFFULL|IPR_ADCBUFHALFFULL); + } + if (status & (IPR_MICBUFFULL|IPR_MICBUFHALFFULL)) { + if (emu->capture_mic_interrupt) + emu->capture_mic_interrupt(emu, status); + else + snd_emu10k1_intr_disable(emu, INTE_MICBUFENABLE); + status &= ~(IPR_MICBUFFULL|IPR_MICBUFHALFFULL); + } + if (status & (IPR_EFXBUFFULL|IPR_EFXBUFHALFFULL)) { + if (emu->capture_efx_interrupt) + emu->capture_efx_interrupt(emu, status); + else + snd_emu10k1_intr_disable(emu, INTE_EFXBUFENABLE); + status &= ~(IPR_EFXBUFFULL|IPR_EFXBUFHALFFULL); + } + if (status & (IPR_MIDITRANSBUFEMPTY|IPR_MIDIRECVBUFEMPTY)) { + if (emu->midi.interrupt) + emu->midi.interrupt(emu, status); + else + snd_emu10k1_intr_disable(emu, INTE_MIDITXENABLE|INTE_MIDIRXENABLE); + status &= ~(IPR_MIDITRANSBUFEMPTY|IPR_MIDIRECVBUFEMPTY); + } + if (status & (IPR_A_MIDITRANSBUFEMPTY2|IPR_A_MIDIRECVBUFEMPTY2)) { + if (emu->midi2.interrupt) + emu->midi2.interrupt(emu, status); + else + snd_emu10k1_intr_disable(emu, INTE_A_MIDITXENABLE2|INTE_A_MIDIRXENABLE2); + status &= ~(IPR_A_MIDITRANSBUFEMPTY2|IPR_A_MIDIRECVBUFEMPTY2); + } + if (status & IPR_INTERVALTIMER) { + if (emu->timer) + snd_timer_interrupt(emu->timer, emu->timer->sticks); + else + snd_emu10k1_intr_disable(emu, INTE_INTERVALTIMERENB); + status &= ~IPR_INTERVALTIMER; + } + if (status & (IPR_GPSPDIFSTATUSCHANGE|IPR_CDROMSTATUSCHANGE)) { + if (emu->spdif_interrupt) + emu->spdif_interrupt(emu, status); + else + snd_emu10k1_intr_disable(emu, INTE_GPSPDIFENABLE|INTE_CDSPDIFENABLE); + status &= ~(IPR_GPSPDIFSTATUSCHANGE|IPR_CDROMSTATUSCHANGE); + } + if (status & IPR_FXDSP) { + if (emu->dsp_interrupt) + emu->dsp_interrupt(emu); + else + snd_emu10k1_intr_disable(emu, INTE_FXDSPENABLE); + status &= ~IPR_FXDSP; + } + if (status & IPR_P16V) { + while ((status2 = inl(emu->port + IPR2)) != 0) { + u32 mask = INTE2_PLAYBACK_CH_0_LOOP; /* Full Loop */ + struct snd_emu10k1_voice *pvoice = &(emu->p16v_voices[0]); + struct snd_emu10k1_voice *cvoice = &(emu->p16v_capture_voice); + + /* dev_dbg(emu->card->dev, "status2=0x%x\n", status2); */ + orig_status2 = status2; + if(status2 & mask) { + if(pvoice->use) { + snd_pcm_period_elapsed(pvoice->epcm->substream); + } else { + dev_err(emu->card->dev, + "p16v: status: 0x%08x, mask=0x%08x, pvoice=%p, use=%d\n", + status2, mask, pvoice, + pvoice->use); + } + } + if(status2 & 0x110000) { + /* dev_info(emu->card->dev, "capture int found\n"); */ + if(cvoice->use) { + /* dev_info(emu->card->dev, "capture period_elapsed\n"); */ + snd_pcm_period_elapsed(cvoice->epcm->substream); + } + } + outl(orig_status2, emu->port + IPR2); /* ack all */ + } + status &= ~IPR_P16V; + } + + if (status) { + unsigned int bits; + dev_err(emu->card->dev, + "unhandled interrupt: 0x%08x\n", status); + //make sure any interrupts we don't handle are disabled: + bits = INTE_FXDSPENABLE | + INTE_PCIERRORENABLE | + INTE_VOLINCRENABLE | + INTE_VOLDECRENABLE | + INTE_MUTEENABLE | + INTE_MICBUFENABLE | + INTE_ADCBUFENABLE | + INTE_EFXBUFENABLE | + INTE_GPSPDIFENABLE | + INTE_CDSPDIFENABLE | + INTE_INTERVALTIMERENB | + INTE_MIDITXENABLE | + INTE_MIDIRXENABLE; + if (emu->audigy) + bits |= INTE_A_MIDITXENABLE2 | INTE_A_MIDIRXENABLE2; + snd_emu10k1_intr_disable(emu, bits); + } + outl(orig_status, emu->port + IPR); /* ack all */ + } + if (timeout == 1000) + dev_info(emu->card->dev, "emu10k1 irq routine failure\n"); + + return IRQ_RETVAL(handled); +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/irq.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/irq.c.yml new file mode 100644 index 00000000000..919f61183c2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/irq.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) by Jaroslav Kysela Creative Labs, Inc. Routines +holders: + - Jaroslav Kysela Creative Labs, Inc. Routines diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/timer.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/timer.c new file mode 100644 index 00000000000..ee8f8630880 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/timer.c @@ -0,0 +1,96 @@ +/* + * Copyright (c) by Lee Revell + * Clemens Ladisch + * Routines for control of EMU10K1 chips + * + * BUGS: + * -- + * + * TODO: + * -- + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include + +static int snd_emu10k1_timer_start(struct snd_timer *timer) +{ + struct snd_emu10k1 *emu; + unsigned long flags; + unsigned int delay; + + emu = snd_timer_chip(timer); + delay = timer->sticks - 1; + if (delay < 5 ) /* minimum time is 5 ticks */ + delay = 5; + spin_lock_irqsave(&emu->reg_lock, flags); + snd_emu10k1_intr_enable(emu, INTE_INTERVALTIMERENB); + outw(delay & TIMER_RATE_MASK, emu->port + TIMER); + spin_unlock_irqrestore(&emu->reg_lock, flags); + return 0; +} + +static int snd_emu10k1_timer_stop(struct snd_timer *timer) +{ + struct snd_emu10k1 *emu; + unsigned long flags; + + emu = snd_timer_chip(timer); + spin_lock_irqsave(&emu->reg_lock, flags); + snd_emu10k1_intr_disable(emu, INTE_INTERVALTIMERENB); + spin_unlock_irqrestore(&emu->reg_lock, flags); + return 0; +} + +static int snd_emu10k1_timer_precise_resolution(struct snd_timer *timer, + unsigned long *num, unsigned long *den) +{ + *num = 1; + *den = 48000; + return 0; +} + +static struct snd_timer_hardware snd_emu10k1_timer_hw = { + .flags = SNDRV_TIMER_HW_AUTO, + .resolution = 20833, /* 1 sample @ 48KHZ = 20.833...us */ + .ticks = 1024, + .start = snd_emu10k1_timer_start, + .stop = snd_emu10k1_timer_stop, + .precise_resolution = snd_emu10k1_timer_precise_resolution, +}; + +int snd_emu10k1_timer(struct snd_emu10k1 *emu, int device) +{ + struct snd_timer *timer = NULL; + struct snd_timer_id tid; + int err; + + tid.dev_class = SNDRV_TIMER_CLASS_CARD; + tid.dev_sclass = SNDRV_TIMER_SCLASS_NONE; + tid.card = emu->card->number; + tid.device = device; + tid.subdevice = 0; + if ((err = snd_timer_new(emu->card, "EMU10K1", &tid, &timer)) >= 0) { + strcpy(timer->name, "EMU10K1 timer"); + timer->private_data = emu; + timer->hw = snd_emu10k1_timer_hw; + } + emu->timer = timer; + return err; +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/timer.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/timer.c.yml new file mode 100644 index 00000000000..ef0bb70120a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/emu10k1/timer.c.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) by Lee Revell Clemens Ladisch + Routines +holders: + - Lee Revell Clemens Ladisch Routines diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/ice1712/prodigy_hifi.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/ice1712/prodigy_hifi.c new file mode 100644 index 00000000000..a6f18a96e2d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/ice1712/prodigy_hifi.c @@ -0,0 +1,1281 @@ +/* + * ALSA driver for ICEnsemble VT1724 (Envy24HT) + * + * Lowlevel functions for Audiotrak Prodigy 7.1 Hifi + * based on pontis.c + * + * Copyright (c) 2007 Julian Scheel + * Copyright (c) 2007 allank + * Copyright (c) 2004 Takashi Iwai + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "ice1712.h" +#include "envy24ht.h" +#include "prodigy_hifi.h" + +struct prodigy_hifi_spec { + unsigned short master[2]; + unsigned short vol[8]; +}; + +/* I2C addresses */ +#define WM_DEV 0x34 + +/* WM8776 registers */ +#define WM_HP_ATTEN_L 0x00 /* headphone left attenuation */ +#define WM_HP_ATTEN_R 0x01 /* headphone left attenuation */ +#define WM_HP_MASTER 0x02 /* headphone master (both channels), + override LLR */ +#define WM_DAC_ATTEN_L 0x03 /* digital left attenuation */ +#define WM_DAC_ATTEN_R 0x04 +#define WM_DAC_MASTER 0x05 +#define WM_PHASE_SWAP 0x06 /* DAC phase swap */ +#define WM_DAC_CTRL1 0x07 +#define WM_DAC_MUTE 0x08 +#define WM_DAC_CTRL2 0x09 +#define WM_DAC_INT 0x0a +#define WM_ADC_INT 0x0b +#define WM_MASTER_CTRL 0x0c +#define WM_POWERDOWN 0x0d +#define WM_ADC_ATTEN_L 0x0e +#define WM_ADC_ATTEN_R 0x0f +#define WM_ALC_CTRL1 0x10 +#define WM_ALC_CTRL2 0x11 +#define WM_ALC_CTRL3 0x12 +#define WM_NOISE_GATE 0x13 +#define WM_LIMITER 0x14 +#define WM_ADC_MUX 0x15 +#define WM_OUT_MUX 0x16 +#define WM_RESET 0x17 + +/* Analog Recording Source :- Mic, LineIn, CD/Video, */ + +/* implement capture source select control for WM8776 */ + +#define WM_AIN1 "AIN1" +#define WM_AIN2 "AIN2" +#define WM_AIN3 "AIN3" +#define WM_AIN4 "AIN4" +#define WM_AIN5 "AIN5" + +/* GPIO pins of envy24ht connected to wm8766 */ +#define WM8766_SPI_CLK (1<<17) /* CLK, Pin97 on ICE1724 */ +#define WM8766_SPI_MD (1<<16) /* DATA VT1724 -> WM8766, Pin96 */ +#define WM8766_SPI_ML (1<<18) /* Latch, Pin98 */ + +/* WM8766 registers */ +#define WM8766_DAC_CTRL 0x02 /* DAC Control */ +#define WM8766_INT_CTRL 0x03 /* Interface Control */ +#define WM8766_DAC_CTRL2 0x09 +#define WM8766_DAC_CTRL3 0x0a +#define WM8766_RESET 0x1f +#define WM8766_LDA1 0x00 +#define WM8766_LDA2 0x04 +#define WM8766_LDA3 0x06 +#define WM8766_RDA1 0x01 +#define WM8766_RDA2 0x05 +#define WM8766_RDA3 0x07 +#define WM8766_MUTE1 0x0C +#define WM8766_MUTE2 0x0F + + +/* + * Prodigy HD2 + */ +#define AK4396_ADDR 0x00 +#define AK4396_CSN (1 << 8) /* CSN->GPIO8, pin 75 */ +#define AK4396_CCLK (1 << 9) /* CCLK->GPIO9, pin 76 */ +#define AK4396_CDTI (1 << 10) /* CDTI->GPIO10, pin 77 */ + +/* ak4396 registers */ +#define AK4396_CTRL1 0x00 +#define AK4396_CTRL2 0x01 +#define AK4396_CTRL3 0x02 +#define AK4396_LCH_ATT 0x03 +#define AK4396_RCH_ATT 0x04 + + +/* + * get the current register value of WM codec + */ +static unsigned short wm_get(struct snd_ice1712 *ice, int reg) +{ + reg <<= 1; + return ((unsigned short)ice->akm[0].images[reg] << 8) | + ice->akm[0].images[reg + 1]; +} + +/* + * set the register value of WM codec and remember it + */ +static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val) +{ + unsigned short cval; + cval = (reg << 9) | val; + snd_vt1724_write_i2c(ice, WM_DEV, cval >> 8, cval & 0xff); +} + +static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val) +{ + wm_put_nocache(ice, reg, val); + reg <<= 1; + ice->akm[0].images[reg] = val >> 8; + ice->akm[0].images[reg + 1] = val; +} + +/* + * write data in the SPI mode + */ + +static void set_gpio_bit(struct snd_ice1712 *ice, unsigned int bit, int val) +{ + unsigned int tmp = snd_ice1712_gpio_read(ice); + if (val) + tmp |= bit; + else + tmp &= ~bit; + snd_ice1712_gpio_write(ice, tmp); +} + +/* + * SPI implementation for WM8766 codec - only writing supported, no readback + */ + +static void wm8766_spi_send_word(struct snd_ice1712 *ice, unsigned int data) +{ + int i; + for (i = 0; i < 16; i++) { + set_gpio_bit(ice, WM8766_SPI_CLK, 0); + udelay(1); + set_gpio_bit(ice, WM8766_SPI_MD, data & 0x8000); + udelay(1); + set_gpio_bit(ice, WM8766_SPI_CLK, 1); + udelay(1); + data <<= 1; + } +} + +static void wm8766_spi_write(struct snd_ice1712 *ice, unsigned int reg, + unsigned int data) +{ + unsigned int block; + + snd_ice1712_gpio_set_dir(ice, WM8766_SPI_MD| + WM8766_SPI_CLK|WM8766_SPI_ML); + snd_ice1712_gpio_set_mask(ice, ~(WM8766_SPI_MD| + WM8766_SPI_CLK|WM8766_SPI_ML)); + /* latch must be low when writing */ + set_gpio_bit(ice, WM8766_SPI_ML, 0); + block = (reg << 9) | (data & 0x1ff); + wm8766_spi_send_word(ice, block); /* REGISTER ADDRESS */ + /* release latch */ + set_gpio_bit(ice, WM8766_SPI_ML, 1); + udelay(1); + /* restore */ + snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask); + snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); +} + + +/* + * serial interface for ak4396 - only writing supported, no readback + */ + +static void ak4396_send_word(struct snd_ice1712 *ice, unsigned int data) +{ + int i; + for (i = 0; i < 16; i++) { + set_gpio_bit(ice, AK4396_CCLK, 0); + udelay(1); + set_gpio_bit(ice, AK4396_CDTI, data & 0x8000); + udelay(1); + set_gpio_bit(ice, AK4396_CCLK, 1); + udelay(1); + data <<= 1; + } +} + +static void ak4396_write(struct snd_ice1712 *ice, unsigned int reg, + unsigned int data) +{ + unsigned int block; + + snd_ice1712_gpio_set_dir(ice, AK4396_CSN|AK4396_CCLK|AK4396_CDTI); + snd_ice1712_gpio_set_mask(ice, ~(AK4396_CSN|AK4396_CCLK|AK4396_CDTI)); + /* latch must be low when writing */ + set_gpio_bit(ice, AK4396_CSN, 0); + block = ((AK4396_ADDR & 0x03) << 14) | (1 << 13) | + ((reg & 0x1f) << 8) | (data & 0xff); + ak4396_send_word(ice, block); /* REGISTER ADDRESS */ + /* release latch */ + set_gpio_bit(ice, AK4396_CSN, 1); + udelay(1); + /* restore */ + snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask); + snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); +} + + +/* + * ak4396 mixers + */ + + +/* + * DAC volume attenuation mixer control (-64dB to 0dB) + */ + +static int ak4396_dac_vol_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = 2; + uinfo->value.integer.min = 0; /* mute */ + uinfo->value.integer.max = 0xFF; /* linear */ + return 0; +} + +static int ak4396_dac_vol_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + struct prodigy_hifi_spec *spec = ice->spec; + int i; + + for (i = 0; i < 2; i++) + ucontrol->value.integer.value[i] = spec->vol[i]; + + return 0; +} + +static int ak4396_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + struct prodigy_hifi_spec *spec = ice->spec; + int i; + int change = 0; + + mutex_lock(&ice->gpio_mutex); + for (i = 0; i < 2; i++) { + if (ucontrol->value.integer.value[i] != spec->vol[i]) { + spec->vol[i] = ucontrol->value.integer.value[i]; + ak4396_write(ice, AK4396_LCH_ATT + i, + spec->vol[i] & 0xff); + change = 1; + } + } + mutex_unlock(&ice->gpio_mutex); + return change; +} + +static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1); +static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0); + +static struct snd_kcontrol_new prodigy_hd2_controls[] = { + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | + SNDRV_CTL_ELEM_ACCESS_TLV_READ), + .name = "Front Playback Volume", + .info = ak4396_dac_vol_info, + .get = ak4396_dac_vol_get, + .put = ak4396_dac_vol_put, + .tlv = { .p = ak4396_db_scale }, + }, +}; + + +/* --------------- */ + +#define WM_VOL_MAX 255 +#define WM_VOL_MUTE 0x8000 + + +#define DAC_0dB 0xff +#define DAC_RES 128 +#define DAC_MIN (DAC_0dB - DAC_RES) + + +static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index, + unsigned short vol, unsigned short master) +{ + unsigned char nvol; + + if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) + nvol = 0; + else { + nvol = (((vol & ~WM_VOL_MUTE) * (master & ~WM_VOL_MUTE)) / 128) + & WM_VOL_MAX; + nvol = (nvol ? (nvol + DAC_MIN) : 0) & 0xff; + } + + wm_put(ice, index, nvol); + wm_put_nocache(ice, index, 0x100 | nvol); +} + +static void wm8766_set_vol(struct snd_ice1712 *ice, unsigned int index, + unsigned short vol, unsigned short master) +{ + unsigned char nvol; + + if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) + nvol = 0; + else { + nvol = (((vol & ~WM_VOL_MUTE) * (master & ~WM_VOL_MUTE)) / 128) + & WM_VOL_MAX; + nvol = (nvol ? (nvol + DAC_MIN) : 0) & 0xff; + } + + wm8766_spi_write(ice, index, (0x0100 | nvol)); +} + + +/* + * DAC volume attenuation mixer control (-64dB to 0dB) + */ + +static int wm_dac_vol_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = 2; + uinfo->value.integer.min = 0; /* mute */ + uinfo->value.integer.max = DAC_RES; /* 0dB, 0.5dB step */ + return 0; +} + +static int wm_dac_vol_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + struct prodigy_hifi_spec *spec = ice->spec; + int i; + + for (i = 0; i < 2; i++) + ucontrol->value.integer.value[i] = + spec->vol[2 + i] & ~WM_VOL_MUTE; + return 0; +} + +static int wm_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + struct prodigy_hifi_spec *spec = ice->spec; + int i, idx, change = 0; + + mutex_lock(&ice->gpio_mutex); + for (i = 0; i < 2; i++) { + if (ucontrol->value.integer.value[i] != spec->vol[2 + i]) { + idx = WM_DAC_ATTEN_L + i; + spec->vol[2 + i] &= WM_VOL_MUTE; + spec->vol[2 + i] |= ucontrol->value.integer.value[i]; + wm_set_vol(ice, idx, spec->vol[2 + i], spec->master[i]); + change = 1; + } + } + mutex_unlock(&ice->gpio_mutex); + return change; +} + + +/* + * WM8766 DAC volume attenuation mixer control + */ +static int wm8766_vol_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) +{ + int voices = kcontrol->private_value >> 8; + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = voices; + uinfo->value.integer.min = 0; /* mute */ + uinfo->value.integer.max = DAC_RES; /* 0dB */ + return 0; +} + +static int wm8766_vol_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + struct prodigy_hifi_spec *spec = ice->spec; + int i, ofs, voices; + + voices = kcontrol->private_value >> 8; + ofs = kcontrol->private_value & 0xff; + for (i = 0; i < voices; i++) + ucontrol->value.integer.value[i] = spec->vol[ofs + i]; + return 0; +} + +static int wm8766_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + struct prodigy_hifi_spec *spec = ice->spec; + int i, idx, ofs, voices; + int change = 0; + + voices = kcontrol->private_value >> 8; + ofs = kcontrol->private_value & 0xff; + mutex_lock(&ice->gpio_mutex); + for (i = 0; i < voices; i++) { + if (ucontrol->value.integer.value[i] != spec->vol[ofs + i]) { + idx = WM8766_LDA1 + ofs + i; + spec->vol[ofs + i] &= WM_VOL_MUTE; + spec->vol[ofs + i] |= ucontrol->value.integer.value[i]; + wm8766_set_vol(ice, idx, + spec->vol[ofs + i], spec->master[i]); + change = 1; + } + } + mutex_unlock(&ice->gpio_mutex); + return change; +} + +/* + * Master volume attenuation mixer control / applied to WM8776+WM8766 + */ +static int wm_master_vol_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = 2; + uinfo->value.integer.min = 0; + uinfo->value.integer.max = DAC_RES; + return 0; +} + +static int wm_master_vol_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + struct prodigy_hifi_spec *spec = ice->spec; + int i; + for (i = 0; i < 2; i++) + ucontrol->value.integer.value[i] = spec->master[i]; + return 0; +} + +static int wm_master_vol_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + struct prodigy_hifi_spec *spec = ice->spec; + int ch, change = 0; + + mutex_lock(&ice->gpio_mutex); + for (ch = 0; ch < 2; ch++) { + if (ucontrol->value.integer.value[ch] != spec->master[ch]) { + spec->master[ch] = ucontrol->value.integer.value[ch]; + + /* Apply to front DAC */ + wm_set_vol(ice, WM_DAC_ATTEN_L + ch, + spec->vol[2 + ch], spec->master[ch]); + + wm8766_set_vol(ice, WM8766_LDA1 + ch, + spec->vol[0 + ch], spec->master[ch]); + + wm8766_set_vol(ice, WM8766_LDA2 + ch, + spec->vol[4 + ch], spec->master[ch]); + + wm8766_set_vol(ice, WM8766_LDA3 + ch, + spec->vol[6 + ch], spec->master[ch]); + change = 1; + } + } + mutex_unlock(&ice->gpio_mutex); + return change; +} + + +/* KONSTI */ + +static int wm_adc_mux_enum_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) +{ + static const char * const texts[32] = { + "NULL", WM_AIN1, WM_AIN2, WM_AIN1 "+" WM_AIN2, + WM_AIN3, WM_AIN1 "+" WM_AIN3, WM_AIN2 "+" WM_AIN3, + WM_AIN1 "+" WM_AIN2 "+" WM_AIN3, + WM_AIN4, WM_AIN1 "+" WM_AIN4, WM_AIN2 "+" WM_AIN4, + WM_AIN1 "+" WM_AIN2 "+" WM_AIN4, + WM_AIN3 "+" WM_AIN4, WM_AIN1 "+" WM_AIN3 "+" WM_AIN4, + WM_AIN2 "+" WM_AIN3 "+" WM_AIN4, + WM_AIN1 "+" WM_AIN2 "+" WM_AIN3 "+" WM_AIN4, + WM_AIN5, WM_AIN1 "+" WM_AIN5, WM_AIN2 "+" WM_AIN5, + WM_AIN1 "+" WM_AIN2 "+" WM_AIN5, + WM_AIN3 "+" WM_AIN5, WM_AIN1 "+" WM_AIN3 "+" WM_AIN5, + WM_AIN2 "+" WM_AIN3 "+" WM_AIN5, + WM_AIN1 "+" WM_AIN2 "+" WM_AIN3 "+" WM_AIN5, + WM_AIN4 "+" WM_AIN5, WM_AIN1 "+" WM_AIN4 "+" WM_AIN5, + WM_AIN2 "+" WM_AIN4 "+" WM_AIN5, + WM_AIN1 "+" WM_AIN2 "+" WM_AIN4 "+" WM_AIN5, + WM_AIN3 "+" WM_AIN4 "+" WM_AIN5, + WM_AIN1 "+" WM_AIN3 "+" WM_AIN4 "+" WM_AIN5, + WM_AIN2 "+" WM_AIN3 "+" WM_AIN4 "+" WM_AIN5, + WM_AIN1 "+" WM_AIN2 "+" WM_AIN3 "+" WM_AIN4 "+" WM_AIN5 + }; + + return snd_ctl_enum_info(uinfo, 1, 32, texts); +} + +static int wm_adc_mux_enum_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + + mutex_lock(&ice->gpio_mutex); + ucontrol->value.integer.value[0] = wm_get(ice, WM_ADC_MUX) & 0x1f; + mutex_unlock(&ice->gpio_mutex); + return 0; +} + +static int wm_adc_mux_enum_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + unsigned short oval, nval; + int change = 0; + + mutex_lock(&ice->gpio_mutex); + oval = wm_get(ice, WM_ADC_MUX); + nval = (oval & 0xe0) | ucontrol->value.integer.value[0]; + if (nval != oval) { + wm_put(ice, WM_ADC_MUX, nval); + change = 1; + } + mutex_unlock(&ice->gpio_mutex); + return change; +} + +/* KONSTI */ + +/* + * ADC gain mixer control (-64dB to 0dB) + */ + +#define ADC_0dB 0xcf +#define ADC_RES 128 +#define ADC_MIN (ADC_0dB - ADC_RES) + +static int wm_adc_vol_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *uinfo) +{ + uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; + uinfo->count = 2; + uinfo->value.integer.min = 0; /* mute (-64dB) */ + uinfo->value.integer.max = ADC_RES; /* 0dB, 0.5dB step */ + return 0; +} + +static int wm_adc_vol_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + unsigned short val; + int i; + + mutex_lock(&ice->gpio_mutex); + for (i = 0; i < 2; i++) { + val = wm_get(ice, WM_ADC_ATTEN_L + i) & 0xff; + val = val > ADC_MIN ? (val - ADC_MIN) : 0; + ucontrol->value.integer.value[i] = val; + } + mutex_unlock(&ice->gpio_mutex); + return 0; +} + +static int wm_adc_vol_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + unsigned short ovol, nvol; + int i, idx, change = 0; + + mutex_lock(&ice->gpio_mutex); + for (i = 0; i < 2; i++) { + nvol = ucontrol->value.integer.value[i]; + nvol = nvol ? (nvol + ADC_MIN) : 0; + idx = WM_ADC_ATTEN_L + i; + ovol = wm_get(ice, idx) & 0xff; + if (ovol != nvol) { + wm_put(ice, idx, nvol); + change = 1; + } + } + mutex_unlock(&ice->gpio_mutex); + return change; +} + +/* + * ADC input mux mixer control + */ +#define wm_adc_mux_info snd_ctl_boolean_mono_info + +static int wm_adc_mux_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + int bit = kcontrol->private_value; + + mutex_lock(&ice->gpio_mutex); + ucontrol->value.integer.value[0] = + (wm_get(ice, WM_ADC_MUX) & (1 << bit)) ? 1 : 0; + mutex_unlock(&ice->gpio_mutex); + return 0; +} + +static int wm_adc_mux_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + int bit = kcontrol->private_value; + unsigned short oval, nval; + int change; + + mutex_lock(&ice->gpio_mutex); + nval = oval = wm_get(ice, WM_ADC_MUX); + if (ucontrol->value.integer.value[0]) + nval |= (1 << bit); + else + nval &= ~(1 << bit); + change = nval != oval; + if (change) { + wm_put(ice, WM_ADC_MUX, nval); + } + mutex_unlock(&ice->gpio_mutex); + return 0; +} + +/* + * Analog bypass (In -> Out) + */ +#define wm_bypass_info snd_ctl_boolean_mono_info + +static int wm_bypass_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + + mutex_lock(&ice->gpio_mutex); + ucontrol->value.integer.value[0] = + (wm_get(ice, WM_OUT_MUX) & 0x04) ? 1 : 0; + mutex_unlock(&ice->gpio_mutex); + return 0; +} + +static int wm_bypass_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + unsigned short val, oval; + int change = 0; + + mutex_lock(&ice->gpio_mutex); + val = oval = wm_get(ice, WM_OUT_MUX); + if (ucontrol->value.integer.value[0]) + val |= 0x04; + else + val &= ~0x04; + if (val != oval) { + wm_put(ice, WM_OUT_MUX, val); + change = 1; + } + mutex_unlock(&ice->gpio_mutex); + return change; +} + +/* + * Left/Right swap + */ +#define wm_chswap_info snd_ctl_boolean_mono_info + +static int wm_chswap_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + + mutex_lock(&ice->gpio_mutex); + ucontrol->value.integer.value[0] = + (wm_get(ice, WM_DAC_CTRL1) & 0xf0) != 0x90; + mutex_unlock(&ice->gpio_mutex); + return 0; +} + +static int wm_chswap_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); + unsigned short val, oval; + int change = 0; + + mutex_lock(&ice->gpio_mutex); + oval = wm_get(ice, WM_DAC_CTRL1); + val = oval & 0x0f; + if (ucontrol->value.integer.value[0]) + val |= 0x60; + else + val |= 0x90; + if (val != oval) { + wm_put(ice, WM_DAC_CTRL1, val); + wm_put_nocache(ice, WM_DAC_CTRL1, val); + change = 1; + } + mutex_unlock(&ice->gpio_mutex); + return change; +} + + +/* + * mixers + */ + +static struct snd_kcontrol_new prodigy_hifi_controls[] = { + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | + SNDRV_CTL_ELEM_ACCESS_TLV_READ), + .name = "Master Playback Volume", + .info = wm_master_vol_info, + .get = wm_master_vol_get, + .put = wm_master_vol_put, + .tlv = { .p = db_scale_wm_dac } + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | + SNDRV_CTL_ELEM_ACCESS_TLV_READ), + .name = "Front Playback Volume", + .info = wm_dac_vol_info, + .get = wm_dac_vol_get, + .put = wm_dac_vol_put, + .tlv = { .p = db_scale_wm_dac }, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | + SNDRV_CTL_ELEM_ACCESS_TLV_READ), + .name = "Rear Playback Volume", + .info = wm8766_vol_info, + .get = wm8766_vol_get, + .put = wm8766_vol_put, + .private_value = (2 << 8) | 0, + .tlv = { .p = db_scale_wm_dac }, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | + SNDRV_CTL_ELEM_ACCESS_TLV_READ), + .name = "Center Playback Volume", + .info = wm8766_vol_info, + .get = wm8766_vol_get, + .put = wm8766_vol_put, + .private_value = (1 << 8) | 4, + .tlv = { .p = db_scale_wm_dac } + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | + SNDRV_CTL_ELEM_ACCESS_TLV_READ), + .name = "LFE Playback Volume", + .info = wm8766_vol_info, + .get = wm8766_vol_get, + .put = wm8766_vol_put, + .private_value = (1 << 8) | 5, + .tlv = { .p = db_scale_wm_dac } + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | + SNDRV_CTL_ELEM_ACCESS_TLV_READ), + .name = "Side Playback Volume", + .info = wm8766_vol_info, + .get = wm8766_vol_get, + .put = wm8766_vol_put, + .private_value = (2 << 8) | 6, + .tlv = { .p = db_scale_wm_dac }, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE | + SNDRV_CTL_ELEM_ACCESS_TLV_READ), + .name = "Capture Volume", + .info = wm_adc_vol_info, + .get = wm_adc_vol_get, + .put = wm_adc_vol_put, + .tlv = { .p = db_scale_wm_dac }, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "CD Capture Switch", + .info = wm_adc_mux_info, + .get = wm_adc_mux_get, + .put = wm_adc_mux_put, + .private_value = 0, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Line Capture Switch", + .info = wm_adc_mux_info, + .get = wm_adc_mux_get, + .put = wm_adc_mux_put, + .private_value = 1, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Analog Bypass Switch", + .info = wm_bypass_info, + .get = wm_bypass_get, + .put = wm_bypass_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Swap Output Channels", + .info = wm_chswap_info, + .get = wm_chswap_get, + .put = wm_chswap_put, + }, + { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Analog Capture Source", + .info = wm_adc_mux_enum_info, + .get = wm_adc_mux_enum_get, + .put = wm_adc_mux_enum_put, + }, +}; + +/* + * WM codec registers + */ +static void wm_proc_regs_write(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + struct snd_ice1712 *ice = entry->private_data; + char line[64]; + unsigned int reg, val; + mutex_lock(&ice->gpio_mutex); + while (!snd_info_get_line(buffer, line, sizeof(line))) { + if (sscanf(line, "%x %x", ®, &val) != 2) + continue; + if (reg <= 0x17 && val <= 0xffff) + wm_put(ice, reg, val); + } + mutex_unlock(&ice->gpio_mutex); +} + +static void wm_proc_regs_read(struct snd_info_entry *entry, + struct snd_info_buffer *buffer) +{ + struct snd_ice1712 *ice = entry->private_data; + int reg, val; + + mutex_lock(&ice->gpio_mutex); + for (reg = 0; reg <= 0x17; reg++) { + val = wm_get(ice, reg); + snd_iprintf(buffer, "%02x = %04x\n", reg, val); + } + mutex_unlock(&ice->gpio_mutex); +} + +static void wm_proc_init(struct snd_ice1712 *ice) +{ + struct snd_info_entry *entry; + if (!snd_card_proc_new(ice->card, "wm_codec", &entry)) { + snd_info_set_text_ops(entry, ice, wm_proc_regs_read); + entry->mode |= 0200; + entry->c.text.write = wm_proc_regs_write; + } +} + +static int prodigy_hifi_add_controls(struct snd_ice1712 *ice) +{ + unsigned int i; + int err; + + for (i = 0; i < ARRAY_SIZE(prodigy_hifi_controls); i++) { + err = snd_ctl_add(ice->card, + snd_ctl_new1(&prodigy_hifi_controls[i], ice)); + if (err < 0) + return err; + } + + wm_proc_init(ice); + + return 0; +} + +static int prodigy_hd2_add_controls(struct snd_ice1712 *ice) +{ + unsigned int i; + int err; + + for (i = 0; i < ARRAY_SIZE(prodigy_hd2_controls); i++) { + err = snd_ctl_add(ice->card, + snd_ctl_new1(&prodigy_hd2_controls[i], ice)); + if (err < 0) + return err; + } + + wm_proc_init(ice); + + return 0; +} + +static void wm8766_init(struct snd_ice1712 *ice) +{ + static unsigned short wm8766_inits[] = { + WM8766_RESET, 0x0000, + WM8766_DAC_CTRL, 0x0120, + WM8766_INT_CTRL, 0x0022, /* I2S Normal Mode, 24 bit */ + WM8766_DAC_CTRL2, 0x0001, + WM8766_DAC_CTRL3, 0x0080, + WM8766_LDA1, 0x0100, + WM8766_LDA2, 0x0100, + WM8766_LDA3, 0x0100, + WM8766_RDA1, 0x0100, + WM8766_RDA2, 0x0100, + WM8766_RDA3, 0x0100, + WM8766_MUTE1, 0x0000, + WM8766_MUTE2, 0x0000, + }; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(wm8766_inits); i += 2) + wm8766_spi_write(ice, wm8766_inits[i], wm8766_inits[i + 1]); +} + +static void wm8776_init(struct snd_ice1712 *ice) +{ + static unsigned short wm8776_inits[] = { + /* These come first to reduce init pop noise */ + WM_ADC_MUX, 0x0003, /* ADC mute */ + /* 0x00c0 replaced by 0x0003 */ + + WM_DAC_MUTE, 0x0001, /* DAC softmute */ + WM_DAC_CTRL1, 0x0000, /* DAC mute */ + + WM_POWERDOWN, 0x0008, /* All power-up except HP */ + WM_RESET, 0x0000, /* reset */ + }; + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(wm8776_inits); i += 2) + wm_put(ice, wm8776_inits[i], wm8776_inits[i + 1]); +} + +#ifdef CONFIG_PM_SLEEP +static int prodigy_hifi_resume(struct snd_ice1712 *ice) +{ + static unsigned short wm8776_reinit_registers[] = { + WM_MASTER_CTRL, + WM_DAC_INT, + WM_ADC_INT, + WM_OUT_MUX, + WM_HP_ATTEN_L, + WM_HP_ATTEN_R, + WM_PHASE_SWAP, + WM_DAC_CTRL2, + WM_ADC_ATTEN_L, + WM_ADC_ATTEN_R, + WM_ALC_CTRL1, + WM_ALC_CTRL2, + WM_ALC_CTRL3, + WM_NOISE_GATE, + WM_ADC_MUX, + /* no DAC attenuation here */ + }; + struct prodigy_hifi_spec *spec = ice->spec; + int i, ch; + + mutex_lock(&ice->gpio_mutex); + + /* reinitialize WM8776 and re-apply old register values */ + wm8776_init(ice); + schedule_timeout_uninterruptible(1); + for (i = 0; i < ARRAY_SIZE(wm8776_reinit_registers); i++) + wm_put(ice, wm8776_reinit_registers[i], + wm_get(ice, wm8776_reinit_registers[i])); + + /* reinitialize WM8766 and re-apply volumes for all DACs */ + wm8766_init(ice); + for (ch = 0; ch < 2; ch++) { + wm_set_vol(ice, WM_DAC_ATTEN_L + ch, + spec->vol[2 + ch], spec->master[ch]); + + wm8766_set_vol(ice, WM8766_LDA1 + ch, + spec->vol[0 + ch], spec->master[ch]); + + wm8766_set_vol(ice, WM8766_LDA2 + ch, + spec->vol[4 + ch], spec->master[ch]); + + wm8766_set_vol(ice, WM8766_LDA3 + ch, + spec->vol[6 + ch], spec->master[ch]); + } + + /* unmute WM8776 DAC */ + wm_put(ice, WM_DAC_MUTE, 0x00); + wm_put(ice, WM_DAC_CTRL1, 0x90); + + mutex_unlock(&ice->gpio_mutex); + return 0; +} +#endif + +/* + * initialize the chip + */ +static int prodigy_hifi_init(struct snd_ice1712 *ice) +{ + static unsigned short wm8776_defaults[] = { + WM_MASTER_CTRL, 0x0022, /* 256fs, slave mode */ + WM_DAC_INT, 0x0022, /* I2S, normal polarity, 24bit */ + WM_ADC_INT, 0x0022, /* I2S, normal polarity, 24bit */ + WM_DAC_CTRL1, 0x0090, /* DAC L/R */ + WM_OUT_MUX, 0x0001, /* OUT DAC */ + WM_HP_ATTEN_L, 0x0179, /* HP 0dB */ + WM_HP_ATTEN_R, 0x0179, /* HP 0dB */ + WM_DAC_ATTEN_L, 0x0000, /* DAC 0dB */ + WM_DAC_ATTEN_L, 0x0100, /* DAC 0dB */ + WM_DAC_ATTEN_R, 0x0000, /* DAC 0dB */ + WM_DAC_ATTEN_R, 0x0100, /* DAC 0dB */ + WM_PHASE_SWAP, 0x0000, /* phase normal */ +#if 0 + WM_DAC_MASTER, 0x0100, /* DAC master muted */ +#endif + WM_DAC_CTRL2, 0x0000, /* no deemphasis, no ZFLG */ + WM_ADC_ATTEN_L, 0x0000, /* ADC muted */ + WM_ADC_ATTEN_R, 0x0000, /* ADC muted */ +#if 1 + WM_ALC_CTRL1, 0x007b, /* */ + WM_ALC_CTRL2, 0x0000, /* */ + WM_ALC_CTRL3, 0x0000, /* */ + WM_NOISE_GATE, 0x0000, /* */ +#endif + WM_DAC_MUTE, 0x0000, /* DAC unmute */ + WM_ADC_MUX, 0x0003, /* ADC unmute, both CD/Line On */ + }; + struct prodigy_hifi_spec *spec; + unsigned int i; + + ice->vt1720 = 0; + ice->vt1724 = 1; + + ice->num_total_dacs = 8; + ice->num_total_adcs = 1; + + /* HACK - use this as the SPDIF source. + * don't call snd_ice1712_gpio_get/put(), otherwise it's overwritten + */ + ice->gpio.saved[0] = 0; + /* to remember the register values */ + + ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); + if (! ice->akm) + return -ENOMEM; + ice->akm_codecs = 1; + + spec = kzalloc(sizeof(*spec), GFP_KERNEL); + if (!spec) + return -ENOMEM; + ice->spec = spec; + + /* initialize WM8776 codec */ + wm8776_init(ice); + schedule_timeout_uninterruptible(1); + for (i = 0; i < ARRAY_SIZE(wm8776_defaults); i += 2) + wm_put(ice, wm8776_defaults[i], wm8776_defaults[i + 1]); + + wm8766_init(ice); + +#ifdef CONFIG_PM_SLEEP + ice->pm_resume = &prodigy_hifi_resume; + ice->pm_suspend_enabled = 1; +#endif + + return 0; +} + + +/* + * initialize the chip + */ +static void ak4396_init(struct snd_ice1712 *ice) +{ + static unsigned short ak4396_inits[] = { + AK4396_CTRL1, 0x87, /* I2S Normal Mode, 24 bit */ + AK4396_CTRL2, 0x02, + AK4396_CTRL3, 0x00, + AK4396_LCH_ATT, 0x00, + AK4396_RCH_ATT, 0x00, + }; + + unsigned int i; + + /* initialize ak4396 codec */ + /* reset codec */ + ak4396_write(ice, AK4396_CTRL1, 0x86); + msleep(100); + ak4396_write(ice, AK4396_CTRL1, 0x87); + + for (i = 0; i < ARRAY_SIZE(ak4396_inits); i += 2) + ak4396_write(ice, ak4396_inits[i], ak4396_inits[i+1]); +} + +#ifdef CONFIG_PM_SLEEP +static int prodigy_hd2_resume(struct snd_ice1712 *ice) +{ + /* initialize ak4396 codec and restore previous mixer volumes */ + struct prodigy_hifi_spec *spec = ice->spec; + int i; + mutex_lock(&ice->gpio_mutex); + ak4396_init(ice); + for (i = 0; i < 2; i++) + ak4396_write(ice, AK4396_LCH_ATT + i, spec->vol[i] & 0xff); + mutex_unlock(&ice->gpio_mutex); + return 0; +} +#endif + +static int prodigy_hd2_init(struct snd_ice1712 *ice) +{ + struct prodigy_hifi_spec *spec; + + ice->vt1720 = 0; + ice->vt1724 = 1; + + ice->num_total_dacs = 1; + ice->num_total_adcs = 1; + + /* HACK - use this as the SPDIF source. + * don't call snd_ice1712_gpio_get/put(), otherwise it's overwritten + */ + ice->gpio.saved[0] = 0; + /* to remember the register values */ + + ice->akm = kzalloc(sizeof(struct snd_akm4xxx), GFP_KERNEL); + if (! ice->akm) + return -ENOMEM; + ice->akm_codecs = 1; + + spec = kzalloc(sizeof(*spec), GFP_KERNEL); + if (!spec) + return -ENOMEM; + ice->spec = spec; + +#ifdef CONFIG_PM_SLEEP + ice->pm_resume = &prodigy_hd2_resume; + ice->pm_suspend_enabled = 1; +#endif + + ak4396_init(ice); + + return 0; +} + + +static unsigned char prodigy71hifi_eeprom[] = { + 0x4b, /* SYSCONF: clock 512, spdif-in/ADC, 4DACs */ + 0x80, /* ACLINK: I2S */ + 0xfc, /* I2S: vol, 96k, 24bit, 192k */ + 0xc3, /* SPDIF: out-en, out-int, spdif-in */ + 0xff, /* GPIO_DIR */ + 0xff, /* GPIO_DIR1 */ + 0x5f, /* GPIO_DIR2 */ + 0x00, /* GPIO_MASK */ + 0x00, /* GPIO_MASK1 */ + 0x00, /* GPIO_MASK2 */ + 0x00, /* GPIO_STATE */ + 0x00, /* GPIO_STATE1 */ + 0x00, /* GPIO_STATE2 */ +}; + +static unsigned char prodigyhd2_eeprom[] = { + 0x4b, /* SYSCONF: clock 512, spdif-in/ADC, 4DACs */ + 0x80, /* ACLINK: I2S */ + 0xfc, /* I2S: vol, 96k, 24bit, 192k */ + 0xc3, /* SPDIF: out-en, out-int, spdif-in */ + 0xff, /* GPIO_DIR */ + 0xff, /* GPIO_DIR1 */ + 0x5f, /* GPIO_DIR2 */ + 0x00, /* GPIO_MASK */ + 0x00, /* GPIO_MASK1 */ + 0x00, /* GPIO_MASK2 */ + 0x00, /* GPIO_STATE */ + 0x00, /* GPIO_STATE1 */ + 0x00, /* GPIO_STATE2 */ +}; + +static unsigned char fortissimo4_eeprom[] = { + 0x43, /* SYSCONF: clock 512, ADC, 4DACs */ + 0x80, /* ACLINK: I2S */ + 0xfc, /* I2S: vol, 96k, 24bit, 192k */ + 0xc1, /* SPDIF: out-en, out-int */ + 0xff, /* GPIO_DIR */ + 0xff, /* GPIO_DIR1 */ + 0x5f, /* GPIO_DIR2 */ + 0x00, /* GPIO_MASK */ + 0x00, /* GPIO_MASK1 */ + 0x00, /* GPIO_MASK2 */ + 0x00, /* GPIO_STATE */ + 0x00, /* GPIO_STATE1 */ + 0x00, /* GPIO_STATE2 */ +}; + +/* entry point */ +struct snd_ice1712_card_info snd_vt1724_prodigy_hifi_cards[] = { + { + .subvendor = VT1724_SUBDEVICE_PRODIGY_HIFI, + .name = "Audiotrak Prodigy 7.1 HiFi", + .model = "prodigy71hifi", + .chip_init = prodigy_hifi_init, + .build_controls = prodigy_hifi_add_controls, + .eeprom_size = sizeof(prodigy71hifi_eeprom), + .eeprom_data = prodigy71hifi_eeprom, + .driver = "Prodigy71HIFI", + }, + { + .subvendor = VT1724_SUBDEVICE_PRODIGY_HD2, + .name = "Audiotrak Prodigy HD2", + .model = "prodigyhd2", + .chip_init = prodigy_hd2_init, + .build_controls = prodigy_hd2_add_controls, + .eeprom_size = sizeof(prodigyhd2_eeprom), + .eeprom_data = prodigyhd2_eeprom, + .driver = "Prodigy71HD2", + }, + { + .subvendor = VT1724_SUBDEVICE_FORTISSIMO4, + .name = "Hercules Fortissimo IV", + .model = "fortissimo4", + .chip_init = prodigy_hifi_init, + .build_controls = prodigy_hifi_add_controls, + .eeprom_size = sizeof(fortissimo4_eeprom), + .eeprom_data = fortissimo4_eeprom, + .driver = "Fortissimo4", + }, + { } /* terminator */ +}; \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/ice1712/prodigy_hifi.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/ice1712/prodigy_hifi.c.yml new file mode 100644 index 00000000000..63f2af393b2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/ice1712/prodigy_hifi.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2007 Julian Scheel + - Copyright (c) 2007 allank + - Copyright (c) 2004 Takashi Iwai +holders: + - Julian Scheel + - allank + - Takashi Iwai diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/ymfpci/ymfpci.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/ymfpci/ymfpci.h new file mode 100644 index 00000000000..72efa46f9d4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/ymfpci/ymfpci.h @@ -0,0 +1,3 @@ + * Copyright (c) by Jaroslav Kysela + * Definitions for Yahama YMF724/740/744/754 chips + diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/ymfpci/ymfpci.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/ymfpci/ymfpci.h.yml new file mode 100644 index 00000000000..5d96dc0fe55 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/pci/ymfpci/ymfpci.h.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) by Jaroslav Kysela +holders: + - Jaroslav Kysela diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/ppc/snd_ps3_reg.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/ppc/snd_ps3_reg.h new file mode 100644 index 00000000000..a8bda2e83f1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/ppc/snd_ps3_reg.h @@ -0,0 +1,889 @@ +/* + * Audio support for PS3 + * Copyright (C) 2007 Sony Computer Entertainment Inc. + * Copyright 2006, 2007 Sony Corporation + * All rights reserved. + * + * 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; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* + * interrupt / configure registers + */ + +#define PS3_AUDIO_INTR_0 (0x00000100) +#define PS3_AUDIO_INTR_EN_0 (0x00000140) +#define PS3_AUDIO_CONFIG (0x00000200) + +/* + * DMAC registers + * n:0..9 + */ +#define PS3_AUDIO_DMAC_REGBASE(x) (0x0000210 + 0x20 * (x)) + +#define PS3_AUDIO_KICK(n) (PS3_AUDIO_DMAC_REGBASE(n) + 0x00) +#define PS3_AUDIO_SOURCE(n) (PS3_AUDIO_DMAC_REGBASE(n) + 0x04) +#define PS3_AUDIO_DEST(n) (PS3_AUDIO_DMAC_REGBASE(n) + 0x08) +#define PS3_AUDIO_DMASIZE(n) (PS3_AUDIO_DMAC_REGBASE(n) + 0x0C) + +/* + * mute control + */ +#define PS3_AUDIO_AX_MCTRL (0x00004000) +#define PS3_AUDIO_AX_ISBP (0x00004004) +#define PS3_AUDIO_AX_AOBP (0x00004008) +#define PS3_AUDIO_AX_IC (0x00004010) +#define PS3_AUDIO_AX_IE (0x00004014) +#define PS3_AUDIO_AX_IS (0x00004018) + +/* + * three wire serial + * n:0..3 + */ +#define PS3_AUDIO_AO_MCTRL (0x00006000) +#define PS3_AUDIO_AO_3WMCTRL (0x00006004) + +#define PS3_AUDIO_AO_3WCTRL(n) (0x00006200 + 0x200 * (n)) + +/* + * S/PDIF + * n:0..1 + * x:0..11 + * y:0..5 + */ +#define PS3_AUDIO_AO_SPD_REGBASE(n) (0x00007200 + 0x200 * (n)) + +#define PS3_AUDIO_AO_SPDCTRL(n) \ + (PS3_AUDIO_AO_SPD_REGBASE(n) + 0x00) +#define PS3_AUDIO_AO_SPDUB(n, x) \ + (PS3_AUDIO_AO_SPD_REGBASE(n) + 0x04 + 0x04 * (x)) +#define PS3_AUDIO_AO_SPDCS(n, y) \ + (PS3_AUDIO_AO_SPD_REGBASE(n) + 0x34 + 0x04 * (y)) + + +/* + PS3_AUDIO_INTR_0 register tells an interrupt handler which audio + DMA channel triggered the interrupt. The interrupt status for a channel + can be cleared by writing a '1' to the corresponding bit. A new interrupt + cannot be generated until the previous interrupt has been cleared. + + Note that the status reported by PS3_AUDIO_INTR_0 is independent of the + value of PS3_AUDIO_INTR_EN_0. + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |0 0 0 0 0 0 0 0 0 0 0 0 0|C|0|C|0|C|0|C|0|C|0|C|0|C|0|C|0|C|0|C| INTR_0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ +*/ +#define PS3_AUDIO_INTR_0_CHAN(n) (1 << ((n) * 2)) +#define PS3_AUDIO_INTR_0_CHAN9 PS3_AUDIO_INTR_0_CHAN(9) +#define PS3_AUDIO_INTR_0_CHAN8 PS3_AUDIO_INTR_0_CHAN(8) +#define PS3_AUDIO_INTR_0_CHAN7 PS3_AUDIO_INTR_0_CHAN(7) +#define PS3_AUDIO_INTR_0_CHAN6 PS3_AUDIO_INTR_0_CHAN(6) +#define PS3_AUDIO_INTR_0_CHAN5 PS3_AUDIO_INTR_0_CHAN(5) +#define PS3_AUDIO_INTR_0_CHAN4 PS3_AUDIO_INTR_0_CHAN(4) +#define PS3_AUDIO_INTR_0_CHAN3 PS3_AUDIO_INTR_0_CHAN(3) +#define PS3_AUDIO_INTR_0_CHAN2 PS3_AUDIO_INTR_0_CHAN(2) +#define PS3_AUDIO_INTR_0_CHAN1 PS3_AUDIO_INTR_0_CHAN(1) +#define PS3_AUDIO_INTR_0_CHAN0 PS3_AUDIO_INTR_0_CHAN(0) + +/* + The PS3_AUDIO_INTR_EN_0 register specifies which DMA channels can generate + an interrupt to the PU. Each bit of PS3_AUDIO_INTR_EN_0 is ANDed with the + corresponding bit in PS3_AUDIO_INTR_0. The resulting bits are OR'd together + to generate the Audio interrupt. + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |0 0 0 0 0 0 0 0 0 0 0 0 0|C|0|C|0|C|0|C|0|C|0|C|0|C|0|C|0|C|0|C| INTR_EN_0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + + Bit assignments are same as PS3_AUDIO_INTR_0 +*/ + +/* + PS3_AUDIO_CONFIG + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |0 0 0 0 0 0 0 0|0 0 0 0 0 0 0 0|0 0 0 0 0 0 0 C|0 0 0 0 0 0 0 0| CONFIG + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + +*/ + +/* The CLEAR field cancels all pending transfers, and stops any running DMA + transfers. Any interrupts associated with the canceled transfers + will occur as if the transfer had finished. + Since this bit is designed to recover from DMA related issues + which are caused by unpredictable situations, it is preferred to wait + for normal DMA transfer end without using this bit. +*/ +#define PS3_AUDIO_CONFIG_CLEAR (1 << 8) /* RWIVF */ + +/* + PS3_AUDIO_AX_MCTRL: Audio Port Mute Control Register + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|A|A|A|0 0 0 0 0 0 0|S|S|A|A|A|A| AX_MCTRL + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ +*/ + +/* 3 Wire Audio Serial Output Channel Mutes (0..3) */ +#define PS3_AUDIO_AX_MCTRL_ASOMT(n) (1 << (3 - (n))) /* RWIVF */ +#define PS3_AUDIO_AX_MCTRL_ASO3MT (1 << 0) /* RWIVF */ +#define PS3_AUDIO_AX_MCTRL_ASO2MT (1 << 1) /* RWIVF */ +#define PS3_AUDIO_AX_MCTRL_ASO1MT (1 << 2) /* RWIVF */ +#define PS3_AUDIO_AX_MCTRL_ASO0MT (1 << 3) /* RWIVF */ + +/* S/PDIF mutes (0,1)*/ +#define PS3_AUDIO_AX_MCTRL_SPOMT(n) (1 << (5 - (n))) /* RWIVF */ +#define PS3_AUDIO_AX_MCTRL_SPO1MT (1 << 4) /* RWIVF */ +#define PS3_AUDIO_AX_MCTRL_SPO0MT (1 << 5) /* RWIVF */ + +/* All 3 Wire Serial Outputs Mute */ +#define PS3_AUDIO_AX_MCTRL_AASOMT (1 << 13) /* RWIVF */ + +/* All S/PDIF Mute */ +#define PS3_AUDIO_AX_MCTRL_ASPOMT (1 << 14) /* RWIVF */ + +/* All Audio Outputs Mute */ +#define PS3_AUDIO_AX_MCTRL_AAOMT (1 << 15) /* RWIVF */ + +/* + S/PDIF Outputs Buffer Read/Write Pointer Register + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |0 0 0 0 0 0 0 0|0|SPO0B|0|SPO1B|0 0 0 0 0 0 0 0|0|SPO0B|0|SPO1B| AX_ISBP + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + +*/ +/* + S/PDIF Output Channel Read Buffer Numbers + Buffer number is value of field. + Indicates current read access buffer ID from Audio Data + Transfer controller of S/PDIF Output +*/ + +#define PS3_AUDIO_AX_ISBP_SPOBRN_MASK(n) (0x7 << 4 * (1 - (n))) /* R-IUF */ +#define PS3_AUDIO_AX_ISBP_SPO1BRN_MASK (0x7 << 0) /* R-IUF */ +#define PS3_AUDIO_AX_ISBP_SPO0BRN_MASK (0x7 << 4) /* R-IUF */ + +/* +S/PDIF Output Channel Buffer Write Numbers +Indicates current write access buffer ID from bus master. +*/ +#define PS3_AUDIO_AX_ISBP_SPOBWN_MASK(n) (0x7 << 4 * (5 - (n))) /* R-IUF */ +#define PS3_AUDIO_AX_ISBP_SPO1BWN_MASK (0x7 << 16) /* R-IUF */ +#define PS3_AUDIO_AX_ISBP_SPO0BWN_MASK (0x7 << 20) /* R-IUF */ + +/* + 3 Wire Audio Serial Outputs Buffer Read/Write + Pointer Register + Buffer number is value of field + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |0|ASO0B|0|ASO1B|0|ASO2B|0|ASO3B|0|ASO0B|0|ASO1B|0|ASO2B|0|ASO3B| AX_AOBP + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ +*/ + +/* +3 Wire Audio Serial Output Channel Buffer Read Numbers +Indicates current read access buffer Id from Audio Data Transfer +Controller of 3 Wire Audio Serial Output Channels +*/ +#define PS3_AUDIO_AX_AOBP_ASOBRN_MASK(n) (0x7 << 4 * (3 - (n))) /* R-IUF */ + +#define PS3_AUDIO_AX_AOBP_ASO3BRN_MASK (0x7 << 0) /* R-IUF */ +#define PS3_AUDIO_AX_AOBP_ASO2BRN_MASK (0x7 << 4) /* R-IUF */ +#define PS3_AUDIO_AX_AOBP_ASO1BRN_MASK (0x7 << 8) /* R-IUF */ +#define PS3_AUDIO_AX_AOBP_ASO0BRN_MASK (0x7 << 12) /* R-IUF */ + +/* +3 Wire Audio Serial Output Channel Buffer Write Numbers +Indicates current write access buffer ID from bus master. +*/ +#define PS3_AUDIO_AX_AOBP_ASOBWN_MASK(n) (0x7 << 4 * (7 - (n))) /* R-IUF */ + +#define PS3_AUDIO_AX_AOBP_ASO3BWN_MASK (0x7 << 16) /* R-IUF */ +#define PS3_AUDIO_AX_AOBP_ASO2BWN_MASK (0x7 << 20) /* R-IUF */ +#define PS3_AUDIO_AX_AOBP_ASO1BWN_MASK (0x7 << 24) /* R-IUF */ +#define PS3_AUDIO_AX_AOBP_ASO0BWN_MASK (0x7 << 28) /* R-IUF */ + + +/* +Audio Port Interrupt Condition Register +For the fields in this register, the following values apply: +0 = Interrupt is generated every interrupt event. +1 = Interrupt is generated every 2 interrupt events. +2 = Interrupt is generated every 4 interrupt events. +3 = Reserved + + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |0 0 0 0 0 0 0 0|0 0|SPO|0 0|SPO|0 0|AAS|0 0 0 0 0 0 0 0 0 0 0 0| AX_IC + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ +*/ +/* +All 3-Wire Audio Serial Outputs Interrupt Mode +Configures the Interrupt and Signal Notification +condition of all 3-wire Audio Serial Outputs. +*/ +#define PS3_AUDIO_AX_IC_AASOIMD_MASK (0x3 << 12) /* RWIVF */ +#define PS3_AUDIO_AX_IC_AASOIMD_EVERY1 (0x0 << 12) /* RWI-V */ +#define PS3_AUDIO_AX_IC_AASOIMD_EVERY2 (0x1 << 12) /* RW--V */ +#define PS3_AUDIO_AX_IC_AASOIMD_EVERY4 (0x2 << 12) /* RW--V */ + +/* +S/PDIF Output Channel Interrupt Modes +Configures the Interrupt and signal Notification +conditions of S/PDIF output channels. +*/ +#define PS3_AUDIO_AX_IC_SPO1IMD_MASK (0x3 << 16) /* RWIVF */ +#define PS3_AUDIO_AX_IC_SPO1IMD_EVERY1 (0x0 << 16) /* RWI-V */ +#define PS3_AUDIO_AX_IC_SPO1IMD_EVERY2 (0x1 << 16) /* RW--V */ +#define PS3_AUDIO_AX_IC_SPO1IMD_EVERY4 (0x2 << 16) /* RW--V */ + +#define PS3_AUDIO_AX_IC_SPO0IMD_MASK (0x3 << 20) /* RWIVF */ +#define PS3_AUDIO_AX_IC_SPO0IMD_EVERY1 (0x0 << 20) /* RWI-V */ +#define PS3_AUDIO_AX_IC_SPO0IMD_EVERY2 (0x1 << 20) /* RW--V */ +#define PS3_AUDIO_AX_IC_SPO0IMD_EVERY4 (0x2 << 20) /* RW--V */ + +/* +Audio Port interrupt Enable Register +Configures whether to enable or disable each Interrupt Generation. + + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |0 0 0 0 0 0 0 0|S|S|0 0|A|A|A|A|0 0 0 0|S|S|0 0|S|S|0 0|A|A|A|A| AX_IE + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + +*/ + +/* +3 Wire Audio Serial Output Channel Buffer Underflow +Interrupt Enables +Select enable/disable of Buffer Underflow Interrupts for +3-Wire Audio Serial Output Channels +DISABLED=Interrupt generation disabled. +*/ +#define PS3_AUDIO_AX_IE_ASOBUIE(n) (1 << (3 - (n))) /* RWIVF */ +#define PS3_AUDIO_AX_IE_ASO3BUIE (1 << 0) /* RWIVF */ +#define PS3_AUDIO_AX_IE_ASO2BUIE (1 << 1) /* RWIVF */ +#define PS3_AUDIO_AX_IE_ASO1BUIE (1 << 2) /* RWIVF */ +#define PS3_AUDIO_AX_IE_ASO0BUIE (1 << 3) /* RWIVF */ + +/* S/PDIF Output Channel Buffer Underflow Interrupt Enables */ + +#define PS3_AUDIO_AX_IE_SPOBUIE(n) (1 << (7 - (n))) /* RWIVF */ +#define PS3_AUDIO_AX_IE_SPO1BUIE (1 << 6) /* RWIVF */ +#define PS3_AUDIO_AX_IE_SPO0BUIE (1 << 7) /* RWIVF */ + +/* S/PDIF Output Channel One Block Transfer Completion Interrupt Enables */ + +#define PS3_AUDIO_AX_IE_SPOBTCIE(n) (1 << (11 - (n))) /* RWIVF */ +#define PS3_AUDIO_AX_IE_SPO1BTCIE (1 << 10) /* RWIVF */ +#define PS3_AUDIO_AX_IE_SPO0BTCIE (1 << 11) /* RWIVF */ + +/* 3-Wire Audio Serial Output Channel Buffer Empty Interrupt Enables */ + +#define PS3_AUDIO_AX_IE_ASOBEIE(n) (1 << (19 - (n))) /* RWIVF */ +#define PS3_AUDIO_AX_IE_ASO3BEIE (1 << 16) /* RWIVF */ +#define PS3_AUDIO_AX_IE_ASO2BEIE (1 << 17) /* RWIVF */ +#define PS3_AUDIO_AX_IE_ASO1BEIE (1 << 18) /* RWIVF */ +#define PS3_AUDIO_AX_IE_ASO0BEIE (1 << 19) /* RWIVF */ + +/* S/PDIF Output Channel Buffer Empty Interrupt Enables */ + +#define PS3_AUDIO_AX_IE_SPOBEIE(n) (1 << (23 - (n))) /* RWIVF */ +#define PS3_AUDIO_AX_IE_SPO1BEIE (1 << 22) /* RWIVF */ +#define PS3_AUDIO_AX_IE_SPO0BEIE (1 << 23) /* RWIVF */ + +/* +Audio Port Interrupt Status Register +Indicates Interrupt status, which interrupt has occurred, and can clear +each interrupt in this register. +Writing 1b to a field containing 1b clears field and de-asserts interrupt. +Writing 0b to a field has no effect. +Field vaules are the following: +0 - Interrupt hasn't occurred. +1 - Interrupt has occurred. + + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |0 0 0 0 0 0 0 0|S|S|0 0|A|A|A|A|0 0 0 0|S|S|0 0|S|S|0 0|A|A|A|A| AX_IS + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + + Bit assignment are same as AX_IE +*/ + +/* +Audio Output Master Control Register +Configures Master Clock and other master Audio Output Settings + + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |0|SCKSE|0|SCKSE| MR0 | MR1 |MCL|MCL|0 0 0 0|0 0 0 0 0 0 0 0| AO_MCTRL + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ +*/ + +/* +MCLK Output Control +Controls mclko[1] output. +0 - Disable output (fixed at High) +1 - Output clock produced by clock selected +with scksel1 by mr1 +2 - Reserved +3 - Reserved +*/ + +#define PS3_AUDIO_AO_MCTRL_MCLKC1_MASK (0x3 << 12) /* RWIVF */ +#define PS3_AUDIO_AO_MCTRL_MCLKC1_DISABLED (0x0 << 12) /* RWI-V */ +#define PS3_AUDIO_AO_MCTRL_MCLKC1_ENABLED (0x1 << 12) /* RW--V */ +#define PS3_AUDIO_AO_MCTRL_MCLKC1_RESVD2 (0x2 << 12) /* RW--V */ +#define PS3_AUDIO_AO_MCTRL_MCLKC1_RESVD3 (0x3 << 12) /* RW--V */ + +/* +MCLK Output Control +Controls mclko[0] output. +0 - Disable output (fixed at High) +1 - Output clock produced by clock selected +with SCKSEL0 by MR0 +2 - Reserved +3 - Reserved +*/ +#define PS3_AUDIO_AO_MCTRL_MCLKC0_MASK (0x3 << 14) /* RWIVF */ +#define PS3_AUDIO_AO_MCTRL_MCLKC0_DISABLED (0x0 << 14) /* RWI-V */ +#define PS3_AUDIO_AO_MCTRL_MCLKC0_ENABLED (0x1 << 14) /* RW--V */ +#define PS3_AUDIO_AO_MCTRL_MCLKC0_RESVD2 (0x2 << 14) /* RW--V */ +#define PS3_AUDIO_AO_MCTRL_MCLKC0_RESVD3 (0x3 << 14) /* RW--V */ +/* +Master Clock Rate 1 +Sets the divide ration of Master Clock1 (clock output from +mclko[1] for the input clock selected by scksel1. +*/ +#define PS3_AUDIO_AO_MCTRL_MR1_MASK (0xf << 16) +#define PS3_AUDIO_AO_MCTRL_MR1_DEFAULT (0x0 << 16) /* RWI-V */ +/* +Master Clock Rate 0 +Sets the divide ratio of Master Clock0 (clock output from +mclko[0] for the input clock selected by scksel0). +*/ +#define PS3_AUDIO_AO_MCTRL_MR0_MASK (0xf << 20) /* RWIVF */ +#define PS3_AUDIO_AO_MCTRL_MR0_DEFAULT (0x0 << 20) /* RWI-V */ +/* +System Clock Select 0/1 +Selects the system clock to be used as Master Clock 0/1 +Input the system clock that is appropriate for the sampling +rate. +*/ +#define PS3_AUDIO_AO_MCTRL_SCKSEL1_MASK (0x7 << 24) /* RWIVF */ +#define PS3_AUDIO_AO_MCTRL_SCKSEL1_DEFAULT (0x2 << 24) /* RWI-V */ + +#define PS3_AUDIO_AO_MCTRL_SCKSEL0_MASK (0x7 << 28) /* RWIVF */ +#define PS3_AUDIO_AO_MCTRL_SCKSEL0_DEFAULT (0x2 << 28) /* RWI-V */ + + +/* +3-Wire Audio Output Master Control Register +Configures clock, 3-Wire Audio Serial Output Enable, and +other 3-Wire Audio Serial Output Master Settings + + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |A|A|A|A|0 0 0|A| ASOSR |0 0 0 0|A|A|A|A|A|A|0|1|0 0 0 0 0 0 0 0| AO_3WMCTRL + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ +*/ + + +/* +LRCKO Polarity +0 - Reserved +1 - default +*/ +#define PS3_AUDIO_AO_3WMCTRL_ASOPLRCK (1 << 8) /* RWIVF */ +#define PS3_AUDIO_AO_3WMCTRL_ASOPLRCK_DEFAULT (1 << 8) /* RW--V */ + +/* LRCK Output Disable */ + +#define PS3_AUDIO_AO_3WMCTRL_ASOLRCKD (1 << 10) /* RWIVF */ +#define PS3_AUDIO_AO_3WMCTRL_ASOLRCKD_ENABLED (0 << 10) /* RW--V */ +#define PS3_AUDIO_AO_3WMCTRL_ASOLRCKD_DISABLED (1 << 10) /* RWI-V */ + +/* Bit Clock Output Disable */ + +#define PS3_AUDIO_AO_3WMCTRL_ASOBCLKD (1 << 11) /* RWIVF */ +#define PS3_AUDIO_AO_3WMCTRL_ASOBCLKD_ENABLED (0 << 11) /* RW--V */ +#define PS3_AUDIO_AO_3WMCTRL_ASOBCLKD_DISABLED (1 << 11) /* RWI-V */ + +/* +3-Wire Audio Serial Output Channel 0-3 Operational +Status. Each bit becomes 1 after each 3-Wire Audio +Serial Output Channel N is in action by setting 1 to +asoen. +Each bit becomes 0 after each 3-Wire Audio Serial Output +Channel N is out of action by setting 0 to asoen. +*/ +#define PS3_AUDIO_AO_3WMCTRL_ASORUN(n) (1 << (15 - (n))) /* R-IVF */ +#define PS3_AUDIO_AO_3WMCTRL_ASORUN_STOPPED(n) (0 << (15 - (n))) /* R-I-V */ +#define PS3_AUDIO_AO_3WMCTRL_ASORUN_RUNNING(n) (1 << (15 - (n))) /* R---V */ +#define PS3_AUDIO_AO_3WMCTRL_ASORUN0 \ + PS3_AUDIO_AO_3WMCTRL_ASORUN(0) +#define PS3_AUDIO_AO_3WMCTRL_ASORUN0_STOPPED \ + PS3_AUDIO_AO_3WMCTRL_ASORUN_STOPPED(0) +#define PS3_AUDIO_AO_3WMCTRL_ASORUN0_RUNNING \ + PS3_AUDIO_AO_3WMCTRL_ASORUN_RUNNING(0) +#define PS3_AUDIO_AO_3WMCTRL_ASORUN1 \ + PS3_AUDIO_AO_3WMCTRL_ASORUN(1) +#define PS3_AUDIO_AO_3WMCTRL_ASORUN1_STOPPED \ + PS3_AUDIO_AO_3WMCTRL_ASORUN_STOPPED(1) +#define PS3_AUDIO_AO_3WMCTRL_ASORUN1_RUNNING \ + PS3_AUDIO_AO_3WMCTRL_ASORUN_RUNNING(1) +#define PS3_AUDIO_AO_3WMCTRL_ASORUN2 \ + PS3_AUDIO_AO_3WMCTRL_ASORUN(2) +#define PS3_AUDIO_AO_3WMCTRL_ASORUN2_STOPPED \ + PS3_AUDIO_AO_3WMCTRL_ASORUN_STOPPED(2) +#define PS3_AUDIO_AO_3WMCTRL_ASORUN2_RUNNING \ + PS3_AUDIO_AO_3WMCTRL_ASORUN_RUNNING(2) +#define PS3_AUDIO_AO_3WMCTRL_ASORUN3 \ + PS3_AUDIO_AO_3WMCTRL_ASORUN(3) +#define PS3_AUDIO_AO_3WMCTRL_ASORUN3_STOPPED \ + PS3_AUDIO_AO_3WMCTRL_ASORUN_STOPPED(3) +#define PS3_AUDIO_AO_3WMCTRL_ASORUN3_RUNNING \ + PS3_AUDIO_AO_3WMCTRL_ASORUN_RUNNING(3) + +/* +Sampling Rate +Specifies the divide ratio of the bit clock (clock output +from bclko) used by the 3-wire Audio Output Clock, which +is applied to the master clock selected by mcksel. +Data output is synchronized with this clock. +*/ +#define PS3_AUDIO_AO_3WMCTRL_ASOSR_MASK (0xf << 20) /* RWIVF */ +#define PS3_AUDIO_AO_3WMCTRL_ASOSR_DIV2 (0x1 << 20) /* RWI-V */ +#define PS3_AUDIO_AO_3WMCTRL_ASOSR_DIV4 (0x2 << 20) /* RW--V */ +#define PS3_AUDIO_AO_3WMCTRL_ASOSR_DIV8 (0x4 << 20) /* RW--V */ +#define PS3_AUDIO_AO_3WMCTRL_ASOSR_DIV12 (0x6 << 20) /* RW--V */ + +/* +Master Clock Select +0 - Master Clock 0 +1 - Master Clock 1 +*/ +#define PS3_AUDIO_AO_3WMCTRL_ASOMCKSEL (1 << 24) /* RWIVF */ +#define PS3_AUDIO_AO_3WMCTRL_ASOMCKSEL_CLK0 (0 << 24) /* RWI-V */ +#define PS3_AUDIO_AO_3WMCTRL_ASOMCKSEL_CLK1 (1 << 24) /* RW--V */ + +/* +Enables and disables 4ch 3-Wire Audio Serial Output +operation. Each Bit from 0 to 3 corresponds to an +output channel, which means that each output channel +can be enabled or disabled individually. When +multiple channels are enabled at the same time, output +operations are performed in synchronization. +Bit 0 - Output Channel 0 (SDOUT[0]) +Bit 1 - Output Channel 1 (SDOUT[1]) +Bit 2 - Output Channel 2 (SDOUT[2]) +Bit 3 - Output Channel 3 (SDOUT[3]) +*/ +#define PS3_AUDIO_AO_3WMCTRL_ASOEN(n) (1 << (31 - (n))) /* RWIVF */ +#define PS3_AUDIO_AO_3WMCTRL_ASOEN_DISABLED(n) (0 << (31 - (n))) /* RWI-V */ +#define PS3_AUDIO_AO_3WMCTRL_ASOEN_ENABLED(n) (1 << (31 - (n))) /* RW--V */ + +#define PS3_AUDIO_AO_3WMCTRL_ASOEN0 \ + PS3_AUDIO_AO_3WMCTRL_ASOEN(0) /* RWIVF */ +#define PS3_AUDIO_AO_3WMCTRL_ASOEN0_DISABLED \ + PS3_AUDIO_AO_3WMCTRL_ASOEN_DISABLED(0) /* RWI-V */ +#define PS3_AUDIO_AO_3WMCTRL_ASOEN0_ENABLED \ + PS3_AUDIO_AO_3WMCTRL_ASOEN_ENABLED(0) /* RW--V */ +#define PS3_AUDIO_A1_3WMCTRL_ASOEN0 \ + PS3_AUDIO_AO_3WMCTRL_ASOEN(1) /* RWIVF */ +#define PS3_AUDIO_A1_3WMCTRL_ASOEN0_DISABLED \ + PS3_AUDIO_AO_3WMCTRL_ASOEN_DISABLED(1) /* RWI-V */ +#define PS3_AUDIO_A1_3WMCTRL_ASOEN0_ENABLED \ + PS3_AUDIO_AO_3WMCTRL_ASOEN_ENABLED(1) /* RW--V */ +#define PS3_AUDIO_A2_3WMCTRL_ASOEN0 \ + PS3_AUDIO_AO_3WMCTRL_ASOEN(2) /* RWIVF */ +#define PS3_AUDIO_A2_3WMCTRL_ASOEN0_DISABLED \ + PS3_AUDIO_AO_3WMCTRL_ASOEN_DISABLED(2) /* RWI-V */ +#define PS3_AUDIO_A2_3WMCTRL_ASOEN0_ENABLED \ + PS3_AUDIO_AO_3WMCTRL_ASOEN_ENABLED(2) /* RW--V */ +#define PS3_AUDIO_A3_3WMCTRL_ASOEN0 \ + PS3_AUDIO_AO_3WMCTRL_ASOEN(3) /* RWIVF */ +#define PS3_AUDIO_A3_3WMCTRL_ASOEN0_DISABLED \ + PS3_AUDIO_AO_3WMCTRL_ASOEN_DISABLED(3) /* RWI-V */ +#define PS3_AUDIO_A3_3WMCTRL_ASOEN0_ENABLED \ + PS3_AUDIO_AO_3WMCTRL_ASOEN_ENABLED(3) /* RW--V */ + +/* +3-Wire Audio Serial output Channel 0-3 Control Register +Configures settings for 3-Wire Serial Audio Output Channel 0-3 + + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|A|0 0 0 0|A|0|ASO|0 0 0|0|0|0|0|0| AO_3WCTRL + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + +*/ +/* +Data Bit Mode +Specifies the number of data bits +0 - 16 bits +1 - reserved +2 - 20 bits +3 - 24 bits +*/ +#define PS3_AUDIO_AO_3WCTRL_ASODB_MASK (0x3 << 8) /* RWIVF */ +#define PS3_AUDIO_AO_3WCTRL_ASODB_16BIT (0x0 << 8) /* RWI-V */ +#define PS3_AUDIO_AO_3WCTRL_ASODB_RESVD (0x1 << 8) /* RWI-V */ +#define PS3_AUDIO_AO_3WCTRL_ASODB_20BIT (0x2 << 8) /* RW--V */ +#define PS3_AUDIO_AO_3WCTRL_ASODB_24BIT (0x3 << 8) /* RW--V */ +/* +Data Format Mode +Specifies the data format where (LSB side or MSB) the data(in 20 bit +or 24 bit resolution mode) is put in a 32 bit field. +0 - Data put on LSB side +1 - Data put on MSB side +*/ +#define PS3_AUDIO_AO_3WCTRL_ASODF (1 << 11) /* RWIVF */ +#define PS3_AUDIO_AO_3WCTRL_ASODF_LSB (0 << 11) /* RWI-V */ +#define PS3_AUDIO_AO_3WCTRL_ASODF_MSB (1 << 11) /* RW--V */ +/* +Buffer Reset +Performs buffer reset. Writing 1 to this bit initializes the +corresponding 3-Wire Audio Output buffers(both L and R). +*/ +#define PS3_AUDIO_AO_3WCTRL_ASOBRST (1 << 16) /* CWIVF */ +#define PS3_AUDIO_AO_3WCTRL_ASOBRST_IDLE (0 << 16) /* -WI-V */ +#define PS3_AUDIO_AO_3WCTRL_ASOBRST_RESET (1 << 16) /* -W--T */ + +/* +S/PDIF Audio Output Channel 0/1 Control Register +Configures settings for S/PDIF Audio Output Channel 0/1. + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |S|0 0 0|S|0 0|S| SPOSR |0 0|SPO|0 0 0 0|S|0|SPO|0 0 0 0 0 0 0|S| AO_SPDCTRL + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ +*/ +/* +Buffer reset. Writing 1 to this bit initializes the +corresponding S/PDIF output buffer pointer. +*/ +#define PS3_AUDIO_AO_SPDCTRL_SPOBRST (1 << 0) /* CWIVF */ +#define PS3_AUDIO_AO_SPDCTRL_SPOBRST_IDLE (0 << 0) /* -WI-V */ +#define PS3_AUDIO_AO_SPDCTRL_SPOBRST_RESET (1 << 0) /* -W--T */ + +/* +Data Bit Mode +Specifies number of data bits +0 - 16 bits +1 - Reserved +2 - 20 bits +3 - 24 bits +*/ +#define PS3_AUDIO_AO_SPDCTRL_SPODB_MASK (0x3 << 8) /* RWIVF */ +#define PS3_AUDIO_AO_SPDCTRL_SPODB_16BIT (0x0 << 8) /* RWI-V */ +#define PS3_AUDIO_AO_SPDCTRL_SPODB_RESVD (0x1 << 8) /* RW--V */ +#define PS3_AUDIO_AO_SPDCTRL_SPODB_20BIT (0x2 << 8) /* RW--V */ +#define PS3_AUDIO_AO_SPDCTRL_SPODB_24BIT (0x3 << 8) /* RW--V */ +/* +Data format Mode +Specifies the data format, where (LSB side or MSB) +the data(in 20 or 24 bit resolution) is put in the +32 bit field. +0 - LSB Side +1 - MSB Side +*/ +#define PS3_AUDIO_AO_SPDCTRL_SPODF (1 << 11) /* RWIVF */ +#define PS3_AUDIO_AO_SPDCTRL_SPODF_LSB (0 << 11) /* RWI-V */ +#define PS3_AUDIO_AO_SPDCTRL_SPODF_MSB (1 << 11) /* RW--V */ +/* +Source Select +Specifies the source of the S/PDIF output. When 0, output +operation is controlled by 3wen[0] of AO_3WMCTRL register. +The SR must have the same setting as the a0_3wmctrl reg. +0 - 3-Wire Audio OUT Ch0 Buffer +1 - S/PDIF buffer +*/ +#define PS3_AUDIO_AO_SPDCTRL_SPOSS_MASK (0x3 << 16) /* RWIVF */ +#define PS3_AUDIO_AO_SPDCTRL_SPOSS_3WEN (0x0 << 16) /* RWI-V */ +#define PS3_AUDIO_AO_SPDCTRL_SPOSS_SPDIF (0x1 << 16) /* RW--V */ +/* +Sampling Rate +Specifies the divide ratio of the bit clock (clock output +from bclko) used by the S/PDIF Output Clock, which +is applied to the master clock selected by mcksel. +*/ +#define PS3_AUDIO_AO_SPDCTRL_SPOSR (0xf << 20) /* RWIVF */ +#define PS3_AUDIO_AO_SPDCTRL_SPOSR_DIV2 (0x1 << 20) /* RWI-V */ +#define PS3_AUDIO_AO_SPDCTRL_SPOSR_DIV4 (0x2 << 20) /* RW--V */ +#define PS3_AUDIO_AO_SPDCTRL_SPOSR_DIV8 (0x4 << 20) /* RW--V */ +#define PS3_AUDIO_AO_SPDCTRL_SPOSR_DIV12 (0x6 << 20) /* RW--V */ +/* +Master Clock Select +0 - Master Clock 0 +1 - Master Clock 1 +*/ +#define PS3_AUDIO_AO_SPDCTRL_SPOMCKSEL (1 << 24) /* RWIVF */ +#define PS3_AUDIO_AO_SPDCTRL_SPOMCKSEL_CLK0 (0 << 24) /* RWI-V */ +#define PS3_AUDIO_AO_SPDCTRL_SPOMCKSEL_CLK1 (1 << 24) /* RW--V */ + +/* +S/PDIF Output Channel Operational Status +This bit becomes 1 after S/PDIF Output Channel is in +action by setting 1 to spoen. This bit becomes 0 +after S/PDIF Output Channel is out of action by setting +0 to spoen. +*/ +#define PS3_AUDIO_AO_SPDCTRL_SPORUN (1 << 27) /* R-IVF */ +#define PS3_AUDIO_AO_SPDCTRL_SPORUN_STOPPED (0 << 27) /* R-I-V */ +#define PS3_AUDIO_AO_SPDCTRL_SPORUN_RUNNING (1 << 27) /* R---V */ + +/* +S/PDIF Audio Output Channel Output Enable +Enables and disables output operation. This bit is used +only when sposs = 1 +*/ +#define PS3_AUDIO_AO_SPDCTRL_SPOEN (1 << 31) /* RWIVF */ +#define PS3_AUDIO_AO_SPDCTRL_SPOEN_DISABLED (0 << 31) /* RWI-V */ +#define PS3_AUDIO_AO_SPDCTRL_SPOEN_ENABLED (1 << 31) /* RW--V */ + +/* +S/PDIF Audio Output Channel Channel Status +Setting Registers. +Configures channel status bit settings for each block +(192 bits). +Output is performed from the MSB(AO_SPDCS0 register bit 31). +The same value is added for subframes within the same frame. + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + | SPOCS | AO_SPDCS + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + +S/PDIF Audio Output Channel User Bit Setting +Configures user bit settings for each block (384 bits). +Output is performed from the MSB(ao_spdub0 register bit 31). + + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + | SPOUB | AO_SPDUB + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ +*/ +/***************************************************************************** + * + * DMAC register + * + *****************************************************************************/ +/* +The PS3_AUDIO_KICK register is used to initiate a DMA transfer and monitor +its status + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |0 0 0 0 0|STATU|0 0 0| EVENT |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0|R| KICK + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ +*/ +/* +The REQUEST field is written to ACTIVE to initiate a DMA request when EVENT +occurs. +It will return to the DONE state when the request is completed. +The registers for a DMA channel should only be written if REQUEST is IDLE. +*/ + +#define PS3_AUDIO_KICK_REQUEST (1 << 0) /* RWIVF */ +#define PS3_AUDIO_KICK_REQUEST_IDLE (0 << 0) /* RWI-V */ +#define PS3_AUDIO_KICK_REQUEST_ACTIVE (1 << 0) /* -W--T */ + +/* + *The EVENT field is used to set the event in which + *the DMA request becomes active. + */ +#define PS3_AUDIO_KICK_EVENT_MASK (0x1f << 16) /* RWIVF */ +#define PS3_AUDIO_KICK_EVENT_ALWAYS (0x00 << 16) /* RWI-V */ +#define PS3_AUDIO_KICK_EVENT_SERIALOUT0_EMPTY (0x01 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_SERIALOUT0_UNDERFLOW (0x02 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_SERIALOUT1_EMPTY (0x03 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_SERIALOUT1_UNDERFLOW (0x04 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_SERIALOUT2_EMPTY (0x05 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_SERIALOUT2_UNDERFLOW (0x06 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_SERIALOUT3_EMPTY (0x07 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_SERIALOUT3_UNDERFLOW (0x08 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_SPDIF0_BLOCKTRANSFERCOMPLETE \ + (0x09 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_SPDIF0_UNDERFLOW (0x0A << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_SPDIF0_EMPTY (0x0B << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_SPDIF1_BLOCKTRANSFERCOMPLETE \ + (0x0C << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_SPDIF1_UNDERFLOW (0x0D << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_SPDIF1_EMPTY (0x0E << 16) /* RW--V */ + +#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA(n) \ + ((0x13 + (n)) << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA0 (0x13 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA1 (0x14 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA2 (0x15 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA3 (0x16 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA4 (0x17 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA5 (0x18 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA6 (0x19 << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA7 (0x1A << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA8 (0x1B << 16) /* RW--V */ +#define PS3_AUDIO_KICK_EVENT_AUDIO_DMA9 (0x1C << 16) /* RW--V */ + +/* +The STATUS field can be used to monitor the progress of a DMA request. +DONE indicates the previous request has completed. +EVENT indicates that the DMA engine is waiting for the EVENT to occur. +PENDING indicates that the DMA engine has not started processing this +request, but the EVENT has occurred. +DMA indicates that the data transfer is in progress. +NOTIFY indicates that the notifier signalling end of transfer is being written. +CLEAR indicated that the previous transfer was cleared. +ERROR indicates the previous transfer requested an unsupported +source/destination combination. +*/ + +#define PS3_AUDIO_KICK_STATUS_MASK (0x7 << 24) /* R-IVF */ +#define PS3_AUDIO_KICK_STATUS_DONE (0x0 << 24) /* R-I-V */ +#define PS3_AUDIO_KICK_STATUS_EVENT (0x1 << 24) /* R---V */ +#define PS3_AUDIO_KICK_STATUS_PENDING (0x2 << 24) /* R---V */ +#define PS3_AUDIO_KICK_STATUS_DMA (0x3 << 24) /* R---V */ +#define PS3_AUDIO_KICK_STATUS_NOTIFY (0x4 << 24) /* R---V */ +#define PS3_AUDIO_KICK_STATUS_CLEAR (0x5 << 24) /* R---V */ +#define PS3_AUDIO_KICK_STATUS_ERROR (0x6 << 24) /* R---V */ + +/* +The PS3_AUDIO_SOURCE register specifies the source address for transfers. + + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + | START |0 0 0 0 0|TAR| SOURCE + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ +*/ + +/* +The Audio DMA engine uses 128-byte transfers, thus the address must be aligned +to a 128 byte boundary. The low seven bits are assumed to be 0. +*/ + +#define PS3_AUDIO_SOURCE_START_MASK (0x01FFFFFF << 7) /* RWIUF */ + +/* +The TARGET field specifies the memory space containing the source address. +*/ + +#define PS3_AUDIO_SOURCE_TARGET_MASK (3 << 0) /* RWIVF */ +#define PS3_AUDIO_SOURCE_TARGET_SYSTEM_MEMORY (2 << 0) /* RW--V */ + +/* +The PS3_AUDIO_DEST register specifies the destination address for transfers. + + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + | START |0 0 0 0 0|TAR| DEST + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ +*/ + +/* +The Audio DMA engine uses 128-byte transfers, thus the address must be aligned +to a 128 byte boundary. The low seven bits are assumed to be 0. +*/ + +#define PS3_AUDIO_DEST_START_MASK (0x01FFFFFF << 7) /* RWIUF */ + +/* +The TARGET field specifies the memory space containing the destination address +AUDIOFIFO = Audio WriteData FIFO, +*/ + +#define PS3_AUDIO_DEST_TARGET_MASK (3 << 0) /* RWIVF */ +#define PS3_AUDIO_DEST_TARGET_AUDIOFIFO (1 << 0) /* RW--V */ + +/* +PS3_AUDIO_DMASIZE specifies the number of 128-byte blocks + 1 to transfer. +So a value of 0 means 128-bytes will get transferred. + + + 31 24 23 16 15 8 7 0 + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ + |0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0| BLOCKS | DMASIZE + +-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-|-+-+-+-+-+-+-+-+ +*/ + + +#define PS3_AUDIO_DMASIZE_BLOCKS_MASK (0x7f << 0) /* RWIUF */ + +/* + * source/destination address for internal fifos + */ +#define PS3_AUDIO_AO_3W_LDATA(n) (0x1000 + (0x100 * (n))) +#define PS3_AUDIO_AO_3W_RDATA(n) (0x1080 + (0x100 * (n))) + +#define PS3_AUDIO_AO_SPD_DATA(n) (0x2000 + (0x400 * (n))) + + +/* + * field attiribute + * + * Read + * ' ' = Other Information + * '-' = Field is part of a write-only register + * 'C' = Value read is always the same, constant value line follows (C) + * 'R' = Value is read + * + * Write + * ' ' = Other Information + * '-' = Must not be written (D), value ignored when written (R,A,F) + * 'W' = Can be written + * + * Internal State + * ' ' = Other Information + * '-' = No internal state + * 'X' = Internal state, initial value is unknown + * 'I' = Internal state, initial value is known and follows (I) + * + * Declaration/Size + * ' ' = Other Information + * '-' = Does Not Apply + * 'V' = Type is void + * 'U' = Type is unsigned integer + * 'S' = Type is signed integer + * 'F' = Type is IEEE floating point + * '1' = Byte size (008) + * '2' = Short size (016) + * '3' = Three byte size (024) + * '4' = Word size (032) + * '8' = Double size (064) + * + * Define Indicator + * ' ' = Other Information + * 'D' = Device + * 'M' = Memory + * 'R' = Register + * 'A' = Array of Registers + * 'F' = Field + * 'V' = Value + * 'T' = Task + */ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/ppc/snd_ps3_reg.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/ppc/snd_ps3_reg.h.yml new file mode 100644 index 00000000000..9c596f2bd2d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/ppc/snd_ps3_reg.h.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2007 Sony Computer Entertainment Inc. + - Copyright 2006, 2007 Sony Corporation + - (c) R Value +holders: + - Sony Computer Entertainment Inc. + - Sony Corporation + - R Value diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/da7210.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/da7210.c new file mode 100644 index 00000000000..27adef90e77 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/da7210.c @@ -0,0 +1,1361 @@ +// SPDX-License-Identifier: GPL-2.0+ +// +// DA7210 ALSA Soc codec driver +// +// Copyright (c) 2009 Dialog Semiconductor +// Written by David Chen +// +// Copyright (C) 2009 Renesas Solutions Corp. +// Cleanups by Kuninori Morimoto +// +// Tested on SuperH Ecovec24 board with S16/S24 LE in 48KHz using I2S + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* DA7210 register space */ +#define DA7210_PAGE_CONTROL 0x00 +#define DA7210_CONTROL 0x01 +#define DA7210_STATUS 0x02 +#define DA7210_STARTUP1 0x03 +#define DA7210_STARTUP2 0x04 +#define DA7210_STARTUP3 0x05 +#define DA7210_MIC_L 0x07 +#define DA7210_MIC_R 0x08 +#define DA7210_AUX1_L 0x09 +#define DA7210_AUX1_R 0x0A +#define DA7210_AUX2 0x0B +#define DA7210_IN_GAIN 0x0C +#define DA7210_INMIX_L 0x0D +#define DA7210_INMIX_R 0x0E +#define DA7210_ADC_HPF 0x0F +#define DA7210_ADC 0x10 +#define DA7210_ADC_EQ1_2 0X11 +#define DA7210_ADC_EQ3_4 0x12 +#define DA7210_ADC_EQ5 0x13 +#define DA7210_DAC_HPF 0x14 +#define DA7210_DAC_L 0x15 +#define DA7210_DAC_R 0x16 +#define DA7210_DAC_SEL 0x17 +#define DA7210_SOFTMUTE 0x18 +#define DA7210_DAC_EQ1_2 0x19 +#define DA7210_DAC_EQ3_4 0x1A +#define DA7210_DAC_EQ5 0x1B +#define DA7210_OUTMIX_L 0x1C +#define DA7210_OUTMIX_R 0x1D +#define DA7210_OUT1_L 0x1E +#define DA7210_OUT1_R 0x1F +#define DA7210_OUT2 0x20 +#define DA7210_HP_L_VOL 0x21 +#define DA7210_HP_R_VOL 0x22 +#define DA7210_HP_CFG 0x23 +#define DA7210_ZERO_CROSS 0x24 +#define DA7210_DAI_SRC_SEL 0x25 +#define DA7210_DAI_CFG1 0x26 +#define DA7210_DAI_CFG3 0x28 +#define DA7210_PLL_DIV1 0x29 +#define DA7210_PLL_DIV2 0x2A +#define DA7210_PLL_DIV3 0x2B +#define DA7210_PLL 0x2C +#define DA7210_ALC_MAX 0x83 +#define DA7210_ALC_MIN 0x84 +#define DA7210_ALC_NOIS 0x85 +#define DA7210_ALC_ATT 0x86 +#define DA7210_ALC_REL 0x87 +#define DA7210_ALC_DEL 0x88 +#define DA7210_A_HID_UNLOCK 0x8A +#define DA7210_A_TEST_UNLOCK 0x8B +#define DA7210_A_PLL1 0x90 +#define DA7210_A_CP_MODE 0xA7 + +/* STARTUP1 bit fields */ +#define DA7210_SC_MST_EN (1 << 0) + +/* MIC_L bit fields */ +#define DA7210_MICBIAS_EN (1 << 6) +#define DA7210_MIC_L_EN (1 << 7) + +/* MIC_R bit fields */ +#define DA7210_MIC_R_EN (1 << 7) + +/* INMIX_L bit fields */ +#define DA7210_IN_L_EN (1 << 7) + +/* INMIX_R bit fields */ +#define DA7210_IN_R_EN (1 << 7) + +/* ADC bit fields */ +#define DA7210_ADC_ALC_EN (1 << 0) +#define DA7210_ADC_L_EN (1 << 3) +#define DA7210_ADC_R_EN (1 << 7) + +/* DAC/ADC HPF fields */ +#define DA7210_VOICE_F0_MASK (0x7 << 4) +#define DA7210_VOICE_F0_25 (1 << 4) +#define DA7210_VOICE_EN (1 << 7) + +/* DAC_SEL bit fields */ +#define DA7210_DAC_L_SRC_DAI_L (4 << 0) +#define DA7210_DAC_L_EN (1 << 3) +#define DA7210_DAC_R_SRC_DAI_R (5 << 4) +#define DA7210_DAC_R_EN (1 << 7) + +/* OUTMIX_L bit fields */ +#define DA7210_OUT_L_EN (1 << 7) + +/* OUTMIX_R bit fields */ +#define DA7210_OUT_R_EN (1 << 7) + +/* HP_CFG bit fields */ +#define DA7210_HP_2CAP_MODE (1 << 1) +#define DA7210_HP_SENSE_EN (1 << 2) +#define DA7210_HP_L_EN (1 << 3) +#define DA7210_HP_MODE (1 << 6) +#define DA7210_HP_R_EN (1 << 7) + +/* DAI_SRC_SEL bit fields */ +#define DA7210_DAI_OUT_L_SRC (6 << 0) +#define DA7210_DAI_OUT_R_SRC (7 << 4) + +/* DAI_CFG1 bit fields */ +#define DA7210_DAI_WORD_S16_LE (0 << 0) +#define DA7210_DAI_WORD_S20_3LE (1 << 0) +#define DA7210_DAI_WORD_S24_LE (2 << 0) +#define DA7210_DAI_WORD_S32_LE (3 << 0) +#define DA7210_DAI_FLEN_64BIT (1 << 2) +#define DA7210_DAI_MODE_SLAVE (0 << 7) +#define DA7210_DAI_MODE_MASTER (1 << 7) + +/* DAI_CFG3 bit fields */ +#define DA7210_DAI_FORMAT_I2SMODE (0 << 0) +#define DA7210_DAI_FORMAT_LEFT_J (1 << 0) +#define DA7210_DAI_FORMAT_RIGHT_J (2 << 0) +#define DA7210_DAI_OE (1 << 3) +#define DA7210_DAI_EN (1 << 7) + +/*PLL_DIV3 bit fields */ +#define DA7210_PLL_DIV_L_MASK (0xF << 0) +#define DA7210_MCLK_RANGE_10_20_MHZ (1 << 4) +#define DA7210_PLL_BYP (1 << 6) + +/* PLL bit fields */ +#define DA7210_PLL_FS_MASK (0xF << 0) +#define DA7210_PLL_FS_8000 (0x1 << 0) +#define DA7210_PLL_FS_11025 (0x2 << 0) +#define DA7210_PLL_FS_12000 (0x3 << 0) +#define DA7210_PLL_FS_16000 (0x5 << 0) +#define DA7210_PLL_FS_22050 (0x6 << 0) +#define DA7210_PLL_FS_24000 (0x7 << 0) +#define DA7210_PLL_FS_32000 (0x9 << 0) +#define DA7210_PLL_FS_44100 (0xA << 0) +#define DA7210_PLL_FS_48000 (0xB << 0) +#define DA7210_PLL_FS_88200 (0xE << 0) +#define DA7210_PLL_FS_96000 (0xF << 0) +#define DA7210_MCLK_DET_EN (0x1 << 5) +#define DA7210_MCLK_SRM_EN (0x1 << 6) +#define DA7210_PLL_EN (0x1 << 7) + +/* SOFTMUTE bit fields */ +#define DA7210_RAMP_EN (1 << 6) + +/* CONTROL bit fields */ +#define DA7210_REG_EN (1 << 0) +#define DA7210_BIAS_EN (1 << 2) +#define DA7210_NOISE_SUP_EN (1 << 3) + +/* IN_GAIN bit fields */ +#define DA7210_INPGA_L_VOL (0x0F << 0) +#define DA7210_INPGA_R_VOL (0xF0 << 0) + +/* ZERO_CROSS bit fields */ +#define DA7210_AUX1_L_ZC (1 << 0) +#define DA7210_AUX1_R_ZC (1 << 1) +#define DA7210_HP_L_ZC (1 << 6) +#define DA7210_HP_R_ZC (1 << 7) + +/* AUX1_L bit fields */ +#define DA7210_AUX1_L_VOL (0x3F << 0) +#define DA7210_AUX1_L_EN (1 << 7) + +/* AUX1_R bit fields */ +#define DA7210_AUX1_R_VOL (0x3F << 0) +#define DA7210_AUX1_R_EN (1 << 7) + +/* AUX2 bit fields */ +#define DA7210_AUX2_EN (1 << 3) + +/* Minimum INPGA and AUX1 volume to enable noise suppression */ +#define DA7210_INPGA_MIN_VOL_NS 0x0A /* 10.5dB */ +#define DA7210_AUX1_MIN_VOL_NS 0x35 /* 6dB */ + +/* OUT1_L bit fields */ +#define DA7210_OUT1_L_EN (1 << 7) + +/* OUT1_R bit fields */ +#define DA7210_OUT1_R_EN (1 << 7) + +/* OUT2 bit fields */ +#define DA7210_OUT2_OUTMIX_R (1 << 5) +#define DA7210_OUT2_OUTMIX_L (1 << 6) +#define DA7210_OUT2_EN (1 << 7) + +struct pll_div { + int fref; + int fout; + u8 div1; + u8 div2; + u8 div3; + u8 mode; /* 0 = slave, 1 = master */ +}; + +/* PLL dividers table */ +static const struct pll_div da7210_pll_div[] = { + /* for MASTER mode, fs = 44.1Khz */ + { 12000000, 2822400, 0xE8, 0x6C, 0x2, 1}, /* MCLK=12Mhz */ + { 13000000, 2822400, 0xDF, 0x28, 0xC, 1}, /* MCLK=13Mhz */ + { 13500000, 2822400, 0xDB, 0x0A, 0xD, 1}, /* MCLK=13.5Mhz */ + { 14400000, 2822400, 0xD4, 0x5A, 0x2, 1}, /* MCLK=14.4Mhz */ + { 19200000, 2822400, 0xBB, 0x43, 0x9, 1}, /* MCLK=19.2Mhz */ + { 19680000, 2822400, 0xB9, 0x6D, 0xA, 1}, /* MCLK=19.68Mhz */ + { 19800000, 2822400, 0xB8, 0xFB, 0xB, 1}, /* MCLK=19.8Mhz */ + /* for MASTER mode, fs = 48Khz */ + { 12000000, 3072000, 0xF3, 0x12, 0x7, 1}, /* MCLK=12Mhz */ + { 13000000, 3072000, 0xE8, 0xFD, 0x5, 1}, /* MCLK=13Mhz */ + { 13500000, 3072000, 0xE4, 0x82, 0x3, 1}, /* MCLK=13.5Mhz */ + { 14400000, 3072000, 0xDD, 0x3A, 0x0, 1}, /* MCLK=14.4Mhz */ + { 19200000, 3072000, 0xC1, 0xEB, 0x8, 1}, /* MCLK=19.2Mhz */ + { 19680000, 3072000, 0xBF, 0xEC, 0x0, 1}, /* MCLK=19.68Mhz */ + { 19800000, 3072000, 0xBF, 0x70, 0x0, 1}, /* MCLK=19.8Mhz */ + /* for SLAVE mode with SRM */ + { 12000000, 2822400, 0xED, 0xBF, 0x5, 0}, /* MCLK=12Mhz */ + { 13000000, 2822400, 0xE4, 0x13, 0x0, 0}, /* MCLK=13Mhz */ + { 13500000, 2822400, 0xDF, 0xC6, 0x8, 0}, /* MCLK=13.5Mhz */ + { 14400000, 2822400, 0xD8, 0xCA, 0x1, 0}, /* MCLK=14.4Mhz */ + { 19200000, 2822400, 0xBE, 0x97, 0x9, 0}, /* MCLK=19.2Mhz */ + { 19680000, 2822400, 0xBC, 0xAC, 0xD, 0}, /* MCLK=19.68Mhz */ + { 19800000, 2822400, 0xBC, 0x35, 0xE, 0}, /* MCLK=19.8Mhz */ +}; + +enum clk_src { + DA7210_CLKSRC_MCLK +}; + +#define DA7210_VERSION "0.0.1" + +/* + * Playback Volume + * + * max : 0x3F (+15.0 dB) + * (1.5 dB step) + * min : 0x11 (-54.0 dB) + * mute : 0x10 + * reserved : 0x00 - 0x0F + * + * Reserved area are considered as "mute". + */ +static const DECLARE_TLV_DB_RANGE(hp_out_tlv, + 0x0, 0x10, TLV_DB_SCALE_ITEM(TLV_DB_GAIN_MUTE, 0, 1), + /* -54 dB to +15 dB */ + 0x11, 0x3f, TLV_DB_SCALE_ITEM(-5400, 150, 0) +); + +static const DECLARE_TLV_DB_RANGE(lineout_vol_tlv, + 0x0, 0x10, TLV_DB_SCALE_ITEM(TLV_DB_GAIN_MUTE, 0, 1), + /* -54dB to 15dB */ + 0x11, 0x3f, TLV_DB_SCALE_ITEM(-5400, 150, 0) +); + +static const DECLARE_TLV_DB_RANGE(mono_vol_tlv, + 0x0, 0x2, TLV_DB_SCALE_ITEM(-1800, 0, 1), + /* -18dB to 6dB */ + 0x3, 0x7, TLV_DB_SCALE_ITEM(-1800, 600, 0) +); + +static const DECLARE_TLV_DB_RANGE(aux1_vol_tlv, + 0x0, 0x10, TLV_DB_SCALE_ITEM(TLV_DB_GAIN_MUTE, 0, 1), + /* -48dB to 21dB */ + 0x11, 0x3f, TLV_DB_SCALE_ITEM(-4800, 150, 0) +); + +static const DECLARE_TLV_DB_SCALE(eq_gain_tlv, -1050, 150, 0); +static const DECLARE_TLV_DB_SCALE(adc_eq_master_gain_tlv, -1800, 600, 1); +static const DECLARE_TLV_DB_SCALE(dac_gain_tlv, -7725, 75, 0); +static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, -600, 600, 0); +static const DECLARE_TLV_DB_SCALE(aux2_vol_tlv, -600, 600, 0); +static const DECLARE_TLV_DB_SCALE(inpga_gain_tlv, -450, 150, 0); + +/* ADC and DAC high pass filter f0 value */ +static const char * const da7210_hpf_cutoff_txt[] = { + "Fs/8192*pi", "Fs/4096*pi", "Fs/2048*pi", "Fs/1024*pi" +}; + +static SOC_ENUM_SINGLE_DECL(da7210_dac_hpf_cutoff, + DA7210_DAC_HPF, 0, da7210_hpf_cutoff_txt); + +static SOC_ENUM_SINGLE_DECL(da7210_adc_hpf_cutoff, + DA7210_ADC_HPF, 0, da7210_hpf_cutoff_txt); + +/* ADC and DAC voice (8kHz) high pass cutoff value */ +static const char * const da7210_vf_cutoff_txt[] = { + "2.5Hz", "25Hz", "50Hz", "100Hz", "150Hz", "200Hz", "300Hz", "400Hz" +}; + +static SOC_ENUM_SINGLE_DECL(da7210_dac_vf_cutoff, + DA7210_DAC_HPF, 4, da7210_vf_cutoff_txt); + +static SOC_ENUM_SINGLE_DECL(da7210_adc_vf_cutoff, + DA7210_ADC_HPF, 4, da7210_vf_cutoff_txt); + +static const char *da7210_hp_mode_txt[] = { + "Class H", "Class G" +}; + +static SOC_ENUM_SINGLE_DECL(da7210_hp_mode_sel, + DA7210_HP_CFG, 0, da7210_hp_mode_txt); + +/* ALC can be enabled only if noise suppression is disabled */ +static int da7210_put_alc_sw(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); + + if (ucontrol->value.integer.value[0]) { + /* Check if noise suppression is enabled */ + if (snd_soc_component_read32(component, DA7210_CONTROL) & DA7210_NOISE_SUP_EN) { + dev_dbg(component->dev, + "Disable noise suppression to enable ALC\n"); + return -EINVAL; + } + } + /* If all conditions are met or we are actually disabling ALC */ + return snd_soc_put_volsw(kcontrol, ucontrol); +} + +/* Noise suppression can be enabled only if following conditions are met + * ALC disabled + * ZC enabled for HP and AUX1 PGA + * INPGA_L_VOL and INPGA_R_VOL >= 10.5 dB + * AUX1_L_VOL and AUX1_R_VOL >= 6 dB + */ +static int da7210_put_noise_sup_sw(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); + u8 val; + + if (ucontrol->value.integer.value[0]) { + /* Check if ALC is enabled */ + if (snd_soc_component_read32(component, DA7210_ADC) & DA7210_ADC_ALC_EN) + goto err; + + /* Check ZC for HP and AUX1 PGA */ + if ((snd_soc_component_read32(component, DA7210_ZERO_CROSS) & + (DA7210_AUX1_L_ZC | DA7210_AUX1_R_ZC | DA7210_HP_L_ZC | + DA7210_HP_R_ZC)) != (DA7210_AUX1_L_ZC | + DA7210_AUX1_R_ZC | DA7210_HP_L_ZC | DA7210_HP_R_ZC)) + goto err; + + /* Check INPGA_L_VOL and INPGA_R_VOL */ + val = snd_soc_component_read32(component, DA7210_IN_GAIN); + if (((val & DA7210_INPGA_L_VOL) < DA7210_INPGA_MIN_VOL_NS) || + (((val & DA7210_INPGA_R_VOL) >> 4) < + DA7210_INPGA_MIN_VOL_NS)) + goto err; + + /* Check AUX1_L_VOL and AUX1_R_VOL */ + if (((snd_soc_component_read32(component, DA7210_AUX1_L) & DA7210_AUX1_L_VOL) < + DA7210_AUX1_MIN_VOL_NS) || + ((snd_soc_component_read32(component, DA7210_AUX1_R) & DA7210_AUX1_R_VOL) < + DA7210_AUX1_MIN_VOL_NS)) + goto err; + } + /* If all conditions are met or we are actually disabling Noise sup */ + return snd_soc_put_volsw(kcontrol, ucontrol); + +err: + return -EINVAL; +} + +static const struct snd_kcontrol_new da7210_snd_controls[] = { + + SOC_DOUBLE_R_TLV("HeadPhone Playback Volume", + DA7210_HP_L_VOL, DA7210_HP_R_VOL, + 0, 0x3F, 0, hp_out_tlv), + SOC_DOUBLE_R_TLV("Digital Playback Volume", + DA7210_DAC_L, DA7210_DAC_R, + 0, 0x77, 1, dac_gain_tlv), + SOC_DOUBLE_R_TLV("Lineout Playback Volume", + DA7210_OUT1_L, DA7210_OUT1_R, + 0, 0x3f, 0, lineout_vol_tlv), + SOC_SINGLE_TLV("Mono Playback Volume", DA7210_OUT2, 0, 0x7, 0, + mono_vol_tlv), + + SOC_DOUBLE_R_TLV("Mic Capture Volume", + DA7210_MIC_L, DA7210_MIC_R, + 0, 0x5, 0, mic_vol_tlv), + SOC_DOUBLE_R_TLV("Aux1 Capture Volume", + DA7210_AUX1_L, DA7210_AUX1_R, + 0, 0x3f, 0, aux1_vol_tlv), + SOC_SINGLE_TLV("Aux2 Capture Volume", DA7210_AUX2, 0, 0x3, 0, + aux2_vol_tlv), + SOC_DOUBLE_TLV("In PGA Capture Volume", DA7210_IN_GAIN, 0, 4, 0xF, 0, + inpga_gain_tlv), + + /* DAC Equalizer controls */ + SOC_SINGLE("DAC EQ Switch", DA7210_DAC_EQ5, 7, 1, 0), + SOC_SINGLE_TLV("DAC EQ1 Volume", DA7210_DAC_EQ1_2, 0, 0xf, 1, + eq_gain_tlv), + SOC_SINGLE_TLV("DAC EQ2 Volume", DA7210_DAC_EQ1_2, 4, 0xf, 1, + eq_gain_tlv), + SOC_SINGLE_TLV("DAC EQ3 Volume", DA7210_DAC_EQ3_4, 0, 0xf, 1, + eq_gain_tlv), + SOC_SINGLE_TLV("DAC EQ4 Volume", DA7210_DAC_EQ3_4, 4, 0xf, 1, + eq_gain_tlv), + SOC_SINGLE_TLV("DAC EQ5 Volume", DA7210_DAC_EQ5, 0, 0xf, 1, + eq_gain_tlv), + + /* ADC Equalizer controls */ + SOC_SINGLE("ADC EQ Switch", DA7210_ADC_EQ5, 7, 1, 0), + SOC_SINGLE_TLV("ADC EQ Master Volume", DA7210_ADC_EQ5, 4, 0x3, + 1, adc_eq_master_gain_tlv), + SOC_SINGLE_TLV("ADC EQ1 Volume", DA7210_ADC_EQ1_2, 0, 0xf, 1, + eq_gain_tlv), + SOC_SINGLE_TLV("ADC EQ2 Volume", DA7210_ADC_EQ1_2, 4, 0xf, 1, + eq_gain_tlv), + SOC_SINGLE_TLV("ADC EQ3 Volume", DA7210_ADC_EQ3_4, 0, 0xf, 1, + eq_gain_tlv), + SOC_SINGLE_TLV("ADC EQ4 Volume", DA7210_ADC_EQ3_4, 4, 0xf, 1, + eq_gain_tlv), + SOC_SINGLE_TLV("ADC EQ5 Volume", DA7210_ADC_EQ5, 0, 0xf, 1, + eq_gain_tlv), + + SOC_SINGLE("DAC HPF Switch", DA7210_DAC_HPF, 3, 1, 0), + SOC_ENUM("DAC HPF Cutoff", da7210_dac_hpf_cutoff), + SOC_SINGLE("DAC Voice Mode Switch", DA7210_DAC_HPF, 7, 1, 0), + SOC_ENUM("DAC Voice Cutoff", da7210_dac_vf_cutoff), + + SOC_SINGLE("ADC HPF Switch", DA7210_ADC_HPF, 3, 1, 0), + SOC_ENUM("ADC HPF Cutoff", da7210_adc_hpf_cutoff), + SOC_SINGLE("ADC Voice Mode Switch", DA7210_ADC_HPF, 7, 1, 0), + SOC_ENUM("ADC Voice Cutoff", da7210_adc_vf_cutoff), + + /* Mute controls */ + SOC_DOUBLE_R("Mic Capture Switch", DA7210_MIC_L, DA7210_MIC_R, 3, 1, 0), + SOC_SINGLE("Aux2 Capture Switch", DA7210_AUX2, 2, 1, 0), + SOC_DOUBLE("ADC Capture Switch", DA7210_ADC, 2, 6, 1, 0), + SOC_SINGLE("Digital Soft Mute Switch", DA7210_SOFTMUTE, 7, 1, 0), + SOC_SINGLE("Digital Soft Mute Rate", DA7210_SOFTMUTE, 0, 0x7, 0), + + /* Zero cross controls */ + SOC_DOUBLE("Aux1 ZC Switch", DA7210_ZERO_CROSS, 0, 1, 1, 0), + SOC_DOUBLE("In PGA ZC Switch", DA7210_ZERO_CROSS, 2, 3, 1, 0), + SOC_DOUBLE("Lineout ZC Switch", DA7210_ZERO_CROSS, 4, 5, 1, 0), + SOC_DOUBLE("Headphone ZC Switch", DA7210_ZERO_CROSS, 6, 7, 1, 0), + + SOC_ENUM("Headphone Class", da7210_hp_mode_sel), + + /* ALC controls */ + SOC_SINGLE_EXT("ALC Enable Switch", DA7210_ADC, 0, 1, 0, + snd_soc_get_volsw, da7210_put_alc_sw), + SOC_SINGLE("ALC Capture Max Volume", DA7210_ALC_MAX, 0, 0x3F, 0), + SOC_SINGLE("ALC Capture Min Volume", DA7210_ALC_MIN, 0, 0x3F, 0), + SOC_SINGLE("ALC Capture Noise Volume", DA7210_ALC_NOIS, 0, 0x3F, 0), + SOC_SINGLE("ALC Capture Attack Rate", DA7210_ALC_ATT, 0, 0xFF, 0), + SOC_SINGLE("ALC Capture Release Rate", DA7210_ALC_REL, 0, 0xFF, 0), + SOC_SINGLE("ALC Capture Release Delay", DA7210_ALC_DEL, 0, 0xFF, 0), + + SOC_SINGLE_EXT("Noise Suppression Enable Switch", DA7210_CONTROL, 3, 1, + 0, snd_soc_get_volsw, da7210_put_noise_sup_sw), +}; + +/* + * DAPM Controls + * + * Current DAPM implementation covers almost all codec components e.g. IOs, + * mixers, PGAs,ADC and DAC. + */ +/* In Mixer Left */ +static const struct snd_kcontrol_new da7210_dapm_inmixl_controls[] = { + SOC_DAPM_SINGLE("Mic Left Switch", DA7210_INMIX_L, 0, 1, 0), + SOC_DAPM_SINGLE("Mic Right Switch", DA7210_INMIX_L, 1, 1, 0), + SOC_DAPM_SINGLE("Aux1 Left Switch", DA7210_INMIX_L, 2, 1, 0), + SOC_DAPM_SINGLE("Aux2 Switch", DA7210_INMIX_L, 3, 1, 0), + SOC_DAPM_SINGLE("Outmix Left Switch", DA7210_INMIX_L, 4, 1, 0), +}; + +/* In Mixer Right */ +static const struct snd_kcontrol_new da7210_dapm_inmixr_controls[] = { + SOC_DAPM_SINGLE("Mic Right Switch", DA7210_INMIX_R, 0, 1, 0), + SOC_DAPM_SINGLE("Mic Left Switch", DA7210_INMIX_R, 1, 1, 0), + SOC_DAPM_SINGLE("Aux1 Right Switch", DA7210_INMIX_R, 2, 1, 0), + SOC_DAPM_SINGLE("Aux2 Switch", DA7210_INMIX_R, 3, 1, 0), + SOC_DAPM_SINGLE("Outmix Right Switch", DA7210_INMIX_R, 4, 1, 0), +}; + +/* Out Mixer Left */ +static const struct snd_kcontrol_new da7210_dapm_outmixl_controls[] = { + SOC_DAPM_SINGLE("Aux1 Left Switch", DA7210_OUTMIX_L, 0, 1, 0), + SOC_DAPM_SINGLE("Aux2 Switch", DA7210_OUTMIX_L, 1, 1, 0), + SOC_DAPM_SINGLE("INPGA Left Switch", DA7210_OUTMIX_L, 2, 1, 0), + SOC_DAPM_SINGLE("INPGA Right Switch", DA7210_OUTMIX_L, 3, 1, 0), + SOC_DAPM_SINGLE("DAC Left Switch", DA7210_OUTMIX_L, 4, 1, 0), +}; + +/* Out Mixer Right */ +static const struct snd_kcontrol_new da7210_dapm_outmixr_controls[] = { + SOC_DAPM_SINGLE("Aux1 Right Switch", DA7210_OUTMIX_R, 0, 1, 0), + SOC_DAPM_SINGLE("Aux2 Switch", DA7210_OUTMIX_R, 1, 1, 0), + SOC_DAPM_SINGLE("INPGA Left Switch", DA7210_OUTMIX_R, 2, 1, 0), + SOC_DAPM_SINGLE("INPGA Right Switch", DA7210_OUTMIX_R, 3, 1, 0), + SOC_DAPM_SINGLE("DAC Right Switch", DA7210_OUTMIX_R, 4, 1, 0), +}; + +/* Mono Mixer */ +static const struct snd_kcontrol_new da7210_dapm_monomix_controls[] = { + SOC_DAPM_SINGLE("INPGA Right Switch", DA7210_OUT2, 3, 1, 0), + SOC_DAPM_SINGLE("INPGA Left Switch", DA7210_OUT2, 4, 1, 0), + SOC_DAPM_SINGLE("Outmix Right Switch", DA7210_OUT2, 5, 1, 0), + SOC_DAPM_SINGLE("Outmix Left Switch", DA7210_OUT2, 6, 1, 0), +}; + +/* DAPM widgets */ +static const struct snd_soc_dapm_widget da7210_dapm_widgets[] = { + /* Input Side */ + /* Input Lines */ + SND_SOC_DAPM_INPUT("MICL"), + SND_SOC_DAPM_INPUT("MICR"), + SND_SOC_DAPM_INPUT("AUX1L"), + SND_SOC_DAPM_INPUT("AUX1R"), + SND_SOC_DAPM_INPUT("AUX2"), + + /* Input PGAs */ + SND_SOC_DAPM_PGA("Mic Left", DA7210_STARTUP3, 0, 1, NULL, 0), + SND_SOC_DAPM_PGA("Mic Right", DA7210_STARTUP3, 1, 1, NULL, 0), + SND_SOC_DAPM_PGA("Aux1 Left", DA7210_STARTUP3, 2, 1, NULL, 0), + SND_SOC_DAPM_PGA("Aux1 Right", DA7210_STARTUP3, 3, 1, NULL, 0), + SND_SOC_DAPM_PGA("Aux2 Mono", DA7210_STARTUP3, 4, 1, NULL, 0), + + SND_SOC_DAPM_PGA("INPGA Left", DA7210_INMIX_L, 7, 0, NULL, 0), + SND_SOC_DAPM_PGA("INPGA Right", DA7210_INMIX_R, 7, 0, NULL, 0), + + /* MICBIAS */ + SND_SOC_DAPM_SUPPLY("Mic Bias", DA7210_MIC_L, 6, 0, NULL, 0), + + /* Input Mixers */ + SND_SOC_DAPM_MIXER("In Mixer Left", SND_SOC_NOPM, 0, 0, + &da7210_dapm_inmixl_controls[0], + ARRAY_SIZE(da7210_dapm_inmixl_controls)), + + SND_SOC_DAPM_MIXER("In Mixer Right", SND_SOC_NOPM, 0, 0, + &da7210_dapm_inmixr_controls[0], + ARRAY_SIZE(da7210_dapm_inmixr_controls)), + + /* ADCs */ + SND_SOC_DAPM_ADC("ADC Left", "Capture", DA7210_STARTUP3, 5, 1), + SND_SOC_DAPM_ADC("ADC Right", "Capture", DA7210_STARTUP3, 6, 1), + + /* Output Side */ + /* DACs */ + SND_SOC_DAPM_DAC("DAC Left", "Playback", DA7210_STARTUP2, 5, 1), + SND_SOC_DAPM_DAC("DAC Right", "Playback", DA7210_STARTUP2, 6, 1), + + /* Output Mixers */ + SND_SOC_DAPM_MIXER("Out Mixer Left", SND_SOC_NOPM, 0, 0, + &da7210_dapm_outmixl_controls[0], + ARRAY_SIZE(da7210_dapm_outmixl_controls)), + + SND_SOC_DAPM_MIXER("Out Mixer Right", SND_SOC_NOPM, 0, 0, + &da7210_dapm_outmixr_controls[0], + ARRAY_SIZE(da7210_dapm_outmixr_controls)), + + SND_SOC_DAPM_MIXER("Mono Mixer", SND_SOC_NOPM, 0, 0, + &da7210_dapm_monomix_controls[0], + ARRAY_SIZE(da7210_dapm_monomix_controls)), + + /* Output PGAs */ + SND_SOC_DAPM_PGA("OUTPGA Left Enable", DA7210_OUTMIX_L, 7, 0, NULL, 0), + SND_SOC_DAPM_PGA("OUTPGA Right Enable", DA7210_OUTMIX_R, 7, 0, NULL, 0), + + SND_SOC_DAPM_PGA("Out1 Left", DA7210_STARTUP2, 0, 1, NULL, 0), + SND_SOC_DAPM_PGA("Out1 Right", DA7210_STARTUP2, 1, 1, NULL, 0), + SND_SOC_DAPM_PGA("Out2 Mono", DA7210_STARTUP2, 2, 1, NULL, 0), + SND_SOC_DAPM_PGA("Headphone Left", DA7210_STARTUP2, 3, 1, NULL, 0), + SND_SOC_DAPM_PGA("Headphone Right", DA7210_STARTUP2, 4, 1, NULL, 0), + + /* Output Lines */ + SND_SOC_DAPM_OUTPUT("OUT1L"), + SND_SOC_DAPM_OUTPUT("OUT1R"), + SND_SOC_DAPM_OUTPUT("HPL"), + SND_SOC_DAPM_OUTPUT("HPR"), + SND_SOC_DAPM_OUTPUT("OUT2"), +}; + +/* DAPM audio route definition */ +static const struct snd_soc_dapm_route da7210_audio_map[] = { + /* Dest Connecting Widget source */ + /* Input path */ + {"Mic Left", NULL, "MICL"}, + {"Mic Right", NULL, "MICR"}, + {"Aux1 Left", NULL, "AUX1L"}, + {"Aux1 Right", NULL, "AUX1R"}, + {"Aux2 Mono", NULL, "AUX2"}, + + {"In Mixer Left", "Mic Left Switch", "Mic Left"}, + {"In Mixer Left", "Mic Right Switch", "Mic Right"}, + {"In Mixer Left", "Aux1 Left Switch", "Aux1 Left"}, + {"In Mixer Left", "Aux2 Switch", "Aux2 Mono"}, + {"In Mixer Left", "Outmix Left Switch", "Out Mixer Left"}, + + {"In Mixer Right", "Mic Right Switch", "Mic Right"}, + {"In Mixer Right", "Mic Left Switch", "Mic Left"}, + {"In Mixer Right", "Aux1 Right Switch", "Aux1 Right"}, + {"In Mixer Right", "Aux2 Switch", "Aux2 Mono"}, + {"In Mixer Right", "Outmix Right Switch", "Out Mixer Right"}, + + {"INPGA Left", NULL, "In Mixer Left"}, + {"ADC Left", NULL, "INPGA Left"}, + + {"INPGA Right", NULL, "In Mixer Right"}, + {"ADC Right", NULL, "INPGA Right"}, + + /* Output path */ + {"Out Mixer Left", "Aux1 Left Switch", "Aux1 Left"}, + {"Out Mixer Left", "Aux2 Switch", "Aux2 Mono"}, + {"Out Mixer Left", "INPGA Left Switch", "INPGA Left"}, + {"Out Mixer Left", "INPGA Right Switch", "INPGA Right"}, + {"Out Mixer Left", "DAC Left Switch", "DAC Left"}, + + {"Out Mixer Right", "Aux1 Right Switch", "Aux1 Right"}, + {"Out Mixer Right", "Aux2 Switch", "Aux2 Mono"}, + {"Out Mixer Right", "INPGA Right Switch", "INPGA Right"}, + {"Out Mixer Right", "INPGA Left Switch", "INPGA Left"}, + {"Out Mixer Right", "DAC Right Switch", "DAC Right"}, + + {"Mono Mixer", "INPGA Right Switch", "INPGA Right"}, + {"Mono Mixer", "INPGA Left Switch", "INPGA Left"}, + {"Mono Mixer", "Outmix Right Switch", "Out Mixer Right"}, + {"Mono Mixer", "Outmix Left Switch", "Out Mixer Left"}, + + {"OUTPGA Left Enable", NULL, "Out Mixer Left"}, + {"OUTPGA Right Enable", NULL, "Out Mixer Right"}, + + {"Out1 Left", NULL, "OUTPGA Left Enable"}, + {"OUT1L", NULL, "Out1 Left"}, + + {"Out1 Right", NULL, "OUTPGA Right Enable"}, + {"OUT1R", NULL, "Out1 Right"}, + + {"Headphone Left", NULL, "OUTPGA Left Enable"}, + {"HPL", NULL, "Headphone Left"}, + + {"Headphone Right", NULL, "OUTPGA Right Enable"}, + {"HPR", NULL, "Headphone Right"}, + + {"Out2 Mono", NULL, "Mono Mixer"}, + {"OUT2", NULL, "Out2 Mono"}, +}; + +/* Codec private data */ +struct da7210_priv { + struct regmap *regmap; + unsigned int mclk_rate; + int master; +}; + +static const struct reg_default da7210_reg_defaults[] = { + { 0x00, 0x00 }, + { 0x01, 0x11 }, + { 0x03, 0x00 }, + { 0x04, 0x00 }, + { 0x05, 0x00 }, + { 0x06, 0x00 }, + { 0x07, 0x00 }, + { 0x08, 0x00 }, + { 0x09, 0x00 }, + { 0x0a, 0x00 }, + { 0x0b, 0x00 }, + { 0x0c, 0x00 }, + { 0x0d, 0x00 }, + { 0x0e, 0x00 }, + { 0x0f, 0x08 }, + { 0x10, 0x00 }, + { 0x11, 0x00 }, + { 0x12, 0x00 }, + { 0x13, 0x00 }, + { 0x14, 0x08 }, + { 0x15, 0x10 }, + { 0x16, 0x10 }, + { 0x17, 0x54 }, + { 0x18, 0x40 }, + { 0x19, 0x00 }, + { 0x1a, 0x00 }, + { 0x1b, 0x00 }, + { 0x1c, 0x00 }, + { 0x1d, 0x00 }, + { 0x1e, 0x00 }, + { 0x1f, 0x00 }, + { 0x20, 0x00 }, + { 0x21, 0x00 }, + { 0x22, 0x00 }, + { 0x23, 0x02 }, + { 0x24, 0x00 }, + { 0x25, 0x76 }, + { 0x26, 0x00 }, + { 0x27, 0x00 }, + { 0x28, 0x04 }, + { 0x29, 0x00 }, + { 0x2a, 0x00 }, + { 0x2b, 0x30 }, + { 0x2c, 0x2A }, + { 0x83, 0x00 }, + { 0x84, 0x00 }, + { 0x85, 0x00 }, + { 0x86, 0x00 }, + { 0x87, 0x00 }, + { 0x88, 0x00 }, +}; + +static bool da7210_readable_register(struct device *dev, unsigned int reg) +{ + switch (reg) { + case DA7210_A_HID_UNLOCK: + case DA7210_A_TEST_UNLOCK: + case DA7210_A_PLL1: + case DA7210_A_CP_MODE: + return false; + default: + return true; + } +} + +static bool da7210_volatile_register(struct device *dev, + unsigned int reg) +{ + switch (reg) { + case DA7210_STATUS: + return true; + default: + return false; + } +} + +/* + * Set PCM DAI word length. + */ +static int da7210_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params, + struct snd_soc_dai *dai) +{ + struct snd_soc_component *component = dai->component; + struct da7210_priv *da7210 = snd_soc_component_get_drvdata(component); + u32 dai_cfg1; + u32 fs, sysclk; + + /* set DAI source to Left and Right ADC */ + snd_soc_component_write(component, DA7210_DAI_SRC_SEL, + DA7210_DAI_OUT_R_SRC | DA7210_DAI_OUT_L_SRC); + + /* Enable DAI */ + snd_soc_component_write(component, DA7210_DAI_CFG3, DA7210_DAI_OE | DA7210_DAI_EN); + + dai_cfg1 = 0xFC & snd_soc_component_read32(component, DA7210_DAI_CFG1); + + switch (params_width(params)) { + case 16: + dai_cfg1 |= DA7210_DAI_WORD_S16_LE; + break; + case 20: + dai_cfg1 |= DA7210_DAI_WORD_S20_3LE; + break; + case 24: + dai_cfg1 |= DA7210_DAI_WORD_S24_LE; + break; + case 32: + dai_cfg1 |= DA7210_DAI_WORD_S32_LE; + break; + default: + return -EINVAL; + } + + snd_soc_component_write(component, DA7210_DAI_CFG1, dai_cfg1); + + switch (params_rate(params)) { + case 8000: + fs = DA7210_PLL_FS_8000; + sysclk = 3072000; + break; + case 11025: + fs = DA7210_PLL_FS_11025; + sysclk = 2822400; + break; + case 12000: + fs = DA7210_PLL_FS_12000; + sysclk = 3072000; + break; + case 16000: + fs = DA7210_PLL_FS_16000; + sysclk = 3072000; + break; + case 22050: + fs = DA7210_PLL_FS_22050; + sysclk = 2822400; + break; + case 32000: + fs = DA7210_PLL_FS_32000; + sysclk = 3072000; + break; + case 44100: + fs = DA7210_PLL_FS_44100; + sysclk = 2822400; + break; + case 48000: + fs = DA7210_PLL_FS_48000; + sysclk = 3072000; + break; + case 88200: + fs = DA7210_PLL_FS_88200; + sysclk = 2822400; + break; + case 96000: + fs = DA7210_PLL_FS_96000; + sysclk = 3072000; + break; + default: + return -EINVAL; + } + + /* Disable active mode */ + snd_soc_component_update_bits(component, DA7210_STARTUP1, DA7210_SC_MST_EN, 0); + + snd_soc_component_update_bits(component, DA7210_PLL, DA7210_PLL_FS_MASK, fs); + + if (da7210->mclk_rate && (da7210->mclk_rate != sysclk)) { + /* PLL mode, disable PLL bypass */ + snd_soc_component_update_bits(component, DA7210_PLL_DIV3, DA7210_PLL_BYP, 0); + + if (!da7210->master) { + /* PLL slave mode, also enable SRM */ + snd_soc_component_update_bits(component, DA7210_PLL, + (DA7210_MCLK_SRM_EN | + DA7210_MCLK_DET_EN), + (DA7210_MCLK_SRM_EN | + DA7210_MCLK_DET_EN)); + } + } else { + /* PLL bypass mode, enable PLL bypass and Auto Detection */ + snd_soc_component_update_bits(component, DA7210_PLL, DA7210_MCLK_DET_EN, + DA7210_MCLK_DET_EN); + snd_soc_component_update_bits(component, DA7210_PLL_DIV3, DA7210_PLL_BYP, + DA7210_PLL_BYP); + } + /* Enable active mode */ + snd_soc_component_update_bits(component, DA7210_STARTUP1, + DA7210_SC_MST_EN, DA7210_SC_MST_EN); + + return 0; +} + +/* + * Set DAI mode and Format + */ +static int da7210_set_dai_fmt(struct snd_soc_dai *codec_dai, u32 fmt) +{ + struct snd_soc_component *component = codec_dai->component; + struct da7210_priv *da7210 = snd_soc_component_get_drvdata(component); + u32 dai_cfg1; + u32 dai_cfg3; + + dai_cfg1 = 0x7f & snd_soc_component_read32(component, DA7210_DAI_CFG1); + dai_cfg3 = 0xfc & snd_soc_component_read32(component, DA7210_DAI_CFG3); + + if ((snd_soc_component_read32(component, DA7210_PLL) & DA7210_PLL_EN) && + (!(snd_soc_component_read32(component, DA7210_PLL_DIV3) & DA7210_PLL_BYP))) + return -EINVAL; + + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { + case SND_SOC_DAIFMT_CBM_CFM: + da7210->master = 1; + dai_cfg1 |= DA7210_DAI_MODE_MASTER; + break; + case SND_SOC_DAIFMT_CBS_CFS: + da7210->master = 0; + dai_cfg1 |= DA7210_DAI_MODE_SLAVE; + break; + default: + return -EINVAL; + } + + /* FIXME + * + * It support I2S only now + */ + switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_I2S: + dai_cfg3 |= DA7210_DAI_FORMAT_I2SMODE; + break; + case SND_SOC_DAIFMT_LEFT_J: + dai_cfg3 |= DA7210_DAI_FORMAT_LEFT_J; + break; + case SND_SOC_DAIFMT_RIGHT_J: + dai_cfg3 |= DA7210_DAI_FORMAT_RIGHT_J; + break; + default: + return -EINVAL; + } + + /* FIXME + * + * It support 64bit data transmission only now + */ + dai_cfg1 |= DA7210_DAI_FLEN_64BIT; + + snd_soc_component_write(component, DA7210_DAI_CFG1, dai_cfg1); + snd_soc_component_write(component, DA7210_DAI_CFG3, dai_cfg3); + + return 0; +} + +static int da7210_mute(struct snd_soc_dai *dai, int mute) +{ + struct snd_soc_component *component = dai->component; + u8 mute_reg = snd_soc_component_read32(component, DA7210_DAC_HPF) & 0xFB; + + if (mute) + snd_soc_component_write(component, DA7210_DAC_HPF, mute_reg | 0x4); + else + snd_soc_component_write(component, DA7210_DAC_HPF, mute_reg); + return 0; +} + +#define DA7210_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ + SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) + +static int da7210_set_dai_sysclk(struct snd_soc_dai *codec_dai, + int clk_id, unsigned int freq, int dir) +{ + struct snd_soc_component *component = codec_dai->component; + struct da7210_priv *da7210 = snd_soc_component_get_drvdata(component); + + switch (clk_id) { + case DA7210_CLKSRC_MCLK: + switch (freq) { + case 12000000: + case 13000000: + case 13500000: + case 14400000: + case 19200000: + case 19680000: + case 19800000: + da7210->mclk_rate = freq; + return 0; + default: + dev_err(codec_dai->dev, "Unsupported MCLK value %d\n", + freq); + return -EINVAL; + } + break; + default: + dev_err(codec_dai->dev, "Unknown clock source %d\n", clk_id); + return -EINVAL; + } +} + +/** + * da7210_set_dai_pll :Configure the codec PLL + * @param codec_dai : pointer to codec DAI + * @param pll_id : da7210 has only one pll, so pll_id is always zero + * @param fref : MCLK frequency, should be < 20MHz + * @param fout : FsDM value, Refer page 44 & 45 of datasheet + * @return int : Zero for success, negative error code for error + * + * Note: Supported PLL input frequencies are 12MHz, 13MHz, 13.5MHz, 14.4MHz, + * 19.2MHz, 19.6MHz and 19.8MHz + */ +static int da7210_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id, + int source, unsigned int fref, unsigned int fout) +{ + struct snd_soc_component *component = codec_dai->component; + struct da7210_priv *da7210 = snd_soc_component_get_drvdata(component); + + u8 pll_div1, pll_div2, pll_div3, cnt; + + /* In slave mode, there is only one set of divisors */ + if (!da7210->master) + fout = 2822400; + + /* Search pll div array for correct divisors */ + for (cnt = 0; cnt < ARRAY_SIZE(da7210_pll_div); cnt++) { + /* check fref, mode and fout */ + if ((fref == da7210_pll_div[cnt].fref) && + (da7210->master == da7210_pll_div[cnt].mode) && + (fout == da7210_pll_div[cnt].fout)) { + /* all match, pick up divisors */ + pll_div1 = da7210_pll_div[cnt].div1; + pll_div2 = da7210_pll_div[cnt].div2; + pll_div3 = da7210_pll_div[cnt].div3; + break; + } + } + if (cnt >= ARRAY_SIZE(da7210_pll_div)) + goto err; + + /* Disable active mode */ + snd_soc_component_update_bits(component, DA7210_STARTUP1, DA7210_SC_MST_EN, 0); + /* Write PLL dividers */ + snd_soc_component_write(component, DA7210_PLL_DIV1, pll_div1); + snd_soc_component_write(component, DA7210_PLL_DIV2, pll_div2); + snd_soc_component_update_bits(component, DA7210_PLL_DIV3, + DA7210_PLL_DIV_L_MASK, pll_div3); + + /* Enable PLL */ + snd_soc_component_update_bits(component, DA7210_PLL, DA7210_PLL_EN, DA7210_PLL_EN); + + /* Enable active mode */ + snd_soc_component_update_bits(component, DA7210_STARTUP1, DA7210_SC_MST_EN, + DA7210_SC_MST_EN); + return 0; +err: + dev_err(codec_dai->dev, "Unsupported PLL input frequency %d\n", fref); + return -EINVAL; +} + +/* DAI operations */ +static const struct snd_soc_dai_ops da7210_dai_ops = { + .hw_params = da7210_hw_params, + .set_fmt = da7210_set_dai_fmt, + .set_sysclk = da7210_set_dai_sysclk, + .set_pll = da7210_set_dai_pll, + .digital_mute = da7210_mute, +}; + +static struct snd_soc_dai_driver da7210_dai = { + .name = "da7210-hifi", + /* playback capabilities */ + .playback = { + .stream_name = "Playback", + .channels_min = 1, + .channels_max = 2, + .rates = SNDRV_PCM_RATE_8000_96000, + .formats = DA7210_FORMATS, + }, + /* capture capabilities */ + .capture = { + .stream_name = "Capture", + .channels_min = 1, + .channels_max = 2, + .rates = SNDRV_PCM_RATE_8000_96000, + .formats = DA7210_FORMATS, + }, + .ops = &da7210_dai_ops, + .symmetric_rates = 1, +}; + +static int da7210_probe(struct snd_soc_component *component) +{ + struct da7210_priv *da7210 = snd_soc_component_get_drvdata(component); + + dev_info(component->dev, "DA7210 Audio Codec %s\n", DA7210_VERSION); + + da7210->mclk_rate = 0; /* This will be set from set_sysclk() */ + da7210->master = 0; /* This will be set from set_fmt() */ + + /* Enable internal regulator & bias current */ + snd_soc_component_write(component, DA7210_CONTROL, DA7210_REG_EN | DA7210_BIAS_EN); + + /* + * ADC settings + */ + + /* Enable Left & Right MIC PGA and Mic Bias */ + snd_soc_component_write(component, DA7210_MIC_L, DA7210_MIC_L_EN | DA7210_MICBIAS_EN); + snd_soc_component_write(component, DA7210_MIC_R, DA7210_MIC_R_EN); + + /* Enable Left and Right input PGA */ + snd_soc_component_write(component, DA7210_INMIX_L, DA7210_IN_L_EN); + snd_soc_component_write(component, DA7210_INMIX_R, DA7210_IN_R_EN); + + /* Enable Left and Right ADC */ + snd_soc_component_write(component, DA7210_ADC, DA7210_ADC_L_EN | DA7210_ADC_R_EN); + + /* + * DAC settings + */ + + /* Enable Left and Right DAC */ + snd_soc_component_write(component, DA7210_DAC_SEL, + DA7210_DAC_L_SRC_DAI_L | DA7210_DAC_L_EN | + DA7210_DAC_R_SRC_DAI_R | DA7210_DAC_R_EN); + + /* Enable Left and Right out PGA */ + snd_soc_component_write(component, DA7210_OUTMIX_L, DA7210_OUT_L_EN); + snd_soc_component_write(component, DA7210_OUTMIX_R, DA7210_OUT_R_EN); + + /* Enable Left and Right HeadPhone PGA */ + snd_soc_component_write(component, DA7210_HP_CFG, + DA7210_HP_2CAP_MODE | DA7210_HP_SENSE_EN | + DA7210_HP_L_EN | DA7210_HP_MODE | DA7210_HP_R_EN); + + /* Enable ramp mode for DAC gain update */ + snd_soc_component_write(component, DA7210_SOFTMUTE, DA7210_RAMP_EN); + + /* + * For DA7210 codec, there are two ways to enable/disable analog IOs + * and ADC/DAC, + * (1) Using "Enable Bit" of register associated with that IO + * (or ADC/DAC) + * e.g. Mic Left can be enabled using bit 7 of MIC_L(0x7) reg + * + * (2) Using "Standby Bit" of STARTUP2 or STARTUP3 register + * e.g. Mic left can be put to STANDBY using bit 0 of STARTUP3(0x5) + * + * Out of these two methods, the one using STANDBY bits is preferred + * way to enable/disable individual blocks. This is because STANDBY + * registers are part of system controller which allows system power + * up/down in a controlled, pop-free manner. Also, as per application + * note of DA7210, STANDBY register bits are only effective if a + * particular IO (or ADC/DAC) is already enabled using enable/disable + * register bits. Keeping these things in mind, current DAPM + * implementation manipulates only STANDBY bits. + * + * Overall implementation can be outlined as below, + * + * - "Enable bit" of an IO or ADC/DAC is used to enable it in probe() + * - "STANDBY bit" is controlled by DAPM + */ + + /* Enable Line out amplifiers */ + snd_soc_component_write(component, DA7210_OUT1_L, DA7210_OUT1_L_EN); + snd_soc_component_write(component, DA7210_OUT1_R, DA7210_OUT1_R_EN); + snd_soc_component_write(component, DA7210_OUT2, DA7210_OUT2_EN | + DA7210_OUT2_OUTMIX_L | DA7210_OUT2_OUTMIX_R); + + /* Enable Aux1 */ + snd_soc_component_write(component, DA7210_AUX1_L, DA7210_AUX1_L_EN); + snd_soc_component_write(component, DA7210_AUX1_R, DA7210_AUX1_R_EN); + /* Enable Aux2 */ + snd_soc_component_write(component, DA7210_AUX2, DA7210_AUX2_EN); + + /* Set PLL Master clock range 10-20 MHz, enable PLL bypass */ + snd_soc_component_write(component, DA7210_PLL_DIV3, DA7210_MCLK_RANGE_10_20_MHZ | + DA7210_PLL_BYP); + + /* Diable PLL and bypass it */ + snd_soc_component_write(component, DA7210_PLL, DA7210_PLL_FS_48000); + + /* Activate all enabled subsystem */ + snd_soc_component_write(component, DA7210_STARTUP1, DA7210_SC_MST_EN); + + dev_info(component->dev, "DA7210 Audio Codec %s\n", DA7210_VERSION); + + return 0; +} + +static const struct snd_soc_component_driver soc_component_dev_da7210 = { + .probe = da7210_probe, + .controls = da7210_snd_controls, + .num_controls = ARRAY_SIZE(da7210_snd_controls), + .dapm_widgets = da7210_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(da7210_dapm_widgets), + .dapm_routes = da7210_audio_map, + .num_dapm_routes = ARRAY_SIZE(da7210_audio_map), + .idle_bias_on = 1, + .use_pmdown_time = 1, + .endianness = 1, + .non_legacy_dai_naming = 1, +}; + +#if IS_ENABLED(CONFIG_I2C) + +static const struct reg_sequence da7210_regmap_i2c_patch[] = { + + /* System controller master disable */ + { DA7210_STARTUP1, 0x00 }, + /* Set PLL Master clock range 10-20 MHz */ + { DA7210_PLL_DIV3, DA7210_MCLK_RANGE_10_20_MHZ }, + + /* to unlock */ + { DA7210_A_HID_UNLOCK, 0x8B}, + { DA7210_A_TEST_UNLOCK, 0xB4}, + { DA7210_A_PLL1, 0x01}, + { DA7210_A_CP_MODE, 0x7C}, + /* to re-lock */ + { DA7210_A_HID_UNLOCK, 0x00}, + { DA7210_A_TEST_UNLOCK, 0x00}, +}; + +static const struct regmap_config da7210_regmap_config_i2c = { + .reg_bits = 8, + .val_bits = 8, + + .reg_defaults = da7210_reg_defaults, + .num_reg_defaults = ARRAY_SIZE(da7210_reg_defaults), + .volatile_reg = da7210_volatile_register, + .readable_reg = da7210_readable_register, + .cache_type = REGCACHE_RBTREE, +}; + +static int da7210_i2c_probe(struct i2c_client *i2c, + const struct i2c_device_id *id) +{ + struct da7210_priv *da7210; + int ret; + + da7210 = devm_kzalloc(&i2c->dev, sizeof(struct da7210_priv), + GFP_KERNEL); + if (!da7210) + return -ENOMEM; + + i2c_set_clientdata(i2c, da7210); + + da7210->regmap = devm_regmap_init_i2c(i2c, &da7210_regmap_config_i2c); + if (IS_ERR(da7210->regmap)) { + ret = PTR_ERR(da7210->regmap); + dev_err(&i2c->dev, "regmap_init() failed: %d\n", ret); + return ret; + } + + ret = regmap_register_patch(da7210->regmap, da7210_regmap_i2c_patch, + ARRAY_SIZE(da7210_regmap_i2c_patch)); + if (ret != 0) + dev_warn(&i2c->dev, "Failed to apply regmap patch: %d\n", ret); + + ret = devm_snd_soc_register_component(&i2c->dev, + &soc_component_dev_da7210, &da7210_dai, 1); + if (ret < 0) + dev_err(&i2c->dev, "Failed to register component: %d\n", ret); + + return ret; +} + +static const struct i2c_device_id da7210_i2c_id[] = { + { "da7210", 0 }, + { } +}; +MODULE_DEVICE_TABLE(i2c, da7210_i2c_id); + +/* I2C codec control layer */ +static struct i2c_driver da7210_i2c_driver = { + .driver = { + .name = "da7210", + }, + .probe = da7210_i2c_probe, + .id_table = da7210_i2c_id, +}; +#endif + +#if defined(CONFIG_SPI_MASTER) + +static const struct reg_sequence da7210_regmap_spi_patch[] = { + /* Dummy read to give two pulses over nCS for SPI */ + { DA7210_AUX2, 0x00 }, + { DA7210_AUX2, 0x00 }, + + /* System controller master disable */ + { DA7210_STARTUP1, 0x00 }, + /* Set PLL Master clock range 10-20 MHz */ + { DA7210_PLL_DIV3, DA7210_MCLK_RANGE_10_20_MHZ }, + + /* to set PAGE1 of SPI register space */ + { DA7210_PAGE_CONTROL, 0x80 }, + /* to unlock */ + { DA7210_A_HID_UNLOCK, 0x8B}, + { DA7210_A_TEST_UNLOCK, 0xB4}, + { DA7210_A_PLL1, 0x01}, + { DA7210_A_CP_MODE, 0x7C}, + /* to re-lock */ + { DA7210_A_HID_UNLOCK, 0x00}, + { DA7210_A_TEST_UNLOCK, 0x00}, + /* to set back PAGE0 of SPI register space */ + { DA7210_PAGE_CONTROL, 0x00 }, +}; + +static const struct regmap_config da7210_regmap_config_spi = { + .reg_bits = 8, + .val_bits = 8, + .read_flag_mask = 0x01, + .write_flag_mask = 0x00, + + .reg_defaults = da7210_reg_defaults, + .num_reg_defaults = ARRAY_SIZE(da7210_reg_defaults), + .volatile_reg = da7210_volatile_register, + .readable_reg = da7210_readable_register, + .cache_type = REGCACHE_RBTREE, +}; + +static int da7210_spi_probe(struct spi_device *spi) +{ + struct da7210_priv *da7210; + int ret; + + da7210 = devm_kzalloc(&spi->dev, sizeof(struct da7210_priv), + GFP_KERNEL); + if (!da7210) + return -ENOMEM; + + spi_set_drvdata(spi, da7210); + da7210->regmap = devm_regmap_init_spi(spi, &da7210_regmap_config_spi); + if (IS_ERR(da7210->regmap)) { + ret = PTR_ERR(da7210->regmap); + dev_err(&spi->dev, "Failed to register regmap: %d\n", ret); + return ret; + } + + ret = regmap_register_patch(da7210->regmap, da7210_regmap_spi_patch, + ARRAY_SIZE(da7210_regmap_spi_patch)); + if (ret != 0) + dev_warn(&spi->dev, "Failed to apply regmap patch: %d\n", ret); + + ret = devm_snd_soc_register_component(&spi->dev, + &soc_component_dev_da7210, &da7210_dai, 1); + + return ret; +} + +static struct spi_driver da7210_spi_driver = { + .driver = { + .name = "da7210", + }, + .probe = da7210_spi_probe, +}; +#endif + +static int __init da7210_modinit(void) +{ + int ret = 0; +#if IS_ENABLED(CONFIG_I2C) + ret = i2c_add_driver(&da7210_i2c_driver); +#endif +#if defined(CONFIG_SPI_MASTER) + ret = spi_register_driver(&da7210_spi_driver); + if (ret) { + printk(KERN_ERR "Failed to register da7210 SPI driver: %d\n", + ret); + } +#endif + return ret; +} +module_init(da7210_modinit); + +static void __exit da7210_exit(void) +{ +#if IS_ENABLED(CONFIG_I2C) + i2c_del_driver(&da7210_i2c_driver); +#endif +#if defined(CONFIG_SPI_MASTER) + spi_unregister_driver(&da7210_spi_driver); +#endif +} +module_exit(da7210_exit); + +MODULE_DESCRIPTION("ASoC DA7210 driver"); +MODULE_AUTHOR("David Chen, Kuninori Morimoto"); +MODULE_LICENSE("GPL"); \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/da7210.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/da7210.c.yml new file mode 100644 index 00000000000..5228c70d8c2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/da7210.c.yml @@ -0,0 +1,13 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2009 Dialog Semiconductor + - Copyright (c) 2009 Renesas Solutions Corp. Cleanups +holders: + - Dialog Semiconductor + - Renesas Solutions Corp. Cleanups +authors: + - David Chen + - Kuninori Morimoto diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/max98373.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/max98373.c new file mode 100644 index 00000000000..a62cf489e8f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/max98373.c @@ -0,0 +1,973 @@ +// SPDX-License-Identifier: GPL-2.0 +// Copyright (c) 2017, Maxim Integrated + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "max98373.h" + +static struct reg_default max98373_reg[] = { + {MAX98373_R2000_SW_RESET, 0x00}, + {MAX98373_R2001_INT_RAW1, 0x00}, + {MAX98373_R2002_INT_RAW2, 0x00}, + {MAX98373_R2003_INT_RAW3, 0x00}, + {MAX98373_R2004_INT_STATE1, 0x00}, + {MAX98373_R2005_INT_STATE2, 0x00}, + {MAX98373_R2006_INT_STATE3, 0x00}, + {MAX98373_R2007_INT_FLAG1, 0x00}, + {MAX98373_R2008_INT_FLAG2, 0x00}, + {MAX98373_R2009_INT_FLAG3, 0x00}, + {MAX98373_R200A_INT_EN1, 0x00}, + {MAX98373_R200B_INT_EN2, 0x00}, + {MAX98373_R200C_INT_EN3, 0x00}, + {MAX98373_R200D_INT_FLAG_CLR1, 0x00}, + {MAX98373_R200E_INT_FLAG_CLR2, 0x00}, + {MAX98373_R200F_INT_FLAG_CLR3, 0x00}, + {MAX98373_R2010_IRQ_CTRL, 0x00}, + {MAX98373_R2014_THERM_WARN_THRESH, 0x10}, + {MAX98373_R2015_THERM_SHDN_THRESH, 0x27}, + {MAX98373_R2016_THERM_HYSTERESIS, 0x01}, + {MAX98373_R2017_THERM_FOLDBACK_SET, 0xC0}, + {MAX98373_R2018_THERM_FOLDBACK_EN, 0x00}, + {MAX98373_R201E_PIN_DRIVE_STRENGTH, 0x55}, + {MAX98373_R2020_PCM_TX_HIZ_EN_1, 0xFE}, + {MAX98373_R2021_PCM_TX_HIZ_EN_2, 0xFF}, + {MAX98373_R2022_PCM_TX_SRC_1, 0x00}, + {MAX98373_R2023_PCM_TX_SRC_2, 0x00}, + {MAX98373_R2024_PCM_DATA_FMT_CFG, 0xC0}, + {MAX98373_R2025_AUDIO_IF_MODE, 0x00}, + {MAX98373_R2026_PCM_CLOCK_RATIO, 0x04}, + {MAX98373_R2027_PCM_SR_SETUP_1, 0x08}, + {MAX98373_R2028_PCM_SR_SETUP_2, 0x88}, + {MAX98373_R2029_PCM_TO_SPK_MONO_MIX_1, 0x00}, + {MAX98373_R202A_PCM_TO_SPK_MONO_MIX_2, 0x00}, + {MAX98373_R202B_PCM_RX_EN, 0x00}, + {MAX98373_R202C_PCM_TX_EN, 0x00}, + {MAX98373_R202E_ICC_RX_CH_EN_1, 0x00}, + {MAX98373_R202F_ICC_RX_CH_EN_2, 0x00}, + {MAX98373_R2030_ICC_TX_HIZ_EN_1, 0xFF}, + {MAX98373_R2031_ICC_TX_HIZ_EN_2, 0xFF}, + {MAX98373_R2032_ICC_LINK_EN_CFG, 0x30}, + {MAX98373_R2034_ICC_TX_CNTL, 0x00}, + {MAX98373_R2035_ICC_TX_EN, 0x00}, + {MAX98373_R2036_SOUNDWIRE_CTRL, 0x05}, + {MAX98373_R203D_AMP_DIG_VOL_CTRL, 0x00}, + {MAX98373_R203E_AMP_PATH_GAIN, 0x08}, + {MAX98373_R203F_AMP_DSP_CFG, 0x02}, + {MAX98373_R2040_TONE_GEN_CFG, 0x00}, + {MAX98373_R2041_AMP_CFG, 0x03}, + {MAX98373_R2042_AMP_EDGE_RATE_CFG, 0x00}, + {MAX98373_R2043_AMP_EN, 0x00}, + {MAX98373_R2046_IV_SENSE_ADC_DSP_CFG, 0x04}, + {MAX98373_R2047_IV_SENSE_ADC_EN, 0x00}, + {MAX98373_R2051_MEAS_ADC_SAMPLING_RATE, 0x00}, + {MAX98373_R2052_MEAS_ADC_PVDD_FLT_CFG, 0x00}, + {MAX98373_R2053_MEAS_ADC_THERM_FLT_CFG, 0x00}, + {MAX98373_R2054_MEAS_ADC_PVDD_CH_READBACK, 0x00}, + {MAX98373_R2055_MEAS_ADC_THERM_CH_READBACK, 0x00}, + {MAX98373_R2056_MEAS_ADC_PVDD_CH_EN, 0x00}, + {MAX98373_R2090_BDE_LVL_HOLD, 0x00}, + {MAX98373_R2091_BDE_GAIN_ATK_REL_RATE, 0x00}, + {MAX98373_R2092_BDE_CLIPPER_MODE, 0x00}, + {MAX98373_R2097_BDE_L1_THRESH, 0x00}, + {MAX98373_R2098_BDE_L2_THRESH, 0x00}, + {MAX98373_R2099_BDE_L3_THRESH, 0x00}, + {MAX98373_R209A_BDE_L4_THRESH, 0x00}, + {MAX98373_R209B_BDE_THRESH_HYST, 0x00}, + {MAX98373_R20A8_BDE_L1_CFG_1, 0x00}, + {MAX98373_R20A9_BDE_L1_CFG_2, 0x00}, + {MAX98373_R20AA_BDE_L1_CFG_3, 0x00}, + {MAX98373_R20AB_BDE_L2_CFG_1, 0x00}, + {MAX98373_R20AC_BDE_L2_CFG_2, 0x00}, + {MAX98373_R20AD_BDE_L2_CFG_3, 0x00}, + {MAX98373_R20AE_BDE_L3_CFG_1, 0x00}, + {MAX98373_R20AF_BDE_L3_CFG_2, 0x00}, + {MAX98373_R20B0_BDE_L3_CFG_3, 0x00}, + {MAX98373_R20B1_BDE_L4_CFG_1, 0x00}, + {MAX98373_R20B2_BDE_L4_CFG_2, 0x00}, + {MAX98373_R20B3_BDE_L4_CFG_3, 0x00}, + {MAX98373_R20B4_BDE_INFINITE_HOLD_RELEASE, 0x00}, + {MAX98373_R20B5_BDE_EN, 0x00}, + {MAX98373_R20B6_BDE_CUR_STATE_READBACK, 0x00}, + {MAX98373_R20D1_DHT_CFG, 0x01}, + {MAX98373_R20D2_DHT_ATTACK_CFG, 0x02}, + {MAX98373_R20D3_DHT_RELEASE_CFG, 0x03}, + {MAX98373_R20D4_DHT_EN, 0x00}, + {MAX98373_R20E0_LIMITER_THRESH_CFG, 0x00}, + {MAX98373_R20E1_LIMITER_ATK_REL_RATES, 0x00}, + {MAX98373_R20E2_LIMITER_EN, 0x00}, + {MAX98373_R20FE_DEVICE_AUTO_RESTART_CFG, 0x00}, + {MAX98373_R20FF_GLOBAL_SHDN, 0x00}, + {MAX98373_R21FF_REV_ID, 0x42}, +}; + +static int max98373_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) +{ + struct snd_soc_component *component = codec_dai->component; + struct max98373_priv *max98373 = snd_soc_component_get_drvdata(component); + unsigned int format = 0; + unsigned int invert = 0; + + dev_dbg(component->dev, "%s: fmt 0x%08X\n", __func__, fmt); + + switch (fmt & SND_SOC_DAIFMT_INV_MASK) { + case SND_SOC_DAIFMT_NB_NF: + break; + case SND_SOC_DAIFMT_IB_NF: + invert = MAX98373_PCM_MODE_CFG_PCM_BCLKEDGE; + break; + default: + dev_err(component->dev, "DAI invert mode unsupported\n"); + return -EINVAL; + } + + regmap_update_bits(max98373->regmap, + MAX98373_R2026_PCM_CLOCK_RATIO, + MAX98373_PCM_MODE_CFG_PCM_BCLKEDGE, + invert); + + /* interface format */ + switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_I2S: + format = MAX98373_PCM_FORMAT_I2S; + break; + case SND_SOC_DAIFMT_LEFT_J: + format = MAX98373_PCM_FORMAT_LJ; + break; + case SND_SOC_DAIFMT_DSP_A: + format = MAX98373_PCM_FORMAT_TDM_MODE1; + break; + case SND_SOC_DAIFMT_DSP_B: + format = MAX98373_PCM_FORMAT_TDM_MODE0; + break; + default: + return -EINVAL; + } + + regmap_update_bits(max98373->regmap, + MAX98373_R2024_PCM_DATA_FMT_CFG, + MAX98373_PCM_MODE_CFG_FORMAT_MASK, + format << MAX98373_PCM_MODE_CFG_FORMAT_SHIFT); + + return 0; +} + +/* BCLKs per LRCLK */ +static const int bclk_sel_table[] = { + 32, 48, 64, 96, 128, 192, 256, 384, 512, 320, +}; + +static int max98373_get_bclk_sel(int bclk) +{ + int i; + /* match BCLKs per LRCLK */ + for (i = 0; i < ARRAY_SIZE(bclk_sel_table); i++) { + if (bclk_sel_table[i] == bclk) + return i + 2; + } + return 0; +} + +static int max98373_set_clock(struct snd_soc_component *component, + struct snd_pcm_hw_params *params) +{ + struct max98373_priv *max98373 = snd_soc_component_get_drvdata(component); + /* BCLK/LRCLK ratio calculation */ + int blr_clk_ratio = params_channels(params) * max98373->ch_size; + int value; + + if (!max98373->tdm_mode) { + /* BCLK configuration */ + value = max98373_get_bclk_sel(blr_clk_ratio); + if (!value) { + dev_err(component->dev, "format unsupported %d\n", + params_format(params)); + return -EINVAL; + } + + regmap_update_bits(max98373->regmap, + MAX98373_R2026_PCM_CLOCK_RATIO, + MAX98373_PCM_CLK_SETUP_BSEL_MASK, + value); + } + return 0; +} + +static int max98373_dai_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params, + struct snd_soc_dai *dai) +{ + struct snd_soc_component *component = dai->component; + struct max98373_priv *max98373 = snd_soc_component_get_drvdata(component); + unsigned int sampling_rate = 0; + unsigned int chan_sz = 0; + + /* pcm mode configuration */ + switch (snd_pcm_format_width(params_format(params))) { + case 16: + chan_sz = MAX98373_PCM_MODE_CFG_CHANSZ_16; + break; + case 24: + chan_sz = MAX98373_PCM_MODE_CFG_CHANSZ_24; + break; + case 32: + chan_sz = MAX98373_PCM_MODE_CFG_CHANSZ_32; + break; + default: + dev_err(component->dev, "format unsupported %d\n", + params_format(params)); + goto err; + } + + max98373->ch_size = snd_pcm_format_width(params_format(params)); + + regmap_update_bits(max98373->regmap, + MAX98373_R2024_PCM_DATA_FMT_CFG, + MAX98373_PCM_MODE_CFG_CHANSZ_MASK, chan_sz); + + dev_dbg(component->dev, "format supported %d", + params_format(params)); + + /* sampling rate configuration */ + switch (params_rate(params)) { + case 8000: + sampling_rate = MAX98373_PCM_SR_SET1_SR_8000; + break; + case 11025: + sampling_rate = MAX98373_PCM_SR_SET1_SR_11025; + break; + case 12000: + sampling_rate = MAX98373_PCM_SR_SET1_SR_12000; + break; + case 16000: + sampling_rate = MAX98373_PCM_SR_SET1_SR_16000; + break; + case 22050: + sampling_rate = MAX98373_PCM_SR_SET1_SR_22050; + break; + case 24000: + sampling_rate = MAX98373_PCM_SR_SET1_SR_24000; + break; + case 32000: + sampling_rate = MAX98373_PCM_SR_SET1_SR_32000; + break; + case 44100: + sampling_rate = MAX98373_PCM_SR_SET1_SR_44100; + break; + case 48000: + sampling_rate = MAX98373_PCM_SR_SET1_SR_48000; + break; + default: + dev_err(component->dev, "rate %d not supported\n", + params_rate(params)); + goto err; + } + + /* set DAI_SR to correct LRCLK frequency */ + regmap_update_bits(max98373->regmap, + MAX98373_R2027_PCM_SR_SETUP_1, + MAX98373_PCM_SR_SET1_SR_MASK, + sampling_rate); + regmap_update_bits(max98373->regmap, + MAX98373_R2028_PCM_SR_SETUP_2, + MAX98373_PCM_SR_SET2_SR_MASK, + sampling_rate << MAX98373_PCM_SR_SET2_SR_SHIFT); + + /* set sampling rate of IV */ + if (max98373->interleave_mode && + sampling_rate > MAX98373_PCM_SR_SET1_SR_16000) + regmap_update_bits(max98373->regmap, + MAX98373_R2028_PCM_SR_SETUP_2, + MAX98373_PCM_SR_SET2_IVADC_SR_MASK, + sampling_rate - 3); + else + regmap_update_bits(max98373->regmap, + MAX98373_R2028_PCM_SR_SETUP_2, + MAX98373_PCM_SR_SET2_IVADC_SR_MASK, + sampling_rate); + + return max98373_set_clock(component, params); +err: + return -EINVAL; +} + +static int max98373_dai_tdm_slot(struct snd_soc_dai *dai, + unsigned int tx_mask, unsigned int rx_mask, + int slots, int slot_width) +{ + struct snd_soc_component *component = dai->component; + struct max98373_priv *max98373 = snd_soc_component_get_drvdata(component); + int bsel = 0; + unsigned int chan_sz = 0; + unsigned int mask; + int x, slot_found; + + if (!tx_mask && !rx_mask && !slots && !slot_width) + max98373->tdm_mode = false; + else + max98373->tdm_mode = true; + + /* BCLK configuration */ + bsel = max98373_get_bclk_sel(slots * slot_width); + if (bsel == 0) { + dev_err(component->dev, "BCLK %d not supported\n", + slots * slot_width); + return -EINVAL; + } + + regmap_update_bits(max98373->regmap, + MAX98373_R2026_PCM_CLOCK_RATIO, + MAX98373_PCM_CLK_SETUP_BSEL_MASK, + bsel); + + /* Channel size configuration */ + switch (slot_width) { + case 16: + chan_sz = MAX98373_PCM_MODE_CFG_CHANSZ_16; + break; + case 24: + chan_sz = MAX98373_PCM_MODE_CFG_CHANSZ_24; + break; + case 32: + chan_sz = MAX98373_PCM_MODE_CFG_CHANSZ_32; + break; + default: + dev_err(component->dev, "format unsupported %d\n", + slot_width); + return -EINVAL; + } + + regmap_update_bits(max98373->regmap, + MAX98373_R2024_PCM_DATA_FMT_CFG, + MAX98373_PCM_MODE_CFG_CHANSZ_MASK, chan_sz); + + /* Rx slot configuration */ + slot_found = 0; + mask = rx_mask; + for (x = 0 ; x < 16 ; x++, mask >>= 1) { + if (mask & 0x1) { + if (slot_found == 0) + regmap_update_bits(max98373->regmap, + MAX98373_R2029_PCM_TO_SPK_MONO_MIX_1, + MAX98373_PCM_TO_SPK_CH0_SRC_MASK, x); + else + regmap_write(max98373->regmap, + MAX98373_R202A_PCM_TO_SPK_MONO_MIX_2, + x); + slot_found++; + if (slot_found > 1) + break; + } + } + + /* Tx slot Hi-Z configuration */ + regmap_write(max98373->regmap, + MAX98373_R2020_PCM_TX_HIZ_EN_1, + ~tx_mask & 0xFF); + regmap_write(max98373->regmap, + MAX98373_R2021_PCM_TX_HIZ_EN_2, + (~tx_mask & 0xFF00) >> 8); + + return 0; +} + +#define MAX98373_RATES SNDRV_PCM_RATE_8000_96000 + +#define MAX98373_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ + SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) + +static const struct snd_soc_dai_ops max98373_dai_ops = { + .set_fmt = max98373_dai_set_fmt, + .hw_params = max98373_dai_hw_params, + .set_tdm_slot = max98373_dai_tdm_slot, +}; + +static int max98373_dac_event(struct snd_soc_dapm_widget *w, + struct snd_kcontrol *kcontrol, int event) +{ + struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); + struct max98373_priv *max98373 = snd_soc_component_get_drvdata(component); + + switch (event) { + case SND_SOC_DAPM_POST_PMU: + regmap_update_bits(max98373->regmap, + MAX98373_R20FF_GLOBAL_SHDN, + MAX98373_GLOBAL_EN_MASK, 1); + break; + case SND_SOC_DAPM_POST_PMD: + regmap_update_bits(max98373->regmap, + MAX98373_R20FF_GLOBAL_SHDN, + MAX98373_GLOBAL_EN_MASK, 0); + max98373->tdm_mode = 0; + break; + default: + return 0; + } + return 0; +} + +static const char * const max98373_switch_text[] = { + "Left", "Right", "LeftRight"}; + +static const struct soc_enum dai_sel_enum = + SOC_ENUM_SINGLE(MAX98373_R2029_PCM_TO_SPK_MONO_MIX_1, + MAX98373_PCM_TO_SPK_MONOMIX_CFG_SHIFT, + 3, max98373_switch_text); + +static const struct snd_kcontrol_new max98373_dai_controls = + SOC_DAPM_ENUM("DAI Sel", dai_sel_enum); + +static const struct snd_kcontrol_new max98373_vi_control = + SOC_DAPM_SINGLE("Switch", MAX98373_R202C_PCM_TX_EN, 0, 1, 0); + +static const struct snd_kcontrol_new max98373_spkfb_control = + SOC_DAPM_SINGLE("Switch", MAX98373_R2043_AMP_EN, 1, 1, 0); + +static const struct snd_soc_dapm_widget max98373_dapm_widgets[] = { +SND_SOC_DAPM_DAC_E("Amp Enable", "HiFi Playback", + MAX98373_R202B_PCM_RX_EN, 0, 0, max98373_dac_event, + SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), +SND_SOC_DAPM_MUX("DAI Sel Mux", SND_SOC_NOPM, 0, 0, + &max98373_dai_controls), +SND_SOC_DAPM_OUTPUT("BE_OUT"), +SND_SOC_DAPM_AIF_OUT("Voltage Sense", "HiFi Capture", 0, + MAX98373_R2047_IV_SENSE_ADC_EN, 0, 0), +SND_SOC_DAPM_AIF_OUT("Current Sense", "HiFi Capture", 0, + MAX98373_R2047_IV_SENSE_ADC_EN, 1, 0), +SND_SOC_DAPM_AIF_OUT("Speaker FB Sense", "HiFi Capture", 0, + SND_SOC_NOPM, 0, 0), +SND_SOC_DAPM_SWITCH("VI Sense", SND_SOC_NOPM, 0, 0, + &max98373_vi_control), +SND_SOC_DAPM_SWITCH("SpkFB Sense", SND_SOC_NOPM, 0, 0, + &max98373_spkfb_control), +SND_SOC_DAPM_SIGGEN("VMON"), +SND_SOC_DAPM_SIGGEN("IMON"), +SND_SOC_DAPM_SIGGEN("FBMON"), +}; + +static DECLARE_TLV_DB_SCALE(max98373_digital_tlv, 0, -50, 0); +static const DECLARE_TLV_DB_RANGE(max98373_spk_tlv, + 0, 8, TLV_DB_SCALE_ITEM(0, 50, 0), + 9, 10, TLV_DB_SCALE_ITEM(500, 100, 0), +); +static const DECLARE_TLV_DB_RANGE(max98373_spkgain_max_tlv, + 0, 9, TLV_DB_SCALE_ITEM(800, 100, 0), +); +static const DECLARE_TLV_DB_RANGE(max98373_dht_step_size_tlv, + 0, 1, TLV_DB_SCALE_ITEM(25, 25, 0), + 2, 4, TLV_DB_SCALE_ITEM(100, 100, 0), +); +static const DECLARE_TLV_DB_RANGE(max98373_dht_spkgain_min_tlv, + 0, 9, TLV_DB_SCALE_ITEM(800, 100, 0), +); +static const DECLARE_TLV_DB_RANGE(max98373_dht_rotation_point_tlv, + 0, 1, TLV_DB_SCALE_ITEM(-50, -50, 0), + 2, 7, TLV_DB_SCALE_ITEM(-200, -100, 0), + 8, 9, TLV_DB_SCALE_ITEM(-1000, -200, 0), + 10, 11, TLV_DB_SCALE_ITEM(-1500, -300, 0), + 12, 13, TLV_DB_SCALE_ITEM(-2000, -200, 0), + 14, 15, TLV_DB_SCALE_ITEM(-2500, -500, 0), +); +static const DECLARE_TLV_DB_RANGE(max98373_limiter_thresh_tlv, + 0, 15, TLV_DB_SCALE_ITEM(0, -100, 0), +); + +static const DECLARE_TLV_DB_RANGE(max98373_bde_gain_tlv, + 0, 60, TLV_DB_SCALE_ITEM(0, -25, 0), +); + +static bool max98373_readable_register(struct device *dev, unsigned int reg) +{ + switch (reg) { + case MAX98373_R2000_SW_RESET: + case MAX98373_R2001_INT_RAW1 ... MAX98373_R200C_INT_EN3: + case MAX98373_R2010_IRQ_CTRL: + case MAX98373_R2014_THERM_WARN_THRESH + ... MAX98373_R2018_THERM_FOLDBACK_EN: + case MAX98373_R201E_PIN_DRIVE_STRENGTH + ... MAX98373_R2036_SOUNDWIRE_CTRL: + case MAX98373_R203D_AMP_DIG_VOL_CTRL ... MAX98373_R2043_AMP_EN: + case MAX98373_R2046_IV_SENSE_ADC_DSP_CFG + ... MAX98373_R2047_IV_SENSE_ADC_EN: + case MAX98373_R2051_MEAS_ADC_SAMPLING_RATE + ... MAX98373_R2056_MEAS_ADC_PVDD_CH_EN: + case MAX98373_R2090_BDE_LVL_HOLD ... MAX98373_R2092_BDE_CLIPPER_MODE: + case MAX98373_R2097_BDE_L1_THRESH + ... MAX98373_R209B_BDE_THRESH_HYST: + case MAX98373_R20A8_BDE_L1_CFG_1 ... MAX98373_R20B3_BDE_L4_CFG_3: + case MAX98373_R20B5_BDE_EN ... MAX98373_R20B6_BDE_CUR_STATE_READBACK: + case MAX98373_R20D1_DHT_CFG ... MAX98373_R20D4_DHT_EN: + case MAX98373_R20E0_LIMITER_THRESH_CFG ... MAX98373_R20E2_LIMITER_EN: + case MAX98373_R20FE_DEVICE_AUTO_RESTART_CFG + ... MAX98373_R20FF_GLOBAL_SHDN: + case MAX98373_R21FF_REV_ID: + return true; + default: + return false; + } +}; + +static bool max98373_volatile_reg(struct device *dev, unsigned int reg) +{ + switch (reg) { + case MAX98373_R2000_SW_RESET ... MAX98373_R2009_INT_FLAG3: + case MAX98373_R203E_AMP_PATH_GAIN: + case MAX98373_R2054_MEAS_ADC_PVDD_CH_READBACK: + case MAX98373_R2055_MEAS_ADC_THERM_CH_READBACK: + case MAX98373_R20B6_BDE_CUR_STATE_READBACK: + case MAX98373_R21FF_REV_ID: + return true; + default: + return false; + } +} + +static const char * const max98373_output_voltage_lvl_text[] = { + "5.43V", "6.09V", "6.83V", "7.67V", "8.60V", + "9.65V", "10.83V", "12.15V", "13.63V", "15.29V" +}; + +static SOC_ENUM_SINGLE_DECL(max98373_out_volt_enum, + MAX98373_R203E_AMP_PATH_GAIN, 0, + max98373_output_voltage_lvl_text); + +static const char * const max98373_dht_attack_rate_text[] = { + "17.5us", "35us", "70us", "140us", + "280us", "560us", "1120us", "2240us" +}; + +static SOC_ENUM_SINGLE_DECL(max98373_dht_attack_rate_enum, + MAX98373_R20D2_DHT_ATTACK_CFG, 0, + max98373_dht_attack_rate_text); + +static const char * const max98373_dht_release_rate_text[] = { + "45ms", "225ms", "450ms", "1150ms", + "2250ms", "3100ms", "4500ms", "6750ms" +}; + +static SOC_ENUM_SINGLE_DECL(max98373_dht_release_rate_enum, + MAX98373_R20D3_DHT_RELEASE_CFG, 0, + max98373_dht_release_rate_text); + +static const char * const max98373_limiter_attack_rate_text[] = { + "10us", "20us", "40us", "80us", + "160us", "320us", "640us", "1.28ms", + "2.56ms", "5.12ms", "10.24ms", "20.48ms", + "40.96ms", "81.92ms", "16.384ms", "32.768ms" +}; + +static SOC_ENUM_SINGLE_DECL(max98373_limiter_attack_rate_enum, + MAX98373_R20E1_LIMITER_ATK_REL_RATES, 4, + max98373_limiter_attack_rate_text); + +static const char * const max98373_limiter_release_rate_text[] = { + "40us", "80us", "160us", "320us", + "640us", "1.28ms", "2.56ms", "5.120ms", + "10.24ms", "20.48ms", "40.96ms", "81.92ms", + "163.84ms", "327.68ms", "655.36ms", "1310.72ms" +}; + +static SOC_ENUM_SINGLE_DECL(max98373_limiter_release_rate_enum, + MAX98373_R20E1_LIMITER_ATK_REL_RATES, 0, + max98373_limiter_release_rate_text); + +static const char * const max98373_ADC_samplerate_text[] = { + "333kHz", "192kHz", "64kHz", "48kHz" +}; + +static SOC_ENUM_SINGLE_DECL(max98373_adc_samplerate_enum, + MAX98373_R2051_MEAS_ADC_SAMPLING_RATE, 0, + max98373_ADC_samplerate_text); + +static const struct snd_kcontrol_new max98373_snd_controls[] = { +SOC_SINGLE("Digital Vol Sel Switch", MAX98373_R203F_AMP_DSP_CFG, + MAX98373_AMP_VOL_SEL_SHIFT, 1, 0), +SOC_SINGLE("Volume Location Switch", MAX98373_R203F_AMP_DSP_CFG, + MAX98373_AMP_VOL_SEL_SHIFT, 1, 0), +SOC_SINGLE("Ramp Up Switch", MAX98373_R203F_AMP_DSP_CFG, + MAX98373_AMP_DSP_CFG_RMP_UP_SHIFT, 1, 0), +SOC_SINGLE("Ramp Down Switch", MAX98373_R203F_AMP_DSP_CFG, + MAX98373_AMP_DSP_CFG_RMP_DN_SHIFT, 1, 0), +SOC_SINGLE("CLK Monitor Switch", MAX98373_R20FE_DEVICE_AUTO_RESTART_CFG, + MAX98373_CLOCK_MON_SHIFT, 1, 0), +SOC_SINGLE("Dither Switch", MAX98373_R203F_AMP_DSP_CFG, + MAX98373_AMP_DSP_CFG_DITH_SHIFT, 1, 0), +SOC_SINGLE("DC Blocker Switch", MAX98373_R203F_AMP_DSP_CFG, + MAX98373_AMP_DSP_CFG_DCBLK_SHIFT, 1, 0), +SOC_SINGLE_TLV("Digital Volume", MAX98373_R203D_AMP_DIG_VOL_CTRL, + 0, 0x7F, 0, max98373_digital_tlv), +SOC_SINGLE_TLV("Speaker Volume", MAX98373_R203E_AMP_PATH_GAIN, + MAX98373_SPK_DIGI_GAIN_SHIFT, 10, 0, max98373_spk_tlv), +SOC_SINGLE_TLV("FS Max Volume", MAX98373_R203E_AMP_PATH_GAIN, + MAX98373_FS_GAIN_MAX_SHIFT, 9, 0, max98373_spkgain_max_tlv), +SOC_ENUM("Output Voltage", max98373_out_volt_enum), +/* Dynamic Headroom Tracking */ +SOC_SINGLE("DHT Switch", MAX98373_R20D4_DHT_EN, + MAX98373_DHT_EN_SHIFT, 1, 0), +SOC_SINGLE_TLV("DHT Min Volume", MAX98373_R20D1_DHT_CFG, + MAX98373_DHT_SPK_GAIN_MIN_SHIFT, 9, 0, max98373_dht_spkgain_min_tlv), +SOC_SINGLE_TLV("DHT Rot Pnt Volume", MAX98373_R20D1_DHT_CFG, + MAX98373_DHT_ROT_PNT_SHIFT, 15, 0, max98373_dht_rotation_point_tlv), +SOC_SINGLE_TLV("DHT Attack Step Volume", MAX98373_R20D2_DHT_ATTACK_CFG, + MAX98373_DHT_ATTACK_STEP_SHIFT, 4, 0, max98373_dht_step_size_tlv), +SOC_SINGLE_TLV("DHT Release Step Volume", MAX98373_R20D3_DHT_RELEASE_CFG, + MAX98373_DHT_RELEASE_STEP_SHIFT, 4, 0, max98373_dht_step_size_tlv), +SOC_ENUM("DHT Attack Rate", max98373_dht_attack_rate_enum), +SOC_ENUM("DHT Release Rate", max98373_dht_release_rate_enum), +/* ADC configuration */ +SOC_SINGLE("ADC PVDD CH Switch", MAX98373_R2056_MEAS_ADC_PVDD_CH_EN, 0, 1, 0), +SOC_SINGLE("ADC PVDD FLT Switch", MAX98373_R2052_MEAS_ADC_PVDD_FLT_CFG, + MAX98373_FLT_EN_SHIFT, 1, 0), +SOC_SINGLE("ADC TEMP FLT Switch", MAX98373_R2053_MEAS_ADC_THERM_FLT_CFG, + MAX98373_FLT_EN_SHIFT, 1, 0), +SOC_SINGLE("ADC PVDD", MAX98373_R2054_MEAS_ADC_PVDD_CH_READBACK, 0, 0xFF, 0), +SOC_SINGLE("ADC TEMP", MAX98373_R2055_MEAS_ADC_THERM_CH_READBACK, 0, 0xFF, 0), +SOC_SINGLE("ADC PVDD FLT Coeff", MAX98373_R2052_MEAS_ADC_PVDD_FLT_CFG, + 0, 0x3, 0), +SOC_SINGLE("ADC TEMP FLT Coeff", MAX98373_R2053_MEAS_ADC_THERM_FLT_CFG, + 0, 0x3, 0), +SOC_ENUM("ADC SampleRate", max98373_adc_samplerate_enum), +/* Brownout Detection Engine */ +SOC_SINGLE("BDE Switch", MAX98373_R20B5_BDE_EN, MAX98373_BDE_EN_SHIFT, 1, 0), +SOC_SINGLE("BDE LVL4 Mute Switch", MAX98373_R20B2_BDE_L4_CFG_2, + MAX98373_LVL4_MUTE_EN_SHIFT, 1, 0), +SOC_SINGLE("BDE LVL4 Hold Switch", MAX98373_R20B2_BDE_L4_CFG_2, + MAX98373_LVL4_HOLD_EN_SHIFT, 1, 0), +SOC_SINGLE("BDE LVL1 Thresh", MAX98373_R2097_BDE_L1_THRESH, 0, 0xFF, 0), +SOC_SINGLE("BDE LVL2 Thresh", MAX98373_R2098_BDE_L2_THRESH, 0, 0xFF, 0), +SOC_SINGLE("BDE LVL3 Thresh", MAX98373_R2099_BDE_L3_THRESH, 0, 0xFF, 0), +SOC_SINGLE("BDE LVL4 Thresh", MAX98373_R209A_BDE_L4_THRESH, 0, 0xFF, 0), +SOC_SINGLE("BDE Active Level", MAX98373_R20B6_BDE_CUR_STATE_READBACK, 0, 8, 0), +SOC_SINGLE("BDE Clip Mode Switch", MAX98373_R2092_BDE_CLIPPER_MODE, 0, 1, 0), +SOC_SINGLE("BDE Thresh Hysteresis", MAX98373_R209B_BDE_THRESH_HYST, 0, 0xFF, 0), +SOC_SINGLE("BDE Hold Time", MAX98373_R2090_BDE_LVL_HOLD, 0, 0xFF, 0), +SOC_SINGLE("BDE Attack Rate", MAX98373_R2091_BDE_GAIN_ATK_REL_RATE, 4, 0xF, 0), +SOC_SINGLE("BDE Release Rate", MAX98373_R2091_BDE_GAIN_ATK_REL_RATE, 0, 0xF, 0), +SOC_SINGLE_TLV("BDE LVL1 Clip Thresh Volume", MAX98373_R20A9_BDE_L1_CFG_2, + 0, 0x3C, 0, max98373_bde_gain_tlv), +SOC_SINGLE_TLV("BDE LVL2 Clip Thresh Volume", MAX98373_R20AC_BDE_L2_CFG_2, + 0, 0x3C, 0, max98373_bde_gain_tlv), +SOC_SINGLE_TLV("BDE LVL3 Clip Thresh Volume", MAX98373_R20AF_BDE_L3_CFG_2, + 0, 0x3C, 0, max98373_bde_gain_tlv), +SOC_SINGLE_TLV("BDE LVL4 Clip Thresh Volume", MAX98373_R20B2_BDE_L4_CFG_2, + 0, 0x3C, 0, max98373_bde_gain_tlv), +SOC_SINGLE_TLV("BDE LVL1 Clip Reduction Volume", MAX98373_R20AA_BDE_L1_CFG_3, + 0, 0x3C, 0, max98373_bde_gain_tlv), +SOC_SINGLE_TLV("BDE LVL2 Clip Reduction Volume", MAX98373_R20AD_BDE_L2_CFG_3, + 0, 0x3C, 0, max98373_bde_gain_tlv), +SOC_SINGLE_TLV("BDE LVL3 Clip Reduction Volume", MAX98373_R20B0_BDE_L3_CFG_3, + 0, 0x3C, 0, max98373_bde_gain_tlv), +SOC_SINGLE_TLV("BDE LVL4 Clip Reduction Volume", MAX98373_R20B3_BDE_L4_CFG_3, + 0, 0x3C, 0, max98373_bde_gain_tlv), +SOC_SINGLE_TLV("BDE LVL1 Limiter Thresh Volume", MAX98373_R20A8_BDE_L1_CFG_1, + 0, 0xF, 0, max98373_limiter_thresh_tlv), +SOC_SINGLE_TLV("BDE LVL2 Limiter Thresh Volume", MAX98373_R20AB_BDE_L2_CFG_1, + 0, 0xF, 0, max98373_limiter_thresh_tlv), +SOC_SINGLE_TLV("BDE LVL3 Limiter Thresh Volume", MAX98373_R20AE_BDE_L3_CFG_1, + 0, 0xF, 0, max98373_limiter_thresh_tlv), +SOC_SINGLE_TLV("BDE LVL4 Limiter Thresh Volume", MAX98373_R20B1_BDE_L4_CFG_1, + 0, 0xF, 0, max98373_limiter_thresh_tlv), +/* Limiter */ +SOC_SINGLE("Limiter Switch", MAX98373_R20E2_LIMITER_EN, + MAX98373_LIMITER_EN_SHIFT, 1, 0), +SOC_SINGLE("Limiter Src Switch", MAX98373_R20E0_LIMITER_THRESH_CFG, + MAX98373_LIMITER_THRESH_SRC_SHIFT, 1, 0), +SOC_SINGLE_TLV("Limiter Thresh Volume", MAX98373_R20E0_LIMITER_THRESH_CFG, + MAX98373_LIMITER_THRESH_SHIFT, 15, 0, max98373_limiter_thresh_tlv), +SOC_ENUM("Limiter Attack Rate", max98373_limiter_attack_rate_enum), +SOC_ENUM("Limiter Release Rate", max98373_limiter_release_rate_enum), +}; + +static const struct snd_soc_dapm_route max98373_audio_map[] = { + /* Plabyack */ + {"DAI Sel Mux", "Left", "Amp Enable"}, + {"DAI Sel Mux", "Right", "Amp Enable"}, + {"DAI Sel Mux", "LeftRight", "Amp Enable"}, + {"BE_OUT", NULL, "DAI Sel Mux"}, + /* Capture */ + { "VI Sense", "Switch", "VMON" }, + { "VI Sense", "Switch", "IMON" }, + { "SpkFB Sense", "Switch", "FBMON" }, + { "Voltage Sense", NULL, "VI Sense" }, + { "Current Sense", NULL, "VI Sense" }, + { "Speaker FB Sense", NULL, "SpkFB Sense" }, +}; + +static struct snd_soc_dai_driver max98373_dai[] = { + { + .name = "max98373-aif1", + .playback = { + .stream_name = "HiFi Playback", + .channels_min = 1, + .channels_max = 2, + .rates = MAX98373_RATES, + .formats = MAX98373_FORMATS, + }, + .capture = { + .stream_name = "HiFi Capture", + .channels_min = 1, + .channels_max = 2, + .rates = MAX98373_RATES, + .formats = MAX98373_FORMATS, + }, + .ops = &max98373_dai_ops, + } +}; + +static int max98373_probe(struct snd_soc_component *component) +{ + struct max98373_priv *max98373 = snd_soc_component_get_drvdata(component); + + /* Software Reset */ + regmap_write(max98373->regmap, + MAX98373_R2000_SW_RESET, MAX98373_SOFT_RESET); + usleep_range(10000, 11000); + + /* IV default slot configuration */ + regmap_write(max98373->regmap, + MAX98373_R2020_PCM_TX_HIZ_EN_1, + 0xFF); + regmap_write(max98373->regmap, + MAX98373_R2021_PCM_TX_HIZ_EN_2, + 0xFF); + /* L/R mix configuration */ + regmap_write(max98373->regmap, + MAX98373_R2029_PCM_TO_SPK_MONO_MIX_1, + 0x80); + regmap_write(max98373->regmap, + MAX98373_R202A_PCM_TO_SPK_MONO_MIX_2, + 0x1); + /* Set inital volume (0dB) */ + regmap_write(max98373->regmap, + MAX98373_R203D_AMP_DIG_VOL_CTRL, + 0x00); + regmap_write(max98373->regmap, + MAX98373_R203E_AMP_PATH_GAIN, + 0x00); + /* Enable DC blocker */ + regmap_write(max98373->regmap, + MAX98373_R203F_AMP_DSP_CFG, + 0x3); + /* Enable IMON VMON DC blocker */ + regmap_write(max98373->regmap, + MAX98373_R2046_IV_SENSE_ADC_DSP_CFG, + 0x7); + /* voltage, current slot configuration */ + regmap_write(max98373->regmap, + MAX98373_R2022_PCM_TX_SRC_1, + (max98373->i_slot << MAX98373_PCM_TX_CH_SRC_A_I_SHIFT | + max98373->v_slot) & 0xFF); + if (max98373->v_slot < 8) + regmap_update_bits(max98373->regmap, + MAX98373_R2020_PCM_TX_HIZ_EN_1, + 1 << max98373->v_slot, 0); + else + regmap_update_bits(max98373->regmap, + MAX98373_R2021_PCM_TX_HIZ_EN_2, + 1 << (max98373->v_slot - 8), 0); + + if (max98373->i_slot < 8) + regmap_update_bits(max98373->regmap, + MAX98373_R2020_PCM_TX_HIZ_EN_1, + 1 << max98373->i_slot, 0); + else + regmap_update_bits(max98373->regmap, + MAX98373_R2021_PCM_TX_HIZ_EN_2, + 1 << (max98373->i_slot - 8), 0); + + /* speaker feedback slot configuration */ + regmap_write(max98373->regmap, + MAX98373_R2023_PCM_TX_SRC_2, + max98373->spkfb_slot & 0xFF); + + /* Set interleave mode */ + if (max98373->interleave_mode) + regmap_update_bits(max98373->regmap, + MAX98373_R2024_PCM_DATA_FMT_CFG, + MAX98373_PCM_TX_CH_INTERLEAVE_MASK, + MAX98373_PCM_TX_CH_INTERLEAVE_MASK); + + /* Speaker enable */ + regmap_update_bits(max98373->regmap, + MAX98373_R2043_AMP_EN, + MAX98373_SPK_EN_MASK, 1); + + return 0; +} + +#ifdef CONFIG_PM_SLEEP +static int max98373_suspend(struct device *dev) +{ + struct max98373_priv *max98373 = dev_get_drvdata(dev); + + regcache_cache_only(max98373->regmap, true); + regcache_mark_dirty(max98373->regmap); + return 0; +} +static int max98373_resume(struct device *dev) +{ + struct max98373_priv *max98373 = dev_get_drvdata(dev); + + regmap_write(max98373->regmap, + MAX98373_R2000_SW_RESET, MAX98373_SOFT_RESET); + usleep_range(10000, 11000); + regcache_cache_only(max98373->regmap, false); + regcache_sync(max98373->regmap); + return 0; +} +#endif + +static const struct dev_pm_ops max98373_pm = { + SET_SYSTEM_SLEEP_PM_OPS(max98373_suspend, max98373_resume) +}; + +static const struct snd_soc_component_driver soc_codec_dev_max98373 = { + .probe = max98373_probe, + .controls = max98373_snd_controls, + .num_controls = ARRAY_SIZE(max98373_snd_controls), + .dapm_widgets = max98373_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(max98373_dapm_widgets), + .dapm_routes = max98373_audio_map, + .num_dapm_routes = ARRAY_SIZE(max98373_audio_map), + .idle_bias_on = 1, + .use_pmdown_time = 1, + .endianness = 1, + .non_legacy_dai_naming = 1, +}; + +static const struct regmap_config max98373_regmap = { + .reg_bits = 16, + .val_bits = 8, + .max_register = MAX98373_R21FF_REV_ID, + .reg_defaults = max98373_reg, + .num_reg_defaults = ARRAY_SIZE(max98373_reg), + .readable_reg = max98373_readable_register, + .volatile_reg = max98373_volatile_reg, + .cache_type = REGCACHE_RBTREE, +}; + +static void max98373_slot_config(struct i2c_client *i2c, + struct max98373_priv *max98373) +{ + int value; + struct device *dev = &i2c->dev; + + if (!device_property_read_u32(dev, "maxim,vmon-slot-no", &value)) + max98373->v_slot = value & 0xF; + else + max98373->v_slot = 0; + + if (!device_property_read_u32(dev, "maxim,imon-slot-no", &value)) + max98373->i_slot = value & 0xF; + else + max98373->i_slot = 1; + + if (!device_property_read_u32(dev, "maxim,spkfb-slot-no", &value)) + max98373->spkfb_slot = value & 0xF; + else + max98373->spkfb_slot = 2; +} + +static int max98373_i2c_probe(struct i2c_client *i2c, + const struct i2c_device_id *id) +{ + + int ret = 0; + int reg = 0; + struct max98373_priv *max98373 = NULL; + + max98373 = devm_kzalloc(&i2c->dev, sizeof(*max98373), GFP_KERNEL); + + if (!max98373) { + ret = -ENOMEM; + return ret; + } + i2c_set_clientdata(i2c, max98373); + + /* update interleave mode info */ + if (device_property_read_bool(&i2c->dev, "maxim,interleave_mode")) + max98373->interleave_mode = 1; + else + max98373->interleave_mode = 0; + + + /* regmap initialization */ + max98373->regmap + = devm_regmap_init_i2c(i2c, &max98373_regmap); + if (IS_ERR(max98373->regmap)) { + ret = PTR_ERR(max98373->regmap); + dev_err(&i2c->dev, + "Failed to allocate regmap: %d\n", ret); + return ret; + } + + /* Check Revision ID */ + ret = regmap_read(max98373->regmap, + MAX98373_R21FF_REV_ID, ®); + if (ret < 0) { + dev_err(&i2c->dev, + "Failed to read: 0x%02X\n", MAX98373_R21FF_REV_ID); + return ret; + } + dev_info(&i2c->dev, "MAX98373 revisionID: 0x%02X\n", reg); + + /* voltage/current slot configuration */ + max98373_slot_config(i2c, max98373); + + /* codec registeration */ + ret = devm_snd_soc_register_component(&i2c->dev, &soc_codec_dev_max98373, + max98373_dai, ARRAY_SIZE(max98373_dai)); + if (ret < 0) + dev_err(&i2c->dev, "Failed to register codec: %d\n", ret); + + return ret; +} + +static const struct i2c_device_id max98373_i2c_id[] = { + { "max98373", 0}, + { }, +}; + +MODULE_DEVICE_TABLE(i2c, max98373_i2c_id); + +#if defined(CONFIG_OF) +static const struct of_device_id max98373_of_match[] = { + { .compatible = "maxim,max98373", }, + { } +}; +MODULE_DEVICE_TABLE(of, max98373_of_match); +#endif + +#ifdef CONFIG_ACPI +static const struct acpi_device_id max98373_acpi_match[] = { + { "MX98373", 0 }, + {}, +}; +MODULE_DEVICE_TABLE(acpi, max98373_acpi_match); +#endif + +static struct i2c_driver max98373_i2c_driver = { + .driver = { + .name = "max98373", + .of_match_table = of_match_ptr(max98373_of_match), + .acpi_match_table = ACPI_PTR(max98373_acpi_match), + .pm = &max98373_pm, + }, + .probe = max98373_i2c_probe, + .id_table = max98373_i2c_id, +}; + +module_i2c_driver(max98373_i2c_driver) + +MODULE_DESCRIPTION("ALSA SoC MAX98373 driver"); +MODULE_AUTHOR("Ryan Lee "); +MODULE_LICENSE("GPL"); \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/max98373.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/max98373.c.yml new file mode 100644 index 00000000000..a2ae3918c58 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/max98373.c.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2017, Maxim Integrated +holders: + - Maxim Integrated diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/max98373.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/max98373.h new file mode 100644 index 00000000000..bbd433b0521 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/max98373.h @@ -0,0 +1,213 @@ +// SPDX-License-Identifier: GPL-2.0 +// Copyright (c) 2017, Maxim Integrated + +#ifndef _MAX98373_H +#define _MAX98373_H + +#define MAX98373_R2000_SW_RESET 0x2000 +#define MAX98373_R2001_INT_RAW1 0x2001 +#define MAX98373_R2002_INT_RAW2 0x2002 +#define MAX98373_R2003_INT_RAW3 0x2003 +#define MAX98373_R2004_INT_STATE1 0x2004 +#define MAX98373_R2005_INT_STATE2 0x2005 +#define MAX98373_R2006_INT_STATE3 0x2006 +#define MAX98373_R2007_INT_FLAG1 0x2007 +#define MAX98373_R2008_INT_FLAG2 0x2008 +#define MAX98373_R2009_INT_FLAG3 0x2009 +#define MAX98373_R200A_INT_EN1 0x200A +#define MAX98373_R200B_INT_EN2 0x200B +#define MAX98373_R200C_INT_EN3 0x200C +#define MAX98373_R200D_INT_FLAG_CLR1 0x200D +#define MAX98373_R200E_INT_FLAG_CLR2 0x200E +#define MAX98373_R200F_INT_FLAG_CLR3 0x200F +#define MAX98373_R2010_IRQ_CTRL 0x2010 +#define MAX98373_R2014_THERM_WARN_THRESH 0x2014 +#define MAX98373_R2015_THERM_SHDN_THRESH 0x2015 +#define MAX98373_R2016_THERM_HYSTERESIS 0x2016 +#define MAX98373_R2017_THERM_FOLDBACK_SET 0x2017 +#define MAX98373_R2018_THERM_FOLDBACK_EN 0x2018 +#define MAX98373_R201E_PIN_DRIVE_STRENGTH 0x201E +#define MAX98373_R2020_PCM_TX_HIZ_EN_1 0x2020 +#define MAX98373_R2021_PCM_TX_HIZ_EN_2 0x2021 +#define MAX98373_R2022_PCM_TX_SRC_1 0x2022 +#define MAX98373_R2023_PCM_TX_SRC_2 0x2023 +#define MAX98373_R2024_PCM_DATA_FMT_CFG 0x2024 +#define MAX98373_R2025_AUDIO_IF_MODE 0x2025 +#define MAX98373_R2026_PCM_CLOCK_RATIO 0x2026 +#define MAX98373_R2027_PCM_SR_SETUP_1 0x2027 +#define MAX98373_R2028_PCM_SR_SETUP_2 0x2028 +#define MAX98373_R2029_PCM_TO_SPK_MONO_MIX_1 0x2029 +#define MAX98373_R202A_PCM_TO_SPK_MONO_MIX_2 0x202A +#define MAX98373_R202B_PCM_RX_EN 0x202B +#define MAX98373_R202C_PCM_TX_EN 0x202C +#define MAX98373_R202E_ICC_RX_CH_EN_1 0x202E +#define MAX98373_R202F_ICC_RX_CH_EN_2 0x202F +#define MAX98373_R2030_ICC_TX_HIZ_EN_1 0x2030 +#define MAX98373_R2031_ICC_TX_HIZ_EN_2 0x2031 +#define MAX98373_R2032_ICC_LINK_EN_CFG 0x2032 +#define MAX98373_R2034_ICC_TX_CNTL 0x2034 +#define MAX98373_R2035_ICC_TX_EN 0x2035 +#define MAX98373_R2036_SOUNDWIRE_CTRL 0x2036 +#define MAX98373_R203D_AMP_DIG_VOL_CTRL 0x203D +#define MAX98373_R203E_AMP_PATH_GAIN 0x203E +#define MAX98373_R203F_AMP_DSP_CFG 0x203F +#define MAX98373_R2040_TONE_GEN_CFG 0x2040 +#define MAX98373_R2041_AMP_CFG 0x2041 +#define MAX98373_R2042_AMP_EDGE_RATE_CFG 0x2042 +#define MAX98373_R2043_AMP_EN 0x2043 +#define MAX98373_R2046_IV_SENSE_ADC_DSP_CFG 0x2046 +#define MAX98373_R2047_IV_SENSE_ADC_EN 0x2047 +#define MAX98373_R2051_MEAS_ADC_SAMPLING_RATE 0x2051 +#define MAX98373_R2052_MEAS_ADC_PVDD_FLT_CFG 0x2052 +#define MAX98373_R2053_MEAS_ADC_THERM_FLT_CFG 0x2053 +#define MAX98373_R2054_MEAS_ADC_PVDD_CH_READBACK 0x2054 +#define MAX98373_R2055_MEAS_ADC_THERM_CH_READBACK 0x2055 +#define MAX98373_R2056_MEAS_ADC_PVDD_CH_EN 0x2056 +#define MAX98373_R2090_BDE_LVL_HOLD 0x2090 +#define MAX98373_R2091_BDE_GAIN_ATK_REL_RATE 0x2091 +#define MAX98373_R2092_BDE_CLIPPER_MODE 0x2092 +#define MAX98373_R2097_BDE_L1_THRESH 0x2097 +#define MAX98373_R2098_BDE_L2_THRESH 0x2098 +#define MAX98373_R2099_BDE_L3_THRESH 0x2099 +#define MAX98373_R209A_BDE_L4_THRESH 0x209A +#define MAX98373_R209B_BDE_THRESH_HYST 0x209B +#define MAX98373_R20A8_BDE_L1_CFG_1 0x20A8 +#define MAX98373_R20A9_BDE_L1_CFG_2 0x20A9 +#define MAX98373_R20AA_BDE_L1_CFG_3 0x20AA +#define MAX98373_R20AB_BDE_L2_CFG_1 0x20AB +#define MAX98373_R20AC_BDE_L2_CFG_2 0x20AC +#define MAX98373_R20AD_BDE_L2_CFG_3 0x20AD +#define MAX98373_R20AE_BDE_L3_CFG_1 0x20AE +#define MAX98373_R20AF_BDE_L3_CFG_2 0x20AF +#define MAX98373_R20B0_BDE_L3_CFG_3 0x20B0 +#define MAX98373_R20B1_BDE_L4_CFG_1 0x20B1 +#define MAX98373_R20B2_BDE_L4_CFG_2 0x20B2 +#define MAX98373_R20B3_BDE_L4_CFG_3 0x20B3 +#define MAX98373_R20B4_BDE_INFINITE_HOLD_RELEASE 0x20B4 +#define MAX98373_R20B5_BDE_EN 0x20B5 +#define MAX98373_R20B6_BDE_CUR_STATE_READBACK 0x20B6 +#define MAX98373_R20D1_DHT_CFG 0x20D1 +#define MAX98373_R20D2_DHT_ATTACK_CFG 0x20D2 +#define MAX98373_R20D3_DHT_RELEASE_CFG 0x20D3 +#define MAX98373_R20D4_DHT_EN 0x20D4 +#define MAX98373_R20E0_LIMITER_THRESH_CFG 0x20E0 +#define MAX98373_R20E1_LIMITER_ATK_REL_RATES 0x20E1 +#define MAX98373_R20E2_LIMITER_EN 0x20E2 +#define MAX98373_R20FE_DEVICE_AUTO_RESTART_CFG 0x20FE +#define MAX98373_R20FF_GLOBAL_SHDN 0x20FF +#define MAX98373_R21FF_REV_ID 0x21FF + +/* MAX98373_R2022_PCM_TX_SRC_1 */ +#define MAX98373_PCM_TX_CH_SRC_A_V_SHIFT (0) +#define MAX98373_PCM_TX_CH_SRC_A_I_SHIFT (4) + +/* MAX98373_R2024_PCM_DATA_FMT_CFG */ +#define MAX98373_PCM_MODE_CFG_FORMAT_MASK (0x7 << 3) +#define MAX98373_PCM_MODE_CFG_FORMAT_SHIFT (3) +#define MAX98373_PCM_TX_CH_INTERLEAVE_MASK (0x1 << 2) +#define MAX98373_PCM_FORMAT_I2S (0x0 << 0) +#define MAX98373_PCM_FORMAT_LJ (0x1 << 0) +#define MAX98373_PCM_FORMAT_TDM_MODE0 (0x3 << 0) +#define MAX98373_PCM_FORMAT_TDM_MODE1 (0x4 << 0) +#define MAX98373_PCM_FORMAT_TDM_MODE2 (0x5 << 0) +#define MAX98373_PCM_MODE_CFG_CHANSZ_MASK (0x3 << 6) +#define MAX98373_PCM_MODE_CFG_CHANSZ_16 (0x1 << 6) +#define MAX98373_PCM_MODE_CFG_CHANSZ_24 (0x2 << 6) +#define MAX98373_PCM_MODE_CFG_CHANSZ_32 (0x3 << 6) + +/* MAX98373_R2026_PCM_CLOCK_RATIO */ +#define MAX98373_PCM_MODE_CFG_PCM_BCLKEDGE (0x1 << 4) +#define MAX98373_PCM_CLK_SETUP_BSEL_MASK (0xF << 0) + +/* MAX98373_R2027_PCM_SR_SETUP_1 */ +#define MAX98373_PCM_SR_SET1_SR_MASK (0xF << 0) +#define MAX98373_PCM_SR_SET1_SR_8000 (0x0 << 0) +#define MAX98373_PCM_SR_SET1_SR_11025 (0x1 << 0) +#define MAX98373_PCM_SR_SET1_SR_12000 (0x2 << 0) +#define MAX98373_PCM_SR_SET1_SR_16000 (0x3 << 0) +#define MAX98373_PCM_SR_SET1_SR_22050 (0x4 << 0) +#define MAX98373_PCM_SR_SET1_SR_24000 (0x5 << 0) +#define MAX98373_PCM_SR_SET1_SR_32000 (0x6 << 0) +#define MAX98373_PCM_SR_SET1_SR_44100 (0x7 << 0) +#define MAX98373_PCM_SR_SET1_SR_48000 (0x8 << 0) + +/* MAX98373_R2028_PCM_SR_SETUP_2 */ +#define MAX98373_PCM_SR_SET2_SR_MASK (0xF << 4) +#define MAX98373_PCM_SR_SET2_SR_SHIFT (4) +#define MAX98373_PCM_SR_SET2_IVADC_SR_MASK (0xF << 0) + +/* MAX98373_R2029_PCM_TO_SPK_MONO_MIX_1 */ +#define MAX98373_PCM_TO_SPK_MONOMIX_CFG_MASK (0x3 << 6) +#define MAX98373_PCM_TO_SPK_MONOMIX_CFG_SHIFT (6) +#define MAX98373_PCM_TO_SPK_CH0_SRC_MASK (0xF << 0) + +/* MAX98373_R203E_AMP_PATH_GAIN */ +#define MAX98373_SPK_DIGI_GAIN_MASK (0xF << 4) +#define MAX98373_SPK_DIGI_GAIN_SHIFT (4) +#define MAX98373_FS_GAIN_MAX_MASK (0xF << 0) +#define MAX98373_FS_GAIN_MAX_SHIFT (0) + +/* MAX98373_R203F_AMP_DSP_CFG */ +#define MAX98373_AMP_DSP_CFG_DCBLK_SHIFT (0) +#define MAX98373_AMP_DSP_CFG_DITH_SHIFT (1) +#define MAX98373_AMP_DSP_CFG_RMP_UP_SHIFT (2) +#define MAX98373_AMP_DSP_CFG_RMP_DN_SHIFT (3) +#define MAX98373_AMP_DSP_CFG_DAC_INV_SHIFT (5) +#define MAX98373_AMP_VOL_SEL_SHIFT (7) + +/* MAX98373_R2043_AMP_EN */ +#define MAX98373_SPKFB_EN_MASK (0x1 << 1) +#define MAX98373_SPK_EN_MASK (0x1 << 0) +#define MAX98373_SPKFB_EN_SHIFT (1) + +/*MAX98373_R2052_MEAS_ADC_PVDD_FLT_CFG */ +#define MAX98373_FLT_EN_SHIFT (4) + +/* MAX98373_R20B2_BDE_L4_CFG_2 */ +#define MAX98373_LVL4_MUTE_EN_SHIFT (7) +#define MAX98373_LVL4_HOLD_EN_SHIFT (6) + +/* MAX98373_R20B5_BDE_EN */ +#define MAX98373_BDE_EN_SHIFT (0) + +/* MAX98373_R20D1_DHT_CFG */ +#define MAX98373_DHT_SPK_GAIN_MIN_SHIFT (4) +#define MAX98373_DHT_ROT_PNT_SHIFT (0) + +/* MAX98373_R20D2_DHT_ATTACK_CFG */ +#define MAX98373_DHT_ATTACK_STEP_SHIFT (3) +#define MAX98373_DHT_ATTACK_RATE_SHIFT (0) + +/* MAX98373_R20D3_DHT_RELEASE_CFG */ +#define MAX98373_DHT_RELEASE_STEP_SHIFT (3) +#define MAX98373_DHT_RELEASE_RATE_SHIFT (0) + +/* MAX98373_R20D4_DHT_EN */ +#define MAX98373_DHT_EN_SHIFT (0) + +/* MAX98373_R20E0_LIMITER_THRESH_CFG */ +#define MAX98373_LIMITER_THRESH_SHIFT (2) +#define MAX98373_LIMITER_THRESH_SRC_SHIFT (0) + +/* MAX98373_R20E2_LIMITER_EN */ +#define MAX98373_LIMITER_EN_SHIFT (0) + +/* MAX98373_R20FE_DEVICE_AUTO_RESTART_CFG */ +#define MAX98373_CLOCK_MON_SHIFT (0) + +/* MAX98373_R20FF_GLOBAL_SHDN */ +#define MAX98373_GLOBAL_EN_MASK (0x1 << 0) + +/* MAX98373_R2000_SW_RESET */ +#define MAX98373_SOFT_RESET (0x1 << 0) + +struct max98373_priv { + struct regmap *regmap; + unsigned int v_slot; + unsigned int i_slot; + unsigned int spkfb_slot; + bool interleave_mode; + unsigned int ch_size; + bool tdm_mode; +}; +#endif \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/max98373.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/max98373.h.yml new file mode 100644 index 00000000000..a2ae3918c58 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/max98373.h.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2017, Maxim Integrated +holders: + - Maxim Integrated diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/nau8825.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/nau8825.c new file mode 100644 index 00000000000..382462a8054 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/nau8825.c @@ -0,0 +1,2667 @@ +/* + * Nuvoton NAU8825 audio codec driver + * + * Copyright 2015 Google Chromium project. + * Author: Anatol Pomozov + * Copyright 2015 Nuvoton Technology Corp. + * Co-author: Meng-Huang Kuo + * + * Licensed under the GPL-2. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + + +#include "nau8825.h" + + +#define NUVOTON_CODEC_DAI "nau8825-hifi" + +#define NAU_FREF_MAX 13500000 +#define NAU_FVCO_MAX 124000000 +#define NAU_FVCO_MIN 90000000 + +/* cross talk suppression detection */ +#define LOG10_MAGIC 646456993 +#define GAIN_AUGMENT 22500 +#define SIDETONE_BASE 207000 + +/* the maximum frequency of CLK_ADC and CLK_DAC */ +#define CLK_DA_AD_MAX 6144000 + +static int nau8825_configure_sysclk(struct nau8825 *nau8825, + int clk_id, unsigned int freq); + +struct nau8825_fll { + int mclk_src; + int ratio; + int fll_frac; + int fll_int; + int clk_ref_div; +}; + +struct nau8825_fll_attr { + unsigned int param; + unsigned int val; +}; + +/* scaling for mclk from sysclk_src output */ +static const struct nau8825_fll_attr mclk_src_scaling[] = { + { 1, 0x0 }, + { 2, 0x2 }, + { 4, 0x3 }, + { 8, 0x4 }, + { 16, 0x5 }, + { 32, 0x6 }, + { 3, 0x7 }, + { 6, 0xa }, + { 12, 0xb }, + { 24, 0xc }, + { 48, 0xd }, + { 96, 0xe }, + { 5, 0xf }, +}; + +/* ratio for input clk freq */ +static const struct nau8825_fll_attr fll_ratio[] = { + { 512000, 0x01 }, + { 256000, 0x02 }, + { 128000, 0x04 }, + { 64000, 0x08 }, + { 32000, 0x10 }, + { 8000, 0x20 }, + { 4000, 0x40 }, +}; + +static const struct nau8825_fll_attr fll_pre_scalar[] = { + { 1, 0x0 }, + { 2, 0x1 }, + { 4, 0x2 }, + { 8, 0x3 }, +}; + +/* over sampling rate */ +struct nau8825_osr_attr { + unsigned int osr; + unsigned int clk_src; +}; + +static const struct nau8825_osr_attr osr_dac_sel[] = { + { 64, 2 }, /* OSR 64, SRC 1/4 */ + { 256, 0 }, /* OSR 256, SRC 1 */ + { 128, 1 }, /* OSR 128, SRC 1/2 */ + { 0, 0 }, + { 32, 3 }, /* OSR 32, SRC 1/8 */ +}; + +static const struct nau8825_osr_attr osr_adc_sel[] = { + { 32, 3 }, /* OSR 32, SRC 1/8 */ + { 64, 2 }, /* OSR 64, SRC 1/4 */ + { 128, 1 }, /* OSR 128, SRC 1/2 */ + { 256, 0 }, /* OSR 256, SRC 1 */ +}; + +static const struct reg_default nau8825_reg_defaults[] = { + { NAU8825_REG_ENA_CTRL, 0x00ff }, + { NAU8825_REG_IIC_ADDR_SET, 0x0 }, + { NAU8825_REG_CLK_DIVIDER, 0x0050 }, + { NAU8825_REG_FLL1, 0x0 }, + { NAU8825_REG_FLL2, 0x3126 }, + { NAU8825_REG_FLL3, 0x0008 }, + { NAU8825_REG_FLL4, 0x0010 }, + { NAU8825_REG_FLL5, 0x0 }, + { NAU8825_REG_FLL6, 0x6000 }, + { NAU8825_REG_FLL_VCO_RSV, 0xf13c }, + { NAU8825_REG_HSD_CTRL, 0x000c }, + { NAU8825_REG_JACK_DET_CTRL, 0x0 }, + { NAU8825_REG_INTERRUPT_MASK, 0x0 }, + { NAU8825_REG_INTERRUPT_DIS_CTRL, 0xffff }, + { NAU8825_REG_SAR_CTRL, 0x0015 }, + { NAU8825_REG_KEYDET_CTRL, 0x0110 }, + { NAU8825_REG_VDET_THRESHOLD_1, 0x0 }, + { NAU8825_REG_VDET_THRESHOLD_2, 0x0 }, + { NAU8825_REG_VDET_THRESHOLD_3, 0x0 }, + { NAU8825_REG_VDET_THRESHOLD_4, 0x0 }, + { NAU8825_REG_GPIO34_CTRL, 0x0 }, + { NAU8825_REG_GPIO12_CTRL, 0x0 }, + { NAU8825_REG_TDM_CTRL, 0x0 }, + { NAU8825_REG_I2S_PCM_CTRL1, 0x000b }, + { NAU8825_REG_I2S_PCM_CTRL2, 0x8010 }, + { NAU8825_REG_LEFT_TIME_SLOT, 0x0 }, + { NAU8825_REG_RIGHT_TIME_SLOT, 0x0 }, + { NAU8825_REG_BIQ_CTRL, 0x0 }, + { NAU8825_REG_BIQ_COF1, 0x0 }, + { NAU8825_REG_BIQ_COF2, 0x0 }, + { NAU8825_REG_BIQ_COF3, 0x0 }, + { NAU8825_REG_BIQ_COF4, 0x0 }, + { NAU8825_REG_BIQ_COF5, 0x0 }, + { NAU8825_REG_BIQ_COF6, 0x0 }, + { NAU8825_REG_BIQ_COF7, 0x0 }, + { NAU8825_REG_BIQ_COF8, 0x0 }, + { NAU8825_REG_BIQ_COF9, 0x0 }, + { NAU8825_REG_BIQ_COF10, 0x0 }, + { NAU8825_REG_ADC_RATE, 0x0010 }, + { NAU8825_REG_DAC_CTRL1, 0x0001 }, + { NAU8825_REG_DAC_CTRL2, 0x0 }, + { NAU8825_REG_DAC_DGAIN_CTRL, 0x0 }, + { NAU8825_REG_ADC_DGAIN_CTRL, 0x00cf }, + { NAU8825_REG_MUTE_CTRL, 0x0 }, + { NAU8825_REG_HSVOL_CTRL, 0x0 }, + { NAU8825_REG_DACL_CTRL, 0x02cf }, + { NAU8825_REG_DACR_CTRL, 0x00cf }, + { NAU8825_REG_ADC_DRC_KNEE_IP12, 0x1486 }, + { NAU8825_REG_ADC_DRC_KNEE_IP34, 0x0f12 }, + { NAU8825_REG_ADC_DRC_SLOPES, 0x25ff }, + { NAU8825_REG_ADC_DRC_ATKDCY, 0x3457 }, + { NAU8825_REG_DAC_DRC_KNEE_IP12, 0x1486 }, + { NAU8825_REG_DAC_DRC_KNEE_IP34, 0x0f12 }, + { NAU8825_REG_DAC_DRC_SLOPES, 0x25f9 }, + { NAU8825_REG_DAC_DRC_ATKDCY, 0x3457 }, + { NAU8825_REG_IMM_MODE_CTRL, 0x0 }, + { NAU8825_REG_CLASSG_CTRL, 0x0 }, + { NAU8825_REG_OPT_EFUSE_CTRL, 0x0 }, + { NAU8825_REG_MISC_CTRL, 0x0 }, + { NAU8825_REG_BIAS_ADJ, 0x0 }, + { NAU8825_REG_TRIM_SETTINGS, 0x0 }, + { NAU8825_REG_ANALOG_CONTROL_1, 0x0 }, + { NAU8825_REG_ANALOG_CONTROL_2, 0x0 }, + { NAU8825_REG_ANALOG_ADC_1, 0x0011 }, + { NAU8825_REG_ANALOG_ADC_2, 0x0020 }, + { NAU8825_REG_RDAC, 0x0008 }, + { NAU8825_REG_MIC_BIAS, 0x0006 }, + { NAU8825_REG_BOOST, 0x0 }, + { NAU8825_REG_FEPGA, 0x0 }, + { NAU8825_REG_POWER_UP_CONTROL, 0x0 }, + { NAU8825_REG_CHARGE_PUMP, 0x0 }, +}; + +/* register backup table when cross talk detection */ +static struct reg_default nau8825_xtalk_baktab[] = { + { NAU8825_REG_ADC_DGAIN_CTRL, 0x00cf }, + { NAU8825_REG_HSVOL_CTRL, 0 }, + { NAU8825_REG_DACL_CTRL, 0x00cf }, + { NAU8825_REG_DACR_CTRL, 0x02cf }, +}; + +static const unsigned short logtable[256] = { + 0x0000, 0x0171, 0x02e0, 0x044e, 0x05ba, 0x0725, 0x088e, 0x09f7, + 0x0b5d, 0x0cc3, 0x0e27, 0x0f8a, 0x10eb, 0x124b, 0x13aa, 0x1508, + 0x1664, 0x17bf, 0x1919, 0x1a71, 0x1bc8, 0x1d1e, 0x1e73, 0x1fc6, + 0x2119, 0x226a, 0x23ba, 0x2508, 0x2656, 0x27a2, 0x28ed, 0x2a37, + 0x2b80, 0x2cc8, 0x2e0f, 0x2f54, 0x3098, 0x31dc, 0x331e, 0x345f, + 0x359f, 0x36de, 0x381b, 0x3958, 0x3a94, 0x3bce, 0x3d08, 0x3e41, + 0x3f78, 0x40af, 0x41e4, 0x4319, 0x444c, 0x457f, 0x46b0, 0x47e1, + 0x4910, 0x4a3f, 0x4b6c, 0x4c99, 0x4dc5, 0x4eef, 0x5019, 0x5142, + 0x526a, 0x5391, 0x54b7, 0x55dc, 0x5700, 0x5824, 0x5946, 0x5a68, + 0x5b89, 0x5ca8, 0x5dc7, 0x5ee5, 0x6003, 0x611f, 0x623a, 0x6355, + 0x646f, 0x6588, 0x66a0, 0x67b7, 0x68ce, 0x69e4, 0x6af8, 0x6c0c, + 0x6d20, 0x6e32, 0x6f44, 0x7055, 0x7165, 0x7274, 0x7383, 0x7490, + 0x759d, 0x76aa, 0x77b5, 0x78c0, 0x79ca, 0x7ad3, 0x7bdb, 0x7ce3, + 0x7dea, 0x7ef0, 0x7ff6, 0x80fb, 0x81ff, 0x8302, 0x8405, 0x8507, + 0x8608, 0x8709, 0x8809, 0x8908, 0x8a06, 0x8b04, 0x8c01, 0x8cfe, + 0x8dfa, 0x8ef5, 0x8fef, 0x90e9, 0x91e2, 0x92db, 0x93d2, 0x94ca, + 0x95c0, 0x96b6, 0x97ab, 0x98a0, 0x9994, 0x9a87, 0x9b7a, 0x9c6c, + 0x9d5e, 0x9e4f, 0x9f3f, 0xa02e, 0xa11e, 0xa20c, 0xa2fa, 0xa3e7, + 0xa4d4, 0xa5c0, 0xa6ab, 0xa796, 0xa881, 0xa96a, 0xaa53, 0xab3c, + 0xac24, 0xad0c, 0xadf2, 0xaed9, 0xafbe, 0xb0a4, 0xb188, 0xb26c, + 0xb350, 0xb433, 0xb515, 0xb5f7, 0xb6d9, 0xb7ba, 0xb89a, 0xb97a, + 0xba59, 0xbb38, 0xbc16, 0xbcf4, 0xbdd1, 0xbead, 0xbf8a, 0xc065, + 0xc140, 0xc21b, 0xc2f5, 0xc3cf, 0xc4a8, 0xc580, 0xc658, 0xc730, + 0xc807, 0xc8de, 0xc9b4, 0xca8a, 0xcb5f, 0xcc34, 0xcd08, 0xcddc, + 0xceaf, 0xcf82, 0xd054, 0xd126, 0xd1f7, 0xd2c8, 0xd399, 0xd469, + 0xd538, 0xd607, 0xd6d6, 0xd7a4, 0xd872, 0xd93f, 0xda0c, 0xdad9, + 0xdba5, 0xdc70, 0xdd3b, 0xde06, 0xded0, 0xdf9a, 0xe063, 0xe12c, + 0xe1f5, 0xe2bd, 0xe385, 0xe44c, 0xe513, 0xe5d9, 0xe69f, 0xe765, + 0xe82a, 0xe8ef, 0xe9b3, 0xea77, 0xeb3b, 0xebfe, 0xecc1, 0xed83, + 0xee45, 0xef06, 0xefc8, 0xf088, 0xf149, 0xf209, 0xf2c8, 0xf387, + 0xf446, 0xf505, 0xf5c3, 0xf680, 0xf73e, 0xf7fb, 0xf8b7, 0xf973, + 0xfa2f, 0xfaea, 0xfba5, 0xfc60, 0xfd1a, 0xfdd4, 0xfe8e, 0xff47 +}; + +/** + * nau8825_sema_acquire - acquire the semaphore of nau88l25 + * @nau8825: component to register the codec private data with + * @timeout: how long in jiffies to wait before failure or zero to wait + * until release + * + * Attempts to acquire the semaphore with number of jiffies. If no more + * tasks are allowed to acquire the semaphore, calling this function will + * put the task to sleep. If the semaphore is not released within the + * specified number of jiffies, this function returns. + * If the semaphore is not released within the specified number of jiffies, + * this function returns -ETIME. If the sleep is interrupted by a signal, + * this function will return -EINTR. It returns 0 if the semaphore was + * acquired successfully. + * + * Acquires the semaphore without jiffies. Try to acquire the semaphore + * atomically. Returns 0 if the semaphore has been acquired successfully + * or 1 if it it cannot be acquired. + */ +static int nau8825_sema_acquire(struct nau8825 *nau8825, long timeout) +{ + int ret; + + if (timeout) { + ret = down_timeout(&nau8825->xtalk_sem, timeout); + if (ret < 0) + dev_warn(nau8825->dev, "Acquire semaphore timeout\n"); + } else { + ret = down_trylock(&nau8825->xtalk_sem); + if (ret) + dev_warn(nau8825->dev, "Acquire semaphore fail\n"); + } + + return ret; +} + +/** + * nau8825_sema_release - release the semaphore of nau88l25 + * @nau8825: component to register the codec private data with + * + * Release the semaphore which may be called from any context and + * even by tasks which have never called down(). + */ +static inline void nau8825_sema_release(struct nau8825 *nau8825) +{ + up(&nau8825->xtalk_sem); +} + +/** + * nau8825_sema_reset - reset the semaphore for nau88l25 + * @nau8825: component to register the codec private data with + * + * Reset the counter of the semaphore. Call this function to restart + * a new round task management. + */ +static inline void nau8825_sema_reset(struct nau8825 *nau8825) +{ + nau8825->xtalk_sem.count = 1; +} + +/** + * Ramp up the headphone volume change gradually to target level. + * + * @nau8825: component to register the codec private data with + * @vol_from: the volume to start up + * @vol_to: the target volume + * @step: the volume span to move on + * + * The headphone volume is from 0dB to minimum -54dB and -1dB per step. + * If the volume changes sharp, there is a pop noise heard in headphone. We + * provide the function to ramp up the volume up or down by delaying 10ms + * per step. + */ +static void nau8825_hpvol_ramp(struct nau8825 *nau8825, + unsigned int vol_from, unsigned int vol_to, unsigned int step) +{ + unsigned int value, volume, ramp_up, from, to; + + if (vol_from == vol_to || step == 0) { + return; + } else if (vol_from < vol_to) { + ramp_up = true; + from = vol_from; + to = vol_to; + } else { + ramp_up = false; + from = vol_to; + to = vol_from; + } + /* only handle volume from 0dB to minimum -54dB */ + if (to > NAU8825_HP_VOL_MIN) + to = NAU8825_HP_VOL_MIN; + + for (volume = from; volume < to; volume += step) { + if (ramp_up) + value = volume; + else + value = to - volume + from; + regmap_update_bits(nau8825->regmap, NAU8825_REG_HSVOL_CTRL, + NAU8825_HPL_VOL_MASK | NAU8825_HPR_VOL_MASK, + (value << NAU8825_HPL_VOL_SFT) | value); + usleep_range(10000, 10500); + } + if (ramp_up) + value = to; + else + value = from; + regmap_update_bits(nau8825->regmap, NAU8825_REG_HSVOL_CTRL, + NAU8825_HPL_VOL_MASK | NAU8825_HPR_VOL_MASK, + (value << NAU8825_HPL_VOL_SFT) | value); +} + +/** + * Computes log10 of a value; the result is round off to 3 decimal. This func- + * tion takes reference to dvb-math. The source code locates as the following. + * Linux/drivers/media/dvb-core/dvb_math.c + * + * return log10(value) * 1000 + */ +static u32 nau8825_intlog10_dec3(u32 value) +{ + u32 msb, logentry, significand, interpolation, log10val; + u64 log2val; + + /* first detect the msb (count begins at 0) */ + msb = fls(value) - 1; + /** + * now we use a logtable after the following method: + * + * log2(2^x * y) * 2^24 = x * 2^24 + log2(y) * 2^24 + * where x = msb and therefore 1 <= y < 2 + * first y is determined by shifting the value left + * so that msb is bit 31 + * 0x00231f56 -> 0x8C7D5800 + * the result is y * 2^31 -> "significand" + * then the highest 9 bits are used for a table lookup + * the highest bit is discarded because it's always set + * the highest nine bits in our example are 100011000 + * so we would use the entry 0x18 + */ + significand = value << (31 - msb); + logentry = (significand >> 23) & 0xff; + /** + * last step we do is interpolation because of the + * limitations of the log table the error is that part of + * the significand which isn't used for lookup then we + * compute the ratio between the error and the next table entry + * and interpolate it between the log table entry used and the + * next one the biggest error possible is 0x7fffff + * (in our example it's 0x7D5800) + * needed value for next table entry is 0x800000 + * so the interpolation is + * (error / 0x800000) * (logtable_next - logtable_current) + * in the implementation the division is moved to the end for + * better accuracy there is also an overflow correction if + * logtable_next is 256 + */ + interpolation = ((significand & 0x7fffff) * + ((logtable[(logentry + 1) & 0xff] - + logtable[logentry]) & 0xffff)) >> 15; + + log2val = ((msb << 24) + (logtable[logentry] << 8) + interpolation); + /** + * log10(x) = log2(x) * log10(2) + */ + log10val = (log2val * LOG10_MAGIC) >> 31; + /** + * the result is round off to 3 decimal + */ + return log10val / ((1 << 24) / 1000); +} + +/** + * computes cross talk suppression sidetone gain. + * + * @sig_org: orignal signal level + * @sig_cros: cross talk signal level + * + * The orignal and cross talk signal vlues need to be characterized. + * Once these values have been characterized, this sidetone value + * can be converted to decibel with the equation below. + * sidetone = 20 * log (original signal level / crosstalk signal level) + * + * return cross talk sidetone gain + */ +static u32 nau8825_xtalk_sidetone(u32 sig_org, u32 sig_cros) +{ + u32 gain, sidetone; + + if (unlikely(sig_org == 0) || unlikely(sig_cros == 0)) { + WARN_ON(1); + return 0; + } + + sig_org = nau8825_intlog10_dec3(sig_org); + sig_cros = nau8825_intlog10_dec3(sig_cros); + if (sig_org >= sig_cros) + gain = (sig_org - sig_cros) * 20 + GAIN_AUGMENT; + else + gain = (sig_cros - sig_org) * 20 + GAIN_AUGMENT; + sidetone = SIDETONE_BASE - gain * 2; + sidetone /= 1000; + + return sidetone; +} + +static int nau8825_xtalk_baktab_index_by_reg(unsigned int reg) +{ + int index; + + for (index = 0; index < ARRAY_SIZE(nau8825_xtalk_baktab); index++) + if (nau8825_xtalk_baktab[index].reg == reg) + return index; + return -EINVAL; +} + +static void nau8825_xtalk_backup(struct nau8825 *nau8825) +{ + int i; + + if (nau8825->xtalk_baktab_initialized) + return; + + /* Backup some register values to backup table */ + for (i = 0; i < ARRAY_SIZE(nau8825_xtalk_baktab); i++) + regmap_read(nau8825->regmap, nau8825_xtalk_baktab[i].reg, + &nau8825_xtalk_baktab[i].def); + + nau8825->xtalk_baktab_initialized = true; +} + +static void nau8825_xtalk_restore(struct nau8825 *nau8825, bool cause_cancel) +{ + int i, volume; + + if (!nau8825->xtalk_baktab_initialized) + return; + + /* Restore register values from backup table; When the driver restores + * the headphone volume in XTALK_DONE state, it needs recover to + * original level gradually with 3dB per step for less pop noise. + * Otherwise, the restore should do ASAP. + */ + for (i = 0; i < ARRAY_SIZE(nau8825_xtalk_baktab); i++) { + if (!cause_cancel && nau8825_xtalk_baktab[i].reg == + NAU8825_REG_HSVOL_CTRL) { + /* Ramping up the volume change to reduce pop noise */ + volume = nau8825_xtalk_baktab[i].def & + NAU8825_HPR_VOL_MASK; + nau8825_hpvol_ramp(nau8825, 0, volume, 3); + continue; + } + regmap_write(nau8825->regmap, nau8825_xtalk_baktab[i].reg, + nau8825_xtalk_baktab[i].def); + } + + nau8825->xtalk_baktab_initialized = false; +} + +static void nau8825_xtalk_prepare_dac(struct nau8825 *nau8825) +{ + /* Enable power of DAC path */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_ENA_CTRL, + NAU8825_ENABLE_DACR | NAU8825_ENABLE_DACL | + NAU8825_ENABLE_ADC | NAU8825_ENABLE_ADC_CLK | + NAU8825_ENABLE_DAC_CLK, NAU8825_ENABLE_DACR | + NAU8825_ENABLE_DACL | NAU8825_ENABLE_ADC | + NAU8825_ENABLE_ADC_CLK | NAU8825_ENABLE_DAC_CLK); + /* Prevent startup click by letting charge pump to ramp up and + * change bump enable + */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_CHARGE_PUMP, + NAU8825_JAMNODCLOW | NAU8825_CHANRGE_PUMP_EN, + NAU8825_JAMNODCLOW | NAU8825_CHANRGE_PUMP_EN); + /* Enable clock sync of DAC and DAC clock */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_RDAC, + NAU8825_RDAC_EN | NAU8825_RDAC_CLK_EN | + NAU8825_RDAC_FS_BCLK_ENB, + NAU8825_RDAC_EN | NAU8825_RDAC_CLK_EN); + /* Power up output driver with 2 stage */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_POWER_UP_CONTROL, + NAU8825_POWERUP_INTEGR_R | NAU8825_POWERUP_INTEGR_L | + NAU8825_POWERUP_DRV_IN_R | NAU8825_POWERUP_DRV_IN_L, + NAU8825_POWERUP_INTEGR_R | NAU8825_POWERUP_INTEGR_L | + NAU8825_POWERUP_DRV_IN_R | NAU8825_POWERUP_DRV_IN_L); + regmap_update_bits(nau8825->regmap, NAU8825_REG_POWER_UP_CONTROL, + NAU8825_POWERUP_HP_DRV_R | NAU8825_POWERUP_HP_DRV_L, + NAU8825_POWERUP_HP_DRV_R | NAU8825_POWERUP_HP_DRV_L); + /* HP outputs not shouted to ground */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_HSD_CTRL, + NAU8825_SPKR_DWN1R | NAU8825_SPKR_DWN1L, 0); + /* Enable HP boost driver */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_BOOST, + NAU8825_HP_BOOST_DIS, NAU8825_HP_BOOST_DIS); + /* Enable class G compare path to supply 1.8V or 0.9V. */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_CLASSG_CTRL, + NAU8825_CLASSG_LDAC_EN | NAU8825_CLASSG_RDAC_EN, + NAU8825_CLASSG_LDAC_EN | NAU8825_CLASSG_RDAC_EN); +} + +static void nau8825_xtalk_prepare_adc(struct nau8825 *nau8825) +{ + /* Power up left ADC and raise 5dB than Vmid for Vref */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_ANALOG_ADC_2, + NAU8825_POWERUP_ADCL | NAU8825_ADC_VREFSEL_MASK, + NAU8825_POWERUP_ADCL | NAU8825_ADC_VREFSEL_VMID_PLUS_0_5DB); +} + +static void nau8825_xtalk_clock(struct nau8825 *nau8825) +{ + /* Recover FLL default value */ + regmap_write(nau8825->regmap, NAU8825_REG_FLL1, 0x0); + regmap_write(nau8825->regmap, NAU8825_REG_FLL2, 0x3126); + regmap_write(nau8825->regmap, NAU8825_REG_FLL3, 0x0008); + regmap_write(nau8825->regmap, NAU8825_REG_FLL4, 0x0010); + regmap_write(nau8825->regmap, NAU8825_REG_FLL5, 0x0); + regmap_write(nau8825->regmap, NAU8825_REG_FLL6, 0x6000); + /* Enable internal VCO clock for detection signal generated */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_CLK_DIVIDER, + NAU8825_CLK_SRC_MASK, NAU8825_CLK_SRC_VCO); + regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL6, NAU8825_DCO_EN, + NAU8825_DCO_EN); + /* Given specific clock frequency of internal clock to + * generate signal. + */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_CLK_DIVIDER, + NAU8825_CLK_MCLK_SRC_MASK, 0xf); + regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL1, + NAU8825_FLL_RATIO_MASK, 0x10); +} + +static void nau8825_xtalk_prepare(struct nau8825 *nau8825) +{ + int volume, index; + + /* Backup those registers changed by cross talk detection */ + nau8825_xtalk_backup(nau8825); + /* Config IIS as master to output signal by codec */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2, + NAU8825_I2S_MS_MASK | NAU8825_I2S_LRC_DIV_MASK | + NAU8825_I2S_BLK_DIV_MASK, NAU8825_I2S_MS_MASTER | + (0x2 << NAU8825_I2S_LRC_DIV_SFT) | 0x1); + /* Ramp up headphone volume to 0dB to get better performance and + * avoid pop noise in headphone. + */ + index = nau8825_xtalk_baktab_index_by_reg(NAU8825_REG_HSVOL_CTRL); + if (index != -EINVAL) { + volume = nau8825_xtalk_baktab[index].def & + NAU8825_HPR_VOL_MASK; + nau8825_hpvol_ramp(nau8825, volume, 0, 3); + } + nau8825_xtalk_clock(nau8825); + nau8825_xtalk_prepare_dac(nau8825); + nau8825_xtalk_prepare_adc(nau8825); + /* Config channel path and digital gain */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_DACL_CTRL, + NAU8825_DACL_CH_SEL_MASK | NAU8825_DACL_CH_VOL_MASK, + NAU8825_DACL_CH_SEL_L | 0xab); + regmap_update_bits(nau8825->regmap, NAU8825_REG_DACR_CTRL, + NAU8825_DACR_CH_SEL_MASK | NAU8825_DACR_CH_VOL_MASK, + NAU8825_DACR_CH_SEL_R | 0xab); + /* Config cross talk parameters and generate the 23Hz sine wave with + * 1/16 full scale of signal level for impedance measurement. + */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_IMM_MODE_CTRL, + NAU8825_IMM_THD_MASK | NAU8825_IMM_GEN_VOL_MASK | + NAU8825_IMM_CYC_MASK | NAU8825_IMM_DAC_SRC_MASK, + (0x9 << NAU8825_IMM_THD_SFT) | NAU8825_IMM_GEN_VOL_1_16th | + NAU8825_IMM_CYC_8192 | NAU8825_IMM_DAC_SRC_SIN); + /* RMS intrruption enable */ + regmap_update_bits(nau8825->regmap, + NAU8825_REG_INTERRUPT_MASK, NAU8825_IRQ_RMS_EN, 0); + /* Power up left and right DAC */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_CHARGE_PUMP, + NAU8825_POWER_DOWN_DACR | NAU8825_POWER_DOWN_DACL, 0); +} + +static void nau8825_xtalk_clean_dac(struct nau8825 *nau8825) +{ + /* Disable HP boost driver */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_BOOST, + NAU8825_HP_BOOST_DIS, 0); + /* HP outputs shouted to ground */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_HSD_CTRL, + NAU8825_SPKR_DWN1R | NAU8825_SPKR_DWN1L, + NAU8825_SPKR_DWN1R | NAU8825_SPKR_DWN1L); + /* Power down left and right DAC */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_CHARGE_PUMP, + NAU8825_POWER_DOWN_DACR | NAU8825_POWER_DOWN_DACL, + NAU8825_POWER_DOWN_DACR | NAU8825_POWER_DOWN_DACL); + /* Enable the TESTDAC and disable L/R HP impedance */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, + NAU8825_BIAS_HPR_IMP | NAU8825_BIAS_HPL_IMP | + NAU8825_BIAS_TESTDAC_EN, NAU8825_BIAS_TESTDAC_EN); + /* Power down output driver with 2 stage */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_POWER_UP_CONTROL, + NAU8825_POWERUP_HP_DRV_R | NAU8825_POWERUP_HP_DRV_L, 0); + regmap_update_bits(nau8825->regmap, NAU8825_REG_POWER_UP_CONTROL, + NAU8825_POWERUP_INTEGR_R | NAU8825_POWERUP_INTEGR_L | + NAU8825_POWERUP_DRV_IN_R | NAU8825_POWERUP_DRV_IN_L, 0); + /* Disable clock sync of DAC and DAC clock */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_RDAC, + NAU8825_RDAC_EN | NAU8825_RDAC_CLK_EN, 0); + /* Disable charge pump ramp up function and change bump */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_CHARGE_PUMP, + NAU8825_JAMNODCLOW | NAU8825_CHANRGE_PUMP_EN, 0); + /* Disable power of DAC path */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_ENA_CTRL, + NAU8825_ENABLE_DACR | NAU8825_ENABLE_DACL | + NAU8825_ENABLE_ADC_CLK | NAU8825_ENABLE_DAC_CLK, 0); + if (!nau8825->irq) + regmap_update_bits(nau8825->regmap, + NAU8825_REG_ENA_CTRL, NAU8825_ENABLE_ADC, 0); +} + +static void nau8825_xtalk_clean_adc(struct nau8825 *nau8825) +{ + /* Power down left ADC and restore voltage to Vmid */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_ANALOG_ADC_2, + NAU8825_POWERUP_ADCL | NAU8825_ADC_VREFSEL_MASK, 0); +} + +static void nau8825_xtalk_clean(struct nau8825 *nau8825, bool cause_cancel) +{ + /* Enable internal VCO needed for interruptions */ + nau8825_configure_sysclk(nau8825, NAU8825_CLK_INTERNAL, 0); + nau8825_xtalk_clean_dac(nau8825); + nau8825_xtalk_clean_adc(nau8825); + /* Clear cross talk parameters and disable */ + regmap_write(nau8825->regmap, NAU8825_REG_IMM_MODE_CTRL, 0); + /* RMS intrruption disable */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_INTERRUPT_MASK, + NAU8825_IRQ_RMS_EN, NAU8825_IRQ_RMS_EN); + /* Recover default value for IIS */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2, + NAU8825_I2S_MS_MASK | NAU8825_I2S_LRC_DIV_MASK | + NAU8825_I2S_BLK_DIV_MASK, NAU8825_I2S_MS_SLAVE); + /* Restore value of specific register for cross talk */ + nau8825_xtalk_restore(nau8825, cause_cancel); +} + +static void nau8825_xtalk_imm_start(struct nau8825 *nau8825, int vol) +{ + /* Apply ADC volume for better cross talk performance */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_ADC_DGAIN_CTRL, + NAU8825_ADC_DIG_VOL_MASK, vol); + /* Disables JKTIP(HPL) DAC channel for right to left measurement. + * Do it before sending signal in order to erase pop noise. + */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, + NAU8825_BIAS_TESTDACR_EN | NAU8825_BIAS_TESTDACL_EN, + NAU8825_BIAS_TESTDACL_EN); + switch (nau8825->xtalk_state) { + case NAU8825_XTALK_HPR_R2L: + /* Enable right headphone impedance */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, + NAU8825_BIAS_HPR_IMP | NAU8825_BIAS_HPL_IMP, + NAU8825_BIAS_HPR_IMP); + break; + case NAU8825_XTALK_HPL_R2L: + /* Enable left headphone impedance */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, + NAU8825_BIAS_HPR_IMP | NAU8825_BIAS_HPL_IMP, + NAU8825_BIAS_HPL_IMP); + break; + default: + break; + } + msleep(100); + /* Impedance measurement mode enable */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_IMM_MODE_CTRL, + NAU8825_IMM_EN, NAU8825_IMM_EN); +} + +static void nau8825_xtalk_imm_stop(struct nau8825 *nau8825) +{ + /* Impedance measurement mode disable */ + regmap_update_bits(nau8825->regmap, + NAU8825_REG_IMM_MODE_CTRL, NAU8825_IMM_EN, 0); +} + +/* The cross talk measurement function can reduce cross talk across the + * JKTIP(HPL) and JKR1(HPR) outputs which measures the cross talk signal + * level to determine what cross talk reduction gain is. This system works by + * sending a 23Hz -24dBV sine wave into the headset output DAC and through + * the PGA. The output of the PGA is then connected to an internal current + * sense which measures the attenuated 23Hz signal and passing the output to + * an ADC which converts the measurement to a binary code. With two separated + * measurement, one for JKR1(HPR) and the other JKTIP(HPL), measurement data + * can be separated read in IMM_RMS_L for HSR and HSL after each measurement. + * Thus, the measurement function has four states to complete whole sequence. + * 1. Prepare state : Prepare the resource for detection and transfer to HPR + * IMM stat to make JKR1(HPR) impedance measure. + * 2. HPR IMM state : Read out orignal signal level of JKR1(HPR) and transfer + * to HPL IMM state to make JKTIP(HPL) impedance measure. + * 3. HPL IMM state : Read out cross talk signal level of JKTIP(HPL) and + * transfer to IMM state to determine suppression sidetone gain. + * 4. IMM state : Computes cross talk suppression sidetone gain with orignal + * and cross talk signal level. Apply this gain and then restore codec + * configuration. Then transfer to Done state for ending. + */ +static void nau8825_xtalk_measure(struct nau8825 *nau8825) +{ + u32 sidetone; + + switch (nau8825->xtalk_state) { + case NAU8825_XTALK_PREPARE: + /* In prepare state, set up clock, intrruption, DAC path, ADC + * path and cross talk detection parameters for preparation. + */ + nau8825_xtalk_prepare(nau8825); + msleep(280); + /* Trigger right headphone impedance detection */ + nau8825->xtalk_state = NAU8825_XTALK_HPR_R2L; + nau8825_xtalk_imm_start(nau8825, 0x00d2); + break; + case NAU8825_XTALK_HPR_R2L: + /* In right headphone IMM state, read out right headphone + * impedance measure result, and then start up left side. + */ + regmap_read(nau8825->regmap, NAU8825_REG_IMM_RMS_L, + &nau8825->imp_rms[NAU8825_XTALK_HPR_R2L]); + dev_dbg(nau8825->dev, "HPR_R2L imm: %x\n", + nau8825->imp_rms[NAU8825_XTALK_HPR_R2L]); + /* Disable then re-enable IMM mode to update */ + nau8825_xtalk_imm_stop(nau8825); + /* Trigger left headphone impedance detection */ + nau8825->xtalk_state = NAU8825_XTALK_HPL_R2L; + nau8825_xtalk_imm_start(nau8825, 0x00ff); + break; + case NAU8825_XTALK_HPL_R2L: + /* In left headphone IMM state, read out left headphone + * impedance measure result, and delay some time to wait + * detection sine wave output finish. Then, we can calculate + * the cross talk suppresstion side tone according to the L/R + * headphone imedance. + */ + regmap_read(nau8825->regmap, NAU8825_REG_IMM_RMS_L, + &nau8825->imp_rms[NAU8825_XTALK_HPL_R2L]); + dev_dbg(nau8825->dev, "HPL_R2L imm: %x\n", + nau8825->imp_rms[NAU8825_XTALK_HPL_R2L]); + nau8825_xtalk_imm_stop(nau8825); + msleep(150); + nau8825->xtalk_state = NAU8825_XTALK_IMM; + break; + case NAU8825_XTALK_IMM: + /* In impedance measure state, the orignal and cross talk + * signal level vlues are ready. The side tone gain is deter- + * mined with these signal level. After all, restore codec + * configuration. + */ + sidetone = nau8825_xtalk_sidetone( + nau8825->imp_rms[NAU8825_XTALK_HPR_R2L], + nau8825->imp_rms[NAU8825_XTALK_HPL_R2L]); + dev_dbg(nau8825->dev, "cross talk sidetone: %x\n", sidetone); + regmap_write(nau8825->regmap, NAU8825_REG_DAC_DGAIN_CTRL, + (sidetone << 8) | sidetone); + nau8825_xtalk_clean(nau8825, false); + nau8825->xtalk_state = NAU8825_XTALK_DONE; + break; + default: + break; + } +} + +static void nau8825_xtalk_work(struct work_struct *work) +{ + struct nau8825 *nau8825 = container_of( + work, struct nau8825, xtalk_work); + + nau8825_xtalk_measure(nau8825); + /* To determine the cross talk side tone gain when reach + * the impedance measure state. + */ + if (nau8825->xtalk_state == NAU8825_XTALK_IMM) + nau8825_xtalk_measure(nau8825); + + /* Delay jack report until cross talk detection process + * completed. It can avoid application to do playback + * preparation before cross talk detection is still working. + * Meanwhile, the protection of the cross talk detection + * is released. + */ + if (nau8825->xtalk_state == NAU8825_XTALK_DONE) { + snd_soc_jack_report(nau8825->jack, nau8825->xtalk_event, + nau8825->xtalk_event_mask); + nau8825_sema_release(nau8825); + nau8825->xtalk_protect = false; + } +} + +static void nau8825_xtalk_cancel(struct nau8825 *nau8825) +{ + /* If the crosstalk is eanbled and the process is on going, + * the driver forces to cancel the crosstalk task and + * restores the configuration to original status. + */ + if (nau8825->xtalk_enable && nau8825->xtalk_state != + NAU8825_XTALK_DONE) { + cancel_work_sync(&nau8825->xtalk_work); + nau8825_xtalk_clean(nau8825, true); + } + /* Reset parameters for cross talk suppression function */ + nau8825_sema_reset(nau8825); + nau8825->xtalk_state = NAU8825_XTALK_DONE; + nau8825->xtalk_protect = false; +} + +static bool nau8825_readable_reg(struct device *dev, unsigned int reg) +{ + switch (reg) { + case NAU8825_REG_ENA_CTRL ... NAU8825_REG_FLL_VCO_RSV: + case NAU8825_REG_HSD_CTRL ... NAU8825_REG_JACK_DET_CTRL: + case NAU8825_REG_INTERRUPT_MASK ... NAU8825_REG_KEYDET_CTRL: + case NAU8825_REG_VDET_THRESHOLD_1 ... NAU8825_REG_DACR_CTRL: + case NAU8825_REG_ADC_DRC_KNEE_IP12 ... NAU8825_REG_ADC_DRC_ATKDCY: + case NAU8825_REG_DAC_DRC_KNEE_IP12 ... NAU8825_REG_DAC_DRC_ATKDCY: + case NAU8825_REG_IMM_MODE_CTRL ... NAU8825_REG_IMM_RMS_R: + case NAU8825_REG_CLASSG_CTRL ... NAU8825_REG_OPT_EFUSE_CTRL: + case NAU8825_REG_MISC_CTRL: + case NAU8825_REG_I2C_DEVICE_ID ... NAU8825_REG_SARDOUT_RAM_STATUS: + case NAU8825_REG_BIAS_ADJ: + case NAU8825_REG_TRIM_SETTINGS ... NAU8825_REG_ANALOG_CONTROL_2: + case NAU8825_REG_ANALOG_ADC_1 ... NAU8825_REG_MIC_BIAS: + case NAU8825_REG_BOOST ... NAU8825_REG_FEPGA: + case NAU8825_REG_POWER_UP_CONTROL ... NAU8825_REG_GENERAL_STATUS: + return true; + default: + return false; + } + +} + +static bool nau8825_writeable_reg(struct device *dev, unsigned int reg) +{ + switch (reg) { + case NAU8825_REG_RESET ... NAU8825_REG_FLL_VCO_RSV: + case NAU8825_REG_HSD_CTRL ... NAU8825_REG_JACK_DET_CTRL: + case NAU8825_REG_INTERRUPT_MASK: + case NAU8825_REG_INT_CLR_KEY_STATUS ... NAU8825_REG_KEYDET_CTRL: + case NAU8825_REG_VDET_THRESHOLD_1 ... NAU8825_REG_DACR_CTRL: + case NAU8825_REG_ADC_DRC_KNEE_IP12 ... NAU8825_REG_ADC_DRC_ATKDCY: + case NAU8825_REG_DAC_DRC_KNEE_IP12 ... NAU8825_REG_DAC_DRC_ATKDCY: + case NAU8825_REG_IMM_MODE_CTRL: + case NAU8825_REG_CLASSG_CTRL ... NAU8825_REG_OPT_EFUSE_CTRL: + case NAU8825_REG_MISC_CTRL: + case NAU8825_REG_BIAS_ADJ: + case NAU8825_REG_TRIM_SETTINGS ... NAU8825_REG_ANALOG_CONTROL_2: + case NAU8825_REG_ANALOG_ADC_1 ... NAU8825_REG_MIC_BIAS: + case NAU8825_REG_BOOST ... NAU8825_REG_FEPGA: + case NAU8825_REG_POWER_UP_CONTROL ... NAU8825_REG_CHARGE_PUMP: + return true; + default: + return false; + } +} + +static bool nau8825_volatile_reg(struct device *dev, unsigned int reg) +{ + switch (reg) { + case NAU8825_REG_RESET: + case NAU8825_REG_IRQ_STATUS: + case NAU8825_REG_INT_CLR_KEY_STATUS: + case NAU8825_REG_IMM_RMS_L: + case NAU8825_REG_IMM_RMS_R: + case NAU8825_REG_I2C_DEVICE_ID: + case NAU8825_REG_SARDOUT_RAM_STATUS: + case NAU8825_REG_CHARGE_PUMP_INPUT_READ: + case NAU8825_REG_GENERAL_STATUS: + case NAU8825_REG_BIQ_CTRL ... NAU8825_REG_BIQ_COF10: + return true; + default: + return false; + } +} + +static int nau8825_adc_event(struct snd_soc_dapm_widget *w, + struct snd_kcontrol *kcontrol, int event) +{ + struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); + struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); + + switch (event) { + case SND_SOC_DAPM_POST_PMU: + msleep(125); + regmap_update_bits(nau8825->regmap, NAU8825_REG_ENA_CTRL, + NAU8825_ENABLE_ADC, NAU8825_ENABLE_ADC); + break; + case SND_SOC_DAPM_POST_PMD: + if (!nau8825->irq) + regmap_update_bits(nau8825->regmap, + NAU8825_REG_ENA_CTRL, NAU8825_ENABLE_ADC, 0); + break; + default: + return -EINVAL; + } + + return 0; +} + +static int nau8825_pump_event(struct snd_soc_dapm_widget *w, + struct snd_kcontrol *kcontrol, int event) +{ + struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); + struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); + + switch (event) { + case SND_SOC_DAPM_POST_PMU: + /* Prevent startup click by letting charge pump to ramp up */ + msleep(10); + regmap_update_bits(nau8825->regmap, NAU8825_REG_CHARGE_PUMP, + NAU8825_JAMNODCLOW, NAU8825_JAMNODCLOW); + break; + case SND_SOC_DAPM_PRE_PMD: + regmap_update_bits(nau8825->regmap, NAU8825_REG_CHARGE_PUMP, + NAU8825_JAMNODCLOW, 0); + break; + default: + return -EINVAL; + } + + return 0; +} + +static int nau8825_output_dac_event(struct snd_soc_dapm_widget *w, + struct snd_kcontrol *kcontrol, int event) +{ + struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); + struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); + + switch (event) { + case SND_SOC_DAPM_PRE_PMU: + /* Disables the TESTDAC to let DAC signal pass through. */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, + NAU8825_BIAS_TESTDAC_EN, 0); + break; + case SND_SOC_DAPM_POST_PMD: + regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, + NAU8825_BIAS_TESTDAC_EN, NAU8825_BIAS_TESTDAC_EN); + break; + default: + return -EINVAL; + } + + return 0; +} + +static int nau8825_biq_coeff_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); + struct soc_bytes_ext *params = (void *)kcontrol->private_value; + + if (!component->regmap) + return -EINVAL; + + regmap_raw_read(component->regmap, NAU8825_REG_BIQ_COF1, + ucontrol->value.bytes.data, params->max); + return 0; +} + +static int nau8825_biq_coeff_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); + struct soc_bytes_ext *params = (void *)kcontrol->private_value; + void *data; + + if (!component->regmap) + return -EINVAL; + + data = kmemdup(ucontrol->value.bytes.data, + params->max, GFP_KERNEL | GFP_DMA); + if (!data) + return -ENOMEM; + + regmap_update_bits(component->regmap, NAU8825_REG_BIQ_CTRL, + NAU8825_BIQ_WRT_EN, 0); + regmap_raw_write(component->regmap, NAU8825_REG_BIQ_COF1, + data, params->max); + regmap_update_bits(component->regmap, NAU8825_REG_BIQ_CTRL, + NAU8825_BIQ_WRT_EN, NAU8825_BIQ_WRT_EN); + + kfree(data); + return 0; +} + +static const char * const nau8825_biq_path[] = { + "ADC", "DAC" +}; + +static const struct soc_enum nau8825_biq_path_enum = + SOC_ENUM_SINGLE(NAU8825_REG_BIQ_CTRL, NAU8825_BIQ_PATH_SFT, + ARRAY_SIZE(nau8825_biq_path), nau8825_biq_path); + +static const char * const nau8825_adc_decimation[] = { + "32", "64", "128", "256" +}; + +static const struct soc_enum nau8825_adc_decimation_enum = + SOC_ENUM_SINGLE(NAU8825_REG_ADC_RATE, NAU8825_ADC_SYNC_DOWN_SFT, + ARRAY_SIZE(nau8825_adc_decimation), nau8825_adc_decimation); + +static const char * const nau8825_dac_oversampl[] = { + "64", "256", "128", "", "32" +}; + +static const struct soc_enum nau8825_dac_oversampl_enum = + SOC_ENUM_SINGLE(NAU8825_REG_DAC_CTRL1, NAU8825_DAC_OVERSAMPLE_SFT, + ARRAY_SIZE(nau8825_dac_oversampl), nau8825_dac_oversampl); + +static const DECLARE_TLV_DB_MINMAX_MUTE(adc_vol_tlv, -10300, 2400); +static const DECLARE_TLV_DB_MINMAX_MUTE(sidetone_vol_tlv, -4200, 0); +static const DECLARE_TLV_DB_MINMAX(dac_vol_tlv, -5400, 0); +static const DECLARE_TLV_DB_MINMAX(fepga_gain_tlv, -100, 3600); +static const DECLARE_TLV_DB_MINMAX_MUTE(crosstalk_vol_tlv, -9600, 2400); + +static const struct snd_kcontrol_new nau8825_controls[] = { + SOC_SINGLE_TLV("Mic Volume", NAU8825_REG_ADC_DGAIN_CTRL, + 0, 0xff, 0, adc_vol_tlv), + SOC_DOUBLE_TLV("Headphone Bypass Volume", NAU8825_REG_ADC_DGAIN_CTRL, + 12, 8, 0x0f, 0, sidetone_vol_tlv), + SOC_DOUBLE_TLV("Headphone Volume", NAU8825_REG_HSVOL_CTRL, + 6, 0, 0x3f, 1, dac_vol_tlv), + SOC_SINGLE_TLV("Frontend PGA Volume", NAU8825_REG_POWER_UP_CONTROL, + 8, 37, 0, fepga_gain_tlv), + SOC_DOUBLE_TLV("Headphone Crosstalk Volume", NAU8825_REG_DAC_DGAIN_CTRL, + 0, 8, 0xff, 0, crosstalk_vol_tlv), + + SOC_ENUM("ADC Decimation Rate", nau8825_adc_decimation_enum), + SOC_ENUM("DAC Oversampling Rate", nau8825_dac_oversampl_enum), + /* programmable biquad filter */ + SOC_ENUM("BIQ Path Select", nau8825_biq_path_enum), + SND_SOC_BYTES_EXT("BIQ Coefficients", 20, + nau8825_biq_coeff_get, nau8825_biq_coeff_put), +}; + +/* DAC Mux 0x33[9] and 0x34[9] */ +static const char * const nau8825_dac_src[] = { + "DACL", "DACR", +}; + +static SOC_ENUM_SINGLE_DECL( + nau8825_dacl_enum, NAU8825_REG_DACL_CTRL, + NAU8825_DACL_CH_SEL_SFT, nau8825_dac_src); + +static SOC_ENUM_SINGLE_DECL( + nau8825_dacr_enum, NAU8825_REG_DACR_CTRL, + NAU8825_DACR_CH_SEL_SFT, nau8825_dac_src); + +static const struct snd_kcontrol_new nau8825_dacl_mux = + SOC_DAPM_ENUM("DACL Source", nau8825_dacl_enum); + +static const struct snd_kcontrol_new nau8825_dacr_mux = + SOC_DAPM_ENUM("DACR Source", nau8825_dacr_enum); + + +static const struct snd_soc_dapm_widget nau8825_dapm_widgets[] = { + SND_SOC_DAPM_AIF_OUT("AIFTX", "Capture", 0, NAU8825_REG_I2S_PCM_CTRL2, + 15, 1), + + SND_SOC_DAPM_INPUT("MIC"), + SND_SOC_DAPM_MICBIAS("MICBIAS", NAU8825_REG_MIC_BIAS, 8, 0), + + SND_SOC_DAPM_PGA("Frontend PGA", NAU8825_REG_POWER_UP_CONTROL, 14, 0, + NULL, 0), + + SND_SOC_DAPM_ADC_E("ADC", NULL, SND_SOC_NOPM, 0, 0, + nau8825_adc_event, SND_SOC_DAPM_POST_PMU | + SND_SOC_DAPM_POST_PMD), + SND_SOC_DAPM_SUPPLY("ADC Clock", NAU8825_REG_ENA_CTRL, 7, 0, NULL, 0), + SND_SOC_DAPM_SUPPLY("ADC Power", NAU8825_REG_ANALOG_ADC_2, 6, 0, NULL, + 0), + + /* ADC for button press detection. A dapm supply widget is used to + * prevent dapm_power_widgets keeping the codec at SND_SOC_BIAS_ON + * during suspend. + */ + SND_SOC_DAPM_SUPPLY("SAR", NAU8825_REG_SAR_CTRL, + NAU8825_SAR_ADC_EN_SFT, 0, NULL, 0), + + SND_SOC_DAPM_PGA_S("ADACL", 2, NAU8825_REG_RDAC, 12, 0, NULL, 0), + SND_SOC_DAPM_PGA_S("ADACR", 2, NAU8825_REG_RDAC, 13, 0, NULL, 0), + SND_SOC_DAPM_PGA_S("ADACL Clock", 3, NAU8825_REG_RDAC, 8, 0, NULL, 0), + SND_SOC_DAPM_PGA_S("ADACR Clock", 3, NAU8825_REG_RDAC, 9, 0, NULL, 0), + + SND_SOC_DAPM_DAC("DDACR", NULL, NAU8825_REG_ENA_CTRL, + NAU8825_ENABLE_DACR_SFT, 0), + SND_SOC_DAPM_DAC("DDACL", NULL, NAU8825_REG_ENA_CTRL, + NAU8825_ENABLE_DACL_SFT, 0), + SND_SOC_DAPM_SUPPLY("DDAC Clock", NAU8825_REG_ENA_CTRL, 6, 0, NULL, 0), + + SND_SOC_DAPM_MUX("DACL Mux", SND_SOC_NOPM, 0, 0, &nau8825_dacl_mux), + SND_SOC_DAPM_MUX("DACR Mux", SND_SOC_NOPM, 0, 0, &nau8825_dacr_mux), + + SND_SOC_DAPM_PGA_S("HP amp L", 0, + NAU8825_REG_CLASSG_CTRL, 1, 0, NULL, 0), + SND_SOC_DAPM_PGA_S("HP amp R", 0, + NAU8825_REG_CLASSG_CTRL, 2, 0, NULL, 0), + + SND_SOC_DAPM_PGA_S("Charge Pump", 1, NAU8825_REG_CHARGE_PUMP, 5, 0, + nau8825_pump_event, SND_SOC_DAPM_POST_PMU | + SND_SOC_DAPM_PRE_PMD), + + SND_SOC_DAPM_PGA_S("Output Driver R Stage 1", 4, + NAU8825_REG_POWER_UP_CONTROL, 5, 0, NULL, 0), + SND_SOC_DAPM_PGA_S("Output Driver L Stage 1", 4, + NAU8825_REG_POWER_UP_CONTROL, 4, 0, NULL, 0), + SND_SOC_DAPM_PGA_S("Output Driver R Stage 2", 5, + NAU8825_REG_POWER_UP_CONTROL, 3, 0, NULL, 0), + SND_SOC_DAPM_PGA_S("Output Driver L Stage 2", 5, + NAU8825_REG_POWER_UP_CONTROL, 2, 0, NULL, 0), + SND_SOC_DAPM_PGA_S("Output Driver R Stage 3", 6, + NAU8825_REG_POWER_UP_CONTROL, 1, 0, NULL, 0), + SND_SOC_DAPM_PGA_S("Output Driver L Stage 3", 6, + NAU8825_REG_POWER_UP_CONTROL, 0, 0, NULL, 0), + + SND_SOC_DAPM_PGA_S("Output DACL", 7, + NAU8825_REG_CHARGE_PUMP, 8, 1, nau8825_output_dac_event, + SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), + SND_SOC_DAPM_PGA_S("Output DACR", 7, + NAU8825_REG_CHARGE_PUMP, 9, 1, nau8825_output_dac_event, + SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), + + /* HPOL/R are ungrounded by disabling 16 Ohm pull-downs on playback */ + SND_SOC_DAPM_PGA_S("HPOL Pulldown", 8, + NAU8825_REG_HSD_CTRL, 0, 1, NULL, 0), + SND_SOC_DAPM_PGA_S("HPOR Pulldown", 8, + NAU8825_REG_HSD_CTRL, 1, 1, NULL, 0), + + /* High current HPOL/R boost driver */ + SND_SOC_DAPM_PGA_S("HP Boost Driver", 9, + NAU8825_REG_BOOST, 9, 1, NULL, 0), + + /* Class G operation control*/ + SND_SOC_DAPM_PGA_S("Class G", 10, + NAU8825_REG_CLASSG_CTRL, 0, 0, NULL, 0), + + SND_SOC_DAPM_OUTPUT("HPOL"), + SND_SOC_DAPM_OUTPUT("HPOR"), +}; + +static const struct snd_soc_dapm_route nau8825_dapm_routes[] = { + {"Frontend PGA", NULL, "MIC"}, + {"ADC", NULL, "Frontend PGA"}, + {"ADC", NULL, "ADC Clock"}, + {"ADC", NULL, "ADC Power"}, + {"AIFTX", NULL, "ADC"}, + + {"DDACL", NULL, "Playback"}, + {"DDACR", NULL, "Playback"}, + {"DDACL", NULL, "DDAC Clock"}, + {"DDACR", NULL, "DDAC Clock"}, + {"DACL Mux", "DACL", "DDACL"}, + {"DACL Mux", "DACR", "DDACR"}, + {"DACR Mux", "DACL", "DDACL"}, + {"DACR Mux", "DACR", "DDACR"}, + {"HP amp L", NULL, "DACL Mux"}, + {"HP amp R", NULL, "DACR Mux"}, + {"Charge Pump", NULL, "HP amp L"}, + {"Charge Pump", NULL, "HP amp R"}, + {"ADACL", NULL, "Charge Pump"}, + {"ADACR", NULL, "Charge Pump"}, + {"ADACL Clock", NULL, "ADACL"}, + {"ADACR Clock", NULL, "ADACR"}, + {"Output Driver L Stage 1", NULL, "ADACL Clock"}, + {"Output Driver R Stage 1", NULL, "ADACR Clock"}, + {"Output Driver L Stage 2", NULL, "Output Driver L Stage 1"}, + {"Output Driver R Stage 2", NULL, "Output Driver R Stage 1"}, + {"Output Driver L Stage 3", NULL, "Output Driver L Stage 2"}, + {"Output Driver R Stage 3", NULL, "Output Driver R Stage 2"}, + {"Output DACL", NULL, "Output Driver L Stage 3"}, + {"Output DACR", NULL, "Output Driver R Stage 3"}, + {"HPOL Pulldown", NULL, "Output DACL"}, + {"HPOR Pulldown", NULL, "Output DACR"}, + {"HP Boost Driver", NULL, "HPOL Pulldown"}, + {"HP Boost Driver", NULL, "HPOR Pulldown"}, + {"Class G", NULL, "HP Boost Driver"}, + {"HPOL", NULL, "Class G"}, + {"HPOR", NULL, "Class G"}, +}; + +static int nau8825_clock_check(struct nau8825 *nau8825, + int stream, int rate, int osr) +{ + int osrate; + + if (stream == SNDRV_PCM_STREAM_PLAYBACK) { + if (osr >= ARRAY_SIZE(osr_dac_sel)) + return -EINVAL; + osrate = osr_dac_sel[osr].osr; + } else { + if (osr >= ARRAY_SIZE(osr_adc_sel)) + return -EINVAL; + osrate = osr_adc_sel[osr].osr; + } + + if (!osrate || rate * osr > CLK_DA_AD_MAX) { + dev_err(nau8825->dev, "exceed the maximum frequency of CLK_ADC or CLK_DAC\n"); + return -EINVAL; + } + + return 0; +} + +static int nau8825_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params, + struct snd_soc_dai *dai) +{ + struct snd_soc_component *component = dai->component; + struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); + unsigned int val_len = 0, osr, ctrl_val, bclk_fs, bclk_div; + + nau8825_sema_acquire(nau8825, 3 * HZ); + + /* CLK_DAC or CLK_ADC = OSR * FS + * DAC or ADC clock frequency is defined as Over Sampling Rate (OSR) + * multiplied by the audio sample rate (Fs). Note that the OSR and Fs + * values must be selected such that the maximum frequency is less + * than 6.144 MHz. + */ + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { + regmap_read(nau8825->regmap, NAU8825_REG_DAC_CTRL1, &osr); + osr &= NAU8825_DAC_OVERSAMPLE_MASK; + if (nau8825_clock_check(nau8825, substream->stream, + params_rate(params), osr)) { + nau8825_sema_release(nau8825); + return -EINVAL; + } + regmap_update_bits(nau8825->regmap, NAU8825_REG_CLK_DIVIDER, + NAU8825_CLK_DAC_SRC_MASK, + osr_dac_sel[osr].clk_src << NAU8825_CLK_DAC_SRC_SFT); + } else { + regmap_read(nau8825->regmap, NAU8825_REG_ADC_RATE, &osr); + osr &= NAU8825_ADC_SYNC_DOWN_MASK; + if (nau8825_clock_check(nau8825, substream->stream, + params_rate(params), osr)) { + nau8825_sema_release(nau8825); + return -EINVAL; + } + regmap_update_bits(nau8825->regmap, NAU8825_REG_CLK_DIVIDER, + NAU8825_CLK_ADC_SRC_MASK, + osr_adc_sel[osr].clk_src << NAU8825_CLK_ADC_SRC_SFT); + } + + /* make BCLK and LRC divde configuration if the codec as master. */ + regmap_read(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2, &ctrl_val); + if (ctrl_val & NAU8825_I2S_MS_MASTER) { + /* get the bclk and fs ratio */ + bclk_fs = snd_soc_params_to_bclk(params) / params_rate(params); + if (bclk_fs <= 32) + bclk_div = 2; + else if (bclk_fs <= 64) + bclk_div = 1; + else if (bclk_fs <= 128) + bclk_div = 0; + else { + nau8825_sema_release(nau8825); + return -EINVAL; + } + regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2, + NAU8825_I2S_LRC_DIV_MASK | NAU8825_I2S_BLK_DIV_MASK, + ((bclk_div + 1) << NAU8825_I2S_LRC_DIV_SFT) | bclk_div); + } + + switch (params_width(params)) { + case 16: + val_len |= NAU8825_I2S_DL_16; + break; + case 20: + val_len |= NAU8825_I2S_DL_20; + break; + case 24: + val_len |= NAU8825_I2S_DL_24; + break; + case 32: + val_len |= NAU8825_I2S_DL_32; + break; + default: + nau8825_sema_release(nau8825); + return -EINVAL; + } + + regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL1, + NAU8825_I2S_DL_MASK, val_len); + + /* Release the semaphore. */ + nau8825_sema_release(nau8825); + + return 0; +} + +static int nau8825_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) +{ + struct snd_soc_component *component = codec_dai->component; + struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); + unsigned int ctrl1_val = 0, ctrl2_val = 0; + + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { + case SND_SOC_DAIFMT_CBM_CFM: + ctrl2_val |= NAU8825_I2S_MS_MASTER; + break; + case SND_SOC_DAIFMT_CBS_CFS: + break; + default: + return -EINVAL; + } + + switch (fmt & SND_SOC_DAIFMT_INV_MASK) { + case SND_SOC_DAIFMT_NB_NF: + break; + case SND_SOC_DAIFMT_IB_NF: + ctrl1_val |= NAU8825_I2S_BP_INV; + break; + default: + return -EINVAL; + } + + switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { + case SND_SOC_DAIFMT_I2S: + ctrl1_val |= NAU8825_I2S_DF_I2S; + break; + case SND_SOC_DAIFMT_LEFT_J: + ctrl1_val |= NAU8825_I2S_DF_LEFT; + break; + case SND_SOC_DAIFMT_RIGHT_J: + ctrl1_val |= NAU8825_I2S_DF_RIGTH; + break; + case SND_SOC_DAIFMT_DSP_A: + ctrl1_val |= NAU8825_I2S_DF_PCM_AB; + break; + case SND_SOC_DAIFMT_DSP_B: + ctrl1_val |= NAU8825_I2S_DF_PCM_AB; + ctrl1_val |= NAU8825_I2S_PCMB_EN; + break; + default: + return -EINVAL; + } + + nau8825_sema_acquire(nau8825, 3 * HZ); + + regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL1, + NAU8825_I2S_DL_MASK | NAU8825_I2S_DF_MASK | + NAU8825_I2S_BP_MASK | NAU8825_I2S_PCMB_MASK, + ctrl1_val); + regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2, + NAU8825_I2S_MS_MASK, ctrl2_val); + + /* Release the semaphore. */ + nau8825_sema_release(nau8825); + + return 0; +} + +static const struct snd_soc_dai_ops nau8825_dai_ops = { + .hw_params = nau8825_hw_params, + .set_fmt = nau8825_set_dai_fmt, +}; + +#define NAU8825_RATES SNDRV_PCM_RATE_8000_192000 +#define NAU8825_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE \ + | SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE) + +static struct snd_soc_dai_driver nau8825_dai = { + .name = "nau8825-hifi", + .playback = { + .stream_name = "Playback", + .channels_min = 1, + .channels_max = 2, + .rates = NAU8825_RATES, + .formats = NAU8825_FORMATS, + }, + .capture = { + .stream_name = "Capture", + .channels_min = 1, + .channels_max = 1, + .rates = NAU8825_RATES, + .formats = NAU8825_FORMATS, + }, + .ops = &nau8825_dai_ops, +}; + +/** + * nau8825_enable_jack_detect - Specify a jack for event reporting + * + * @component: component to register the jack with + * @jack: jack to use to report headset and button events on + * + * After this function has been called the headset insert/remove and button + * events will be routed to the given jack. Jack can be null to stop + * reporting. + */ +int nau8825_enable_jack_detect(struct snd_soc_component *component, + struct snd_soc_jack *jack) +{ + struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); + struct regmap *regmap = nau8825->regmap; + + nau8825->jack = jack; + + /* Ground HP Outputs[1:0], needed for headset auto detection + * Enable Automatic Mic/Gnd switching reading on insert interrupt[6] + */ + regmap_update_bits(regmap, NAU8825_REG_HSD_CTRL, + NAU8825_HSD_AUTO_MODE | NAU8825_SPKR_DWN1R | NAU8825_SPKR_DWN1L, + NAU8825_HSD_AUTO_MODE | NAU8825_SPKR_DWN1R | NAU8825_SPKR_DWN1L); + + return 0; +} +EXPORT_SYMBOL_GPL(nau8825_enable_jack_detect); + + +static bool nau8825_is_jack_inserted(struct regmap *regmap) +{ + bool active_high, is_high; + int status, jkdet; + + regmap_read(regmap, NAU8825_REG_JACK_DET_CTRL, &jkdet); + active_high = jkdet & NAU8825_JACK_POLARITY; + regmap_read(regmap, NAU8825_REG_I2C_DEVICE_ID, &status); + is_high = status & NAU8825_GPIO2JD1; + /* return jack connection status according to jack insertion logic + * active high or active low. + */ + return active_high == is_high; +} + +static void nau8825_restart_jack_detection(struct regmap *regmap) +{ + /* this will restart the entire jack detection process including MIC/GND + * switching and create interrupts. We have to go from 0 to 1 and back + * to 0 to restart. + */ + regmap_update_bits(regmap, NAU8825_REG_JACK_DET_CTRL, + NAU8825_JACK_DET_RESTART, NAU8825_JACK_DET_RESTART); + regmap_update_bits(regmap, NAU8825_REG_JACK_DET_CTRL, + NAU8825_JACK_DET_RESTART, 0); +} + +static void nau8825_int_status_clear_all(struct regmap *regmap) +{ + int active_irq, clear_irq, i; + + /* Reset the intrruption status from rightmost bit if the corres- + * ponding irq event occurs. + */ + regmap_read(regmap, NAU8825_REG_IRQ_STATUS, &active_irq); + for (i = 0; i < NAU8825_REG_DATA_LEN; i++) { + clear_irq = (0x1 << i); + if (active_irq & clear_irq) + regmap_write(regmap, + NAU8825_REG_INT_CLR_KEY_STATUS, clear_irq); + } +} + +static void nau8825_eject_jack(struct nau8825 *nau8825) +{ + struct snd_soc_dapm_context *dapm = nau8825->dapm; + struct regmap *regmap = nau8825->regmap; + + /* Force to cancel the cross talk detection process */ + nau8825_xtalk_cancel(nau8825); + + snd_soc_dapm_disable_pin(dapm, "SAR"); + snd_soc_dapm_disable_pin(dapm, "MICBIAS"); + /* Detach 2kOhm Resistors from MICBIAS to MICGND1/2 */ + regmap_update_bits(regmap, NAU8825_REG_MIC_BIAS, + NAU8825_MICBIAS_JKSLV | NAU8825_MICBIAS_JKR2, 0); + /* ground HPL/HPR, MICGRND1/2 */ + regmap_update_bits(regmap, NAU8825_REG_HSD_CTRL, 0xf, 0xf); + + snd_soc_dapm_sync(dapm); + + /* Clear all interruption status */ + nau8825_int_status_clear_all(regmap); + + /* Enable the insertion interruption, disable the ejection inter- + * ruption, and then bypass de-bounce circuit. + */ + regmap_update_bits(regmap, NAU8825_REG_INTERRUPT_DIS_CTRL, + NAU8825_IRQ_EJECT_DIS | NAU8825_IRQ_INSERT_DIS, + NAU8825_IRQ_EJECT_DIS); + regmap_update_bits(regmap, NAU8825_REG_INTERRUPT_MASK, + NAU8825_IRQ_OUTPUT_EN | NAU8825_IRQ_EJECT_EN | + NAU8825_IRQ_HEADSET_COMPLETE_EN | NAU8825_IRQ_INSERT_EN, + NAU8825_IRQ_OUTPUT_EN | NAU8825_IRQ_EJECT_EN | + NAU8825_IRQ_HEADSET_COMPLETE_EN); + regmap_update_bits(regmap, NAU8825_REG_JACK_DET_CTRL, + NAU8825_JACK_DET_DB_BYPASS, NAU8825_JACK_DET_DB_BYPASS); + + /* Disable ADC needed for interruptions at audo mode */ + regmap_update_bits(regmap, NAU8825_REG_ENA_CTRL, + NAU8825_ENABLE_ADC, 0); + + /* Close clock for jack type detection at manual mode */ + nau8825_configure_sysclk(nau8825, NAU8825_CLK_DIS, 0); +} + +/* Enable audo mode interruptions with internal clock. */ +static void nau8825_setup_auto_irq(struct nau8825 *nau8825) +{ + struct regmap *regmap = nau8825->regmap; + + /* Enable headset jack type detection complete interruption and + * jack ejection interruption. + */ + regmap_update_bits(regmap, NAU8825_REG_INTERRUPT_MASK, + NAU8825_IRQ_HEADSET_COMPLETE_EN | NAU8825_IRQ_EJECT_EN, 0); + + /* Enable internal VCO needed for interruptions */ + nau8825_configure_sysclk(nau8825, NAU8825_CLK_INTERNAL, 0); + + /* Enable ADC needed for interruptions */ + regmap_update_bits(regmap, NAU8825_REG_ENA_CTRL, + NAU8825_ENABLE_ADC, NAU8825_ENABLE_ADC); + + /* Chip needs one FSCLK cycle in order to generate interruptions, + * as we cannot guarantee one will be provided by the system. Turning + * master mode on then off enables us to generate that FSCLK cycle + * with a minimum of contention on the clock bus. + */ + regmap_update_bits(regmap, NAU8825_REG_I2S_PCM_CTRL2, + NAU8825_I2S_MS_MASK, NAU8825_I2S_MS_MASTER); + regmap_update_bits(regmap, NAU8825_REG_I2S_PCM_CTRL2, + NAU8825_I2S_MS_MASK, NAU8825_I2S_MS_SLAVE); + + /* Not bypass de-bounce circuit */ + regmap_update_bits(regmap, NAU8825_REG_JACK_DET_CTRL, + NAU8825_JACK_DET_DB_BYPASS, 0); + + /* Unmask all interruptions */ + regmap_write(regmap, NAU8825_REG_INTERRUPT_DIS_CTRL, 0); + + /* Restart the jack detection process at auto mode */ + nau8825_restart_jack_detection(regmap); +} + +static int nau8825_button_decode(int value) +{ + int buttons = 0; + + /* The chip supports up to 8 buttons, but ALSA defines only 6 buttons */ + if (value & BIT(0)) + buttons |= SND_JACK_BTN_0; + if (value & BIT(1)) + buttons |= SND_JACK_BTN_1; + if (value & BIT(2)) + buttons |= SND_JACK_BTN_2; + if (value & BIT(3)) + buttons |= SND_JACK_BTN_3; + if (value & BIT(4)) + buttons |= SND_JACK_BTN_4; + if (value & BIT(5)) + buttons |= SND_JACK_BTN_5; + + return buttons; +} + +static int nau8825_jack_insert(struct nau8825 *nau8825) +{ + struct regmap *regmap = nau8825->regmap; + struct snd_soc_dapm_context *dapm = nau8825->dapm; + int jack_status_reg, mic_detected; + int type = 0; + + regmap_read(regmap, NAU8825_REG_GENERAL_STATUS, &jack_status_reg); + mic_detected = (jack_status_reg >> 10) & 3; + /* The JKSLV and JKR2 all detected in high impedance headset */ + if (mic_detected == 0x3) + nau8825->high_imped = true; + else + nau8825->high_imped = false; + + switch (mic_detected) { + case 0: + /* no mic */ + type = SND_JACK_HEADPHONE; + break; + case 1: + dev_dbg(nau8825->dev, "OMTP (micgnd1) mic connected\n"); + type = SND_JACK_HEADSET; + + /* Unground MICGND1 */ + regmap_update_bits(regmap, NAU8825_REG_HSD_CTRL, 3 << 2, + 1 << 2); + /* Attach 2kOhm Resistor from MICBIAS to MICGND1 */ + regmap_update_bits(regmap, NAU8825_REG_MIC_BIAS, + NAU8825_MICBIAS_JKSLV | NAU8825_MICBIAS_JKR2, + NAU8825_MICBIAS_JKR2); + /* Attach SARADC to MICGND1 */ + regmap_update_bits(regmap, NAU8825_REG_SAR_CTRL, + NAU8825_SAR_INPUT_MASK, + NAU8825_SAR_INPUT_JKR2); + + snd_soc_dapm_force_enable_pin(dapm, "MICBIAS"); + snd_soc_dapm_force_enable_pin(dapm, "SAR"); + snd_soc_dapm_sync(dapm); + break; + case 2: + dev_dbg(nau8825->dev, "CTIA (micgnd2) mic connected\n"); + type = SND_JACK_HEADSET; + + /* Unground MICGND2 */ + regmap_update_bits(regmap, NAU8825_REG_HSD_CTRL, 3 << 2, + 2 << 2); + /* Attach 2kOhm Resistor from MICBIAS to MICGND2 */ + regmap_update_bits(regmap, NAU8825_REG_MIC_BIAS, + NAU8825_MICBIAS_JKSLV | NAU8825_MICBIAS_JKR2, + NAU8825_MICBIAS_JKSLV); + /* Attach SARADC to MICGND2 */ + regmap_update_bits(regmap, NAU8825_REG_SAR_CTRL, + NAU8825_SAR_INPUT_MASK, + NAU8825_SAR_INPUT_JKSLV); + + snd_soc_dapm_force_enable_pin(dapm, "MICBIAS"); + snd_soc_dapm_force_enable_pin(dapm, "SAR"); + snd_soc_dapm_sync(dapm); + break; + case 3: + /* detect error case */ + dev_err(nau8825->dev, "detection error; disable mic function\n"); + type = SND_JACK_HEADPHONE; + break; + } + + /* Leaving HPOL/R grounded after jack insert by default. They will be + * ungrounded as part of the widget power up sequence at the beginning + * of playback to reduce pop. + */ + return type; +} + +#define NAU8825_BUTTONS (SND_JACK_BTN_0 | SND_JACK_BTN_1 | \ + SND_JACK_BTN_2 | SND_JACK_BTN_3) + +static irqreturn_t nau8825_interrupt(int irq, void *data) +{ + struct nau8825 *nau8825 = (struct nau8825 *)data; + struct regmap *regmap = nau8825->regmap; + int active_irq, clear_irq = 0, event = 0, event_mask = 0; + + if (regmap_read(regmap, NAU8825_REG_IRQ_STATUS, &active_irq)) { + dev_err(nau8825->dev, "failed to read irq status\n"); + return IRQ_NONE; + } + + if ((active_irq & NAU8825_JACK_EJECTION_IRQ_MASK) == + NAU8825_JACK_EJECTION_DETECTED) { + + nau8825_eject_jack(nau8825); + event_mask |= SND_JACK_HEADSET; + clear_irq = NAU8825_JACK_EJECTION_IRQ_MASK; + } else if (active_irq & NAU8825_KEY_SHORT_PRESS_IRQ) { + int key_status; + + regmap_read(regmap, NAU8825_REG_INT_CLR_KEY_STATUS, + &key_status); + + /* upper 8 bits of the register are for short pressed keys, + * lower 8 bits - for long pressed buttons + */ + nau8825->button_pressed = nau8825_button_decode( + key_status >> 8); + + event |= nau8825->button_pressed; + event_mask |= NAU8825_BUTTONS; + clear_irq = NAU8825_KEY_SHORT_PRESS_IRQ; + } else if (active_irq & NAU8825_KEY_RELEASE_IRQ) { + event_mask = NAU8825_BUTTONS; + clear_irq = NAU8825_KEY_RELEASE_IRQ; + } else if (active_irq & NAU8825_HEADSET_COMPLETION_IRQ) { + if (nau8825_is_jack_inserted(regmap)) { + event |= nau8825_jack_insert(nau8825); + if (nau8825->xtalk_enable && !nau8825->high_imped) { + /* Apply the cross talk suppression in the + * headset without high impedance. + */ + if (!nau8825->xtalk_protect) { + /* Raise protection for cross talk de- + * tection if no protection before. + * The driver has to cancel the pro- + * cess and restore changes if process + * is ongoing when ejection. + */ + int ret; + nau8825->xtalk_protect = true; + ret = nau8825_sema_acquire(nau8825, 0); + if (ret) + nau8825->xtalk_protect = false; + } + /* Startup cross talk detection process */ + if (nau8825->xtalk_protect) { + nau8825->xtalk_state = + NAU8825_XTALK_PREPARE; + schedule_work(&nau8825->xtalk_work); + } + } else { + /* The cross talk suppression shouldn't apply + * in the headset with high impedance. Thus, + * relieve the protection raised before. + */ + if (nau8825->xtalk_protect) { + nau8825_sema_release(nau8825); + nau8825->xtalk_protect = false; + } + } + } else { + dev_warn(nau8825->dev, "Headset completion IRQ fired but no headset connected\n"); + nau8825_eject_jack(nau8825); + } + + event_mask |= SND_JACK_HEADSET; + clear_irq = NAU8825_HEADSET_COMPLETION_IRQ; + /* Record the interruption report event for driver to report + * the event later. The jack report will delay until cross + * talk detection process is done. + */ + if (nau8825->xtalk_state == NAU8825_XTALK_PREPARE) { + nau8825->xtalk_event = event; + nau8825->xtalk_event_mask = event_mask; + } + } else if (active_irq & NAU8825_IMPEDANCE_MEAS_IRQ) { + /* crosstalk detection enable and process on going */ + if (nau8825->xtalk_enable && nau8825->xtalk_protect) + schedule_work(&nau8825->xtalk_work); + clear_irq = NAU8825_IMPEDANCE_MEAS_IRQ; + } else if ((active_irq & NAU8825_JACK_INSERTION_IRQ_MASK) == + NAU8825_JACK_INSERTION_DETECTED) { + /* One more step to check GPIO status directly. Thus, the + * driver can confirm the real insertion interruption because + * the intrruption at manual mode has bypassed debounce + * circuit which can get rid of unstable status. + */ + if (nau8825_is_jack_inserted(regmap)) { + /* Turn off insertion interruption at manual mode */ + regmap_update_bits(regmap, + NAU8825_REG_INTERRUPT_DIS_CTRL, + NAU8825_IRQ_INSERT_DIS, + NAU8825_IRQ_INSERT_DIS); + regmap_update_bits(regmap, NAU8825_REG_INTERRUPT_MASK, + NAU8825_IRQ_INSERT_EN, NAU8825_IRQ_INSERT_EN); + /* Enable interruption for jack type detection at audo + * mode which can detect microphone and jack type. + */ + nau8825_setup_auto_irq(nau8825); + } + } + + if (!clear_irq) + clear_irq = active_irq; + /* clears the rightmost interruption */ + regmap_write(regmap, NAU8825_REG_INT_CLR_KEY_STATUS, clear_irq); + + /* Delay jack report until cross talk detection is done. It can avoid + * application to do playback preparation when cross talk detection + * process is still working. Otherwise, the resource like clock and + * power will be issued by them at the same time and conflict happens. + */ + if (event_mask && nau8825->xtalk_state == NAU8825_XTALK_DONE) + snd_soc_jack_report(nau8825->jack, event, event_mask); + + return IRQ_HANDLED; +} + +static void nau8825_setup_buttons(struct nau8825 *nau8825) +{ + struct regmap *regmap = nau8825->regmap; + + regmap_update_bits(regmap, NAU8825_REG_SAR_CTRL, + NAU8825_SAR_TRACKING_GAIN_MASK, + nau8825->sar_voltage << NAU8825_SAR_TRACKING_GAIN_SFT); + regmap_update_bits(regmap, NAU8825_REG_SAR_CTRL, + NAU8825_SAR_COMPARE_TIME_MASK, + nau8825->sar_compare_time << NAU8825_SAR_COMPARE_TIME_SFT); + regmap_update_bits(regmap, NAU8825_REG_SAR_CTRL, + NAU8825_SAR_SAMPLING_TIME_MASK, + nau8825->sar_sampling_time << NAU8825_SAR_SAMPLING_TIME_SFT); + + regmap_update_bits(regmap, NAU8825_REG_KEYDET_CTRL, + NAU8825_KEYDET_LEVELS_NR_MASK, + (nau8825->sar_threshold_num - 1) << NAU8825_KEYDET_LEVELS_NR_SFT); + regmap_update_bits(regmap, NAU8825_REG_KEYDET_CTRL, + NAU8825_KEYDET_HYSTERESIS_MASK, + nau8825->sar_hysteresis << NAU8825_KEYDET_HYSTERESIS_SFT); + regmap_update_bits(regmap, NAU8825_REG_KEYDET_CTRL, + NAU8825_KEYDET_SHORTKEY_DEBOUNCE_MASK, + nau8825->key_debounce << NAU8825_KEYDET_SHORTKEY_DEBOUNCE_SFT); + + regmap_write(regmap, NAU8825_REG_VDET_THRESHOLD_1, + (nau8825->sar_threshold[0] << 8) | nau8825->sar_threshold[1]); + regmap_write(regmap, NAU8825_REG_VDET_THRESHOLD_2, + (nau8825->sar_threshold[2] << 8) | nau8825->sar_threshold[3]); + regmap_write(regmap, NAU8825_REG_VDET_THRESHOLD_3, + (nau8825->sar_threshold[4] << 8) | nau8825->sar_threshold[5]); + regmap_write(regmap, NAU8825_REG_VDET_THRESHOLD_4, + (nau8825->sar_threshold[6] << 8) | nau8825->sar_threshold[7]); + + /* Enable short press and release interruptions */ + regmap_update_bits(regmap, NAU8825_REG_INTERRUPT_MASK, + NAU8825_IRQ_KEY_SHORT_PRESS_EN | NAU8825_IRQ_KEY_RELEASE_EN, + 0); +} + +static void nau8825_init_regs(struct nau8825 *nau8825) +{ + struct regmap *regmap = nau8825->regmap; + + /* Latch IIC LSB value */ + regmap_write(regmap, NAU8825_REG_IIC_ADDR_SET, 0x0001); + /* Enable Bias/Vmid */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, + NAU8825_BIAS_VMID, NAU8825_BIAS_VMID); + regmap_update_bits(nau8825->regmap, NAU8825_REG_BOOST, + NAU8825_GLOBAL_BIAS_EN, NAU8825_GLOBAL_BIAS_EN); + + /* VMID Tieoff */ + regmap_update_bits(regmap, NAU8825_REG_BIAS_ADJ, + NAU8825_BIAS_VMID_SEL_MASK, + nau8825->vref_impedance << NAU8825_BIAS_VMID_SEL_SFT); + /* Disable Boost Driver, Automatic Short circuit protection enable */ + regmap_update_bits(regmap, NAU8825_REG_BOOST, + NAU8825_PRECHARGE_DIS | NAU8825_HP_BOOST_DIS | + NAU8825_HP_BOOST_G_DIS | NAU8825_SHORT_SHUTDOWN_EN, + NAU8825_PRECHARGE_DIS | NAU8825_HP_BOOST_DIS | + NAU8825_HP_BOOST_G_DIS | NAU8825_SHORT_SHUTDOWN_EN); + + regmap_update_bits(regmap, NAU8825_REG_GPIO12_CTRL, + NAU8825_JKDET_OUTPUT_EN, + nau8825->jkdet_enable ? 0 : NAU8825_JKDET_OUTPUT_EN); + regmap_update_bits(regmap, NAU8825_REG_GPIO12_CTRL, + NAU8825_JKDET_PULL_EN, + nau8825->jkdet_pull_enable ? 0 : NAU8825_JKDET_PULL_EN); + regmap_update_bits(regmap, NAU8825_REG_GPIO12_CTRL, + NAU8825_JKDET_PULL_UP, + nau8825->jkdet_pull_up ? NAU8825_JKDET_PULL_UP : 0); + regmap_update_bits(regmap, NAU8825_REG_JACK_DET_CTRL, + NAU8825_JACK_POLARITY, + /* jkdet_polarity - 1 is for active-low */ + nau8825->jkdet_polarity ? 0 : NAU8825_JACK_POLARITY); + + regmap_update_bits(regmap, NAU8825_REG_JACK_DET_CTRL, + NAU8825_JACK_INSERT_DEBOUNCE_MASK, + nau8825->jack_insert_debounce << NAU8825_JACK_INSERT_DEBOUNCE_SFT); + regmap_update_bits(regmap, NAU8825_REG_JACK_DET_CTRL, + NAU8825_JACK_EJECT_DEBOUNCE_MASK, + nau8825->jack_eject_debounce << NAU8825_JACK_EJECT_DEBOUNCE_SFT); + + /* Mask unneeded IRQs: 1 - disable, 0 - enable */ + regmap_update_bits(regmap, NAU8825_REG_INTERRUPT_MASK, 0x7ff, 0x7ff); + + regmap_update_bits(regmap, NAU8825_REG_MIC_BIAS, + NAU8825_MICBIAS_VOLTAGE_MASK, nau8825->micbias_voltage); + + if (nau8825->sar_threshold_num) + nau8825_setup_buttons(nau8825); + + /* Default oversampling/decimations settings are unusable + * (audible hiss). Set it to something better. + */ + regmap_update_bits(regmap, NAU8825_REG_ADC_RATE, + NAU8825_ADC_SYNC_DOWN_MASK | NAU8825_ADC_SINC4_EN, + NAU8825_ADC_SYNC_DOWN_64); + regmap_update_bits(regmap, NAU8825_REG_DAC_CTRL1, + NAU8825_DAC_OVERSAMPLE_MASK, NAU8825_DAC_OVERSAMPLE_64); + /* Disable DACR/L power */ + regmap_update_bits(regmap, NAU8825_REG_CHARGE_PUMP, + NAU8825_POWER_DOWN_DACR | NAU8825_POWER_DOWN_DACL, + NAU8825_POWER_DOWN_DACR | NAU8825_POWER_DOWN_DACL); + /* Enable TESTDAC. This sets the analog DAC inputs to a '0' input + * signal to avoid any glitches due to power up transients in both + * the analog and digital DAC circuit. + */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_BIAS_ADJ, + NAU8825_BIAS_TESTDAC_EN, NAU8825_BIAS_TESTDAC_EN); + /* CICCLP off */ + regmap_update_bits(regmap, NAU8825_REG_DAC_CTRL1, + NAU8825_DAC_CLIP_OFF, NAU8825_DAC_CLIP_OFF); + + /* Class AB bias current to 2x, DAC Capacitor enable MSB/LSB */ + regmap_update_bits(regmap, NAU8825_REG_ANALOG_CONTROL_2, + NAU8825_HP_NON_CLASSG_CURRENT_2xADJ | + NAU8825_DAC_CAPACITOR_MSB | NAU8825_DAC_CAPACITOR_LSB, + NAU8825_HP_NON_CLASSG_CURRENT_2xADJ | + NAU8825_DAC_CAPACITOR_MSB | NAU8825_DAC_CAPACITOR_LSB); + /* Class G timer 64ms */ + regmap_update_bits(regmap, NAU8825_REG_CLASSG_CTRL, + NAU8825_CLASSG_TIMER_MASK, + 0x20 << NAU8825_CLASSG_TIMER_SFT); + /* DAC clock delay 2ns, VREF */ + regmap_update_bits(regmap, NAU8825_REG_RDAC, + NAU8825_RDAC_CLK_DELAY_MASK | NAU8825_RDAC_VREF_MASK, + (0x2 << NAU8825_RDAC_CLK_DELAY_SFT) | + (0x3 << NAU8825_RDAC_VREF_SFT)); + /* Config L/R channel */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_DACL_CTRL, + NAU8825_DACL_CH_SEL_MASK, NAU8825_DACL_CH_SEL_L); + regmap_update_bits(nau8825->regmap, NAU8825_REG_DACR_CTRL, + NAU8825_DACL_CH_SEL_MASK, NAU8825_DACL_CH_SEL_R); + /* Disable short Frame Sync detection logic */ + regmap_update_bits(regmap, NAU8825_REG_LEFT_TIME_SLOT, + NAU8825_DIS_FS_SHORT_DET, NAU8825_DIS_FS_SHORT_DET); +} + +static const struct regmap_config nau8825_regmap_config = { + .val_bits = NAU8825_REG_DATA_LEN, + .reg_bits = NAU8825_REG_ADDR_LEN, + + .max_register = NAU8825_REG_MAX, + .readable_reg = nau8825_readable_reg, + .writeable_reg = nau8825_writeable_reg, + .volatile_reg = nau8825_volatile_reg, + + .cache_type = REGCACHE_RBTREE, + .reg_defaults = nau8825_reg_defaults, + .num_reg_defaults = ARRAY_SIZE(nau8825_reg_defaults), +}; + +static int nau8825_component_probe(struct snd_soc_component *component) +{ + struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); + struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); + + nau8825->dapm = dapm; + + return 0; +} + +static void nau8825_component_remove(struct snd_soc_component *component) +{ + struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); + + /* Cancel and reset cross tak suppresstion detection funciton */ + nau8825_xtalk_cancel(nau8825); +} + +/** + * nau8825_calc_fll_param - Calculate FLL parameters. + * @fll_in: external clock provided to codec. + * @fs: sampling rate. + * @fll_param: Pointer to structure of FLL parameters. + * + * Calculate FLL parameters to configure codec. + * + * Returns 0 for success or negative error code. + */ +static int nau8825_calc_fll_param(unsigned int fll_in, unsigned int fs, + struct nau8825_fll *fll_param) +{ + u64 fvco, fvco_max; + unsigned int fref, i, fvco_sel; + + /* Ensure the reference clock frequency (FREF) is <= 13.5MHz by dividing + * freq_in by 1, 2, 4, or 8 using FLL pre-scalar. + * FREF = freq_in / NAU8825_FLL_REF_DIV_MASK + */ + for (i = 0; i < ARRAY_SIZE(fll_pre_scalar); i++) { + fref = fll_in / fll_pre_scalar[i].param; + if (fref <= NAU_FREF_MAX) + break; + } + if (i == ARRAY_SIZE(fll_pre_scalar)) + return -EINVAL; + fll_param->clk_ref_div = fll_pre_scalar[i].val; + + /* Choose the FLL ratio based on FREF */ + for (i = 0; i < ARRAY_SIZE(fll_ratio); i++) { + if (fref >= fll_ratio[i].param) + break; + } + if (i == ARRAY_SIZE(fll_ratio)) + return -EINVAL; + fll_param->ratio = fll_ratio[i].val; + + /* Calculate the frequency of DCO (FDCO) given freq_out = 256 * Fs. + * FDCO must be within the 90MHz - 124MHz or the FFL cannot be + * guaranteed across the full range of operation. + * FDCO = freq_out * 2 * mclk_src_scaling + */ + fvco_max = 0; + fvco_sel = ARRAY_SIZE(mclk_src_scaling); + for (i = 0; i < ARRAY_SIZE(mclk_src_scaling); i++) { + fvco = 256ULL * fs * 2 * mclk_src_scaling[i].param; + if (fvco > NAU_FVCO_MIN && fvco < NAU_FVCO_MAX && + fvco_max < fvco) { + fvco_max = fvco; + fvco_sel = i; + } + } + if (ARRAY_SIZE(mclk_src_scaling) == fvco_sel) + return -EINVAL; + fll_param->mclk_src = mclk_src_scaling[fvco_sel].val; + + /* Calculate the FLL 10-bit integer input and the FLL 16-bit fractional + * input based on FDCO, FREF and FLL ratio. + */ + fvco = div_u64(fvco_max << 16, fref * fll_param->ratio); + fll_param->fll_int = (fvco >> 16) & 0x3FF; + fll_param->fll_frac = fvco & 0xFFFF; + return 0; +} + +static void nau8825_fll_apply(struct nau8825 *nau8825, + struct nau8825_fll *fll_param) +{ + regmap_update_bits(nau8825->regmap, NAU8825_REG_CLK_DIVIDER, + NAU8825_CLK_SRC_MASK | NAU8825_CLK_MCLK_SRC_MASK, + NAU8825_CLK_SRC_MCLK | fll_param->mclk_src); + /* Make DSP operate at high speed for better performance. */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL1, + NAU8825_FLL_RATIO_MASK | NAU8825_ICTRL_LATCH_MASK, + fll_param->ratio | (0x6 << NAU8825_ICTRL_LATCH_SFT)); + /* FLL 16-bit fractional input */ + regmap_write(nau8825->regmap, NAU8825_REG_FLL2, fll_param->fll_frac); + /* FLL 10-bit integer input */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL3, + NAU8825_FLL_INTEGER_MASK, fll_param->fll_int); + /* FLL pre-scaler */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL4, + NAU8825_FLL_REF_DIV_MASK, + fll_param->clk_ref_div << NAU8825_FLL_REF_DIV_SFT); + /* select divided VCO input */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5, + NAU8825_FLL_CLK_SW_MASK, NAU8825_FLL_CLK_SW_REF); + /* Disable free-running mode */ + regmap_update_bits(nau8825->regmap, + NAU8825_REG_FLL6, NAU8825_DCO_EN, 0); + if (fll_param->fll_frac) { + /* set FLL loop filter enable and cutoff frequency at 500Khz */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5, + NAU8825_FLL_PDB_DAC_EN | NAU8825_FLL_LOOP_FTR_EN | + NAU8825_FLL_FTR_SW_MASK, + NAU8825_FLL_PDB_DAC_EN | NAU8825_FLL_LOOP_FTR_EN | + NAU8825_FLL_FTR_SW_FILTER); + regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL6, + NAU8825_SDM_EN | NAU8825_CUTOFF500, + NAU8825_SDM_EN | NAU8825_CUTOFF500); + } else { + /* disable FLL loop filter and cutoff frequency */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5, + NAU8825_FLL_PDB_DAC_EN | NAU8825_FLL_LOOP_FTR_EN | + NAU8825_FLL_FTR_SW_MASK, NAU8825_FLL_FTR_SW_ACCU); + regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL6, + NAU8825_SDM_EN | NAU8825_CUTOFF500, 0); + } +} + +/* freq_out must be 256*Fs in order to achieve the best performance */ +static int nau8825_set_pll(struct snd_soc_component *component, int pll_id, int source, + unsigned int freq_in, unsigned int freq_out) +{ + struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); + struct nau8825_fll fll_param; + int ret, fs; + + fs = freq_out / 256; + ret = nau8825_calc_fll_param(freq_in, fs, &fll_param); + if (ret < 0) { + dev_err(component->dev, "Unsupported input clock %d\n", freq_in); + return ret; + } + dev_dbg(component->dev, "mclk_src=%x ratio=%x fll_frac=%x fll_int=%x clk_ref_div=%x\n", + fll_param.mclk_src, fll_param.ratio, fll_param.fll_frac, + fll_param.fll_int, fll_param.clk_ref_div); + + nau8825_fll_apply(nau8825, &fll_param); + mdelay(2); + regmap_update_bits(nau8825->regmap, NAU8825_REG_CLK_DIVIDER, + NAU8825_CLK_SRC_MASK, NAU8825_CLK_SRC_VCO); + return 0; +} + +static int nau8825_mclk_prepare(struct nau8825 *nau8825, unsigned int freq) +{ + int ret = 0; + + nau8825->mclk = devm_clk_get(nau8825->dev, "mclk"); + if (IS_ERR(nau8825->mclk)) { + dev_info(nau8825->dev, "No 'mclk' clock found, assume MCLK is managed externally"); + return 0; + } + + if (!nau8825->mclk_freq) { + ret = clk_prepare_enable(nau8825->mclk); + if (ret) { + dev_err(nau8825->dev, "Unable to prepare codec mclk\n"); + return ret; + } + } + + if (nau8825->mclk_freq != freq) { + freq = clk_round_rate(nau8825->mclk, freq); + ret = clk_set_rate(nau8825->mclk, freq); + if (ret) { + dev_err(nau8825->dev, "Unable to set mclk rate\n"); + return ret; + } + nau8825->mclk_freq = freq; + } + + return 0; +} + +static void nau8825_configure_mclk_as_sysclk(struct regmap *regmap) +{ + regmap_update_bits(regmap, NAU8825_REG_CLK_DIVIDER, + NAU8825_CLK_SRC_MASK, NAU8825_CLK_SRC_MCLK); + regmap_update_bits(regmap, NAU8825_REG_FLL6, + NAU8825_DCO_EN, 0); + /* Make DSP operate as default setting for power saving. */ + regmap_update_bits(regmap, NAU8825_REG_FLL1, + NAU8825_ICTRL_LATCH_MASK, 0); +} + +static int nau8825_configure_sysclk(struct nau8825 *nau8825, int clk_id, + unsigned int freq) +{ + struct regmap *regmap = nau8825->regmap; + int ret; + + switch (clk_id) { + case NAU8825_CLK_DIS: + /* Clock provided externally and disable internal VCO clock */ + nau8825_configure_mclk_as_sysclk(regmap); + if (nau8825->mclk_freq) { + clk_disable_unprepare(nau8825->mclk); + nau8825->mclk_freq = 0; + } + + break; + case NAU8825_CLK_MCLK: + /* Acquire the semaphore to synchronize the playback and + * interrupt handler. In order to avoid the playback inter- + * fered by cross talk process, the driver make the playback + * preparation halted until cross talk process finish. + */ + nau8825_sema_acquire(nau8825, 3 * HZ); + nau8825_configure_mclk_as_sysclk(regmap); + /* MCLK not changed by clock tree */ + regmap_update_bits(regmap, NAU8825_REG_CLK_DIVIDER, + NAU8825_CLK_MCLK_SRC_MASK, 0); + /* Release the semaphore. */ + nau8825_sema_release(nau8825); + + ret = nau8825_mclk_prepare(nau8825, freq); + if (ret) + return ret; + + break; + case NAU8825_CLK_INTERNAL: + if (nau8825_is_jack_inserted(nau8825->regmap)) { + regmap_update_bits(regmap, NAU8825_REG_FLL6, + NAU8825_DCO_EN, NAU8825_DCO_EN); + regmap_update_bits(regmap, NAU8825_REG_CLK_DIVIDER, + NAU8825_CLK_SRC_MASK, NAU8825_CLK_SRC_VCO); + /* Decrease the VCO frequency and make DSP operate + * as default setting for power saving. + */ + regmap_update_bits(regmap, NAU8825_REG_CLK_DIVIDER, + NAU8825_CLK_MCLK_SRC_MASK, 0xf); + regmap_update_bits(regmap, NAU8825_REG_FLL1, + NAU8825_ICTRL_LATCH_MASK | + NAU8825_FLL_RATIO_MASK, 0x10); + regmap_update_bits(regmap, NAU8825_REG_FLL6, + NAU8825_SDM_EN, NAU8825_SDM_EN); + } else { + /* The clock turns off intentionally for power saving + * when no headset connected. + */ + nau8825_configure_mclk_as_sysclk(regmap); + dev_warn(nau8825->dev, "Disable clock for power saving when no headset connected\n"); + } + if (nau8825->mclk_freq) { + clk_disable_unprepare(nau8825->mclk); + nau8825->mclk_freq = 0; + } + + break; + case NAU8825_CLK_FLL_MCLK: + /* Acquire the semaphore to synchronize the playback and + * interrupt handler. In order to avoid the playback inter- + * fered by cross talk process, the driver make the playback + * preparation halted until cross talk process finish. + */ + nau8825_sema_acquire(nau8825, 3 * HZ); + /* Higher FLL reference input frequency can only set lower + * gain error, such as 0000 for input reference from MCLK + * 12.288Mhz. + */ + regmap_update_bits(regmap, NAU8825_REG_FLL3, + NAU8825_FLL_CLK_SRC_MASK | NAU8825_GAIN_ERR_MASK, + NAU8825_FLL_CLK_SRC_MCLK | 0); + /* Release the semaphore. */ + nau8825_sema_release(nau8825); + + ret = nau8825_mclk_prepare(nau8825, freq); + if (ret) + return ret; + + break; + case NAU8825_CLK_FLL_BLK: + /* Acquire the semaphore to synchronize the playback and + * interrupt handler. In order to avoid the playback inter- + * fered by cross talk process, the driver make the playback + * preparation halted until cross talk process finish. + */ + nau8825_sema_acquire(nau8825, 3 * HZ); + /* If FLL reference input is from low frequency source, + * higher error gain can apply such as 0xf which has + * the most sensitive gain error correction threshold, + * Therefore, FLL has the most accurate DCO to + * target frequency. + */ + regmap_update_bits(regmap, NAU8825_REG_FLL3, + NAU8825_FLL_CLK_SRC_MASK | NAU8825_GAIN_ERR_MASK, + NAU8825_FLL_CLK_SRC_BLK | + (0xf << NAU8825_GAIN_ERR_SFT)); + /* Release the semaphore. */ + nau8825_sema_release(nau8825); + + if (nau8825->mclk_freq) { + clk_disable_unprepare(nau8825->mclk); + nau8825->mclk_freq = 0; + } + + break; + case NAU8825_CLK_FLL_FS: + /* Acquire the semaphore to synchronize the playback and + * interrupt handler. In order to avoid the playback inter- + * fered by cross talk process, the driver make the playback + * preparation halted until cross talk process finish. + */ + nau8825_sema_acquire(nau8825, 3 * HZ); + /* If FLL reference input is from low frequency source, + * higher error gain can apply such as 0xf which has + * the most sensitive gain error correction threshold, + * Therefore, FLL has the most accurate DCO to + * target frequency. + */ + regmap_update_bits(regmap, NAU8825_REG_FLL3, + NAU8825_FLL_CLK_SRC_MASK | NAU8825_GAIN_ERR_MASK, + NAU8825_FLL_CLK_SRC_FS | + (0xf << NAU8825_GAIN_ERR_SFT)); + /* Release the semaphore. */ + nau8825_sema_release(nau8825); + + if (nau8825->mclk_freq) { + clk_disable_unprepare(nau8825->mclk); + nau8825->mclk_freq = 0; + } + + break; + default: + dev_err(nau8825->dev, "Invalid clock id (%d)\n", clk_id); + return -EINVAL; + } + + dev_dbg(nau8825->dev, "Sysclk is %dHz and clock id is %d\n", freq, + clk_id); + return 0; +} + +static int nau8825_set_sysclk(struct snd_soc_component *component, int clk_id, + int source, unsigned int freq, int dir) +{ + struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); + + return nau8825_configure_sysclk(nau8825, clk_id, freq); +} + +static int nau8825_resume_setup(struct nau8825 *nau8825) +{ + struct regmap *regmap = nau8825->regmap; + + /* Close clock when jack type detection at manual mode */ + nau8825_configure_sysclk(nau8825, NAU8825_CLK_DIS, 0); + + /* Clear all interruption status */ + nau8825_int_status_clear_all(regmap); + + /* Enable both insertion and ejection interruptions, and then + * bypass de-bounce circuit. + */ + regmap_update_bits(regmap, NAU8825_REG_INTERRUPT_MASK, + NAU8825_IRQ_OUTPUT_EN | NAU8825_IRQ_HEADSET_COMPLETE_EN | + NAU8825_IRQ_EJECT_EN | NAU8825_IRQ_INSERT_EN, + NAU8825_IRQ_OUTPUT_EN | NAU8825_IRQ_HEADSET_COMPLETE_EN); + regmap_update_bits(regmap, NAU8825_REG_JACK_DET_CTRL, + NAU8825_JACK_DET_DB_BYPASS, NAU8825_JACK_DET_DB_BYPASS); + regmap_update_bits(regmap, NAU8825_REG_INTERRUPT_DIS_CTRL, + NAU8825_IRQ_INSERT_DIS | NAU8825_IRQ_EJECT_DIS, 0); + + return 0; +} + +static int nau8825_set_bias_level(struct snd_soc_component *component, + enum snd_soc_bias_level level) +{ + struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); + int ret; + + switch (level) { + case SND_SOC_BIAS_ON: + break; + + case SND_SOC_BIAS_PREPARE: + break; + + case SND_SOC_BIAS_STANDBY: + if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { + if (nau8825->mclk_freq) { + ret = clk_prepare_enable(nau8825->mclk); + if (ret) { + dev_err(nau8825->dev, "Unable to prepare component mclk\n"); + return ret; + } + } + /* Setup codec configuration after resume */ + nau8825_resume_setup(nau8825); + } + break; + + case SND_SOC_BIAS_OFF: + /* Reset the configuration of jack type for detection */ + /* Detach 2kOhm Resistors from MICBIAS to MICGND1/2 */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_MIC_BIAS, + NAU8825_MICBIAS_JKSLV | NAU8825_MICBIAS_JKR2, 0); + /* ground HPL/HPR, MICGRND1/2 */ + regmap_update_bits(nau8825->regmap, + NAU8825_REG_HSD_CTRL, 0xf, 0xf); + /* Cancel and reset cross talk detection funciton */ + nau8825_xtalk_cancel(nau8825); + /* Turn off all interruptions before system shutdown. Keep the + * interruption quiet before resume setup completes. + */ + regmap_write(nau8825->regmap, + NAU8825_REG_INTERRUPT_DIS_CTRL, 0xffff); + /* Disable ADC needed for interruptions at audo mode */ + regmap_update_bits(nau8825->regmap, NAU8825_REG_ENA_CTRL, + NAU8825_ENABLE_ADC, 0); + if (nau8825->mclk_freq) + clk_disable_unprepare(nau8825->mclk); + break; + } + return 0; +} + +static int __maybe_unused nau8825_suspend(struct snd_soc_component *component) +{ + struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); + + disable_irq(nau8825->irq); + snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF); + /* Power down codec power; don't suppoet button wakeup */ + snd_soc_dapm_disable_pin(nau8825->dapm, "SAR"); + snd_soc_dapm_disable_pin(nau8825->dapm, "MICBIAS"); + snd_soc_dapm_sync(nau8825->dapm); + regcache_cache_only(nau8825->regmap, true); + regcache_mark_dirty(nau8825->regmap); + + return 0; +} + +static int __maybe_unused nau8825_resume(struct snd_soc_component *component) +{ + struct nau8825 *nau8825 = snd_soc_component_get_drvdata(component); + int ret; + + regcache_cache_only(nau8825->regmap, false); + regcache_sync(nau8825->regmap); + nau8825->xtalk_protect = true; + ret = nau8825_sema_acquire(nau8825, 0); + if (ret) + nau8825->xtalk_protect = false; + enable_irq(nau8825->irq); + + return 0; +} + +static const struct snd_soc_component_driver nau8825_component_driver = { + .probe = nau8825_component_probe, + .remove = nau8825_component_remove, + .set_sysclk = nau8825_set_sysclk, + .set_pll = nau8825_set_pll, + .set_bias_level = nau8825_set_bias_level, + .suspend = nau8825_suspend, + .resume = nau8825_resume, + .controls = nau8825_controls, + .num_controls = ARRAY_SIZE(nau8825_controls), + .dapm_widgets = nau8825_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(nau8825_dapm_widgets), + .dapm_routes = nau8825_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(nau8825_dapm_routes), + .suspend_bias_off = 1, + .idle_bias_on = 1, + .use_pmdown_time = 1, + .endianness = 1, + .non_legacy_dai_naming = 1, +}; + +static void nau8825_reset_chip(struct regmap *regmap) +{ + regmap_write(regmap, NAU8825_REG_RESET, 0x00); + regmap_write(regmap, NAU8825_REG_RESET, 0x00); +} + +static void nau8825_print_device_properties(struct nau8825 *nau8825) +{ + int i; + struct device *dev = nau8825->dev; + + dev_dbg(dev, "jkdet-enable: %d\n", nau8825->jkdet_enable); + dev_dbg(dev, "jkdet-pull-enable: %d\n", nau8825->jkdet_pull_enable); + dev_dbg(dev, "jkdet-pull-up: %d\n", nau8825->jkdet_pull_up); + dev_dbg(dev, "jkdet-polarity: %d\n", nau8825->jkdet_polarity); + dev_dbg(dev, "micbias-voltage: %d\n", nau8825->micbias_voltage); + dev_dbg(dev, "vref-impedance: %d\n", nau8825->vref_impedance); + + dev_dbg(dev, "sar-threshold-num: %d\n", nau8825->sar_threshold_num); + for (i = 0; i < nau8825->sar_threshold_num; i++) + dev_dbg(dev, "sar-threshold[%d]=%d\n", i, + nau8825->sar_threshold[i]); + + dev_dbg(dev, "sar-hysteresis: %d\n", nau8825->sar_hysteresis); + dev_dbg(dev, "sar-voltage: %d\n", nau8825->sar_voltage); + dev_dbg(dev, "sar-compare-time: %d\n", nau8825->sar_compare_time); + dev_dbg(dev, "sar-sampling-time: %d\n", nau8825->sar_sampling_time); + dev_dbg(dev, "short-key-debounce: %d\n", nau8825->key_debounce); + dev_dbg(dev, "jack-insert-debounce: %d\n", + nau8825->jack_insert_debounce); + dev_dbg(dev, "jack-eject-debounce: %d\n", + nau8825->jack_eject_debounce); + dev_dbg(dev, "crosstalk-enable: %d\n", + nau8825->xtalk_enable); +} + +static int nau8825_read_device_properties(struct device *dev, + struct nau8825 *nau8825) { + int ret; + + nau8825->jkdet_enable = device_property_read_bool(dev, + "nuvoton,jkdet-enable"); + nau8825->jkdet_pull_enable = device_property_read_bool(dev, + "nuvoton,jkdet-pull-enable"); + nau8825->jkdet_pull_up = device_property_read_bool(dev, + "nuvoton,jkdet-pull-up"); + ret = device_property_read_u32(dev, "nuvoton,jkdet-polarity", + &nau8825->jkdet_polarity); + if (ret) + nau8825->jkdet_polarity = 1; + ret = device_property_read_u32(dev, "nuvoton,micbias-voltage", + &nau8825->micbias_voltage); + if (ret) + nau8825->micbias_voltage = 6; + ret = device_property_read_u32(dev, "nuvoton,vref-impedance", + &nau8825->vref_impedance); + if (ret) + nau8825->vref_impedance = 2; + ret = device_property_read_u32(dev, "nuvoton,sar-threshold-num", + &nau8825->sar_threshold_num); + if (ret) + nau8825->sar_threshold_num = 4; + ret = device_property_read_u32_array(dev, "nuvoton,sar-threshold", + nau8825->sar_threshold, nau8825->sar_threshold_num); + if (ret) { + nau8825->sar_threshold[0] = 0x08; + nau8825->sar_threshold[1] = 0x12; + nau8825->sar_threshold[2] = 0x26; + nau8825->sar_threshold[3] = 0x73; + } + ret = device_property_read_u32(dev, "nuvoton,sar-hysteresis", + &nau8825->sar_hysteresis); + if (ret) + nau8825->sar_hysteresis = 0; + ret = device_property_read_u32(dev, "nuvoton,sar-voltage", + &nau8825->sar_voltage); + if (ret) + nau8825->sar_voltage = 6; + ret = device_property_read_u32(dev, "nuvoton,sar-compare-time", + &nau8825->sar_compare_time); + if (ret) + nau8825->sar_compare_time = 1; + ret = device_property_read_u32(dev, "nuvoton,sar-sampling-time", + &nau8825->sar_sampling_time); + if (ret) + nau8825->sar_sampling_time = 1; + ret = device_property_read_u32(dev, "nuvoton,short-key-debounce", + &nau8825->key_debounce); + if (ret) + nau8825->key_debounce = 3; + ret = device_property_read_u32(dev, "nuvoton,jack-insert-debounce", + &nau8825->jack_insert_debounce); + if (ret) + nau8825->jack_insert_debounce = 7; + ret = device_property_read_u32(dev, "nuvoton,jack-eject-debounce", + &nau8825->jack_eject_debounce); + if (ret) + nau8825->jack_eject_debounce = 0; + nau8825->xtalk_enable = device_property_read_bool(dev, + "nuvoton,crosstalk-enable"); + + nau8825->mclk = devm_clk_get(dev, "mclk"); + if (PTR_ERR(nau8825->mclk) == -EPROBE_DEFER) { + return -EPROBE_DEFER; + } else if (PTR_ERR(nau8825->mclk) == -ENOENT) { + /* The MCLK is managed externally or not used at all */ + nau8825->mclk = NULL; + dev_info(dev, "No 'mclk' clock found, assume MCLK is managed externally"); + } else if (IS_ERR(nau8825->mclk)) { + return -EINVAL; + } + + return 0; +} + +static int nau8825_setup_irq(struct nau8825 *nau8825) +{ + int ret; + + ret = devm_request_threaded_irq(nau8825->dev, nau8825->irq, NULL, + nau8825_interrupt, IRQF_TRIGGER_LOW | IRQF_ONESHOT, + "nau8825", nau8825); + + if (ret) { + dev_err(nau8825->dev, "Cannot request irq %d (%d)\n", + nau8825->irq, ret); + return ret; + } + + return 0; +} + +static int nau8825_i2c_probe(struct i2c_client *i2c, + const struct i2c_device_id *id) +{ + struct device *dev = &i2c->dev; + struct nau8825 *nau8825 = dev_get_platdata(&i2c->dev); + int ret, value; + + if (!nau8825) { + nau8825 = devm_kzalloc(dev, sizeof(*nau8825), GFP_KERNEL); + if (!nau8825) + return -ENOMEM; + ret = nau8825_read_device_properties(dev, nau8825); + if (ret) + return ret; + } + + i2c_set_clientdata(i2c, nau8825); + + nau8825->regmap = devm_regmap_init_i2c(i2c, &nau8825_regmap_config); + if (IS_ERR(nau8825->regmap)) + return PTR_ERR(nau8825->regmap); + nau8825->dev = dev; + nau8825->irq = i2c->irq; + /* Initiate parameters, semaphore and work queue which are needed in + * cross talk suppression measurment function. + */ + nau8825->xtalk_state = NAU8825_XTALK_DONE; + nau8825->xtalk_protect = false; + nau8825->xtalk_baktab_initialized = false; + sema_init(&nau8825->xtalk_sem, 1); + INIT_WORK(&nau8825->xtalk_work, nau8825_xtalk_work); + + nau8825_print_device_properties(nau8825); + + nau8825_reset_chip(nau8825->regmap); + ret = regmap_read(nau8825->regmap, NAU8825_REG_I2C_DEVICE_ID, &value); + if (ret < 0) { + dev_err(dev, "Failed to read device id from the NAU8825: %d\n", + ret); + return ret; + } + if ((value & NAU8825_SOFTWARE_ID_MASK) != + NAU8825_SOFTWARE_ID_NAU8825) { + dev_err(dev, "Not a NAU8825 chip\n"); + return -ENODEV; + } + + nau8825_init_regs(nau8825); + + if (i2c->irq) + nau8825_setup_irq(nau8825); + + return devm_snd_soc_register_component(&i2c->dev, + &nau8825_component_driver, + &nau8825_dai, 1); +} + +static int nau8825_i2c_remove(struct i2c_client *client) +{ + return 0; +} + +static const struct i2c_device_id nau8825_i2c_ids[] = { + { "nau8825", 0 }, + { } +}; +MODULE_DEVICE_TABLE(i2c, nau8825_i2c_ids); + +#ifdef CONFIG_OF +static const struct of_device_id nau8825_of_ids[] = { + { .compatible = "nuvoton,nau8825", }, + {} +}; +MODULE_DEVICE_TABLE(of, nau8825_of_ids); +#endif + +#ifdef CONFIG_ACPI +static const struct acpi_device_id nau8825_acpi_match[] = { + { "10508825", 0 }, + {}, +}; +MODULE_DEVICE_TABLE(acpi, nau8825_acpi_match); +#endif + +static struct i2c_driver nau8825_driver = { + .driver = { + .name = "nau8825", + .of_match_table = of_match_ptr(nau8825_of_ids), + .acpi_match_table = ACPI_PTR(nau8825_acpi_match), + }, + .probe = nau8825_i2c_probe, + .remove = nau8825_i2c_remove, + .id_table = nau8825_i2c_ids, +}; +module_i2c_driver(nau8825_driver); + +MODULE_DESCRIPTION("ASoC nau8825 driver"); +MODULE_AUTHOR("Anatol Pomozov "); +MODULE_LICENSE("GPL"); \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/nau8825.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/nau8825.c.yml new file mode 100644 index 00000000000..4e086044f33 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/nau8825.c.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2015 Google Chromium project + - Copyright 2015 Nuvoton Technology Corp. Co-author Meng-Huang Kuo +holders: + - Google Chromium project + - Nuvoton Technology Corp. Co-author Meng-Huang Kuo +authors: + - Anatol Pomozov diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/stac9766.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/stac9766.c new file mode 100644 index 00000000000..e63fd7e873a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/stac9766.c @@ -0,0 +1,342 @@ +/* + * stac9766.c -- ALSA SoC STAC9766 codec support + * + * Copyright 2009 Jon Smirl, Digispeaker + * Author: Jon Smirl + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * Features:- + * + * o Support for AC97 Codec, S/PDIF + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define STAC9766_VENDOR_ID 0x83847666 +#define STAC9766_VENDOR_ID_MASK 0xffffffff + +#define AC97_STAC_DA_CONTROL 0x6A +#define AC97_STAC_ANALOG_SPECIAL 0x6E +#define AC97_STAC_STEREO_MIC 0x78 + +static const struct reg_default stac9766_reg_defaults[] = { + { 0x02, 0x8000 }, + { 0x04, 0x8000 }, + { 0x06, 0x8000 }, + { 0x0a, 0x0000 }, + { 0x0c, 0x8008 }, + { 0x0e, 0x8008 }, + { 0x10, 0x8808 }, + { 0x12, 0x8808 }, + { 0x14, 0x8808 }, + { 0x16, 0x8808 }, + { 0x18, 0x8808 }, + { 0x1a, 0x0000 }, + { 0x1c, 0x8000 }, + { 0x20, 0x0000 }, + { 0x22, 0x0000 }, + { 0x28, 0x0a05 }, + { 0x2c, 0xbb80 }, + { 0x32, 0xbb80 }, + { 0x3a, 0x2000 }, + { 0x3e, 0x0100 }, + { 0x4c, 0x0300 }, + { 0x4e, 0xffff }, + { 0x50, 0x0000 }, + { 0x52, 0x0000 }, + { 0x54, 0x0000 }, + { 0x6a, 0x0000 }, + { 0x6e, 0x1000 }, + { 0x72, 0x0000 }, + { 0x78, 0x0000 }, +}; + +static const struct regmap_config stac9766_regmap_config = { + .reg_bits = 16, + .reg_stride = 2, + .val_bits = 16, + .max_register = 0x78, + .cache_type = REGCACHE_RBTREE, + + .volatile_reg = regmap_ac97_default_volatile, + + .reg_defaults = stac9766_reg_defaults, + .num_reg_defaults = ARRAY_SIZE(stac9766_reg_defaults), +}; + +static const char *stac9766_record_mux[] = {"Mic", "CD", "Video", "AUX", + "Line", "Stereo Mix", "Mono Mix", "Phone"}; +static const char *stac9766_mono_mux[] = {"Mix", "Mic"}; +static const char *stac9766_mic_mux[] = {"Mic1", "Mic2"}; +static const char *stac9766_SPDIF_mux[] = {"PCM", "ADC Record"}; +static const char *stac9766_popbypass_mux[] = {"Normal", "Bypass Mixer"}; +static const char *stac9766_record_all_mux[] = {"All analog", + "Analog plus DAC"}; +static const char *stac9766_boost1[] = {"0dB", "10dB"}; +static const char *stac9766_boost2[] = {"0dB", "20dB"}; +static const char *stac9766_stereo_mic[] = {"Off", "On"}; + +static SOC_ENUM_DOUBLE_DECL(stac9766_record_enum, + AC97_REC_SEL, 8, 0, stac9766_record_mux); +static SOC_ENUM_SINGLE_DECL(stac9766_mono_enum, + AC97_GENERAL_PURPOSE, 9, stac9766_mono_mux); +static SOC_ENUM_SINGLE_DECL(stac9766_mic_enum, + AC97_GENERAL_PURPOSE, 8, stac9766_mic_mux); +static SOC_ENUM_SINGLE_DECL(stac9766_SPDIF_enum, + AC97_STAC_DA_CONTROL, 1, stac9766_SPDIF_mux); +static SOC_ENUM_SINGLE_DECL(stac9766_popbypass_enum, + AC97_GENERAL_PURPOSE, 15, stac9766_popbypass_mux); +static SOC_ENUM_SINGLE_DECL(stac9766_record_all_enum, + AC97_STAC_ANALOG_SPECIAL, 12, + stac9766_record_all_mux); +static SOC_ENUM_SINGLE_DECL(stac9766_boost1_enum, + AC97_MIC, 6, stac9766_boost1); /* 0/10dB */ +static SOC_ENUM_SINGLE_DECL(stac9766_boost2_enum, + AC97_STAC_ANALOG_SPECIAL, 2, stac9766_boost2); /* 0/20dB */ +static SOC_ENUM_SINGLE_DECL(stac9766_stereo_mic_enum, + AC97_STAC_STEREO_MIC, 2, stac9766_stereo_mic); + +static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(master_tlv, -4650, 150, 0); +static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(record_tlv, 0, 150, 0); +static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(beep_tlv, -4500, 300, 0); +static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(mix_tlv, -3450, 150, 0); + +static const struct snd_kcontrol_new stac9766_snd_ac97_controls[] = { + SOC_DOUBLE_TLV("Speaker Volume", AC97_MASTER, 8, 0, 31, 1, master_tlv), + SOC_SINGLE("Speaker Switch", AC97_MASTER, 15, 1, 1), + SOC_DOUBLE_TLV("Headphone Volume", AC97_HEADPHONE, 8, 0, 31, 1, + master_tlv), + SOC_SINGLE("Headphone Switch", AC97_HEADPHONE, 15, 1, 1), + SOC_SINGLE_TLV("Mono Out Volume", AC97_MASTER_MONO, 0, 31, 1, + master_tlv), + SOC_SINGLE("Mono Out Switch", AC97_MASTER_MONO, 15, 1, 1), + + SOC_DOUBLE_TLV("Record Volume", AC97_REC_GAIN, 8, 0, 15, 0, record_tlv), + SOC_SINGLE("Record Switch", AC97_REC_GAIN, 15, 1, 1), + + + SOC_SINGLE_TLV("Beep Volume", AC97_PC_BEEP, 1, 15, 1, beep_tlv), + SOC_SINGLE("Beep Switch", AC97_PC_BEEP, 15, 1, 1), + SOC_SINGLE("Beep Frequency", AC97_PC_BEEP, 5, 127, 1), + SOC_SINGLE_TLV("Phone Volume", AC97_PHONE, 0, 31, 1, mix_tlv), + SOC_SINGLE("Phone Switch", AC97_PHONE, 15, 1, 1), + + SOC_ENUM("Mic Boost1", stac9766_boost1_enum), + SOC_ENUM("Mic Boost2", stac9766_boost2_enum), + SOC_SINGLE_TLV("Mic Volume", AC97_MIC, 0, 31, 1, mix_tlv), + SOC_SINGLE("Mic Switch", AC97_MIC, 15, 1, 1), + SOC_ENUM("Stereo Mic", stac9766_stereo_mic_enum), + + SOC_DOUBLE_TLV("Line Volume", AC97_LINE, 8, 0, 31, 1, mix_tlv), + SOC_SINGLE("Line Switch", AC97_LINE, 15, 1, 1), + SOC_DOUBLE_TLV("CD Volume", AC97_CD, 8, 0, 31, 1, mix_tlv), + SOC_SINGLE("CD Switch", AC97_CD, 15, 1, 1), + SOC_DOUBLE_TLV("AUX Volume", AC97_AUX, 8, 0, 31, 1, mix_tlv), + SOC_SINGLE("AUX Switch", AC97_AUX, 15, 1, 1), + SOC_DOUBLE_TLV("Video Volume", AC97_VIDEO, 8, 0, 31, 1, mix_tlv), + SOC_SINGLE("Video Switch", AC97_VIDEO, 15, 1, 1), + + SOC_DOUBLE_TLV("DAC Volume", AC97_PCM, 8, 0, 31, 1, mix_tlv), + SOC_SINGLE("DAC Switch", AC97_PCM, 15, 1, 1), + SOC_SINGLE("Loopback Test Switch", AC97_GENERAL_PURPOSE, 7, 1, 0), + SOC_SINGLE("3D Volume", AC97_3D_CONTROL, 3, 2, 1), + SOC_SINGLE("3D Switch", AC97_GENERAL_PURPOSE, 13, 1, 0), + + SOC_ENUM("SPDIF Mux", stac9766_SPDIF_enum), + SOC_ENUM("Mic1/2 Mux", stac9766_mic_enum), + SOC_ENUM("Record All Mux", stac9766_record_all_enum), + SOC_ENUM("Record Mux", stac9766_record_enum), + SOC_ENUM("Mono Mux", stac9766_mono_enum), + SOC_ENUM("Pop Bypass Mux", stac9766_popbypass_enum), +}; + +static int ac97_analog_prepare(struct snd_pcm_substream *substream, + struct snd_soc_dai *dai) +{ + struct snd_soc_component *component = dai->component; + struct snd_pcm_runtime *runtime = substream->runtime; + unsigned short reg; + + /* enable variable rate audio, disable SPDIF output */ + snd_soc_component_update_bits(component, AC97_EXTENDED_STATUS, 0x5, 0x1); + + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + reg = AC97_PCM_FRONT_DAC_RATE; + else + reg = AC97_PCM_LR_ADC_RATE; + + return snd_soc_component_write(component, reg, runtime->rate); +} + +static int ac97_digital_prepare(struct snd_pcm_substream *substream, + struct snd_soc_dai *dai) +{ + struct snd_soc_component *component = dai->component; + struct snd_pcm_runtime *runtime = substream->runtime; + unsigned short reg; + + snd_soc_component_write(component, AC97_SPDIF, 0x2002); + + /* Enable VRA and SPDIF out */ + snd_soc_component_update_bits(component, AC97_EXTENDED_STATUS, 0x5, 0x5); + + reg = AC97_PCM_FRONT_DAC_RATE; + + return snd_soc_component_write(component, reg, runtime->rate); +} + +static int stac9766_set_bias_level(struct snd_soc_component *component, + enum snd_soc_bias_level level) +{ + switch (level) { + case SND_SOC_BIAS_ON: /* full On */ + case SND_SOC_BIAS_PREPARE: /* partial On */ + case SND_SOC_BIAS_STANDBY: /* Off, with power */ + snd_soc_component_write(component, AC97_POWERDOWN, 0x0000); + break; + case SND_SOC_BIAS_OFF: /* Off, without power */ + /* disable everything including AC link */ + snd_soc_component_write(component, AC97_POWERDOWN, 0xffff); + break; + } + return 0; +} + +static int stac9766_component_resume(struct snd_soc_component *component) +{ + struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component); + + return snd_ac97_reset(ac97, true, STAC9766_VENDOR_ID, + STAC9766_VENDOR_ID_MASK); +} + +static const struct snd_soc_dai_ops stac9766_dai_ops_analog = { + .prepare = ac97_analog_prepare, +}; + +static const struct snd_soc_dai_ops stac9766_dai_ops_digital = { + .prepare = ac97_digital_prepare, +}; + +static struct snd_soc_dai_driver stac9766_dai[] = { +{ + .name = "stac9766-hifi-analog", + + /* stream cababilities */ + .playback = { + .stream_name = "stac9766 analog", + .channels_min = 1, + .channels_max = 2, + .rates = SNDRV_PCM_RATE_8000_48000, + .formats = SND_SOC_STD_AC97_FMTS, + }, + .capture = { + .stream_name = "stac9766 analog", + .channels_min = 1, + .channels_max = 2, + .rates = SNDRV_PCM_RATE_8000_48000, + .formats = SND_SOC_STD_AC97_FMTS, + }, + /* alsa ops */ + .ops = &stac9766_dai_ops_analog, +}, +{ + .name = "stac9766-hifi-IEC958", + + /* stream cababilities */ + .playback = { + .stream_name = "stac9766 IEC958", + .channels_min = 1, + .channels_max = 2, + .rates = SNDRV_PCM_RATE_32000 | \ + SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000, + .formats = SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE, + }, + /* alsa ops */ + .ops = &stac9766_dai_ops_digital, +} +}; + +static int stac9766_component_probe(struct snd_soc_component *component) +{ + struct snd_ac97 *ac97; + struct regmap *regmap; + int ret; + + ac97 = snd_soc_new_ac97_component(component, STAC9766_VENDOR_ID, + STAC9766_VENDOR_ID_MASK); + if (IS_ERR(ac97)) + return PTR_ERR(ac97); + + regmap = regmap_init_ac97(ac97, &stac9766_regmap_config); + if (IS_ERR(regmap)) { + ret = PTR_ERR(regmap); + goto err_free_ac97; + } + + snd_soc_component_init_regmap(component, regmap); + snd_soc_component_set_drvdata(component, ac97); + + return 0; +err_free_ac97: + snd_soc_free_ac97_component(ac97); + return ret; +} + +static void stac9766_component_remove(struct snd_soc_component *component) +{ + struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component); + + snd_soc_component_exit_regmap(component); + snd_soc_free_ac97_component(ac97); +} + +static const struct snd_soc_component_driver soc_component_dev_stac9766 = { + .controls = stac9766_snd_ac97_controls, + .num_controls = ARRAY_SIZE(stac9766_snd_ac97_controls), + .set_bias_level = stac9766_set_bias_level, + .probe = stac9766_component_probe, + .remove = stac9766_component_remove, + .resume = stac9766_component_resume, + .suspend_bias_off = 1, + .idle_bias_on = 1, + .use_pmdown_time = 1, + .endianness = 1, + .non_legacy_dai_naming = 1, + +}; + +static int stac9766_probe(struct platform_device *pdev) +{ + return devm_snd_soc_register_component(&pdev->dev, + &soc_component_dev_stac9766, stac9766_dai, ARRAY_SIZE(stac9766_dai)); +} + +static struct platform_driver stac9766_codec_driver = { + .driver = { + .name = "stac9766-codec", + }, + + .probe = stac9766_probe, +}; + +module_platform_driver(stac9766_codec_driver); + +MODULE_DESCRIPTION("ASoC stac9766 driver"); +MODULE_AUTHOR("Jon Smirl "); +MODULE_LICENSE("GPL"); \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/stac9766.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/stac9766.c.yml new file mode 100644 index 00000000000..9027da5aa35 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/sound/soc/codecs/stac9766.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2009 Jon Smirl, Digispeaker +holders: + - Jon Smirl, Digispeaker +authors: + - Jon Smirl diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/perf/util/s390-cpumsf.c b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/perf/util/s390-cpumsf.c new file mode 100644 index 00000000000..d04c9b99a86 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/perf/util/s390-cpumsf.c @@ -0,0 +1,950 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright IBM Corp. 2018 + * Auxtrace support for s390 CPU-Measurement Sampling Facility + * + * Author(s): Thomas Richter + * + * Auxiliary traces are collected during 'perf record' using rbd000 event. + * Several PERF_RECORD_XXX are generated during recording: + * + * PERF_RECORD_AUX: + * Records that new data landed in the AUX buffer part. + * PERF_RECORD_AUXTRACE: + * Defines auxtrace data. Followed by the actual data. The contents of + * the auxtrace data is dependent on the event and the CPU. + * This record is generated by perf record command. For details + * see Documentation/perf.data-file-format.txt. + * PERF_RECORD_AUXTRACE_INFO: + * Defines a table of contains for PERF_RECORD_AUXTRACE records. This + * record is generated during 'perf record' command. Each record contains up + * to 256 entries describing offset and size of the AUXTRACE data in the + * perf.data file. + * PERF_RECORD_AUXTRACE_ERROR: + * Indicates an error during AUXTRACE collection such as buffer overflow. + * PERF_RECORD_FINISHED_ROUND: + * Perf events are not necessarily in time stamp order, as they can be + * collected in parallel on different CPUs. If the events should be + * processed in time order they need to be sorted first. + * Perf report guarantees that there is no reordering over a + * PERF_RECORD_FINISHED_ROUND boundary event. All perf records with a + * time stamp lower than this record are processed (and displayed) before + * the succeeding perf record are processed. + * + * These records are evaluated during perf report command. + * + * 1. PERF_RECORD_AUXTRACE_INFO is used to set up the infrastructure for + * auxiliary trace data processing. See s390_cpumsf_process_auxtrace_info() + * below. + * Auxiliary trace data is collected per CPU. To merge the data into the report + * an auxtrace_queue is created for each CPU. It is assumed that the auxtrace + * data is in ascending order. + * + * Each queue has a double linked list of auxtrace_buffers. This list contains + * the offset and size of a CPU's auxtrace data. During auxtrace processing + * the data portion is mmap()'ed. + * + * To sort the queues in chronological order, all queue access is controlled + * by the auxtrace_heap. This is basicly a stack, each stack element has two + * entries, the queue number and a time stamp. However the stack is sorted by + * the time stamps. The highest time stamp is at the bottom the lowest + * (nearest) time stamp is at the top. That sort order is maintained at all + * times! + * + * After the auxtrace infrastructure has been setup, the auxtrace queues are + * filled with data (offset/size pairs) and the auxtrace_heap is populated. + * + * 2. PERF_RECORD_XXX processing triggers access to the auxtrace_queues. + * Each record is handled by s390_cpumsf_process_event(). The time stamp of + * the perf record is compared with the time stamp located on the auxtrace_heap + * top element. If that time stamp is lower than the time stamp from the + * record sample, the auxtrace queues will be processed. As auxtrace queues + * control many auxtrace_buffers and each buffer can be quite large, the + * auxtrace buffer might be processed only partially. In this case the + * position in the auxtrace_buffer of that queue is remembered and the time + * stamp of the last processed entry of the auxtrace_buffer replaces the + * current auxtrace_heap top. + * + * 3. Auxtrace_queues might run of out data and are feeded by the + * PERF_RECORD_AUXTRACE handling, see s390_cpumsf_process_auxtrace_event(). + * + * Event Generation + * Each sampling-data entry in the auxilary trace data generates a perf sample. + * This sample is filled + * with data from the auxtrace such as PID/TID, instruction address, CPU state, + * etc. This sample is processed with perf_session__deliver_synth_event() to + * be included into the GUI. + * + * 4. PERF_RECORD_FINISHED_ROUND event is used to process all the remaining + * auxiliary traces entries until the time stamp of this record is reached + * auxtrace_heap top. This is triggered by ordered_event->deliver(). + * + * + * Perf event processing. + * Event processing of PERF_RECORD_XXX entries relies on time stamp entries. + * This is the function call sequence: + * + * __cmd_report() + * | + * perf_session__process_events() + * | + * __perf_session__process_events() + * | + * perf_session__process_event() + * | This functions splits the PERF_RECORD_XXX records. + * | - Those generated by perf record command (type number equal or higher + * | than PERF_RECORD_USER_TYPE_START) are handled by + * | perf_session__process_user_event(see below) + * | - Those generated by the kernel are handled by + * | perf_evlist__parse_sample_timestamp() + * | + * perf_evlist__parse_sample_timestamp() + * | Extract time stamp from sample data. + * | + * perf_session__queue_event() + * | If timestamp is positive the sample is entered into an ordered_event + * | list, sort order is the timestamp. The event processing is deferred until + * | later (see perf_session__process_user_event()). + * | Other timestamps (0 or -1) are handled immediately by + * | perf_session__deliver_event(). These are events generated at start up + * | of command perf record. They create PERF_RECORD_COMM and PERF_RECORD_MMAP* + * | records. They are needed to create a list of running processes and its + * | memory mappings and layout. They are needed at the beginning to enable + * | command perf report to create process trees and memory mappings. + * | + * perf_session__deliver_event() + * | Delivers a PERF_RECORD_XXX entry for handling. + * | + * auxtrace__process_event() + * | The timestamp of the PERF_RECORD_XXX entry is taken to correlate with + * | time stamps from the auxiliary trace buffers. This enables + * | synchronization between auxiliary trace data and the events on the + * | perf.data file. + * | + * machine__deliver_event() + * | Handles the PERF_RECORD_XXX event. This depends on the record type. + * It might update the process tree, update a process memory map or enter + * a sample with IP and call back chain data into GUI data pool. + * + * + * Deferred processing determined by perf_session__process_user_event() is + * finally processed when a PERF_RECORD_FINISHED_ROUND is encountered. These + * are generated during command perf record. + * The timestamp of PERF_RECORD_FINISHED_ROUND event is taken to process all + * PERF_RECORD_XXX entries stored in the ordered_event list. This list was + * built up while reading the perf.data file. + * Each event is now processed by calling perf_session__deliver_event(). + * This enables time synchronization between the data in the perf.data file and + * the data in the auxiliary trace buffers. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "cpumap.h" +#include "color.h" +#include "evsel.h" +#include "evlist.h" +#include "machine.h" +#include "session.h" +#include "util.h" +#include "thread.h" +#include "debug.h" +#include "auxtrace.h" +#include "s390-cpumsf.h" +#include "s390-cpumsf-kernel.h" + +struct s390_cpumsf { + struct auxtrace auxtrace; + struct auxtrace_queues queues; + struct auxtrace_heap heap; + struct perf_session *session; + struct machine *machine; + u32 auxtrace_type; + u32 pmu_type; + u16 machine_type; + bool data_queued; +}; + +struct s390_cpumsf_queue { + struct s390_cpumsf *sf; + unsigned int queue_nr; + struct auxtrace_buffer *buffer; + int cpu; +}; + +/* Display s390 CPU measurement facility basic-sampling data entry */ +static bool s390_cpumsf_basic_show(const char *color, size_t pos, + struct hws_basic_entry *basic) +{ + if (basic->def != 1) { + pr_err("Invalid AUX trace basic entry [%#08zx]\n", pos); + return false; + } + color_fprintf(stdout, color, " [%#08zx] Basic Def:%04x Inst:%#04x" + " %c%c%c%c AS:%d ASN:%#04x IA:%#018llx\n" + "\t\tCL:%d HPP:%#018llx GPP:%#018llx\n", + pos, basic->def, basic->U, + basic->T ? 'T' : ' ', + basic->W ? 'W' : ' ', + basic->P ? 'P' : ' ', + basic->I ? 'I' : ' ', + basic->AS, basic->prim_asn, basic->ia, basic->CL, + basic->hpp, basic->gpp); + return true; +} + +/* Display s390 CPU measurement facility diagnostic-sampling data entry */ +static bool s390_cpumsf_diag_show(const char *color, size_t pos, + struct hws_diag_entry *diag) +{ + if (diag->def < S390_CPUMSF_DIAG_DEF_FIRST) { + pr_err("Invalid AUX trace diagnostic entry [%#08zx]\n", pos); + return false; + } + color_fprintf(stdout, color, " [%#08zx] Diag Def:%04x %c\n", + pos, diag->def, diag->I ? 'I' : ' '); + return true; +} + +/* Return TOD timestamp contained in an trailer entry */ +static unsigned long long trailer_timestamp(struct hws_trailer_entry *te) +{ + /* te->t set: TOD in STCKE format, bytes 8-15 + * to->t not set: TOD in STCK format, bytes 0-7 + */ + unsigned long long ts; + + memcpy(&ts, &te->timestamp[te->t], sizeof(ts)); + return ts; +} + +/* Display s390 CPU measurement facility trailer entry */ +static bool s390_cpumsf_trailer_show(const char *color, size_t pos, + struct hws_trailer_entry *te) +{ + if (te->bsdes != sizeof(struct hws_basic_entry)) { + pr_err("Invalid AUX trace trailer entry [%#08zx]\n", pos); + return false; + } + color_fprintf(stdout, color, " [%#08zx] Trailer %c%c%c bsdes:%d" + " dsdes:%d Overflow:%lld Time:%#llx\n" + "\t\tC:%d TOD:%#lx 1:%#llx 2:%#llx\n", + pos, + te->f ? 'F' : ' ', + te->a ? 'A' : ' ', + te->t ? 'T' : ' ', + te->bsdes, te->dsdes, te->overflow, + trailer_timestamp(te), te->clock_base, te->progusage2, + te->progusage[0], te->progusage[1]); + return true; +} + +/* Test a sample data block. It must be 4KB or a multiple thereof in size and + * 4KB page aligned. Each sample data page has a trailer entry at the + * end which contains the sample entry data sizes. + * + * Return true if the sample data block passes the checks and set the + * basic set entry size and diagnostic set entry size. + * + * Return false on failure. + * + * Note: Old hardware does not set the basic or diagnostic entry sizes + * in the trailer entry. Use the type number instead. + */ +static bool s390_cpumsf_validate(int machine_type, + unsigned char *buf, size_t len, + unsigned short *bsdes, + unsigned short *dsdes) +{ + struct hws_basic_entry *basic = (struct hws_basic_entry *)buf; + struct hws_trailer_entry *te; + + *dsdes = *bsdes = 0; + if (len & (S390_CPUMSF_PAGESZ - 1)) /* Illegal size */ + return false; + if (basic->def != 1) /* No basic set entry, must be first */ + return false; + /* Check for trailer entry at end of SDB */ + te = (struct hws_trailer_entry *)(buf + S390_CPUMSF_PAGESZ + - sizeof(*te)); + *bsdes = te->bsdes; + *dsdes = te->dsdes; + if (!te->bsdes && !te->dsdes) { + /* Very old hardware, use CPUID */ + switch (machine_type) { + case 2097: + case 2098: + *dsdes = 64; + *bsdes = 32; + break; + case 2817: + case 2818: + *dsdes = 74; + *bsdes = 32; + break; + case 2827: + case 2828: + *dsdes = 85; + *bsdes = 32; + break; + case 2964: + case 2965: + *dsdes = 112; + *bsdes = 32; + break; + default: + /* Illegal trailer entry */ + return false; + } + } + return true; +} + +/* Return true if there is room for another entry */ +static bool s390_cpumsf_reached_trailer(size_t entry_sz, size_t pos) +{ + size_t payload = S390_CPUMSF_PAGESZ - sizeof(struct hws_trailer_entry); + + if (payload - (pos & (S390_CPUMSF_PAGESZ - 1)) < entry_sz) + return false; + return true; +} + +/* Dump an auxiliary buffer. These buffers are multiple of + * 4KB SDB pages. + */ +static void s390_cpumsf_dump(struct s390_cpumsf *sf, + unsigned char *buf, size_t len) +{ + const char *color = PERF_COLOR_BLUE; + struct hws_basic_entry *basic; + struct hws_diag_entry *diag; + unsigned short bsdes, dsdes; + size_t pos = 0; + + color_fprintf(stdout, color, + ". ... s390 AUX data: size %zu bytes\n", + len); + + if (!s390_cpumsf_validate(sf->machine_type, buf, len, &bsdes, + &dsdes)) { + pr_err("Invalid AUX trace data block size:%zu" + " (type:%d bsdes:%hd dsdes:%hd)\n", + len, sf->machine_type, bsdes, dsdes); + return; + } + + /* s390 kernel always returns 4KB blocks fully occupied, + * no partially filled SDBs. + */ + while (pos < len) { + /* Handle Basic entry */ + basic = (struct hws_basic_entry *)(buf + pos); + if (s390_cpumsf_basic_show(color, pos, basic)) + pos += bsdes; + else + return; + + /* Handle Diagnostic entry */ + diag = (struct hws_diag_entry *)(buf + pos); + if (s390_cpumsf_diag_show(color, pos, diag)) + pos += dsdes; + else + return; + + /* Check for trailer entry */ + if (!s390_cpumsf_reached_trailer(bsdes + dsdes, pos)) { + /* Show trailer entry */ + struct hws_trailer_entry te; + + pos = (pos + S390_CPUMSF_PAGESZ) + & ~(S390_CPUMSF_PAGESZ - 1); + pos -= sizeof(te); + memcpy(&te, buf + pos, sizeof(te)); + /* Set descriptor sizes in case of old hardware + * where these values are not set. + */ + te.bsdes = bsdes; + te.dsdes = dsdes; + if (s390_cpumsf_trailer_show(color, pos, &te)) + pos += sizeof(te); + else + return; + } + } +} + +static void s390_cpumsf_dump_event(struct s390_cpumsf *sf, unsigned char *buf, + size_t len) +{ + printf(".\n"); + s390_cpumsf_dump(sf, buf, len); +} + +#define S390_LPP_PID_MASK 0xffffffff + +static bool s390_cpumsf_make_event(size_t pos, + struct hws_basic_entry *basic, + struct s390_cpumsf_queue *sfq) +{ + struct perf_sample sample = { + .ip = basic->ia, + .pid = basic->hpp & S390_LPP_PID_MASK, + .tid = basic->hpp & S390_LPP_PID_MASK, + .cpumode = PERF_RECORD_MISC_CPUMODE_UNKNOWN, + .cpu = sfq->cpu, + .period = 1 + }; + union perf_event event; + + memset(&event, 0, sizeof(event)); + if (basic->CL == 1) /* Native LPAR mode */ + sample.cpumode = basic->P ? PERF_RECORD_MISC_USER + : PERF_RECORD_MISC_KERNEL; + else if (basic->CL == 2) /* Guest kernel/user space */ + sample.cpumode = basic->P ? PERF_RECORD_MISC_GUEST_USER + : PERF_RECORD_MISC_GUEST_KERNEL; + else if (basic->gpp || basic->prim_asn != 0xffff) + /* Use heuristics on old hardware */ + sample.cpumode = basic->P ? PERF_RECORD_MISC_GUEST_USER + : PERF_RECORD_MISC_GUEST_KERNEL; + else + sample.cpumode = basic->P ? PERF_RECORD_MISC_USER + : PERF_RECORD_MISC_KERNEL; + + event.sample.header.type = PERF_RECORD_SAMPLE; + event.sample.header.misc = sample.cpumode; + event.sample.header.size = sizeof(struct perf_event_header); + + pr_debug4("%s pos:%#zx ip:%#" PRIx64 " P:%d CL:%d pid:%d.%d cpumode:%d cpu:%d\n", + __func__, pos, sample.ip, basic->P, basic->CL, sample.pid, + sample.tid, sample.cpumode, sample.cpu); + if (perf_session__deliver_synth_event(sfq->sf->session, &event, + &sample)) { + pr_err("s390 Auxiliary Trace: failed to deliver event\n"); + return false; + } + return true; +} + +static unsigned long long get_trailer_time(const unsigned char *buf) +{ + struct hws_trailer_entry *te; + unsigned long long aux_time; + + te = (struct hws_trailer_entry *)(buf + S390_CPUMSF_PAGESZ + - sizeof(*te)); + + if (!te->clock_base) /* TOD_CLOCK_BASE value missing */ + return 0; + + /* Correct calculation to convert time stamp in trailer entry to + * nano seconds (taken from arch/s390 function tod_to_ns()). + * TOD_CLOCK_BASE is stored in trailer entry member progusage2. + */ + aux_time = trailer_timestamp(te) - te->progusage2; + aux_time = (aux_time >> 9) * 125 + (((aux_time & 0x1ff) * 125) >> 9); + return aux_time; +} + +/* Process the data samples of a single queue. The first parameter is a + * pointer to the queue, the second parameter is the time stamp. This + * is the time stamp: + * - of the event that triggered this processing. + * - or the time stamp when the last proccesing of this queue stopped. + * In this case it stopped at a 4KB page boundary and record the + * position on where to continue processing on the next invocation + * (see buffer->use_data and buffer->use_size). + * + * When this function returns the second parameter is updated to + * reflect the time stamp of the last processed auxiliary data entry + * (taken from the trailer entry of that page). The caller uses this + * returned time stamp to record the last processed entry in this + * queue. + * + * The function returns: + * 0: Processing successful. The second parameter returns the + * time stamp from the trailer entry until which position + * processing took place. Subsequent calls resume from this + * position. + * <0: An error occurred during processing. The second parameter + * returns the maximum time stamp. + * >0: Done on this queue. The second parameter returns the + * maximum time stamp. + */ +static int s390_cpumsf_samples(struct s390_cpumsf_queue *sfq, u64 *ts) +{ + struct s390_cpumsf *sf = sfq->sf; + unsigned char *buf = sfq->buffer->use_data; + size_t len = sfq->buffer->use_size; + struct hws_basic_entry *basic; + unsigned short bsdes, dsdes; + size_t pos = 0; + int err = 1; + u64 aux_ts; + + if (!s390_cpumsf_validate(sf->machine_type, buf, len, &bsdes, + &dsdes)) { + *ts = ~0ULL; + return -1; + } + + /* Get trailer entry time stamp and check if entries in + * this auxiliary page are ready for processing. If the + * time stamp of the first entry is too high, whole buffer + * can be skipped. In this case return time stamp. + */ + aux_ts = get_trailer_time(buf); + if (!aux_ts) { + pr_err("[%#08" PRIx64 "] Invalid AUX trailer entry TOD clock base\n", + (s64)sfq->buffer->data_offset); + aux_ts = ~0ULL; + goto out; + } + if (aux_ts > *ts) { + *ts = aux_ts; + return 0; + } + + while (pos < len) { + /* Handle Basic entry */ + basic = (struct hws_basic_entry *)(buf + pos); + if (s390_cpumsf_make_event(pos, basic, sfq)) + pos += bsdes; + else { + err = -EBADF; + goto out; + } + + pos += dsdes; /* Skip diagnositic entry */ + + /* Check for trailer entry */ + if (!s390_cpumsf_reached_trailer(bsdes + dsdes, pos)) { + pos = (pos + S390_CPUMSF_PAGESZ) + & ~(S390_CPUMSF_PAGESZ - 1); + /* Check existence of next page */ + if (pos >= len) + break; + aux_ts = get_trailer_time(buf + pos); + if (!aux_ts) { + aux_ts = ~0ULL; + goto out; + } + if (aux_ts > *ts) { + *ts = aux_ts; + sfq->buffer->use_data += pos; + sfq->buffer->use_size -= pos; + return 0; + } + } + } +out: + *ts = aux_ts; + sfq->buffer->use_size = 0; + sfq->buffer->use_data = NULL; + return err; /* Buffer completely scanned or error */ +} + +/* Run the s390 auxiliary trace decoder. + * Select the queue buffer to operate on, the caller already selected + * the proper queue, depending on second parameter 'ts'. + * This is the time stamp until which the auxiliary entries should + * be processed. This value is updated by called functions and + * returned to the caller. + * + * Resume processing in the current buffer. If there is no buffer + * get a new buffer from the queue and setup start position for + * processing. + * When a buffer is completely processed remove it from the queue + * before returning. + * + * This function returns + * 1: When the queue is empty. Second parameter will be set to + * maximum time stamp. + * 0: Normal processing done. + * <0: Error during queue buffer setup. This causes the caller + * to stop processing completely. + */ +static int s390_cpumsf_run_decoder(struct s390_cpumsf_queue *sfq, + u64 *ts) +{ + + struct auxtrace_buffer *buffer; + struct auxtrace_queue *queue; + int err; + + queue = &sfq->sf->queues.queue_array[sfq->queue_nr]; + + /* Get buffer and last position in buffer to resume + * decoding the auxiliary entries. One buffer might be large + * and decoding might stop in between. This depends on the time + * stamp of the trailer entry in each page of the auxiliary + * data and the time stamp of the event triggering the decoding. + */ + if (sfq->buffer == NULL) { + sfq->buffer = buffer = auxtrace_buffer__next(queue, + sfq->buffer); + if (!buffer) { + *ts = ~0ULL; + return 1; /* Processing done on this queue */ + } + /* Start with a new buffer on this queue */ + if (buffer->data) { + buffer->use_size = buffer->size; + buffer->use_data = buffer->data; + } + } else + buffer = sfq->buffer; + + if (!buffer->data) { + int fd = perf_data__fd(sfq->sf->session->data); + + buffer->data = auxtrace_buffer__get_data(buffer, fd); + if (!buffer->data) + return -ENOMEM; + buffer->use_size = buffer->size; + buffer->use_data = buffer->data; + } + pr_debug4("%s queue_nr:%d buffer:%" PRId64 " offset:%#" PRIx64 " size:%#zx rest:%#zx\n", + __func__, sfq->queue_nr, buffer->buffer_nr, buffer->offset, + buffer->size, buffer->use_size); + err = s390_cpumsf_samples(sfq, ts); + + /* If non-zero, there is either an error (err < 0) or the buffer is + * completely done (err > 0). The error is unrecoverable, usually + * some descriptors could not be read successfully, so continue with + * the next buffer. + * In both cases the parameter 'ts' has been updated. + */ + if (err) { + sfq->buffer = NULL; + list_del(&buffer->list); + auxtrace_buffer__free(buffer); + if (err > 0) /* Buffer done, no error */ + err = 0; + } + return err; +} + +static struct s390_cpumsf_queue * +s390_cpumsf_alloc_queue(struct s390_cpumsf *sf, unsigned int queue_nr) +{ + struct s390_cpumsf_queue *sfq; + + sfq = zalloc(sizeof(struct s390_cpumsf_queue)); + if (sfq == NULL) + return NULL; + + sfq->sf = sf; + sfq->queue_nr = queue_nr; + sfq->cpu = -1; + return sfq; +} + +static int s390_cpumsf_setup_queue(struct s390_cpumsf *sf, + struct auxtrace_queue *queue, + unsigned int queue_nr, u64 ts) +{ + struct s390_cpumsf_queue *sfq = queue->priv; + + if (list_empty(&queue->head)) + return 0; + + if (sfq == NULL) { + sfq = s390_cpumsf_alloc_queue(sf, queue_nr); + if (!sfq) + return -ENOMEM; + queue->priv = sfq; + + if (queue->cpu != -1) + sfq->cpu = queue->cpu; + } + return auxtrace_heap__add(&sf->heap, queue_nr, ts); +} + +static int s390_cpumsf_setup_queues(struct s390_cpumsf *sf, u64 ts) +{ + unsigned int i; + int ret = 0; + + for (i = 0; i < sf->queues.nr_queues; i++) { + ret = s390_cpumsf_setup_queue(sf, &sf->queues.queue_array[i], + i, ts); + if (ret) + break; + } + return ret; +} + +static int s390_cpumsf_update_queues(struct s390_cpumsf *sf, u64 ts) +{ + if (!sf->queues.new_data) + return 0; + + sf->queues.new_data = false; + return s390_cpumsf_setup_queues(sf, ts); +} + +static int s390_cpumsf_process_queues(struct s390_cpumsf *sf, u64 timestamp) +{ + unsigned int queue_nr; + u64 ts; + int ret; + + while (1) { + struct auxtrace_queue *queue; + struct s390_cpumsf_queue *sfq; + + if (!sf->heap.heap_cnt) + return 0; + + if (sf->heap.heap_array[0].ordinal >= timestamp) + return 0; + + queue_nr = sf->heap.heap_array[0].queue_nr; + queue = &sf->queues.queue_array[queue_nr]; + sfq = queue->priv; + + auxtrace_heap__pop(&sf->heap); + if (sf->heap.heap_cnt) { + ts = sf->heap.heap_array[0].ordinal + 1; + if (ts > timestamp) + ts = timestamp; + } else { + ts = timestamp; + } + + ret = s390_cpumsf_run_decoder(sfq, &ts); + if (ret < 0) { + auxtrace_heap__add(&sf->heap, queue_nr, ts); + return ret; + } + if (!ret) { + ret = auxtrace_heap__add(&sf->heap, queue_nr, ts); + if (ret < 0) + return ret; + } + } + return 0; +} + +static int s390_cpumsf_synth_error(struct s390_cpumsf *sf, int code, int cpu, + pid_t pid, pid_t tid, u64 ip) +{ + char msg[MAX_AUXTRACE_ERROR_MSG]; + union perf_event event; + int err; + + strncpy(msg, "Lost Auxiliary Trace Buffer", sizeof(msg) - 1); + auxtrace_synth_error(&event.auxtrace_error, PERF_AUXTRACE_ERROR_ITRACE, + code, cpu, pid, tid, ip, msg); + + err = perf_session__deliver_synth_event(sf->session, &event, NULL); + if (err) + pr_err("s390 Auxiliary Trace: failed to deliver error event," + "error %d\n", err); + return err; +} + +static int s390_cpumsf_lost(struct s390_cpumsf *sf, struct perf_sample *sample) +{ + return s390_cpumsf_synth_error(sf, 1, sample->cpu, + sample->pid, sample->tid, 0); +} + +static int +s390_cpumsf_process_event(struct perf_session *session __maybe_unused, + union perf_event *event, + struct perf_sample *sample, + struct perf_tool *tool) +{ + struct s390_cpumsf *sf = container_of(session->auxtrace, + struct s390_cpumsf, + auxtrace); + u64 timestamp = sample->time; + int err = 0; + + if (dump_trace) + return 0; + + if (!tool->ordered_events) { + pr_err("s390 Auxiliary Trace requires ordered events\n"); + return -EINVAL; + } + + if (event->header.type == PERF_RECORD_AUX && + event->aux.flags & PERF_AUX_FLAG_TRUNCATED) + return s390_cpumsf_lost(sf, sample); + + if (timestamp) { + err = s390_cpumsf_update_queues(sf, timestamp); + if (!err) + err = s390_cpumsf_process_queues(sf, timestamp); + } + return err; +} + +struct s390_cpumsf_synth { + struct perf_tool cpumsf_tool; + struct perf_session *session; +}; + +static int +s390_cpumsf_process_auxtrace_event(struct perf_session *session, + union perf_event *event __maybe_unused, + struct perf_tool *tool __maybe_unused) +{ + struct s390_cpumsf *sf = container_of(session->auxtrace, + struct s390_cpumsf, + auxtrace); + + int fd = perf_data__fd(session->data); + struct auxtrace_buffer *buffer; + off_t data_offset; + int err; + + if (sf->data_queued) + return 0; + + if (perf_data__is_pipe(session->data)) { + data_offset = 0; + } else { + data_offset = lseek(fd, 0, SEEK_CUR); + if (data_offset == -1) + return -errno; + } + + err = auxtrace_queues__add_event(&sf->queues, session, event, + data_offset, &buffer); + if (err) + return err; + + /* Dump here after copying piped trace out of the pipe */ + if (dump_trace) { + if (auxtrace_buffer__get_data(buffer, fd)) { + s390_cpumsf_dump_event(sf, buffer->data, + buffer->size); + auxtrace_buffer__put_data(buffer); + } + } + return 0; +} + +static void s390_cpumsf_free_events(struct perf_session *session __maybe_unused) +{ +} + +static int s390_cpumsf_flush(struct perf_session *session __maybe_unused, + struct perf_tool *tool __maybe_unused) +{ + return 0; +} + +static void s390_cpumsf_free_queues(struct perf_session *session) +{ + struct s390_cpumsf *sf = container_of(session->auxtrace, + struct s390_cpumsf, + auxtrace); + struct auxtrace_queues *queues = &sf->queues; + unsigned int i; + + for (i = 0; i < queues->nr_queues; i++) + zfree(&queues->queue_array[i].priv); + auxtrace_queues__free(queues); +} + +static void s390_cpumsf_free(struct perf_session *session) +{ + struct s390_cpumsf *sf = container_of(session->auxtrace, + struct s390_cpumsf, + auxtrace); + + auxtrace_heap__free(&sf->heap); + s390_cpumsf_free_queues(session); + session->auxtrace = NULL; + free(sf); +} + +static int s390_cpumsf_get_type(const char *cpuid) +{ + int ret, family = 0; + + ret = sscanf(cpuid, "%*[^,],%u", &family); + return (ret == 1) ? family : 0; +} + +/* Check itrace options set on perf report command. + * Return true, if none are set or all options specified can be + * handled on s390. + * Return false otherwise. + */ +static bool check_auxtrace_itrace(struct itrace_synth_opts *itops) +{ + if (!itops || !itops->set) + return true; + pr_err("No --itrace options supported\n"); + return false; +} + +int s390_cpumsf_process_auxtrace_info(union perf_event *event, + struct perf_session *session) +{ + struct auxtrace_info_event *auxtrace_info = &event->auxtrace_info; + struct s390_cpumsf *sf; + int err; + + if (auxtrace_info->header.size < sizeof(struct auxtrace_info_event)) + return -EINVAL; + + sf = zalloc(sizeof(struct s390_cpumsf)); + if (sf == NULL) + return -ENOMEM; + + if (!check_auxtrace_itrace(session->itrace_synth_opts)) { + err = -EINVAL; + goto err_free; + } + + err = auxtrace_queues__init(&sf->queues); + if (err) + goto err_free; + + sf->session = session; + sf->machine = &session->machines.host; /* No kvm support */ + sf->auxtrace_type = auxtrace_info->type; + sf->pmu_type = PERF_TYPE_RAW; + sf->machine_type = s390_cpumsf_get_type(session->evlist->env->cpuid); + + sf->auxtrace.process_event = s390_cpumsf_process_event; + sf->auxtrace.process_auxtrace_event = s390_cpumsf_process_auxtrace_event; + sf->auxtrace.flush_events = s390_cpumsf_flush; + sf->auxtrace.free_events = s390_cpumsf_free_events; + sf->auxtrace.free = s390_cpumsf_free; + session->auxtrace = &sf->auxtrace; + + if (dump_trace) + return 0; + + err = auxtrace_queues__process_index(&sf->queues, session); + if (err) + goto err_free_queues; + + if (sf->queues.populated) + sf->data_queued = true; + + return 0; + +err_free_queues: + auxtrace_queues__free(&sf->queues); + session->auxtrace = NULL; +err_free: + free(sf); + return err; +} \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/perf/util/s390-cpumsf.c.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/perf/util/s390-cpumsf.c.yml new file mode 100644 index 00000000000..a7a67156677 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/perf/util/s390-cpumsf.c.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright IBM Corp. 2018 Auxtrace support for s390 CPU-Measurement Sampling Facility +holders: + - IBM Corp. Auxtrace support for s390 CPU-Measurement Sampling Facility +authors: + - Thomas Richter diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/perf/util/s390-cpumsf.h b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/perf/util/s390-cpumsf.h new file mode 100644 index 00000000000..124c0107cf0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/perf/util/s390-cpumsf.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright IBM Corp. 2018 + * Auxtrace support for s390 CPU-Measurement Sampling Facility + * + * Author(s): Thomas Richter + */ + +#ifndef INCLUDE__PERF_S390_CPUMSF_H +#define INCLUDE__PERF_S390_CPUMSF_H + +union perf_event; +struct perf_session; +struct perf_pmu; + +struct auxtrace_record * +s390_cpumsf_recording_init(int *err, struct perf_pmu *s390_cpumsf_pmu); + +int s390_cpumsf_process_auxtrace_info(union perf_event *event, + struct perf_session *session); +#endif \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/perf/util/s390-cpumsf.h.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/perf/util/s390-cpumsf.h.yml new file mode 100644 index 00000000000..a7a67156677 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/perf/util/s390-cpumsf.h.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright IBM Corp. 2018 Auxtrace support for s390 CPU-Measurement Sampling Facility +holders: + - IBM Corp. Auxtrace support for s390 CPU-Measurement Sampling Facility +authors: + - Thomas Richter diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/cs.po b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/cs.po new file mode 100644 index 00000000000..a34f23a5384 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/cs.po @@ -0,0 +1,944 @@ +# translation of cs.po to Czech +# Czech translation for cpufrequtils package +# Czech messages for cpufrequtils. +# Copyright (C) 2007 kavol +# This file is distributed under the same license as the cpufrequtils package. +# +# Karel Volný , 2007, 2008. +msgid "" +msgstr "" +"Project-Id-Version: cs\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-03-08 17:03+0100\n" +"PO-Revision-Date: 2008-06-11 16:26+0200\n" +"Last-Translator: Karel Volný \n" +"Language-Team: Czech \n" +"Language: cs\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" +"X-Generator: KBabel 1.11.4\n" + +#: utils/idle_monitor/nhm_idle.c:36 +msgid "Processor Core C3" +msgstr "" + +#: utils/idle_monitor/nhm_idle.c:43 +msgid "Processor Core C6" +msgstr "" + +#: utils/idle_monitor/nhm_idle.c:51 +msgid "Processor Package C3" +msgstr "" + +#: utils/idle_monitor/nhm_idle.c:58 utils/idle_monitor/amd_fam14h_idle.c:70 +msgid "Processor Package C6" +msgstr "" + +#: utils/idle_monitor/snb_idle.c:33 +msgid "Processor Core C7" +msgstr "" + +#: utils/idle_monitor/snb_idle.c:40 +msgid "Processor Package C2" +msgstr "" + +#: utils/idle_monitor/snb_idle.c:47 +msgid "Processor Package C7" +msgstr "" + +#: utils/idle_monitor/amd_fam14h_idle.c:56 +msgid "Package in sleep state (PC1 or deeper)" +msgstr "" + +#: utils/idle_monitor/amd_fam14h_idle.c:63 +msgid "Processor Package C1" +msgstr "" + +#: utils/idle_monitor/amd_fam14h_idle.c:77 +msgid "North Bridge P1 boolean counter (returns 0 or 1)" +msgstr "" + +#: utils/idle_monitor/mperf_monitor.c:35 +msgid "Processor Core not idle" +msgstr "" + +#: utils/idle_monitor/mperf_monitor.c:42 +msgid "Processor Core in an idle state" +msgstr "" + +#: utils/idle_monitor/mperf_monitor.c:50 +msgid "Average Frequency (including boost) in MHz" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:66 +#, c-format +msgid "" +"cpupower monitor: [-h] [ [-t] | [-l] | [-m ,[] ] ] [-i " +"interval_sec | -c command ...]\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:69 +#, c-format +msgid "" +"cpupower monitor: [-v] [-h] [ [-t] | [-l] | [-m ,[] ] ] [-i " +"interval_sec | -c command ...]\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:71 +#, c-format +msgid "\t -v: be more verbose\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:73 +#, c-format +msgid "\t -h: print this help\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:74 +#, c-format +msgid "\t -i: time intervall to measure for in seconds (default 1)\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:75 +#, c-format +msgid "\t -t: show CPU topology/hierarchy\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:76 +#, c-format +msgid "\t -l: list available CPU sleep monitors (for use with -m)\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:77 +#, c-format +msgid "\t -m: show specific CPU sleep monitors only (in same order)\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:79 +#, c-format +msgid "" +"only one of: -t, -l, -m are allowed\n" +"If none of them is passed," +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:80 +#, c-format +msgid " all supported monitors are shown\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:197 +#, c-format +msgid "Monitor %s, Counter %s has no count function. Implementation error\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:207 +#, c-format +msgid " *is offline\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:236 +#, c-format +msgid "%s: max monitor name length (%d) exceeded\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:250 +#, c-format +msgid "No matching monitor found in %s, try -l option\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:266 +#, c-format +msgid "Monitor \"%s\" (%d states) - Might overflow after %u s\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:319 +#, c-format +msgid "%s took %.5f seconds and exited with status %d\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:406 +#, c-format +msgid "Cannot read number of available processors\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:417 +#, c-format +msgid "Available monitor %s needs root access\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:428 +#, c-format +msgid "No HW Cstate monitors found\n" +msgstr "" + +#: utils/cpupower.c:78 +#, c-format +msgid "cpupower [ -c cpulist ] subcommand [ARGS]\n" +msgstr "" + +#: utils/cpupower.c:79 +#, c-format +msgid "cpupower --version\n" +msgstr "" + +#: utils/cpupower.c:80 +#, c-format +msgid "Supported subcommands are:\n" +msgstr "" + +#: utils/cpupower.c:83 +#, c-format +msgid "" +"\n" +"Some subcommands can make use of the -c cpulist option.\n" +msgstr "" + +#: utils/cpupower.c:84 +#, c-format +msgid "Look at the general cpupower manpage how to use it\n" +msgstr "" + +#: utils/cpupower.c:85 +#, c-format +msgid "and read up the subcommand's manpage whether it is supported.\n" +msgstr "" + +#: utils/cpupower.c:86 +#, c-format +msgid "" +"\n" +"Use cpupower help subcommand for getting help for above subcommands.\n" +msgstr "" + +#: utils/cpupower.c:91 +#, c-format +msgid "Report errors and bugs to %s, please.\n" +msgstr "" +"Chyby v programu prosím hlaste na %s (anglicky).\n" +"Chyby v překladu prosím hlaste na kavol@seznam.cz (česky ;-)\n" + +#: utils/cpupower.c:114 +#, c-format +msgid "Error parsing cpu list\n" +msgstr "" + +#: utils/cpupower.c:172 +#, c-format +msgid "Subcommand %s needs root privileges\n" +msgstr "" + +#: utils/cpufreq-info.c:31 +#, c-format +msgid "Couldn't count the number of CPUs (%s: %s), assuming 1\n" +msgstr "Nelze zjistit počet CPU (%s: %s), předpokládá se 1.\n" + +#: utils/cpufreq-info.c:63 +#, c-format +msgid "" +" minimum CPU frequency - maximum CPU frequency - governor\n" +msgstr "" +" minimální frekvence CPU - maximální frekvence CPU - regulátor\n" + +#: utils/cpufreq-info.c:151 +#, c-format +msgid "Error while evaluating Boost Capabilities on CPU %d -- are you root?\n" +msgstr "" + +#. P state changes via MSR are identified via cpuid 80000007 +#. on Intel and AMD, but we assume boost capable machines can do that +#. if (cpuid_eax(0x80000000) >= 0x80000007 +#. && (cpuid_edx(0x80000007) & (1 << 7))) +#. +#: utils/cpufreq-info.c:161 +#, c-format +msgid " boost state support: \n" +msgstr "" + +#: utils/cpufreq-info.c:163 +#, c-format +msgid " Supported: %s\n" +msgstr "" + +#: utils/cpufreq-info.c:163 utils/cpufreq-info.c:164 +msgid "yes" +msgstr "" + +#: utils/cpufreq-info.c:163 utils/cpufreq-info.c:164 +msgid "no" +msgstr "" + +#: utils/cpufreq-info.c:164 +#, fuzzy, c-format +msgid " Active: %s\n" +msgstr " ovladač: %s\n" + +#: utils/cpufreq-info.c:177 +#, c-format +msgid " Boost States: %d\n" +msgstr "" + +#: utils/cpufreq-info.c:178 +#, c-format +msgid " Total States: %d\n" +msgstr "" + +#: utils/cpufreq-info.c:181 +#, c-format +msgid " Pstate-Pb%d: %luMHz (boost state)\n" +msgstr "" + +#: utils/cpufreq-info.c:184 +#, c-format +msgid " Pstate-P%d: %luMHz\n" +msgstr "" + +#: utils/cpufreq-info.c:211 +#, c-format +msgid " no or unknown cpufreq driver is active on this CPU\n" +msgstr " pro tento CPU není aktivní žádný známý ovladač cpufreq\n" + +#: utils/cpufreq-info.c:213 +#, c-format +msgid " driver: %s\n" +msgstr " ovladač: %s\n" + +#: utils/cpufreq-info.c:219 +#, fuzzy, c-format +msgid " CPUs which run at the same hardware frequency: " +msgstr " CPU, které musí měnit frekvenci zároveň: " + +#: utils/cpufreq-info.c:230 +#, fuzzy, c-format +msgid " CPUs which need to have their frequency coordinated by software: " +msgstr " CPU, které musí měnit frekvenci zároveň: " + +#: utils/cpufreq-info.c:241 +#, c-format +msgid " maximum transition latency: " +msgstr "" + +#: utils/cpufreq-info.c:247 +#, c-format +msgid " hardware limits: " +msgstr " hardwarové meze: " + +#: utils/cpufreq-info.c:256 +#, c-format +msgid " available frequency steps: " +msgstr " dostupné frekvence: " + +#: utils/cpufreq-info.c:269 +#, c-format +msgid " available cpufreq governors: " +msgstr " dostupné regulátory: " + +#: utils/cpufreq-info.c:280 +#, c-format +msgid " current policy: frequency should be within " +msgstr " současná taktika: frekvence by měla být mezi " + +#: utils/cpufreq-info.c:282 +#, c-format +msgid " and " +msgstr " a " + +#: utils/cpufreq-info.c:286 +#, c-format +msgid "" +"The governor \"%s\" may decide which speed to use\n" +" within this range.\n" +msgstr "" +" Regulátor \"%s\" může rozhodnout jakou frekvenci použít\n" +" v těchto mezích.\n" + +#: utils/cpufreq-info.c:293 +#, c-format +msgid " current CPU frequency is " +msgstr " současná frekvence CPU je " + +#: utils/cpufreq-info.c:296 +#, c-format +msgid " (asserted by call to hardware)" +msgstr " (zjištěno hardwarovým voláním)" + +#: utils/cpufreq-info.c:304 +#, c-format +msgid " cpufreq stats: " +msgstr " statistika cpufreq: " + +#: utils/cpufreq-info.c:472 +#, fuzzy, c-format +msgid "Usage: cpupower freqinfo [options]\n" +msgstr "Užití: cpufreq-info [přepínače]\n" + +#: utils/cpufreq-info.c:473 utils/cpufreq-set.c:26 utils/cpupower-set.c:23 +#: utils/cpupower-info.c:22 utils/cpuidle-info.c:148 +#, c-format +msgid "Options:\n" +msgstr "Přepínače:\n" + +#: utils/cpufreq-info.c:474 +#, fuzzy, c-format +msgid " -e, --debug Prints out debug information [default]\n" +msgstr " -e, --debug Vypíše ladicí informace\n" + +#: utils/cpufreq-info.c:475 +#, c-format +msgid "" +" -f, --freq Get frequency the CPU currently runs at, according\n" +" to the cpufreq core *\n" +msgstr "" +" -f, --freq Zjistí aktuální frekvenci, na které CPU běží\n" +" podle cpufreq *\n" + +#: utils/cpufreq-info.c:477 +#, c-format +msgid "" +" -w, --hwfreq Get frequency the CPU currently runs at, by reading\n" +" it from hardware (only available to root) *\n" +msgstr "" +" -w, --hwfreq Zjistí aktuální frekvenci, na které CPU běží\n" +" z hardware (dostupné jen uživateli root) *\n" + +#: utils/cpufreq-info.c:479 +#, c-format +msgid "" +" -l, --hwlimits Determine the minimum and maximum CPU frequency " +"allowed *\n" +msgstr "" +" -l, --hwlimits Zjistí minimální a maximální dostupnou frekvenci CPU " +"*\n" + +#: utils/cpufreq-info.c:480 +#, c-format +msgid " -d, --driver Determines the used cpufreq kernel driver *\n" +msgstr " -d, --driver Zjistí aktivní ovladač cpufreq *\n" + +#: utils/cpufreq-info.c:481 +#, c-format +msgid " -p, --policy Gets the currently used cpufreq policy *\n" +msgstr " -p, --policy Zjistí aktuální taktiku cpufreq *\n" + +#: utils/cpufreq-info.c:482 +#, c-format +msgid " -g, --governors Determines available cpufreq governors *\n" +msgstr " -g, --governors Zjistí dostupné regulátory cpufreq *\n" + +#: utils/cpufreq-info.c:483 +#, fuzzy, c-format +msgid "" +" -r, --related-cpus Determines which CPUs run at the same hardware " +"frequency *\n" +msgstr "" +" -a, --affected-cpus Zjistí, které CPU musí měnit frekvenci zároveň *\n" + +#: utils/cpufreq-info.c:484 +#, fuzzy, c-format +msgid "" +" -a, --affected-cpus Determines which CPUs need to have their frequency\n" +" coordinated by software *\n" +msgstr "" +" -a, --affected-cpus Zjistí, které CPU musí měnit frekvenci zároveň *\n" + +#: utils/cpufreq-info.c:486 +#, c-format +msgid " -s, --stats Shows cpufreq statistics if available\n" +msgstr " -s, --stats Zobrazí statistiku cpufreq, je-li dostupná\n" + +#: utils/cpufreq-info.c:487 +#, fuzzy, c-format +msgid "" +" -y, --latency Determines the maximum latency on CPU frequency " +"changes *\n" +msgstr "" +" -l, --hwlimits Zjistí minimální a maximální dostupnou frekvenci CPU " +"*\n" + +#: utils/cpufreq-info.c:488 +#, c-format +msgid " -b, --boost Checks for turbo or boost modes *\n" +msgstr "" + +#: utils/cpufreq-info.c:489 +#, c-format +msgid "" +" -o, --proc Prints out information like provided by the /proc/" +"cpufreq\n" +" interface in 2.4. and early 2.6. kernels\n" +msgstr "" +" -o, --proc Vypíše informace ve formátu, jaký používalo rozhraní\n" +" /proc/cpufreq v kernelech řady 2.4 a časné 2.6\n" + +#: utils/cpufreq-info.c:491 +#, fuzzy, c-format +msgid "" +" -m, --human human-readable output for the -f, -w, -s and -y " +"parameters\n" +msgstr "" +" -m, --human Výstup parametrů -f, -w a -s v „lidmi čitelném“ " +"formátu\n" + +#: utils/cpufreq-info.c:492 utils/cpuidle-info.c:152 +#, c-format +msgid " -h, --help Prints out this screen\n" +msgstr " -h, --help Vypíše tuto nápovědu\n" + +#: utils/cpufreq-info.c:495 +#, c-format +msgid "" +"If no argument or only the -c, --cpu parameter is given, debug output about\n" +"cpufreq is printed which is useful e.g. for reporting bugs.\n" +msgstr "" +"Není-li zadán žádný parametr nebo je-li zadán pouze přepínač -c, --cpu, " +"jsou\n" +"vypsány ladicí informace, což může být užitečné například při hlášení chyb.\n" + +#: utils/cpufreq-info.c:497 +#, c-format +msgid "" +"For the arguments marked with *, omitting the -c or --cpu argument is\n" +"equivalent to setting it to zero\n" +msgstr "" +"Není-li při použití přepínačů označených * zadán parametr -c nebo --cpu,\n" +"předpokládá se jeho hodnota 0.\n" + +#: utils/cpufreq-info.c:580 +#, c-format +msgid "" +"The argument passed to this tool can't be combined with passing a --cpu " +"argument\n" +msgstr "Zadaný parametr nemůže být použit zároveň s přepínačem -c nebo --cpu\n" + +#: utils/cpufreq-info.c:596 +#, c-format +msgid "" +"You can't specify more than one --cpu parameter and/or\n" +"more than one output-specific argument\n" +msgstr "" +"Nelze zadat více než jeden parametr -c nebo --cpu\n" +"anebo více než jeden parametr určující výstup\n" + +#: utils/cpufreq-info.c:600 utils/cpufreq-set.c:82 utils/cpupower-set.c:42 +#: utils/cpupower-info.c:42 utils/cpuidle-info.c:213 +#, c-format +msgid "invalid or unknown argument\n" +msgstr "neplatný nebo neznámý parametr\n" + +#: utils/cpufreq-info.c:617 +#, c-format +msgid "couldn't analyze CPU %d as it doesn't seem to be present\n" +msgstr "nelze analyzovat CPU %d, vypadá to, že není přítomen\n" + +#: utils/cpufreq-info.c:620 utils/cpupower-info.c:142 +#, c-format +msgid "analyzing CPU %d:\n" +msgstr "analyzuji CPU %d:\n" + +#: utils/cpufreq-set.c:25 +#, fuzzy, c-format +msgid "Usage: cpupower frequency-set [options]\n" +msgstr "Užití: cpufreq-set [přepínače]\n" + +#: utils/cpufreq-set.c:27 +#, c-format +msgid "" +" -d FREQ, --min FREQ new minimum CPU frequency the governor may " +"select\n" +msgstr "" +" -d FREQ, --min FREQ Nová nejnižší frekvence, kterou může regulátor " +"vybrat\n" + +#: utils/cpufreq-set.c:28 +#, c-format +msgid "" +" -u FREQ, --max FREQ new maximum CPU frequency the governor may " +"select\n" +msgstr "" +" -u FREQ, --max FREQ Nová nejvyšší frekvence, kterou může regulátor " +"zvolit\n" + +#: utils/cpufreq-set.c:29 +#, c-format +msgid " -g GOV, --governor GOV new cpufreq governor\n" +msgstr " -g GOV, --governors GOV Nový regulátor cpufreq\n" + +#: utils/cpufreq-set.c:30 +#, c-format +msgid "" +" -f FREQ, --freq FREQ specific frequency to be set. Requires userspace\n" +" governor to be available and loaded\n" +msgstr "" +" -f FREQ, --freq FREQ Frekvence, která má být nastavena. Vyžaduje, aby " +"byl\n" +" v jádře nahrán regulátor ‚userspace‘.\n" + +#: utils/cpufreq-set.c:32 +#, c-format +msgid " -r, --related Switches all hardware-related CPUs\n" +msgstr "" + +#: utils/cpufreq-set.c:33 utils/cpupower-set.c:28 utils/cpupower-info.c:27 +#, fuzzy, c-format +msgid " -h, --help Prints out this screen\n" +msgstr " -h, --help Vypíše tuto nápovědu\n" + +#: utils/cpufreq-set.c:35 +#, fuzzy, c-format +msgid "" +"Notes:\n" +"1. Omitting the -c or --cpu argument is equivalent to setting it to \"all\"\n" +msgstr "" +"Není-li při použití přepínačů označených * zadán parametr -c nebo --cpu,\n" +"předpokládá se jeho hodnota 0.\n" + +#: utils/cpufreq-set.c:37 +#, fuzzy, c-format +msgid "" +"2. The -f FREQ, --freq FREQ parameter cannot be combined with any other " +"parameter\n" +" except the -c CPU, --cpu CPU parameter\n" +"3. FREQuencies can be passed in Hz, kHz (default), MHz, GHz, or THz\n" +" by postfixing the value with the wanted unit name, without any space\n" +" (FREQuency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000).\n" +msgstr "" +"Poznámky:\n" +"1. Vynechání parametru -c nebo --cpu je ekvivalentní jeho nastavení na 0\n" +"2. Přepínač -f nebo --freq nemůže být použit zároveň s žádným jiným vyjma -" +"c\n" +" nebo --cpu\n" +"3. Frekvence (FREQ) mohou být zadány v Hz, kHz (výchozí), MHz, GHz nebo THz\n" +" připojením názvu jednotky bez mezery mezi číslem a jednotkou\n" +" (FREQ v kHz =^ Hz * 0,001 = ^ MHz * 1000 =^ GHz * 1000000)\n" + +#: utils/cpufreq-set.c:57 +#, c-format +msgid "" +"Error setting new values. Common errors:\n" +"- Do you have proper administration rights? (super-user?)\n" +"- Is the governor you requested available and modprobed?\n" +"- Trying to set an invalid policy?\n" +"- Trying to set a specific frequency, but userspace governor is not " +"available,\n" +" for example because of hardware which cannot be set to a specific " +"frequency\n" +" or because the userspace governor isn't loaded?\n" +msgstr "" +"Chyba při nastavování nových hodnot. Obvyklé problémy:\n" +"- Máte patřičná administrátorská práva? (root?)\n" +"- Je požadovaný regulátor dostupný v jádře? (modprobe?)\n" +"- Snažíte se nastavit neplatnou taktiku?\n" +"- Snažíte se nastavit určitou frekvenci, ale není dostupný\n" +" regulátor ‚userspace‘, například protože není nahrán v jádře,\n" +" nebo nelze na tomto hardware nastavit určitou frekvenci?\n" + +#: utils/cpufreq-set.c:170 +#, c-format +msgid "wrong, unknown or unhandled CPU?\n" +msgstr "neznámý nebo nepodporovaný CPU?\n" + +#: utils/cpufreq-set.c:302 +#, c-format +msgid "" +"the -f/--freq parameter cannot be combined with -d/--min, -u/--max or\n" +"-g/--governor parameters\n" +msgstr "" +"přepínač -f/--freq nemůže být použit zároveň\n" +"s přepínačem -d/--min, -u/--max nebo -g/--governor\n" + +#: utils/cpufreq-set.c:308 +#, c-format +msgid "" +"At least one parameter out of -f/--freq, -d/--min, -u/--max, and\n" +"-g/--governor must be passed\n" +msgstr "" +"Musí být zadán alespoň jeden přepínač\n" +"-f/--freq, -d/--min, -u/--max nebo -g/--governor\n" + +#: utils/cpufreq-set.c:347 +#, c-format +msgid "Setting cpu: %d\n" +msgstr "" + +#: utils/cpupower-set.c:22 +#, c-format +msgid "Usage: cpupower set [ -b val ] [ -m val ] [ -s val ]\n" +msgstr "" + +#: utils/cpupower-set.c:24 +#, c-format +msgid "" +" -b, --perf-bias [VAL] Sets CPU's power vs performance policy on some\n" +" Intel models [0-15], see manpage for details\n" +msgstr "" + +#: utils/cpupower-set.c:26 +#, c-format +msgid "" +" -m, --sched-mc [VAL] Sets the kernel's multi core scheduler policy.\n" +msgstr "" + +#: utils/cpupower-set.c:27 +#, c-format +msgid "" +" -s, --sched-smt [VAL] Sets the kernel's thread sibling scheduler " +"policy.\n" +msgstr "" + +#: utils/cpupower-set.c:80 +#, c-format +msgid "--perf-bias param out of range [0-%d]\n" +msgstr "" + +#: utils/cpupower-set.c:91 +#, c-format +msgid "--sched-mc param out of range [0-%d]\n" +msgstr "" + +#: utils/cpupower-set.c:102 +#, c-format +msgid "--sched-smt param out of range [0-%d]\n" +msgstr "" + +#: utils/cpupower-set.c:121 +#, c-format +msgid "Error setting sched-mc %s\n" +msgstr "" + +#: utils/cpupower-set.c:127 +#, c-format +msgid "Error setting sched-smt %s\n" +msgstr "" + +#: utils/cpupower-set.c:146 +#, c-format +msgid "Error setting perf-bias value on CPU %d\n" +msgstr "" + +#: utils/cpupower-info.c:21 +#, c-format +msgid "Usage: cpupower info [ -b ] [ -m ] [ -s ]\n" +msgstr "" + +#: utils/cpupower-info.c:23 +#, c-format +msgid "" +" -b, --perf-bias Gets CPU's power vs performance policy on some\n" +" Intel models [0-15], see manpage for details\n" +msgstr "" + +#: utils/cpupower-info.c:25 +#, fuzzy, c-format +msgid " -m, --sched-mc Gets the kernel's multi core scheduler policy.\n" +msgstr " -p, --policy Zjistí aktuální taktiku cpufreq *\n" + +#: utils/cpupower-info.c:26 +#, c-format +msgid "" +" -s, --sched-smt Gets the kernel's thread sibling scheduler policy.\n" +msgstr "" + +#: utils/cpupower-info.c:28 +#, c-format +msgid "" +"\n" +"Passing no option will show all info, by default only on core 0\n" +msgstr "" + +#: utils/cpupower-info.c:102 +#, c-format +msgid "System's multi core scheduler setting: " +msgstr "" + +#. if sysfs file is missing it's: errno == ENOENT +#: utils/cpupower-info.c:105 utils/cpupower-info.c:114 +#, c-format +msgid "not supported\n" +msgstr "" + +#: utils/cpupower-info.c:111 +#, c-format +msgid "System's thread sibling scheduler setting: " +msgstr "" + +#: utils/cpupower-info.c:126 +#, c-format +msgid "Intel's performance bias setting needs root privileges\n" +msgstr "" + +#: utils/cpupower-info.c:128 +#, c-format +msgid "System does not support Intel's performance bias setting\n" +msgstr "" + +#: utils/cpupower-info.c:147 +#, c-format +msgid "Could not read perf-bias value\n" +msgstr "" + +#: utils/cpupower-info.c:150 +#, c-format +msgid "perf-bias: %d\n" +msgstr "" + +#: utils/cpuidle-info.c:28 +#, fuzzy, c-format +msgid "Analyzing CPU %d:\n" +msgstr "analyzuji CPU %d:\n" + +#: utils/cpuidle-info.c:32 +#, c-format +msgid "CPU %u: No idle states\n" +msgstr "" + +#: utils/cpuidle-info.c:36 +#, c-format +msgid "CPU %u: Can't read idle state info\n" +msgstr "" + +#: utils/cpuidle-info.c:41 +#, c-format +msgid "Could not determine max idle state %u\n" +msgstr "" + +#: utils/cpuidle-info.c:46 +#, c-format +msgid "Number of idle states: %d\n" +msgstr "" + +#: utils/cpuidle-info.c:48 +#, fuzzy, c-format +msgid "Available idle states:" +msgstr " dostupné frekvence: " + +#: utils/cpuidle-info.c:71 +#, c-format +msgid "Flags/Description: %s\n" +msgstr "" + +#: utils/cpuidle-info.c:74 +#, c-format +msgid "Latency: %lu\n" +msgstr "" + +#: utils/cpuidle-info.c:76 +#, c-format +msgid "Usage: %lu\n" +msgstr "" + +#: utils/cpuidle-info.c:78 +#, c-format +msgid "Duration: %llu\n" +msgstr "" + +#: utils/cpuidle-info.c:90 +#, c-format +msgid "Could not determine cpuidle driver\n" +msgstr "" + +#: utils/cpuidle-info.c:94 +#, fuzzy, c-format +msgid "CPUidle driver: %s\n" +msgstr " ovladač: %s\n" + +#: utils/cpuidle-info.c:99 +#, c-format +msgid "Could not determine cpuidle governor\n" +msgstr "" + +#: utils/cpuidle-info.c:103 +#, c-format +msgid "CPUidle governor: %s\n" +msgstr "" + +#: utils/cpuidle-info.c:122 +#, c-format +msgid "CPU %u: Can't read C-state info\n" +msgstr "" + +#. printf("Cstates: %d\n", cstates); +#: utils/cpuidle-info.c:127 +#, c-format +msgid "active state: C0\n" +msgstr "" + +#: utils/cpuidle-info.c:128 +#, c-format +msgid "max_cstate: C%u\n" +msgstr "" + +#: utils/cpuidle-info.c:129 +#, c-format +msgid "maximum allowed latency: %lu usec\n" +msgstr "" + +#: utils/cpuidle-info.c:130 +#, c-format +msgid "states:\t\n" +msgstr "" + +#: utils/cpuidle-info.c:132 +#, c-format +msgid " C%d: type[C%d] " +msgstr "" + +#: utils/cpuidle-info.c:134 +#, c-format +msgid "promotion[--] demotion[--] " +msgstr "" + +#: utils/cpuidle-info.c:135 +#, c-format +msgid "latency[%03lu] " +msgstr "" + +#: utils/cpuidle-info.c:137 +#, c-format +msgid "usage[%08lu] " +msgstr "" + +#: utils/cpuidle-info.c:139 +#, c-format +msgid "duration[%020Lu] \n" +msgstr "" + +#: utils/cpuidle-info.c:147 +#, fuzzy, c-format +msgid "Usage: cpupower idleinfo [options]\n" +msgstr "Užití: cpufreq-info [přepínače]\n" + +#: utils/cpuidle-info.c:149 +#, fuzzy, c-format +msgid " -s, --silent Only show general C-state information\n" +msgstr " -e, --debug Vypíše ladicí informace\n" + +#: utils/cpuidle-info.c:150 +#, fuzzy, c-format +msgid "" +" -o, --proc Prints out information like provided by the /proc/" +"acpi/processor/*/power\n" +" interface in older kernels\n" +msgstr "" +" -o, --proc Vypíše informace ve formátu, jaký používalo rozhraní\n" +" /proc/cpufreq v kernelech řady 2.4 a časné 2.6\n" + +#: utils/cpuidle-info.c:209 +#, fuzzy, c-format +msgid "You can't specify more than one output-specific argument\n" +msgstr "" +"Nelze zadat více než jeden parametr -c nebo --cpu\n" +"anebo více než jeden parametr určující výstup\n" + +#~ msgid "" +#~ " -c CPU, --cpu CPU CPU number which information shall be determined " +#~ "about\n" +#~ msgstr "" +#~ " -c CPU, --cpu CPU Číslo CPU, o kterém se mají zjistit informace\n" + +#~ msgid "" +#~ " -c CPU, --cpu CPU number of CPU where cpufreq settings shall be " +#~ "modified\n" +#~ msgstr "" +#~ " -c CPU, --cpu CPU Číslo CPU pro který se má provést nastavení " +#~ "cpufreq\n" \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/cs.po.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/cs.po.yml new file mode 100644 index 00000000000..7d30d397b6b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/cs.po.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2007 kavol +holders: + - kavol diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/fr.po b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/fr.po new file mode 100644 index 00000000000..d0333fdc9e6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/fr.po @@ -0,0 +1,947 @@ +# French translations for cpufrequtils package +# Copyright (C) 2004 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the cpufrequtils package. +# Ducrot Bruno , 2004. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: cpufrequtils 0.1-pre2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-03-08 17:03+0100\n" +"PO-Revision-Date: 2004-11-17 15:53+1000\n" +"Last-Translator: Bruno Ducrot \n" +"Language-Team: NONE\n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: utils/idle_monitor/nhm_idle.c:36 +msgid "Processor Core C3" +msgstr "" + +#: utils/idle_monitor/nhm_idle.c:43 +msgid "Processor Core C6" +msgstr "" + +#: utils/idle_monitor/nhm_idle.c:51 +msgid "Processor Package C3" +msgstr "" + +#: utils/idle_monitor/nhm_idle.c:58 utils/idle_monitor/amd_fam14h_idle.c:70 +msgid "Processor Package C6" +msgstr "" + +#: utils/idle_monitor/snb_idle.c:33 +msgid "Processor Core C7" +msgstr "" + +#: utils/idle_monitor/snb_idle.c:40 +msgid "Processor Package C2" +msgstr "" + +#: utils/idle_monitor/snb_idle.c:47 +msgid "Processor Package C7" +msgstr "" + +#: utils/idle_monitor/amd_fam14h_idle.c:56 +msgid "Package in sleep state (PC1 or deeper)" +msgstr "" + +#: utils/idle_monitor/amd_fam14h_idle.c:63 +msgid "Processor Package C1" +msgstr "" + +#: utils/idle_monitor/amd_fam14h_idle.c:77 +msgid "North Bridge P1 boolean counter (returns 0 or 1)" +msgstr "" + +#: utils/idle_monitor/mperf_monitor.c:35 +msgid "Processor Core not idle" +msgstr "" + +#: utils/idle_monitor/mperf_monitor.c:42 +msgid "Processor Core in an idle state" +msgstr "" + +#: utils/idle_monitor/mperf_monitor.c:50 +msgid "Average Frequency (including boost) in MHz" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:66 +#, c-format +msgid "" +"cpupower monitor: [-h] [ [-t] | [-l] | [-m ,[] ] ] [-i " +"interval_sec | -c command ...]\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:69 +#, c-format +msgid "" +"cpupower monitor: [-v] [-h] [ [-t] | [-l] | [-m ,[] ] ] [-i " +"interval_sec | -c command ...]\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:71 +#, c-format +msgid "\t -v: be more verbose\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:73 +#, c-format +msgid "\t -h: print this help\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:74 +#, c-format +msgid "\t -i: time intervall to measure for in seconds (default 1)\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:75 +#, c-format +msgid "\t -t: show CPU topology/hierarchy\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:76 +#, c-format +msgid "\t -l: list available CPU sleep monitors (for use with -m)\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:77 +#, c-format +msgid "\t -m: show specific CPU sleep monitors only (in same order)\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:79 +#, c-format +msgid "" +"only one of: -t, -l, -m are allowed\n" +"If none of them is passed," +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:80 +#, c-format +msgid " all supported monitors are shown\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:197 +#, c-format +msgid "Monitor %s, Counter %s has no count function. Implementation error\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:207 +#, c-format +msgid " *is offline\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:236 +#, c-format +msgid "%s: max monitor name length (%d) exceeded\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:250 +#, c-format +msgid "No matching monitor found in %s, try -l option\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:266 +#, c-format +msgid "Monitor \"%s\" (%d states) - Might overflow after %u s\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:319 +#, c-format +msgid "%s took %.5f seconds and exited with status %d\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:406 +#, c-format +msgid "Cannot read number of available processors\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:417 +#, c-format +msgid "Available monitor %s needs root access\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:428 +#, c-format +msgid "No HW Cstate monitors found\n" +msgstr "" + +#: utils/cpupower.c:78 +#, c-format +msgid "cpupower [ -c cpulist ] subcommand [ARGS]\n" +msgstr "" + +#: utils/cpupower.c:79 +#, c-format +msgid "cpupower --version\n" +msgstr "" + +#: utils/cpupower.c:80 +#, c-format +msgid "Supported subcommands are:\n" +msgstr "" + +#: utils/cpupower.c:83 +#, c-format +msgid "" +"\n" +"Some subcommands can make use of the -c cpulist option.\n" +msgstr "" + +#: utils/cpupower.c:84 +#, c-format +msgid "Look at the general cpupower manpage how to use it\n" +msgstr "" + +#: utils/cpupower.c:85 +#, c-format +msgid "and read up the subcommand's manpage whether it is supported.\n" +msgstr "" + +#: utils/cpupower.c:86 +#, c-format +msgid "" +"\n" +"Use cpupower help subcommand for getting help for above subcommands.\n" +msgstr "" + +#: utils/cpupower.c:91 +#, c-format +msgid "Report errors and bugs to %s, please.\n" +msgstr "Veuillez rapportez les erreurs et les bogues à %s, s'il vous plait.\n" + +#: utils/cpupower.c:114 +#, c-format +msgid "Error parsing cpu list\n" +msgstr "" + +#: utils/cpupower.c:172 +#, c-format +msgid "Subcommand %s needs root privileges\n" +msgstr "" + +#: utils/cpufreq-info.c:31 +#, c-format +msgid "Couldn't count the number of CPUs (%s: %s), assuming 1\n" +msgstr "Détermination du nombre de CPUs (%s : %s) impossible. Assume 1\n" + +#: utils/cpufreq-info.c:63 +#, c-format +msgid "" +" minimum CPU frequency - maximum CPU frequency - governor\n" +msgstr "" +" Fréquence CPU minimale - Fréquence CPU maximale - régulateur\n" + +#: utils/cpufreq-info.c:151 +#, c-format +msgid "Error while evaluating Boost Capabilities on CPU %d -- are you root?\n" +msgstr "" + +#. P state changes via MSR are identified via cpuid 80000007 +#. on Intel and AMD, but we assume boost capable machines can do that +#. if (cpuid_eax(0x80000000) >= 0x80000007 +#. && (cpuid_edx(0x80000007) & (1 << 7))) +#. +#: utils/cpufreq-info.c:161 +#, c-format +msgid " boost state support: \n" +msgstr "" + +#: utils/cpufreq-info.c:163 +#, c-format +msgid " Supported: %s\n" +msgstr "" + +#: utils/cpufreq-info.c:163 utils/cpufreq-info.c:164 +msgid "yes" +msgstr "" + +#: utils/cpufreq-info.c:163 utils/cpufreq-info.c:164 +msgid "no" +msgstr "" + +#: utils/cpufreq-info.c:164 +#, fuzzy, c-format +msgid " Active: %s\n" +msgstr " pilote : %s\n" + +#: utils/cpufreq-info.c:177 +#, c-format +msgid " Boost States: %d\n" +msgstr "" + +#: utils/cpufreq-info.c:178 +#, c-format +msgid " Total States: %d\n" +msgstr "" + +#: utils/cpufreq-info.c:181 +#, c-format +msgid " Pstate-Pb%d: %luMHz (boost state)\n" +msgstr "" + +#: utils/cpufreq-info.c:184 +#, c-format +msgid " Pstate-P%d: %luMHz\n" +msgstr "" + +#: utils/cpufreq-info.c:211 +#, c-format +msgid " no or unknown cpufreq driver is active on this CPU\n" +msgstr " pas de pilotes cpufreq reconnu pour ce CPU\n" + +#: utils/cpufreq-info.c:213 +#, c-format +msgid " driver: %s\n" +msgstr " pilote : %s\n" + +#: utils/cpufreq-info.c:219 +#, fuzzy, c-format +msgid " CPUs which run at the same hardware frequency: " +msgstr " CPUs qui doivent changer de fréquences en même temps : " + +#: utils/cpufreq-info.c:230 +#, fuzzy, c-format +msgid " CPUs which need to have their frequency coordinated by software: " +msgstr " CPUs qui doivent changer de fréquences en même temps : " + +#: utils/cpufreq-info.c:241 +#, c-format +msgid " maximum transition latency: " +msgstr "" + +#: utils/cpufreq-info.c:247 +#, c-format +msgid " hardware limits: " +msgstr " limitation matérielle : " + +#: utils/cpufreq-info.c:256 +#, c-format +msgid " available frequency steps: " +msgstr " plage de fréquence : " + +#: utils/cpufreq-info.c:269 +#, c-format +msgid " available cpufreq governors: " +msgstr " régulateurs disponibles : " + +#: utils/cpufreq-info.c:280 +#, c-format +msgid " current policy: frequency should be within " +msgstr " tactique actuelle : la fréquence doit être comprise entre " + +#: utils/cpufreq-info.c:282 +#, c-format +msgid " and " +msgstr " et " + +#: utils/cpufreq-info.c:286 +#, c-format +msgid "" +"The governor \"%s\" may decide which speed to use\n" +" within this range.\n" +msgstr "" +"Le régulateur \"%s\" est libre de choisir la vitesse\n" +" dans cette plage de fréquences.\n" + +#: utils/cpufreq-info.c:293 +#, c-format +msgid " current CPU frequency is " +msgstr " la fréquence actuelle de ce CPU est " + +#: utils/cpufreq-info.c:296 +#, c-format +msgid " (asserted by call to hardware)" +msgstr " (vérifié par un appel direct du matériel)" + +#: utils/cpufreq-info.c:304 +#, c-format +msgid " cpufreq stats: " +msgstr " des statistique concernant cpufreq:" + +#: utils/cpufreq-info.c:472 +#, fuzzy, c-format +msgid "Usage: cpupower freqinfo [options]\n" +msgstr "Usage : cpufreq-info [options]\n" + +#: utils/cpufreq-info.c:473 utils/cpufreq-set.c:26 utils/cpupower-set.c:23 +#: utils/cpupower-info.c:22 utils/cpuidle-info.c:148 +#, c-format +msgid "Options:\n" +msgstr "Options :\n" + +#: utils/cpufreq-info.c:474 +#, fuzzy, c-format +msgid " -e, --debug Prints out debug information [default]\n" +msgstr " -e, --debug Afficher les informations de déboguage\n" + +#: utils/cpufreq-info.c:475 +#, c-format +msgid "" +" -f, --freq Get frequency the CPU currently runs at, according\n" +" to the cpufreq core *\n" +msgstr "" +" -f, --freq Obtenir la fréquence actuelle du CPU selon le point\n" +" de vue du coeur du système de cpufreq *\n" + +#: utils/cpufreq-info.c:477 +#, c-format +msgid "" +" -w, --hwfreq Get frequency the CPU currently runs at, by reading\n" +" it from hardware (only available to root) *\n" +msgstr "" +" -w, --hwfreq Obtenir la fréquence actuelle du CPU directement par\n" +" le matériel (doit être root) *\n" + +#: utils/cpufreq-info.c:479 +#, c-format +msgid "" +" -l, --hwlimits Determine the minimum and maximum CPU frequency " +"allowed *\n" +msgstr "" +" -l, --hwlimits Affiche les fréquences minimales et maximales du CPU " +"*\n" + +#: utils/cpufreq-info.c:480 +#, c-format +msgid " -d, --driver Determines the used cpufreq kernel driver *\n" +msgstr " -d, --driver Affiche le pilote cpufreq utilisé *\n" + +#: utils/cpufreq-info.c:481 +#, c-format +msgid " -p, --policy Gets the currently used cpufreq policy *\n" +msgstr " -p, --policy Affiche la tactique actuelle de cpufreq *\n" + +#: utils/cpufreq-info.c:482 +#, c-format +msgid " -g, --governors Determines available cpufreq governors *\n" +msgstr "" +" -g, --governors Affiche les régulateurs disponibles de cpufreq *\n" + +#: utils/cpufreq-info.c:483 +#, fuzzy, c-format +msgid "" +" -r, --related-cpus Determines which CPUs run at the same hardware " +"frequency *\n" +msgstr "" +" -a, --affected-cpus Affiche quels sont les CPUs qui doivent changer de\n" +" fréquences en même temps *\n" + +#: utils/cpufreq-info.c:484 +#, fuzzy, c-format +msgid "" +" -a, --affected-cpus Determines which CPUs need to have their frequency\n" +" coordinated by software *\n" +msgstr "" +" -a, --affected-cpus Affiche quels sont les CPUs qui doivent changer de\n" +" fréquences en même temps *\n" + +#: utils/cpufreq-info.c:486 +#, c-format +msgid " -s, --stats Shows cpufreq statistics if available\n" +msgstr "" +" -s, --stats Indique des statistiques concernant cpufreq, si\n" +" disponibles\n" + +#: utils/cpufreq-info.c:487 +#, fuzzy, c-format +msgid "" +" -y, --latency Determines the maximum latency on CPU frequency " +"changes *\n" +msgstr "" +" -l, --hwlimits Affiche les fréquences minimales et maximales du CPU " +"*\n" + +#: utils/cpufreq-info.c:488 +#, c-format +msgid " -b, --boost Checks for turbo or boost modes *\n" +msgstr "" + +#: utils/cpufreq-info.c:489 +#, c-format +msgid "" +" -o, --proc Prints out information like provided by the /proc/" +"cpufreq\n" +" interface in 2.4. and early 2.6. kernels\n" +msgstr "" +" -o, --proc Affiche les informations en utilisant l'interface\n" +" fournie par /proc/cpufreq, présente dans les " +"versions\n" +" 2.4 et les anciennes versions 2.6 du noyau\n" + +#: utils/cpufreq-info.c:491 +#, fuzzy, c-format +msgid "" +" -m, --human human-readable output for the -f, -w, -s and -y " +"parameters\n" +msgstr "" +" -m, --human affiche dans un format lisible pour un humain\n" +" pour les options -f, -w et -s (MHz, GHz)\n" + +#: utils/cpufreq-info.c:492 utils/cpuidle-info.c:152 +#, c-format +msgid " -h, --help Prints out this screen\n" +msgstr " -h, --help affiche l'aide-mémoire\n" + +#: utils/cpufreq-info.c:495 +#, c-format +msgid "" +"If no argument or only the -c, --cpu parameter is given, debug output about\n" +"cpufreq is printed which is useful e.g. for reporting bugs.\n" +msgstr "" +"Par défaut, les informations de déboguage seront affichées si aucun\n" +"argument, ou bien si seulement l'argument -c (--cpu) est donné, afin de\n" +"faciliter les rapports de bogues par exemple\n" + +#: utils/cpufreq-info.c:497 +#, c-format +msgid "" +"For the arguments marked with *, omitting the -c or --cpu argument is\n" +"equivalent to setting it to zero\n" +msgstr "Les arguments avec un * utiliseront le CPU 0 si -c (--cpu) est omis\n" + +#: utils/cpufreq-info.c:580 +#, c-format +msgid "" +"The argument passed to this tool can't be combined with passing a --cpu " +"argument\n" +msgstr "Cette option est incompatible avec --cpu\n" + +#: utils/cpufreq-info.c:596 +#, c-format +msgid "" +"You can't specify more than one --cpu parameter and/or\n" +"more than one output-specific argument\n" +msgstr "" +"On ne peut indiquer plus d'un paramètre --cpu, tout comme l'on ne peut\n" +"spécifier plus d'un argument de formatage\n" + +#: utils/cpufreq-info.c:600 utils/cpufreq-set.c:82 utils/cpupower-set.c:42 +#: utils/cpupower-info.c:42 utils/cpuidle-info.c:213 +#, c-format +msgid "invalid or unknown argument\n" +msgstr "option invalide\n" + +#: utils/cpufreq-info.c:617 +#, c-format +msgid "couldn't analyze CPU %d as it doesn't seem to be present\n" +msgstr "analyse du CPU %d impossible puisqu'il ne semble pas être présent\n" + +#: utils/cpufreq-info.c:620 utils/cpupower-info.c:142 +#, c-format +msgid "analyzing CPU %d:\n" +msgstr "analyse du CPU %d :\n" + +#: utils/cpufreq-set.c:25 +#, fuzzy, c-format +msgid "Usage: cpupower frequency-set [options]\n" +msgstr "Usage : cpufreq-set [options]\n" + +#: utils/cpufreq-set.c:27 +#, c-format +msgid "" +" -d FREQ, --min FREQ new minimum CPU frequency the governor may " +"select\n" +msgstr "" +" -d FREQ, --min FREQ nouvelle fréquence minimale du CPU à utiliser\n" +" par le régulateur\n" + +#: utils/cpufreq-set.c:28 +#, c-format +msgid "" +" -u FREQ, --max FREQ new maximum CPU frequency the governor may " +"select\n" +msgstr "" +" -u FREQ, --max FREQ nouvelle fréquence maximale du CPU à utiliser\n" +" par le régulateur\n" + +#: utils/cpufreq-set.c:29 +#, c-format +msgid " -g GOV, --governor GOV new cpufreq governor\n" +msgstr " -g GOV, --governor GOV active le régulateur GOV\n" + +#: utils/cpufreq-set.c:30 +#, c-format +msgid "" +" -f FREQ, --freq FREQ specific frequency to be set. Requires userspace\n" +" governor to be available and loaded\n" +msgstr "" +" -f FREQ, --freq FREQ fixe la fréquence du processeur à FREQ. Il faut\n" +" que le régulateur « userspace » soit disponible \n" +" et activé.\n" + +#: utils/cpufreq-set.c:32 +#, c-format +msgid " -r, --related Switches all hardware-related CPUs\n" +msgstr "" + +#: utils/cpufreq-set.c:33 utils/cpupower-set.c:28 utils/cpupower-info.c:27 +#, fuzzy, c-format +msgid " -h, --help Prints out this screen\n" +msgstr " -h, --help affiche l'aide-mémoire\n" + +#: utils/cpufreq-set.c:35 +#, fuzzy, c-format +msgid "" +"Notes:\n" +"1. Omitting the -c or --cpu argument is equivalent to setting it to \"all\"\n" +msgstr "Les arguments avec un * utiliseront le CPU 0 si -c (--cpu) est omis\n" + +#: utils/cpufreq-set.c:37 +#, fuzzy, c-format +msgid "" +"2. The -f FREQ, --freq FREQ parameter cannot be combined with any other " +"parameter\n" +" except the -c CPU, --cpu CPU parameter\n" +"3. FREQuencies can be passed in Hz, kHz (default), MHz, GHz, or THz\n" +" by postfixing the value with the wanted unit name, without any space\n" +" (FREQuency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000).\n" +msgstr "" +"Remarque :\n" +"1. Le CPU numéro 0 sera utilisé par défaut si -c (ou --cpu) est omis ;\n" +"2. l'argument -f FREQ (ou --freq FREQ) ne peut être utilisé qu'avec --cpu ;\n" +"3. on pourra préciser l'unité des fréquences en postfixant sans aucune " +"espace\n" +" les valeurs par hz, kHz (par défaut), MHz, GHz ou THz\n" +" (kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000).\n" + +#: utils/cpufreq-set.c:57 +#, c-format +msgid "" +"Error setting new values. Common errors:\n" +"- Do you have proper administration rights? (super-user?)\n" +"- Is the governor you requested available and modprobed?\n" +"- Trying to set an invalid policy?\n" +"- Trying to set a specific frequency, but userspace governor is not " +"available,\n" +" for example because of hardware which cannot be set to a specific " +"frequency\n" +" or because the userspace governor isn't loaded?\n" +msgstr "" +"En ajustant les nouveaux paramètres, une erreur est apparue. Les sources\n" +"d'erreur typique sont :\n" +"- droit d'administration insuffisant (êtes-vous root ?) ;\n" +"- le régulateur choisi n'est pas disponible, ou bien n'est pas disponible " +"en\n" +" tant que module noyau ;\n" +"- la tactique n'est pas disponible ;\n" +"- vous voulez utiliser l'option -f/--freq, mais le régulateur « userspace »\n" +" n'est pas disponible, par exemple parce que le matériel ne le supporte\n" +" pas, ou bien n'est tout simplement pas chargé.\n" + +#: utils/cpufreq-set.c:170 +#, c-format +msgid "wrong, unknown or unhandled CPU?\n" +msgstr "CPU inconnu ou non supporté ?\n" + +#: utils/cpufreq-set.c:302 +#, c-format +msgid "" +"the -f/--freq parameter cannot be combined with -d/--min, -u/--max or\n" +"-g/--governor parameters\n" +msgstr "" +"l'option -f/--freq est incompatible avec les options -d/--min, -u/--max et\n" +"-g/--governor\n" + +#: utils/cpufreq-set.c:308 +#, c-format +msgid "" +"At least one parameter out of -f/--freq, -d/--min, -u/--max, and\n" +"-g/--governor must be passed\n" +msgstr "" +"L'un de ces paramètres est obligatoire : -f/--freq, -d/--min, -u/--max et\n" +"-g/--governor\n" + +#: utils/cpufreq-set.c:347 +#, c-format +msgid "Setting cpu: %d\n" +msgstr "" + +#: utils/cpupower-set.c:22 +#, c-format +msgid "Usage: cpupower set [ -b val ] [ -m val ] [ -s val ]\n" +msgstr "" + +#: utils/cpupower-set.c:24 +#, c-format +msgid "" +" -b, --perf-bias [VAL] Sets CPU's power vs performance policy on some\n" +" Intel models [0-15], see manpage for details\n" +msgstr "" + +#: utils/cpupower-set.c:26 +#, c-format +msgid "" +" -m, --sched-mc [VAL] Sets the kernel's multi core scheduler policy.\n" +msgstr "" + +#: utils/cpupower-set.c:27 +#, c-format +msgid "" +" -s, --sched-smt [VAL] Sets the kernel's thread sibling scheduler " +"policy.\n" +msgstr "" + +#: utils/cpupower-set.c:80 +#, c-format +msgid "--perf-bias param out of range [0-%d]\n" +msgstr "" + +#: utils/cpupower-set.c:91 +#, c-format +msgid "--sched-mc param out of range [0-%d]\n" +msgstr "" + +#: utils/cpupower-set.c:102 +#, c-format +msgid "--sched-smt param out of range [0-%d]\n" +msgstr "" + +#: utils/cpupower-set.c:121 +#, c-format +msgid "Error setting sched-mc %s\n" +msgstr "" + +#: utils/cpupower-set.c:127 +#, c-format +msgid "Error setting sched-smt %s\n" +msgstr "" + +#: utils/cpupower-set.c:146 +#, c-format +msgid "Error setting perf-bias value on CPU %d\n" +msgstr "" + +#: utils/cpupower-info.c:21 +#, c-format +msgid "Usage: cpupower info [ -b ] [ -m ] [ -s ]\n" +msgstr "" + +#: utils/cpupower-info.c:23 +#, c-format +msgid "" +" -b, --perf-bias Gets CPU's power vs performance policy on some\n" +" Intel models [0-15], see manpage for details\n" +msgstr "" + +#: utils/cpupower-info.c:25 +#, fuzzy, c-format +msgid " -m, --sched-mc Gets the kernel's multi core scheduler policy.\n" +msgstr " -p, --policy Affiche la tactique actuelle de cpufreq *\n" + +#: utils/cpupower-info.c:26 +#, c-format +msgid "" +" -s, --sched-smt Gets the kernel's thread sibling scheduler policy.\n" +msgstr "" + +#: utils/cpupower-info.c:28 +#, c-format +msgid "" +"\n" +"Passing no option will show all info, by default only on core 0\n" +msgstr "" + +#: utils/cpupower-info.c:102 +#, c-format +msgid "System's multi core scheduler setting: " +msgstr "" + +#. if sysfs file is missing it's: errno == ENOENT +#: utils/cpupower-info.c:105 utils/cpupower-info.c:114 +#, c-format +msgid "not supported\n" +msgstr "" + +#: utils/cpupower-info.c:111 +#, c-format +msgid "System's thread sibling scheduler setting: " +msgstr "" + +#: utils/cpupower-info.c:126 +#, c-format +msgid "Intel's performance bias setting needs root privileges\n" +msgstr "" + +#: utils/cpupower-info.c:128 +#, c-format +msgid "System does not support Intel's performance bias setting\n" +msgstr "" + +#: utils/cpupower-info.c:147 +#, c-format +msgid "Could not read perf-bias value\n" +msgstr "" + +#: utils/cpupower-info.c:150 +#, c-format +msgid "perf-bias: %d\n" +msgstr "" + +#: utils/cpuidle-info.c:28 +#, fuzzy, c-format +msgid "Analyzing CPU %d:\n" +msgstr "analyse du CPU %d :\n" + +#: utils/cpuidle-info.c:32 +#, c-format +msgid "CPU %u: No idle states\n" +msgstr "" + +#: utils/cpuidle-info.c:36 +#, c-format +msgid "CPU %u: Can't read idle state info\n" +msgstr "" + +#: utils/cpuidle-info.c:41 +#, c-format +msgid "Could not determine max idle state %u\n" +msgstr "" + +#: utils/cpuidle-info.c:46 +#, c-format +msgid "Number of idle states: %d\n" +msgstr "" + +#: utils/cpuidle-info.c:48 +#, fuzzy, c-format +msgid "Available idle states:" +msgstr " plage de fréquence : " + +#: utils/cpuidle-info.c:71 +#, c-format +msgid "Flags/Description: %s\n" +msgstr "" + +#: utils/cpuidle-info.c:74 +#, c-format +msgid "Latency: %lu\n" +msgstr "" + +#: utils/cpuidle-info.c:76 +#, c-format +msgid "Usage: %lu\n" +msgstr "" + +#: utils/cpuidle-info.c:78 +#, c-format +msgid "Duration: %llu\n" +msgstr "" + +#: utils/cpuidle-info.c:90 +#, c-format +msgid "Could not determine cpuidle driver\n" +msgstr "" + +#: utils/cpuidle-info.c:94 +#, fuzzy, c-format +msgid "CPUidle driver: %s\n" +msgstr " pilote : %s\n" + +#: utils/cpuidle-info.c:99 +#, c-format +msgid "Could not determine cpuidle governor\n" +msgstr "" + +#: utils/cpuidle-info.c:103 +#, c-format +msgid "CPUidle governor: %s\n" +msgstr "" + +#: utils/cpuidle-info.c:122 +#, c-format +msgid "CPU %u: Can't read C-state info\n" +msgstr "" + +#. printf("Cstates: %d\n", cstates); +#: utils/cpuidle-info.c:127 +#, c-format +msgid "active state: C0\n" +msgstr "" + +#: utils/cpuidle-info.c:128 +#, c-format +msgid "max_cstate: C%u\n" +msgstr "" + +#: utils/cpuidle-info.c:129 +#, c-format +msgid "maximum allowed latency: %lu usec\n" +msgstr "" + +#: utils/cpuidle-info.c:130 +#, c-format +msgid "states:\t\n" +msgstr "" + +#: utils/cpuidle-info.c:132 +#, c-format +msgid " C%d: type[C%d] " +msgstr "" + +#: utils/cpuidle-info.c:134 +#, c-format +msgid "promotion[--] demotion[--] " +msgstr "" + +#: utils/cpuidle-info.c:135 +#, c-format +msgid "latency[%03lu] " +msgstr "" + +#: utils/cpuidle-info.c:137 +#, c-format +msgid "usage[%08lu] " +msgstr "" + +#: utils/cpuidle-info.c:139 +#, c-format +msgid "duration[%020Lu] \n" +msgstr "" + +#: utils/cpuidle-info.c:147 +#, fuzzy, c-format +msgid "Usage: cpupower idleinfo [options]\n" +msgstr "Usage : cpufreq-info [options]\n" + +#: utils/cpuidle-info.c:149 +#, fuzzy, c-format +msgid " -s, --silent Only show general C-state information\n" +msgstr " -e, --debug Afficher les informations de déboguage\n" + +#: utils/cpuidle-info.c:150 +#, fuzzy, c-format +msgid "" +" -o, --proc Prints out information like provided by the /proc/" +"acpi/processor/*/power\n" +" interface in older kernels\n" +msgstr "" +" -o, --proc Affiche les informations en utilisant l'interface\n" +" fournie par /proc/cpufreq, présente dans les " +"versions\n" +" 2.4 et les anciennes versions 2.6 du noyau\n" + +#: utils/cpuidle-info.c:209 +#, fuzzy, c-format +msgid "You can't specify more than one output-specific argument\n" +msgstr "" +"On ne peut indiquer plus d'un paramètre --cpu, tout comme l'on ne peut\n" +"spécifier plus d'un argument de formatage\n" + +#~ msgid "" +#~ " -c CPU, --cpu CPU CPU number which information shall be determined " +#~ "about\n" +#~ msgstr "" +#~ " -c CPU, --cpu CPU Numéro du CPU pour lequel l'information sera " +#~ "affichée\n" + +#~ msgid "" +#~ " -c CPU, --cpu CPU number of CPU where cpufreq settings shall be " +#~ "modified\n" +#~ msgstr "" +#~ " -c CPU, --cpu CPU numéro du CPU à prendre en compte pour les\n" +#~ " changements\n" \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/fr.po.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/fr.po.yml new file mode 100644 index 00000000000..598a348399a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/fr.po.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2004 THE PACKAGE'S +holders: + - THE PACKAGE'S diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/pt.po b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/pt.po new file mode 100644 index 00000000000..2cd62397f80 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/pt.po @@ -0,0 +1,957 @@ +# Brazilian Portuguese translations for cpufrequtils package +# Copyright (C) 2008 THE cpufrequtils'S COPYRIGHT HOLDER +# This file is distributed under the same license as the cpufrequtils package. +# Claudio Eduardo , 2009. +# +# +msgid "" +msgstr "" +"Project-Id-Version: cpufrequtils 004\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-03-08 17:03+0100\n" +"PO-Revision-Date: 2008-06-14 22:16-0400\n" +"Last-Translator: Claudio Eduardo \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: utils/idle_monitor/nhm_idle.c:36 +msgid "Processor Core C3" +msgstr "" + +#: utils/idle_monitor/nhm_idle.c:43 +msgid "Processor Core C6" +msgstr "" + +#: utils/idle_monitor/nhm_idle.c:51 +msgid "Processor Package C3" +msgstr "" + +#: utils/idle_monitor/nhm_idle.c:58 utils/idle_monitor/amd_fam14h_idle.c:70 +msgid "Processor Package C6" +msgstr "" + +#: utils/idle_monitor/snb_idle.c:33 +msgid "Processor Core C7" +msgstr "" + +#: utils/idle_monitor/snb_idle.c:40 +msgid "Processor Package C2" +msgstr "" + +#: utils/idle_monitor/snb_idle.c:47 +msgid "Processor Package C7" +msgstr "" + +#: utils/idle_monitor/amd_fam14h_idle.c:56 +msgid "Package in sleep state (PC1 or deeper)" +msgstr "" + +#: utils/idle_monitor/amd_fam14h_idle.c:63 +msgid "Processor Package C1" +msgstr "" + +#: utils/idle_monitor/amd_fam14h_idle.c:77 +msgid "North Bridge P1 boolean counter (returns 0 or 1)" +msgstr "" + +#: utils/idle_monitor/mperf_monitor.c:35 +msgid "Processor Core not idle" +msgstr "" + +#: utils/idle_monitor/mperf_monitor.c:42 +msgid "Processor Core in an idle state" +msgstr "" + +#: utils/idle_monitor/mperf_monitor.c:50 +msgid "Average Frequency (including boost) in MHz" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:66 +#, c-format +msgid "" +"cpupower monitor: [-h] [ [-t] | [-l] | [-m ,[] ] ] [-i " +"interval_sec | -c command ...]\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:69 +#, c-format +msgid "" +"cpupower monitor: [-v] [-h] [ [-t] | [-l] | [-m ,[] ] ] [-i " +"interval_sec | -c command ...]\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:71 +#, c-format +msgid "\t -v: be more verbose\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:73 +#, c-format +msgid "\t -h: print this help\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:74 +#, c-format +msgid "\t -i: time intervall to measure for in seconds (default 1)\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:75 +#, c-format +msgid "\t -t: show CPU topology/hierarchy\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:76 +#, c-format +msgid "\t -l: list available CPU sleep monitors (for use with -m)\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:77 +#, c-format +msgid "\t -m: show specific CPU sleep monitors only (in same order)\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:79 +#, c-format +msgid "" +"only one of: -t, -l, -m are allowed\n" +"If none of them is passed," +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:80 +#, c-format +msgid " all supported monitors are shown\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:197 +#, c-format +msgid "Monitor %s, Counter %s has no count function. Implementation error\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:207 +#, c-format +msgid " *is offline\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:236 +#, c-format +msgid "%s: max monitor name length (%d) exceeded\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:250 +#, c-format +msgid "No matching monitor found in %s, try -l option\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:266 +#, c-format +msgid "Monitor \"%s\" (%d states) - Might overflow after %u s\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:319 +#, c-format +msgid "%s took %.5f seconds and exited with status %d\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:406 +#, c-format +msgid "Cannot read number of available processors\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:417 +#, c-format +msgid "Available monitor %s needs root access\n" +msgstr "" + +#: utils/idle_monitor/cpupower-monitor.c:428 +#, c-format +msgid "No HW Cstate monitors found\n" +msgstr "" + +#: utils/cpupower.c:78 +#, c-format +msgid "cpupower [ -c cpulist ] subcommand [ARGS]\n" +msgstr "" + +#: utils/cpupower.c:79 +#, c-format +msgid "cpupower --version\n" +msgstr "" + +#: utils/cpupower.c:80 +#, c-format +msgid "Supported subcommands are:\n" +msgstr "" + +#: utils/cpupower.c:83 +#, c-format +msgid "" +"\n" +"Some subcommands can make use of the -c cpulist option.\n" +msgstr "" + +#: utils/cpupower.c:84 +#, c-format +msgid "Look at the general cpupower manpage how to use it\n" +msgstr "" + +#: utils/cpupower.c:85 +#, c-format +msgid "and read up the subcommand's manpage whether it is supported.\n" +msgstr "" + +#: utils/cpupower.c:86 +#, c-format +msgid "" +"\n" +"Use cpupower help subcommand for getting help for above subcommands.\n" +msgstr "" + +#: utils/cpupower.c:91 +#, c-format +msgid "Report errors and bugs to %s, please.\n" +msgstr "Reporte erros e bugs para %s, por favor.\n" + +#: utils/cpupower.c:114 +#, c-format +msgid "Error parsing cpu list\n" +msgstr "" + +#: utils/cpupower.c:172 +#, c-format +msgid "Subcommand %s needs root privileges\n" +msgstr "" + +#: utils/cpufreq-info.c:31 +#, c-format +msgid "Couldn't count the number of CPUs (%s: %s), assuming 1\n" +msgstr "Não foi possível contar o número de CPUs (%s: %s), assumindo 1\n" + +#: utils/cpufreq-info.c:63 +#, c-format +msgid "" +" minimum CPU frequency - maximum CPU frequency - governor\n" +msgstr "" +" frequência mínina do CPU - frequência máxima do CPU - " +"regulador\n" + +#: utils/cpufreq-info.c:151 +#, c-format +msgid "Error while evaluating Boost Capabilities on CPU %d -- are you root?\n" +msgstr "" + +#. P state changes via MSR are identified via cpuid 80000007 +#. on Intel and AMD, but we assume boost capable machines can do that +#. if (cpuid_eax(0x80000000) >= 0x80000007 +#. && (cpuid_edx(0x80000007) & (1 << 7))) +#. +#: utils/cpufreq-info.c:161 +#, c-format +msgid " boost state support: \n" +msgstr "" + +#: utils/cpufreq-info.c:163 +#, c-format +msgid " Supported: %s\n" +msgstr "" + +#: utils/cpufreq-info.c:163 utils/cpufreq-info.c:164 +msgid "yes" +msgstr "" + +#: utils/cpufreq-info.c:163 utils/cpufreq-info.c:164 +msgid "no" +msgstr "" + +#: utils/cpufreq-info.c:164 +#, fuzzy, c-format +msgid " Active: %s\n" +msgstr " driver: %s\n" + +#: utils/cpufreq-info.c:177 +#, c-format +msgid " Boost States: %d\n" +msgstr "" + +#: utils/cpufreq-info.c:178 +#, c-format +msgid " Total States: %d\n" +msgstr "" + +#: utils/cpufreq-info.c:181 +#, c-format +msgid " Pstate-Pb%d: %luMHz (boost state)\n" +msgstr "" + +#: utils/cpufreq-info.c:184 +#, c-format +msgid " Pstate-P%d: %luMHz\n" +msgstr "" + +#: utils/cpufreq-info.c:211 +#, c-format +msgid " no or unknown cpufreq driver is active on this CPU\n" +msgstr " nenhum ou driver do cpufreq deconhecido está ativo nesse CPU\n" + +#: utils/cpufreq-info.c:213 +#, c-format +msgid " driver: %s\n" +msgstr " driver: %s\n" + +#: utils/cpufreq-info.c:219 +#, c-format +msgid " CPUs which run at the same hardware frequency: " +msgstr " CPUs que rodam na mesma frequência de hardware: " + +#: utils/cpufreq-info.c:230 +#, c-format +msgid " CPUs which need to have their frequency coordinated by software: " +msgstr " CPUs que precisam ter suas frequências coordenadas por software: " + +#: utils/cpufreq-info.c:241 +#, c-format +msgid " maximum transition latency: " +msgstr " maior latência de transição: " + +#: utils/cpufreq-info.c:247 +#, c-format +msgid " hardware limits: " +msgstr " limites do hardware: " + +#: utils/cpufreq-info.c:256 +#, c-format +msgid " available frequency steps: " +msgstr " níveis de frequência disponíveis: " + +#: utils/cpufreq-info.c:269 +#, c-format +msgid " available cpufreq governors: " +msgstr " reguladores do cpufreq disponíveis: " + +#: utils/cpufreq-info.c:280 +#, c-format +msgid " current policy: frequency should be within " +msgstr " política de frequência atual deve estar entre " + +#: utils/cpufreq-info.c:282 +#, c-format +msgid " and " +msgstr " e " + +#: utils/cpufreq-info.c:286 +#, c-format +msgid "" +"The governor \"%s\" may decide which speed to use\n" +" within this range.\n" +msgstr "" +"O regulador \"%s\" deve decidir qual velocidade usar\n" +" dentro desse limite.\n" + +#: utils/cpufreq-info.c:293 +#, c-format +msgid " current CPU frequency is " +msgstr " frequência atual do CPU é " + +#: utils/cpufreq-info.c:296 +#, c-format +msgid " (asserted by call to hardware)" +msgstr " (declarado por chamada ao hardware)" + +#: utils/cpufreq-info.c:304 +#, c-format +msgid " cpufreq stats: " +msgstr " status do cpufreq: " + +#: utils/cpufreq-info.c:472 +#, fuzzy, c-format +msgid "Usage: cpupower freqinfo [options]\n" +msgstr "Uso: cpufreq-info [opções]\n" + +#: utils/cpufreq-info.c:473 utils/cpufreq-set.c:26 utils/cpupower-set.c:23 +#: utils/cpupower-info.c:22 utils/cpuidle-info.c:148 +#, c-format +msgid "Options:\n" +msgstr "Opções:\n" + +#: utils/cpufreq-info.c:474 +#, fuzzy, c-format +msgid " -e, --debug Prints out debug information [default]\n" +msgstr " -e, --debug Mostra informação de debug\n" + +#: utils/cpufreq-info.c:475 +#, c-format +msgid "" +" -f, --freq Get frequency the CPU currently runs at, according\n" +" to the cpufreq core *\n" +msgstr "" +" -f, --freq Obtem a frequência na qual o CPU roda no momento, de " +"acordo\n" +" com o núcleo do cpufreq *\n" + +#: utils/cpufreq-info.c:477 +#, c-format +msgid "" +" -w, --hwfreq Get frequency the CPU currently runs at, by reading\n" +" it from hardware (only available to root) *\n" +msgstr "" +" -w, --hwfreq Obtem a frequência na qual o CPU está operando no " +"momento,\n" +" através de leitura no hardware (disponível somente " +"para root) *\n" + +#: utils/cpufreq-info.c:479 +#, c-format +msgid "" +" -l, --hwlimits Determine the minimum and maximum CPU frequency " +"allowed *\n" +msgstr "" +" -l, --hwlimits Determina a frequência mínima e máxima do CPU " +"permitida *\n" + +#: utils/cpufreq-info.c:480 +#, c-format +msgid " -d, --driver Determines the used cpufreq kernel driver *\n" +msgstr "" +" -d, --driver Determina o driver do kernel do cpufreq usado *\n" + +#: utils/cpufreq-info.c:481 +#, c-format +msgid " -p, --policy Gets the currently used cpufreq policy *\n" +msgstr "" +"--p, --policy Obtem a política do cpufreq em uso no momento *\n" + +#: utils/cpufreq-info.c:482 +#, c-format +msgid " -g, --governors Determines available cpufreq governors *\n" +msgstr "" +" -g, --governors Determina reguladores do cpufreq disponíveis *\n" + +#: utils/cpufreq-info.c:483 +#, c-format +msgid "" +" -r, --related-cpus Determines which CPUs run at the same hardware " +"frequency *\n" +msgstr "" +" -r, --related-cpus Determina quais CPUs rodam na mesma frequência de " +"hardware *\n" + +#: utils/cpufreq-info.c:484 +#, c-format +msgid "" +" -a, --affected-cpus Determines which CPUs need to have their frequency\n" +" coordinated by software *\n" +msgstr "" +" -a, --affected-cpus Determina quais CPUs precisam ter suas frequências\n" +" coordenadas por software *\n" + +#: utils/cpufreq-info.c:486 +#, c-format +msgid " -s, --stats Shows cpufreq statistics if available\n" +msgstr " -s, --stats Mostra estatísticas do cpufreq se disponíveis\n" + +#: utils/cpufreq-info.c:487 +#, c-format +msgid "" +" -y, --latency Determines the maximum latency on CPU frequency " +"changes *\n" +msgstr "" +" -y, --latency Determina a latência máxima nas trocas de frequência " +"do CPU *\n" + +#: utils/cpufreq-info.c:488 +#, c-format +msgid " -b, --boost Checks for turbo or boost modes *\n" +msgstr "" + +#: utils/cpufreq-info.c:489 +#, c-format +msgid "" +" -o, --proc Prints out information like provided by the /proc/" +"cpufreq\n" +" interface in 2.4. and early 2.6. kernels\n" +msgstr "" +" -o, --proc Mostra informação do tipo provida pela interface /" +"proc/cpufreq\n" +" em kernels 2.4. e mais recentes 2.6\n" + +#: utils/cpufreq-info.c:491 +#, c-format +msgid "" +" -m, --human human-readable output for the -f, -w, -s and -y " +"parameters\n" +msgstr "" +" -m, --human saída legível para humanos para os parâmetros -f, -w, " +"-s e -y\n" + +#: utils/cpufreq-info.c:492 utils/cpuidle-info.c:152 +#, c-format +msgid " -h, --help Prints out this screen\n" +msgstr " -h, --help Imprime essa tela\n" + +#: utils/cpufreq-info.c:495 +#, c-format +msgid "" +"If no argument or only the -c, --cpu parameter is given, debug output about\n" +"cpufreq is printed which is useful e.g. for reporting bugs.\n" +msgstr "" +"Se nenhum argumento ou somente o parâmetro -c, --cpu é dado, informação de " +"debug sobre\n" +"o cpufreq é mostrada, o que é útil por exemplo para reportar bugs.\n" + +#: utils/cpufreq-info.c:497 +#, c-format +msgid "" +"For the arguments marked with *, omitting the -c or --cpu argument is\n" +"equivalent to setting it to zero\n" +msgstr "" +"Para os argumentos marcados com *, omitir o argumento -c ou --cpu é\n" +"equivalente a setá-lo como zero\n" + +#: utils/cpufreq-info.c:580 +#, c-format +msgid "" +"The argument passed to this tool can't be combined with passing a --cpu " +"argument\n" +msgstr "" +"O argumento usado pra essa ferramenta não pode ser combinado com um " +"argumento --cpu\n" + +#: utils/cpufreq-info.c:596 +#, c-format +msgid "" +"You can't specify more than one --cpu parameter and/or\n" +"more than one output-specific argument\n" +msgstr "" +"Você não pode especificar mais do que um parâmetro --cpu e/ou\n" +"mais do que um argumento de saída específico\n" + +#: utils/cpufreq-info.c:600 utils/cpufreq-set.c:82 utils/cpupower-set.c:42 +#: utils/cpupower-info.c:42 utils/cpuidle-info.c:213 +#, c-format +msgid "invalid or unknown argument\n" +msgstr "argumento inválido ou desconhecido\n" + +#: utils/cpufreq-info.c:617 +#, c-format +msgid "couldn't analyze CPU %d as it doesn't seem to be present\n" +msgstr "" +"não foi possível analisar o CPU % já que o mesmo parece não estar presente\n" + +#: utils/cpufreq-info.c:620 utils/cpupower-info.c:142 +#, c-format +msgid "analyzing CPU %d:\n" +msgstr "analisando o CPU %d:\n" + +#: utils/cpufreq-set.c:25 +#, fuzzy, c-format +msgid "Usage: cpupower frequency-set [options]\n" +msgstr "Uso: cpufreq-set [opções]\n" + +#: utils/cpufreq-set.c:27 +#, c-format +msgid "" +" -d FREQ, --min FREQ new minimum CPU frequency the governor may " +"select\n" +msgstr "" +" -d FREQ, --min FREQ nova frequência mínima do CPU que o regulador " +"deve selecionar\n" + +#: utils/cpufreq-set.c:28 +#, c-format +msgid "" +" -u FREQ, --max FREQ new maximum CPU frequency the governor may " +"select\n" +msgstr "" +" -u FREQ, --max FREQ nova frequência máxima do CPU que o regulador " +"deve escolher\n" + +#: utils/cpufreq-set.c:29 +#, c-format +msgid " -g GOV, --governor GOV new cpufreq governor\n" +msgstr " -g GOV, --governor GOV novo regulador do cpufreq\n" + +#: utils/cpufreq-set.c:30 +#, c-format +msgid "" +" -f FREQ, --freq FREQ specific frequency to be set. Requires userspace\n" +" governor to be available and loaded\n" +msgstr "" +" -f FREQ, --freq FREQ frequência específica para ser setada. Necessita " +"que o regulador em\n" +" nível de usuário esteja disponível e carregado\n" + +#: utils/cpufreq-set.c:32 +#, c-format +msgid " -r, --related Switches all hardware-related CPUs\n" +msgstr "" +" -r, --related Modifica todos os CPUs relacionados ao hardware\n" + +#: utils/cpufreq-set.c:33 utils/cpupower-set.c:28 utils/cpupower-info.c:27 +#, c-format +msgid " -h, --help Prints out this screen\n" +msgstr " -h, --help Mostra essa tela\n" + +#: utils/cpufreq-set.c:35 +#, fuzzy, c-format +msgid "" +"Notes:\n" +"1. Omitting the -c or --cpu argument is equivalent to setting it to \"all\"\n" +msgstr "" +"Para os argumentos marcados com *, omitir o argumento -c ou --cpu é\n" +"equivalente a setá-lo como zero\n" + +#: utils/cpufreq-set.c:37 +#, fuzzy, c-format +msgid "" +"2. The -f FREQ, --freq FREQ parameter cannot be combined with any other " +"parameter\n" +" except the -c CPU, --cpu CPU parameter\n" +"3. FREQuencies can be passed in Hz, kHz (default), MHz, GHz, or THz\n" +" by postfixing the value with the wanted unit name, without any space\n" +" (FREQuency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000).\n" +msgstr "" +"Notas:\n" +"1. Omitir o argumento -c or --cpu é equivalente a setá-lo como zero\n" +"2. O parâmetro -f FREQ, --freq FREQ não pode ser combinado com qualquer " +"outro parâmetro\n" +" exceto com o parâmetro -c CPU, --cpu CPU\n" +"3. FREQuências podem ser usadas em Hz, kHz (padrão), MHz, GHz, o THz\n" +" colocando o nome desejado da unidade após o valor, sem qualquer espaço\n" +" (FREQuência em kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000).\n" + +#: utils/cpufreq-set.c:57 +#, c-format +msgid "" +"Error setting new values. Common errors:\n" +"- Do you have proper administration rights? (super-user?)\n" +"- Is the governor you requested available and modprobed?\n" +"- Trying to set an invalid policy?\n" +"- Trying to set a specific frequency, but userspace governor is not " +"available,\n" +" for example because of hardware which cannot be set to a specific " +"frequency\n" +" or because the userspace governor isn't loaded?\n" +msgstr "" +"Erro ao setar novos valores. Erros comuns:\n" +"- Você tem direitos administrativos necessários? (super-usuário?)\n" +"- O regulador que você requesitou está disponível e foi \"modprobed\"?\n" +"- Tentando setar uma política inválida?\n" +"- Tentando setar uma frequência específica, mas o regulador em nível de " +"usuário não está disponível,\n" +" por exemplo devido ao hardware que não pode ser setado pra uma frequência " +"específica\n" +" ou porque o regulador em nível de usuário não foi carregado?\n" + +#: utils/cpufreq-set.c:170 +#, c-format +msgid "wrong, unknown or unhandled CPU?\n" +msgstr "CPU errado, desconhecido ou inesperado?\n" + +#: utils/cpufreq-set.c:302 +#, c-format +msgid "" +"the -f/--freq parameter cannot be combined with -d/--min, -u/--max or\n" +"-g/--governor parameters\n" +msgstr "" +"o parâmetro -f/--freq não pode ser combinado com os parâmetros -d/--min, -" +"u/--max ou\n" +"-g/--governor\n" + +#: utils/cpufreq-set.c:308 +#, c-format +msgid "" +"At least one parameter out of -f/--freq, -d/--min, -u/--max, and\n" +"-g/--governor must be passed\n" +msgstr "" +"Pelo menos um parâmetro entre -f/--freq, -d/--min, -u/--max, e\n" +"-g/--governor deve ser usado\n" + +#: utils/cpufreq-set.c:347 +#, c-format +msgid "Setting cpu: %d\n" +msgstr "" + +#: utils/cpupower-set.c:22 +#, c-format +msgid "Usage: cpupower set [ -b val ] [ -m val ] [ -s val ]\n" +msgstr "" + +#: utils/cpupower-set.c:24 +#, c-format +msgid "" +" -b, --perf-bias [VAL] Sets CPU's power vs performance policy on some\n" +" Intel models [0-15], see manpage for details\n" +msgstr "" + +#: utils/cpupower-set.c:26 +#, c-format +msgid "" +" -m, --sched-mc [VAL] Sets the kernel's multi core scheduler policy.\n" +msgstr "" + +#: utils/cpupower-set.c:27 +#, c-format +msgid "" +" -s, --sched-smt [VAL] Sets the kernel's thread sibling scheduler " +"policy.\n" +msgstr "" + +#: utils/cpupower-set.c:80 +#, c-format +msgid "--perf-bias param out of range [0-%d]\n" +msgstr "" + +#: utils/cpupower-set.c:91 +#, c-format +msgid "--sched-mc param out of range [0-%d]\n" +msgstr "" + +#: utils/cpupower-set.c:102 +#, c-format +msgid "--sched-smt param out of range [0-%d]\n" +msgstr "" + +#: utils/cpupower-set.c:121 +#, c-format +msgid "Error setting sched-mc %s\n" +msgstr "" + +#: utils/cpupower-set.c:127 +#, c-format +msgid "Error setting sched-smt %s\n" +msgstr "" + +#: utils/cpupower-set.c:146 +#, c-format +msgid "Error setting perf-bias value on CPU %d\n" +msgstr "" + +#: utils/cpupower-info.c:21 +#, c-format +msgid "Usage: cpupower info [ -b ] [ -m ] [ -s ]\n" +msgstr "" + +#: utils/cpupower-info.c:23 +#, c-format +msgid "" +" -b, --perf-bias Gets CPU's power vs performance policy on some\n" +" Intel models [0-15], see manpage for details\n" +msgstr "" + +#: utils/cpupower-info.c:25 +#, fuzzy, c-format +msgid " -m, --sched-mc Gets the kernel's multi core scheduler policy.\n" +msgstr "" +"--p, --policy Obtem a política do cpufreq em uso no momento *\n" + +#: utils/cpupower-info.c:26 +#, c-format +msgid "" +" -s, --sched-smt Gets the kernel's thread sibling scheduler policy.\n" +msgstr "" + +#: utils/cpupower-info.c:28 +#, c-format +msgid "" +"\n" +"Passing no option will show all info, by default only on core 0\n" +msgstr "" + +#: utils/cpupower-info.c:102 +#, c-format +msgid "System's multi core scheduler setting: " +msgstr "" + +#. if sysfs file is missing it's: errno == ENOENT +#: utils/cpupower-info.c:105 utils/cpupower-info.c:114 +#, c-format +msgid "not supported\n" +msgstr "" + +#: utils/cpupower-info.c:111 +#, c-format +msgid "System's thread sibling scheduler setting: " +msgstr "" + +#: utils/cpupower-info.c:126 +#, c-format +msgid "Intel's performance bias setting needs root privileges\n" +msgstr "" + +#: utils/cpupower-info.c:128 +#, c-format +msgid "System does not support Intel's performance bias setting\n" +msgstr "" + +#: utils/cpupower-info.c:147 +#, c-format +msgid "Could not read perf-bias value\n" +msgstr "" + +#: utils/cpupower-info.c:150 +#, c-format +msgid "perf-bias: %d\n" +msgstr "" + +#: utils/cpuidle-info.c:28 +#, fuzzy, c-format +msgid "Analyzing CPU %d:\n" +msgstr "analisando o CPU %d:\n" + +#: utils/cpuidle-info.c:32 +#, c-format +msgid "CPU %u: No idle states\n" +msgstr "" + +#: utils/cpuidle-info.c:36 +#, c-format +msgid "CPU %u: Can't read idle state info\n" +msgstr "" + +#: utils/cpuidle-info.c:41 +#, c-format +msgid "Could not determine max idle state %u\n" +msgstr "" + +#: utils/cpuidle-info.c:46 +#, c-format +msgid "Number of idle states: %d\n" +msgstr "" + +#: utils/cpuidle-info.c:48 +#, fuzzy, c-format +msgid "Available idle states:" +msgstr " níveis de frequência disponíveis: " + +#: utils/cpuidle-info.c:71 +#, c-format +msgid "Flags/Description: %s\n" +msgstr "" + +#: utils/cpuidle-info.c:74 +#, c-format +msgid "Latency: %lu\n" +msgstr "" + +#: utils/cpuidle-info.c:76 +#, c-format +msgid "Usage: %lu\n" +msgstr "" + +#: utils/cpuidle-info.c:78 +#, c-format +msgid "Duration: %llu\n" +msgstr "" + +#: utils/cpuidle-info.c:90 +#, c-format +msgid "Could not determine cpuidle driver\n" +msgstr "" + +#: utils/cpuidle-info.c:94 +#, fuzzy, c-format +msgid "CPUidle driver: %s\n" +msgstr " driver: %s\n" + +#: utils/cpuidle-info.c:99 +#, c-format +msgid "Could not determine cpuidle governor\n" +msgstr "" + +#: utils/cpuidle-info.c:103 +#, c-format +msgid "CPUidle governor: %s\n" +msgstr "" + +#: utils/cpuidle-info.c:122 +#, c-format +msgid "CPU %u: Can't read C-state info\n" +msgstr "" + +#. printf("Cstates: %d\n", cstates); +#: utils/cpuidle-info.c:127 +#, c-format +msgid "active state: C0\n" +msgstr "" + +#: utils/cpuidle-info.c:128 +#, c-format +msgid "max_cstate: C%u\n" +msgstr "" + +#: utils/cpuidle-info.c:129 +#, fuzzy, c-format +msgid "maximum allowed latency: %lu usec\n" +msgstr " maior latência de transição: " + +#: utils/cpuidle-info.c:130 +#, c-format +msgid "states:\t\n" +msgstr "" + +#: utils/cpuidle-info.c:132 +#, c-format +msgid " C%d: type[C%d] " +msgstr "" + +#: utils/cpuidle-info.c:134 +#, c-format +msgid "promotion[--] demotion[--] " +msgstr "" + +#: utils/cpuidle-info.c:135 +#, c-format +msgid "latency[%03lu] " +msgstr "" + +#: utils/cpuidle-info.c:137 +#, c-format +msgid "usage[%08lu] " +msgstr "" + +#: utils/cpuidle-info.c:139 +#, c-format +msgid "duration[%020Lu] \n" +msgstr "" + +#: utils/cpuidle-info.c:147 +#, fuzzy, c-format +msgid "Usage: cpupower idleinfo [options]\n" +msgstr "Uso: cpufreq-info [opções]\n" + +#: utils/cpuidle-info.c:149 +#, fuzzy, c-format +msgid " -s, --silent Only show general C-state information\n" +msgstr " -e, --debug Mostra informação de debug\n" + +#: utils/cpuidle-info.c:150 +#, fuzzy, c-format +msgid "" +" -o, --proc Prints out information like provided by the /proc/" +"acpi/processor/*/power\n" +" interface in older kernels\n" +msgstr "" +" -o, --proc Mostra informação do tipo provida pela interface /" +"proc/cpufreq\n" +" em kernels 2.4. e mais recentes 2.6\n" + +#: utils/cpuidle-info.c:209 +#, fuzzy, c-format +msgid "You can't specify more than one output-specific argument\n" +msgstr "" +"Você não pode especificar mais do que um parâmetro --cpu e/ou\n" +"mais do que um argumento de saída específico\n" + +#~ msgid "" +#~ " -c CPU, --cpu CPU CPU number which information shall be determined " +#~ "about\n" +#~ msgstr "" +#~ " -c CPU, --cpu CPU número do CPU sobre o qual as inforções devem ser " +#~ "determinadas\n" + +#~ msgid "" +#~ " -c CPU, --cpu CPU number of CPU where cpufreq settings shall be " +#~ "modified\n" +#~ msgstr "" +#~ " -c CPU, --cpu CPU número do CPU onde as configurações do cpufreq " +#~ "vão ser modificadas\n" \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/pt.po.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/pt.po.yml new file mode 100644 index 00000000000..5bac783af42 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/power/cpupower/po/pt.po.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008 THE cpufrequtils'S +holders: + - THE cpufrequtils'S diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/testing/selftests/ntb/ntb_test.sh b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/testing/selftests/ntb/ntb_test.sh new file mode 100644 index 00000000000..08e98bb414a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/testing/selftests/ntb/ntb_test.sh @@ -0,0 +1,590 @@ +#!/bin/bash +# Copyright (c) 2016 Microsemi. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it would 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. +# +# Author: Logan Gunthorpe + +REMOTE_HOST= +LIST_DEVS=FALSE + +DEBUGFS=${DEBUGFS-/sys/kernel/debug} + +PERF_RUN_ORDER=32 +MAX_MW_SIZE=0 +RUN_DMA_TESTS= +DONT_CLEANUP= +MW_SIZE=65536 + +function show_help() +{ + echo "Usage: $0 [OPTIONS] LOCAL_DEV REMOTE_DEV" + echo "Run tests on a pair of NTB endpoints." + echo + echo "If the NTB device loops back to the same host then," + echo "just specifying the two PCI ids on the command line is" + echo "sufficient. Otherwise, if the NTB link spans two hosts" + echo "use the -r option to specify the hostname for the remote" + echo "device. SSH will then be used to test the remote side." + echo "An SSH key between the root users of the host would then" + echo "be highly recommended." + echo + echo "Options:" + echo " -C don't cleanup ntb modules on exit" + echo " -h show this help message" + echo " -l list available local and remote PCI ids" + echo " -r REMOTE_HOST specify the remote's hostname to connect" + echo " to for the test (using ssh)" + echo " -m MW_SIZE memory window size for ntb_tool" + echo " (default: $MW_SIZE)" + echo " -d run dma tests for ntb_perf" + echo " -p ORDER total data order for ntb_perf" + echo " (default: $PERF_RUN_ORDER)" + echo " -w MAX_MW_SIZE maxmium memory window size for ntb_perf" + echo +} + +function parse_args() +{ + OPTIND=0 + while getopts "b:Cdhlm:r:p:w:" opt; do + case "$opt" in + C) DONT_CLEANUP=1 ;; + d) RUN_DMA_TESTS=1 ;; + h) show_help; exit 0 ;; + l) LIST_DEVS=TRUE ;; + m) MW_SIZE=${OPTARG} ;; + r) REMOTE_HOST=${OPTARG} ;; + p) PERF_RUN_ORDER=${OPTARG} ;; + w) MAX_MW_SIZE=${OPTARG} ;; + \?) + echo "Invalid option: -$OPTARG" >&2 + exit 1 + ;; + esac + done +} + +parse_args "$@" +shift $((OPTIND-1)) +LOCAL_DEV=$1 +shift +parse_args "$@" +shift $((OPTIND-1)) +REMOTE_DEV=$1 +shift +parse_args "$@" + +set -e + +function _modprobe() +{ + modprobe "$@" + + if [[ "$REMOTE_HOST" != "" ]]; then + ssh "$REMOTE_HOST" modprobe "$@" + fi +} + +function split_remote() +{ + VPATH=$1 + REMOTE= + + if [[ "$VPATH" == *":/"* ]]; then + REMOTE=${VPATH%%:*} + VPATH=${VPATH#*:} + fi +} + +function read_file() +{ + split_remote $1 + if [[ "$REMOTE" != "" ]]; then + ssh "$REMOTE" cat "$VPATH" + else + cat "$VPATH" + fi +} + +function write_file() +{ + split_remote $2 + VALUE=$1 + + if [[ "$REMOTE" != "" ]]; then + ssh "$REMOTE" "echo \"$VALUE\" > \"$VPATH\"" + else + echo "$VALUE" > "$VPATH" + fi +} + +function check_file() +{ + split_remote $1 + + if [[ "$REMOTE" != "" ]]; then + ssh "$REMOTE" "[[ -e ${VPATH} ]]" + else + [[ -e ${VPATH} ]] + fi +} + +function subdirname() +{ + echo $(basename $(dirname $1)) 2> /dev/null +} + +function find_pidx() +{ + PORT=$1 + PPATH=$2 + + for ((i = 0; i < 64; i++)); do + PEER_DIR="$PPATH/peer$i" + + check_file ${PEER_DIR} || break + + PEER_PORT=$(read_file "${PEER_DIR}/port") + if [[ ${PORT} -eq $PEER_PORT ]]; then + echo $i + return 0 + fi + done + + return 1 +} + +function port_test() +{ + LOC=$1 + REM=$2 + + echo "Running port tests on: $(basename $LOC) / $(basename $REM)" + + LOCAL_PORT=$(read_file "$LOC/port") + REMOTE_PORT=$(read_file "$REM/port") + + LOCAL_PIDX=$(find_pidx ${REMOTE_PORT} "$LOC") + REMOTE_PIDX=$(find_pidx ${LOCAL_PORT} "$REM") + + echo "Local port ${LOCAL_PORT} with index ${REMOTE_PIDX} on remote host" + echo "Peer port ${REMOTE_PORT} with index ${LOCAL_PIDX} on local host" + + echo " Passed" +} + +function link_test() +{ + LOC=$1 + REM=$2 + EXP=0 + + echo "Running link tests on: $(subdirname $LOC) / $(subdirname $REM)" + + if ! write_file "N" "$LOC/../link" 2> /dev/null; then + echo " Unsupported" + return + fi + + write_file "N" "$LOC/link_event" + + if [[ $(read_file "$REM/link") != "N" ]]; then + echo "Expected link to be down in $REM/link" >&2 + exit -1 + fi + + write_file "Y" "$LOC/../link" + + echo " Passed" +} + +function doorbell_test() +{ + LOC=$1 + REM=$2 + EXP=0 + + echo "Running db tests on: $(basename $LOC) / $(basename $REM)" + + DB_VALID_MASK=$(read_file "$LOC/db_valid_mask") + + write_file "c $DB_VALID_MASK" "$REM/db" + + for ((i = 0; i < 64; i++)); do + DB=$(read_file "$REM/db") + if [[ "$DB" -ne "$EXP" ]]; then + echo "Doorbell doesn't match expected value $EXP " \ + "in $REM/db" >&2 + exit -1 + fi + + let "MASK = (1 << $i) & $DB_VALID_MASK" || true + let "EXP = $EXP | $MASK" || true + + write_file "s $MASK" "$LOC/peer_db" + done + + write_file "c $DB_VALID_MASK" "$REM/db_mask" + write_file $DB_VALID_MASK "$REM/db_event" + write_file "s $DB_VALID_MASK" "$REM/db_mask" + + write_file "c $DB_VALID_MASK" "$REM/db" + + echo " Passed" +} + +function get_files_count() +{ + NAME=$1 + LOC=$2 + + split_remote $LOC + + if [[ "$REMOTE" == "" ]]; then + echo $(ls -1 "$LOC"/${NAME}* 2>/dev/null | wc -l) + else + echo $(ssh "$REMOTE" "ls -1 \"$VPATH\"/${NAME}* | \ + wc -l" 2> /dev/null) + fi +} + +function scratchpad_test() +{ + LOC=$1 + REM=$2 + + echo "Running spad tests on: $(subdirname $LOC) / $(subdirname $REM)" + + CNT=$(get_files_count "spad" "$LOC") + + if [[ $CNT -eq 0 ]]; then + echo " Unsupported" + return + fi + + for ((i = 0; i < $CNT; i++)); do + VAL=$RANDOM + write_file "$VAL" "$LOC/spad$i" + RVAL=$(read_file "$REM/../spad$i") + + if [[ "$VAL" -ne "$RVAL" ]]; then + echo "Scratchpad $i value $RVAL doesn't match $VAL" >&2 + exit -1 + fi + done + + echo " Passed" +} + +function message_test() +{ + LOC=$1 + REM=$2 + + echo "Running msg tests on: $(subdirname $LOC) / $(subdirname $REM)" + + CNT=$(get_files_count "msg" "$LOC") + + if [[ $CNT -eq 0 ]]; then + echo " Unsupported" + return + fi + + MSG_OUTBITS_MASK=$(read_file "$LOC/../msg_inbits") + MSG_INBITS_MASK=$(read_file "$REM/../msg_inbits") + + write_file "c $MSG_OUTBITS_MASK" "$LOC/../msg_sts" + write_file "c $MSG_INBITS_MASK" "$REM/../msg_sts" + + for ((i = 0; i < $CNT; i++)); do + VAL=$RANDOM + write_file "$VAL" "$LOC/msg$i" + RVAL=$(read_file "$REM/../msg$i") + + if [[ "$VAL" -ne "${RVAL%%<-*}" ]]; then + echo "Message $i value $RVAL doesn't match $VAL" >&2 + exit -1 + fi + done + + echo " Passed" +} + +function get_number() +{ + KEY=$1 + + sed -n "s/^\(${KEY}\)[ \t]*\(0x[0-9a-fA-F]*\)\(\[p\]\)\?$/\2/p" +} + +function mw_alloc() +{ + IDX=$1 + LOC=$2 + REM=$3 + + write_file $MW_SIZE "$LOC/mw_trans$IDX" + + INB_MW=$(read_file "$LOC/mw_trans$IDX") + MW_ALIGNED_SIZE=$(echo "$INB_MW" | get_number "Window Size") + MW_DMA_ADDR=$(echo "$INB_MW" | get_number "DMA Address") + + write_file "$MW_DMA_ADDR:$(($MW_ALIGNED_SIZE))" "$REM/peer_mw_trans$IDX" + + if [[ $MW_SIZE -ne $MW_ALIGNED_SIZE ]]; then + echo "MW $IDX size aligned to $MW_ALIGNED_SIZE" + fi +} + +function write_mw() +{ + split_remote $2 + + if [[ "$REMOTE" != "" ]]; then + ssh "$REMOTE" \ + dd if=/dev/urandom "of=$VPATH" 2> /dev/null || true + else + dd if=/dev/urandom "of=$VPATH" 2> /dev/null || true + fi +} + +function mw_check() +{ + IDX=$1 + LOC=$2 + REM=$3 + + write_mw "$LOC/mw$IDX" + + split_remote "$LOC/mw$IDX" + if [[ "$REMOTE" == "" ]]; then + A=$VPATH + else + A=/tmp/ntb_test.$$.A + ssh "$REMOTE" cat "$VPATH" > "$A" + fi + + split_remote "$REM/peer_mw$IDX" + if [[ "$REMOTE" == "" ]]; then + B=$VPATH + else + B=/tmp/ntb_test.$$.B + ssh "$REMOTE" cat "$VPATH" > "$B" + fi + + cmp -n $MW_ALIGNED_SIZE "$A" "$B" + if [[ $? != 0 ]]; then + echo "Memory window $MW did not match!" >&2 + fi + + if [[ "$A" == "/tmp/*" ]]; then + rm "$A" + fi + + if [[ "$B" == "/tmp/*" ]]; then + rm "$B" + fi +} + +function mw_free() +{ + IDX=$1 + LOC=$2 + REM=$3 + + write_file "$MW_DMA_ADDR:0" "$REM/peer_mw_trans$IDX" + + write_file 0 "$LOC/mw_trans$IDX" +} + +function mw_test() +{ + LOC=$1 + REM=$2 + + CNT=$(get_files_count "mw_trans" "$LOC") + + for ((i = 0; i < $CNT; i++)); do + echo "Running mw$i tests on: $(subdirname $LOC) / " \ + "$(subdirname $REM)" + + mw_alloc $i $LOC $REM + + mw_check $i $LOC $REM + + mw_free $i $LOC $REM + + echo " Passed" + done + +} + +function pingpong_test() +{ + LOC=$1 + REM=$2 + + echo "Running ping pong tests on: $(basename $LOC) / $(basename $REM)" + + LOC_START=$(read_file "$LOC/count") + REM_START=$(read_file "$REM/count") + + sleep 7 + + LOC_END=$(read_file "$LOC/count") + REM_END=$(read_file "$REM/count") + + if [[ $LOC_START == $LOC_END ]] || [[ $REM_START == $REM_END ]]; then + echo "Ping pong counter not incrementing!" >&2 + exit 1 + fi + + echo " Passed" +} + +function perf_test() +{ + USE_DMA=$1 + + if [[ $USE_DMA == "1" ]]; then + WITH="with" + else + WITH="without" + fi + + _modprobe ntb_perf total_order=$PERF_RUN_ORDER \ + max_mw_size=$MAX_MW_SIZE use_dma=$USE_DMA + + echo "Running local perf test $WITH DMA" + write_file "$LOCAL_PIDX" "$LOCAL_PERF/run" + echo -n " " + read_file "$LOCAL_PERF/run" + echo " Passed" + + echo "Running remote perf test $WITH DMA" + write_file "$REMOTE_PIDX" "$REMOTE_PERF/run" + echo -n " " + read_file "$REMOTE_PERF/run" + echo " Passed" + + _modprobe -r ntb_perf +} + +function ntb_tool_tests() +{ + LOCAL_TOOL="$DEBUGFS/ntb_tool/$LOCAL_DEV" + REMOTE_TOOL="$REMOTE_HOST:$DEBUGFS/ntb_tool/$REMOTE_DEV" + + echo "Starting ntb_tool tests..." + + _modprobe ntb_tool + + port_test "$LOCAL_TOOL" "$REMOTE_TOOL" + + LOCAL_PEER_TOOL="$LOCAL_TOOL/peer$LOCAL_PIDX" + REMOTE_PEER_TOOL="$REMOTE_TOOL/peer$REMOTE_PIDX" + + link_test "$LOCAL_PEER_TOOL" "$REMOTE_PEER_TOOL" + link_test "$REMOTE_PEER_TOOL" "$LOCAL_PEER_TOOL" + + #Ensure the link is up on both sides before continuing + write_file "Y" "$LOCAL_PEER_TOOL/link_event" + write_file "Y" "$REMOTE_PEER_TOOL/link_event" + + doorbell_test "$LOCAL_TOOL" "$REMOTE_TOOL" + doorbell_test "$REMOTE_TOOL" "$LOCAL_TOOL" + + scratchpad_test "$LOCAL_PEER_TOOL" "$REMOTE_PEER_TOOL" + scratchpad_test "$REMOTE_PEER_TOOL" "$LOCAL_PEER_TOOL" + + message_test "$LOCAL_PEER_TOOL" "$REMOTE_PEER_TOOL" + message_test "$REMOTE_PEER_TOOL" "$LOCAL_PEER_TOOL" + + mw_test "$LOCAL_PEER_TOOL" "$REMOTE_PEER_TOOL" + mw_test "$REMOTE_PEER_TOOL" "$LOCAL_PEER_TOOL" + + _modprobe -r ntb_tool +} + +function ntb_pingpong_tests() +{ + LOCAL_PP="$DEBUGFS/ntb_pingpong/$LOCAL_DEV" + REMOTE_PP="$REMOTE_HOST:$DEBUGFS/ntb_pingpong/$REMOTE_DEV" + + echo "Starting ntb_pingpong tests..." + + _modprobe ntb_pingpong + + pingpong_test $LOCAL_PP $REMOTE_PP + + _modprobe -r ntb_pingpong +} + +function ntb_perf_tests() +{ + LOCAL_PERF="$DEBUGFS/ntb_perf/$LOCAL_DEV" + REMOTE_PERF="$REMOTE_HOST:$DEBUGFS/ntb_perf/$REMOTE_DEV" + + echo "Starting ntb_perf tests..." + + perf_test 0 + + if [[ $RUN_DMA_TESTS ]]; then + perf_test 1 + fi +} + +function cleanup() +{ + set +e + _modprobe -r ntb_tool 2> /dev/null + _modprobe -r ntb_perf 2> /dev/null + _modprobe -r ntb_pingpong 2> /dev/null + _modprobe -r ntb_transport 2> /dev/null + set -e +} + +cleanup + +if ! [[ $$DONT_CLEANUP ]]; then + trap cleanup EXIT +fi + +if [ "$(id -u)" != "0" ]; then + echo "This script must be run as root" 1>&2 + exit 1 +fi + +if [[ "$LIST_DEVS" == TRUE ]]; then + echo "Local Devices:" + ls -1 /sys/bus/ntb/devices + echo + + if [[ "$REMOTE_HOST" != "" ]]; then + echo "Remote Devices:" + ssh $REMOTE_HOST ls -1 /sys/bus/ntb/devices + fi + + exit 0 +fi + +if [[ "$LOCAL_DEV" == $"" ]] || [[ "$REMOTE_DEV" == $"" ]]; then + show_help + exit 1 +fi + +ntb_tool_tests +echo +ntb_pingpong_tests +echo +ntb_perf_tests +echo \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/testing/selftests/ntb/ntb_test.sh.yml b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/testing/selftests/ntb/ntb_test.sh.yml new file mode 100644 index 00000000000..7f57db9ee4b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux-copyrights/tools/testing/selftests/ntb/ntb_test.sh.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2016 Microsemi +holders: + - Microsemi +authors: + - Logan Gunthorpe diff --git a/tests/cluecode/data/copyrights/misco4/linux/2011a.txt b/tests/cluecode/data/copyrights/misco4/linux/2011a.txt new file mode 100644 index 00000000000..9020138a301 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/2011a.txt @@ -0,0 +1,2 @@ + * Copyright 2010-2011a Analog Devices Inc. + diff --git a/tests/cluecode/data/copyrights/misco4/linux/2011a.txt.yml b/tests/cluecode/data/copyrights/misco4/linux/2011a.txt.yml new file mode 100644 index 00000000000..f61b096b533 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/2011a.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2010-2011a Analog Devices Inc. +holders: + - Analog Devices Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux/adapted.txt b/tests/cluecode/data/copyrights/misco4/linux/adapted.txt new file mode 100644 index 00000000000..fb0fa050279 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/adapted.txt @@ -0,0 +1,3 @@ +Copyright (C) 1998 Frederic Rible F1OAT (frible@teaser.fr) +Adapted from baycom.c driver written by Thomas Sailer (sailer@ife.ee.ethz.ch) + diff --git a/tests/cluecode/data/copyrights/misco4/linux/adapted.txt.yml b/tests/cluecode/data/copyrights/misco4/linux/adapted.txt.yml new file mode 100644 index 00000000000..c33f8c18f13 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/adapted.txt.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998 Frederic Rible F1OAT (frible@teaser.fr) +holders: + - Frederic Rible F1OAT +authors: + - Thomas Sailer (sailer@ife.ee.ethz.ch) diff --git a/tests/cluecode/data/copyrights/misco4/linux/adapted2.txt b/tests/cluecode/data/copyrights/misco4/linux/adapted2.txt new file mode 100644 index 00000000000..62849e27c24 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/adapted2.txt @@ -0,0 +1,2 @@ +(c) 2004 MontaVista Software, Inc. + * - Adapted from gdb/sim/arm/thumbemu.c diff --git a/tests/cluecode/data/copyrights/misco4/linux/adapted2.txt.yml b/tests/cluecode/data/copyrights/misco4/linux/adapted2.txt.yml new file mode 100644 index 00000000000..1587d4cc8e9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/adapted2.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2004 MontaVista Software, Inc. +holders: + - MontaVista Software, Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux/added.txt b/tests/cluecode/data/copyrights/misco4/linux/added.txt new file mode 100644 index 00000000000..cba67ebeea6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/added.txt @@ -0,0 +1,3 @@ +additions, Copyright (C) 2003-2004, Paul Clements, SteelEye Technology, Inc.: + * - added disk storage for bitmap + diff --git a/tests/cluecode/data/copyrights/misco4/linux/added.txt.yml b/tests/cluecode/data/copyrights/misco4/linux/added.txt.yml new file mode 100644 index 00000000000..70b58586a1f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/added.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2003-2004, Paul Clements, SteelEye Technology, Inc. +holders: + - Paul Clements, SteelEye Technology, Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux/ak.txt b/tests/cluecode/data/copyrights/misco4/linux/ak.txt new file mode 100644 index 00000000000..80b5b12f255 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/ak.txt @@ -0,0 +1,3 @@ + * Copyright (C) 2012 AK signal Brno a.s. + * 2012 Jiri Prchal + diff --git a/tests/cluecode/data/copyrights/misco4/linux/ak.txt.yml b/tests/cluecode/data/copyrights/misco4/linux/ak.txt.yml new file mode 100644 index 00000000000..76ba02a6fd2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/ak.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2012 AK signal Brno a.s. 2012 Jiri Prchal +holders: + - AK signal Brno a.s. Jiri Prchal diff --git a/tests/cluecode/data/copyrights/misco4/linux/caps.txt b/tests/cluecode/data/copyrights/misco4/linux/caps.txt new file mode 100644 index 00000000000..f7b4db245b4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/caps.txt @@ -0,0 +1,3 @@ +Copyright (c) 2005-2006 Mauro Carvalho Chehab + SAA7111, SAA7113 and SAA7118 support + diff --git a/tests/cluecode/data/copyrights/misco4/linux/caps.txt.yml b/tests/cluecode/data/copyrights/misco4/linux/caps.txt.yml new file mode 100644 index 00000000000..7bdd0eab448 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/caps.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005-2006 Mauro Carvalho Chehab +holders: + - Mauro Carvalho Chehab diff --git a/tests/cluecode/data/copyrights/misco4/linux/ctu.txt b/tests/cluecode/data/copyrights/misco4/linux/ctu.txt new file mode 100644 index 00000000000..a74051d6037 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/ctu.txt @@ -0,0 +1,2 @@ +Copyright: (c) 2014 Czech Technical University in Prague + diff --git a/tests/cluecode/data/copyrights/misco4/linux/ctu.txt.yml b/tests/cluecode/data/copyrights/misco4/linux/ctu.txt.yml new file mode 100644 index 00000000000..569efc0b8dc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/ctu.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2014 Czech Technical University in Prague +holders: + - Czech Technical University in Prague diff --git a/tests/cluecode/data/copyrights/misco4/linux/dynamic.txt b/tests/cluecode/data/copyrights/misco4/linux/dynamic.txt new file mode 100644 index 00000000000..a31aa96dbee --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/dynamic.txt @@ -0,0 +1,30 @@ +Copyright (c) Dynamic Network Services, Inc +Copyright (c) frisB.com <play@frisb.com> + + + + + + +Copyright (c) dynamic-evaluation, https://github.com/benkrause/dynamic-evaluation + + + + + + + + +copyright (c) Dynamic Drive (www.dynamicdrive.com) + + + + + + Copyright (C) Dynamic System Bars Project + + + + + +# Copyright (c) Dynamic Solutions. All rights reserved. diff --git a/tests/cluecode/data/copyrights/misco4/linux/dynamic.txt.yml b/tests/cluecode/data/copyrights/misco4/linux/dynamic.txt.yml new file mode 100644 index 00000000000..400bc3a8227 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/dynamic.txt.yml @@ -0,0 +1,18 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Dynamic Network Services, Inc + - Copyright (c) frisB.com + - Copyright (c) dynamic-evaluation, https://github.com/benkrause/dynamic-evaluation + - copyright (c) Dynamic Drive (www.dynamicdrive.com) + - Copyright (c) Dynamic System Bars Project + - Copyright (c) Dynamic Solutions +holders: + - Dynamic Network Services, Inc + - frisB.com + - dynamic-evaluation + - Dynamic Drive + - Dynamic System Bars Project + - Dynamic Solutions diff --git a/tests/cluecode/data/copyrights/misco4/linux/improved.txt b/tests/cluecode/data/copyrights/misco4/linux/improved.txt new file mode 100644 index 00000000000..4dd49e9db72 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/improved.txt @@ -0,0 +1,3 @@ +* Copyright (C) 1998 Andrea Arcangeli + * 1999-03-10 Improved NTP compatibility by Ulrich Windl + diff --git a/tests/cluecode/data/copyrights/misco4/linux/improved.txt.yml b/tests/cluecode/data/copyrights/misco4/linux/improved.txt.yml new file mode 100644 index 00000000000..955647a9064 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/improved.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998 Andrea Arcangeli 1999-03-10 +holders: + - Andrea Arcangeli diff --git a/tests/cluecode/data/copyrights/misco4/linux/irq.txt b/tests/cluecode/data/copyrights/misco4/linux/irq.txt new file mode 100644 index 00000000000..4ed84ecbcb9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/irq.txt @@ -0,0 +1,7 @@ +Copyright (C) 1992 Linus Torvalds +Modifications for ARM processor Copyright (C) 1995-2000 Russell King. + +Support for Dynamic Tick Timer Copyright (C) 2004-2005 Nokia Corporation. +Dynamic Tick Timer written by Tony Lindgren and +Tuukka Tikkanen . + diff --git a/tests/cluecode/data/copyrights/misco4/linux/irq.txt.yml b/tests/cluecode/data/copyrights/misco4/linux/irq.txt.yml new file mode 100644 index 00000000000..2a9169efd14 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/irq.txt.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1992 Linus Torvalds + - Copyright (c) 1995-2000 Russell King + - Copyright (c) 2004-2005 Nokia Corporation +holders: + - Linus Torvalds + - Russell King + - Nokia Corporation +authors: + - Tony Lindgren and Tuukka Tikkanen diff --git a/tests/cluecode/data/copyrights/misco4/linux/moved.txt b/tests/cluecode/data/copyrights/misco4/linux/moved.txt new file mode 100644 index 00000000000..15b21f6654c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/moved.txt @@ -0,0 +1,4 @@ +Extra data: + * Copyright (C) 1994-1999 Russell King + * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks + diff --git a/tests/cluecode/data/copyrights/misco4/linux/moved.txt.yml b/tests/cluecode/data/copyrights/misco4/linux/moved.txt.yml new file mode 100644 index 00000000000..d07c1cdaaba --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/moved.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1994-1999 Russell King +holders: + - Russell King diff --git a/tests/cluecode/data/copyrights/misco4/linux/reorg.txt b/tests/cluecode/data/copyrights/misco4/linux/reorg.txt new file mode 100644 index 00000000000..dc1b1c02000 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/reorg.txt @@ -0,0 +1,2 @@ + * Copyright (C) 1991-1998 Linus Torvalds + * Re-organised Feb 1998 Russell King diff --git a/tests/cluecode/data/copyrights/misco4/linux/reorg.txt.yml b/tests/cluecode/data/copyrights/misco4/linux/reorg.txt.yml new file mode 100644 index 00000000000..abec9c15568 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/reorg.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1991-1998 Linus Torvalds +holders: + - Linus Torvalds diff --git a/tests/cluecode/data/copyrights/misco4/linux/with-add.txt b/tests/cluecode/data/copyrights/misco4/linux/with-add.txt new file mode 100644 index 00000000000..e82cfef5be7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/with-add.txt @@ -0,0 +1,3 @@ +Copyright (C) 1997 Sigurdur Asgeirsson +With additional hacking by Jeffrey Kuskin (jsk@mojave.stanford.edu) + diff --git a/tests/cluecode/data/copyrights/misco4/linux/with-add.txt.yml b/tests/cluecode/data/copyrights/misco4/linux/with-add.txt.yml new file mode 100644 index 00000000000..e3533cedb60 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux/with-add.txt.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1997 Sigurdur Asgeirsson +holders: + - Sigurdur Asgeirsson +authors: + - Jeffrey Kuskin (jsk@mojave.stanford.edu) diff --git a/tests/cluecode/data/copyrights/misco4/linux2/bugfix.txt b/tests/cluecode/data/copyrights/misco4/linux2/bugfix.txt new file mode 100644 index 00000000000..80fd6d8686d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/bugfix.txt @@ -0,0 +1,10 @@ + Qua Jun 27 15:02:26 BRT 2001 + * [27-JUN-2001] Arnaldo Carvalho de Melo - cleanups + * + * Parts (C) 1999 David Airlie, airlied@linux.ie + * [07-SEP-99] Bugfixes + * + * [06-Jan-2002] Russell King + * Converted to new serial core + */ + diff --git a/tests/cluecode/data/copyrights/misco4/linux2/bugfix.txt.yml b/tests/cluecode/data/copyrights/misco4/linux2/bugfix.txt.yml new file mode 100644 index 00000000000..8ad32321382 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/bugfix.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Parts (c) 1999 David Airlie, airlied@linux.ie +holders: + - David Airlie diff --git a/tests/cluecode/data/copyrights/misco4/linux2/c-group.txt b/tests/cluecode/data/copyrights/misco4/linux2/c-group.txt new file mode 100644 index 00000000000..4c89728fed9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/c-group.txt @@ -0,0 +1 @@ + (c)group based bandwidth management, diff --git a/tests/cluecode/data/copyrights/misco4/linux2/c-group.txt.yml b/tests/cluecode/data/copyrights/misco4/linux2/c-group.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/c-group.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/linux2/clean.txt b/tests/cluecode/data/copyrights/misco4/linux2/clean.txt new file mode 100644 index 00000000000..80fd6d8686d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/clean.txt @@ -0,0 +1,10 @@ + Qua Jun 27 15:02:26 BRT 2001 + * [27-JUN-2001] Arnaldo Carvalho de Melo - cleanups + * + * Parts (C) 1999 David Airlie, airlied@linux.ie + * [07-SEP-99] Bugfixes + * + * [06-Jan-2002] Russell King + * Converted to new serial core + */ + diff --git a/tests/cluecode/data/copyrights/misco4/linux2/clean.txt.yml b/tests/cluecode/data/copyrights/misco4/linux2/clean.txt.yml new file mode 100644 index 00000000000..8ad32321382 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/clean.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Parts (c) 1999 David Airlie, airlied@linux.ie +holders: + - David Airlie diff --git a/tests/cluecode/data/copyrights/misco4/linux2/copy-rst.rst b/tests/cluecode/data/copyrights/misco4/linux2/copy-rst.rst new file mode 100644 index 00000000000..b57c6e99af7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/copy-rst.rst @@ -0,0 +1,2 @@ +**Copyright** |copy| 1999-2016 : LinuxTV Developers + diff --git a/tests/cluecode/data/copyrights/misco4/linux2/copy-rst.rst.yml b/tests/cluecode/data/copyrights/misco4/linux2/copy-rst.rst.yml new file mode 100644 index 00000000000..ac7e63a2901 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/copy-rst.rst.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999-2016 LinuxTV Developers +holders: + - LinuxTV Developers diff --git a/tests/cluecode/data/copyrights/misco4/linux2/creative-card.txt b/tests/cluecode/data/copyrights/misco4/linux2/creative-card.txt new file mode 100644 index 00000000000..6a2848fac4e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/creative-card.txt @@ -0,0 +1,2 @@ +* Creative Card 5.1 (c) 2003 [0x3fc3/0x7cff] +* Creative Card all ins and outs [0x3fff/0x7fff] diff --git a/tests/cluecode/data/copyrights/misco4/linux2/creative-card.txt.yml b/tests/cluecode/data/copyrights/misco4/linux2/creative-card.txt.yml new file mode 100644 index 00000000000..a9fd6dfdffc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/creative-card.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2003 diff --git a/tests/cluecode/data/copyrights/misco4/linux2/define.txt b/tests/cluecode/data/copyrights/misco4/linux2/define.txt new file mode 100644 index 00000000000..2500c3e1f57 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/define.txt @@ -0,0 +1,2 @@ +#define COPYRIGHT "Copyright (c) 1999-2008 LSI Corporation" +#define MODULEAUTHOR "LSI Corporation" diff --git a/tests/cluecode/data/copyrights/misco4/linux2/define.txt.yml b/tests/cluecode/data/copyrights/misco4/linux2/define.txt.yml new file mode 100644 index 00000000000..69db5429809 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/define.txt.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999-2008 LSI Corporation +holders: + - LSI Corporation +authors: + - LSI Corporation diff --git a/tests/cluecode/data/copyrights/misco4/linux2/designer.txt b/tests/cluecode/data/copyrights/misco4/linux2/designer.txt new file mode 100644 index 00000000000..efbcbe65868 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/designer.txt @@ -0,0 +1,6 @@ + + + * Copyright (C) IBM Corporation, 2011-2015 + * + * Designer of the Power data compression engine: + * Bulent Abali diff --git a/tests/cluecode/data/copyrights/misco4/linux2/designer.txt.yml b/tests/cluecode/data/copyrights/misco4/linux2/designer.txt.yml new file mode 100644 index 00000000000..16cf13738c7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/designer.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) IBM Corporation, 2011-2015 Designer of the Power +holders: + - IBM Corporation, Designer of the Power diff --git a/tests/cluecode/data/copyrights/misco4/linux2/interface.txt b/tests/cluecode/data/copyrights/misco4/linux2/interface.txt new file mode 100644 index 00000000000..9620e524c70 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/interface.txt @@ -0,0 +1,3 @@ + + * Copyright IBM Corp. 2004, 2010 + * Interface implementation for communication with the z/VM control program diff --git a/tests/cluecode/data/copyrights/misco4/linux2/interface.txt.yml b/tests/cluecode/data/copyrights/misco4/linux2/interface.txt.yml new file mode 100644 index 00000000000..103fcedc0ae --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/interface.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright IBM Corp. 2004, 2010 +holders: + - IBM Corp. diff --git a/tests/cluecode/data/copyrights/misco4/linux2/interrupt.txt b/tests/cluecode/data/copyrights/misco4/linux2/interrupt.txt new file mode 100644 index 00000000000..258774dbd5f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/interrupt.txt @@ -0,0 +1,3 @@ + * usr/include/linux/lp.h c.1991-1992 James Wiegand + * many modifications copyright (C) 1992 Michael K. Johnson + * Interrupt support added 1993 Nigel Gamble diff --git a/tests/cluecode/data/copyrights/misco4/linux2/interrupt.txt.yml b/tests/cluecode/data/copyrights/misco4/linux2/interrupt.txt.yml new file mode 100644 index 00000000000..b24c95552ea --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/interrupt.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyright (c) 1992 Michael K. Johnson +holders: + - Michael K. Johnson diff --git a/tests/cluecode/data/copyrights/misco4/linux2/leading-x.txt b/tests/cluecode/data/copyrights/misco4/linux2/leading-x.txt new file mode 100644 index 00000000000..e3bc9af32a6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/leading-x.txt @@ -0,0 +1,3 @@ +X * +X * Copyright (C) 1998 Andrew Veliath +X * diff --git a/tests/cluecode/data/copyrights/misco4/linux2/leading-x.txt.yml b/tests/cluecode/data/copyrights/misco4/linux2/leading-x.txt.yml new file mode 100644 index 00000000000..4ec82e8b7d0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/leading-x.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998 Andrew Veliath X +holders: + - Andrew Veliath X diff --git a/tests/cluecode/data/copyrights/misco4/linux2/like-sta.txt b/tests/cluecode/data/copyrights/misco4/linux2/like-sta.txt new file mode 100644 index 00000000000..696530cb3c7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/like-sta.txt @@ -0,0 +1 @@ + * Ad-HoC(C): Like STA diff --git a/tests/cluecode/data/copyrights/misco4/linux2/like-sta.txt.yml b/tests/cluecode/data/copyrights/misco4/linux2/like-sta.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/like-sta.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/linux2/modauth.txt b/tests/cluecode/data/copyrights/misco4/linux2/modauth.txt new file mode 100644 index 00000000000..af7d7a2fc72 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/modauth.txt @@ -0,0 +1,8 @@ +#ifndef MODULEAUTHOR +#define MODULEAUTHOR "LSI Corporation" +#endif + +#ifndef COPYRIGHT +#define COPYRIGHT "Copyright (c) 1999-2008 " MODULEAUTHOR +#endif + diff --git a/tests/cluecode/data/copyrights/misco4/linux2/modauth.txt.yml b/tests/cluecode/data/copyrights/misco4/linux2/modauth.txt.yml new file mode 100644 index 00000000000..a21dcfa8b0a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/modauth.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999-2008 +authors: + - LSI Corporation diff --git a/tests/cluecode/data/copyrights/misco4/linux2/nebula.txt b/tests/cluecode/data/copyrights/misco4/linux2/nebula.txt new file mode 100644 index 00000000000..46e74cc60d6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/nebula.txt @@ -0,0 +1,3 @@ + +/* Old Nebula (marked (c)2003 on high profile pci card) has nxt6000 demod */ +/* New Nebula (marked (c)2005 on low profile pci card) has mt352 demod */ diff --git a/tests/cluecode/data/copyrights/misco4/linux2/nebula.txt.yml b/tests/cluecode/data/copyrights/misco4/linux2/nebula.txt.yml new file mode 100644 index 00000000000..8540550366c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/nebula.txt.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2003 + - (c) 2005 diff --git a/tests/cluecode/data/copyrights/misco4/linux2/tape.txt b/tests/cluecode/data/copyrights/misco4/linux2/tape.txt new file mode 100644 index 00000000000..4e4f8fb5321 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/tape.txt @@ -0,0 +1,3 @@ + * Copyright IBM Corp. 2004 + * + * Tape class device support diff --git a/tests/cluecode/data/copyrights/misco4/linux2/tape.txt.yml b/tests/cluecode/data/copyrights/misco4/linux2/tape.txt.yml new file mode 100644 index 00000000000..3f75cef1074 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/tape.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright IBM Corp. 2004 +holders: + - IBM Corp. diff --git a/tests/cluecode/data/copyrights/misco4/linux2/this-gpl.txt b/tests/cluecode/data/copyrights/misco4/linux2/this-gpl.txt new file mode 100644 index 00000000000..a907e2f3c57 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/this-gpl.txt @@ -0,0 +1,2 @@ + * Rusty Russell (C)2000 -- This code is GPL. + * Patrick McHardy (c) 2006-2012 diff --git a/tests/cluecode/data/copyrights/misco4/linux2/this-gpl.txt.yml b/tests/cluecode/data/copyrights/misco4/linux2/this-gpl.txt.yml new file mode 100644 index 00000000000..dd041c2fc13 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux2/this-gpl.txt.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Rusty Russell (c) 2000 + - Patrick McHardy (c) 2006-2012 +holders: + - Rusty Russell + - Patrick McHardy diff --git a/tests/cluecode/data/copyrights/misco4/linux3/mixed-years.txt b/tests/cluecode/data/copyrights/misco4/linux3/mixed-years.txt new file mode 100644 index 00000000000..8b6baa1e6cd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux3/mixed-years.txt @@ -0,0 +1 @@ + Copyright (C) 1999, 2000, 01, 03, 06 Ralf Baechle diff --git a/tests/cluecode/data/copyrights/misco4/linux3/mixed-years.txt.yml b/tests/cluecode/data/copyrights/misco4/linux3/mixed-years.txt.yml new file mode 100644 index 00000000000..85087a6da48 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux3/mixed-years.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999, 2000, 01, 03, 06 Ralf Baechle +holders: + - Ralf Baechle diff --git a/tests/cluecode/data/copyrights/misco4/linux3/pre-name.txt b/tests/cluecode/data/copyrights/misco4/linux3/pre-name.txt new file mode 100644 index 00000000000..bc2eb616d02 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux3/pre-name.txt @@ -0,0 +1,4 @@ + * Modified by Paul Mundt (c) 2004 to support + * dynamic variables. + * + * Modified by Vladimir Oleynik (c) 2001-2005 to be diff --git a/tests/cluecode/data/copyrights/misco4/linux3/pre-name.txt.yml b/tests/cluecode/data/copyrights/misco4/linux3/pre-name.txt.yml new file mode 100644 index 00000000000..60c22056020 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux3/pre-name.txt.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Paul Mundt (c) 2004 + - Vladimir Oleynik (c) 2001-2005 +holders: + - Paul Mundt + - Vladimir Oleynik diff --git a/tests/cluecode/data/copyrights/misco4/linux3/rewrited.txt b/tests/cluecode/data/copyrights/misco4/linux3/rewrited.txt new file mode 100644 index 00000000000..fca6afc14bb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux3/rewrited.txt @@ -0,0 +1,3 @@ + * Russ Dill 2001-2003 + * Rewrited by Vladimir Oleynik (C) 2003 + diff --git a/tests/cluecode/data/copyrights/misco4/linux3/rewrited.txt.yml b/tests/cluecode/data/copyrights/misco4/linux3/rewrited.txt.yml new file mode 100644 index 00000000000..8a592472689 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux3/rewrited.txt.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Russ Dill 2001-2003 Rewrited by Vladimir Oleynik (c) + 2003 +holders: + - Russ Dill Rewrited by Vladimir Oleynik diff --git a/tests/cluecode/data/copyrights/misco4/linux3/russian.txt b/tests/cluecode/data/copyrights/misco4/linux3/russian.txt new file mode 100644 index 00000000000..6d7e4c32810 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux3/russian.txt @@ -0,0 +1,3 @@ +developed by the Center for Information +Protection and Special Communications of the Federal Security +Service of the Russian Federation diff --git a/tests/cluecode/data/copyrights/misco4/linux3/russian.txt.yml b/tests/cluecode/data/copyrights/misco4/linux3/russian.txt.yml new file mode 100644 index 00000000000..446aab7a5e8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux3/russian.txt.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders + - authors +authors: + - the Center for Information Protection and Special Communications of the Federal Security + Service of the Russian Federation diff --git a/tests/cluecode/data/copyrights/misco4/linux3/todo.txt b/tests/cluecode/data/copyrights/misco4/linux3/todo.txt new file mode 100644 index 00000000000..e7830697e61 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux3/todo.txt @@ -0,0 +1,2 @@ +(c) Page i/o: +Todo/Under discussion: diff --git a/tests/cluecode/data/copyrights/misco4/linux3/todo.txt.yml b/tests/cluecode/data/copyrights/misco4/linux3/todo.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux3/todo.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/linux3/vrup.txt b/tests/cluecode/data/copyrights/misco4/linux3/vrup.txt new file mode 100644 index 00000000000..caad1852bd3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux3/vrup.txt @@ -0,0 +1,3 @@ +updated year in copyright + +2008-01-26 11:46 vruppert diff --git a/tests/cluecode/data/copyrights/misco4/linux3/vrup.txt.yml b/tests/cluecode/data/copyrights/misco4/linux3/vrup.txt.yml new file mode 100644 index 00000000000..152dd9a5cd6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux3/vrup.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyright 2008-01-26 11:46 vruppert +holders: + - vruppert diff --git a/tests/cluecode/data/copyrights/misco4/linux4/BY.txt b/tests/cluecode/data/copyrights/misco4/linux4/BY.txt new file mode 100644 index 00000000000..b14dafd20b2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/BY.txt @@ -0,0 +1 @@ +MediaTek Inc. (c) 2008 BY OPENING diff --git a/tests/cluecode/data/copyrights/misco4/linux4/BY.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/BY.txt.yml new file mode 100644 index 00000000000..6ca3bb157d3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/BY.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - MediaTek Inc. (c) 2008 +holders: + - MediaTek Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux4/capture.txt b/tests/cluecode/data/copyrights/misco4/linux4/capture.txt new file mode 100644 index 00000000000..30258993046 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/capture.txt @@ -0,0 +1,6 @@ + 0.0.16 + Modified Copyright message. + 0.0.17 + Implement Mic and Line in Capture. + 0.0.18 + diff --git a/tests/cluecode/data/copyrights/misco4/linux4/capture.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/capture.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/capture.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/linux4/dev-by.txt b/tests/cluecode/data/copyrights/misco4/linux4/dev-by.txt new file mode 100644 index 00000000000..2bdb27767a8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/dev-by.txt @@ -0,0 +1,4 @@ +Developed by: + + LLVM Team + diff --git a/tests/cluecode/data/copyrights/misco4/linux4/dev-by.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/dev-by.txt.yml new file mode 100644 index 00000000000..8720ee8b3a3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/dev-by.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - LLVM Team diff --git a/tests/cluecode/data/copyrights/misco4/linux4/king.txt b/tests/cluecode/data/copyrights/misco4/linux4/king.txt new file mode 100644 index 00000000000..be6763a8c52 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/king.txt @@ -0,0 +1,2 @@ +* Copyright (C) 1997-2002 Russell king + diff --git a/tests/cluecode/data/copyrights/misco4/linux4/king.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/king.txt.yml new file mode 100644 index 00000000000..34044af7b56 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/king.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1997-2002 Russell king +holders: + - Russell king diff --git a/tests/cluecode/data/copyrights/misco4/linux4/lf.txt b/tests/cluecode/data/copyrights/misco4/linux4/lf.txt new file mode 100644 index 00000000000..b0ae34e608b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/lf.txt @@ -0,0 +1,2 @@ + * (C) Linux Foundation 2008-2013 + * Unified interface for all slab allocators diff --git a/tests/cluecode/data/copyrights/misco4/linux4/lf.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/lf.txt.yml new file mode 100644 index 00000000000..8f987161109 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/lf.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Linux Foundation 2008-2013 +holders: + - Linux Foundation diff --git a/tests/cluecode/data/copyrights/misco4/linux4/lineo.txt b/tests/cluecode/data/copyrights/misco4/linux4/lineo.txt new file mode 100644 index 00000000000..a5feb601193 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/lineo.txt @@ -0,0 +1,2 @@ + * Copyright (C) 2002 SnapGear, by Paul Dale + * Copyright (C) 2000, 2001 Lineo, by David McCullough diff --git a/tests/cluecode/data/copyrights/misco4/linux4/lineo.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/lineo.txt.yml new file mode 100644 index 00000000000..18d6d7aa47c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/lineo.txt.yml @@ -0,0 +1,13 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2002 SnapGear + - Copyright (c) 2000, 2001 Lineo +holders: + - SnapGear + - Lineo +authors: + - Paul Dale + - David McCullough diff --git a/tests/cluecode/data/copyrights/misco4/linux4/missing.txt b/tests/cluecode/data/copyrights/misco4/linux4/missing.txt new file mode 100644 index 00000000000..959eb248af7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/missing.txt @@ -0,0 +1,3 @@ + + * (C) SGI 2006, Christoph Lameter + * Cleaned up diff --git a/tests/cluecode/data/copyrights/misco4/linux4/missing.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/missing.txt.yml new file mode 100644 index 00000000000..30fe2755b20 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/missing.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) SGI 2006, Christoph Lameter +holders: + - SGI Christoph Lameter diff --git a/tests/cluecode/data/copyrights/misco4/linux4/multilines.txt b/tests/cluecode/data/copyrights/misco4/linux4/multilines.txt new file mode 100644 index 00000000000..f0d22994428 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/multilines.txt @@ -0,0 +1,3 @@ + written by Philip Hazel, and copyright + +by the University of Cambridge, England. diff --git a/tests/cluecode/data/copyrights/misco4/linux4/multilines.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/multilines.txt.yml new file mode 100644 index 00000000000..b5c3aa73c6c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/multilines.txt.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyright by the University of Cambridge, England +holders: + - the University of Cambridge, England +authors: + - Philip Hazel diff --git a/tests/cluecode/data/copyrights/misco4/linux4/nsa.txt b/tests/cluecode/data/copyrights/misco4/linux4/nsa.txt new file mode 100644 index 00000000000..a9045c26473 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/nsa.txt @@ -0,0 +1,8 @@ + Written 1993-2000 by Donald Becker. + + Copyright 1994-2000 by Donald Becker. + Copyright 1993 United States Government as represented by the + Director, National Security Agency. This software may be used and + distributed according to the terms of the GNU General Public License, + incorporated herein by reference. + diff --git a/tests/cluecode/data/copyrights/misco4/linux4/nsa.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/nsa.txt.yml new file mode 100644 index 00000000000..9f86769f807 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/nsa.txt.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1994-2000 by Donald Becker + - Copyright 1993 United States Government +holders: + - Donald Becker + - United States Government diff --git a/tests/cluecode/data/copyrights/misco4/linux4/regul.txt b/tests/cluecode/data/copyrights/misco4/linux4/regul.txt new file mode 100644 index 00000000000..3b9b03237a8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/regul.txt @@ -0,0 +1,2 @@ +the Copyright (Computer Programs) Regulations 1992 (S.I. 1992 No.3233). + diff --git a/tests/cluecode/data/copyrights/misco4/linux4/regul.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/regul.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/regul.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/linux4/send.txt b/tests/cluecode/data/copyrights/misco4/linux4/send.txt new file mode 100644 index 00000000000..80a594d2399 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/send.txt @@ -0,0 +1,3 @@ + * Windows95/Windows NT compatible extended MSDOS filesystem + * by Gordon Chaffee Copyright (C) 1995. Send bug reports for the + * VFAT filesystem to . diff --git a/tests/cluecode/data/copyrights/misco4/linux4/send.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/send.txt.yml new file mode 100644 index 00000000000..0064e5217d3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/send.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Gordon Chaffee Copyright (c) 1995 +holders: + - Gordon Chaffee diff --git a/tests/cluecode/data/copyrights/misco4/linux4/sgi.txt b/tests/cluecode/data/copyrights/misco4/linux4/sgi.txt new file mode 100644 index 00000000000..7a242ae572e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/sgi.txt @@ -0,0 +1,2 @@ +* Copyright (C) September 18, 2008 Silicon Graphics, Inc. All Rights Reserved. + diff --git a/tests/cluecode/data/copyrights/misco4/linux4/sgi.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/sgi.txt.yml new file mode 100644 index 00000000000..f87624036ff --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/sgi.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) September 18, 2008 Silicon Graphics, Inc. +holders: + - September Silicon Graphics, Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux4/solar.txt b/tests/cluecode/data/copyrights/misco4/linux4/solar.txt new file mode 100644 index 00000000000..e103a6ad837 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/solar.txt @@ -0,0 +1 @@ +Copyright (c) 1998-2011 Solar Designer diff --git a/tests/cluecode/data/copyrights/misco4/linux4/solar.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/solar.txt.yml new file mode 100644 index 00000000000..934cb5d2210 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/solar.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1998-2011 Solar Designer +holders: + - Solar Designer diff --git a/tests/cluecode/data/copyrights/misco4/linux4/transla.txt b/tests/cluecode/data/copyrights/misco4/linux4/transla.txt new file mode 100644 index 00000000000..bbf5ca3283b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/transla.txt @@ -0,0 +1,3 @@ +Translated Copyright Man Page + +The copyrights of all translated diff --git a/tests/cluecode/data/copyrights/misco4/linux4/transla.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/transla.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/transla.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/linux4/valinux.txt b/tests/cluecode/data/copyrights/misco4/linux4/valinux.txt new file mode 100644 index 00000000000..d1f7c131ef6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/valinux.txt @@ -0,0 +1 @@ + * Copyright (C) 1999-2000 VA Linux Systems diff --git a/tests/cluecode/data/copyrights/misco4/linux4/valinux.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/valinux.txt.yml new file mode 100644 index 00000000000..b3acfa03af1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/valinux.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1999-2000 VA Linux Systems +holders: + - VA Linux Systems diff --git a/tests/cluecode/data/copyrights/misco4/linux4/venky.txt b/tests/cluecode/data/copyrights/misco4/linux4/venky.txt new file mode 100644 index 00000000000..a88ee7e6ef5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/venky.txt @@ -0,0 +1,2 @@ +Copyright(C) 2004 Venky Raju(dev@venky.ws) + diff --git a/tests/cluecode/data/copyrights/misco4/linux4/venky.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/venky.txt.yml new file mode 100644 index 00000000000..e7dda6af1c5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/venky.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2004 Venky Raju(dev@venky.ws) +holders: + - Venky diff --git a/tests/cluecode/data/copyrights/misco4/linux4/wing.txt b/tests/cluecode/data/copyrights/misco4/linux4/wing.txt new file mode 100644 index 00000000000..fad9005516d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/wing.txt @@ -0,0 +1,2 @@ + * Copyright (C) 2009 Wing Linux + diff --git a/tests/cluecode/data/copyrights/misco4/linux4/wing.txt.yml b/tests/cluecode/data/copyrights/misco4/linux4/wing.txt.yml new file mode 100644 index 00000000000..396534f2909 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux4/wing.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2009 Wing Linux +holders: + - Wing Linux diff --git a/tests/cluecode/data/copyrights/misco4/linux5/linux-found.txt b/tests/cluecode/data/copyrights/misco4/linux5/linux-found.txt new file mode 100644 index 00000000000..400c7245c0e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux5/linux-found.txt @@ -0,0 +1 @@ +Copyright (c) 2007, 2010 Linux Foundation diff --git a/tests/cluecode/data/copyrights/misco4/linux5/linux-found.txt.yml b/tests/cluecode/data/copyrights/misco4/linux5/linux-found.txt.yml new file mode 100644 index 00000000000..0f7a3d12043 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux5/linux-found.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2007, 2010 Linux Foundation +holders: + - Linux Foundation diff --git a/tests/cluecode/data/copyrights/misco4/linux5/suse.txt b/tests/cluecode/data/copyrights/misco4/linux5/suse.txt new file mode 100644 index 00000000000..05941b4eb3e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux5/suse.txt @@ -0,0 +1,2 @@ +Copyright (c) 2004 SuSE Linux AG, Nuernberg, Germany + diff --git a/tests/cluecode/data/copyrights/misco4/linux5/suse.txt.yml b/tests/cluecode/data/copyrights/misco4/linux5/suse.txt.yml new file mode 100644 index 00000000000..91e690d2b38 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux5/suse.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2004 SuSE Linux AG, Nuernberg, Germany +holders: + - SuSE Linux AG, Nuernberg, Germany diff --git a/tests/cluecode/data/copyrights/misco4/linux5/suseag.txt b/tests/cluecode/data/copyrights/misco4/linux5/suseag.txt new file mode 100644 index 00000000000..2d198001470 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux5/suseag.txt @@ -0,0 +1 @@ +Copyright (c) 2003, 2006 SuSE Linux AG. diff --git a/tests/cluecode/data/copyrights/misco4/linux5/suseag.txt.yml b/tests/cluecode/data/copyrights/misco4/linux5/suseag.txt.yml new file mode 100644 index 00000000000..d8278e5bcf4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux5/suseag.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2003, 2006 SuSE Linux AG. +holders: + - SuSE Linux AG. diff --git a/tests/cluecode/data/copyrights/misco4/linux5/susecaps.txt b/tests/cluecode/data/copyrights/misco4/linux5/susecaps.txt new file mode 100644 index 00000000000..ffcbf2603fe --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux5/susecaps.txt @@ -0,0 +1,4 @@ + Copyright 2002, 2003, 2004 SuSE Linux AG, Germany + Copyright 2005, 2008, 2009 2011 SUSE LINUX Products GmbH, Germany + Copyright 2015 Björn Esser + diff --git a/tests/cluecode/data/copyrights/misco4/linux5/susecaps.txt.yml b/tests/cluecode/data/copyrights/misco4/linux5/susecaps.txt.yml new file mode 100644 index 00000000000..76c75073446 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux5/susecaps.txt.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2002, 2003, 2004 SuSE Linux AG, Germany + - Copyright 2005, 2008, 2009 2011 SUSE LINUX Products GmbH, Germany + - Copyright 2015 Bjorn Esser +holders: + - SuSE Linux AG, Germany + - SUSE LINUX Products GmbH, Germany + - Bjorn Esser diff --git a/tests/cluecode/data/copyrights/misco4/linux6/auth.txt b/tests/cluecode/data/copyrights/misco4/linux6/auth.txt new file mode 100644 index 00000000000..f26f7952e32 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/auth.txt @@ -0,0 +1,2 @@ +/* Author: John Doe, 7/2000 */ + diff --git a/tests/cluecode/data/copyrights/misco4/linux6/auth.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/auth.txt.yml new file mode 100644 index 00000000000..a9cdbb0796c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/auth.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - John Doe diff --git a/tests/cluecode/data/copyrights/misco4/linux6/cp2.txt b/tests/cluecode/data/copyrights/misco4/linux6/cp2.txt new file mode 100644 index 00000000000..63c10207404 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/cp2.txt @@ -0,0 +1 @@ +Copyright 2009-2010 Creative Product Design diff --git a/tests/cluecode/data/copyrights/misco4/linux6/cp2.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/cp2.txt.yml new file mode 100644 index 00000000000..d227a37d4b9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/cp2.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2009-2010 Creative Product Design +holders: + - Creative Product Design diff --git a/tests/cluecode/data/copyrights/misco4/linux6/cpd.txt b/tests/cluecode/data/copyrights/misco4/linux6/cpd.txt new file mode 100644 index 00000000000..517cba9bb86 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/cpd.txt @@ -0,0 +1,4 @@ +Copyright 2009-2010 Creative Product Design +Marc Reilly marc@cpdesign.com.au + + diff --git a/tests/cluecode/data/copyrights/misco4/linux6/cpd.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/cpd.txt.yml new file mode 100644 index 00000000000..1fc64ca57e3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/cpd.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2009-2010 Creative Product Design Marc Reilly marc@cpdesign.com.au +holders: + - Creative Product Design Marc Reilly diff --git a/tests/cluecode/data/copyrights/misco4/linux6/czech.txt b/tests/cluecode/data/copyrights/misco4/linux6/czech.txt new file mode 100644 index 00000000000..72883f19055 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/czech.txt @@ -0,0 +1,2 @@ +* Copyright: (c) 2014 Czech Technical University in Prague + * (c) 2014 Volkswagen Group Research diff --git a/tests/cluecode/data/copyrights/misco4/linux6/czech.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/czech.txt.yml new file mode 100644 index 00000000000..b6939ea4c59 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/czech.txt.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2014 Czech Technical University in Prague + - (c) 2014 Volkswagen Group Research +holders: + - Czech Technical University in Prague + - Volkswagen Group Research diff --git a/tests/cluecode/data/copyrights/misco4/linux6/gdth.txt b/tests/cluecode/data/copyrights/misco4/linux6/gdth.txt new file mode 100644 index 00000000000..f656d2208b9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/gdth.txt @@ -0,0 +1 @@ +Copyright (C) 1995-06 ICP vortex, Achim Leubner diff --git a/tests/cluecode/data/copyrights/misco4/linux6/gdth.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/gdth.txt.yml new file mode 100644 index 00000000000..583ce4eba15 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/gdth.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1995-06 ICP vortex, Achim Leubner +holders: + - ICP vortex, Achim Leubner diff --git a/tests/cluecode/data/copyrights/misco4/linux6/malek.txt b/tests/cluecode/data/copyrights/misco4/linux6/malek.txt new file mode 100644 index 00000000000..8da4eb9ee46 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/malek.txt @@ -0,0 +1,3 @@ + * Copyright (c) 1997 Dan error_act (dmalek@jlc.net) + * Copyright (c) 1999-2001 Dan Malek + diff --git a/tests/cluecode/data/copyrights/misco4/linux6/malek.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/malek.txt.yml new file mode 100644 index 00000000000..69b41272793 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/malek.txt.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1997 Dan error_act (dmalek@jlc.net) + - Copyright (c) 1999-2001 Dan Malek +holders: + - Dan error_act + - Dan Malek diff --git a/tests/cluecode/data/copyrights/misco4/linux6/megg.txt b/tests/cluecode/data/copyrights/misco4/linux6/megg.txt new file mode 100644 index 00000000000..5e20e5cd93f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/megg.txt @@ -0,0 +1,2 @@ +David Megginson, david@megginson.com +2000-05-05 diff --git a/tests/cluecode/data/copyrights/misco4/linux6/megg.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/megg.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/megg.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/linux6/mis.txt b/tests/cluecode/data/copyrights/misco4/linux6/mis.txt new file mode 100644 index 00000000000..75209db22cb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/mis.txt @@ -0,0 +1,11 @@ +Missing data: + * Copyright (C) 2005-2012 Jean Delvare + * Copyright (C) 2006 Yuan Mu (Winbond), + * Rudolf Marek + * David Hubbard + * Daniel J Blueman + * Copyright (C) 2010 Sheng-Yuan Huang (Nuvoton) (PS00) + * + * Shamelessly ripped from the w83627hf driver + * Copyright (C) 2003 Mark Studebaker + diff --git a/tests/cluecode/data/copyrights/misco4/linux6/mis.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/mis.txt.yml new file mode 100644 index 00000000000..7417d78da55 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/mis.txt.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005-2012 Jean Delvare + - Copyright (c) 2006 Yuan Mu (Winbond), Rudolf Marek David Hubbard + Daniel J Blueman + - Copyright (c) 2010 Sheng-Yuan Huang + - Copyright (c) 2003 Mark Studebaker +holders: + - Jean Delvare + - Yuan Mu (Winbond), Rudolf Marek David Hubbard Daniel J Blueman + - Sheng-Yuan Huang + - Mark Studebaker diff --git a/tests/cluecode/data/copyrights/misco4/linux6/opyleft.txt b/tests/cluecode/data/copyrights/misco4/linux6/opyleft.txt new file mode 100644 index 00000000000..05ae812a62f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/opyleft.txt @@ -0,0 +1,9 @@ +//opylefted by <-Harvie 2oo7 + + + + + + +"c'opylefted' libre-software. + diff --git a/tests/cluecode/data/copyrights/misco4/linux6/opyleft.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/opyleft.txt.yml new file mode 100644 index 00000000000..7f87cc4b85f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/opyleft.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - opylefted by -Harvie 2oo7 +holders: + - Harvie 2oo7 diff --git a/tests/cluecode/data/copyrights/misco4/linux6/py.txt b/tests/cluecode/data/copyrights/misco4/linux6/py.txt new file mode 100644 index 00000000000..c4bc0a42a43 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/py.txt @@ -0,0 +1,9 @@ +__author__ = "Avinash Kak (kak@purdue.edu)" + + + + + + + Author: Avinash Kak (kak@purdue.edu) + diff --git a/tests/cluecode/data/copyrights/misco4/linux6/py.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/py.txt.yml new file mode 100644 index 00000000000..309df75fa49 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/py.txt.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders + - authors +authors: + - Avinash Kak (kak@purdue.edu) + - Avinash Kak (kak@purdue.edu) diff --git a/tests/cluecode/data/copyrights/misco4/linux6/rhi.txt b/tests/cluecode/data/copyrights/misco4/linux6/rhi.txt new file mode 100644 index 00000000000..5560423ac9b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/rhi.txt @@ -0,0 +1 @@ + * Copyright (C) 2009 Eric Paris diff --git a/tests/cluecode/data/copyrights/misco4/linux6/rhi.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/rhi.txt.yml new file mode 100644 index 00000000000..d6d4bc8675e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/rhi.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2009 Eric Paris Red Hat Inc +holders: + - Eric Paris Red Hat Inc diff --git a/tests/cluecode/data/copyrights/misco4/linux6/ricoh.txt b/tests/cluecode/data/copyrights/misco4/linux6/ricoh.txt new file mode 100644 index 00000000000..c5a33653034 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/ricoh.txt @@ -0,0 +1 @@ +Copyright (C) 2011 RICOH COMPANY,LTD diff --git a/tests/cluecode/data/copyrights/misco4/linux6/ricoh.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/ricoh.txt.yml new file mode 100644 index 00000000000..80fe19c66e1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/ricoh.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2011 RICOH COMPANY,LTD +holders: + - RICOH COMPANY,LTD diff --git a/tests/cluecode/data/copyrights/misco4/linux6/sprl.txt b/tests/cluecode/data/copyrights/misco4/linux6/sprl.txt new file mode 100644 index 00000000000..73eed9ad094 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/sprl.txt @@ -0,0 +1 @@ +Copyright (C) 2013 Ideas on board SPRL diff --git a/tests/cluecode/data/copyrights/misco4/linux6/sprl.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/sprl.txt.yml new file mode 100644 index 00000000000..a649c246c4c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/sprl.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2013 Ideas on board SPRL +holders: + - Ideas on board SPRL diff --git a/tests/cluecode/data/copyrights/misco4/linux6/srl.txt b/tests/cluecode/data/copyrights/misco4/linux6/srl.txt new file mode 100644 index 00000000000..af7fe2e48ef --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/srl.txt @@ -0,0 +1,6 @@ +© 2005 Eptar srl + + + + +Copyright (C) 2007 Eurek srl diff --git a/tests/cluecode/data/copyrights/misco4/linux6/srl.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/srl.txt.yml new file mode 100644 index 00000000000..a228b3730bf --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/srl.txt.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2005 Eptar srl + - Copyright (c) 2007 Eurek srl +holders: + - Eptar srl + - Eurek srl diff --git a/tests/cluecode/data/copyrights/misco4/linux6/tex.txt b/tests/cluecode/data/copyrights/misco4/linux6/tex.txt new file mode 100644 index 00000000000..422f133b023 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/tex.txt @@ -0,0 +1 @@ +maintained by the Debian TeX Task Force . diff --git a/tests/cluecode/data/copyrights/misco4/linux6/tex.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/tex.txt.yml new file mode 100644 index 00000000000..f7cd3b976fc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/tex.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - the Debian TeX Task Force diff --git a/tests/cluecode/data/copyrights/misco4/linux6/wu.txt b/tests/cluecode/data/copyrights/misco4/linux6/wu.txt new file mode 100644 index 00000000000..485015bab3c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/wu.txt @@ -0,0 +1,5 @@ +Copyright (C) 2006 Yuan Mu (Winbond), + Rudolf Marek + David Hubbard + Daniel J Blueman + diff --git a/tests/cluecode/data/copyrights/misco4/linux6/wu.txt.yml b/tests/cluecode/data/copyrights/misco4/linux6/wu.txt.yml new file mode 100644 index 00000000000..12f30ffe4f2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux6/wu.txt.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2006 Yuan Mu (Winbond), Rudolf Marek David Hubbard + Daniel J Blueman +holders: + - Yuan Mu (Winbond), Rudolf Marek David Hubbard Daniel J Blueman diff --git a/tests/cluecode/data/copyrights/misco4/linux7/auth-start.txt b/tests/cluecode/data/copyrights/misco4/linux7/auth-start.txt new file mode 100644 index 00000000000..da787fc1538 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux7/auth-start.txt @@ -0,0 +1,3 @@ + * This product includes software developed by the University of + * California, Berkeley and its contributors. + diff --git a/tests/cluecode/data/copyrights/misco4/linux7/auth-start.txt.yml b/tests/cluecode/data/copyrights/misco4/linux7/auth-start.txt.yml new file mode 100644 index 00000000000..745861fc17d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux7/auth-start.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - the University of California, Berkeley and its contributors diff --git a/tests/cluecode/data/copyrights/misco4/linux7/deb.txt b/tests/cluecode/data/copyrights/misco4/linux7/deb.txt new file mode 100644 index 00000000000..a21d720820e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux7/deb.txt @@ -0,0 +1 @@ +Parts Copyright (c) 1992 Uri Blumenthal, IBM diff --git a/tests/cluecode/data/copyrights/misco4/linux7/deb.txt.yml b/tests/cluecode/data/copyrights/misco4/linux7/deb.txt.yml new file mode 100644 index 00000000000..29effe6bd25 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux7/deb.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Parts Copyright (c) 1992 Uri Blumenthal, IBM +holders: + - Uri Blumenthal, IBM diff --git a/tests/cluecode/data/copyrights/misco4/linux7/hamburg.txt b/tests/cluecode/data/copyrights/misco4/linux7/hamburg.txt new file mode 100644 index 00000000000..90faad1ba61 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux7/hamburg.txt @@ -0,0 +1 @@ +Copyright (C) 1996, Lars Fenneberg diff --git a/tests/cluecode/data/copyrights/misco4/linux7/hamburg.txt.yml b/tests/cluecode/data/copyrights/misco4/linux7/hamburg.txt.yml new file mode 100644 index 00000000000..2e4d43b1ec1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux7/hamburg.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1996, Lars Fenneberg +holders: + - Lars Fenneberg diff --git a/tests/cluecode/data/copyrights/misco4/linux7/name-before.txt b/tests/cluecode/data/copyrights/misco4/linux7/name-before.txt new file mode 100644 index 00000000000..f7964dbd291 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux7/name-before.txt @@ -0,0 +1,2 @@ + * Russ Dill 2001-2003 + * Rewrited by Vladimir Oleynik (C) 2003 diff --git a/tests/cluecode/data/copyrights/misco4/linux7/name-before.txt.yml b/tests/cluecode/data/copyrights/misco4/linux7/name-before.txt.yml new file mode 100644 index 00000000000..8a592472689 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux7/name-before.txt.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Russ Dill 2001-2003 Rewrited by Vladimir Oleynik (c) + 2003 +holders: + - Russ Dill Rewrited by Vladimir Oleynik diff --git a/tests/cluecode/data/copyrights/misco4/linux7/worldwide.txt b/tests/cluecode/data/copyrights/misco4/linux7/worldwide.txt new file mode 100644 index 00000000000..a8f1fe3809d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux7/worldwide.txt @@ -0,0 +1,12 @@ +Copyright: + +Copyright 1998 - 2008 Double Precision, Inc. + +This software is released under the GPL, version 3. +Additionally, compiling, linking, and/or using the OpenSSL toolkit in +conjunction with this software is allowed. + +A copy of the GNU General Public License is available as +/usr/share/common-licenses/GPL-3 in the Debian GNU/Linux distribution or on the +World Wide Web at http://www.gnu.org/copyleft/gpl.html. You can also + diff --git a/tests/cluecode/data/copyrights/misco4/linux7/worldwide.txt.yml b/tests/cluecode/data/copyrights/misco4/linux7/worldwide.txt.yml new file mode 100644 index 00000000000..061a1dd1bd2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux7/worldwide.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 1998 - 2008 Double Precision, Inc. +holders: + - Double Precision, Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux8/comp.txt b/tests/cluecode/data/copyrights/misco4/linux8/comp.txt new file mode 100644 index 00000000000..e82228501b7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux8/comp.txt @@ -0,0 +1,4 @@ + * Copyright (C) 2011 - 2012 Michal Simek + * Copyright (c) 2012 Wind River Systems, Inc. + * Copyright (C) 2013 Pengutronix e.K. + * Copyright (C) 2013 Xilinx Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux8/comp.txt.yml b/tests/cluecode/data/copyrights/misco4/linux8/comp.txt.yml new file mode 100644 index 00000000000..9af1bbf62e4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux8/comp.txt.yml @@ -0,0 +1,14 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2011 - 2012 Michal Simek + - Copyright (c) 2012 Wind River Systems, Inc. + - Copyright (c) 2013 Pengutronix e.K. + - Copyright (c) 2013 Xilinx Inc. +holders: + - Michal Simek + - Wind River Systems, Inc. + - Pengutronix e.K. + - Xilinx Inc. diff --git a/tests/cluecode/data/copyrights/misco4/linux8/du.txt b/tests/cluecode/data/copyrights/misco4/linux8/du.txt new file mode 100644 index 00000000000..85c44459185 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux8/du.txt @@ -0,0 +1,2 @@ + + Copyright (c) 2008 Alek Du diff --git a/tests/cluecode/data/copyrights/misco4/linux8/du.txt.yml b/tests/cluecode/data/copyrights/misco4/linux8/du.txt.yml new file mode 100644 index 00000000000..86584bde442 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux8/du.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008 Alek Du +holders: + - Alek Du diff --git a/tests/cluecode/data/copyrights/misco4/linux8/insert-year.txt b/tests/cluecode/data/copyrights/misco4/linux8/insert-year.txt new file mode 100644 index 00000000000..c73f346581b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux8/insert-year.txt @@ -0,0 +1 @@ +Copyright (c) IETF Trust diff --git a/tests/cluecode/data/copyrights/misco4/linux8/insert-year.txt.yml b/tests/cluecode/data/copyrights/misco4/linux8/insert-year.txt.yml new file mode 100644 index 00000000000..156e02c2fbc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux8/insert-year.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) IETF Trust +holders: + - IETF Trust diff --git a/tests/cluecode/data/copyrights/misco4/linux8/jdom.txt b/tests/cluecode/data/copyrights/misco4/linux8/jdom.txt new file mode 100644 index 00000000000..caa8213824a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux8/jdom.txt @@ -0,0 +1,2 @@ +created by Jason Hunter and +Brett McLaughlin . diff --git a/tests/cluecode/data/copyrights/misco4/linux8/jdom.txt.yml b/tests/cluecode/data/copyrights/misco4/linux8/jdom.txt.yml new file mode 100644 index 00000000000..f13b4434c08 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux8/jdom.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - Jason Hunter and Brett McLaughlin diff --git a/tests/cluecode/data/copyrights/misco4/linux8/jdom2.txt b/tests/cluecode/data/copyrights/misco4/linux8/jdom2.txt new file mode 100644 index 00000000000..8d4f737bf0f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux8/jdom2.txt @@ -0,0 +1 @@ +created by Jason Hunter diff --git a/tests/cluecode/data/copyrights/misco4/linux8/jdom2.txt.yml b/tests/cluecode/data/copyrights/misco4/linux8/jdom2.txt.yml new file mode 100644 index 00000000000..4802134bf63 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux8/jdom2.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - Jason Hunter jhunter AT jdom DOT org diff --git a/tests/cluecode/data/copyrights/misco4/linux8/jdom3.txt b/tests/cluecode/data/copyrights/misco4/linux8/jdom3.txt new file mode 100644 index 00000000000..7f7dfaffe56 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux8/jdom3.txt @@ -0,0 +1 @@ +created by Jason Hunter jhunter AT jdom DOT org diff --git a/tests/cluecode/data/copyrights/misco4/linux8/jdom3.txt.yml b/tests/cluecode/data/copyrights/misco4/linux8/jdom3.txt.yml new file mode 100644 index 00000000000..4802134bf63 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux8/jdom3.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - Jason Hunter jhunter AT jdom DOT org diff --git a/tests/cluecode/data/copyrights/misco4/linux9/complex-html.txt b/tests/cluecode/data/copyrights/misco4/linux9/complex-html.txt new file mode 100644 index 00000000000..7740eda191e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux9/complex-html.txt @@ -0,0 +1,2 @@ + Copyright (c) 2001 Karl Garrison + diff --git a/tests/cluecode/data/copyrights/misco4/linux9/complex-html.txt.yml b/tests/cluecode/data/copyrights/misco4/linux9/complex-html.txt.yml new file mode 100644 index 00000000000..3dc960911f0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux9/complex-html.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001 Karl Garrison (karl AT indy.rr.com) +holders: + - Karl Garrison diff --git a/tests/cluecode/data/copyrights/misco4/linux9/karl-at.txt b/tests/cluecode/data/copyrights/misco4/linux9/karl-at.txt new file mode 100644 index 00000000000..18bed202d3a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux9/karl-at.txt @@ -0,0 +1 @@ +Copyright (c) 2001 Karl Garrison (karl AT indy.rr.com) diff --git a/tests/cluecode/data/copyrights/misco4/linux9/karl-at.txt.yml b/tests/cluecode/data/copyrights/misco4/linux9/karl-at.txt.yml new file mode 100644 index 00000000000..3dc960911f0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/linux9/karl-at.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2001 Karl Garrison (karl AT indy.rr.com) +holders: + - Karl Garrison diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/aan.txt b/tests/cluecode/data/copyrights/misco4/more-linux/aan.txt new file mode 100644 index 00000000000..6e558ae47c9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/aan.txt @@ -0,0 +1 @@ +Copyright 2016 Tom aan de Wiel diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/aan.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/aan.txt.yml new file mode 100644 index 00000000000..174abf1039a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/aan.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2016 Tom aan de Wiel +holders: + - Tom aan de Wiel diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/auth-nl.txt b/tests/cluecode/data/copyrights/misco4/more-linux/auth-nl.txt new file mode 100644 index 00000000000..6d5c9ad2e19 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/auth-nl.txt @@ -0,0 +1,3 @@ +* Copyright (C) 2016-2018 +* Author: Matt Ranostay + diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/auth-nl.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/auth-nl.txt.yml new file mode 100644 index 00000000000..f5f60c19606 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/auth-nl.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2016-2018 Author Matt Ranostay +holders: + - Matt Ranostay diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/ben.txt b/tests/cluecode/data/copyrights/misco4/more-linux/ben.txt new file mode 100644 index 00000000000..ac4669ca88a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/ben.txt @@ -0,0 +1 @@ +Copyright 2010 Ben Dooks fluff.org> diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/ben.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/ben.txt.yml new file mode 100644 index 00000000000..cdb7986e334 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/ben.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2010 Ben Dooks ben-linux fluff.org +holders: + - Ben Dooks ben-linux fluff.org diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/connex.txt b/tests/cluecode/data/copyrights/misco4/more-linux/connex.txt new file mode 100644 index 00000000000..b3a66eceb19 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/connex.txt @@ -0,0 +1,3 @@ + Copyright (C) 2008 + Based on em28xx driver + diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/connex.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/connex.txt.yml new file mode 100644 index 00000000000..18adc919497 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/connex.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2008 srinivasa.deevi at conexant dot com +holders: + - srinivasa.deevi at conexant dot com diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/debug.txt b/tests/cluecode/data/copyrights/misco4/more-linux/debug.txt new file mode 100644 index 00000000000..28050a0fa43 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/debug.txt @@ -0,0 +1,3 @@ + * started by Ingo Molnar, Copyright (C) 2001 + * debugging by David Rientjes, Copyright (C) 2015 + diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/debug.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/debug.txt.yml new file mode 100644 index 00000000000..811b8fe2002 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/debug.txt.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Ingo Molnar, Copyright (c) 2001 + - David Rientjes, Copyright (c) 2015 +holders: + - Ingo Molnar + - David Rientjes diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/following.txt b/tests/cluecode/data/copyrights/misco4/more-linux/following.txt new file mode 100644 index 00000000000..7eb1d0d3834 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/following.txt @@ -0,0 +1,6 @@ +Copyright (C) 2012-2016 by the following authors: +- Wladimir J. van der Laan +- Christian Gmeiner +- Lucas Stach +- Russell King + diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/following.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/following.txt.yml new file mode 100644 index 00000000000..ff55bcba775 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/following.txt.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2012-2016 by the following authors - Wladimir J. van der Laan + - Christian Gmeiner - Lucas Stach + - Russell King +holders: + - the following authors - Wladimir J. van der Laan - Christian Gmeiner - Lucas Stach - Russell + King diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/fsf.txt b/tests/cluecode/data/copyrights/misco4/more-linux/fsf.txt new file mode 100644 index 00000000000..4d8fe5cea33 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/fsf.txt @@ -0,0 +1 @@ +Copyright (c) 1989 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/fsf.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/fsf.txt.yml new file mode 100644 index 00000000000..607e95f09b0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/fsf.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 1989 Free Software Foundation, Inc. +holders: + - Free Software Foundation, Inc. diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/ilia.txt b/tests/cluecode/data/copyrights/misco4/more-linux/ilia.txt new file mode 100644 index 00000000000..551da93dc32 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/ilia.txt @@ -0,0 +1,4 @@ +Copyright (C) 2013-2018 by the following authors: +- Rob Clark (robclark) +- Ilia Mirkin (imirkin) + diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/ilia.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/ilia.txt.yml new file mode 100644 index 00000000000..0f8dd8d0977 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/ilia.txt.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2013-2018 by the following authors - Rob Clark (robclark) + - Ilia Mirkin (imirkin) +holders: + - the following authors - Rob Clark (robclark) - Ilia Mirkin (imirkin) diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/ixia.txt b/tests/cluecode/data/copyrights/misco4/more-linux/ixia.txt new file mode 100644 index 00000000000..5b16e833ef6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/ixia.txt @@ -0,0 +1 @@ +Copyright (c) 2002 Ixia communications 5 Jan 2003 diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/ixia.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/ixia.txt.yml new file mode 100644 index 00000000000..2c61809b30c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/ixia.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2002 Ixia communications 5 Jan 2003 +holders: + - Ixia communications diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/many-lines.txt b/tests/cluecode/data/copyrights/misco4/more-linux/many-lines.txt new file mode 100644 index 00000000000..594a8f50599 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/many-lines.txt @@ -0,0 +1,3 @@ +(c) 1999 Terrehon Bowden + Bodo Bauer + diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/many-lines.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/many-lines.txt.yml new file mode 100644 index 00000000000..55251adf854 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/many-lines.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 1999 Terrehon Bowden Bodo Bauer +holders: + - Terrehon Bowden Bodo Bauer diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/misc-linux.txt b/tests/cluecode/data/copyrights/misco4/more-linux/misc-linux.txt new file mode 100644 index 00000000000..e9706738572 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/misc-linux.txt @@ -0,0 +1,112 @@ + * Copyright (C) 2011 Instituto Nokia de Tecnologia + * Copyright (C) 2012-2013 Tieto Poland + * Copyright (C) 2016 HALE electronic + + + + + + * Copyright (C) People who wrote linux/arch/i386/kernel/sys_i386.c + + + + + + * Copyright (c) 2010 Alan Ott + * Copyright (c) 2010 Signal 11 Software + + + + + + * Copyright (c) 2010, Octasic semiconductor. + + + + + + * Copyright 2016 Tom aan de Wiel + * Copyright 2018 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + + + + + + * Intel 82443BX/GX (440BX/GX chipset) Memory Controller EDAC kernel + * module (C) 2006 Tim Small + + + + + + * This software is (C) by the respective authors, and licensed under the GPL + * License. + + + + + + /* * Merged with mainline ieee80211.h in Aug 2004. Original ieee802_11 + * remains copyright by the original authors + + + + + + Copyright 1993 United States Government as represented by the + Director, National Security Agency. + + + + + +// Copyright 2010 Ben Dooks fluff.org> + + + + + + *Copyright (c) 2010 Dmitry Torokhov + *Input handler conversion + + + + + +MODULE_AUTHOR("Igor M. Liplianin (c) liplianin@me.by"); + + + + + + * started by Ingo Molnar, Copyright (C) 2001 + * debugging by David Rientjes, Copyright (C) 2015 + + + + + +** Waterloo Microsystems Inc. ?? ** 8-bit card (C) 1985 +------------------- +- from Robert Michael Best + + + + + + bpck.c (c) 1996-8 Grant R. Guenther + + + + + + * (c) 1996 Grant R. Guenther grant@torque.net + * David Campbell + + + + + + Templated from msi-laptop.c and thinkpad_acpi.c which is copyright + by its respective authors. + diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/misc-linux.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/misc-linux.txt.yml new file mode 100644 index 00000000000..dcd528378c3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/misc-linux.txt.yml @@ -0,0 +1,49 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2011 Instituto Nokia de Tecnologia + - Copyright (c) 2012-2013 Tieto Poland + - Copyright (c) 2016 HALE electronic + - Copyright (c) People + - Copyright (c) 2010 Alan Ott + - Copyright (c) 2010 Signal 11 Software + - Copyright (c) 2010, Octasic semiconductor + - Copyright 2016 Tom aan de Wiel + - Copyright 2018 Cisco Systems, Inc. and/or its affiliates + - (c) 2006 Tim Small + - (c) by the respective authors + - copyright by the original + - Copyright 1993 United States Government + - Copyright 2010 Ben Dooks ben-linux fluff.org + - Copyright (c) 2010 Dmitry Torokhov + - (c) liplianin@me.by + - Ingo Molnar, Copyright (c) 2001 + - David Rientjes, Copyright (c) 2015 + - (c) 1985 + - (c) 1996-8 Grant R. Guenther + - (c) 1996 Grant R. Guenther grant@torque.net David Campbell + - copyright by its respective authors +holders: + - Instituto Nokia de Tecnologia + - Tieto Poland + - HALE electronic + - People + - Alan Ott + - Signal 11 Software + - Octasic semiconductor + - Tom aan de Wiel + - Cisco Systems, Inc. and/or its affiliates + - Tim Small + - the respective authors + - the original + - United States Government + - Ben Dooks ben-linux fluff.org + - Dmitry Torokhov + - liplianin@me.by + - Ingo Molnar + - David Rientjes + - Grant R. Guenther + - Grant R. Guenther David Campbell + - its respective authors diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/multi.txt b/tests/cluecode/data/copyrights/misco4/more-linux/multi.txt new file mode 100644 index 00000000000..de2316bb663 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/multi.txt @@ -0,0 +1,7 @@ +// Copyright (c) 2007 TinCanTools +// David Anders +// +// @History: +// derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by +// Ben Dooks + diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/multi.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/multi.txt.yml new file mode 100644 index 00000000000..d4df7397b62 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/multi.txt.yml @@ -0,0 +1,10 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2007 TinCanTools David Anders +holders: + - TinCanTools David Anders +authors: + - Ben Dooks diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/octa.txt b/tests/cluecode/data/copyrights/misco4/more-linux/octa.txt new file mode 100644 index 00000000000..72fc4eddf29 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/octa.txt @@ -0,0 +1 @@ +Copyright (c) 2010, Octasic semiconductor. diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/octa.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/octa.txt.yml new file mode 100644 index 00000000000..580987c0269 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/octa.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2010, Octasic semiconductor +holders: + - Octasic semiconductor diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/pax.txt b/tests/cluecode/data/copyrights/misco4/more-linux/pax.txt new file mode 100644 index 00000000000..ace7b4b7d1b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/pax.txt @@ -0,0 +1 @@ +Copyright 2013-2017 by PaX Team diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/pax.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/pax.txt.yml new file mode 100644 index 00000000000..01bfe5b84ae --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/pax.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2013-2017 by PaX Team +holders: + - PaX Team diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/respect.txt b/tests/cluecode/data/copyrights/misco4/more-linux/respect.txt new file mode 100644 index 00000000000..2edc19f69c2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/respect.txt @@ -0,0 +1 @@ +(C) by the respective authors, and licensed under diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/respect.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/respect.txt.yml new file mode 100644 index 00000000000..a104b827cbf --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/respect.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) by the respective authors +holders: + - the respective authors diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/signal.txt b/tests/cluecode/data/copyrights/misco4/more-linux/signal.txt new file mode 100644 index 00000000000..8a7ed14c593 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/signal.txt @@ -0,0 +1 @@ +Copyright (c) 2010 Signal 11 Software diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/signal.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/signal.txt.yml new file mode 100644 index 00000000000..d78d80b60f0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/signal.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2010 Signal 11 Software +holders: + - Signal 11 Software diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/small.txt b/tests/cluecode/data/copyrights/misco4/more-linux/small.txt new file mode 100644 index 00000000000..23799ccada1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/small.txt @@ -0,0 +1 @@ +(C) 2006 Tim Small diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/small.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/small.txt.yml new file mode 100644 index 00000000000..6695ca22f06 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/small.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2006 Tim Small +holders: + - Tim Small diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/under.txt b/tests/cluecode/data/copyrights/misco4/more-linux/under.txt new file mode 100644 index 00000000000..c92da431a20 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/under.txt @@ -0,0 +1,4 @@ + aten.c (c) 1997-8 Grant R. Guenther + Under the terms of the GNU General Public License. + + diff --git a/tests/cluecode/data/copyrights/misco4/more-linux/under.txt.yml b/tests/cluecode/data/copyrights/misco4/more-linux/under.txt.yml new file mode 100644 index 00000000000..7ec8f2675e9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/more-linux/under.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 1997-8 Grant R. Guenther +holders: + - Grant R. Guenther diff --git a/tests/cluecode/data/copyrights/misco4/openpbs.txt b/tests/cluecode/data/copyrights/misco4/openpbs.txt new file mode 100644 index 00000000000..491d4683e63 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/openpbs.txt @@ -0,0 +1,5 @@ + "This product includes software developed by NASA Ames Research Center, + Lawrence Livermore National Laboratory, and Veridian Information Solutions, + Inc. Visit www.OpenPBS.org for OpenPBS software support, + products, and information." + diff --git a/tests/cluecode/data/copyrights/misco4/openpbs.txt.yml b/tests/cluecode/data/copyrights/misco4/openpbs.txt.yml new file mode 100644 index 00000000000..3ec720c77ec --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/openpbs.txt.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders + - authors +authors: + - NASA Ames Research Center, Lawrence Livermore National Laboratory, and Veridian Information + Solutions, Inc. diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-100.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-100.txt new file mode 100644 index 00000000000..df079d59f59 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-100.txt @@ -0,0 +1 @@ +(c) (c) 2AICAA3SSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-100.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-100.txt.yml new file mode 100644 index 00000000000..a82c6d2bc1b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-100.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) 2AICAA3SSY +holders: + - 2AICAA3SSY diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-103.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-103.txt new file mode 100644 index 00000000000..6de514d636f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-103.txt @@ -0,0 +1 @@ +(c) (c) AA+-C/IAtBGCg http://www.1affliate.com \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-103.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-103.txt.yml new file mode 100644 index 00000000000..faaa85383b4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-103.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) AA+-C/IAtBGCg http://www.1affliate.com +holders: + - AA+-C/IAtBGCg diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-104.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-104.txt new file mode 100644 index 00000000000..5e34b6aaf8f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-104.txt @@ -0,0 +1 @@ +(c) (c) AA+-C/IAtBGCgxI j AaaAAEIieUu1/2B http://www.1affilaite.com \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-104.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-104.txt.yml new file mode 100644 index 00000000000..dd688421bf5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-104.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) AA+-C/IAtBGCgxI j AaaAAEIieUu1/2B http://www.1affilaite.com +holders: + - AA+-C/IAtBGCgxI j AaaAAEIieUu1/2B diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-107.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-107.txt new file mode 100644 index 00000000000..1f0cb170e6f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-107.txt @@ -0,0 +1 @@ +(c) (c) AAIAtBGCg http://www.1affliate.com \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-107.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-107.txt.yml new file mode 100644 index 00000000000..d1a92c6f56a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-107.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) AAIAtBGCg http://www.1affliate.com +holders: + - AAIAtBGCg diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-118.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-118.txt new file mode 100644 index 00000000000..82b605e1072 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-118.txt @@ -0,0 +1 @@ +U1e (c) IjAx. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-118.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-118.txt.yml new file mode 100644 index 00000000000..6f3774cd70d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-118.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - U1e (c) IjAx +holders: + - U1e IjAx diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-126.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-126.txt new file mode 100644 index 00000000000..5b1311bd393 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-126.txt @@ -0,0 +1 @@ +VCopyright (c) 2017 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-126.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-126.txt.yml new file mode 100644 index 00000000000..f343a9ab42c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-126.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2017 diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-13.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-13.txt new file mode 100644 index 00000000000..79d625b8822 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-13.txt @@ -0,0 +1 @@ +(c) ,r s(t),r.length&& o document.createElementNS http://www.w3.org/1999/xhtml','div \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-13.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-13.txt.yml new file mode 100644 index 00000000000..0f18d8dd9c0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-13.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) ,r s(t),r.length&& o document.createElementNS http://www.w3.org/1999/xhtml,'div +holders: + - r s(t),r.length&& o document.createElementNS diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-130.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-130.txt new file mode 100644 index 00000000000..b774731eccd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-130.txt @@ -0,0 +1 @@ +Xz eaaeuyATNRU (c) Ijr \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-130.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-130.txt.yml new file mode 100644 index 00000000000..250921f1b76 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-130.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Xz eaaeuyATNRU (c) Ijr +holders: + - Xz eaaeuyATNRU Ijr diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-135.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-135.txt new file mode 100644 index 00000000000..57c0601b84b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-135.txt @@ -0,0 +1 @@ +(c) 2014 $ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-135.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-135.txt.yml new file mode 100644 index 00000000000..133c9dc0ea6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-135.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2014 $ diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-137.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-137.txt new file mode 100644 index 00000000000..e960f987844 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-137.txt @@ -0,0 +1 @@ +(c) (c) More tests from http://mathiasbynens.be/demo/html5-id \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-137.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-137.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-137.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-138.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-138.txt new file mode 100644 index 00000000000..ba8cf36fb0a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-138.txt @@ -0,0 +1 @@ +(c) 2011 Baidu /duty/' E1OAdegUPECdeg+-OPA http://www.miibeian.gov.cn \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-138.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-138.txt.yml new file mode 100644 index 00000000000..92798e05d98 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-138.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2011 Baidu /duty/ E1OAdegUPECdeg+-OPA http://www.miibeian.gov.cn +holders: + - Baidu /duty/ E1OAdegUPECdeg+-OPA diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-139.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-139.txt new file mode 100644 index 00000000000..b6842638c7a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-139.txt @@ -0,0 +1 @@ +(c) ICPO$?030173oA src http://gimg.baidu.com/img/gs.gif \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-139.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-139.txt.yml new file mode 100644 index 00000000000..cf13d70a169 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-139.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) ICPO$?030173oA src http://gimg.baidu.com/img/gs.gif +holders: + - ICPO$?030173oA src diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-140.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-140.txt new file mode 100644 index 00000000000..a2486eca5b2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-140.txt @@ -0,0 +1 @@ +(c) zbar', base about:blank', href http://example.com/foo \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-140.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-140.txt.yml new file mode 100644 index 00000000000..ae6befc5952 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-140.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) zbar base about:blank href http://example.com/foo +holders: + - zbar base about:blank diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-141.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-141.txt new file mode 100644 index 00000000000..69e19483217 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-141.txt @@ -0,0 +1 @@ +(c) 2004-2010 year().format 'YYYY-MM-DD , -04 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-141.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-141.txt.yml new file mode 100644 index 00000000000..4e2fe4ed989 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-141.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2004-2010 year .format YYYY-MM-DD +holders: + - format YYYY-MM-DD diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-142.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-142.txt new file mode 100644 index 00000000000..3d24710557c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-142.txt @@ -0,0 +1 @@ +(c) 2017 year().format 'YYYY-MM-DD , -10-04 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-142.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-142.txt.yml new file mode 100644 index 00000000000..43914612c03 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-142.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2017 year .format YYYY-MM-DD +holders: + - format YYYY-MM-DD diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-144.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-144.txt new file mode 100644 index 00000000000..4e305afc01f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-144.txt @@ -0,0 +1 @@ +(c) https://git.io/fNZzr \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-144.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-144.txt.yml new file mode 100644 index 00000000000..d98ef281e5a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-144.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) https://git.io/fNZzr +holders: + - https://git.io/fNZzr diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-149.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-149.txt new file mode 100644 index 00000000000..5ab04e545b5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-149.txt @@ -0,0 +1 @@ +(c) xample.com \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-149.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-149.txt.yml new file mode 100644 index 00000000000..26226e1a104 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-149.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) xample.com +holders: + - xample.com diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-151.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-151.txt new file mode 100644 index 00000000000..cd6a423e472 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-151.txt @@ -0,0 +1 @@ +(c) _.ch \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-151.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-151.txt.yml new file mode 100644 index 00000000000..6dd59a74019 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-151.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) _.ch +holders: + - ch diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-155.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-155.txt new file mode 100644 index 00000000000..9e6fdcfc7d8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-155.txt @@ -0,0 +1 @@ +(c) assert.equal c.domain, foonet.net \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-155.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-155.txt.yml new file mode 100644 index 00000000000..d6f91d4c461 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-155.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) assert.equal c.domain, foonet.net +holders: + - assert.equal c.domain, foonet.net diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-156.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-156.txt new file mode 100644 index 00000000000..7791ad1ecc1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-156.txt @@ -0,0 +1 @@ +(c) assert.equal c.domain, kyoto.jp \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-156.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-156.txt.yml new file mode 100644 index 00000000000..356aa8b7865 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-156.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) assert.equal c.domain, kyoto.jp +holders: + - assert.equal c.domain diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-157.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-157.txt new file mode 100644 index 00000000000..68273aaa438 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-157.txt @@ -0,0 +1 @@ +(c) assert.equal c.domain, www.example.com \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-157.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-157.txt.yml new file mode 100644 index 00000000000..00b9773c335 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-157.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) assert.equal c.domain, www.example.com +holders: + - assert.equal c.domain, www.example.com diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-158.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-158.txt new file mode 100644 index 00000000000..44ec570f575 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-158.txt @@ -0,0 +1 @@ +(c) assert.equal c.domain, www.foonet.net \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-158.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-158.txt.yml new file mode 100644 index 00000000000..badb3a2736e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-158.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) assert.equal c.domain, www.foonet.net +holders: + - assert.equal c.domain, www.foonet.net diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-159.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-159.txt new file mode 100644 index 00000000000..f1b01c92ec3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-159.txt @@ -0,0 +1 @@ +(c) (c) (r) (R) (tm) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-159.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-159.txt.yml new file mode 100644 index 00000000000..fdace4fc123 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-159.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) (r) (R) (tm) +holders: + - (r) (R) (tm) diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-160.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-160.txt new file mode 100644 index 00000000000..8aafe2d536e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-160.txt @@ -0,0 +1 @@ +(c) (tm) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-160.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-160.txt.yml new file mode 100644 index 00000000000..7be31b1e015 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-160.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (tm) +holders: + - tm diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-161.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-161.txt new file mode 100644 index 00000000000..e7d4f7d5280 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-161.txt @@ -0,0 +1 @@ +Copyright (c) 2011 $ new \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-161.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-161.txt.yml new file mode 100644 index 00000000000..4b3166e0667 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-161.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2011 $ diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-162.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-162.txt new file mode 100644 index 00000000000..69e19483217 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-162.txt @@ -0,0 +1 @@ +(c) 2004-2010 year().format 'YYYY-MM-DD , -04 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-162.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-162.txt.yml new file mode 100644 index 00000000000..4e2fe4ed989 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-162.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2004-2010 year .format YYYY-MM-DD +holders: + - format YYYY-MM-DD diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-163.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-163.txt new file mode 100644 index 00000000000..3d24710557c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-163.txt @@ -0,0 +1 @@ +(c) 2017 year().format 'YYYY-MM-DD , -10-04 \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-163.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-163.txt.yml new file mode 100644 index 00000000000..43914612c03 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-163.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2017 year .format YYYY-MM-DD +holders: + - format YYYY-MM-DD diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-171.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-171.txt new file mode 100644 index 00000000000..295799ef962 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-171.txt @@ -0,0 +1 @@ +Copyright 2014 $ \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-171.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-171.txt.yml new file mode 100644 index 00000000000..a413c0cbcd3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-171.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2014 $ diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-172.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-172.txt new file mode 100644 index 00000000000..a2486eca5b2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-172.txt @@ -0,0 +1 @@ +(c) zbar', base about:blank', href http://example.com/foo \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-172.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-172.txt.yml new file mode 100644 index 00000000000..ae6befc5952 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-172.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) zbar base about:blank href http://example.com/foo +holders: + - zbar base about:blank diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-173.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-173.txt new file mode 100644 index 00000000000..3ceba72181b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-173.txt @@ -0,0 +1 @@ +l'lbwm hw (c) Bootstrap \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-173.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-173.txt.yml new file mode 100644 index 00000000000..9b962af501c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-173.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - l'lbwm hw (c) Bootstrap +holders: + - l'lbwm hw Bootstrap diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-174.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-174.txt new file mode 100644 index 00000000000..25e4eebb024 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-174.txt @@ -0,0 +1 @@ +(c) 2017 < year > Company \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-174.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-174.txt.yml new file mode 100644 index 00000000000..c1faccd4ec6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-174.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2017 < year > Company +holders: + - < year > Company diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-175.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-175.txt new file mode 100644 index 00000000000..6c309cdf181 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-175.txt @@ -0,0 +1 @@ +(c) 2017 < year > Company, Inc. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-175.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-175.txt.yml new file mode 100644 index 00000000000..717f432b739 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-175.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2017 < year > Company, Inc. +holders: + - < year > Company, Inc. diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-177.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-177.txt new file mode 100644 index 00000000000..6ad6199028f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-177.txt @@ -0,0 +1 @@ +(c) ,i 0,j b.value.length \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-177.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-177.txt.yml new file mode 100644 index 00000000000..30f33088596 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-177.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) ,i 0,j b.value.length +holders: + - i 0,j b.value.length diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-178.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-178.txt new file mode 100644 index 00000000000..67c844ef4ca --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-178.txt @@ -0,0 +1 @@ +(c) cc.fr \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-178.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-178.txt.yml new file mode 100644 index 00000000000..1158ad87d4f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-178.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) cc.fr +holders: + - cc.fr diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-184.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-184.txt new file mode 100644 index 00000000000..efe9dc8dcd8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-184.txt @@ -0,0 +1 @@ +Copyright (c) 2016 Permission \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-184.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-184.txt.yml new file mode 100644 index 00000000000..937fa4bd464 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-184.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2016 diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-185.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-185.txt new file mode 100644 index 00000000000..1e4aee42532 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-185.txt @@ -0,0 +1 @@ +(c) Algolia, inc. const link https://github.com/algolia/algoliasearch-client-javascript \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-185.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-185.txt.yml new file mode 100644 index 00000000000..152ad66cfea --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-185.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Algolia, inc. +holders: + - Algolia, inc. diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-188.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-188.txt new file mode 100644 index 00000000000..ea85406557c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-188.txt @@ -0,0 +1 @@ +Copyright DateTime.now .year Google, Inc. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-188.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-188.txt.yml new file mode 100644 index 00000000000..b6c167981f7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-188.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright DateTime.now .year Google, Inc. +holders: + - DateTime.now .year Google, Inc. diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-189.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-189.txt new file mode 100644 index 00000000000..decd3490990 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-189.txt @@ -0,0 +1 @@ +(c) A Test Line \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-189.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-189.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-189.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-192.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-192.txt new file mode 100644 index 00000000000..ddd572e0a79 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-192.txt @@ -0,0 +1 @@ +(c) 2014-$ new \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-192.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-192.txt.yml new file mode 100644 index 00000000000..f89dec67d18 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-192.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2014-$ diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-195.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-195.txt new file mode 100644 index 00000000000..ebcd81531a5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-195.txt @@ -0,0 +1 @@ +(c) Oo2 UOY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-195.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-195.txt.yml new file mode 100644 index 00000000000..9c5a514034e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-195.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Oo2 UOY +holders: + - Oo2 UOY diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-196.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-196.txt new file mode 100644 index 00000000000..521c318162e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-196.txt @@ -0,0 +1 @@ +(c) OyXau (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-196.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-196.txt.yml new file mode 100644 index 00000000000..1e127f20561 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-196.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) OyXau (c) +holders: + - OyXau diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-200.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-200.txt new file mode 100644 index 00000000000..15628257324 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-200.txt @@ -0,0 +1 @@ +Copyright 2010- < grunt.template.today 'yyyy > Juriy kangax Zaytsev \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-200.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-200.txt.yml new file mode 100644 index 00000000000..ee5c1ecddf7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-200.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2010- diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-202.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-202.txt new file mode 100644 index 00000000000..9dd504e9c47 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-202.txt @@ -0,0 +1 @@ +Copyright 2014-$ date.year pkg.author \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-202.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-202.txt.yml new file mode 100644 index 00000000000..71a1c607a90 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-202.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2014-$ date.year pkg.author +holders: + - date.year pkg.author diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-204.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-204.txt new file mode 100644 index 00000000000..5a630a5cc60 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-204.txt @@ -0,0 +1 @@ +Copyright (c) 2019 pkg.author \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-204.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-204.txt.yml new file mode 100644 index 00000000000..74cdc33f02a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-204.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2019 pkg.author +holders: + - pkg.author diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-205.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-205.txt new file mode 100644 index 00000000000..4f46e3d33ee --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-205.txt @@ -0,0 +1 @@ +(c) http://www.MuazKhan.com \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-205.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-205.txt.yml new file mode 100644 index 00000000000..ed8c250d4bd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-205.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) http://www.MuazKhan.com +holders: + - http://www.MuazKhan.com diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-206.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-206.txt new file mode 100644 index 00000000000..037daa5bc5f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-206.txt @@ -0,0 +1 @@ +(c) https://plus.google.com/+MuazKhan \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-206.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-206.txt.yml new file mode 100644 index 00000000000..9fed64ef7cb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-206.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) https://plus.google.com/+MuazKhan +holders: + - https://plus.google.com/+MuazKhan diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-207.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-207.txt new file mode 100644 index 00000000000..1e582304eb0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-207.txt @@ -0,0 +1 @@ +(c) 2013- + new \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-207.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-207.txt.yml new file mode 100644 index 00000000000..0bfc098413d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-207.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2013 diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-208.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-208.txt new file mode 100644 index 00000000000..904c8ec53fa --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-208.txt @@ -0,0 +1 @@ +(c) (0,o.warn) Optional content group not \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-208.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-208.txt.yml new file mode 100644 index 00000000000..8b04363f58d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-208.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (0,o.warn) Optional content group not +holders: + - (0,o.warn) Optional content group not diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-209.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-209.txt new file mode 100644 index 00000000000..3e97efb88f7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-209.txt @@ -0,0 +1 @@ +(c) 2021 param \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-209.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-209.txt.yml new file mode 100644 index 00000000000..48531c8124b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-209.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2021 diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-21.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-21.txt new file mode 100644 index 00000000000..eacc6824dad --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-21.txt @@ -0,0 +1 @@ +(c) ! (c) SS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-21.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-21.txt.yml new file mode 100644 index 00000000000..ae1d9ccccd4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-21.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) ! (c) SS +holders: + - SS diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-210.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-210.txt new file mode 100644 index 00000000000..f628cc93a89 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-210.txt @@ -0,0 +1 @@ +(c) 2021 param CSSMatrix.PointTuple DOMPoint v Tuple \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-210.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-210.txt.yml new file mode 100644 index 00000000000..48531c8124b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-210.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2021 diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-213.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-213.txt new file mode 100644 index 00000000000..d3427c52237 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-213.txt @@ -0,0 +1 @@ +Copyright 2002-${year} the original author or authors \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-213.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-213.txt.yml new file mode 100644 index 00000000000..cbe55bd1207 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-213.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2002-$ year the original author or authors +holders: + - the original author or authors diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-214.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-214.txt new file mode 100644 index 00000000000..aac9375b6af --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-214.txt @@ -0,0 +1 @@ +(c) https://iamdustan.github.io/smoothscroll' https://iamdustan.github.io/smoothscroll \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-214.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-214.txt.yml new file mode 100644 index 00000000000..c87ffed9304 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-214.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) https://iamdustan.github.io/smoothscroll https://iamdustan.github.io/smoothscroll +holders: + - https://iamdustan.github.io/smoothscroll https://iamdustan.github.io/smoothscroll diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-215.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-215.txt new file mode 100644 index 00000000000..3354433283a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-215.txt @@ -0,0 +1 @@ +(c) https://github.com/coox/styled-jsx-css-loader/blob/97a38e90dddf2c4b066e9247db0612c8f95302de/index.js \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-215.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-215.txt.yml new file mode 100644 index 00000000000..d8182954f4b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-215.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) https://github.com/coox/styled-jsx-css-loader/blob/97a38e90dddf2c4b066e9247db0612c8f95302de/index.js +holders: + - https://github.com/coox/styled-jsx-css-loader/blob/97a38e90dddf2c4b066e9247db0612c8f95302de/index.js diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-216.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-216.txt new file mode 100644 index 00000000000..925204d8e43 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-216.txt @@ -0,0 +1 @@ +Copyright 2011- < grunt.template.today 'yyyy > < pkg.author > \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-216.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-216.txt.yml new file mode 100644 index 00000000000..32c72458093 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-216.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2011- diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-217.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-217.txt new file mode 100644 index 00000000000..db7097e79c5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-217.txt @@ -0,0 +1 @@ +Copyright 2010- < grunt.template.today 'yyyy > < pkg.author > \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-217.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-217.txt.yml new file mode 100644 index 00000000000..ee5c1ecddf7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-217.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2010- diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-218.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-218.txt new file mode 100644 index 00000000000..9dd504e9c47 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-218.txt @@ -0,0 +1 @@ +Copyright 2014-$ date.year pkg.author \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-218.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-218.txt.yml new file mode 100644 index 00000000000..71a1c607a90 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-218.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2014-$ date.year pkg.author +holders: + - date.year pkg.author diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-219.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-219.txt new file mode 100644 index 00000000000..357bea1ad34 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-219.txt @@ -0,0 +1 @@ +Copyright (c) year lib.author and contributors \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-219.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-219.txt.yml new file mode 100644 index 00000000000..7f2a9e276d6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-219.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) year lib.author and contributors +holders: + - lib.author and contributors diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-22.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-22.txt new file mode 100644 index 00000000000..f9eae910ab4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-22.txt @@ -0,0 +1 @@ +(c) ! (c) SSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-22.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-22.txt.yml new file mode 100644 index 00000000000..de978ce8729 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-22.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) ! (c) SSY +holders: + - SSY diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-220.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-220.txt new file mode 100644 index 00000000000..250993955d6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-220.txt @@ -0,0 +1 @@ +(c) 2021 param CSSM.PointTuple DOMPoint v Tuple \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-220.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-220.txt.yml new file mode 100644 index 00000000000..48531c8124b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-220.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 2021 diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-221.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-221.txt new file mode 100644 index 00000000000..b01bf0443cb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-221.txt @@ -0,0 +1 @@ +COPYRIGHT (c) TRADEMARK \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-221.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-221.txt.yml new file mode 100644 index 00000000000..5a2f9069d51 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-221.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - COPYRIGHT (c) TRADEMARK +holders: + - TRADEMARK diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-222.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-222.txt new file mode 100644 index 00000000000..e898644cca1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-222.txt @@ -0,0 +1 @@ +copyright 2015 Missing \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-222.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-222.txt.yml new file mode 100644 index 00000000000..b786f1effe6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-222.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyright 2015 Missing +holders: + - Missing diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-224.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-224.txt new file mode 100644 index 00000000000..81d0f3dfd3b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-224.txt @@ -0,0 +1 @@ +copyright _copyright \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-224.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-224.txt.yml new file mode 100644 index 00000000000..50351789eb0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-224.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - copyright _copyright diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-225.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-225.txt new file mode 100644 index 00000000000..998859152ed --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-225.txt @@ -0,0 +1 @@ +Copyright (c) 2005,O WISeKey,C CH Not Valid Before \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-225.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-225.txt.yml new file mode 100644 index 00000000000..207f78785e1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-225.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005,O WISeKey,C CH Not Valid +holders: + - 2005,O WISeKey,C CH Not Valid diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-226.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-226.txt new file mode 100644 index 00000000000..075ab11213f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-226.txt @@ -0,0 +1 @@ +Copyright (c) 2005,O WISeKey,C CH Serial \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-226.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-226.txt.yml new file mode 100644 index 00000000000..39b61335059 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-226.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2005,O WISeKey,C CH Serial +holders: + - 2005,O WISeKey,C CH Serial diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-227.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-227.txt new file mode 100644 index 00000000000..e68340cb658 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-227.txt @@ -0,0 +1 @@ +Copyright (c) 2012 pkg.author pkg.homepage \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-227.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-227.txt.yml new file mode 100644 index 00000000000..bea25992f3c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-227.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2012 pkg.author pkg.homepage +holders: + - pkg.author pkg.homepage diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-228.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-228.txt new file mode 100644 index 00000000000..34c20da14a6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-228.txt @@ -0,0 +1 @@ +(c) HIPAA.Security-DynamoDBInBackupPlan (https://docs.aws.amazon.com/config/latest/developerguide/dynamodb-in-backup-plan.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-228.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-228.txt.yml new file mode 100644 index 00000000000..2592d78d685 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-228.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) HIPAA.Security-DynamoDBInBackupPlan (https://docs.aws.amazon.com/config/latest/developerguide/dynamodb-in-backup-plan.html) +holders: + - HIPAA.Security-DynamoDBInBackupPlan diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-229.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-229.txt new file mode 100644 index 00000000000..f921669063a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-229.txt @@ -0,0 +1 @@ +(c) HIPAA.Security-ELBDeletionProtectionEnabled (https://docs.aws.amazon.com/config/latest/developerguide/elb-deletion-protection-enabled.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-229.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-229.txt.yml new file mode 100644 index 00000000000..fa78dac1897 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-229.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) HIPAA.Security-ELBDeletionProtectionEnabled (https://docs.aws.amazon.com/config/latest/developerguide/elb-deletion-protection-enabled.html) +holders: + - HIPAA.Security-ELBDeletionProtectionEnabled diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-23.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-23.txt new file mode 100644 index 00000000000..196fe9072bb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-23.txt @@ -0,0 +1 @@ +(c) !(r) || (c) SSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-23.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-23.txt.yml new file mode 100644 index 00000000000..b5bf2acfbc7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-23.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) !(r) (c) SSY +holders: + - (r) SSY diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-230.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-230.txt new file mode 100644 index 00000000000..dad1c1409a7 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-230.txt @@ -0,0 +1 @@ +(c) HIPAA.Security-ELBLoggingEnabled (https://docs.aws.amazon.com/config/latest/developerguide/elb-logging-enabled.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-230.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-230.txt.yml new file mode 100644 index 00000000000..3a7368e884e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-230.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) HIPAA.Security-ELBLoggingEnabled (https://docs.aws.amazon.com/config/latest/developerguide/elb-logging-enabled.html) +holders: + - HIPAA.Security-ELBLoggingEnabled diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-231.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-231.txt new file mode 100644 index 00000000000..1613bb20373 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-231.txt @@ -0,0 +1 @@ +(c) HIPAA.Security-RDSInstancePublicAccess (https://docs.aws.amazon.com/config/latest/developerguide/rds-instance-public-access-check.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-231.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-231.txt.yml new file mode 100644 index 00000000000..258e66659ba --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-231.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) HIPAA.Security-RDSInstancePublicAccess (https://docs.aws.amazon.com/config/latest/developerguide/rds-instance-public-access-check.html) +holders: + - HIPAA.Security-RDSInstancePublicAccess diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-232.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-232.txt new file mode 100644 index 00000000000..488999ced49 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-232.txt @@ -0,0 +1 @@ +(c) HIPAA.Security-RDSMultiAZSupport (https://docs.aws.amazon.com/config/latest/developerguide/rds-multi-az-support.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-232.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-232.txt.yml new file mode 100644 index 00000000000..58498e35adb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-232.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) HIPAA.Security-RDSMultiAZSupport (https://docs.aws.amazon.com/config/latest/developerguide/rds-multi-az-support.html) +holders: + - HIPAA.Security-RDSMultiAZSupport diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-233.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-233.txt new file mode 100644 index 00000000000..9f2cc8bd4cb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-233.txt @@ -0,0 +1 @@ +(c) HIPAA.Security-RDSStorageEncrypted (https://docs.aws.amazon.com/config/latest/developerguide/rds-storage-encrypted.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-233.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-233.txt.yml new file mode 100644 index 00000000000..f4484d298d5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-233.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) HIPAA.Security-RDSStorageEncrypted (https://docs.aws.amazon.com/config/latest/developerguide/rds-storage-encrypted.html) +holders: + - HIPAA.Security-RDSStorageEncrypted diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-234.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-234.txt new file mode 100644 index 00000000000..0be86987c3a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-234.txt @@ -0,0 +1 @@ +(c) NIST.800.53.R4-APIGWCacheEnabledAndEncrypted (https://docs.aws.amazon.com/config/latest/developerguide/api-gw-cache-enabled-and-encrypted.html) The API Gateway \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-234.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-234.txt.yml new file mode 100644 index 00000000000..f8483f24272 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-234.txt.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) NIST.800.53.R4-APIGWCacheEnabledAndEncrypted (https://docs.aws.amazon.com/config/latest/developerguide/api-gw-cache-enabled-and-encrypted.html) + The API Gateway +holders: + - NIST.800.53.R4-APIGWCacheEnabledAndEncrypted The API Gateway diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-235.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-235.txt new file mode 100644 index 00000000000..ef7fe050aec --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-235.txt @@ -0,0 +1 @@ +(c) NIST.800.53.R4-AutoScalingGroupELBHealthCheckRequired (https://docs.aws.amazon.com/config/latest/developerguide/autoscaling-group-elb-healthcheck-required.html) The Auto Scaling group \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-235.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-235.txt.yml new file mode 100644 index 00000000000..9392c598c0c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-235.txt.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) NIST.800.53.R4-AutoScalingGroupELBHealthCheckRequired (https://docs.aws.amazon.com/config/latest/developerguide/autoscaling-group-elb-healthcheck-required.html) + The Auto Scaling group +holders: + - NIST.800.53.R4-AutoScalingGroupELBHealthCheckRequired The Auto Scaling group diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-236.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-236.txt new file mode 100644 index 00000000000..09e552e4321 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-236.txt @@ -0,0 +1 @@ +(c) NIST.800.53.R4-CloudTrailEncryptionEnabled (https://docs.aws.amazon.com/config/latest/developerguide/cloud-trail-encryption-enabled.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-236.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-236.txt.yml new file mode 100644 index 00000000000..738745e8df3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-236.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) NIST.800.53.R4-CloudTrailEncryptionEnabled (https://docs.aws.amazon.com/config/latest/developerguide/cloud-trail-encryption-enabled.html) +holders: + - NIST.800.53.R4-CloudTrailEncryptionEnabled diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-237.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-237.txt new file mode 100644 index 00000000000..b406d169792 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-237.txt @@ -0,0 +1 @@ +(c) NIST.800.53.R4-CloudWatchLogGroupEncrypted (https://docs.aws.amazon.com/config/latest/developerguide/cloudwatch-log-group-encrypted.html) The CloudWatch Log Group \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-237.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-237.txt.yml new file mode 100644 index 00000000000..dacc9d9264c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-237.txt.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) NIST.800.53.R4-CloudWatchLogGroupEncrypted (https://docs.aws.amazon.com/config/latest/developerguide/cloudwatch-log-group-encrypted.html) + The CloudWatch Log Group +holders: + - NIST.800.53.R4-CloudWatchLogGroupEncrypted The CloudWatch Log Group diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-238.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-238.txt new file mode 100644 index 00000000000..1066c36af39 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-238.txt @@ -0,0 +1 @@ +(c) NIST.800.53.R4-EC2InstanceNoPublicIp (https://docs.aws.amazon.com/config/latest/developerguide/ec2-instance-no-public-ip.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-238.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-238.txt.yml new file mode 100644 index 00000000000..c6252a2311e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-238.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) NIST.800.53.R4-EC2InstanceNoPublicIp (https://docs.aws.amazon.com/config/latest/developerguide/ec2-instance-no-public-ip.html) +holders: + - NIST.800.53.R4-EC2InstanceNoPublicIp diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-239.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-239.txt new file mode 100644 index 00000000000..1e61c19dd50 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-239.txt @@ -0,0 +1 @@ +(c) NIST.800.53.R4-RDSMultiAZSupport (https://docs.aws.amazon.com/config/latest/developerguide/rds-multi-az-support.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-239.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-239.txt.yml new file mode 100644 index 00000000000..2d4fbe954ad --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-239.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) NIST.800.53.R4-RDSMultiAZSupport (https://docs.aws.amazon.com/config/latest/developerguide/rds-multi-az-support.html) +holders: + - NIST.800.53.R4-RDSMultiAZSupport diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-240.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-240.txt new file mode 100644 index 00000000000..77fc147a34b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-240.txt @@ -0,0 +1 @@ +(c) NIST.800.53.R4-S3BucketPublicReadProhibited (https://docs.aws.amazon.com/config/latest/developerguide/s3-bucket-public-read-prohibited.html) The S3 Bucket \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-240.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-240.txt.yml new file mode 100644 index 00000000000..2cbcf475c37 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-240.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) NIST.800.53.R4-S3BucketPublicReadProhibited (https://docs.aws.amazon.com/config/latest/developerguide/s3-bucket-public-read-prohibited.html) +holders: + - NIST.800.53.R4-S3BucketPublicReadProhibited diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-241.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-241.txt new file mode 100644 index 00000000000..65c7f3db8fe --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-241.txt @@ -0,0 +1 @@ +(c) NIST.800.53.R4-WAFv2LoggingEnabled (https://docs.aws.amazon.com/config/latest/developerguide/wafv2-logging-enabled.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-241.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-241.txt.yml new file mode 100644 index 00000000000..b9e39205e46 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-241.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) NIST.800.53.R4-WAFv2LoggingEnabled (https://docs.aws.amazon.com/config/latest/developerguide/wafv2-logging-enabled.html) +holders: + - NIST.800.53.R4-WAFv2LoggingEnabled diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-242.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-242.txt new file mode 100644 index 00000000000..62da2c6ab91 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-242.txt @@ -0,0 +1 @@ +(c) NIST.800.53.R5-CloudTrailEncryptionEnabled (https://docs.aws.amazon.com/config/latest/developerguide/cloud-trail-encryption-enabled.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-242.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-242.txt.yml new file mode 100644 index 00000000000..ed4f41e5198 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-242.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) NIST.800.53.R5-CloudTrailEncryptionEnabled (https://docs.aws.amazon.com/config/latest/developerguide/cloud-trail-encryption-enabled.html) +holders: + - NIST.800.53.R5-CloudTrailEncryptionEnabled diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-243.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-243.txt new file mode 100644 index 00000000000..35ad0fd32f2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-243.txt @@ -0,0 +1 @@ +(c) NIST.800.53.R5-RDSMultiAZSupport (https://docs.aws.amazon.com/config/latest/developerguide/rds-multi-az-support.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-243.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-243.txt.yml new file mode 100644 index 00000000000..84bf0f0349f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-243.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) NIST.800.53.R5-RDSMultiAZSupport (https://docs.aws.amazon.com/config/latest/developerguide/rds-multi-az-support.html) +holders: + - NIST.800.53.R5-RDSMultiAZSupport diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-244.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-244.txt new file mode 100644 index 00000000000..01e187b372a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-244.txt @@ -0,0 +1 @@ +(c) NIST.800.53.R5-S3BucketPublicReadProhibited (https://docs.aws.amazon.com/config/latest/developerguide/s3-bucket-public-read-prohibited.html) The S3 Bucket \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-244.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-244.txt.yml new file mode 100644 index 00000000000..e6d3daec065 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-244.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) NIST.800.53.R5-S3BucketPublicReadProhibited (https://docs.aws.amazon.com/config/latest/developerguide/s3-bucket-public-read-prohibited.html) +holders: + - NIST.800.53.R5-S3BucketPublicReadProhibited diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-245.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-245.txt new file mode 100644 index 00000000000..988555e9296 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-245.txt @@ -0,0 +1 @@ +(c), SC-13 NIST.800.53.R4-RedshiftClusterPublicAccess (https://docs.aws.amazon.com/config/latest/developerguide/redshift-cluster-public-access-check.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-245.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-245.txt.yml new file mode 100644 index 00000000000..6162cd15134 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-245.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c), SC-13 NIST.800.53.R4-RedshiftClusterPublicAccess (https://docs.aws.amazon.com/config/latest/developerguide/redshift-cluster-public-access-check.html) +holders: + - SC-13 NIST.800.53.R4-RedshiftClusterPublicAccess diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-246.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-246.txt new file mode 100644 index 00000000000..3990888e4dd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-246.txt @@ -0,0 +1 @@ +(c), SI-19(4) NIST.800.53.R5-RedshiftClusterMaintenanceSettings (https://docs.aws.amazon.com/config/latest/developerguide/redshift-cluster-maintenancesettings-check.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-246.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-246.txt.yml new file mode 100644 index 00000000000..ada1c4e8ea5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-246.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c), SI-19(4) NIST.800.53.R5-RedshiftClusterMaintenanceSettings (https://docs.aws.amazon.com/config/latest/developerguide/redshift-cluster-maintenancesettings-check.html) +holders: + - SI-19(4) NIST.800.53.R5-RedshiftClusterMaintenanceSettings diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-25.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-25.txt new file mode 100644 index 00000000000..2a073bf5445 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-25.txt @@ -0,0 +1 @@ +(c) !+-2 (c) SSSSPSPSPSSSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-25.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-25.txt.yml new file mode 100644 index 00000000000..cfbfce56c1e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-25.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) !+-2 (c) SSSSPSPSPSSSY +holders: + - 2 SSSSPSPSPSSSY diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-250.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-250.txt new file mode 100644 index 00000000000..98dec0535ef --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-250.txt @@ -0,0 +1 @@ +(c) rds-snapshot-encrypted (https://docs.aws.amazon.com/config/latest/developerguide/rds-snapshot-encrypted.html) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-250.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-250.txt.yml new file mode 100644 index 00000000000..8934f7b9e91 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-250.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) rds-snapshot-encrypted (https://docs.aws.amazon.com/config/latest/developerguide/rds-snapshot-encrypted.html) +holders: + - rds-snapshot-encrypted diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-251.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-251.txt new file mode 100644 index 00000000000..ded016aa98b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-251.txt @@ -0,0 +1 @@ +(c) securityhub-enabled (https://docs.aws.amazon.com/config/latest/developerguide/securityhub-enabled.html) The AWS Account \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-251.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-251.txt.yml new file mode 100644 index 00000000000..2b2a1a049c6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-251.txt.yml @@ -0,0 +1,9 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) securityhub-enabled (https://docs.aws.amazon.com/config/latest/developerguide/securityhub-enabled.html) + The AWS Account +holders: + - securityhub-enabled The AWS Account diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-254.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-254.txt new file mode 100644 index 00000000000..731c5595fe4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-254.txt @@ -0,0 +1 @@ +(c) Copyright (c) OtherCorp. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-254.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-254.txt.yml new file mode 100644 index 00000000000..45cf07d8475 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-254.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) OtherCorp. +holders: + - OtherCorp. diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-255.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-255.txt new file mode 100644 index 00000000000..c30ecaafd2c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-255.txt @@ -0,0 +1 @@ +(c) Copyright (c) SomeCorp. \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-255.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-255.txt.yml new file mode 100644 index 00000000000..4f5beeff65b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-255.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) SomeCorp. +holders: + - SomeCorp. diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-256.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-256.txt new file mode 100644 index 00000000000..00bdae66c7a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-256.txt @@ -0,0 +1 @@ +(c) Copyright (c) Somebody \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-256.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-256.txt.yml new file mode 100644 index 00000000000..2c8b5933d25 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-256.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) Somebody +holders: + - Somebody diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-259.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-259.txt new file mode 100644 index 00000000000..c413250b7f4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-259.txt @@ -0,0 +1 @@ +(c) Return SyntaxFacts.IsIdentifierPartCharacter (c) End \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-259.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-259.txt.yml new file mode 100644 index 00000000000..9053aa52c25 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-259.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Return SyntaxFacts.IsIdentifierPartCharacter (c) End +holders: + - Return SyntaxFacts.IsIdentifierPartCharacter End diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-260.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-260.txt new file mode 100644 index 00000000000..eeb99b6d941 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-260.txt @@ -0,0 +1 @@ +(c) Return SyntaxFacts.IsIdentifierStartCharacter (c) End \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-260.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-260.txt.yml new file mode 100644 index 00000000000..c22534dc792 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-260.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Return SyntaxFacts.IsIdentifierStartCharacter (c) End +holders: + - Return SyntaxFacts.IsIdentifierStartCharacter End diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-261.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-261.txt new file mode 100644 index 00000000000..d86f3fc3b15 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-261.txt @@ -0,0 +1 @@ +(c) (c) TypeOf c.InferredType Is \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-261.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-261.txt.yml new file mode 100644 index 00000000000..d242a123ea2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-261.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) TypeOf c.InferredType Is +holders: + - TypeOf c.InferredType Is diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-265.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-265.txt new file mode 100644 index 00000000000..ef1b87cff16 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-265.txt @@ -0,0 +1 @@ +(c) Unknown Ks \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-265.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-265.txt.yml new file mode 100644 index 00000000000..3b0121f2455 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-265.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Unknown Ks +holders: + - Unknown Ks diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-267.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-267.txt new file mode 100644 index 00000000000..84f35847286 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-267.txt @@ -0,0 +1 @@ +(c) Unknown Xs \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-267.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-267.txt.yml new file mode 100644 index 00000000000..b6ad886b1ac --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-267.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Unknown Xs +holders: + - Unknown Xs diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-268.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-268.txt new file mode 100644 index 00000000000..b9d2355a99d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-268.txt @@ -0,0 +1 @@ +Gt qt (c) Component \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-268.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-268.txt.yml new file mode 100644 index 00000000000..2d046d12a61 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-268.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Gt qt (c) Component +holders: + - Gt qt Component diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-27.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-27.txt new file mode 100644 index 00000000000..8f98291c9a1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-27.txt @@ -0,0 +1 @@ +(c) !a" (c) SSSS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-27.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-27.txt.yml new file mode 100644 index 00000000000..c504bcdc019 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-27.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) !a (c) SSSS +holders: + - SSSS diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-278.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-278.txt new file mode 100644 index 00000000000..960f163ab41 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-278.txt @@ -0,0 +1 @@ +(c) Ae Y \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-278.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-278.txt.yml new file mode 100644 index 00000000000..fedd427b181 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-278.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Ae Y +holders: + - Ae Y diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-280.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-280.txt new file mode 100644 index 00000000000..835d98f8ed0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-280.txt @@ -0,0 +1 @@ +I. (c) Uao \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-280.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-280.txt.yml new file mode 100644 index 00000000000..24776867054 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-280.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - I. (c) Uao +holders: + - I. Uao diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-282.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-282.txt new file mode 100644 index 00000000000..c94a078c54b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-282.txt @@ -0,0 +1 @@ +IsLower (c) IsDigit (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-282.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-282.txt.yml new file mode 100644 index 00000000000..cdaa7611ddf --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-282.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - IsLower (c) IsDigit (c) +holders: + - IsLower IsDigit diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-289.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-289.txt new file mode 100644 index 00000000000..561294a7ef9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-289.txt @@ -0,0 +1 @@ +(c) D'O (c) N \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-289.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-289.txt.yml new file mode 100644 index 00000000000..099b9834b75 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-289.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) D'O (c) N +holders: + - D'O N diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-29.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-29.txt new file mode 100644 index 00000000000..c0a61fda379 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-29.txt @@ -0,0 +1 @@ +(c) !a http://furusatonoeki.cutegirl.jp/main/archives/001177.html \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-29.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-29.txt.yml new file mode 100644 index 00000000000..c2d01fb9a2d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-29.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) !a http://furusatonoeki.cutegirl.jp/main/archives/001177.html +holders: + - http://furusatonoeki.cutegirl.jp/main/archives/001177.html diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-290.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-290.txt new file mode 100644 index 00000000000..164266d8c0e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-290.txt @@ -0,0 +1 @@ +(c) D'O (c) N O \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-290.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-290.txt.yml new file mode 100644 index 00000000000..8d0bc0734cd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-290.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) D'O (c) N O +holders: + - D'O N O diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-291.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-291.txt new file mode 100644 index 00000000000..fe7346c8db2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-291.txt @@ -0,0 +1 @@ +O-UUUO (c) UOSSOO-O (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-291.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-291.txt.yml new file mode 100644 index 00000000000..53d6fa246df --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-291.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) UOSSOO-O (c) +holders: + - UOSSOO-O diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-292.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-292.txt new file mode 100644 index 00000000000..5b0f82830fb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-292.txt @@ -0,0 +1 @@ +(c) UOSSOO-O (c) \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-292.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-292.txt.yml new file mode 100644 index 00000000000..53d6fa246df --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-292.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) UOSSOO-O (c) +holders: + - UOSSOO-O diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-293.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-293.txt new file mode 100644 index 00000000000..dc6a72d275a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-293.txt @@ -0,0 +1 @@ +Copyright (c) 2007-present, < pkg.author > < pkg.license > \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-293.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-293.txt.yml new file mode 100644 index 00000000000..21590673468 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-293.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2007-present, < pkg.author > < pkg.license > +holders: + - < pkg.author > < pkg.license > diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-30.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-30.txt new file mode 100644 index 00000000000..616e94bbca8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-30.txt @@ -0,0 +1 @@ +(c) !C/ http://www.aozora.gr.jp/cards/000160/card3344.html' AEEEUAU3/4aI|oiAi !C/ http://www.aozora.gr.jp/cards/000160/card3342.html' $?I$?i$?I$?iE$?AAE$?IPAdegU !C/ http://www.aozora.gr.jp/cards/000160/card3345.html' oPSAI$?D$?E$?*Eu1cE1/4AA !C/ http://www.aozora.gr.jp/cards/000160/card3347.html' Ai thI11O3o !C/ http://www.aozora.gr.jp/cards/000160/card3346.html' AEC'$? UE-IA'+- !E$?!,o3 <$?u$?i$??!PS!O http://www.aozora.gr.jp/cards/000160/card3343.html'> \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-30.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-30.txt.yml new file mode 100644 index 00000000000..c35b2d60246 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-30.txt.yml @@ -0,0 +1,11 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) !C/ http://www.aozora.gr.jp/cards/000160/card3344.html AEEEUAU3/4aI oiAi !C/ http://www.aozora.gr.jp/cards/000160/card3342.html + $?I$?i$?I$?iE$?AAE$?IPAdegU !C/ http://www.aozora.gr.jp/cards/000160/card3345.html oPSAI$?D$?E$? + Eu1cE1/4AA !C/ http://www.aozora.gr.jp/cards/000160/card3347.html Ai thI11O3o !C/ http://www.aozora.gr.jp/cards/000160/card3346.html +holders: + - C/ AEEEUAU3/4aI oiAi !C/ $?I$?i$?I$?iE$?AAE$?IPAdegU !C/ oPSAI$?D$?E$? Eu1cE1/4AA !C/ Ai + thI11O3o !C diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-301.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-301.txt new file mode 100644 index 00000000000..92708b94624 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-301.txt @@ -0,0 +1 @@ +Copyright (c) 2010 - new \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-301.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-301.txt.yml new file mode 100644 index 00000000000..bcc09538058 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-301.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2010 diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-303.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-303.txt new file mode 100644 index 00000000000..cec8e19d591 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-303.txt @@ -0,0 +1 @@ +Copyright (c) 2011-$ new \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-303.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-303.txt.yml new file mode 100644 index 00000000000..565ab52d5e3 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-303.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2011-$ diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-31.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-31.txt new file mode 100644 index 00000000000..0f9e806e596 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-31.txt @@ -0,0 +1 @@ +(c) !C/ http://www.aozora.gr.jp/cards/001166/card43723.html' !OE21/2n tha!x$?I1/2D,1/2 !C/ http://www.aozora.gr.jp/cards/001166/card43724.html' A,$?Th$?iEN$?A$??AOoaIY uU !C/ http://www.aozora.gr.jp/cards/001166/card43726.html' AI1/4+-$?EA-1/4PS$?E$?II*IY !C/ http://www.aozora.gr.jp/cards/001166/card43727.html' AIEyE,21/2+-?AEdegEo1d !C/ http://www.aozora.gr.jp/cards/001166/card43730.html' Ii$?E 3$?E$? $?<<$?eAEu$?IPP !C/ http://www.aozora.gr.jp/cards/001166/card43731.html'> I+-2$?I*i'E !E$?C$?C/$?e!PS!O http://www.aozora.gr.jp/cards/001166/card43723.html'> \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-31.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-31.txt.yml new file mode 100644 index 00000000000..ab1b98e4317 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-31.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) !C/ http://www.aozora.gr.jp/cards/001166/card43723.html +holders: + - C/ http://www.aozora.gr.jp/cards/001166/card43723.html diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-317.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-317.txt new file mode 100644 index 00000000000..ae24bdd342c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-317.txt @@ -0,0 +1 @@ +(c) Unknown Xd V \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-317.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-317.txt.yml new file mode 100644 index 00000000000..c664a967986 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-317.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Unknown Xd V +holders: + - Unknown Xd V diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-323.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-323.txt new file mode 100644 index 00000000000..ae24bdd342c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-323.txt @@ -0,0 +1 @@ +(c) Unknown Xd V \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-323.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-323.txt.yml new file mode 100644 index 00000000000..c664a967986 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-323.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Unknown Xd V +holders: + - Unknown Xd V diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-326.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-326.txt new file mode 100644 index 00000000000..2448adb9b7c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-326.txt @@ -0,0 +1 @@ +(c) !Oi (c) P \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-326.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-326.txt.yml new file mode 100644 index 00000000000..ec5dd40f50c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-326.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) !Oi (c) P +holders: + - Oi P diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-327.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-327.txt new file mode 100644 index 00000000000..f85eaa65914 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-327.txt @@ -0,0 +1 @@ +(c) (c) AE \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-327.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-327.txt.yml new file mode 100644 index 00000000000..f222c89aa00 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-327.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) AE +holders: + - AE diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-328.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-328.txt new file mode 100644 index 00000000000..280b51a0709 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-328.txt @@ -0,0 +1 @@ +(c) (c) O \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-328.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-328.txt.yml new file mode 100644 index 00000000000..2b60ee8bb1b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-328.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) O +holders: + - O diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-329.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-329.txt new file mode 100644 index 00000000000..8990e20a93b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-329.txt @@ -0,0 +1 @@ +(c) CO \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-329.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-329.txt.yml new file mode 100644 index 00000000000..ac365ec2521 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-329.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) CO +holders: + - CO diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-330.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-330.txt new file mode 100644 index 00000000000..f39371632cb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-330.txt @@ -0,0 +1 @@ +(c) 3UA JanUan \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-330.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-330.txt.yml new file mode 100644 index 00000000000..5ac2a3a37b9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-330.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) 3UA JanUan +holders: + - 3UA JanUan diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-333.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-333.txt new file mode 100644 index 00000000000..f638efb722c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-333.txt @@ -0,0 +1 @@ +(c) AT r'b \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-333.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-333.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-333.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-336.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-336.txt new file mode 100644 index 00000000000..0903a0f15eb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-336.txt @@ -0,0 +1 @@ +(c) CRS-ae Gu \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-336.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-336.txt.yml new file mode 100644 index 00000000000..f912f2ed0a2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-336.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) CRS-ae Gu +holders: + - CRS-ae Gu diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-344.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-344.txt new file mode 100644 index 00000000000..7f5ca09f055 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-344.txt @@ -0,0 +1 @@ +(c) a (c) Q \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-344.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-344.txt.yml new file mode 100644 index 00000000000..a3160d59071 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-344.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) a (c) Q +holders: + - Q diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-345.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-345.txt new file mode 100644 index 00000000000..83e95d5c0a8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-345.txt @@ -0,0 +1 @@ +(c) c (c) K \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-345.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-345.txt.yml new file mode 100644 index 00000000000..fe34c4cf67c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-345.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) c (c) K +holders: + - K diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-346.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-346.txt new file mode 100644 index 00000000000..054677dd0cb --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-346.txt @@ -0,0 +1 @@ +(c) u008fN (c) MOD \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-346.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-346.txt.yml new file mode 100644 index 00000000000..f3be9f0e8df --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-346.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) u008fN (c) MOD +holders: + - u008fN MOD diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-352.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-352.txt new file mode 100644 index 00000000000..4836f8a5507 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-352.txt @@ -0,0 +1 @@ +(c) Cj d Dj \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-352.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-352.txt.yml new file mode 100644 index 00000000000..6820120af00 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-352.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) Cj d Dj +holders: + - Cj d Dj diff --git a/tests/cluecode/data/copyright_fossology/testdata38_raw b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-357.txt similarity index 100% rename from tests/cluecode/data/copyright_fossology/testdata38_raw rename to tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-357.txt diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-357.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-357.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-357.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-358.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-358.txt new file mode 100644 index 00000000000..905c98c2f2b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-358.txt @@ -0,0 +1 @@ +Copyright 2010-$ new \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-358.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-358.txt.yml new file mode 100644 index 00000000000..4124c03f10b --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-358.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright 2010-$ diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-359.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-359.txt new file mode 100644 index 00000000000..d6b7ef376f2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-359.txt @@ -0,0 +1 @@ +(c) ,33 ,BD(b.Xb(c+1),33) : d d BVc a,BD b.Xb \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-359.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-359.txt.yml new file mode 100644 index 00000000000..71218c9cf94 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-359.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) ,33 ,BD(b.Xb(c+1),33) d d BVc +holders: + - BD(b.Xb(c+1),33) d d BVc diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-36.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-36.txt new file mode 100644 index 00000000000..2f86ccfc186 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-36.txt @@ -0,0 +1 @@ +(c) !E http://blog.livedoor.jp/facilitators/' \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-36.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-36.txt.yml new file mode 100644 index 00000000000..a961dbaa3f6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-36.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) !E http://blog.livedoor.jp/facilitators +holders: + - E diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-360.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-360.txt new file mode 100644 index 00000000000..9fe491f44e2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-360.txt @@ -0,0 +1 @@ +(c) q ltd \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-360.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-360.txt.yml new file mode 100644 index 00000000000..531426e3dcd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-360.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) q ltd +holders: + - q ltd diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-363.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-363.txt new file mode 100644 index 00000000000..11728c73102 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-363.txt @@ -0,0 +1 @@ +Copyright (c) 2009- < grunt.template.today 'yyyy > \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-363.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-363.txt.yml new file mode 100644 index 00000000000..d6203dce8a8 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-363.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +copyrights: + - Copyright (c) 2009- diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-37.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-37.txt new file mode 100644 index 00000000000..cd3b4981ea1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-37.txt @@ -0,0 +1 @@ +(c) !E http://www.pinkupa.com/cgi-bin/weblog/archives/000612.php \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-37.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-37.txt.yml new file mode 100644 index 00000000000..8049f1a4027 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-37.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) !E http://www.pinkupa.com/cgi-bin/weblog/archives/000612.php +holders: + - E diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-38.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-38.txt new file mode 100644 index 00000000000..47db5b86174 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-38.txt @@ -0,0 +1 @@ +(c) !eI (c) FE \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-38.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-38.txt.yml new file mode 100644 index 00000000000..10be876b802 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-38.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) !eI (c) FE +holders: + - eI FE diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-39.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-39.txt new file mode 100644 index 00000000000..d06d2f693aa --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-39.txt @@ -0,0 +1 @@ +(c) !PS ODE$?uAECPS!Google 1OuODgooglesucks.com \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-39.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-39.txt.yml new file mode 100644 index 00000000000..ab2be65c013 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-39.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) !PS ODE$?uAECPS!Google 1OuODgooglesucks.com +holders: + - PS ODE$?uAECPS!Google 1OuODgooglesucks.com diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-40.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-40.txt new file mode 100644 index 00000000000..dcfbeda0002 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-40.txt @@ -0,0 +1 @@ +(c) !x!C/!O http://www.aozora.gr.jp/cards/000160/card3344.html' AEEEUAU3/4aI|oiAi !x!C/!O http://www.aozora.gr.jp/cards/000160/card3342.html' $?I$?i$?I$?iE$?AAE$?IPAdegU !x!C/!O http://www.aozora.gr.jp/cards/000160/card3345.html' oPSAI$?D$?E$?*Eu1cE1/4AA !x!C/!O http://www.aozora.gr.jp/cards/000160/card3347.html' Ai thI11O3o !x!C/!O http://www.aozora.gr.jp/cards/000160/card3346.html' \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-40.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-40.txt.yml new file mode 100644 index 00000000000..a27e8c0d733 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-40.txt.yml @@ -0,0 +1,12 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) !x!C/!O http://www.aozora.gr.jp/cards/000160/card3344.html AEEEUAU3/4aI oiAi !x!C/!O + http://www.aozora.gr.jp/cards/000160/card3342.html $?I$?i$?I$?iE$?AAE$?IPAdegU !x!C/!O http://www.aozora.gr.jp/cards/000160/card3345.html + oPSAI$?D$?E$? Eu1cE1/4AA !x!C/!O http://www.aozora.gr.jp/cards/000160/card3347.html Ai thI11O3o + !x!C/!O http://www.aozora.gr.jp/cards/000160/card3346.html +holders: + - x!C/!O AEEEUAU3/4aI oiAi !x!C/!O $?I$?i$?I$?iE$?AAE$?IPAdegU !x!C/!O oPSAI$?D$?E$? Eu1cE1/4AA + !x!C/!O Ai thI11O3o !x!C/!O diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-41.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-41.txt new file mode 100644 index 00000000000..084c98d889d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-41.txt @@ -0,0 +1 @@ +(c) !x!O http://www.aozora.gr.jp/cards/000050/card1174.html' \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-41.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-41.txt.yml new file mode 100644 index 00000000000..eda55448183 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-41.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) !x!O http://www.aozora.gr.jp/cards/000050/card1174.html +holders: + - x!O diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-42.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-42.txt new file mode 100644 index 00000000000..8723864ec34 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-42.txt @@ -0,0 +1 @@ +(c) !x$?E$?$?$?A$??$?I$? <$?a$?*$?i$?E$?$?!PS /> http://www.city.kyoto.jp/somu/rekishi/fm/ishibumi/html/sa043.html \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-42.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-42.txt.yml new file mode 100644 index 00000000000..b11f4412e36 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-42.txt.yml @@ -0,0 +1,4 @@ +what: + - copyrights + - holders + - authors diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-44.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-44.txt new file mode 100644 index 00000000000..41fecce508d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-44.txt @@ -0,0 +1 @@ +(c) ?A$?I1/4Pedegi$?I EAI,oEaY iY $?Y o http://www.aivy.co.jp/BLOG_TEST/kobakoba/archives/003047.html \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-44.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-44.txt.yml new file mode 100644 index 00000000000..a90b20be53f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-44.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) ?A$?I1/4Pedegi$?I EAI,oEaY iY $?Y o http://www.aivy.co.jp/BLOG_TEST/kobakoba/archives/003047.html +holders: + - ?A$?I1/4Pedegi$?I EAI,oEaY iY $?Y o diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-46.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-46.txt new file mode 100644 index 00000000000..fdc9656eb21 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-46.txt @@ -0,0 +1 @@ +(c) ?idegE http://klutzy.x-y.net \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-46.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-46.txt.yml new file mode 100644 index 00000000000..1c73df879d6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-46.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) ?idegE http://klutzy.x-y.net +holders: + - ?idegE diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-52.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-52.txt new file mode 100644 index 00000000000..a848a9b3f31 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-52.txt @@ -0,0 +1 @@ +(c) const projects \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-52.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-52.txt.yml new file mode 100644 index 00000000000..c4a32eb8295 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-52.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) const projects +holders: + - const projects diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-54.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-54.txt new file mode 100644 index 00000000000..45761582bfd --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-54.txt @@ -0,0 +1 @@ +(c) .'2'OTh'qdeg^ A1 Co \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-54.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-54.txt.yml new file mode 100644 index 00000000000..73cff030f06 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-54.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - "(c) .'2\x14'OTh'q\x04\x19deg^ A1 Co" +holders: + - "2\x14'OTh'q\x04\x19deg^ A1 Co" diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-63.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-63.txt new file mode 100644 index 00000000000..acacb08d17f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-63.txt @@ -0,0 +1 @@ +(c) "" (c) SS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-63.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-63.txt.yml new file mode 100644 index 00000000000..d212b2436ed --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-63.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) SS +holders: + - SS diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-64.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-64.txt new file mode 100644 index 00000000000..9b1da2bea6c --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-64.txt @@ -0,0 +1 @@ +(c) ""(r)'+- (c) PS PS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-64.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-64.txt.yml new file mode 100644 index 00000000000..a4db2a9015e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-64.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (r)+- (c) PS PS +holders: + - (r)+- PS PS diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-65.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-65.txt new file mode 100644 index 00000000000..d0ad76eefed --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-65.txt @@ -0,0 +1 @@ +(c) " (c) (c) (c) "SS|Y SS$?!!PSY \00\00\00\00\00O\00\00\00E@oOS1/4'zAO C DTIuA \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-65.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-65.txt.yml new file mode 100644 index 00000000000..d212b2436ed --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-65.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) SS +holders: + - SS diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-66.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-66.txt new file mode 100644 index 00000000000..d503e71bf37 Binary files /dev/null and b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-66.txt differ diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-66.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-66.txt.yml new file mode 100644 index 00000000000..d212b2436ed --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-66.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) SS +holders: + - SS diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-67.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-67.txt new file mode 100644 index 00000000000..e6c32d29f8f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-67.txt @@ -0,0 +1 @@ +(c) " (c) (c) (c) SSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-67.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-67.txt.yml new file mode 100644 index 00000000000..5089d993555 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-67.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) SSY +holders: + - SSY diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-68.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-68.txt new file mode 100644 index 00000000000..819c8a7153e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-68.txt @@ -0,0 +1 @@ +(c) " (c) SSSSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-68.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-68.txt.yml new file mode 100644 index 00000000000..e4b5dc4ecbf --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-68.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) SSSSY +holders: + - SSSSY diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-69.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-69.txt new file mode 100644 index 00000000000..32f8cf76d76 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-69.txt @@ -0,0 +1 @@ +(c) " (c) SSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-69.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-69.txt.yml new file mode 100644 index 00000000000..5089d993555 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-69.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) SSY +holders: + - SSY diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-70.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-70.txt new file mode 100644 index 00000000000..4210fca9941 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-70.txt @@ -0,0 +1 @@ +(c) "(r)" (c) PSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-70.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-70.txt.yml new file mode 100644 index 00000000000..b9006dbb4f4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-70.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (r) (c) PSY +holders: + - (r) PSY diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-71.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-71.txt new file mode 100644 index 00000000000..5437027005e --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-71.txt @@ -0,0 +1 @@ +(c) "(r)2'''322deg+- (c) SS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-71.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-71.txt.yml new file mode 100644 index 00000000000..481e11f7bd4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-71.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (r)2'''322deg+- (c) SS +holders: + - (r)2'''322deg+- SS diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-73.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-73.txt new file mode 100644 index 00000000000..af71bcb37ed --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-73.txt @@ -0,0 +1 @@ +(c) "||PS$?PS$? (c) SSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-73.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-73.txt.yml new file mode 100644 index 00000000000..291ab55f8c5 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-73.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) PS$?PS$? (c) SSY +holders: + - PS$?PS$? SSY diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-76.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-76.txt new file mode 100644 index 00000000000..b3c47909788 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-76.txt @@ -0,0 +1 @@ +(c) "a (c) SS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-76.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-76.txt.yml new file mode 100644 index 00000000000..dc0a8e7d3d2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-76.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) a (c) SS +holders: + - SS diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-77.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-77.txt new file mode 100644 index 00000000000..d7e42b5d4f9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-77.txt @@ -0,0 +1 @@ +(c) "a (c) SSPS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-77.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-77.txt.yml new file mode 100644 index 00000000000..9a3018a833a --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-77.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) a (c) SSPS +holders: + - SSPS diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-78.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-78.txt new file mode 100644 index 00000000000..cbfd740e540 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-78.txt @@ -0,0 +1 @@ +(c) "a (c) SSSSSS \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-78.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-78.txt.yml new file mode 100644 index 00000000000..5d9b350b805 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-78.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) a (c) SSSSSS +holders: + - SSSSSS diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-79.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-79.txt new file mode 100644 index 00000000000..bab7b0b97a4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-79.txt @@ -0,0 +1 @@ +(c) "a (c) SSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-79.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-79.txt.yml new file mode 100644 index 00000000000..f783ca92926 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-79.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) a (c) SSY +holders: + - SSY diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-81.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-81.txt new file mode 100644 index 00000000000..94c0336e2f9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-81.txt @@ -0,0 +1 @@ +(c) "aae http://money.rin.ru/content/news/?id \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-81.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-81.txt.yml new file mode 100644 index 00000000000..72a3a7b2313 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-81.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) aae http://money.rin.ru/content/news/?id +holders: + - aae diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-82.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-82.txt new file mode 100644 index 00000000000..bd80ffe07dc --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-82.txt @@ -0,0 +1 @@ +(c) "SS"|$? (c) (c) (c) SSY \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-82.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-82.txt.yml new file mode 100644 index 00000000000..5089d993555 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-82.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) SSY +holders: + - SSY diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-87.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-87.txt new file mode 100644 index 00000000000..7d613f63be2 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-87.txt @@ -0,0 +1 @@ +(c) (c) ""Y PS! \00\00\00\00\00O\00\00\00E@oEoI'z@uC  DTajA Mo \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-87.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-87.txt.yml new file mode 100644 index 00000000000..36681265ba4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-87.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) Y +holders: + - Y diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-88.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-88.txt new file mode 100644 index 00000000000..a93d31f4329 Binary files /dev/null and b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-88.txt differ diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-88.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-88.txt.yml new file mode 100644 index 00000000000..36681265ba4 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-88.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) Y +holders: + - Y diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-93.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-93.txt new file mode 100644 index 00000000000..b6570404050 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-93.txt @@ -0,0 +1 @@ +(c) (c) "SSSSSSSSSS|||Y |||Y $?PSC/ !C/\00\00\00\00\00O\00\00\00E@oO I'zA |C !DTI A Lo \ No newline at end of file diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-93.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-93.txt.yml new file mode 100644 index 00000000000..16479137baa --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-93.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) SSSSSSSSSS +holders: + - SSSSSSSSSS diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-94.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-94.txt new file mode 100644 index 00000000000..e5fea976467 Binary files /dev/null and b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-94.txt differ diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-94.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-94.txt.yml new file mode 100644 index 00000000000..16479137baa --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-94.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) SSSSSSSSSS +holders: + - SSSSSSSSSS diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-98.txt b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-98.txt new file mode 100644 index 00000000000..0fcd0c94ee8 Binary files /dev/null and b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-98.txt differ diff --git a/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-98.txt.yml b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-98.txt.yml new file mode 100644 index 00000000000..0656f641ab0 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/to_improve/junk-copyright-98.txt.yml @@ -0,0 +1,8 @@ +what: + - copyrights + - holders + - authors +copyrights: + - (c) (c) $? Y C E@oEZO Co +holders: + - $? Y C E@oEZO Co diff --git a/tests/cluecode/data/copyrights/misco4/users-group.txt b/tests/cluecode/data/copyrights/misco4/users-group.txt new file mode 100644 index 00000000000..2f6a1983137 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/users-group.txt @@ -0,0 +1 @@ +developed by the User's Group on Software Tools. diff --git a/tests/cluecode/data/copyrights/misco4/users-group.txt.yml b/tests/cluecode/data/copyrights/misco4/users-group.txt.yml new file mode 100644 index 00000000000..2899822242d --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/users-group.txt.yml @@ -0,0 +1,6 @@ +what: + - copyrights + - holders + - authors +authors: + - the User's Group diff --git a/tests/cluecode/data/copyrights/misco4/year-2077-pm2.txt b/tests/cluecode/data/copyrights/misco4/year-2077-pm2.txt new file mode 100644 index 00000000000..7f4a7e41dc1 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/year-2077-pm2.txt @@ -0,0 +1 @@ +Copyright (c) 2077 PM2 diff --git a/tests/cluecode/data/copyrights/misco4/year-2077-pm2.txt.yml b/tests/cluecode/data/copyrights/misco4/year-2077-pm2.txt.yml new file mode 100644 index 00000000000..ed048a797c9 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/year-2077-pm2.txt.yml @@ -0,0 +1,3 @@ +what: + - copyrights + - holders diff --git a/tests/cluecode/data/copyrights/misco4/year-range-x.txt b/tests/cluecode/data/copyrights/misco4/year-range-x.txt new file mode 100644 index 00000000000..404c876d940 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/year-range-x.txt @@ -0,0 +1 @@ +Copyright (c) 2001-201x IBM diff --git a/tests/cluecode/data/copyrights/misco4/year-range-x.txt.yml b/tests/cluecode/data/copyrights/misco4/year-range-x.txt.yml new file mode 100644 index 00000000000..169f8245ff6 --- /dev/null +++ b/tests/cluecode/data/copyrights/misco4/year-range-x.txt.yml @@ -0,0 +1,7 @@ +what: + - copyrights + - holders +copyrights: + - Copyright (c) 2001-201x IBM +holders: + - IBM diff --git a/tests/cluecode/data/copyrights/name_before_c-c.c.yml b/tests/cluecode/data/copyrights/name_before_c-c.c.yml index 99ec69bea30..d720a13cc17 100644 --- a/tests/cluecode/data/copyrights/name_before_c-c.c.yml +++ b/tests/cluecode/data/copyrights/name_before_c-c.c.yml @@ -3,9 +3,10 @@ what: - holders - holders_summary copyrights: - - Vladimir Oleynik (c) 2003 + - Russ Dill 2001-2003 Rewrited by Vladimir Oleynik (c) + 2003 holders: - - Vladimir Oleynik + - Russ Dill Rewrited by Vladimir Oleynik holders_summary: - - value: Vladimir Oleynik + - value: Russ Dill Rewrited by Vladimir Oleynik count: 1 diff --git a/tests/cluecode/data/copyrights/omega-tech.yml b/tests/cluecode/data/copyrights/omega-tech.yml index 39240924066..4e32f4f1069 100644 --- a/tests/cluecode/data/copyrights/omega-tech.yml +++ b/tests/cluecode/data/copyrights/omega-tech.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) , 2001-2011, Omega Tech. Co., Ltd. + - Copyright (c), 2001-2011, Omega Tech. Co., Ltd. holders: - Omega Tech. Co., Ltd. holders_summary: diff --git a/tests/cluecode/data/copyrights/redhateula-RedHatEULA b/tests/cluecode/data/copyrights/redhateula-RedHatEULA index 091ab4f6748..b697d20522a 100644 --- a/tests/cluecode/data/copyrights/redhateula-RedHatEULA +++ b/tests/cluecode/data/copyrights/redhateula-RedHatEULA @@ -1,111 +1,3 @@ -LICENSE AGREEMENT AND LIMITED PRODUCT WARRANTY -RED HAT LINUX VERSION - -This agreement governs the use of the Software and any updates to the Software, regardless of the delivery mechanism. The Software is a collective work under U.S. Copyright Law. Subject to the following -terms, Red Hat, Inc. (Red Hat) grants to the user (Customer) a -license to this collective work pursuant to the GNU General Public -License. - -1. The Software. Red Hat Enterprise Linux (the Software) is a - modular operating system consisting of hundreds of software - components. The end user license agreement for each component is - located in the component's source code. With the exception of - certain image files identified in Section 2 below, the license - terms for the components permit Customer to copy, modify, and - redistribute the component, in both source code and binary code - forms. This agreement does not limit Customer's rights under, or - grant Customer rights that supersede, the license terms of any - particular component. - -2. Intellectual Property Rights. The Software and each of its - components, including the source code, documentation, appearance, - structure and organization are owned by Red Hat and others and are - protected under copyright and other laws. Title to the Software - and any component, or to any copy, modification, or merged portion - shall remain with the aforementioned, subject to the applicable - license. The Red Hat trademark and the Shadowman logo are - registered trademarks of Red Hat in the U.S. and other countries. - This agreement does not permit Customer to distribute the Software - using Red Hat's trademarks. Customer should read the information - found at http://www.redhat.com/about/corporate/trademark/ before - distributing a copy of the Software, regardless of whether it has - been modified. If Customer makes a commercial redistribution of - the Software, unless a separate agreement with Red Hat is executed - or other permission granted, then Customer must modify the files - identified as REDHAT-LOGOS and anaconda-images to remove all - images containing the Red Hat trademark or the Shadowman logo. - Merely deleting these files may corrupt the Software. - -3. Limited Warranty. Except as specifically stated in this agreement - or a license for a particular component, to the maximum extent - permitted under applicable law, the Software and the components - are provided and licensed as is without warranty of any kind, - expressed or implied, including the implied warranties of - merchantability, non-infringement or fitness for a particular - purpose. Red Hat does not warrant that the functions contained in - the Software will meet Customer's requirements or that the - operation of the Software will be entirely error free or appear - precisely as described in the accompanying documentation. This - warranty extends only to the party that purchases the Software - from Red Hat or a Red Hat authorized distributor. - -4. Limitation of Remedies and Liability. To the maximum extent - permitted by applicable law, the remedies described below are - accepted by Customer as its only remedies. Red Hat's entire - liability, and Customer's exclusive remedies, shall be: If the - Software media is defective, Customer may return it within 30 days - of delivery along with a copy of Customer's payment receipt and - Red Hat, at its option, will replace it or refund the money paid - by Customer for the Software. To the maximum extent permitted by - applicable law, Red Hat or any Red Hat authorized dealer will not - be liable to Customer for any incidental or consequential damages, - including lost profits or lost savings arising out of the use or - inability to use the Software, even if Red Hat or such dealer has - been advised of the possibility of such damages. In no event - shall Red Hat's liability under this agreement exceed the amount - that Customer paid to Red Hat under this agreement during the - twelve months preceding the action. - -5. Export Control. As required by U.S. law, Customer represents and - warrants that it: (a) understands that the Software is subject to - export controls under the U.S. Commerce Department's Export - Administration Regulations (EAR); (b) is not located in a - prohibited destination country under the EAR or U.S. sanctions - regulations (currently Cuba, Iran, Iraq, Libya, North Korea, Sudan - and Syria); (c) will not export, re-export, or transfer the - Software to any prohibited destination, entity, or individual - without the necessary export license(s) or authorizations(s) from - the U.S. Government; (d) will not use or transfer the Software for - use in any sensitive nuclear, chemical or biological weapons, or - missile technology end-uses unless authorized by the - U.S. Government by regulation or specific license; (e) understands - and agrees that if it is in the United States and exports or - transfers the Software to eligible end users, it will, as required - by EAR Section 741.17(e), submit semi-annual reports to the - Commerce Department's Bureau of Industry & Security (BIS), which - include the name and address (including country) of each - transferee; and (f) understands that countries other than the - United States may restrict the import, use, or export of - encryption products and that it shall be solely responsible for - compliance with any such import, use, or export restrictions. - -6. Third Party Programs. Red Hat may distribute third party software - programs with the Software that are not part of the Software. - These third party programs are subject to their own license terms. - The license terms either accompany the programs or can be viewed - at http://www.redhat.com/licenses/. If Customer does not agree to - abide by the applicable license terms for such programs, then - Customer may not install them. If Customer wishes to install the - programs on more than one system or transfer the programs to - another party, then Customer must contact the licensor of the - programs. -7. General. If any provision of this agreement is held to be - unenforceable, that shall not affect the enforceability of the - remaining provisions. This agreement shall be governed by the - laws of the State of North Carolina and of the United States, - without regard to any conflict of laws provisions, except that the - United Nations Convention on the International Sale of Goods shall - not apply. diff --git a/tests/cluecode/data/copyrights/sample_py-py.py b/tests/cluecode/data/copyrights/sample_py-py.py index 3f93b934791..901caa08a43 100644 --- a/tests/cluecode/data/copyrights/sample_py-py.py +++ b/tests/cluecode/data/copyrights/sample_py-py.py @@ -1,9 +1,16 @@ -# /* -# ******************************************************************************** -# * -# * C M O D U L E C L U S T E R F I L E -# * # * COPYRIGHT 2006 ABC # * ABC CONFIDENTIAL PROPRIETARY -# * -# ******************************************************************************** + + + + + +-- Copyright 2006 (c) , Motorola, Inc. +-- Motorola Confidential Proprietary + + + + + ++## Metalink L.T.D. (c) Copyright 2006. ++## Metalink Confidential Proprietary. diff --git a/tests/cluecode/data/copyrights/sample_py-py.py.yml b/tests/cluecode/data/copyrights/sample_py-py.py.yml index 5fda57dee9d..56de5e6eb81 100644 --- a/tests/cluecode/data/copyrights/sample_py-py.py.yml +++ b/tests/cluecode/data/copyrights/sample_py-py.py.yml @@ -1,11 +1,11 @@ what: - copyrights - holders - - holders_summary copyrights: - - COPYRIGHT 2006 ABC + - COPYRIGHT 2006 ABC ABC CONFIDENTIAL PROPRIETARY + - Copyright 2006 (c), Motorola, Inc. - Motorola Confidential Proprietary + - Metalink L.T.D. (c) Copyright 2006 holders: - - ABC -holders_summary: - - value: ABC - count: 1 + - ABC ABC CONFIDENTIAL PROPRIETARY + - Motorola, Inc. - Motorola Confidential Proprietary + - Metalink L.T.D. diff --git a/tests/cluecode/data/copyrights/with_date_in_angle_brackets.txt.yml b/tests/cluecode/data/copyrights/with_date_in_angle_brackets.txt.yml index 1185b792707..6f3ff5e01ee 100644 --- a/tests/cluecode/data/copyrights/with_date_in_angle_brackets.txt.yml +++ b/tests/cluecode/data/copyrights/with_date_in_angle_brackets.txt.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) <2013> , GENIVI Alliance, Inc. + - Copyright (c) 2013, GENIVI Alliance, Inc. holders: - GENIVI Alliance, Inc. holders_summary: diff --git a/tests/cluecode/data/copyrights/with_trailing_words.js.yml b/tests/cluecode/data/copyrights/with_trailing_words.js.yml index f8516216aa4..95008048309 100644 --- a/tests/cluecode/data/copyrights/with_trailing_words.js.yml +++ b/tests/cluecode/data/copyrights/with_trailing_words.js.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright 2012-2015 The Dojo Foundation + - Copyright 2012-2015 The Dojo Foundation http://dojofoundation.org - Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors diff --git a/tests/cluecode/data/copyrights/wxWindows Library .0 variant b/tests/cluecode/data/copyrights/wxWindows_Library_.0_variant similarity index 100% rename from tests/cluecode/data/copyrights/wxWindows Library .0 variant rename to tests/cluecode/data/copyrights/wxWindows_Library_.0_variant diff --git a/tests/cluecode/data/copyrights/wxWindows Library .0 variant.yml b/tests/cluecode/data/copyrights/wxWindows_Library_.0_variant.yml similarity index 100% rename from tests/cluecode/data/copyrights/wxWindows Library .0 variant.yml rename to tests/cluecode/data/copyrights/wxWindows_Library_.0_variant.yml diff --git a/tests/cluecode/data/credits/CREDITS b/tests/cluecode/data/credits/CREDITS new file mode 100644 index 00000000000..c060995de96 --- /dev/null +++ b/tests/cluecode/data/credits/CREDITS @@ -0,0 +1,115 @@ + This is at least a partial credits-file of people that have + contributed to the Linux project. It is sorted by name and + formatted to allow easy grepping and beautification by + scripts. The fields are: name (N), email (E), web-address + (W), PGP key ID and fingerprint (P), description (D), and + snail-mail address (S). + Thanks, + + Linus +---------- + +N: Matt Mackal +E: mpm@selenic.com +D: SLOB slab allocator + +N: Werner Almesberger +E: werner@almesberger.net +W: http://www.almesberger.net/ +D: dosfs, LILO, some fd features, ATM, various other hacks here and there +S: Buenos Aires +S: Argentina + +N: Tim Alpaerts +E: tim_alpaerts@toyota-motor-europe.com +D: 802.2 class II logical link control layer, +D: the humble start of an opening towards the IBM SNA protocols +S: Klaproosstraat 72 c 10 +S: B-2610 Wilrijk-Antwerpen +S: Belgium + +N: Anton Altaparmakov +E: aia21@cantab.net +W: http://www-stu.christs.cam.ac.uk/~aia21/ +D: Author of new NTFS driver, various other kernel hacks. +S: Christ's College +S: Cambridge CB2 3BU +S: United Kingdom + +N: C. Scott Ananian +E: cananian@alumni.princeton.edu +W: http://www.pdos.lcs.mit.edu/~cananian +P: 1024/85AD9EED AD C0 49 08 91 67 DF D7 FA 04 1A EE 09 E8 44 B0 +D: Unix98 pty support. +D: APM update to 1.2 spec. +D: /devfs hacking. +S: 7 Kiwi Loop +S: Howell, NJ 07731 +S: USA + +N: Erik Andersen +E: andersen@codepoet.org +W: http://www.codepoet.org/ +P: 1024D/30D39057 1BC4 2742 E885 E4DE 9301 0C82 5F9B 643E 30D3 9057 +D: Maintainer of ide-cd and Uniform CD-ROM driver, +D: ATAPI CD-Changer support, Major 2.1.x CD-ROM update. +S: 352 North 525 East +S: Springville, Utah 84663 +S: USA + +N: Michel Aubry +E: giovanni +D: Aladdin 1533/1543(C) chipset IDE +D: VIA MVP-3/TX Pro III chipset IDE + +N: Ralf Baechle +E: ralf@gnu.org +P: 1024/AF7B30C1 CF 97 C2 CC 6D AE A7 FE C8 BA 9C FC 88 DE 32 C3 +D: Linux/MIPS port +D: Linux/68k hacker +S: Hauptstrasse 19 +S: 79837 St. Blasien +S: Germany + +N: Krishna Balasubramanian +E: balasub@cis.ohio-state.edu +D: Wrote SYS V IPC (part of standard kernel since 0.99.10) + +N: Chris Ball +E: chris@printf.net +D: Former maintainer of the MMC/SD/SDIO subsystem. + +N: Dario Ballabio +E: ballabio_dario@emc.com +E: dario.ballabio@tiscalinet.it +E: dario.ballabio@inwind.it +D: Author and maintainer of the Ultrastor 14F/34F SCSI driver +D: Author and maintainer of the EATA ISA/EISA/PCI SCSI driver +S: EMC Corporation +S: Milano +S: Italy + +N: Paul Bame +E: bame@debian.org +E: bame@puffin.external.hp.com +E: paul_bame@hp.com +W: http://www.parisc-linux.org +D: PA-RISC 32 and 64-bit early boot, firmware interface, interrupts, misc +S: MS42 +S: Hewlett-Packard +S: 3404 E Harmony Rd +S: Fort Collins, CO 80525 +S: USA + +N: Juan Jose Ciarlante +W: http://juanjox.kernelnotes.org/ +E: jjciarla@raiz.uncu.edu.ar +E: jjo@mendoza.gov.ar +D: Network driver alias support +D: IP masq hashing and app modules +D: IP masq 2.1 features and bugs +S: Las Cuevas 2385 - Bo Guemes +S: Las Heras, Mendoza CP 5539 +S: Argentina +W: http://juanjox.raiz.uncu.edu.ar/ + diff --git a/tests/cluecode/data/credits/CREDITS-expected-copyrights.json b/tests/cluecode/data/credits/CREDITS-expected-copyrights.json new file mode 100644 index 00000000000..e3b86ff9108 --- /dev/null +++ b/tests/cluecode/data/credits/CREDITS-expected-copyrights.json @@ -0,0 +1,67 @@ +[ + { + "author": "Matt Mackal mpm@selenic.com", + "start_line": 12, + "end_line": 13 + }, + { + "author": "Werner Almesberger werner@almesberger.net http://www.almesberger.net/", + "start_line": 16, + "end_line": 18 + }, + { + "author": "Tim Alpaerts tim_alpaerts@toyota-motor-europe.com", + "start_line": 23, + "end_line": 24 + }, + { + "author": "Anton Altaparmakov aia21@cantab.net http://www-stu.christs.cam.ac.uk/~aia21/", + "start_line": 31, + "end_line": 33 + }, + { + "author": "C. Scott Ananian cananian@alumni.princeton.edu http://www.pdos.lcs.mit.edu/~cananian", + "start_line": 39, + "end_line": 41 + }, + { + "author": "Erik Andersen andersen@codepoet.org http://www.codepoet.org/", + "start_line": 50, + "end_line": 52 + }, + { + "author": "Michel Aubry giovanni ", + "start_line": 60, + "end_line": 61 + }, + { + "author": "Ralf Baechle ralf@gnu.org", + "start_line": 65, + "end_line": 66 + }, + { + "author": "Krishna Balasubramanian balasub@cis.ohio-state.edu", + "start_line": 74, + "end_line": 75 + }, + { + "author": "Chris Ball chris@printf.net", + "start_line": 78, + "end_line": 79 + }, + { + "author": "Dario Ballabio ballabio_dario@emc.com dario.ballabio@tiscalinet.it dario.ballabio@inwind.it", + "start_line": 82, + "end_line": 85 + }, + { + "author": "Paul Bame bame@debian.org bame@puffin.external.hp.com paul_bame@hp.com http://www.parisc-linux.org", + "start_line": 92, + "end_line": 96 + }, + { + "author": "Juan Jose Ciarlante jjciarla@raiz.uncu.edu.ar jjo@mendoza.gov.ar http://juanjox.kernelnotes.org/ http://juanjox.raiz.uncu.edu.ar/", + "start_line": 104, + "end_line": 114 + } +] \ No newline at end of file diff --git a/tests/cluecode/data/credits/CREDITS-expected-credits.json b/tests/cluecode/data/credits/CREDITS-expected-credits.json new file mode 100644 index 00000000000..e3b86ff9108 --- /dev/null +++ b/tests/cluecode/data/credits/CREDITS-expected-credits.json @@ -0,0 +1,67 @@ +[ + { + "author": "Matt Mackal mpm@selenic.com", + "start_line": 12, + "end_line": 13 + }, + { + "author": "Werner Almesberger werner@almesberger.net http://www.almesberger.net/", + "start_line": 16, + "end_line": 18 + }, + { + "author": "Tim Alpaerts tim_alpaerts@toyota-motor-europe.com", + "start_line": 23, + "end_line": 24 + }, + { + "author": "Anton Altaparmakov aia21@cantab.net http://www-stu.christs.cam.ac.uk/~aia21/", + "start_line": 31, + "end_line": 33 + }, + { + "author": "C. Scott Ananian cananian@alumni.princeton.edu http://www.pdos.lcs.mit.edu/~cananian", + "start_line": 39, + "end_line": 41 + }, + { + "author": "Erik Andersen andersen@codepoet.org http://www.codepoet.org/", + "start_line": 50, + "end_line": 52 + }, + { + "author": "Michel Aubry giovanni ", + "start_line": 60, + "end_line": 61 + }, + { + "author": "Ralf Baechle ralf@gnu.org", + "start_line": 65, + "end_line": 66 + }, + { + "author": "Krishna Balasubramanian balasub@cis.ohio-state.edu", + "start_line": 74, + "end_line": 75 + }, + { + "author": "Chris Ball chris@printf.net", + "start_line": 78, + "end_line": 79 + }, + { + "author": "Dario Ballabio ballabio_dario@emc.com dario.ballabio@tiscalinet.it dario.ballabio@inwind.it", + "start_line": 82, + "end_line": 85 + }, + { + "author": "Paul Bame bame@debian.org bame@puffin.external.hp.com paul_bame@hp.com http://www.parisc-linux.org", + "start_line": 92, + "end_line": 96 + }, + { + "author": "Juan Jose Ciarlante jjciarla@raiz.uncu.edu.ar jjo@mendoza.gov.ar http://juanjox.kernelnotes.org/ http://juanjox.raiz.uncu.edu.ar/", + "start_line": 104, + "end_line": 114 + } +] \ No newline at end of file diff --git a/tests/cluecode/data/generated/copyright_4.txt.yml b/tests/cluecode/data/generated/copyright_4.txt.yml index 4e04fc916f3..059bd8cfbe5 100644 --- a/tests/cluecode/data/generated/copyright_4.txt.yml +++ b/tests/cluecode/data/generated/copyright_4.txt.yml @@ -3,6 +3,6 @@ what: - copyrights - authors copyrights: - - Copyright (c) , 2001-2011, Acme Tech. Co. Ltd. + - Copyright (c), 2001-2011, Acme Tech. Co. Ltd. holders: - Acme Tech. Co. Ltd. diff --git a/tests/cluecode/data/ics/bison-src/getargs.c.yml b/tests/cluecode/data/ics/bison-src/getargs.c.yml index 71eddd7459b..c8fc72d4156 100644 --- a/tests/cluecode/data/ics/bison-src/getargs.c.yml +++ b/tests/cluecode/data/ics/bison-src/getargs.c.yml @@ -5,7 +5,7 @@ what: copyrights: - Copyright (c) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - - Copyright (c) Free Software Foundation, Inc. , 2006 + - Copyright (c) Free Software Foundation, Inc., 2006 holders: - Free Software Foundation, Inc. - Free Software Foundation, Inc. diff --git a/tests/cluecode/data/ics/chromium-chrome-browser-resources/about_credits.html.yml b/tests/cluecode/data/ics/chromium-chrome-browser-resources/about_credits.html.yml index abbfc8961d6..4ff54e89242 100644 --- a/tests/cluecode/data/ics/chromium-chrome-browser-resources/about_credits.html.yml +++ b/tests/cluecode/data/ics/chromium-chrome-browser-resources/about_credits.html.yml @@ -175,7 +175,7 @@ holders: - Thomas Broyer, Charlie Bozeman and Daniel Veillard - Free Software Foundation, Inc. - the Free Software Foundation - - Nick Galbreath - nickg at modp dot com + - Nick Galbreath - MolokoCacao - Sergey Lyubka - Gilbert Wellisch @@ -318,7 +318,7 @@ holders_summary: count: 1 - value: Nara Institute of Science and Technology count: 1 - - value: Nick Galbreath - nickg at modp dot com + - value: Nick Galbreath count: 1 - value: Niels Provos count: 1 diff --git a/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-oauth_contacts/NOTICE.yml b/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-oauth_contacts/NOTICE.yml index bd977225b17..6909a1ae13e 100644 --- a/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-oauth_contacts/NOTICE.yml +++ b/tests/cluecode/data/ics/chromium-chrome-common-extensions-docs-examples-extensions-oauth_contacts/NOTICE.yml @@ -10,9 +10,9 @@ copyrights: holders: - unitedHeroes.net - unitedHeroes.net - - Paul Johnston - Other contributors Greg Holt, Andrew Kepert, Ydnar, Lostinet + - Paul Johnston Other contributors Greg Holt, Andrew Kepert, Ydnar, Lostinet holders_summary: - value: unitedHeroes.net count: 2 - - value: Paul Johnston - Other contributors Greg Holt, Andrew Kepert, Ydnar, Lostinet + - value: Paul Johnston Other contributors Greg Holt, Andrew Kepert, Ydnar, Lostinet count: 1 diff --git a/tests/cluecode/data/ics/chromium-third_party-modp_b64/LICENSE.yml b/tests/cluecode/data/ics/chromium-third_party-modp_b64/LICENSE.yml index d0ae2b91633..e191755a5ef 100644 --- a/tests/cluecode/data/ics/chromium-third_party-modp_b64/LICENSE.yml +++ b/tests/cluecode/data/ics/chromium-third_party-modp_b64/LICENSE.yml @@ -5,7 +5,7 @@ what: copyrights: - Copyright (c) 2005, 2006 Nick Galbreath - nickg at modp dot com holders: - - Nick Galbreath - nickg at modp dot com + - Nick Galbreath holders_summary: - - value: Nick Galbreath - nickg at modp dot com + - value: Nick Galbreath count: 1 diff --git a/tests/cluecode/data/ics/chromium-third_party-modp_b64/modp_b64.cc.yml b/tests/cluecode/data/ics/chromium-third_party-modp_b64/modp_b64.cc.yml index d0ae2b91633..e191755a5ef 100644 --- a/tests/cluecode/data/ics/chromium-third_party-modp_b64/modp_b64.cc.yml +++ b/tests/cluecode/data/ics/chromium-third_party-modp_b64/modp_b64.cc.yml @@ -5,7 +5,7 @@ what: copyrights: - Copyright (c) 2005, 2006 Nick Galbreath - nickg at modp dot com holders: - - Nick Galbreath - nickg at modp dot com + - Nick Galbreath holders_summary: - - value: Nick Galbreath - nickg at modp dot com + - value: Nick Galbreath count: 1 diff --git a/tests/cluecode/data/ics/chromium-third_party-modp_b64/modp_b64.h.yml b/tests/cluecode/data/ics/chromium-third_party-modp_b64/modp_b64.h.yml index 0c75b69db6c..0fd8df20f83 100644 --- a/tests/cluecode/data/ics/chromium-third_party-modp_b64/modp_b64.h.yml +++ b/tests/cluecode/data/ics/chromium-third_party-modp_b64/modp_b64.h.yml @@ -5,7 +5,7 @@ what: copyrights: - Copyright (c) 2005, 2006, Nick Galbreath - nickg at modp dot com holders: - - Nick Galbreath - nickg at modp dot com + - Nick Galbreath holders_summary: - - value: Nick Galbreath - nickg at modp dot com + - value: Nick Galbreath count: 1 diff --git a/tests/cluecode/data/ics/dbus/acinclude.m4.yml b/tests/cluecode/data/ics/dbus/acinclude.m4.yml index eb0def83778..35e803e0236 100644 --- a/tests/cluecode/data/ics/dbus/acinclude.m4.yml +++ b/tests/cluecode/data/ics/dbus/acinclude.m4.yml @@ -4,7 +4,7 @@ what: - holders_summary copyrights: - Copyright (c) 2004 Scott James Remnant - - (c) 2003, 2004, 2005 Thomas Vander Stichele + - (c) 2003, 2004, 2005 Thomas Vander Stichele thomas at apestaart dot org holders: - Scott James Remnant - Thomas Vander Stichele diff --git a/tests/cluecode/data/ics/dnsmasq/COPYING-v3.yml b/tests/cluecode/data/ics/dnsmasq/COPYING-v3.yml index 969dd701e0c..7796a83acf7 100644 --- a/tests/cluecode/data/ics/dnsmasq/COPYING-v3.yml +++ b/tests/cluecode/data/ics/dnsmasq/COPYING-v3.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. http://fsf.org holders: - Free Software Foundation, Inc. holders_summary: diff --git a/tests/cluecode/data/ics/genext2fs/genext2fs.c.yml b/tests/cluecode/data/ics/genext2fs/genext2fs.c.yml index 32314f2a0e5..264194cc4d3 100644 --- a/tests/cluecode/data/ics/genext2fs/genext2fs.c.yml +++ b/tests/cluecode/data/ics/genext2fs/genext2fs.c.yml @@ -9,7 +9,7 @@ copyrights: - Copyright (c) 2002 Edward Betts - Copyright (c) 2002 Ixia communications - Copyright (c) 2002 Ixia communications - - Copyright (c) 2002 Ixia communications + - Copyright (c) 2002 Ixia communications 5 Jan 2003 holders: - Xavier Bestel - Lineo, inc. and John Beppu diff --git a/tests/cluecode/data/ics/guava/guava.ipr.yml b/tests/cluecode/data/ics/guava/guava.ipr.yml index 1295bb5795d..126f0ce7b49 100644 --- a/tests/cluecode/data/ics/guava/guava.ipr.yml +++ b/tests/cluecode/data/ics/guava/guava.ipr.yml @@ -2,6 +2,6 @@ what: - copyrights - holders copyrights: - - Copyright (c) & 36 today.year Google Inc. + - Copyright (c) & 36 today.year Google holders: - - Google Inc. + - Google diff --git a/tests/cluecode/data/ics/iptables-extensions/libxt_connmark.c.yml b/tests/cluecode/data/ics/iptables-extensions/libxt_connmark.c.yml index b1b30e862f4..69e7445dcbc 100644 --- a/tests/cluecode/data/ics/iptables-extensions/libxt_connmark.c.yml +++ b/tests/cluecode/data/ics/iptables-extensions/libxt_connmark.c.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - (c) 2002,2004 MARA Systems AB + - (c) 2002,2004 MARA Systems AB http://www.marasystems.com holders: - MARA Systems AB holders_summary: diff --git a/tests/cluecode/data/ics/iptables-extensions/libxt_conntrack.c.yml b/tests/cluecode/data/ics/iptables-extensions/libxt_conntrack.c.yml index afc1f36a6d5..cd3833fb2e4 100644 --- a/tests/cluecode/data/ics/iptables-extensions/libxt_conntrack.c.yml +++ b/tests/cluecode/data/ics/iptables-extensions/libxt_conntrack.c.yml @@ -7,9 +7,9 @@ copyrights: - Copyright (c) CC Computer Consultants GmbH, 2007 - 2008 Jan Engelhardt holders: - Marc Boucher - - CC Computer Consultants GmbH, - Jan Engelhardt + - CC Computer Consultants GmbH, Jan Engelhardt holders_summary: - - value: CC Computer Consultants GmbH, - Jan Engelhardt + - value: CC Computer Consultants GmbH, Jan Engelhardt count: 1 - value: Marc Boucher count: 1 diff --git a/tests/cluecode/data/ics/iptables-extensions/libxt_owner.c.yml b/tests/cluecode/data/ics/iptables-extensions/libxt_owner.c.yml index e7659ed364c..0bc5036e119 100644 --- a/tests/cluecode/data/ics/iptables-extensions/libxt_owner.c.yml +++ b/tests/cluecode/data/ics/iptables-extensions/libxt_owner.c.yml @@ -5,7 +5,7 @@ what: copyrights: - Copyright (c) CC Computer Consultants GmbH, 2007 - 2008 Jan Engelhardt holders: - - CC Computer Consultants GmbH, - Jan Engelhardt + - CC Computer Consultants GmbH, Jan Engelhardt holders_summary: - - value: CC Computer Consultants GmbH, - Jan Engelhardt + - value: CC Computer Consultants GmbH, Jan Engelhardt count: 1 diff --git a/tests/cluecode/data/ics/kernel-headers-original-linux-netfilter/xt_CONNMARK.h.yml b/tests/cluecode/data/ics/kernel-headers-original-linux-netfilter/xt_CONNMARK.h.yml index de3020e1ac3..35fc7cb8bbc 100644 --- a/tests/cluecode/data/ics/kernel-headers-original-linux-netfilter/xt_CONNMARK.h.yml +++ b/tests/cluecode/data/ics/kernel-headers-original-linux-netfilter/xt_CONNMARK.h.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2002,2004 MARA Systems AB + - Copyright (c) 2002,2004 MARA Systems AB http://www.marasystems.com holders: - MARA Systems AB holders_summary: diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/License.text.yml b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/License.text.yml index a2a73369a15..18c63e0833d 100644 --- a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/License.text.yml +++ b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/License.text.yml @@ -3,8 +3,8 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2004-2008 Michel Fortin - - Copyright (c) 2003-2006 John Gruber + - Copyright (c) 2004-2008 Michel Fortin http://www.michelf.com + - Copyright (c) 2003-2006 John Gruber http://daringfireball.net holders: - Michel Fortin - John Gruber diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/PHP Markdown Extra Readme.text.yml b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/PHP Markdown Extra Readme.text.yml deleted file mode 100644 index 8f60f5247a0..00000000000 --- a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/PHP Markdown Extra Readme.text.yml +++ /dev/null @@ -1,15 +0,0 @@ -what: - - copyrights - - holders - - holders_summary -copyrights: - - Copyright (c) 2004-2005 Michel Fortin - - Copyright (c) 2003-2005 John Gruber -holders: - - Michel Fortin - - John Gruber -holders_summary: - - value: John Gruber - count: 1 - - value: Michel Fortin - count: 1 diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/PHP Markdown Extra Readme.text b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/PHP_Markdown_Extra_Readme.text similarity index 100% rename from tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/PHP Markdown Extra Readme.text rename to tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/PHP_Markdown_Extra_Readme.text diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/PHP_Markdown_Extra_Readme.text.yml b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/PHP_Markdown_Extra_Readme.text.yml new file mode 100644 index 00000000000..9c9e912efac --- /dev/null +++ b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/PHP_Markdown_Extra_Readme.text.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - Copyright (c) 2004-2005 Michel Fortin http://www.michelf.com + - Copyright (c) 2003-2005 John Gruber http://daringfireball.net +holders: + - Michel Fortin + - John Gruber +holders_summary: + - value: John Gruber + count: 1 + - value: Michel Fortin + count: 1 diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/markdown.php.yml b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/markdown.php.yml index 094660aafdc..ab753630f65 100644 --- a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/markdown.php.yml +++ b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-Markdown-Extra-1.2.3/markdown.php.yml @@ -3,8 +3,8 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 2004-2008 Michel Fortin - - Copyright (c) 2004-2006 John Gruber + - Copyright (c) 2004-2008 Michel Fortin http://www.michelf.com/projects/php-markdown + - Copyright (c) 2004-2006 John Gruber http://daringfireball.net/projects/markdown - Copyright (c) 2004-2008 Michel Fortin http://www.michelf.com - Copyright (c) 2003-2006 John Gruber http://daringfireball.net holders: diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/PHP SmartyPants Readme.txt.yml b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/PHP SmartyPants Readme.txt.yml deleted file mode 100644 index 17f9385c0e7..00000000000 --- a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/PHP SmartyPants Readme.txt.yml +++ /dev/null @@ -1,15 +0,0 @@ -what: - - copyrights - - holders - - holders_summary -copyrights: - - Copyright (c) 2005 Michel Fortin - - Copyright (c) 2003-2004 John Gruber -holders: - - Michel Fortin - - John Gruber -holders_summary: - - value: John Gruber - count: 1 - - value: Michel Fortin - count: 1 diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/PHP SmartyPants Readme.txt b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/PHP_SmartyPants_Readme.txt similarity index 100% rename from tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/PHP SmartyPants Readme.txt rename to tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/PHP_SmartyPants_Readme.txt diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/PHP_SmartyPants_Readme.txt.yml b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/PHP_SmartyPants_Readme.txt.yml new file mode 100644 index 00000000000..be8109fc9c9 --- /dev/null +++ b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/PHP_SmartyPants_Readme.txt.yml @@ -0,0 +1,15 @@ +what: + - copyrights + - holders + - holders_summary +copyrights: + - Copyright (c) 2005 Michel Fortin http://www.michelf.com + - Copyright (c) 2003-2004 John Gruber http://daringfireball.net +holders: + - Michel Fortin + - John Gruber +holders_summary: + - value: John Gruber + count: 1 + - value: Michel Fortin + count: 1 diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/smartypants.php.yml b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/smartypants.php.yml index 8f932fd5455..e05548a6269 100644 --- a/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/smartypants.php.yml +++ b/tests/cluecode/data/ics/libvpx-examples-includes-PHP-SmartyPants-1.5.1e/smartypants.php.yml @@ -6,7 +6,7 @@ copyrights: - Copyright (c) 2003-2004 John Gruber - Copyright (c) 2004-2005 Michel Fortin - Copyright (c) 2003 John Gruber http://daringfireball.net - - Copyright (c) 2004-2005 Michel Fortin + - Copyright (c) 2004-2005 Michel Fortin http://www.michelf.com holders: - John Gruber - Michel Fortin diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-geshi-docs/geshi-doc.html.yml b/tests/cluecode/data/ics/libvpx-examples-includes-geshi-docs/geshi-doc.html.yml index 1170e2c2936..afecd353948 100644 --- a/tests/cluecode/data/ics/libvpx-examples-includes-geshi-docs/geshi-doc.html.yml +++ b/tests/cluecode/data/ics/libvpx-examples-includes-geshi-docs/geshi-doc.html.yml @@ -16,14 +16,14 @@ copyrights: - Copyright (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - Copyright (c) 2008 holders: - - Nigel McNie, - Benny Baumann - - Nigel McNie, - Benny Baumann - - Nigel McNie, - Benny Baumann - - Nigel McNie, - Benny Baumann - - Nigel McNie, - Benny Baumann + - Nigel McNie, Benny Baumann + - Nigel McNie, Benny Baumann + - Nigel McNie, Benny Baumann + - Nigel McNie, Benny Baumann + - Nigel McNie, Benny Baumann - Nigel McNie holders_summary: - - value: Nigel McNie, - Benny Baumann + - value: Nigel McNie, Benny Baumann count: 5 - value: Nigel McNie count: 1 diff --git a/tests/cluecode/data/ics/libvpx-examples-includes-geshi-docs/geshi-doc.txt.yml b/tests/cluecode/data/ics/libvpx-examples-includes-geshi-docs/geshi-doc.txt.yml index 1e8144f3613..a26849f1d12 100644 --- a/tests/cluecode/data/ics/libvpx-examples-includes-geshi-docs/geshi-doc.txt.yml +++ b/tests/cluecode/data/ics/libvpx-examples-includes-geshi-docs/geshi-doc.txt.yml @@ -8,7 +8,7 @@ copyrights: - Copyright (c) 2004 Nigel McNie (http://qbnz.com/highlighter/) - Copyright (c) 2004 holders: - - Nigel McNie, - Benny Baumann + - Nigel McNie, Benny Baumann - Nigel McNie authors: - Nigel McNie, Benny Baumann @@ -16,5 +16,5 @@ authors: holders_summary: - value: Nigel McNie count: 1 - - value: Nigel McNie, - Benny Baumann + - value: Nigel McNie, Benny Baumann count: 1 diff --git a/tests/cluecode/data/ics/lohit-fonts-lohit-bengali-ttf/COPYRIGHT.yml b/tests/cluecode/data/ics/lohit-fonts-lohit-bengali-ttf/COPYRIGHT.yml index 45e8964410a..76c52372790 100644 --- a/tests/cluecode/data/ics/lohit-fonts-lohit-bengali-ttf/COPYRIGHT.yml +++ b/tests/cluecode/data/ics/lohit-fonts-lohit-bengali-ttf/COPYRIGHT.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright 2011 Lohit Fonts Project contributors. + - Copyright 2011 Lohit Fonts Project contributors. http://fedorahosted.org/lohit holders: - Lohit Fonts Project contributors holders_summary: diff --git a/tests/cluecode/data/ics/lohit-fonts/NOTICE.yml b/tests/cluecode/data/ics/lohit-fonts/NOTICE.yml index 09c1f04c595..b83b310a5ae 100644 --- a/tests/cluecode/data/ics/lohit-fonts/NOTICE.yml +++ b/tests/cluecode/data/ics/lohit-fonts/NOTICE.yml @@ -3,7 +3,7 @@ what: - holders - holders_summary copyrights: - - Copyright 2011 Lohit Fonts Project contributors + - Copyright 2011 Lohit Fonts Project contributors http://fedorahosted.org/lohit holders: - Lohit Fonts Project contributors holders_summary: diff --git a/tests/cluecode/data/ics/ppp-pppd-plugins/winbind.c.yml b/tests/cluecode/data/ics/ppp-pppd-plugins/winbind.c.yml index 0cace8b387a..556296c0aa3 100644 --- a/tests/cluecode/data/ics/ppp-pppd-plugins/winbind.c.yml +++ b/tests/cluecode/data/ics/ppp-pppd-plugins/winbind.c.yml @@ -11,7 +11,7 @@ copyrights: - Copyright (c) 1997, Miguel A.L. Paraz - Copyright (c) 1995,1996,1997,1998 Lars Fenneberg - Copyright (c) 2002 Roaring Penguin Software Inc. - - Copyright (c) 2003, Sean E. Millichamp + - Copyright (c) 2003, Sean E. Millichamp sean at bruenor dot org - Copyright (c) Andrew Tridgell 1992-2001 - Copyright (c) Simo Sorce 2001-2002 - Copyright (c) Martin Pool 2003 diff --git a/tests/cluecode/data/ics/sonivox-docs/JET_Authoring_Guidelines.html.yml b/tests/cluecode/data/ics/sonivox-docs/JET_Authoring_Guidelines.html.yml index a4a7b5a014b..fd4adae6aa3 100644 --- a/tests/cluecode/data/ics/sonivox-docs/JET_Authoring_Guidelines.html.yml +++ b/tests/cluecode/data/ics/sonivox-docs/JET_Authoring_Guidelines.html.yml @@ -3,11 +3,11 @@ what: - holders - holders_summary copyrights: - - Copyright 2009 techdoc.dot Jennifer Hruska + - Copyright 2009 techdoc.dot o:LastAuthor Jennifer Hruska - Copyright (c) 2009 The Android Open Source Project - Copyright 2009 Sonic Network, Inc. holders: - - techdoc.dot Jennifer Hruska + - techdoc.dot o:LastAuthor Jennifer Hruska - The Android Open Source Project - Sonic Network, Inc. holders_summary: @@ -15,5 +15,5 @@ holders_summary: count: 1 - value: Sonic Network, Inc. count: 1 - - value: techdoc.dot Jennifer Hruska + - value: techdoc.dot o:LastAuthor Jennifer Hruska count: 1 diff --git a/tests/cluecode/data/ics/zlib-contrib-minizip/unzip.c.yml b/tests/cluecode/data/ics/zlib-contrib-minizip/unzip.c.yml index 0c6023f688c..b91a88591ba 100644 --- a/tests/cluecode/data/ics/zlib-contrib-minizip/unzip.c.yml +++ b/tests/cluecode/data/ics/zlib-contrib-minizip/unzip.c.yml @@ -3,7 +3,8 @@ what: - holders - holders_summary copyrights: - - Copyright (c) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + - Copyright (c) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html + ) - Copyright (c) 2007-2008 Even Rouault - Copyright (c) 2009-2010 Mathias Svensson ( http://result42.com ) - Copyright (c) 1990-2000 Info-ZIP. diff --git a/tests/cluecode/data/plugin_filter_clues/filtered-expected2.json b/tests/cluecode/data/plugin_filter_clues/filtered-expected2.json index 2a3eb2ebebd..8f3ca9396dd 100644 --- a/tests/cluecode/data/plugin_filter_clues/filtered-expected2.json +++ b/tests/cluecode/data/plugin_filter_clues/filtered-expected2.json @@ -94,17 +94,18 @@ "end_line": 24 } ], - "authors": [], + "authors": [ + { + "author": "Pascal Andre, andre@chimay.via.ecp.fr", + "start_line": 3, + "end_line": 4 + } + ], "emails": [ { "email": "darcy@druid.net", "start_line": 3, "end_line": 3 - }, - { - "email": "andre@chimay.via.ecp.fr", - "start_line": 4, - "end_line": 4 } ], "urls": [], diff --git a/tests/cluecode/test_copyrights_basic.py b/tests/cluecode/test_copyrights_basic.py index 0ad2c025fc2..23408ea643b 100644 --- a/tests/cluecode/test_copyrights_basic.py +++ b/tests/cluecode/test_copyrights_basic.py @@ -13,6 +13,8 @@ import cluecode_test_utils # NOQA from commoncode.testcase import FileBasedTesting from cluecode import copyrights +from cluecode.copyrights import prepare_text_line +from cluecode.copyrights import remove_non_chars class TestTextPreparation(FileBasedTesting): @@ -28,56 +30,81 @@ def test_strip_leading_numbers(self): def test_prepare_text_line(self): cp = 'test (C) all rights reserved' - result = copyrights.prepare_text_line(cp) + result = prepare_text_line(cp) assert result == 'test (c) all rights reserved' def test_prepare_text_line_debian(self): cp = 'Parts Copyright (c) 1992 Uri Blumenthal, IBM' - result = copyrights.prepare_text_line(cp) + result = prepare_text_line(cp) assert result == 'Parts Copyright (c) 1992 Uri Blumenthal, IBM' def test_prepare_text_line_does_not_truncate_transliterable_unicode(self): cp = 'Muła' - result = copyrights.prepare_text_line(cp) + result = prepare_text_line(cp) assert result == 'Mula' - def test_strip_markup(self): + def test_strip_markup_removes_debian_legacy_s_tags(self): cp = 'Parts Copyright (c) 1992 Uri Blumenthal, IBM' - result = copyrights.strip_markup(cp) + result = prepare_text_line(cp) assert result == 'Parts Copyright (c) 1992 Uri Blumenthal, IBM' def test_prepare_text_line_removes_C_comments(self): cp = '/* Copyright 1996-2005, 2008-2011 by */' - result = copyrights.prepare_text_line(cp) + result = prepare_text_line(cp) assert result == 'Copyright 1996-2005, 2008-2011 by' def test_prepare_text_line_removes_C_comments2(self): cp = '/* David Turner, Robert Wilhelm, and Werner Lemberg. */' - result = copyrights.prepare_text_line(cp) + result = prepare_text_line(cp) assert result == 'David Turner, Robert Wilhelm, and Werner Lemberg.' def test_prepare_text_line_removes_Cpp_comments(self): cp = '// David Turner, Robert Wilhelm, and Werner Lemberg. */' - result = copyrights.prepare_text_line(cp) + result = prepare_text_line(cp) assert result == 'David Turner, Robert Wilhelm, and Werner Lemberg.' def test_prepare_text_line_does_not_damage_urls(self): cp = 'copyright (c) 2000 World Wide Web Consortium, http://www.w3.org' - result = copyrights.prepare_text_line(cp) + result = prepare_text_line(cp) assert result == 'copyright (c) 2000 World Wide Web Consortium, http://www.w3.org' + def test_prepare_text_line_does_replace_copyright_signs(self): + cp = 'Copyright \\A9 1991, 1999 Free Software Foundation, Inc.' + result = prepare_text_line(cp) + assert result == 'Copyright (c) 1991, 1999 Free Software Foundation, Inc.' + + def test_prepare_text_line_does_not_munge_markup_like_emails(self): + cp = 'Jason Hunter ' + result = prepare_text_line(cp) + assert result == 'Jason Hunter Joshua Chamas. + Copyright (c) 1998 Gisle Aas. + + This program is free software; you can redistribute it and/or modify it + under the same terms as Perl itself. + + Perl is distributed under either the Artistic licence or the GPL. + + The full text of the GPL is available on Debian systems in + /usr/share/common-licenses/GPL + + The full text of the Artistic Licence is available on Debian systems in + /usr/share/common-licenses/Artistic. + + This package has been through multiple maintainers (for a list see + /usr/share/doc/libcrypt-ssleay-perl/changelog.Debian.gz). + + Current Debian specific changes are copyright (c) 2003 + Stephen Zander + '''.splitlines(False) + + expected = [ + [(2, + 'COPYRIGHT'), + (3, + 'Copyright (c) 1999-2003 Joshua Chamas.'), + (4, + 'Copyright (c) 1998 Gisle Aas.')], + [(20, + 'Current Debian specific changes are copyright (c) 2003'), + (21, + 'Stephen Zander ')], ] - result = list(copyrights.candidate_lines(enumerate(lines, 1))) + result = list(copyrights.collect_candidate_lines(enumerate(lines, 1))) assert result == expected def test_is_candidates_should_not_select_line_with_bare_full_year(self): line = '2012' - line, _char_only = copyrights.prep_line(line) + line = prepare_text_line(line) assert not copyrights.is_candidate(line) def test_is_candidates_should_not_select_line_with_full_year_before_160_and_after_2018(self): line = '1959 2019' - line, _char_only = copyrights.prep_line(line) + line = prepare_text_line(line) assert not copyrights.is_candidate(line) def test_is_candidate_should_not_select_line_with_only_two_digit_numbers(self): line = 'template struct v_iter > { typedef typename V::item10 type; typedef v_iter > next; };' - line, _char_only = copyrights.prep_line(line) + line = prepare_text_line(line) assert not copyrights.is_candidate(line) def test_is_candidate_should_select_line_with_sign(self): line = 'template struct v_iter (c) { typedef typename V::item10 type; typedef v_iter > next; };' - line, _char_only = copyrights.prep_line(line) + line = prepare_text_line(line) assert copyrights.is_candidate(line) def test_is_candidate_should_not_select_line_with_junk_hex(self): line = '01061C3F5280CD4AC504152B81E452BD82015442014' - line, _char_only = copyrights.prep_line(line) + line = prepare_text_line(line) assert not copyrights.is_candidate(line) def test_is_candidate_should_select_line_with_a_trailing_years(self): line = '01061C3F5280CD4AC504152B81E452BD820154 2014\n' - line, _char_only = copyrights.prep_line(line) + line = prepare_text_line(line) assert copyrights.is_candidate(line) def test_is_candidate_should_select_line_with_proper_years(self): line = '01061C3F5280CD4AC504152B81E452BD820154 2014-' - line, _char_only = copyrights.prep_line(line) + line = prepare_text_line(line) assert copyrights.is_candidate(line) def test_is_candidate_should_select_line_with_proper_years2(self): line = '01061C3F5280CD4,2016 152B81E452BD820154' - line, _char_only = copyrights.prep_line(line) + line = prepare_text_line(line) assert copyrights.is_candidate(line) def test_is_candidate_should_select_line_with_dashed_year(self): line = 'pub 1024D/CCD6F801 2006-11-15' - line, _char_only = copyrights.prep_line(line) + line = prepare_text_line(line) assert copyrights.is_candidate(line) def test_is_candidate_should_select_line_with_iso_date_year(self): line = 'sig 3 ccd6f801 2006-11-15 nathan mittler ' - line, _char_only = copyrights.prep_line(line) + line = prepare_text_line(line) assert copyrights.is_candidate(line) def test_is_candidate_should_not_select_lines_made_only_of_punct_and_digits(self): @@ -189,7 +292,7 @@ def test_is_candidate_should_not_select_lines_made_only_of_punct_and_digits(self '''.splitlines() for line in lines: - line, _ = copyrights.prep_line(line) + line = prepare_text_line(line) assert not copyrights.is_candidate(line) @@ -319,7 +422,7 @@ def test_copyright_lines_isc(self): def test_copyright_lines_sample_py(self): test_file = self.get_test_loc('copyrights_basic/sample_py-py.py') expected = [ - copyrights.CopyrightDetection('COPYRIGHT 2006 ABC', 6, 6) + copyrights.CopyrightDetection('COPYRIGHT 2006 ABC ABC CONFIDENTIAL PROPRIETARY', 6, 7) ] check_full_detections(expected, test_file) diff --git a/tests/cluecode/test_copyrights_fosso.py b/tests/cluecode/test_copyrights_fosso.py deleted file mode 100644 index 1b5f6e52ba4..00000000000 --- a/tests/cluecode/test_copyrights_fosso.py +++ /dev/null @@ -1,159 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (c) nexB Inc. and others. All rights reserved. -# ScanCode is a trademark of nexB Inc. -# SPDX-License-Identifier: Apache-2.0 -# See http://www.apache.org/licenses/LICENSE-2.0 for the license text. -# See https://github.com/nexB/scancode-toolkit for support or download. -# See https://aboutcode.org for more information about nexB OSS projects. -# - -import io -import os -import re - -import pytest - -import cluecode_test_utils # NOQA -from commoncode.testcase import FileDrivenTesting -from commoncode.text import python_safe_name - -pytestmark = pytest.mark.scanslow - -""" -Tests of ScanCode copyright detection using Fossology copyright test suite data. -""" - -test_env = FileDrivenTesting() -test_env.test_data_dir = os.path.join(os.path.dirname(__file__), 'data') - -expected_failures = set([ - 'test_fossology_copyright_testdata5', - 'test_fossology_copyright_testdata19', - 'test_fossology_copyright_testdata78', - 'test_fossology_copyright_testdata86', -]) - - -def build_copyright_test_methods_with_fossology_data(): - """ - Yield one test method for each Fossology copyright test. - """ - base_dir = test_env.get_test_loc('copyright_fossology') - test_data_dir = base_dir - test_files = [os.path.join(base_dir, tf) - for tf in os.listdir(base_dir) if (not tf.endswith('~'))] - - expected_files = [] - files_to_test = [] - - for tf in test_files: - if tf.endswith('_raw'): - expected_files.append(tf) - files_to_test.append(tf.replace('_raw', '')) - - assert sorted(files_to_test + expected_files) == sorted(test_files) - - copyregex = re.compile('(.*?)', re.DOTALL | re.UNICODE) # NOQA - for expected_file, test_file in zip(expected_files, files_to_test): - - with io.open(expected_file, 'r', encoding='utf-8') as i: - expected_text = i.read() - - expected_copyrights = [] - for match in copyregex.finditer(expected_text): - expected_copyrights.extend(match.groups()) - - reps = [ - ('. All rights reserved.', '.'), - ('All Rights Reserved except as specified below.', ''), - (' All # Rights Reserved.', ''), - ('#', ' '), - (' ', ' '), - ('* All Rights Reserved.', ''), - ('All rights reserved', ''), - ('All Rights Reserved', ''), - ('Copyright:', 'Copyright '), - ('. .', '.'), - (' *% ', ' '), - ('©', '(c)'), - (' * ', ' '), - ('Copyright Copyright', 'Copyright'), - ('Copyright Copyright', 'Copyright'), - ('All rights reserved.', ''), - ('Created 1991.', ''), - ('Created 1990.', ''), - ('copyright under', ''), - ('@copyright{}', ''), - ('. .', '.'), - ('', ''), - ] - - expected_copyrights_fixed = [] - - for value in expected_copyrights: - if value.lower().startswith( - ('written', 'auth', 'maint', 'put', 'contri', 'indiv', 'mod')): - continue - - value = ' '.join(value.split()) - - for x, y in reps: - value = value.replace(x, y) - - value = value.strip() - value = value.rstrip(',;:') - value = value.strip() - value = ' '.join(value.split()) - expected_copyrights_fixed.append(value.strip()) - - expected_copyrights = [e for e in expected_copyrights_fixed if e and e .strip()] - - test_method = make_test_func(test_file, expected_file, expected_copyrights) - - tfn = test_file.replace(test_data_dir, '').strip('\\/\\') - test_name = 'test_fossology_copyright_%(tfn)s' % locals() - test_name = python_safe_name(test_name) - if not isinstance(test_name, str): - test_name = test_name.decode('utf-8') - - test_method.__name__ = test_name - - if test_name in expected_failures: - test_method = pytest.mark.xfail(test_method) - - yield test_method, test_name - - -def make_test_func(test_file_loc, expected_file_loc, expected): - - def copyright_test_method(self): - copyrights, _aut, _hol = cluecode_test_utils.get_detections(test_file_loc) - - try: - assert copyrights == expected - except: - failure_trace = [ - 'Failed to detect copyright in: file://' + test_file_loc, '\n', - 'expected as file://' + expected_file_loc, '\n', - ] + expected - - assert copyrights == failure_trace - - return copyright_test_method - - -def build_tests(clazz): - """ - Dynamically build test methods and attach these to the clazz test class. - """ - for test_method, test_name in build_copyright_test_methods_with_fossology_data(): - setattr(clazz, test_name, test_method) - - -class TestCopyrightFossologyDataDriven(FileDrivenTesting): - # test functions are attached to this class at module import time - pass - - -build_tests(clazz=TestCopyrightFossologyDataDriven) diff --git a/tests/cluecode/test_linux_credits.py b/tests/cluecode/test_linux_credits.py new file mode 100644 index 00000000000..68e6ebb0479 --- /dev/null +++ b/tests/cluecode/test_linux_credits.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# +# Copyright (c) nexB Inc. and others. All rights reserved. +# ScanCode is a trademark of nexB Inc. +# SPDX-License-Identifier: Apache-2.0 +# See http://www.apache.org/licenses/LICENSE-2.0 for the license text. +# See https://github.com/nexB/scancode-toolkit for support or download. +# See https://aboutcode.org for more information about nexB OSS projects. +# + +import os.path + +from cluecode import copyrights +from cluecode import linux_credits +from commoncode.testcase import FileDrivenTesting + +from scancode_config import REGEN_TEST_FIXTURES +from scancode.cli_test_utils import check_json + +test_env = FileDrivenTesting() +test_env.test_data_dir = os.path.join(os.path.dirname(__file__), 'data') + + +def test_detect_credits_authors(): + location = test_env.get_test_loc('credits/CREDITS') + expected = test_env.get_test_loc('credits/CREDITS-expected-credits.json', must_exist=False) + + results = [o.to_dict() for o in linux_credits.detect_credits_authors(location)] + check_json(expected, results, regen=REGEN_TEST_FIXTURES) + + +def test_detect_copyrights__for_credits(): + location = test_env.get_test_loc('credits/CREDITS') + expected = test_env.get_test_loc('credits/CREDITS-expected-copyrights.json', must_exist=False) + + results = [o.to_dict() for o in copyrights.detect_copyrights(location, include_authors=True)] + check_json(expected, results, regen=REGEN_TEST_FIXTURES) diff --git a/tests/cluecode/test_plugin_filter_clues.py b/tests/cluecode/test_plugin_filter_clues.py index 9e5fb950d92..11557b13a24 100644 --- a/tests/cluecode/test_plugin_filter_clues.py +++ b/tests/cluecode/test_plugin_filter_clues.py @@ -58,7 +58,7 @@ def test_scan_plugin_filter_clues_does_not_filter_incorrectly(): # Regression on types tracked in https://github.com/nexB/typecode/issues/21 def test_scan_plugin_filter_clues_for_license(): - # this test fies is a copy of pcre.LICENSE that contains + # this test file is a copy of pcre.LICENSE that contains # several emails, authors, urls test_dir = test_env.get_test_loc('plugin_filter_clues/files/LICENSE3') result_file = test_env.get_temp_file('json') diff --git a/tests/formattedcode/data/common/manifests-expected.json b/tests/formattedcode/data/common/manifests-expected.json index 6a52154d332..af973084d5b 100644 --- a/tests/formattedcode/data/common/manifests-expected.json +++ b/tests/formattedcode/data/common/manifests-expected.json @@ -273,6 +273,117 @@ "npm_package_json" ], "purl": "pkg:npm/angular-compare-validator@0.1.1" + }, + { + "type": "pypi", + "namespace": null, + "name": "bluepyopt", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Bluebrain Python Optimisation Library (bluepyopt)", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "BlueBrain Project, EPFL", + "email": "werner.vangeit@epfl.ch", + "url": null + } + ], + "keywords": [ + "optimisation", + "neuroscience", + "BlueBrainProject", + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Programming Language :: Python :: 3 :: Only", + "Operating System :: POSIX", + "Topic :: Scientific/Engineering", + "Topic :: Utilities" + ], + "homepage_url": "https://github.com/BlueBrain/BluePyOpt", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "lgpl-3.0", + "declared_license_expression_spdx": "LGPL-3.0-only", + "license_detections": [ + { + "license_expression": "lgpl-3.0", + "license_expression_spdx": "LGPL-3.0-only", + "matches": [ + { + "license_expression": "lgpl-3.0", + "spdx_license_expression": "LGPL-3.0-only", + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 1, + "end_line": 1, + "matcher": "1-hash", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "lgpl-3.0_29.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE", + "matched_text": "LGPLv3" + } + ], + "identifier": "lgpl_3_0-38174920-e8ed-7bda-41ec-94df7380b7d5" + }, + { + "license_expression": "lgpl-3.0", + "license_expression_spdx": "LGPL-3.0-only", + "matches": [ + { + "license_expression": "lgpl-3.0", + "spdx_license_expression": "LGPL-3.0-only", + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 1, + "end_line": 1, + "matcher": "1-hash", + "score": 100.0, + "matched_length": 10, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "pypi_gnu_lesser_general_public_license_v3.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_gnu_lesser_general_public_license_v3.RULE", + "matched_text": "- 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)'" + } + ], + "identifier": "lgpl_3_0-272571eb-5e68-95b6-ddb0-71de2d8df321" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "license: LGPLv3\nclassifiers:\n - 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)'\n", + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://pypi.org/project/bluepyopt", + "repository_download_url": null, + "api_data_url": "https://pypi.org/pypi/bluepyopt/json", + "package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "manifests/pypi/bluepyopt_setup.py" + ], + "datasource_ids": [ + "pypi_setup_py" + ], + "purl": "pkg:pypi/bluepyopt" } ], "dependencies": [ @@ -500,6 +611,171 @@ "for_package_uid": "pkg:npm/angular-compare-validator@0.1.1?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_path": "manifests/npm-license-string/package.json", "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:pypi/numpy", + "extracted_requirement": ">=1.6", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/numpy?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/pandas", + "extracted_requirement": ">=0.18", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/pandas?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/deap", + "extracted_requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/deap?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/efel", + "extracted_requirement": ">=2.13", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/efel?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/ipyparallel", + "extracted_requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/ipyparallel?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/pickleshare", + "extracted_requirement": ">=0.7.3", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/pickleshare?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/jinja2", + "extracted_requirement": ">=2.8", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/jinja2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/future", + "extracted_requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/future?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/pebble", + "extracted_requirement": ">=4.3.10", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/pebble?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/scoop", + "extracted_requirement": ">=0.7", + "scope": "all", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/scoop?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/scoop", + "extracted_requirement": ">=0.7", + "scope": "scoop", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/scoop?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" } ], "license_detections": [ @@ -1822,7 +2098,9 @@ "purl": "pkg:pypi/bluepyopt" } ], - "for_packages": [], + "for_packages": [ + "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "lgpl-3.0", "detected_license_expression_spdx": "LGPL-3.0-only", "license_detections": [ diff --git a/tests/formattedcode/data/common/manifests-expected.jsonlines b/tests/formattedcode/data/common/manifests-expected.jsonlines index be9f150821b..5180027a3dd 100644 --- a/tests/formattedcode/data/common/manifests-expected.jsonlines +++ b/tests/formattedcode/data/common/manifests-expected.jsonlines @@ -20,9 +20,9 @@ "system_environment": { "operating_system": "linux", "cpu_architecture": "64", - "platform": "Linux-5.15.0-113-generic-x86_64-with-glibc2.35", - "platform_version": "#123-Ubuntu SMP Mon Jun 10 08:16:17 UTC 2024", - "python_version": "3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]" + "platform": "Linux-5.15.0-116-generic-x86_64-with-glibc2.35", + "platform_version": "#126-Ubuntu SMP Mon Jul 1 10:14:24 UTC 2024", + "python_version": "3.10.12 (main, Mar 22 2024, 16:50:05) [GCC 11.4.0]" }, "spdx_license_list_version": "3.24", "files_count": 4 @@ -305,6 +305,117 @@ "npm_package_json" ], "purl": "pkg:npm/angular-compare-validator@0.1.1" + }, + { + "type": "pypi", + "namespace": null, + "name": "bluepyopt", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Bluebrain Python Optimisation Library (bluepyopt)", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "BlueBrain Project, EPFL", + "email": "werner.vangeit@epfl.ch", + "url": null + } + ], + "keywords": [ + "optimisation", + "neuroscience", + "BlueBrainProject", + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Programming Language :: Python :: 3 :: Only", + "Operating System :: POSIX", + "Topic :: Scientific/Engineering", + "Topic :: Utilities" + ], + "homepage_url": "https://github.com/BlueBrain/BluePyOpt", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "lgpl-3.0", + "declared_license_expression_spdx": "LGPL-3.0-only", + "license_detections": [ + { + "license_expression": "lgpl-3.0", + "license_expression_spdx": "LGPL-3.0-only", + "matches": [ + { + "license_expression": "lgpl-3.0", + "spdx_license_expression": "LGPL-3.0-only", + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 1, + "end_line": 1, + "matcher": "1-hash", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "lgpl-3.0_29.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE", + "matched_text": "LGPLv3" + } + ], + "identifier": "lgpl_3_0-38174920-e8ed-7bda-41ec-94df7380b7d5" + }, + { + "license_expression": "lgpl-3.0", + "license_expression_spdx": "LGPL-3.0-only", + "matches": [ + { + "license_expression": "lgpl-3.0", + "spdx_license_expression": "LGPL-3.0-only", + "from_file": "manifests/pypi/bluepyopt_setup.py", + "start_line": 1, + "end_line": 1, + "matcher": "1-hash", + "score": 100.0, + "matched_length": 10, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "pypi_gnu_lesser_general_public_license_v3.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_gnu_lesser_general_public_license_v3.RULE", + "matched_text": "- 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)'" + } + ], + "identifier": "lgpl_3_0-272571eb-5e68-95b6-ddb0-71de2d8df321" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "license: LGPLv3\nclassifiers:\n - 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)'\n", + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://pypi.org/project/bluepyopt", + "repository_download_url": null, + "api_data_url": "https://pypi.org/pypi/bluepyopt/json", + "package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "manifests/pypi/bluepyopt_setup.py" + ], + "datasource_ids": [ + "pypi_setup_py" + ], + "purl": "pkg:pypi/bluepyopt" } ] }, @@ -534,6 +645,171 @@ "for_package_uid": "pkg:npm/angular-compare-validator@0.1.1?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_path": "manifests/npm-license-string/package.json", "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:pypi/numpy", + "extracted_requirement": ">=1.6", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/numpy?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/pandas", + "extracted_requirement": ">=0.18", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/pandas?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/deap", + "extracted_requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/deap?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/efel", + "extracted_requirement": ">=2.13", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/efel?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/ipyparallel", + "extracted_requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/ipyparallel?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/pickleshare", + "extracted_requirement": ">=0.7.3", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/pickleshare?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/jinja2", + "extracted_requirement": ">=2.8", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/jinja2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/future", + "extracted_requirement": null, + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/future?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/pebble", + "extracted_requirement": ">=4.3.10", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/pebble?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/scoop", + "extracted_requirement": ">=0.7", + "scope": "all", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/scoop?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/scoop", + "extracted_requirement": ">=0.7", + "scope": "scoop", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:pypi/scoop?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "manifests/pypi/bluepyopt_setup.py", + "datasource_id": "pypi_setup_py" } ] }, @@ -1892,7 +2168,9 @@ "purl": "pkg:pypi/bluepyopt" } ], - "for_packages": [], + "for_packages": [ + "pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "detected_license_expression": "lgpl-3.0", "detected_license_expression_spdx": "LGPL-3.0-only", "license_detections": [ diff --git a/tests/formattedcode/data/common/manifests-expected.yaml b/tests/formattedcode/data/common/manifests-expected.yaml index 1c7539b4525..69e7bf87615 100644 --- a/tests/formattedcode/data/common/manifests-expected.yaml +++ b/tests/formattedcode/data/common/manifests-expected.yaml @@ -29,13 +29,20 @@ headers: system_environment: operating_system: linux cpu_architecture: 64 +<<<<<<< HEAD platform: Linux-5.15.0-113-generic-x86_64-with-glibc2.35 platform_version: '#123-Ubuntu SMP Mon Jun 10 08:16:17 UTC 2024' python_version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] spdx_license_list_version: '3.24' +======= + platform: Linux-6.5.0-1025-oem-x86_64-with-glibc2.35 + platform_version: '#26-Ubuntu SMP PREEMPT_DYNAMIC Tue Jun 18 12:35:22 UTC 2024' + python_version: 3.11.8 (main, Feb 12 2024, 14:25:06) [GCC 11.4.0] + spdx_license_list_version: '3.25' +>>>>>>> develop files_count: 4 summary: - declared_license_expression: apache-2.0 AND cddl-1.0 AND mit + declared_license_expression: apache-2.0 AND cddl-1.0 AND lgpl-3.0 AND mit license_clarity_score: score: '0' declared_license: no @@ -44,7 +51,7 @@ summary: declared_copyrights: no conflicting_license_categories: no ambiguous_compound_licensing: yes - declared_holder: + declared_holder: EPFL/Blue Brain Project primary_language: Python other_license_expressions: - value: lgpl-3.0 @@ -58,8 +65,6 @@ summary: other_holders: - value: count: 3 - - value: EPFL/Blue Brain Project - count: 1 other_languages: [] packages: - type: maven @@ -298,6 +303,102 @@ packages: datasource_ids: - npm_package_json purl: pkg:npm/angular-compare-validator@0.1.1 + - type: pypi + namespace: + name: bluepyopt + version: + qualifiers: {} + subpath: + primary_language: Python + description: Bluebrain Python Optimisation Library (bluepyopt) + release_date: + parties: + - type: person + role: author + name: BlueBrain Project, EPFL + email: werner.vangeit@epfl.ch + url: + keywords: + - optimisation + - neuroscience + - BlueBrainProject + - 'Development Status :: 5 - Production/Stable' + - 'Environment :: Console' + - 'Programming Language :: Python :: 3 :: Only' + - 'Operating System :: POSIX' + - 'Topic :: Scientific/Engineering' + - 'Topic :: Utilities' + homepage_url: https://github.com/BlueBrain/BluePyOpt + download_url: + size: + sha1: + md5: + sha256: + sha512: + bug_tracking_url: + code_view_url: + vcs_url: + copyright: + holder: + declared_license_expression: lgpl-3.0 + declared_license_expression_spdx: LGPL-3.0-only + license_detections: + - license_expression: lgpl-3.0 + license_expression_spdx: LGPL-3.0-only + matches: + - license_expression: lgpl-3.0 + spdx_license_expression: LGPL-3.0-only + from_file: manifests/pypi/bluepyopt_setup.py + start_line: 1 + end_line: 1 + matcher: 1-hash + score: '100.0' + matched_length: 1 + match_coverage: '100.0' + rule_relevance: 100 + rule_identifier: lgpl-3.0_29.RULE + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE + matched_text: LGPLv3 + identifier: lgpl_3_0-38174920-e8ed-7bda-41ec-94df7380b7d5 + - license_expression: lgpl-3.0 + license_expression_spdx: LGPL-3.0-only + matches: + - license_expression: lgpl-3.0 + spdx_license_expression: LGPL-3.0-only + from_file: manifests/pypi/bluepyopt_setup.py + start_line: 1 + end_line: 1 + matcher: 1-hash + score: '100.0' + matched_length: 10 + match_coverage: '100.0' + rule_relevance: 100 + rule_identifier: pypi_gnu_lesser_general_public_license_v3.RULE + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_gnu_lesser_general_public_license_v3.RULE + matched_text: '- ''License :: OSI Approved :: GNU Lesser General Public License + v3 (LGPLv3)''' + identifier: lgpl_3_0-272571eb-5e68-95b6-ddb0-71de2d8df321 + other_license_expression: + other_license_expression_spdx: + other_license_detections: [] + extracted_license_statement: | + license: LGPLv3 + classifiers: + - 'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)' + notice_text: + source_packages: [] + is_private: no + is_virtual: no + extra_data: {} + repository_homepage_url: https://pypi.org/project/bluepyopt + repository_download_url: + api_data_url: https://pypi.org/pypi/bluepyopt/json + package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_paths: + - manifests/pypi/bluepyopt_setup.py + datasource_ids: + - pypi_setup_py + purl: pkg:pypi/bluepyopt dependencies: - purl: pkg:npm/bluebird extracted_requirement: ^2.9.30 @@ -494,6 +595,149 @@ dependencies: for_package_uid: pkg:npm/angular-compare-validator@0.1.1?uuid=fixed-uid-done-for-testing-5642512d1758 datafile_path: manifests/npm-license-string/package.json datasource_id: npm_package_json + - purl: pkg:pypi/numpy + extracted_requirement: '>=1.6' + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/numpy?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/pandas + extracted_requirement: '>=0.18' + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/pandas?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/deap + extracted_requirement: + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/deap?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/efel + extracted_requirement: '>=2.13' + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/efel?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/ipyparallel + extracted_requirement: + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/ipyparallel?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/pickleshare + extracted_requirement: '>=0.7.3' + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/pickleshare?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/jinja2 + extracted_requirement: '>=2.8' + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/jinja2?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/future + extracted_requirement: + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/future?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/pebble + extracted_requirement: '>=4.3.10' + scope: install + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/pebble?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/scoop + extracted_requirement: '>=0.7' + scope: all + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/scoop?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py + - purl: pkg:pypi/scoop + extracted_requirement: '>=0.7' + scope: scoop + is_runtime: yes + is_optional: no + is_resolved: no + is_direct: yes + resolved_package: {} + extra_data: {} + dependency_uid: pkg:pypi/scoop?uuid=fixed-uid-done-for-testing-5642512d1758 + for_package_uid: pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 + datafile_path: manifests/pypi/bluepyopt_setup.py + datasource_id: pypi_setup_py license_detections: - identifier: apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8 license_expression: apache-2.0 @@ -1162,7 +1406,7 @@ license_references: minimum_coverage: '0' standard_notice: ignorable_copyrights: - - Copyright (c) 2007 Free Software Foundation, Inc. + - Copyright (c) 2007 Free Software Foundation, Inc. https://fsf.org ignorable_holders: - Free Software Foundation, Inc. ignorable_authors: [] @@ -1518,6 +1762,31 @@ license_rule_references: 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + - license_expression: lgpl-3.0 + identifier: lgpl-3.0_29.RULE + language: en + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE + is_license_text: no + is_license_notice: no + is_license_reference: yes + is_license_tag: no + is_license_intro: no + is_license_clue: no + is_continuous: no + is_builtin: yes + is_from_license: no + is_synthetic: no + length: 1 + relevance: 100 + minimum_coverage: 100 + referenced_filenames: [] + notes: + ignorable_copyrights: [] + ignorable_holders: [] + ignorable_authors: [] + ignorable_urls: [] + ignorable_emails: [] + text: LGPLv3 - license_expression: unknown-license-reference identifier: license-intro_72.RULE language: en @@ -2666,7 +2935,8 @@ files: api_data_url: https://pypi.org/pypi/bluepyopt/json datasource_id: pypi_setup_py purl: pkg:pypi/bluepyopt - for_packages: [] + for_packages: + - pkg:pypi/bluepyopt?uuid=fixed-uid-done-for-testing-5642512d1758 is_legal: no is_manifest: no is_readme: no diff --git a/tests/formattedcode/data/spdx/license_known/expected.rdf b/tests/formattedcode/data/spdx/license_known/expected.rdf index e5941055e2c..a88dfd87b27 100644 --- a/tests/formattedcode/data/spdx/license_known/expected.rdf +++ b/tests/formattedcode/data/spdx/license_known/expected.rdf @@ -94,7 +94,7 @@ "@rdf:resource": "http://spdx.org/licenses/CC0-1.0" }, "@rdf:about": "#SPDXRef-DOCUMENT", - "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.24", + "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.25", "spdx:name": "SPDX Document created by ScanCode Toolkit", "spdx:specVersion": "SPDX-2.2" }, diff --git a/tests/formattedcode/data/spdx/license_known/expected.tv b/tests/formattedcode/data/spdx/license_known/expected.tv index 2bee4356a57..7e92ad41205 100644 --- a/tests/formattedcode/data/spdx/license_known/expected.tv +++ b/tests/formattedcode/data/spdx/license_known/expected.tv @@ -10,7 +10,7 @@ ScanCode should be considered or used as legal advice. Consult an Attorney for any legal advice. ScanCode is a free software code scanning tool from nexB Inc. and others. Visit https://github.com/nexB/scancode-toolkit/ for support and download. -SPDX License List: 3.24 +SPDX License List: 3.25 ## Creation Information ## Package Information PackageName: scan diff --git a/tests/formattedcode/data/spdx/license_known/expected_with_text.rdf b/tests/formattedcode/data/spdx/license_known/expected_with_text.rdf index e5941055e2c..a88dfd87b27 100644 --- a/tests/formattedcode/data/spdx/license_known/expected_with_text.rdf +++ b/tests/formattedcode/data/spdx/license_known/expected_with_text.rdf @@ -94,7 +94,7 @@ "@rdf:resource": "http://spdx.org/licenses/CC0-1.0" }, "@rdf:about": "#SPDXRef-DOCUMENT", - "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.24", + "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.25", "spdx:name": "SPDX Document created by ScanCode Toolkit", "spdx:specVersion": "SPDX-2.2" }, diff --git a/tests/formattedcode/data/spdx/license_known/expected_with_text.tv b/tests/formattedcode/data/spdx/license_known/expected_with_text.tv index 2bee4356a57..7e92ad41205 100644 --- a/tests/formattedcode/data/spdx/license_known/expected_with_text.tv +++ b/tests/formattedcode/data/spdx/license_known/expected_with_text.tv @@ -10,7 +10,7 @@ ScanCode should be considered or used as legal advice. Consult an Attorney for any legal advice. ScanCode is a free software code scanning tool from nexB Inc. and others. Visit https://github.com/nexB/scancode-toolkit/ for support and download. -SPDX License List: 3.24 +SPDX License List: 3.25 ## Creation Information ## Package Information PackageName: scan diff --git a/tests/formattedcode/data/spdx/license_ref/expected.rdf b/tests/formattedcode/data/spdx/license_ref/expected.rdf index 928b80511f5..23da4d5767b 100644 --- a/tests/formattedcode/data/spdx/license_ref/expected.rdf +++ b/tests/formattedcode/data/spdx/license_ref/expected.rdf @@ -116,7 +116,7 @@ } } ], - "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.24", + "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.25", "spdx:name": "SPDX Document created by ScanCode Toolkit", "spdx:specVersion": "SPDX-2.2" }, diff --git a/tests/formattedcode/data/spdx/license_ref/expected.tv b/tests/formattedcode/data/spdx/license_ref/expected.tv index 40917f1a1f9..e638c308db1 100644 --- a/tests/formattedcode/data/spdx/license_ref/expected.tv +++ b/tests/formattedcode/data/spdx/license_ref/expected.tv @@ -10,7 +10,7 @@ ScanCode should be considered or used as legal advice. Consult an Attorney for any legal advice. ScanCode is a free software code scanning tool from nexB Inc. and others. Visit https://github.com/nexB/scancode-toolkit/ for support and download. -SPDX License List: 3.24 +SPDX License List: 3.25 ## Creation Information ## Package Information PackageName: scan diff --git a/tests/formattedcode/data/spdx/license_ref/expected_with_text.rdf b/tests/formattedcode/data/spdx/license_ref/expected_with_text.rdf index 89bb7331ec6..40a88ce0b0f 100644 --- a/tests/formattedcode/data/spdx/license_ref/expected_with_text.rdf +++ b/tests/formattedcode/data/spdx/license_ref/expected_with_text.rdf @@ -116,7 +116,7 @@ } } ], - "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.24", + "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.25", "spdx:name": "SPDX Document created by ScanCode Toolkit", "spdx:specVersion": "SPDX-2.2" }, diff --git a/tests/formattedcode/data/spdx/license_ref/expected_with_text.tv b/tests/formattedcode/data/spdx/license_ref/expected_with_text.tv index d37b20db217..ffd906c0a15 100644 --- a/tests/formattedcode/data/spdx/license_ref/expected_with_text.tv +++ b/tests/formattedcode/data/spdx/license_ref/expected_with_text.tv @@ -10,7 +10,7 @@ ScanCode should be considered or used as legal advice. Consult an Attorney for any legal advice. ScanCode is a free software code scanning tool from nexB Inc. and others. Visit https://github.com/nexB/scancode-toolkit/ for support and download. -SPDX License List: 3.24 +SPDX License List: 3.25 ## Creation Information ## Package Information PackageName: scan diff --git a/tests/formattedcode/data/spdx/or_later/expected.rdf b/tests/formattedcode/data/spdx/or_later/expected.rdf index b62bdb4db76..fdbb6500187 100644 --- a/tests/formattedcode/data/spdx/or_later/expected.rdf +++ b/tests/formattedcode/data/spdx/or_later/expected.rdf @@ -59,7 +59,7 @@ "@rdf:resource": "http://spdx.org/licenses/CC0-1.0" }, "@rdf:about": "#SPDXRef-DOCUMENT", - "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.24", + "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.25", "spdx:name": "SPDX Document created by ScanCode Toolkit", "spdx:specVersion": "SPDX-2.2" }, diff --git a/tests/formattedcode/data/spdx/simple/expected.rdf b/tests/formattedcode/data/spdx/simple/expected.rdf index 6d106dd2566..ad33644f3a7 100644 --- a/tests/formattedcode/data/spdx/simple/expected.rdf +++ b/tests/formattedcode/data/spdx/simple/expected.rdf @@ -59,7 +59,7 @@ "@rdf:resource": "http://spdx.org/licenses/CC0-1.0" }, "@rdf:about": "#SPDXRef-DOCUMENT", - "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.24", + "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.25", "spdx:name": "SPDX Document created by ScanCode Toolkit", "spdx:specVersion": "SPDX-2.2" }, diff --git a/tests/formattedcode/data/spdx/simple/expected.tv b/tests/formattedcode/data/spdx/simple/expected.tv index 31f779c35da..f3688013da0 100644 --- a/tests/formattedcode/data/spdx/simple/expected.tv +++ b/tests/formattedcode/data/spdx/simple/expected.tv @@ -10,7 +10,7 @@ ScanCode should be considered or used as legal advice. Consult an Attorney for any legal advice. ScanCode is a free software code scanning tool from nexB Inc. and others. Visit https://github.com/nexB/scancode-toolkit/ for support and download. -SPDX License List: 3.24 +SPDX License List: 3.25 ## Creation Information ## Package Information PackageName: simple diff --git a/tests/formattedcode/data/spdx/tree/expected.rdf b/tests/formattedcode/data/spdx/tree/expected.rdf index 39c5d80cb23..efe1ffd4148 100644 --- a/tests/formattedcode/data/spdx/tree/expected.rdf +++ b/tests/formattedcode/data/spdx/tree/expected.rdf @@ -229,7 +229,7 @@ "@rdf:resource": "http://spdx.org/licenses/CC0-1.0" }, "@rdf:about": "#SPDXRef-DOCUMENT", - "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.24", + "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.25", "spdx:name": "SPDX Document created by ScanCode Toolkit", "spdx:specVersion": "SPDX-2.2" }, diff --git a/tests/formattedcode/data/spdx/tree/expected.tv b/tests/formattedcode/data/spdx/tree/expected.tv index e4c9e36badd..37d1e5d870d 100644 --- a/tests/formattedcode/data/spdx/tree/expected.tv +++ b/tests/formattedcode/data/spdx/tree/expected.tv @@ -10,7 +10,7 @@ ScanCode should be considered or used as legal advice. Consult an Attorney for any legal advice. ScanCode is a free software code scanning tool from nexB Inc. and others. Visit https://github.com/nexB/scancode-toolkit/ for support and download. -SPDX License List: 3.24 +SPDX License List: 3.25 ## Creation Information ## Package Information PackageName: scan diff --git a/tests/formattedcode/data/spdx/unicode/expected.rdf b/tests/formattedcode/data/spdx/unicode/expected.rdf index 265d8074f7f..801082cc752 100644 --- a/tests/formattedcode/data/spdx/unicode/expected.rdf +++ b/tests/formattedcode/data/spdx/unicode/expected.rdf @@ -68,7 +68,7 @@ "rdfs:comment": "See details at https://github.com/nexB/scancode-toolkit/blob/develop/src/licensedcode/data/licenses/agere-bsd.LICENSE" } }, - "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.24", + "rdfs:comment": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.\nSPDX License List: 3.25", "spdx:name": "SPDX Document created by ScanCode Toolkit", "spdx:specVersion": "SPDX-2.2" }, diff --git a/tests/formattedcode/data/spdx/unicode/expected.tv b/tests/formattedcode/data/spdx/unicode/expected.tv index 09dc3b8cb7c..160f1b0be1e 100644 --- a/tests/formattedcode/data/spdx/unicode/expected.tv +++ b/tests/formattedcode/data/spdx/unicode/expected.tv @@ -10,7 +10,7 @@ ScanCode should be considered or used as legal advice. Consult an Attorney for any legal advice. ScanCode is a free software code scanning tool from nexB Inc. and others. Visit https://github.com/nexB/scancode-toolkit/ for support and download. -SPDX License List: 3.24 +SPDX License List: 3.25 ## Creation Information ## Package Information PackageName: unicode diff --git a/tests/licensedcode/data/datadriven/external/glc/GFDL-1.1.t2.yml b/tests/licensedcode/data/datadriven/external/glc/GFDL-1.1.t2.yml index 39ca6af920e..e59c08a9641 100644 --- a/tests/licensedcode/data/datadriven/external/glc/GFDL-1.1.t2.yml +++ b/tests/licensedcode/data/datadriven/external/glc/GFDL-1.1.t2.yml @@ -1,5 +1,9 @@ license_expressions: - gfdl-1.1-plus + - gfdl-1.3-invariants-only + - gfdl-1.3-invariants-only + - gfdl-1.3-invariants-only + - gfdl-1.3 notes: | License test derived from a file of the BSD-licensed repository at: https://raw.githubusercontent.com/google/licensecheck/v0.3.1/testdata/GFDL-1.1.t2 diff --git a/tests/licensedcode/data/datadriven/external/glc/GFDL-1.1.t3.yml b/tests/licensedcode/data/datadriven/external/glc/GFDL-1.1.t3.yml index cef922907b1..c96b9d45359 100644 --- a/tests/licensedcode/data/datadriven/external/glc/GFDL-1.1.t3.yml +++ b/tests/licensedcode/data/datadriven/external/glc/GFDL-1.1.t3.yml @@ -1,5 +1,7 @@ license_expressions: - gfdl-1.1 + - gfdl-1.3-invariants-only + - gfdl-1.3-invariants-only notes: | License test derived from a file of the BSD-licensed repository at: https://raw.githubusercontent.com/google/licensecheck/v0.3.1/testdata/GFDL-1.1.t3 diff --git a/tests/licensedcode/data/datadriven/external/glc/GFDL-1.1.t4.yml b/tests/licensedcode/data/datadriven/external/glc/GFDL-1.1.t4.yml index d39d5253627..ea6805f5a68 100644 --- a/tests/licensedcode/data/datadriven/external/glc/GFDL-1.1.t4.yml +++ b/tests/licensedcode/data/datadriven/external/glc/GFDL-1.1.t4.yml @@ -1,5 +1,9 @@ license_expressions: - gfdl-1.1 + - gfdl-1.3-invariants-only + - gfdl-1.3-invariants-only + - gfdl-1.3-invariants-only + - gfdl-1.3 notes: | License test derived from a file of the BSD-licensed repository at: https://raw.githubusercontent.com/google/licensecheck/v0.3.1/testdata/GFDL-1.1.t4 diff --git a/tests/licensedcode/data/datadriven/external/glc/MIT-NoAd.t1.yml b/tests/licensedcode/data/datadriven/external/glc/MIT-NoAd.t1.yml index 80eb7d50453..69adafffad5 100644 --- a/tests/licensedcode/data/datadriven/external/glc/MIT-NoAd.t1.yml +++ b/tests/licensedcode/data/datadriven/external/glc/MIT-NoAd.t1.yml @@ -1,5 +1,5 @@ license_expressions: - - x11-xconsortium + - x11-swapped notes: | License test derived from a file of the BSD-licensed repository at: https://raw.githubusercontent.com/google/licensecheck/v0.3.1/testdata/MIT-NoAd.t1 diff --git a/tests/licensedcode/data/datadriven/external/spdx/uboot.c.yml b/tests/licensedcode/data/datadriven/external/spdx/uboot.c.yml index 423ebdcd383..62635b1218b 100644 --- a/tests/licensedcode/data/datadriven/external/spdx/uboot.c.yml +++ b/tests/licensedcode/data/datadriven/external/spdx/uboot.c.yml @@ -32,8 +32,8 @@ license_expressions: - gpl-2.0-plus - gpl-2.0-plus OR bsd-simplified - gpl-2.0-plus OR bsd-simplified - - gpl-2.0-plus OR bsd-new - - gpl-2.0-plus OR bsd-new + - gpl-2.0-plus AND bsd-new + - gpl-2.0-plus AND bsd-new - gpl-2.0 OR ibm-pibs - isc - lgpl-2.0-plus diff --git a/tests/licensedcode/data/datadriven/lic1/gfdl-1.3_2.RULE.yml b/tests/licensedcode/data/datadriven/lic1/gfdl-1.3_2.RULE.yml index 3cc476836f8..6f2918cd4a2 100644 --- a/tests/licensedcode/data/datadriven/lic1/gfdl-1.3_2.RULE.yml +++ b/tests/licensedcode/data/datadriven/lic1/gfdl-1.3_2.RULE.yml @@ -1,3 +1,4 @@ license_expressions: - gfdl-1.3 + - gfdl-1.3-invariants-only notes: this contains formatting tags diff --git a/tests/licensedcode/data/datadriven/lic4/airo.c b/tests/licensedcode/data/datadriven/lic4/airo.c new file mode 100644 index 00000000000..849d10c7aa5 --- /dev/null +++ b/tests/licensedcode/data/datadriven/lic4/airo.c @@ -0,0 +1,15 @@ + This code is released under both the GPL version 2 and BSD licenses. + Either license may be used. The respective licenses are found at + the end of this file. + + This code was developed by Benjamin Reed + including portions of which come from the Aironet PC4500 + Developer's Reference Manual and used with permission. Copyright + (C) 1999 Benjamin Reed. All Rights Reserved. Permission to use + code in the Developer's manual was granted for this driver by + Aironet. Major code contributions were received from Javier Achirica + and Jean Tourrilhes . + Code was also integrated from the Cisco Aironet driver for Linux. + Support for MPI350 cards was added by Fabrice Bellet + . + diff --git a/tests/licensedcode/data/datadriven/lic4/airo.c.yml b/tests/licensedcode/data/datadriven/lic4/airo.c.yml new file mode 100644 index 00000000000..2ee94967bb3 --- /dev/null +++ b/tests/licensedcode/data/datadriven/lic4/airo.c.yml @@ -0,0 +1,2 @@ +license_expressions: + - gpl-2.0 OR bsd-new diff --git a/tests/licensedcode/data/datadriven/lic4/bsd-bare-in-spdx.txt b/tests/licensedcode/data/datadriven/lic4/bsd-bare-in-spdx.txt new file mode 100644 index 00000000000..6f59e419eb2 --- /dev/null +++ b/tests/licensedcode/data/datadriven/lic4/bsd-bare-in-spdx.txt @@ -0,0 +1 @@ + * SPDX-License-Identifier: (GPL-2.0+ OR BSD) diff --git a/tests/licensedcode/data/datadriven/lic4/bsd-bare-in-spdx.txt.yml b/tests/licensedcode/data/datadriven/lic4/bsd-bare-in-spdx.txt.yml new file mode 100644 index 00000000000..b06479745fc --- /dev/null +++ b/tests/licensedcode/data/datadriven/lic4/bsd-bare-in-spdx.txt.yml @@ -0,0 +1,2 @@ +license_expressions: + - gpl-2.0-plus OR bsd-new diff --git a/tests/licensedcode/data/datadriven/lic4/memdump.cocci b/tests/licensedcode/data/datadriven/lic4/memdump.cocci new file mode 100644 index 00000000000..e8d6a79e9fd --- /dev/null +++ b/tests/licensedcode/data/datadriven/lic4/memdump.cocci @@ -0,0 +1,8 @@ +/// +// Confidence: High +// Copyright: (C) 2010-2012 Nicolas Palix. GPLv2. +// Copyright: (C) 2010-2012 Julia Lawall, INRIA/LIP6. GPLv2. +// Copyright: (C) 2010-2012 Gilles Muller, INRIA/LiP6. GPLv2. +// URL: http://coccinelle.lip6.fr/ +// Comments: +// Options: --no-includes --include-headers \ No newline at end of file diff --git a/tests/licensedcode/data/datadriven/lic4/memdump.cocci.yml b/tests/licensedcode/data/datadriven/lic4/memdump.cocci.yml new file mode 100644 index 00000000000..d793b4ed4fe --- /dev/null +++ b/tests/licensedcode/data/datadriven/lic4/memdump.cocci.yml @@ -0,0 +1,4 @@ +license_expressions: + - gpl-2.0 + - gpl-2.0 + - gpl-2.0 diff --git a/tests/licensedcode/data/datadriven/lic4/ruby-license.missed.txt b/tests/licensedcode/data/datadriven/lic4/ruby-license.missed.txt new file mode 100644 index 00000000000..5c51ac62fc5 --- /dev/null +++ b/tests/licensedcode/data/datadriven/lic4/ruby-license.missed.txt @@ -0,0 +1,3 @@ +# This program is free software. +# You can distribute and/or modify this program under the Ruby License. + diff --git a/tests/licensedcode/data/datadriven/lic4/ruby-license.missed.txt.yml b/tests/licensedcode/data/datadriven/lic4/ruby-license.missed.txt.yml new file mode 100644 index 00000000000..85de223bb56 --- /dev/null +++ b/tests/licensedcode/data/datadriven/lic4/ruby-license.missed.txt.yml @@ -0,0 +1,2 @@ +license_expressions: + - ruby diff --git a/tests/licensedcode/data/plugin_license/scan/ffmpeg-license.expected.json b/tests/licensedcode/data/plugin_license/scan/ffmpeg-license.expected.json index 244e6ce6b51..06dec2a848f 100644 --- a/tests/licensedcode/data/plugin_license/scan/ffmpeg-license.expected.json +++ b/tests/licensedcode/data/plugin_license/scan/ffmpeg-license.expected.json @@ -82,6 +82,47 @@ } ] }, + { + "identifier": "gpl_2_0_and_lgpl_2_0_plus-e597690d-3d55-0948-8697-914f460389e8", + "license_expression": "gpl-2.0 AND lgpl-2.0-plus", + "license_expression_spdx": "GPL-2.0-only AND LGPL-2.0-or-later", + "detection_count": 1, + "detection_log": [], + "reference_matches": [ + { + "license_expression": "gpl-2.0", + "license_expression_spdx": "GPL-2.0-only", + "from_file": "ffmpeg-LICENSE.md", + "start_line": 100, + "end_line": 100, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-2.0_bare_single_word.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_bare_single_word.RULE", + "matched_text": "are incompatible with the GPLv2 and v3. We do not know for certain if their", + "matched_text_diagnostics": "GPLv2" + }, + { + "license_expression": "lgpl-2.0-plus", + "license_expression_spdx": "LGPL-2.0-or-later", + "from_file": "ffmpeg-LICENSE.md", + "start_line": 101, + "end_line": 101, + "matcher": "2-aho", + "score": 60.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 60, + "rule_identifier": "lgpl_bare_single_word.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl_bare_single_word.RULE", + "matched_text": "licenses are compatible with the LGPL.", + "matched_text_diagnostics": "LGPL." + } + ] + }, { "identifier": "ijg_and_mit-e50613dc-8a09-65cc-c498-5d9527795382", "license_expression": "ijg AND mit", @@ -141,6 +182,31 @@ } ] }, + { + "identifier": "lgpl_2_0_plus-e66c5b24-33ce-ea1b-0e3b-28952361ec32", + "license_expression": "lgpl-2.0-plus", + "license_expression_spdx": "LGPL-2.0-or-later", + "detection_count": 1, + "detection_log": [], + "reference_matches": [ + { + "license_expression": "lgpl-2.0-plus", + "license_expression_spdx": "LGPL-2.0-or-later", + "from_file": "ffmpeg-LICENSE.md", + "start_line": 104, + "end_line": 104, + "matcher": "2-aho", + "score": 60.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 60, + "rule_identifier": "lgpl_bare_single_word.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl_bare_single_word.RULE", + "matched_text": "be under a complex license mix that is more restrictive than the LGPL and that", + "matched_text_diagnostics": "LGPL" + } + ] + }, { "identifier": "lgpl_2_1_plus_and_other_permissive_and_gpl_2_0_plus-666058ef-8c38-3b17-d8e7-448b304de833", "license_expression": "lgpl-2.1-plus AND other-permissive AND gpl-2.0-plus", @@ -228,8 +294,8 @@ { "path": "ffmpeg-LICENSE.md", "type": "file", - "detected_license_expression": "(lgpl-2.1-plus AND other-permissive AND gpl-2.0-plus) AND (lgpl-3.0 AND lgpl-3.0-plus AND (lgpl-3.0 AND gpl-3.0)) AND (ijg AND mit) AND gpl-1.0-plus AND (gpl-2.0 AND apache-2.0 AND lgpl-3.0-plus)", - "detected_license_expression_spdx": "(LGPL-2.1-or-later AND LicenseRef-scancode-other-permissive AND GPL-2.0-or-later) AND (LGPL-3.0-only AND LGPL-3.0-or-later AND (LGPL-3.0-only AND GPL-3.0-only)) AND (IJG AND MIT) AND GPL-1.0-or-later AND (GPL-2.0-only AND Apache-2.0 AND LGPL-3.0-or-later)", + "detected_license_expression": "(lgpl-2.1-plus AND other-permissive AND gpl-2.0-plus) AND (lgpl-3.0 AND lgpl-3.0-plus AND (lgpl-3.0 AND gpl-3.0)) AND (ijg AND mit) AND gpl-1.0-plus AND (gpl-2.0 AND apache-2.0 AND lgpl-3.0-plus) AND (gpl-2.0 AND lgpl-2.0-plus) AND lgpl-2.0-plus", + "detected_license_expression_spdx": "(LGPL-2.1-or-later AND LicenseRef-scancode-other-permissive AND GPL-2.0-or-later) AND (LGPL-3.0-only AND LGPL-3.0-or-later AND (LGPL-3.0-only AND GPL-3.0-only)) AND (IJG AND MIT) AND GPL-1.0-or-later AND (GPL-2.0-only AND Apache-2.0 AND LGPL-3.0-or-later) AND (GPL-2.0-only AND LGPL-2.0-or-later) AND LGPL-2.0-or-later", "license_detections": [ { "license_expression": "lgpl-2.1-plus AND other-permissive AND gpl-2.0-plus", @@ -448,41 +514,73 @@ ], "detection_log": [], "identifier": "gpl_2_0_and_apache_2_0_and_lgpl_3_0_plus-c2393e5a-e531-304f-58a9-a6431d46d214" - } - ], - "license_clues": [ + }, { - "license_expression": "gpl-2.0", - "license_expression_spdx": "GPL-2.0-only", - "from_file": "ffmpeg-LICENSE.md", - "start_line": 100, - "end_line": 100, - "matcher": "2-aho", - "score": 100.0, - "matched_length": 1, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "gpl-2.0_bare_single_word.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_bare_single_word.RULE", - "matched_text": "are incompatible with the GPLv2 and v3. We do not know for certain if their", - "matched_text_diagnostics": "GPLv2" + "license_expression": "gpl-2.0 AND lgpl-2.0-plus", + "license_expression_spdx": "GPL-2.0-only AND LGPL-2.0-or-later", + "matches": [ + { + "license_expression": "gpl-2.0", + "license_expression_spdx": "GPL-2.0-only", + "from_file": "ffmpeg-LICENSE.md", + "start_line": 100, + "end_line": 100, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-2.0_bare_single_word.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_bare_single_word.RULE", + "matched_text": "are incompatible with the GPLv2 and v3. We do not know for certain if their", + "matched_text_diagnostics": "GPLv2" + }, + { + "license_expression": "lgpl-2.0-plus", + "license_expression_spdx": "LGPL-2.0-or-later", + "from_file": "ffmpeg-LICENSE.md", + "start_line": 101, + "end_line": 101, + "matcher": "2-aho", + "score": 60.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 60, + "rule_identifier": "lgpl_bare_single_word.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl_bare_single_word.RULE", + "matched_text": "licenses are compatible with the LGPL.", + "matched_text_diagnostics": "LGPL." + } + ], + "detection_log": [], + "identifier": "gpl_2_0_and_lgpl_2_0_plus-e597690d-3d55-0948-8697-914f460389e8" }, { "license_expression": "lgpl-2.0-plus", "license_expression_spdx": "LGPL-2.0-or-later", - "from_file": "ffmpeg-LICENSE.md", - "start_line": 101, - "end_line": 101, - "matcher": "2-aho", - "score": 75.0, - "matched_length": 1, - "match_coverage": 100.0, - "rule_relevance": 75, - "rule_identifier": "lgpl_bare_single_word.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl_bare_single_word.RULE", - "matched_text": "licenses are compatible with the LGPL.", - "matched_text_diagnostics": "LGPL." - }, + "matches": [ + { + "license_expression": "lgpl-2.0-plus", + "license_expression_spdx": "LGPL-2.0-or-later", + "from_file": "ffmpeg-LICENSE.md", + "start_line": 104, + "end_line": 104, + "matcher": "2-aho", + "score": 60.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 60, + "rule_identifier": "lgpl_bare_single_word.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl_bare_single_word.RULE", + "matched_text": "be under a complex license mix that is more restrictive than the LGPL and that", + "matched_text_diagnostics": "LGPL" + } + ], + "detection_log": [], + "identifier": "lgpl_2_0_plus-e66c5b24-33ce-ea1b-0e3b-28952361ec32" + } + ], + "license_clues": [ { "license_expression": "proprietary-license", "license_expression_spdx": "LicenseRef-scancode-proprietary-license", @@ -498,22 +596,6 @@ "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/proprietary-license_490.RULE", "matched_text": "If you wish to enable these libraries, pass --enable-nonfree to configure.", "matched_text_diagnostics": "enable-nonfree" - }, - { - "license_expression": "lgpl-2.0-plus", - "license_expression_spdx": "LGPL-2.0-or-later", - "from_file": "ffmpeg-LICENSE.md", - "start_line": 104, - "end_line": 104, - "matcher": "2-aho", - "score": 75.0, - "matched_length": 1, - "match_coverage": 100.0, - "rule_relevance": 75, - "rule_identifier": "lgpl_bare_single_word.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl_bare_single_word.RULE", - "matched_text": "be under a complex license mix that is more restrictive than the LGPL and that", - "matched_text_diagnostics": "LGPL" } ], "percentage_of_license_text": 34.78, diff --git a/tests/licensedcode/test_detection_validate.py b/tests/licensedcode/test_detection_validate.py index 0d0c341c3b7..36ab14d6cec 100644 --- a/tests/licensedcode/test_detection_validate.py +++ b/tests/licensedcode/test_detection_validate.py @@ -42,12 +42,10 @@ def make_validation_test(rule, test_name, regen=REGEN_TEST_FIXTURES): def closure_test_function(*args, **kwargs): check_special_rule_cannot_be_detected(rule) - else: def closure_test_function(*args, **kwargs): check_rule_or_license_can_be_self_detected_exactly(rule) - check_ignorable_clues(rule, regen=regen) closure_test_function.__name__ = test_name closure_test_function.funcname = test_name @@ -107,6 +105,25 @@ def check_rule_or_license_can_be_self_detected_exactly(rule): assert '\n'.join(failure_trace) == '\n'.join(expected) +def make_ignorable_clues_test(rule, test_name, regen=REGEN_TEST_FIXTURES): + """ + Build and return a test function closing on tests arguments. + """ + if isinstance(test_name, bytes): + test_name = test_name.decode('utf-8') + + if rule.is_false_positive: + return + + def closure_test_function(*args, **kwargs): + check_ignorable_clues(rule, regen=regen) + + closure_test_function.__name__ = test_name + closure_test_function.funcname = test_name + + return closure_test_function + + def check_ignorable_clues(licensish, regen=REGEN_TEST_FIXTURES, verbose=False): """ Validate that all expected ignorable clues declared in a `licensish` License @@ -152,7 +169,13 @@ def check_ignorable_clues(licensish, regen=REGEN_TEST_FIXTURES, verbose=False): assert saneyaml.dump(result) == saneyaml.dump(expected) -def build_validation_tests(rules, test_classes, regen=REGEN_TEST_FIXTURES): +def build_validation_tests( + rules, + test_classes, + test_func_creator=make_validation_test, + test_name_prefix="test_validate_detect_", + regen=REGEN_TEST_FIXTURES, +): """ Dynamically build an individual test method for each rule texts in a ``rules`` iterable of Rule objects then attach the test methods to the @@ -178,16 +201,14 @@ def build_validation_tests(rules, test_classes, regen=REGEN_TEST_FIXTURES): # as they are not included in the standard indexing if rule.language != 'en': continue - test_name = ( - 'test_validate_detect_' + - text.python_safe_name(rule.identifier) - ) - test_method = make_validation_test( + test_name = f"{test_name_prefix }{text.python_safe_name(rule.identifier)}" + test_method = test_func_creator( rule=rule, test_name=test_name, regen=regen, ) - setattr(cls, test_name, test_method) + if test_method: + setattr(cls, test_name, test_method) class TestValidateLicenseBasic(unittest.TestCase): @@ -232,6 +253,54 @@ class TestValidateLicenseExtended5(unittest.TestCase): TestValidateLicenseExtended4, TestValidateLicenseExtended5, ], + test_func_creator=make_validation_test, + test_name_prefix="test_validate_detect_", + regen=REGEN_TEST_FIXTURES, +) + + +class TestValidateLicenseIgnorableCluesBasic(unittest.TestCase): + # Test functions are attached to this class at import time + pytestmark = pytest.mark.scanslow + + +class TestValidateLicenseIgnorableClues1(unittest.TestCase): + # Test functions are attached to this class at import time + pytestmark = pytest.mark.scanvalidate + + +class TestValidateLicenseIgnorableClues2(unittest.TestCase): + # Test functions are attached to this class at import time + pytestmark = pytest.mark.scanvalidate + + +class TestValidateLicenseIgnorableClues3(unittest.TestCase): + # Test functions are attached to this class at import time + pytestmark = pytest.mark.scanvalidate + + +class TestValidateLicenseIgnorableClues4(unittest.TestCase): + # Test functions are attached to this class at import time + pytestmark = pytest.mark.scanvalidate + + +class TestValidateLicenseIgnorableClues5(unittest.TestCase): + # Test functions are attached to this class at import time + pytestmark = pytest.mark.scanvalidate + + +build_validation_tests( + _rules, + test_classes=[ + TestValidateLicenseIgnorableCluesBasic, + TestValidateLicenseIgnorableClues1, + TestValidateLicenseIgnorableClues2, + TestValidateLicenseIgnorableClues3, + TestValidateLicenseIgnorableClues4, + TestValidateLicenseIgnorableClues5, + ], + test_func_creator=make_ignorable_clues_test, + test_name_prefix="test_ignorables_in_license_", regen=REGEN_TEST_FIXTURES, ) diff --git a/tests/packagedcode/data/debian/copyright/debian-2019-11-15/main/e/e2fsprogs/stable_copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-2019-11-15/main/e/e2fsprogs/stable_copyright-detailed.expected.yml index 46dd20e074a..881eeb6a0de 100644 --- a/tests/packagedcode/data/debian/copyright/debian-2019-11-15/main/e/e2fsprogs/stable_copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-2019-11-15/main/e/e2fsprogs/stable_copyright-detailed.expected.yml @@ -98,7 +98,7 @@ other_license_detections: [] copyright: | Copyright (c) 2003-2007 Theodore Ts'o Copyright (c) 1997-2003 Yann Dirson - Copyright (c) 2001 Alcove + Copyright (c) 2001 Alcove http://www.alcove.com Copyright (c) 1997 Klee Dienes Copyright (c) 1995-1996 Michael Nonweiler Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Theodore Ts'o diff --git a/tests/packagedcode/data/debian/copyright/debian-2019-11-15/main/e/e2fsprogs/stable_e2fsck-static.copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-2019-11-15/main/e/e2fsprogs/stable_e2fsck-static.copyright-detailed.expected.yml index e8f10ba7f28..e4ea07c6180 100644 --- a/tests/packagedcode/data/debian/copyright/debian-2019-11-15/main/e/e2fsprogs/stable_e2fsck-static.copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-2019-11-15/main/e/e2fsprogs/stable_e2fsck-static.copyright-detailed.expected.yml @@ -46,7 +46,7 @@ other_license_detections: [] copyright: | Copyright (c) 2003-2006 Theodore Ts'o Copyright (c) 1997-2003 Yann Dirson - Copyright (c) 2001 Alcove + Copyright (c) 2001 Alcove http://www.alcove.com Copyright (c) 1997 Klee Dienes Copyright (c) 1995-1996 Michael Nonweiler Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Theodore Ts'o diff --git a/tests/packagedcode/data/debian/copyright/debian-2019-11-15/main/e/e2fsprogs/stable_e2fsprogs-l10n.copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-2019-11-15/main/e/e2fsprogs/stable_e2fsprogs-l10n.copyright-detailed.expected.yml index e8f10ba7f28..e4ea07c6180 100644 --- a/tests/packagedcode/data/debian/copyright/debian-2019-11-15/main/e/e2fsprogs/stable_e2fsprogs-l10n.copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-2019-11-15/main/e/e2fsprogs/stable_e2fsprogs-l10n.copyright-detailed.expected.yml @@ -46,7 +46,7 @@ other_license_detections: [] copyright: | Copyright (c) 2003-2006 Theodore Ts'o Copyright (c) 1997-2003 Yann Dirson - Copyright (c) 2001 Alcove + Copyright (c) 2001 Alcove http://www.alcove.com Copyright (c) 1997 Klee Dienes Copyright (c) 1995-1996 Michael Nonweiler Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Theodore Ts'o diff --git a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/e2fsprogs/copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/e2fsprogs/copyright-detailed.expected.yml index 46dd20e074a..881eeb6a0de 100644 --- a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/e2fsprogs/copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/e2fsprogs/copyright-detailed.expected.yml @@ -98,7 +98,7 @@ other_license_detections: [] copyright: | Copyright (c) 2003-2007 Theodore Ts'o Copyright (c) 1997-2003 Yann Dirson - Copyright (c) 2001 Alcove + Copyright (c) 2001 Alcove http://www.alcove.com Copyright (c) 1997 Klee Dienes Copyright (c) 1995-1996 Michael Nonweiler Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Theodore Ts'o diff --git a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/gcc-10-base/copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/gcc-10-base/copyright-detailed.expected.yml index 8394d73939e..cfdefb19e3f 100644 --- a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/gcc-10-base/copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/gcc-10-base/copyright-detailed.expected.yml @@ -2166,13 +2166,13 @@ copyright: | Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Copyright (c) 2009-2019 by the LLVM contributors Copyright (c) 1996-2003 Red Hat, Inc. - Copyright (c) 2009 Free Software Foundation, Inc. + Copyright (c) 2009 Free Software Foundation, Inc. http://fsf.org Copyright (c) 2010 Free Software Foundation, Inc. Copyright 2001 by Stephen L. Moshier Copyright (c) 2001 Stephen L. Moshier Copyright (c) 1997, 1999 Free Software Foundation, Inc. Copyright (c) 1997, 1999, 2002, 2004 Free Software Foundation, Inc. - Copyright 1984, 1991 by Stephen L. Moshier Adapted + Copyright 1984, 1991 by Stephen L. Moshier Copyright (c) 1993 by Sun Microsystems, Inc. Copyright (c) 2009 The Go Authors Copyright (c) 2004-2007 David Friedman diff --git a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/gcc-9-base/copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/gcc-9-base/copyright-detailed.expected.yml index 1e2ec659907..5b271da761f 100644 --- a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/gcc-9-base/copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/gcc-9-base/copyright-detailed.expected.yml @@ -2425,13 +2425,13 @@ copyright: | Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Copyright (c) 2009-2014 by the LLVM contributors Copyright (c) 1996-2003 Red Hat, Inc. - Copyright (c) 2009 Free Software Foundation, Inc. + Copyright (c) 2009 Free Software Foundation, Inc. http://fsf.org Copyright (c) 2010 Free Software Foundation, Inc. Copyright 2001 by Stephen L. Moshier Copyright (c) 2001 Stephen L. Moshier Copyright (c) 1997, 1999 Free Software Foundation, Inc. Copyright (c) 1997, 1999, 2002, 2004 Free Software Foundation, Inc. - Copyright 1984, 1991 by Stephen L. Moshier Adapted + Copyright 1984, 1991 by Stephen L. Moshier Copyright (c) 1993 by Sun Microsystems, Inc. Copyright (c) 2009 The Go Authors Copyright (c) 2004-2007 David Friedman diff --git a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libcrypt1/copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libcrypt1/copyright-detailed.expected.yml index c7d32ddab89..64496a30b3f 100644 --- a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libcrypt1/copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libcrypt1/copyright-detailed.expected.yml @@ -494,14 +494,15 @@ copyright: | Copyright Juniper Networks, Inc. Copyright Bjorn Esser Copyright Zack Weinberg and Free Software Foundation, Inc + Copyright vt at altlinux.org Copyright Kevin Cernekee FSF Copyright Maarten Bosmans FSF Copyright Guido U. Draheim, Maarten Bosmans FSF Copyright Mike Frysinger FSF - Copyright Scott James Remnant, Dan Nicholson GPL + Copyright Scott James Remnant, Dan Nicholson Copyright Tim Toolan FSF Copyright Philip Withnall FSF - Copyright Steven G. Johnson, Daniel Richard G. GPL + Copyright Steven G. Johnson, Daniel Richard G. Copyright Francesco Salvestrini FSF Copyright Andrew Collier FSF Copyright 2002, 2003, 2004 SuSE Linux AG, Germany diff --git a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libext2fs2/copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libext2fs2/copyright-detailed.expected.yml index 46dd20e074a..881eeb6a0de 100644 --- a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libext2fs2/copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libext2fs2/copyright-detailed.expected.yml @@ -98,7 +98,7 @@ other_license_detections: [] copyright: | Copyright (c) 2003-2007 Theodore Ts'o Copyright (c) 1997-2003 Yann Dirson - Copyright (c) 2001 Alcove + Copyright (c) 2001 Alcove http://www.alcove.com Copyright (c) 1997 Klee Dienes Copyright (c) 1995-1996 Michael Nonweiler Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Theodore Ts'o diff --git a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libgcrypt20/copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libgcrypt20/copyright-detailed.expected.yml index 5936cfdb326..34902b9cc25 100644 --- a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libgcrypt20/copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/libgcrypt20/copyright-detailed.expected.yml @@ -1,14 +1,14 @@ declared_license: -declared_license_expression: gpl-1.0-plus AND other-permissive AND public-domain AND fsf-unlimited-no-warranty - AND (lgpl-2.1-plus AND gpl-2.0-plus) AND (lgpl-2.0-plus AND gpl-2.0-plus) AND lgpl-2.0-plus - AND lgpl-2.1-plus AND gpl-1.0-plus AND gpl-2.0-plus AND (other-permissive AND other-copyleft) - AND bsd-new AND bsd-new AND (bsd-new OR gpl-1.0-plus) AND x11-xconsortium AND public-domain - AND public-domain AND ocb-open-source-2013 AND ocb-open-source-2013 AND ocb-open-source-2013 - AND ocb-open-source-2013 AND gpl-2.0 -declared_license_expression_spdx: GPL-1.0-or-later AND LicenseRef-scancode-other-permissive +declared_license_expression: gpl-2.0-plus AND other-permissive AND public-domain AND fsf-unlimited-no-warranty + AND (lgpl-2.1-plus AND gpl-2.0-plus) AND (lgpl-2.0-plus AND gpl-2.0-plus) AND lgpl-2.1-plus + AND gpl-1.0-plus AND gpl-2.0-plus AND (other-permissive AND other-copyleft) AND bsd-new AND + bsd-new AND (bsd-new OR gpl-1.0-plus) AND x11-xconsortium AND public-domain AND public-domain + AND ocb-open-source-2013 AND ocb-open-source-2013 AND ocb-open-source-2013 AND ocb-open-source-2013 + AND gpl-2.0 +declared_license_expression_spdx: GPL-2.0-or-later AND LicenseRef-scancode-other-permissive AND LicenseRef-scancode-public-domain AND FSFULLRWD AND (LGPL-2.1-or-later AND GPL-2.0-or-later) - AND (LGPL-2.0-or-later AND GPL-2.0-or-later) AND LGPL-2.0-or-later AND LGPL-2.1-or-later AND - GPL-1.0-or-later AND GPL-2.0-or-later AND (LicenseRef-scancode-other-permissive AND LicenseRef-scancode-other-copyleft) + AND (LGPL-2.0-or-later AND GPL-2.0-or-later) AND LGPL-2.1-or-later AND GPL-1.0-or-later AND + GPL-2.0-or-later AND (LicenseRef-scancode-other-permissive AND LicenseRef-scancode-other-copyleft) AND BSD-3-Clause AND BSD-3-Clause AND (BSD-3-Clause OR GPL-1.0-or-later) AND X11 AND LicenseRef-scancode-public-domain AND LicenseRef-scancode-public-domain AND LicenseRef-scancode-ocb-open-source-2013 AND LicenseRef-scancode-ocb-open-source-2013 AND LicenseRef-scancode-ocb-open-source-2013 AND LicenseRef-scancode-ocb-open-source-2013 @@ -16,14 +16,14 @@ declared_license_expression_spdx: GPL-1.0-or-later AND LicenseRef-scancode-other other_license_expression: other_license_expression_spdx: license_detections: - - license_expression: gpl-1.0-plus AND other-permissive AND public-domain AND fsf-unlimited-no-warranty - AND (lgpl-2.1-plus AND gpl-2.0-plus) AND (lgpl-2.0-plus AND gpl-2.0-plus) AND lgpl-2.0-plus - license_expression_spdx: GPL-1.0-or-later AND LicenseRef-scancode-other-permissive AND LicenseRef-scancode-public-domain + - license_expression: gpl-2.0-plus AND other-permissive AND public-domain AND fsf-unlimited-no-warranty + AND (lgpl-2.1-plus AND gpl-2.0-plus) AND (lgpl-2.0-plus AND gpl-2.0-plus) + license_expression_spdx: GPL-2.0-or-later AND LicenseRef-scancode-other-permissive AND LicenseRef-scancode-public-domain AND FSFULLRWD AND (LGPL-2.1-or-later AND GPL-2.0-or-later) AND (LGPL-2.0-or-later AND - GPL-2.0-or-later) AND LGPL-2.0-or-later + GPL-2.0-or-later) matches: - - license_expression: gpl-1.0-plus - license_expression_spdx: GPL-1.0-or-later + - license_expression: gpl-2.0-plus + spdx_license_expression: GPL-2.0-or-later from_file: start_line: 210 end_line: 211 @@ -32,8 +32,8 @@ license_detections: matched_length: 8 match_coverage: '100.0' rule_relevance: 100 - rule_identifier: gpl-1.0-plus_477.RULE - rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-1.0-plus_477.RULE + rule_identifier: gpl-2.0-plus_11301.RULE + rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0-plus_11301.RULE matched_text: | taken from the original NTT provided GPL source. @@ -136,20 +136,7 @@ license_detections: less to protect the freedom of the users of the code that it covers. See http://www.gnu.org/philosophy/why-not-lgpl.html for more explanation. - - license_expression: lgpl-2.0-plus - license_expression_spdx: LGPL-2.0-or-later - from_file: - start_line: 262 - end_line: 262 - matcher: 2-aho - score: '100.0' - matched_length: 6 - match_coverage: '100.0' - rule_relevance: 100 - rule_identifier: lgpl-2.0-plus_467.RULE - rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.0-plus_467.RULE - matched_text: the license headers of the LGPL - identifier: gpl_1_0_plus_and_other_permissive_and_public_domain_and_fsf_unlimited_no_warranty_and__lgpl_2_1_plus_and_gpl_2_0_plus__and__lgpl_2_0_plus_and_gpl_2_0_plus__and_lgpl_2_0_plus-71da280b-c092-be79-7ec6-e3cc205ddfd8 + identifier: gpl_2_0_plus_and_other_permissive_and_public_domain_and_fsf_unlimited_no_warranty_and__lgpl_2_1_plus_and_gpl_2_0_plus__and__lgpl_2_0_plus_and_gpl_2_0_plus-be7f4a34-02e4-4203-9dd6-a581178f6ca1 - license_expression: lgpl-2.1-plus AND gpl-1.0-plus license_expression_spdx: LGPL-2.1-or-later AND GPL-1.0-or-later matches: @@ -348,8 +335,8 @@ license_detections: * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. identifier: bsd_new_or_gpl_1_0_plus-f8085429-0058-17f2-8a37-27a1965c9f8a - - license_expression: x11-xconsortium AND public-domain - license_expression_spdx: X11 AND LicenseRef-scancode-public-domain + - license_expression: x11-xconsortium + license_expression_spdx: X11 matches: - license_expression: x11-xconsortium license_expression_spdx: X11 @@ -385,6 +372,10 @@ license_detections: be used in advertising or otherwise to promote the sale, use or other deal- ings in this Software without prior written authorization from the X Consor- tium. + identifier: x11_xconsortium-8bc3e205-5f29-ecad-90bc-2f492c65be46 + - license_expression: public-domain + license_expression_spdx: LicenseRef-scancode-public-domain + matches: - license_expression: public-domain license_expression_spdx: LicenseRef-scancode-public-domain from_file: @@ -398,7 +389,7 @@ license_detections: rule_identifier: public-domain_bare_words.RULE rule_url: https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/public-domain_bare_words.RULE matched_text: Public domain - identifier: x11_xconsortium_and_public_domain-3a4b5640-3d0e-289d-2ed6-5568ba1f72cd + identifier: public_domain-3dd945ae-65df-7d90-6467-60f8ecf2eb77 - license_expression: public-domain AND ocb-open-source-2013 license_expression_spdx: LicenseRef-scancode-public-domain AND LicenseRef-scancode-ocb-open-source-2013 matches: diff --git a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/logsave/copyright-detailed.expected.yml b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/logsave/copyright-detailed.expected.yml index 46dd20e074a..881eeb6a0de 100644 --- a/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/logsave/copyright-detailed.expected.yml +++ b/tests/packagedcode/data/debian/copyright/debian-slim-2021-04-07/usr/share/doc/logsave/copyright-detailed.expected.yml @@ -98,7 +98,7 @@ other_license_detections: [] copyright: | Copyright (c) 2003-2007 Theodore Ts'o Copyright (c) 1997-2003 Yann Dirson - Copyright (c) 2001 Alcove + Copyright (c) 2001 Alcove http://www.alcove.com Copyright (c) 1997 Klee Dienes Copyright (c) 1995-1996 Michael Nonweiler Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by Theodore Ts'o diff --git a/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests-with-license.json b/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests-with-license.json index 23be3e71764..dbbfcbfa1a9 100644 --- a/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests-with-license.json +++ b/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests-with-license.json @@ -550,17 +550,6 @@ "is_virtual": false, "extra_data": {}, "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>=3.6", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, { "purl": "pkg:pypi/pytest", "extracted_requirement": "pytest>=4.6", diff --git a/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests.json b/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests.json index 64c41d5cc76..6d3a53ac1b1 100644 --- a/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests.json +++ b/tests/packagedcode/data/instance/python-package-instance-expected-with-test-manifests.json @@ -314,17 +314,6 @@ "is_virtual": false, "extra_data": {}, "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>=3.6", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, { "purl": "pkg:pypi/pytest", "extracted_requirement": "pytest>=4.6", diff --git a/tests/packagedcode/data/instance/python-package-instance-expected-with-uuid.json b/tests/packagedcode/data/instance/python-package-instance-expected-with-uuid.json index d30a36c76e7..a7ac3d9495f 100644 --- a/tests/packagedcode/data/instance/python-package-instance-expected-with-uuid.json +++ b/tests/packagedcode/data/instance/python-package-instance-expected-with-uuid.json @@ -81,21 +81,6 @@ } ], "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>= 3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:generic/python?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:pypi/click@attr:%20click.__version__?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "setup.cfg", - "datasource_id": "pypi_setup_cfg" - }, { "purl": "pkg:pypi/colorama", "extracted_requirement": null, @@ -220,19 +205,7 @@ "is_private": false, "is_virtual": false, "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>= 3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], + "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, diff --git a/tests/packagedcode/data/instance/python-package-instance-expected.json b/tests/packagedcode/data/instance/python-package-instance-expected.json index d30a36c76e7..a7ac3d9495f 100644 --- a/tests/packagedcode/data/instance/python-package-instance-expected.json +++ b/tests/packagedcode/data/instance/python-package-instance-expected.json @@ -81,21 +81,6 @@ } ], "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>= 3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:generic/python?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:pypi/click@attr:%20click.__version__?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "setup.cfg", - "datasource_id": "pypi_setup_cfg" - }, { "purl": "pkg:pypi/colorama", "extracted_requirement": null, @@ -220,19 +205,7 @@ "is_private": false, "is_virtual": false, "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>= 3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], + "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, diff --git a/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json b/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json index 62ea91b3105..2633a8c3fca 100644 --- a/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json +++ b/tests/packagedcode/data/instance/python-package-instance-with-license-expected.json @@ -98,21 +98,6 @@ } ], "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>= 3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:generic/python?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:pypi/click@attr:%20click.__version__?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "setup.cfg", - "datasource_id": "pypi_setup_cfg" - }, { "purl": "pkg:pypi/colorama", "extracted_requirement": null, @@ -413,19 +398,7 @@ "is_private": false, "is_virtual": false, "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>= 3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], + "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, diff --git a/tests/packagedcode/data/license_detection/reference-to-package/fusiondirectory.expected.json b/tests/packagedcode/data/license_detection/reference-to-package/fusiondirectory.expected.json index 8e6dc112ef8..f800d293e2a 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/fusiondirectory.expected.json +++ b/tests/packagedcode/data/license_detection/reference-to-package/fusiondirectory.expected.json @@ -5156,12 +5156,9 @@ { "identifier": "gpl_2_0_plus-fed2dc38-09ac-103e-1b86-4a4f5c00614a", "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "detection_count": 2, - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "reference_matches": [ { "license_expression": "gpl-2.0-plus", @@ -5542,6 +5539,31 @@ } ] }, + { + "identifier": "lgpl_3_0-6b4a45da-85cc-8eb0-5613-be81d4efd6a5", + "license_expression": "lgpl-3.0", + "license_expression_spdx": "LGPL-3.0-only", + "detection_count": 2, + "detection_log": [], + "reference_matches": [ + { + "license_expression": "lgpl-3.0", + "license_expression_spdx": "LGPL-3.0-only", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 2925, + "end_line": 2925, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "lgpl-3.0_37.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_37.RULE", + "matched_text": "License: LGPL (v3 or later)", + "matched_text_diagnostics": "License: LGPL (v3" + } + ] + }, { "identifier": "lgpl_3_0_plus-4c8d95b2-1acf-7a81-473c-d8e70962288c", "license_expression": "lgpl-3.0-plus", @@ -5570,12 +5592,9 @@ { "identifier": "mit-1f9f2ae8-7020-0a13-7934-461c752929a4", "license_expression": "mit", - "license_expression_spdx": null, + "license_expression_spdx": "MIT", "detection_count": 6, - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "reference_matches": [ { "license_expression": "mit", @@ -5595,15 +5614,53 @@ } ] }, + { + "identifier": "mit_and_other_permissive-907b56d6-95b9-e85c-83c0-efd967c7e30a", + "license_expression": "mit AND other-permissive", + "license_expression_spdx": "MIT AND LicenseRef-scancode-other-permissive", + "detection_count": 2, + "detection_log": [], + "reference_matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3010, + "end_line": 3010, + "matcher": "2-aho", + "score": 90.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 90, + "rule_identifier": "mit_221.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_221.RULE", + "matched_text": "License: MIT/X11 (BSD like)", + "matched_text_diagnostics": "License: MIT/X11 (" + }, + { + "license_expression": "other-permissive", + "license_expression_spdx": "LicenseRef-scancode-other-permissive", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3010, + "end_line": 3010, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "other-permissive_16.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/other-permissive_16.RULE", + "matched_text": "License: MIT/X11 (BSD like)", + "matched_text_diagnostics": "BSD like)" + } + ] + }, { "identifier": "public_domain-1a6a4f2c-bd92-9942-920f-be3d0c2bbda6", "license_expression": "public-domain", - "license_expression_spdx": null, + "license_expression_spdx": "LicenseRef-scancode-public-domain", "detection_count": 2, - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "reference_matches": [ { "license_expression": "public-domain", @@ -5622,6 +5679,63 @@ "matched_text_diagnostics": "License: public-domain" } ] + }, + { + "identifier": "public_domain_and_bsd_original_and_gpl_1_0_plus-ccb73883-974d-42eb-d572-39fa7bf22f4c", + "license_expression": "public-domain AND bsd-original AND gpl-1.0-plus", + "license_expression_spdx": "LicenseRef-scancode-public-domain AND BSD-4-Clause AND GPL-1.0-or-later", + "detection_count": 2, + "detection_log": [], + "reference_matches": [ + { + "license_expression": "public-domain", + "license_expression_spdx": "LicenseRef-scancode-public-domain", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3016, + "end_line": 3016, + "matcher": "2-aho", + "score": 99.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "pypi_public_domain.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_public_domain.RULE", + "matched_text": "License: Public domain BSD (4 clause) GPL", + "matched_text_diagnostics": "License: Public domain" + }, + { + "license_expression": "bsd-original", + "license_expression_spdx": "BSD-4-Clause", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3016, + "end_line": 3016, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx_license_id_bsd-4-clause_for_bsd-original.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_bsd-4-clause_for_bsd-original.RULE", + "matched_text": "License: Public domain BSD (4 clause) GPL", + "matched_text_diagnostics": "BSD (4 clause)" + }, + { + "license_expression": "gpl-1.0-plus", + "license_expression_spdx": "GPL-1.0-or-later", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3016, + "end_line": 3016, + "matcher": "2-aho", + "score": 50.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 50, + "rule_identifier": "gpl_bare_word_only.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_bare_word_only.RULE", + "matched_text": "License: Public domain BSD (4 clause) GPL", + "matched_text_diagnostics": "GPL" + } + ] } ], "files": [ @@ -6135,8 +6249,8 @@ "vcs_url": "https://salsa.debian.org/debian/fusiondirectory.git", "copyright": null, "holder": null, - "declared_license_expression": "gpl-2.0-plus AND free-unknown AND bsd-new AND lgpl-3.0-plus AND public-domain AND mit AND bsd-original AND (gpl-2.0-plus AND gpl-3.0-plus AND lgpl-2.1-plus AND lgpl-3.0-plus AND bsd-new AND bsd-original AND mit AND public-domain AND other-permissive) AND bsd-simplified", - "declared_license_expression_spdx": "GPL-2.0-or-later AND LicenseRef-scancode-free-unknown AND BSD-3-Clause AND LGPL-3.0-or-later AND LicenseRef-scancode-public-domain AND MIT AND BSD-4-Clause AND (GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND LGPL-3.0-or-later AND BSD-3-Clause AND BSD-4-Clause AND MIT AND LicenseRef-scancode-public-domain AND LicenseRef-scancode-other-permissive) AND BSD-2-Clause", + "declared_license_expression": "gpl-2.0-plus AND free-unknown AND bsd-new AND lgpl-3.0-plus AND public-domain AND mit AND bsd-original AND (gpl-2.0-plus AND gpl-3.0-plus AND lgpl-2.1-plus AND lgpl-3.0-plus AND bsd-new AND bsd-original AND mit AND public-domain AND other-permissive) AND bsd-simplified AND lgpl-3.0 AND (mit AND other-permissive) AND (public-domain AND bsd-original AND gpl-1.0-plus)", + "declared_license_expression_spdx": "GPL-2.0-or-later AND LicenseRef-scancode-free-unknown AND BSD-3-Clause AND LGPL-3.0-or-later AND LicenseRef-scancode-public-domain AND MIT AND BSD-4-Clause AND (GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-2.1-or-later AND LGPL-3.0-or-later AND BSD-3-Clause AND BSD-4-Clause AND MIT AND LicenseRef-scancode-public-domain AND LicenseRef-scancode-other-permissive) AND BSD-2-Clause AND LGPL-3.0-only AND (MIT AND LicenseRef-scancode-other-permissive) AND (LicenseRef-scancode-public-domain AND BSD-4-Clause AND GPL-1.0-or-later)", "license_detections": [ { "license_expression": "gpl-2.0-plus", @@ -6500,7 +6614,7 @@ }, { "license_expression": "public-domain", - "license_expression_spdx": null, + "license_expression_spdx": "LicenseRef-scancode-public-domain", "matches": [ { "license_expression": "public-domain", @@ -6519,15 +6633,12 @@ "matched_text_diagnostics": "License: public-domain" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "public_domain-1a6a4f2c-bd92-9942-920f-be3d0c2bbda6" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -6546,15 +6657,12 @@ "matched_text_diagnostics": "GPL-2+)." } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-fed2dc38-09ac-103e-1b86-4a4f5c00614a" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -6573,15 +6681,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -6600,15 +6705,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "mit", - "license_expression_spdx": null, + "license_expression_spdx": "MIT", "matches": [ { "license_expression": "mit", @@ -6627,15 +6729,12 @@ "matched_text_diagnostics": "License: Expat" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "mit-1f9f2ae8-7020-0a13-7934-461c752929a4" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -6654,15 +6753,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -6681,15 +6777,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -6708,15 +6801,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -6735,15 +6825,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -6762,15 +6849,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -6789,15 +6873,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -6816,15 +6897,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -6843,15 +6921,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -6870,15 +6945,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -6897,10 +6969,7 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { @@ -6929,7 +6998,7 @@ }, { "license_expression": "mit", - "license_expression_spdx": null, + "license_expression_spdx": "MIT", "matches": [ { "license_expression": "mit", @@ -6948,15 +7017,12 @@ "matched_text_diagnostics": "License: Expat" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "mit-1f9f2ae8-7020-0a13-7934-461c752929a4" }, { "license_expression": "mit", - "license_expression_spdx": null, + "license_expression_spdx": "MIT", "matches": [ { "license_expression": "mit", @@ -6975,10 +7041,7 @@ "matched_text_diagnostics": "License: Expat" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "mit-1f9f2ae8-7020-0a13-7934-461c752929a4" }, { @@ -7605,6 +7668,30 @@ "detection_log": [], "identifier": "gpl_2_0_plus-227f50b1-f05e-5b3b-b107-ae1e2f56448b" }, + { + "license_expression": "lgpl-3.0", + "license_expression_spdx": "LGPL-3.0-only", + "matches": [ + { + "license_expression": "lgpl-3.0", + "spdx_license_expression": "LGPL-3.0-only", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 2925, + "end_line": 2925, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "lgpl-3.0_37.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_37.RULE", + "matched_text": "License: LGPL (v3 or later)", + "matched_text_diagnostics": "License: LGPL (v3" + } + ], + "detection_log": [], + "identifier": "lgpl_3_0-6b4a45da-85cc-8eb0-5613-be81d4efd6a5" + }, { "license_expression": "gpl-2.0-plus", "license_expression_spdx": "GPL-2.0-or-later", @@ -7892,6 +7979,102 @@ ], "detection_log": [], "identifier": "gpl_2_0_plus-227f50b1-f05e-5b3b-b107-ae1e2f56448b" + }, + { + "license_expression": "mit AND other-permissive", + "license_expression_spdx": "MIT AND LicenseRef-scancode-other-permissive", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3010, + "end_line": 3010, + "matcher": "2-aho", + "score": 90.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 90, + "rule_identifier": "mit_221.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_221.RULE", + "matched_text": "License: MIT/X11 (BSD like)", + "matched_text_diagnostics": "License: MIT/X11 (" + }, + { + "license_expression": "other-permissive", + "spdx_license_expression": "LicenseRef-scancode-other-permissive", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3010, + "end_line": 3010, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "other-permissive_16.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/other-permissive_16.RULE", + "matched_text": "License: MIT/X11 (BSD like)", + "matched_text_diagnostics": "BSD like)" + } + ], + "detection_log": [], + "identifier": "mit_and_other_permissive-907b56d6-95b9-e85c-83c0-efd967c7e30a" + }, + { + "license_expression": "public-domain AND bsd-original AND gpl-1.0-plus", + "license_expression_spdx": "LicenseRef-scancode-public-domain AND BSD-4-Clause AND GPL-1.0-or-later", + "matches": [ + { + "license_expression": "public-domain", + "spdx_license_expression": "LicenseRef-scancode-public-domain", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3016, + "end_line": 3016, + "matcher": "2-aho", + "score": 99.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "pypi_public_domain.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_public_domain.RULE", + "matched_text": "License: Public domain BSD (4 clause) GPL", + "matched_text_diagnostics": "License: Public domain" + }, + { + "license_expression": "bsd-original", + "spdx_license_expression": "BSD-4-Clause", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3016, + "end_line": 3016, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx_license_id_bsd-4-clause_for_bsd-original.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_bsd-4-clause_for_bsd-original.RULE", + "matched_text": "License: Public domain BSD (4 clause) GPL", + "matched_text_diagnostics": "BSD (4 clause)" + }, + { + "license_expression": "gpl-1.0-plus", + "spdx_license_expression": "GPL-1.0-or-later", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3016, + "end_line": 3016, + "matcher": "2-aho", + "score": 50.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 50, + "rule_identifier": "gpl_bare_word_only.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_bare_word_only.RULE", + "matched_text": "License: Public domain BSD (4 clause) GPL", + "matched_text_diagnostics": "GPL" + } + ], + "detection_log": [], + "identifier": "public_domain_and_bsd_original_and_gpl_1_0_plus-ccb73883-974d-42eb-d572-39fa7bf22f4c" } ], "other_license_expression": null, @@ -13046,7 +13229,7 @@ }, { "license_expression": "public-domain", - "license_expression_spdx": null, + "license_expression_spdx": "LicenseRef-scancode-public-domain", "matches": [ { "license_expression": "public-domain", @@ -13065,15 +13248,12 @@ "matched_text_diagnostics": "License: public-domain" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "public_domain-1a6a4f2c-bd92-9942-920f-be3d0c2bbda6" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -13092,15 +13272,12 @@ "matched_text_diagnostics": "GPL-2+)." } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-fed2dc38-09ac-103e-1b86-4a4f5c00614a" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -13119,15 +13296,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -13146,15 +13320,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "mit", - "license_expression_spdx": null, + "license_expression_spdx": "MIT", "matches": [ { "license_expression": "mit", @@ -13173,15 +13344,12 @@ "matched_text_diagnostics": "License: Expat" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "mit-1f9f2ae8-7020-0a13-7934-461c752929a4" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -13200,15 +13368,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -13227,15 +13392,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -13254,15 +13416,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -13281,15 +13440,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -13308,15 +13464,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -13335,15 +13488,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -13362,15 +13512,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -13389,15 +13536,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -13416,15 +13560,12 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { "license_expression": "gpl-2.0-plus", - "license_expression_spdx": null, + "license_expression_spdx": "GPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0-plus", @@ -13443,10 +13584,7 @@ "matched_text_diagnostics": "License: GPL-2+" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "gpl_2_0_plus-53a26be2-1f88-01ec-d294-921768a513c9" }, { @@ -13475,7 +13613,7 @@ }, { "license_expression": "mit", - "license_expression_spdx": null, + "license_expression_spdx": "MIT", "matches": [ { "license_expression": "mit", @@ -13494,15 +13632,12 @@ "matched_text_diagnostics": "License: Expat" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "mit-1f9f2ae8-7020-0a13-7934-461c752929a4" }, { "license_expression": "mit", - "license_expression_spdx": null, + "license_expression_spdx": "MIT", "matches": [ { "license_expression": "mit", @@ -13521,10 +13656,7 @@ "matched_text_diagnostics": "License: Expat" } ], - "detection_log": [ - "possible-false-positive", - "not-license-clues-as-more-detections-present" - ], + "detection_log": [], "identifier": "mit-1f9f2ae8-7020-0a13-7934-461c752929a4" }, { @@ -13997,8 +14129,8 @@ "pkg:deb/debian/fusiondirectory-theme-oxygen?arch=all&uuid=fixed-uid-done-for-testing-5642512d1758", "pkg:deb/debian/fusiondirectory-webservice-shell?arch=all&uuid=fixed-uid-done-for-testing-5642512d1758" ], - "detected_license_expression": "gpl-2.0-plus AND bsd-simplified", - "detected_license_expression_spdx": "GPL-2.0-or-later AND BSD-2-Clause", + "detected_license_expression": "gpl-2.0-plus AND bsd-simplified AND lgpl-3.0 AND (mit AND other-permissive) AND (public-domain AND bsd-original AND gpl-1.0-plus)", + "detected_license_expression_spdx": "GPL-2.0-or-later AND BSD-2-Clause AND LGPL-3.0-only AND (MIT AND LicenseRef-scancode-other-permissive) AND (LicenseRef-scancode-public-domain AND BSD-4-Clause AND GPL-1.0-or-later)", "license_detections": [ { "license_expression": "gpl-2.0-plus", @@ -14264,6 +14396,30 @@ "detection_log": [], "identifier": "gpl_2_0_plus-227f50b1-f05e-5b3b-b107-ae1e2f56448b" }, + { + "license_expression": "lgpl-3.0", + "license_expression_spdx": "LGPL-3.0-only", + "matches": [ + { + "license_expression": "lgpl-3.0", + "spdx_license_expression": "LGPL-3.0-only", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 2925, + "end_line": 2925, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "lgpl-3.0_37.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_37.RULE", + "matched_text": "License: LGPL (v3 or later)", + "matched_text_diagnostics": "License: LGPL (v3" + } + ], + "detection_log": [], + "identifier": "lgpl_3_0-6b4a45da-85cc-8eb0-5613-be81d4efd6a5" + }, { "license_expression": "gpl-2.0-plus", "license_expression_spdx": "GPL-2.0-or-later", @@ -14551,106 +14707,105 @@ ], "detection_log": [], "identifier": "gpl_2_0_plus-227f50b1-f05e-5b3b-b107-ae1e2f56448b" - } - ], - "license_clues": [ - { - "license_expression": "lgpl-3.0", - "license_expression_spdx": "LGPL-3.0-only", - "from_file": "fusiondirectory/debian/copyright.in", - "start_line": 2925, - "end_line": 2925, - "matcher": "2-aho", - "score": 100.0, - "matched_length": 3, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "lgpl-3.0_37.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_37.RULE", - "matched_text": "License: LGPL (v3 or later)", - "matched_text_diagnostics": "License: LGPL (v3" - }, - { - "license_expression": "mit", - "license_expression_spdx": "MIT", - "from_file": "fusiondirectory/debian/copyright.in", - "start_line": 3010, - "end_line": 3010, - "matcher": "2-aho", - "score": 90.0, - "matched_length": 3, - "match_coverage": 100.0, - "rule_relevance": 90, - "rule_identifier": "mit_221.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_221.RULE", - "matched_text": "License: MIT/X11 (BSD like)", - "matched_text_diagnostics": "License: MIT/X11 (" - }, - { - "license_expression": "other-permissive", - "license_expression_spdx": "LicenseRef-scancode-other-permissive", - "from_file": "fusiondirectory/debian/copyright.in", - "start_line": 3010, - "end_line": 3010, - "matcher": "2-aho", - "score": 100.0, - "matched_length": 2, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "other-permissive_16.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/other-permissive_16.RULE", - "matched_text": "License: MIT/X11 (BSD like)", - "matched_text_diagnostics": "BSD like)" - }, - { - "license_expression": "public-domain", - "license_expression_spdx": "LicenseRef-scancode-public-domain", - "from_file": "fusiondirectory/debian/copyright.in", - "start_line": 3016, - "end_line": 3016, - "matcher": "2-aho", - "score": 99.0, - "matched_length": 3, - "match_coverage": 100.0, - "rule_relevance": 99, - "rule_identifier": "pypi_public_domain.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_public_domain.RULE", - "matched_text": "License: Public domain BSD (4 clause) GPL", - "matched_text_diagnostics": "License: Public domain" }, { - "license_expression": "bsd-original", - "license_expression_spdx": "BSD-4-Clause", - "from_file": "fusiondirectory/debian/copyright.in", - "start_line": 3016, - "end_line": 3016, - "matcher": "2-aho", - "score": 100.0, - "matched_length": 3, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "spdx_license_id_bsd-4-clause_for_bsd-original.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_bsd-4-clause_for_bsd-original.RULE", - "matched_text": "License: Public domain BSD (4 clause) GPL", - "matched_text_diagnostics": "BSD (4 clause)" + "license_expression": "mit AND other-permissive", + "license_expression_spdx": "MIT AND LicenseRef-scancode-other-permissive", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3010, + "end_line": 3010, + "matcher": "2-aho", + "score": 90.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 90, + "rule_identifier": "mit_221.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_221.RULE", + "matched_text": "License: MIT/X11 (BSD like)", + "matched_text_diagnostics": "License: MIT/X11 (" + }, + { + "license_expression": "other-permissive", + "spdx_license_expression": "LicenseRef-scancode-other-permissive", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3010, + "end_line": 3010, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "other-permissive_16.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/other-permissive_16.RULE", + "matched_text": "License: MIT/X11 (BSD like)", + "matched_text_diagnostics": "BSD like)" + } + ], + "detection_log": [], + "identifier": "mit_and_other_permissive-907b56d6-95b9-e85c-83c0-efd967c7e30a" }, { - "license_expression": "gpl-1.0-plus", - "license_expression_spdx": "GPL-1.0-or-later", - "from_file": "fusiondirectory/debian/copyright.in", - "start_line": 3016, - "end_line": 3016, - "matcher": "2-aho", - "score": 50.0, - "matched_length": 1, - "match_coverage": 100.0, - "rule_relevance": 50, - "rule_identifier": "gpl_bare_word_only.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_bare_word_only.RULE", - "matched_text": "License: Public domain BSD (4 clause) GPL", - "matched_text_diagnostics": "GPL" + "license_expression": "public-domain AND bsd-original AND gpl-1.0-plus", + "license_expression_spdx": "LicenseRef-scancode-public-domain AND BSD-4-Clause AND GPL-1.0-or-later", + "matches": [ + { + "license_expression": "public-domain", + "spdx_license_expression": "LicenseRef-scancode-public-domain", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3016, + "end_line": 3016, + "matcher": "2-aho", + "score": 99.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "pypi_public_domain.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_public_domain.RULE", + "matched_text": "License: Public domain BSD (4 clause) GPL", + "matched_text_diagnostics": "License: Public domain" + }, + { + "license_expression": "bsd-original", + "spdx_license_expression": "BSD-4-Clause", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3016, + "end_line": 3016, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx_license_id_bsd-4-clause_for_bsd-original.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/spdx_license_id_bsd-4-clause_for_bsd-original.RULE", + "matched_text": "License: Public domain BSD (4 clause) GPL", + "matched_text_diagnostics": "BSD (4 clause)" + }, + { + "license_expression": "gpl-1.0-plus", + "spdx_license_expression": "GPL-1.0-or-later", + "from_file": "fusiondirectory/debian/copyright.in", + "start_line": 3016, + "end_line": 3016, + "matcher": "2-aho", + "score": 50.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 50, + "rule_identifier": "gpl_bare_word_only.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl_bare_word_only.RULE", + "matched_text": "License: Public domain BSD (4 clause) GPL", + "matched_text_diagnostics": "GPL" + } + ], + "detection_log": [], + "identifier": "public_domain_and_bsd_original_and_gpl_1_0_plus-ccb73883-974d-42eb-d572-39fa7bf22f4c" } ], + "license_clues": [], "percentage_of_license_text": 0.66, "scan_errors": [] }, diff --git a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json index 5cf0231eea1..0a5b83a4dab 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json +++ b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp.expected.json @@ -400,6 +400,266 @@ "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_path": "setup.py", "datasource_id": "pypi_setup_py" + }, + { + "purl": "pkg:pypi/jieba", + "extracted_requirement": "jieba", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/jieba?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/colorlog", + "extracted_requirement": "colorlog", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/colorlog?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/colorama", + "extracted_requirement": "colorama", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/colorama?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/seqeval", + "extracted_requirement": "seqeval", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/seqeval?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/multiprocess", + "extracted_requirement": "multiprocess", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/multiprocess?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/datasets", + "extracted_requirement": "datasets>=2.0.0", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/datasets?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/tqdm", + "extracted_requirement": "tqdm", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/tqdm?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/paddlefsl", + "extracted_requirement": "paddlefsl", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/paddlefsl?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/sentencepiece", + "extracted_requirement": "sentencepiece", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/sentencepiece?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" + }, + { + "purl": "pkg:pypi/paddle2onnx", + "extracted_requirement": "paddle2onnx", + "scope": "install", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, + "dependency_uid": "pkg:pypi/paddle2onnx?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:pypi/paddlenlp?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "requirements.txt", + "datasource_id": "pip_requirements" } ], "license_detections": [ @@ -460,6 +720,65 @@ } ] }, + { + "identifier": "apache_2_0-8a372204-beb1-cb75-7598-6680ba430098", + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "detection_count": 2, + "detection_log": [ + "unknown-reference-to-local-file" + ], + "reference_matches": [ + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "paddlenlp/README_en.md", + "start_line": 6, + "end_line": 8, + "matcher": "3-seq", + "score": 80.0, + "matched_length": 8, + "match_coverage": 80.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_469.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_469.RULE", + "matched_text": "## License\n\nPaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", + "matched_text_diagnostics": "License\n\n[PaddleNLP] [is] [provided] under the [Apache-2.0 License](./LICENSE)." + }, + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "paddlenlp/README_en.md", + "start_line": 8, + "end_line": 8, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 9, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_83.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_83.RULE", + "matched_text": "PaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", + "matched_text_diagnostics": "is provided under the [Apache-2.0 License](./LICENSE)." + }, + { + "license_expression": "apache-2.0", + "license_expression_spdx": "Apache-2.0", + "from_file": "paddlenlp/LICENSE", + "start_line": 3, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" + } + ] + }, { "identifier": "apache_2_0-999670be-3d5e-ebf8-ae18-b555c26c5e80", "license_expression": "apache-2.0", @@ -486,45 +805,27 @@ ] }, { - "identifier": "apache_2_0-abb5bcc3-dac9-a935-3392-31a86beb482a", + "identifier": "apache_2_0-aef5c472-cdfd-dc5f-c152-40e3d96f140e", "license_expression": "apache-2.0", "license_expression_spdx": "Apache-2.0", "detection_count": 2, - "detection_log": [ - "unknown-reference-to-local-file" - ], + "detection_log": [], "reference_matches": [ - { - "license_expression": "apache-2.0", - "license_expression_spdx": "Apache-2.0", - "from_file": "paddlenlp/README_en.md", - "start_line": 221, - "end_line": 221, - "matcher": "2-aho", - "score": 100.0, - "matched_length": 9, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "apache-2.0_83.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_83.RULE", - "matched_text": "is provided under the [Apache-2.0 License](./LICENSE).", - "matched_text_diagnostics": "is provided under the [Apache-2.0 License](./LICENSE)." - }, { "license_expression": "apache-2.0", "license_expression_spdx": "Apache-2.0", "from_file": "paddlenlp/LICENSE", "start_line": 3, - "end_line": 203, - "matcher": "3-seq", - "score": 99.81, - "matched_length": 1582, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, "match_coverage": 100.0, "rule_relevance": 100, - "rule_identifier": "apache-2.0_164.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_164.RULE", - "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", - "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright ([c]) [2016] [PaddlePaddle] [Authors]. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" } ] }, @@ -553,31 +854,6 @@ } ] }, - { - "identifier": "apache_2_0-ec8d7936-cda2-7097-40cf-dbe8a06e916e", - "license_expression": "apache-2.0", - "license_expression_spdx": "Apache-2.0", - "detection_count": 2, - "detection_log": [], - "reference_matches": [ - { - "license_expression": "apache-2.0", - "license_expression_spdx": "Apache-2.0", - "from_file": "paddlenlp/LICENSE", - "start_line": 3, - "end_line": 203, - "matcher": "3-seq", - "score": 99.81, - "matched_length": 1582, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "apache-2.0_164.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_164.RULE", - "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", - "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright ([c]) [2016] [PaddlePaddle] [Authors]. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." - } - ] - }, { "identifier": "apache_2_0-d66ab77d-a5cc-7104-e702-dc7df61fe9e8", "license_expression": "apache-2.0", @@ -688,24 +964,24 @@ "license_expression_spdx": "Apache-2.0", "from_file": "paddlenlp/LICENSE", "start_line": 3, - "end_line": 203, - "matcher": "3-seq", - "score": 99.81, - "matched_length": 1582, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, "match_coverage": 100.0, "rule_relevance": 100, - "rule_identifier": "apache-2.0_164.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_164.RULE", - "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", - "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright ([c]) [2016] [PaddlePaddle] [Authors]. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" } ], "detection_log": [], - "identifier": "apache_2_0-ec8d7936-cda2-7097-40cf-dbe8a06e916e" + "identifier": "apache_2_0-aef5c472-cdfd-dc5f-c152-40e3d96f140e" } ], "license_clues": [], - "percentage_of_license_text": 99.25, + "percentage_of_license_text": 60.0, "scan_errors": [] }, { @@ -765,8 +1041,24 @@ "license_expression": "apache-2.0", "license_expression_spdx": "Apache-2.0", "from_file": "paddlenlp/README_en.md", - "start_line": 221, - "end_line": 221, + "start_line": 6, + "end_line": 8, + "matcher": "3-seq", + "score": 80.0, + "matched_length": 8, + "match_coverage": 80.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_469.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_469.RULE", + "matched_text": "## License\n\nPaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", + "matched_text_diagnostics": "License\n\n[PaddleNLP] [is] [provided] under the [Apache-2.0 License](./LICENSE)." + }, + { + "license_expression": "apache-2.0", + "spdx_license_expression": "Apache-2.0", + "from_file": "paddlenlp/README_en.md", + "start_line": 8, + "end_line": 8, "matcher": "2-aho", "score": 100.0, "matched_length": 9, @@ -774,7 +1066,7 @@ "rule_relevance": 100, "rule_identifier": "apache-2.0_83.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_83.RULE", - "matched_text": "is provided under the [Apache-2.0 License](./LICENSE).", + "matched_text": "PaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", "matched_text_diagnostics": "is provided under the [Apache-2.0 License](./LICENSE)." }, { @@ -782,26 +1074,26 @@ "license_expression_spdx": "Apache-2.0", "from_file": "paddlenlp/LICENSE", "start_line": 3, - "end_line": 203, - "matcher": "3-seq", - "score": 99.81, - "matched_length": 1582, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, "match_coverage": 100.0, "rule_relevance": 100, - "rule_identifier": "apache-2.0_164.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_164.RULE", - "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", - "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright ([c]) [2016] [PaddlePaddle] [Authors]. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" } ], "detection_log": [ "unknown-reference-to-local-file" ], - "identifier": "apache_2_0-abb5bcc3-dac9-a935-3392-31a86beb482a" + "identifier": "apache_2_0-8a372204-beb1-cb75-7598-6680ba430098" } ], "license_clues": [], - "percentage_of_license_text": 0.73, + "percentage_of_license_text": 25.64, "scan_errors": [] }, { @@ -1287,20 +1579,20 @@ "license_expression_spdx": "Apache-2.0", "from_file": "paddlenlp/LICENSE", "start_line": 3, - "end_line": 203, - "matcher": "3-seq", - "score": 99.81, - "matched_length": 1582, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, "match_coverage": 100.0, "rule_relevance": 100, - "rule_identifier": "apache-2.0_164.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_164.RULE", - "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", - "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright ([c]) [2016] [PaddlePaddle] [Authors]. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" } ], "detection_log": [], - "identifier": "apache_2_0-ec8d7936-cda2-7097-40cf-dbe8a06e916e" + "identifier": "apache_2_0-aef5c472-cdfd-dc5f-c152-40e3d96f140e" }, { "license_expression": "apache-2.0", @@ -1334,8 +1626,24 @@ "license_expression": "apache-2.0", "license_expression_spdx": "Apache-2.0", "from_file": "paddlenlp/README_en.md", - "start_line": 221, - "end_line": 221, + "start_line": 6, + "end_line": 8, + "matcher": "3-seq", + "score": 80.0, + "matched_length": 8, + "match_coverage": 80.0, + "rule_relevance": 100, + "rule_identifier": "apache-2.0_469.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_469.RULE", + "matched_text": "## License\n\nPaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", + "matched_text_diagnostics": "License\n\n[PaddleNLP] [is] [provided] under the [Apache-2.0 License](./LICENSE)." + }, + { + "license_expression": "apache-2.0", + "spdx_license_expression": "Apache-2.0", + "from_file": "paddlenlp/README_en.md", + "start_line": 8, + "end_line": 8, "matcher": "2-aho", "score": 100.0, "matched_length": 9, @@ -1343,7 +1651,7 @@ "rule_relevance": 100, "rule_identifier": "apache-2.0_83.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_83.RULE", - "matched_text": "is provided under the [Apache-2.0 License](./LICENSE).", + "matched_text": "PaddleNLP is provided under the [Apache-2.0 License](./LICENSE).", "matched_text_diagnostics": "is provided under the [Apache-2.0 License](./LICENSE)." }, { @@ -1351,22 +1659,22 @@ "license_expression_spdx": "Apache-2.0", "from_file": "paddlenlp/LICENSE", "start_line": 3, - "end_line": 203, - "matcher": "3-seq", - "score": 99.81, - "matched_length": 1582, + "end_line": 5, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 12, "match_coverage": 100.0, "rule_relevance": 100, - "rule_identifier": "apache-2.0_164.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_164.RULE", - "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", - "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/\n\n TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n 1. Definitions.\n\n \"License\" shall mean the terms and conditions for use, reproduction,\n and distribution as defined by Sections 1 through 9 of this document.\n\n \"Licensor\" shall mean the copyright owner or entity authorized by\n the copyright owner that is granting the License.\n\n \"Legal Entity\" shall mean the union of the acting entity and all\n other entities that control, are controlled by, or are under common\n control with that entity. For the purposes of this definition,\n \"control\" means (i) the power, direct or indirect, to cause the\n direction or management of such entity, whether by contract or\n otherwise, or (ii) ownership of fifty percent (50%) or more of the\n outstanding shares, or (iii) beneficial ownership of such entity.\n\n \"You\" (or \"Your\") shall mean an individual or Legal Entity\n exercising permissions granted by this License.\n\n \"Source\" form shall mean the preferred form for making modifications,\n including but not limited to software source code, documentation\n source, and configuration files.\n\n \"Object\" form shall mean any form resulting from mechanical\n transformation or translation of a Source form, including but\n not limited to compiled object code, generated documentation,\n and conversions to other media types.\n\n \"Work\" shall mean the work of authorship, whether in Source or\n Object form, made available under the License, as indicated by a\n copyright notice that is included in or attached to the work\n (an example is provided in the Appendix below).\n\n \"Derivative Works\" shall mean any work, whether in Source or Object\n form, that is based on (or derived from) the Work and for which the\n editorial revisions, annotations, elaborations, or other modifications\n represent, as a whole, an original work of authorship. For the purposes\n of this License, Derivative Works shall not include works that remain\n separable from, or merely link (or bind by name) to the interfaces of,\n the Work and Derivative Works thereof.\n\n \"Contribution\" shall mean any work of authorship, including\n the original version of the Work and any modifications or additions\n to that Work or Derivative Works thereof, that is intentionally\n submitted to Licensor for inclusion in the Work by the copyright owner\n or by an individual or Legal Entity authorized to submit on behalf of\n the copyright owner. For the purposes of this definition, \"submitted\"\n means any form of electronic, verbal, or written communication sent\n to the Licensor or its representatives, including but not limited to\n communication on electronic mailing lists, source code control systems,\n and issue tracking systems that are managed by, or on behalf of, the\n Licensor for the purpose of discussing and improving the Work, but\n excluding communication that is conspicuously marked or otherwise\n designated in writing by the copyright owner as \"Not a Contribution.\"\n\n \"Contributor\" shall mean Licensor and any individual or Legal Entity\n on behalf of whom a Contribution has been received by Licensor and\n subsequently incorporated within the Work.\n\n 2. Grant of Copyright License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n copyright license to reproduce, prepare Derivative Works of,\n publicly display, publicly perform, sublicense, and distribute the\n Work and such Derivative Works in Source or Object form.\n\n 3. Grant of Patent License. Subject to the terms and conditions of\n this License, each Contributor hereby grants to You a perpetual,\n worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n (except as stated in this section) patent license to make, have made,\n use, offer to sell, sell, import, and otherwise transfer the Work,\n where such license applies only to those patent claims licensable\n by such Contributor that are necessarily infringed by their\n Contribution(s) alone or by combination of their Contribution(s)\n with the Work to which such Contribution(s) was submitted. If You\n institute patent litigation against any entity (including a\n cross-claim or counterclaim in a lawsuit) alleging that the Work\n or a Contribution incorporated within the Work constitutes direct\n or contributory patent infringement, then any patent licenses\n granted to You under this License for that Work shall terminate\n as of the date such litigation is filed.\n\n 4. Redistribution. You may reproduce and distribute copies of the\n Work or Derivative Works thereof in any medium, with or without\n modifications, and in Source or Object form, provided that You\n meet the following conditions:\n\n (a) You must give any other recipients of the Work or\n Derivative Works a copy of this License; and\n\n (b) You must cause any modified files to carry prominent notices\n stating that You changed the files; and\n\n (c) You must retain, in the Source form of any Derivative Works\n that You distribute, all copyright, patent, trademark, and\n attribution notices from the Source form of the Work,\n excluding those notices that do not pertain to any part of\n the Derivative Works; and\n\n (d) If the Work includes a \"NOTICE\" text file as part of its\n distribution, then any Derivative Works that You distribute must\n include a readable copy of the attribution notices contained\n within such NOTICE file, excluding those notices that do not\n pertain to any part of the Derivative Works, in at least one\n of the following places: within a NOTICE text file distributed\n as part of the Derivative Works; within the Source form or\n documentation, if provided along with the Derivative Works; or,\n within a display generated by the Derivative Works, if and\n wherever such third-party notices normally appear. The contents\n of the NOTICE file are for informational purposes only and\n do not modify the License. You may add Your own attribution\n notices within Derivative Works that You distribute, alongside\n or as an addendum to the NOTICE text from the Work, provided\n that such additional attribution notices cannot be construed\n as modifying the License.\n\n You may add Your own copyright statement to Your modifications and\n may provide additional or different license terms and conditions\n for use, reproduction, or distribution of Your modifications, or\n for any such Derivative Works as a whole, provided Your use,\n reproduction, and distribution of the Work otherwise complies with\n the conditions stated in this License.\n\n 5. Submission of Contributions. Unless You explicitly state otherwise,\n any Contribution intentionally submitted for inclusion in the Work\n by You to the Licensor shall be under the terms and conditions of\n this License, without any additional terms or conditions.\n Notwithstanding the above, nothing herein shall supersede or modify\n the terms of any separate license agreement you may have executed\n with Licensor regarding such Contributions.\n\n 6. Trademarks. This License does not grant permission to use the trade\n names, trademarks, service marks, or product names of the Licensor,\n except as required for reasonable and customary use in describing the\n origin of the Work and reproducing the content of the NOTICE file.\n\n 7. Disclaimer of Warranty. Unless required by applicable law or\n agreed to in writing, Licensor provides the Work (and each\n Contributor provides its Contributions) on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n implied, including, without limitation, any warranties or conditions\n of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n PARTICULAR PURPOSE. You are solely responsible for determining the\n appropriateness of using or redistributing the Work and assume any\n risks associated with Your exercise of permissions under this License.\n\n 8. Limitation of Liability. In no event and under no legal theory,\n whether in tort (including negligence), contract, or otherwise,\n unless required by applicable law (such as deliberate and grossly\n negligent acts) or agreed to in writing, shall any Contributor be\n liable to You for damages, including any direct, indirect, special,\n incidental, or consequential damages of any character arising as a\n result of this License or out of the use or inability to use the\n Work (including but not limited to damages for loss of goodwill,\n work stoppage, computer failure or malfunction, or any and all\n other commercial damages or losses), even if such Contributor\n has been advised of the possibility of such damages.\n\n 9. Accepting Warranty or Additional Liability. While redistributing\n the Work or Derivative Works thereof, You may choose to offer,\n and charge a fee for, acceptance of support, warranty, indemnity,\n or other liability obligations and/or rights consistent with this\n License. However, in accepting such obligations, You may act only\n on Your own behalf and on Your sole responsibility, not on behalf\n of any other Contributor, and only if You agree to indemnify,\n defend, and hold each Contributor harmless for any liability\n incurred by, or claims asserted against, such Contributor by reason\n of your accepting any such warranty or additional liability.\n\n END OF TERMS AND CONDITIONS\n\n APPENDIX: How to apply the Apache License to your work.\n\n To apply the Apache License to your work, attach the following\n boilerplate notice, with the fields enclosed by brackets \"[]\"\n replaced with your own identifying information. (Don't include\n the brackets!) The text should be enclosed in the appropriate\n comment syntax for the file format. We also recommend that a\n file or class name and description of purpose be included on the\n same \"printed page\" as the copyright notice for easier\n identification within third-party archives.\n\n Copyright ([c]) [2016] [PaddlePaddle] [Authors]. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License." + "rule_identifier": "apache-2.0_791.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_791.RULE", + "matched_text": " Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/", + "matched_text_diagnostics": "Apache License\n Version 2.0, January 2004\n http://www.apache.org/licenses/" } ], "detection_log": [ "unknown-reference-to-local-file" ], - "identifier": "apache_2_0-abb5bcc3-dac9-a935-3392-31a86beb482a" + "identifier": "apache_2_0-8a372204-beb1-cb75-7598-6680ba430098" } ], "other_license_expression": null, diff --git a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/LICENSE b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/LICENSE index 744bf2ba7ca..98c3ff99cf7 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/LICENSE +++ b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/LICENSE @@ -3,201 +3,3 @@ Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/README_en.md b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/README_en.md index 0e65107b9d3..ec90f3b09c6 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/README_en.md +++ b/tests/packagedcode/data/license_detection/reference-to-package/paddlenlp/README_en.md @@ -1,221 +1,8 @@ - -English | [简体中文](./README.md) - -

    - -

    - ------------------------------------------------------------------------------------------- -[![PyPI - PaddleNLP Version](https://img.shields.io/pypi/v/paddlenlp.svg?label=pip&logo=PyPI&logoColor=white)](https://pypi.org/project/paddlenlp/) -[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/paddlenlp)](https://pypi.org/project/paddlenlp/) -[![PyPI Status](https://pepy.tech/badge/paddlenlp/month)](https://pepy.tech/project/paddlenlp) -![support os](https://img.shields.io/badge/os-linux%2C%20win%2C%20mac-yellow.svg) -![GitHub](https://img.shields.io/github/license/paddlepaddle/paddlenlp) - -## News - -* [2021-12-12] PaddleNLP v2.2 has been officially relealsed! :tada: For more information please refer to [Release Note](https://github.com/PaddlePaddle/PaddleNLP/releases/tag/v2.2.0). -* [2021-12-12] *End-to-end Question Answering Toolkit**🚀[RocketQA](https://github.com/PaddlePaddle/RocketQA) has been released!:tada: - ## Introduction **PaddleNLP** is an **easy-to-use** and **high performance** NLP library with **awesome** pre-trained Transformer models, supporting wide-range of NLP tasks from research to industrial applications. - -* **Easy-to-Use API** - - The API is fully integrated with PaddlePaddle 2.0 high-level API system. It minimizes the number of user actions required for common use cases like data loading, text pre-processing, awesome transfomer models, and fast inference, which enables developer to deal with text problems more productively. - -* **Wide-range NLP Task Support** - - PaddleNLP support NLP task from research to industrial applications, including Lexical Analysis, Text Classification, Text Matching, Text Generation, Information Extraction, Machine Translation, General Dialogue and Question Answering etc. - -* **High Performance Distributed Training** - - We provide an industrial level training pipeline for super large-scale Transformer model based on **Auto Mixed Precision** and Fleet distributed training API by PaddlePaddle, which can support customized model pre-training efficiently. - -## Community - -### Special Interest Group (SIG) - -Welcome to join [PaddleNLP SIG](https://iwenjuan.baidu.com/?code=bkypg8) for contribution, eg. Dataset, Models and Toolkit. - -### Slack - -To connect with other users and contributors, welcome to join our [Slack channel](https://paddlenlp.slack.com/). - -### WeChat - -Scan the QR code below with your Wechat⬇️. You can access to official technical exchange group. Look forward to your participation. - -
    - -
    - - -## Installation - -### Prerequisites - -* python >= 3.6 -* paddlepaddle >= 2.2 - -More information about PaddlePaddle installation please refer to [PaddlePaddle's Website](https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/conda/linux-conda.html). - -### Python pip Installation - -``` -pip install --upgrade paddlenlp -``` - -## Easy-to-use API - -### Taskflow:Off-the-shelf Industial NLP Pre-built Task - -Taskflow aims to provide **off-the-shelf** NLP pre-built task covering NLU and NLG scenario, in the meanwhile with extreamly fast infernece satisfying industrial applications. - -![taskflow1](https://user-images.githubusercontent.com/11793384/159693816-fda35221-9751-43bb-b05c-7fc77571dd76.gif) - -For more usage please refer to [Taskflow Docs](./docs/model_zoo/taskflow.md) - -### Transformer API: Awesome Pre-trained Model Ecosystem - -We provide **45+** network architectures and over **500+** pretrained models. Not only includes all the SOTA model like ERNIE, PLATO and SKEP released by Baidu, but also integrates most of the high quality Chinese pretrained model developed by other organizations. Use AutoModel to download pretrained mdoels of different architecture. We welcome all developers to contribute your Transformer models to PaddleNLP! 🤗 - -```python -from paddlenlp.transformers import * - -ernie = AutoModel.from_pretrained('ernie-1.0') -ernie_gram = AutoModel.from_pretrained('ernie-gram-zh') -bert = AutoModel.from_pretrained('bert-wwm-chinese') -albert = AutoModel.from_pretrained('albert-chinese-tiny') -roberta = AutoModel.from_pretrained('roberta-wwm-ext') -electra = AutoModel.from_pretrained('chinese-electra-small') -gpt = AutoModelForPretraining.from_pretrained('gpt-cpm-large-cn') -``` - -PaddleNLP also provides unified API experience for NLP task like semantic representation, text classification, sentence matching, sequence labeling, question answering, etc. - -```python -import paddle -from paddlenlp.transformers import * - -tokenizer = AutoTokenizer.from_pretrained('ernie-1.0') -text = tokenizer('natural language understanding') - -# Semantic Representation -model = AutoModel.from_pretrained('ernie-1.0') -sequence_output, pooled_output = model(input_ids=paddle.to_tensor([text['input_ids']])) -# Text Classificaiton and Matching -model = AutoModelForSequenceClassification.from_pretrained('ernie-1.0') -# Sequence Labeling -model = AutoModelForTokenClassification.from_pretrained('ernie-1.0') -# Question Answering -model = AutoModelForQuestionAnswering.from_pretrained('ernie-1.0') -``` - -For more pretrained model usage, please refer to [Transformer API](./docs/model_zoo/transformers.rst) - -### Dataset API: Abundant Dataset Integration and Quick Loading - -```python -from paddlenlp.datasets import load_dataset - -train_ds, dev_ds, test_ds = load_dataset("chnsenticorp", splits=["train", "dev", "test"]) -``` - -For more dataset API usage please refer to [Dataset API](./docs/datasets.md). - -### Embedding API: Quick Loading for Word Embedding - -```python -from paddlenlp.embeddings import TokenEmbedding - -wordemb = TokenEmbedding("fasttext.wiki-news.target.word-word.dim300.en") -wordemb.cosine_sim("king", "queen") ->>> 0.77053076 -wordemb.cosine_sim("apple", "rail") ->>> 0.29207364 -``` - -For more `TokenEmbedding` usage, please refer to [Embedding API](./docs/model_zoo/embeddings.md) - -### More API Usage - -- [Transformer API](./docs/model_zoo/transformers.rst) -- [Data API](./docs/data.md) -- [Dataset API](./docs/datasets.md) -- [Embedding API](./docs/model_zoo/embeddings.md) -- [Metrics API](./docs/metrics.md) - -Please find more API Reference from our [readthedocs](https://paddlenlp.readthedocs.io/). - -## Wide-range NLP Task Support - -PaddleNLP provides rich application examples covering mainstream NLP task to help developers accelerate problem solving. - -### NLP Basic Technique - -- [Word Embedding](./examples/word_embedding/) -- [Lexical Analysis](./examples/lexical_analysis/) -- [Dependency Parsing](./examples/dependency_parsing/) -- [Language Model](./examples/language_model/) -- [Semantic Parsing (Text to SQL)](./examples/text_to_sql):star: -- [Text Classification](./examples/text_classification/) -- [Text Matching](./examples/text_matching/) -- [Text Generation](./examples/text_generation/) -- [Text Correction](./examples/text_correction/):star: -- [Semantic Indexing](./examples/semantic_indexing/) -- [Information Extraction](./examples/information_extraction/) - -### NLP System - -- [Sentiment Analysis](./examples/sentiment_analysis/):star2: -- [General Dialogue System](./examples/dialogue/) -- [Machine Translation](./examples/machine_translation/) -- [Simultaneous Translation](././examples/simultaneous_translation/) -- [Machine Reading Comprehension](./examples/machine_reading_comprehension/) - -### NLP Extented Applications - -- [Few-shot Learning](./examples/few_shot/):star2: -- [Text Knowledge Mining](./examples/text_to_knowledge/):star2: -- [Model Compression](./examples/model_compression/) -- [Text Graph Learning](./examples/text_graph/erniesage/) -- [Time Series Prediction](./examples/time_series/) - -## Tutorials - -Please refer to our official AI Studio account for more interactive tutorials: [PaddleNLP on AI Studio](https://aistudio.baidu.com/aistudio/personalcenter/thirdview/574995) - -* [What's Seq2Vec?](https://aistudio.baidu.com/aistudio/projectdetail/1283423) shows how to use simple API to finish LSTM model and solve sentiment analysis task. - -* [Sentiment Analysis with ERNIE](https://aistudio.baidu.com/aistudio/projectdetail/1294333) shows how to exploit the pretrained ERNIE to solve sentiment analysis problem. - -* [Waybill Information Extraction with BiGRU-CRF Model](https://aistudio.baidu.com/aistudio/projectdetail/1317771) shows how to make use of Bi-GRU plus CRF to finish information extraction task. - -* [Waybill Information Extraction with ERNIE](https://aistudio.baidu.com/aistudio/projectdetail/1329361) shows how to use ERNIE, the Chinese pre-trained model improve information extraction performance. - -* [Use TCN Model to predict COVID-19 confirmed cases](https://aistudio.baidu.com/aistudio/projectdetail/1290873) - -## ChangeLog - -For more details about our release, please refer to [ChangeLog](./docs/changelog.md) - -## Citation - -If you find PaddleNLP useful in your research, please consider cite -``` -@misc{=paddlenlp, - title={PaddleNLP: An Easy-to-use and High Performance NLP Library}, - author={PaddleNLP Contributors}, - howpublished = {\url{https://github.com/PaddlePaddle/PaddleNLP}}, - year={2021} -} -``` - -## Acknowledge - -We have borrowed from Hugging Face's [Transformer](https://github.com/huggingface/transformers)🤗 excellent design on pretrained models usage, and we would like to express our gratitude to the authors of Hugging Face and its open source community. - ## License PaddleNLP is provided under the [Apache-2.0 License](./LICENSE). diff --git a/tests/packagedcode/data/license_detection/reference-to-package/samba.expected.json b/tests/packagedcode/data/license_detection/reference-to-package/samba.expected.json index 97f7aa0982f..845ada78981 100644 --- a/tests/packagedcode/data/license_detection/reference-to-package/samba.expected.json +++ b/tests/packagedcode/data/license_detection/reference-to-package/samba.expected.json @@ -267,9 +267,66 @@ ] }, { - "identifier": "gpl_3_0_and_gpl_1_0_plus_and_lgpl_3_0_plus_and_lgpl_3_0_and_cc_by_sa_3_0_and_cc_by_sa_4_0_and_dco_1_1_and_gpl_2_0-c27079b5-2c85-9902-b997-c5f0081e9516", - "license_expression": "gpl-3.0 AND gpl-1.0-plus AND lgpl-3.0-plus AND lgpl-3.0 AND cc-by-sa-3.0 AND cc-by-sa-4.0 AND dco-1.1 AND gpl-2.0", - "license_expression_spdx": "GPL-3.0-only AND GPL-1.0-or-later AND LGPL-3.0-or-later AND LGPL-3.0-only AND CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND LicenseRef-scancode-dco-1.1 AND GPL-2.0-only", + "identifier": "gpl_3_0_and_lgpl_3_0_and_gpl_2_0-ee9a67a8-9de9-86d0-077b-8e6f7f285b72", + "license_expression": "gpl-3.0 AND lgpl-3.0 AND gpl-2.0", + "license_expression_spdx": "GPL-3.0-only AND LGPL-3.0-only AND GPL-2.0-only", + "detection_count": 3, + "detection_log": [], + "reference_matches": [ + { + "license_expression": "gpl-3.0", + "license_expression_spdx": "GPL-3.0-only", + "from_file": "samba/README.contributing", + "start_line": 38, + "end_line": 38, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-3.0_32.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_32.RULE", + "matched_text": "accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)", + "matched_text_diagnostics": "GPLv3" + }, + { + "license_expression": "lgpl-3.0", + "license_expression_spdx": "LGPL-3.0-only", + "from_file": "samba/README.contributing", + "start_line": 38, + "end_line": 38, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "lgpl-3.0_29.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE", + "matched_text": "accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)", + "matched_text_diagnostics": "LGPLv3 (" + }, + { + "license_expression": "gpl-2.0", + "license_expression_spdx": "GPL-2.0-only", + "from_file": "samba/README.contributing", + "start_line": 39, + "end_line": 39, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-2.0_bare_single_word.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_bare_single_word.RULE", + "matched_text": "whereas the Linux kernel uses GPLv2.", + "matched_text_diagnostics": "GPLv2." + } + ] + }, + { + "identifier": "gpl_3_0_and_lgpl_3_0_and_gpl_2_0_and_gpl_1_0_plus_and_lgpl_3_0_plus_and_cc_by_sa_3_0_and_cc_by_sa_4_0_and_dco_1_1-91b1ed8a-fad5-77d3-29d0-7667c29ee122", + "license_expression": "gpl-3.0 AND lgpl-3.0 AND gpl-2.0 AND gpl-1.0-plus AND lgpl-3.0-plus AND cc-by-sa-3.0 AND cc-by-sa-4.0 AND dco-1.1", + "license_expression_spdx": "GPL-3.0-only AND LGPL-3.0-only AND GPL-2.0-only AND GPL-1.0-or-later AND LGPL-3.0-or-later AND CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND LicenseRef-scancode-dco-1.1", "detection_count": 1, "detection_log": [ "unknown-reference-to-local-file" @@ -307,6 +364,54 @@ "matched_text": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n\n How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n.", "matched_text_diagnostics": "GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n\n How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n." }, + { + "license_expression": "gpl-3.0", + "license_expression_spdx": "GPL-3.0-only", + "from_file": "samba/README.contributing", + "start_line": 38, + "end_line": 38, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-3.0_32.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_32.RULE", + "matched_text": "accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)", + "matched_text_diagnostics": "GPLv3" + }, + { + "license_expression": "lgpl-3.0", + "license_expression_spdx": "LGPL-3.0-only", + "from_file": "samba/README.contributing", + "start_line": 38, + "end_line": 38, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "lgpl-3.0_29.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE", + "matched_text": "accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)", + "matched_text_diagnostics": "LGPLv3 (" + }, + { + "license_expression": "gpl-2.0", + "license_expression_spdx": "GPL-2.0-only", + "from_file": "samba/README.contributing", + "start_line": 39, + "end_line": 39, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-2.0_bare_single_word.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_bare_single_word.RULE", + "matched_text": "whereas the Linux kernel uses GPLv2.", + "matched_text_diagnostics": "GPLv2." + }, { "license_expression": "gpl-1.0-plus", "license_expression_spdx": "GPL-1.0-or-later", @@ -606,9 +711,65 @@ "type": "file", "package_data": [], "for_packages": [], - "detected_license_expression": "gpl-1.0-plus AND (gpl-1.0-plus AND lgpl-3.0-plus AND gpl-3.0 AND lgpl-3.0) AND (cc-by-sa-3.0 AND cc-by-sa-4.0 AND dco-1.1)", - "detected_license_expression_spdx": "GPL-1.0-or-later AND (GPL-1.0-or-later AND LGPL-3.0-or-later AND GPL-3.0-only AND LGPL-3.0-only) AND (CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND LicenseRef-scancode-dco-1.1)", + "detected_license_expression": "(gpl-3.0 AND lgpl-3.0 AND gpl-2.0) AND gpl-1.0-plus AND (gpl-1.0-plus AND lgpl-3.0-plus AND gpl-3.0 AND lgpl-3.0) AND (cc-by-sa-3.0 AND cc-by-sa-4.0 AND dco-1.1)", + "detected_license_expression_spdx": "(GPL-3.0-only AND LGPL-3.0-only AND GPL-2.0-only) AND GPL-1.0-or-later AND (GPL-1.0-or-later AND LGPL-3.0-or-later AND GPL-3.0-only AND LGPL-3.0-only) AND (CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND LicenseRef-scancode-dco-1.1)", "license_detections": [ + { + "license_expression": "gpl-3.0 AND lgpl-3.0 AND gpl-2.0", + "license_expression_spdx": "GPL-3.0-only AND LGPL-3.0-only AND GPL-2.0-only", + "matches": [ + { + "license_expression": "gpl-3.0", + "spdx_license_expression": "GPL-3.0-only", + "from_file": "samba/README.contributing", + "start_line": 38, + "end_line": 38, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-3.0_32.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_32.RULE", + "matched_text": "accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)", + "matched_text_diagnostics": "GPLv3" + }, + { + "license_expression": "lgpl-3.0", + "spdx_license_expression": "LGPL-3.0-only", + "from_file": "samba/README.contributing", + "start_line": 38, + "end_line": 38, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "lgpl-3.0_29.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE", + "matched_text": "accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)", + "matched_text_diagnostics": "LGPLv3 (" + }, + { + "license_expression": "gpl-2.0", + "spdx_license_expression": "GPL-2.0-only", + "from_file": "samba/README.contributing", + "start_line": 39, + "end_line": 39, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-2.0_bare_single_word.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_bare_single_word.RULE", + "matched_text": "whereas the Linux kernel uses GPLv2.", + "matched_text_diagnostics": "GPLv2." + } + ], + "detection_log": [], + "identifier": "gpl_3_0_and_lgpl_3_0_and_gpl_2_0-ee9a67a8-9de9-86d0-077b-8e6f7f285b72" + }, { "license_expression": "gpl-1.0-plus", "license_expression_spdx": "GPL-1.0-or-later", @@ -779,54 +940,6 @@ } ], "license_clues": [ - { - "license_expression": "gpl-3.0", - "license_expression_spdx": "GPL-3.0-only", - "from_file": "samba/README.contributing", - "start_line": 38, - "end_line": 38, - "matcher": "2-aho", - "score": 100.0, - "matched_length": 1, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "gpl-3.0_32.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_32.RULE", - "matched_text": "accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)", - "matched_text_diagnostics": "GPLv3" - }, - { - "license_expression": "lgpl-3.0", - "license_expression_spdx": "LGPL-3.0-only", - "from_file": "samba/README.contributing", - "start_line": 38, - "end_line": 38, - "matcher": "2-aho", - "score": 100.0, - "matched_length": 1, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "lgpl-3.0_29.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE", - "matched_text": "accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)", - "matched_text_diagnostics": "LGPLv3 (" - }, - { - "license_expression": "gpl-2.0", - "license_expression_spdx": "GPL-2.0-only", - "from_file": "samba/README.contributing", - "start_line": 39, - "end_line": 39, - "matcher": "2-aho", - "score": 100.0, - "matched_length": 1, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "gpl-2.0_bare_single_word.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_bare_single_word.RULE", - "matched_text": "whereas the Linux kernel uses GPLv2.", - "matched_text_diagnostics": "GPLv2." - }, { "license_expression": "gpl-2.0-plus", "license_expression_spdx": "GPL-2.0-or-later", @@ -970,8 +1083,8 @@ "vcs_url": null, "copyright": null, "holder": null, - "declared_license_expression": "gpl-3.0 AND gpl-1.0-plus AND (gpl-1.0-plus AND lgpl-3.0-plus AND gpl-3.0 AND lgpl-3.0) AND (cc-by-sa-3.0 AND cc-by-sa-4.0 AND dco-1.1) AND gpl-2.0", - "declared_license_expression_spdx": "GPL-3.0-only AND GPL-1.0-or-later AND (GPL-1.0-or-later AND LGPL-3.0-or-later AND GPL-3.0-only AND LGPL-3.0-only) AND (CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND LicenseRef-scancode-dco-1.1) AND GPL-2.0-only", + "declared_license_expression": "gpl-3.0 AND (gpl-3.0 AND lgpl-3.0 AND gpl-2.0) AND gpl-1.0-plus AND (gpl-1.0-plus AND lgpl-3.0-plus AND gpl-3.0 AND lgpl-3.0) AND (cc-by-sa-3.0 AND cc-by-sa-4.0 AND dco-1.1) AND gpl-2.0", + "declared_license_expression_spdx": "GPL-3.0-only AND (GPL-3.0-only AND LGPL-3.0-only AND GPL-2.0-only) AND GPL-1.0-or-later AND (GPL-1.0-or-later AND LGPL-3.0-or-later AND GPL-3.0-only AND LGPL-3.0-only) AND (CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND LicenseRef-scancode-dco-1.1) AND GPL-2.0-only", "license_detections": [ { "license_expression": "gpl-3.0", @@ -997,6 +1110,62 @@ "detection_log": [], "identifier": "gpl_3_0-ab79e5a8-e510-cbf4-5302-ef968484bcdf" }, + { + "license_expression": "gpl-3.0 AND lgpl-3.0 AND gpl-2.0", + "license_expression_spdx": "GPL-3.0-only AND LGPL-3.0-only AND GPL-2.0-only", + "matches": [ + { + "license_expression": "gpl-3.0", + "spdx_license_expression": "GPL-3.0-only", + "from_file": "samba/README.contributing", + "start_line": 38, + "end_line": 38, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-3.0_32.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_32.RULE", + "matched_text": "accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)", + "matched_text_diagnostics": "GPLv3" + }, + { + "license_expression": "lgpl-3.0", + "spdx_license_expression": "LGPL-3.0-only", + "from_file": "samba/README.contributing", + "start_line": 38, + "end_line": 38, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "lgpl-3.0_29.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE", + "matched_text": "accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)", + "matched_text_diagnostics": "LGPLv3 (" + }, + { + "license_expression": "gpl-2.0", + "spdx_license_expression": "GPL-2.0-only", + "from_file": "samba/README.contributing", + "start_line": 39, + "end_line": 39, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-2.0_bare_single_word.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_bare_single_word.RULE", + "matched_text": "whereas the Linux kernel uses GPLv2.", + "matched_text_diagnostics": "GPLv2." + } + ], + "detection_log": [], + "identifier": "gpl_3_0_and_lgpl_3_0_and_gpl_2_0-ee9a67a8-9de9-86d0-077b-8e6f7f285b72" + }, { "license_expression": "gpl-1.0-plus", "license_expression_spdx": "GPL-1.0-or-later", @@ -1298,8 +1467,8 @@ "vcs_url": null, "copyright": null, "holder": null, - "declared_license_expression": "gpl-3.0 AND gpl-1.0-plus AND (gpl-1.0-plus AND lgpl-3.0-plus AND gpl-3.0 AND lgpl-3.0) AND (cc-by-sa-3.0 AND cc-by-sa-4.0 AND dco-1.1) AND gpl-2.0", - "declared_license_expression_spdx": "GPL-3.0-only AND GPL-1.0-or-later AND (GPL-1.0-or-later AND LGPL-3.0-or-later AND GPL-3.0-only AND LGPL-3.0-only) AND (CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND LicenseRef-scancode-dco-1.1) AND GPL-2.0-only", + "declared_license_expression": "gpl-3.0 AND (gpl-3.0 AND lgpl-3.0 AND gpl-2.0) AND gpl-1.0-plus AND (gpl-1.0-plus AND lgpl-3.0-plus AND gpl-3.0 AND lgpl-3.0) AND (cc-by-sa-3.0 AND cc-by-sa-4.0 AND dco-1.1) AND gpl-2.0", + "declared_license_expression_spdx": "GPL-3.0-only AND (GPL-3.0-only AND LGPL-3.0-only AND GPL-2.0-only) AND GPL-1.0-or-later AND (GPL-1.0-or-later AND LGPL-3.0-or-later AND GPL-3.0-only AND LGPL-3.0-only) AND (CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND LicenseRef-scancode-dco-1.1) AND GPL-2.0-only", "license_detections": [ { "license_expression": "gpl-3.0", @@ -1325,6 +1494,62 @@ "detection_log": [], "identifier": "gpl_3_0-ab79e5a8-e510-cbf4-5302-ef968484bcdf" }, + { + "license_expression": "gpl-3.0 AND lgpl-3.0 AND gpl-2.0", + "license_expression_spdx": "GPL-3.0-only AND LGPL-3.0-only AND GPL-2.0-only", + "matches": [ + { + "license_expression": "gpl-3.0", + "spdx_license_expression": "GPL-3.0-only", + "from_file": "samba/README.contributing", + "start_line": 38, + "end_line": 38, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-3.0_32.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_32.RULE", + "matched_text": "accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)", + "matched_text_diagnostics": "GPLv3" + }, + { + "license_expression": "lgpl-3.0", + "spdx_license_expression": "LGPL-3.0-only", + "from_file": "samba/README.contributing", + "start_line": 38, + "end_line": 38, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "lgpl-3.0_29.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE", + "matched_text": "accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)", + "matched_text_diagnostics": "LGPLv3 (" + }, + { + "license_expression": "gpl-2.0", + "spdx_license_expression": "GPL-2.0-only", + "from_file": "samba/README.contributing", + "start_line": 39, + "end_line": 39, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-2.0_bare_single_word.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_bare_single_word.RULE", + "matched_text": "whereas the Linux kernel uses GPLv2.", + "matched_text_diagnostics": "GPLv2." + } + ], + "detection_log": [], + "identifier": "gpl_3_0_and_lgpl_3_0_and_gpl_2_0-ee9a67a8-9de9-86d0-077b-8e6f7f285b72" + }, { "license_expression": "gpl-1.0-plus", "license_expression_spdx": "GPL-1.0-or-later", @@ -1627,12 +1852,12 @@ "type": "file", "package_data": [], "for_packages": [], - "detected_license_expression": "gpl-3.0 AND gpl-1.0-plus AND lgpl-3.0-plus AND lgpl-3.0 AND cc-by-sa-3.0 AND cc-by-sa-4.0 AND dco-1.1 AND gpl-2.0", - "detected_license_expression_spdx": "GPL-3.0-only AND GPL-1.0-or-later AND LGPL-3.0-or-later AND LGPL-3.0-only AND CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND LicenseRef-scancode-dco-1.1 AND GPL-2.0-only", + "detected_license_expression": "gpl-3.0 AND lgpl-3.0 AND gpl-2.0 AND gpl-1.0-plus AND lgpl-3.0-plus AND cc-by-sa-3.0 AND cc-by-sa-4.0 AND dco-1.1", + "detected_license_expression_spdx": "GPL-3.0-only AND LGPL-3.0-only AND GPL-2.0-only AND GPL-1.0-or-later AND LGPL-3.0-or-later AND CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND LicenseRef-scancode-dco-1.1", "license_detections": [ { - "license_expression": "gpl-3.0 AND gpl-1.0-plus AND lgpl-3.0-plus AND lgpl-3.0 AND cc-by-sa-3.0 AND cc-by-sa-4.0 AND dco-1.1 AND gpl-2.0", - "license_expression_spdx": "GPL-3.0-only AND GPL-1.0-or-later AND LGPL-3.0-or-later AND LGPL-3.0-only AND CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND LicenseRef-scancode-dco-1.1 AND GPL-2.0-only", + "license_expression": "gpl-3.0 AND lgpl-3.0 AND gpl-2.0 AND gpl-1.0-plus AND lgpl-3.0-plus AND cc-by-sa-3.0 AND cc-by-sa-4.0 AND dco-1.1", + "license_expression_spdx": "GPL-3.0-only AND LGPL-3.0-only AND GPL-2.0-only AND GPL-1.0-or-later AND LGPL-3.0-or-later AND CC-BY-SA-3.0 AND CC-BY-SA-4.0 AND LicenseRef-scancode-dco-1.1", "matches": [ { "license_expression": "free-unknown", @@ -1666,6 +1891,54 @@ "matched_text": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n\n How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n.", "matched_text_diagnostics": "GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n\n How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n." }, + { + "license_expression": "gpl-3.0", + "spdx_license_expression": "GPL-3.0-only", + "from_file": "samba/README.contributing", + "start_line": 38, + "end_line": 38, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-3.0_32.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-3.0_32.RULE", + "matched_text": "accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)", + "matched_text_diagnostics": "GPLv3" + }, + { + "license_expression": "lgpl-3.0", + "spdx_license_expression": "LGPL-3.0-only", + "from_file": "samba/README.contributing", + "start_line": 38, + "end_line": 38, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "lgpl-3.0_29.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-3.0_29.RULE", + "matched_text": "accommodate the licenses we use, which are GPLv3 and LGPLv3 (or later)", + "matched_text_diagnostics": "LGPLv3 (" + }, + { + "license_expression": "gpl-2.0", + "spdx_license_expression": "GPL-2.0-only", + "from_file": "samba/README.contributing", + "start_line": 39, + "end_line": 39, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "gpl-2.0_bare_single_word.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/gpl-2.0_bare_single_word.RULE", + "matched_text": "whereas the Linux kernel uses GPLv2.", + "matched_text_diagnostics": "GPLv2." + }, { "license_expression": "gpl-1.0-plus", "license_expression_spdx": "GPL-1.0-or-later", @@ -1862,7 +2135,7 @@ "detection_log": [ "unknown-reference-to-local-file" ], - "identifier": "gpl_3_0_and_gpl_1_0_plus_and_lgpl_3_0_plus_and_lgpl_3_0_and_cc_by_sa_3_0_and_cc_by_sa_4_0_and_dco_1_1_and_gpl_2_0-c27079b5-2c85-9902-b997-c5f0081e9516" + "identifier": "gpl_3_0_and_lgpl_3_0_and_gpl_2_0_and_gpl_1_0_plus_and_lgpl_3_0_plus_and_cc_by_sa_3_0_and_cc_by_sa_4_0_and_dco_1_1-91b1ed8a-fad5-77d3-29d0-7667c29ee122" } ], "license_clues": [], diff --git a/tests/packagedcode/data/m2/javassist/javassist/3.4.GA/javassist-3.4.GA.pom.package.json b/tests/packagedcode/data/m2/javassist/javassist/3.4.GA/javassist-3.4.GA.pom.package.json index af11b9b8130..579f7695218 100644 --- a/tests/packagedcode/data/m2/javassist/javassist/3.4.GA/javassist-3.4.GA.pom.package.json +++ b/tests/packagedcode/data/m2/javassist/javassist/3.4.GA/javassist-3.4.GA.pom.package.json @@ -36,10 +36,10 @@ "start_line": 1, "end_line": 1, "matcher": "2-aho", - "score": 75.0, + "score": 60.0, "matched_length": 1, "match_coverage": 100.0, - "rule_relevance": 75, + "rule_relevance": 60, "rule_identifier": "lgpl_bare_single_word.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl_bare_single_word.RULE", "matched_text": "- name: lgpl" @@ -51,16 +51,16 @@ "start_line": 2, "end_line": 2, "matcher": "2-aho", - "score": 75.0, + "score": 60.0, "matched_length": 1, "match_coverage": 100.0, - "rule_relevance": 75, + "rule_relevance": 60, "rule_identifier": "lgpl_bare_single_word.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl_bare_single_word.RULE", "matched_text": " url: http://repository.jboss.com/licenses/lgpl.txt" } ], - "identifier": "lgpl_2_0_plus-10aa305b-de20-e6cc-d2a0-3f4e76b8a2f9" + "identifier": "lgpl_2_0_plus-352c9c42-1459-8dfe-3910-c459079c06b9" } ], "other_license_expression": null, diff --git a/tests/packagedcode/data/maven2/jrecordbind-2.3.4/jrecordbind-2.3.4.pom.package.json b/tests/packagedcode/data/maven2/jrecordbind-2.3.4/jrecordbind-2.3.4.pom.package.json index 959b0856eb5..b457d10214e 100644 --- a/tests/packagedcode/data/maven2/jrecordbind-2.3.4/jrecordbind-2.3.4.pom.package.json +++ b/tests/packagedcode/data/maven2/jrecordbind-2.3.4/jrecordbind-2.3.4.pom.package.json @@ -44,10 +44,10 @@ "start_line": 1, "end_line": 1, "matcher": "2-aho", - "score": 75.0, + "score": 60.0, "matched_length": 1, "match_coverage": 100.0, - "rule_relevance": 75, + "rule_relevance": 60, "rule_identifier": "lgpl_bare_single_word.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl_bare_single_word.RULE", "matched_text": "- name: LGPL" @@ -68,7 +68,7 @@ "matched_text": " url: http://www.gnu.org/copyleft/lesser.html" } ], - "identifier": "lgpl_2_0_plus_and_lgpl_2_1_plus-b52b959e-48c6-d927-c4d0-cf7842fb12fa" + "identifier": "lgpl_2_0_plus_and_lgpl_2_1_plus-99bbf99a-48ea-24c4-e2df-f242abe6446f" } ], "other_license_expression": null, diff --git a/tests/packagedcode/data/npm/alias/package-lock.json b/tests/packagedcode/data/npm/alias/package-lock.json new file mode 100644 index 00000000000..024ce5c3433 --- /dev/null +++ b/tests/packagedcode/data/npm/alias/package-lock.json @@ -0,0 +1,57 @@ +{ + "name": "poshi-language-support", + "version": "0.3.7", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "poshi-language-support", + "version": "0.3.7", + "dependencies": { + "@vscode/ripgrep": "^1.14.2", + "lodash": "^4.17.21" + }, + "devDependencies": { + "@ava/typescript": "^4.1.0", + "@types/glob": "^7.2.0", + "@types/lodash": "^4.14.178", + "@types/mocha": "^9.1.0", + "@types/node": "14.x", + "@types/vscode": "^1.64.0", + "@typescript-eslint/eslint-plugin": "^5.12.1", + "@typescript-eslint/parser": "^5.12.1", + "@vscode/test-electron": "^2.1.2", + "@vscode/vsce": "^2.22.0", + "ava": "^5.3.1", + "esbuild": "^0.18.15", + "eslint": "^8.9.0", + "glob": "^7.2.0", + "mocha": "^9.2.1", + "prettier": "^3.0.0", + "rimraf": "^5.0.1", + "typescript": "^4.5.5" + }, + "engines": { + "node": ">=16", + "vscode": "^1.64.0" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + } + } +} diff --git a/tests/packagedcode/data/npm/alias/package-lock.json.expected b/tests/packagedcode/data/npm/alias/package-lock.json.expected new file mode 100644 index 00000000000..2bfba64986b --- /dev/null +++ b/tests/packagedcode/data/npm/alias/package-lock.json.expected @@ -0,0 +1,149 @@ +[ + { + "type": "npm", + "namespace": "", + "name": "poshi-language-support", + "version": "0.3.7", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": { + "lockfile_version": 2 + }, + "dependencies": [ + { + "purl": "pkg:npm/%40isaacs/cliui@8.0.2", + "extracted_requirement": "8.0.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "npm", + "namespace": "@isaacs", + "name": "cliui", + "version": "8.0.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": "3bc8dc8da6d76a578e1bd0d0d3e0115d66414df9cfe16340ab3ba224aee5978e009b118abff2763384cf8f18d8df39c109fbc15c5cee726d6dc1dc85c9b16a10", + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [ + [ + { + "path": "node_modules/@isaacs/cliui", + "size": 0, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "extra_data": {} + } + ] + ], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/string-width", + "extracted_requirement": "^4.2.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/strip-ansi", + "extracted_requirement": "^6.0.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/wrap-ansi", + "extracted_requirement": "^7.0.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": "https://www.npmjs.com/package/@isaacs/cliui", + "repository_download_url": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "api_data_url": "https://registry.npmjs.org/@isaacs%2fcliui/8.0.2", + "datasource_id": "npm_package_lock_json", + "purl": "pkg:npm/%40isaacs/cliui@8.0.2" + }, + "extra_data": {} + } + ], + "repository_homepage_url": "https://www.npmjs.com/package/poshi-language-support", + "repository_download_url": "https://registry.npmjs.org/poshi-language-support/-/poshi-language-support-0.3.7.tgz", + "api_data_url": "https://registry.npmjs.org/poshi-language-support/0.3.7", + "datasource_id": "npm_package_lock_json", + "purl": "pkg:npm/poshi-language-support@0.3.7" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/npm/alias/package.json b/tests/packagedcode/data/npm/alias/package.json new file mode 100755 index 00000000000..fb910a8600b --- /dev/null +++ b/tests/packagedcode/data/npm/alias/package.json @@ -0,0 +1,68 @@ +{ + "name": "@tapjs/tapjs", + "private": true, + "workspaces": [ + "src/*" + ], + "type": "module", + "prettier": { + "experimentalTernaries": true, + "semi": false, + "printWidth": 70, + "tabWidth": 2, + "useTabs": false, + "singleQuote": true, + "jsxSingleQuote": false, + "bracketSameLine": true, + "arrowParens": "avoid", + "endOfLine": "lf" + }, + "devDependencies": { + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1" + }, + "scripts": { + "start": "npm run start -w src/docs", + "predocsbuild": "npm run bootstrap", + "docsbuild": "npm run build -w src/docs", + "pretest": "rimraf src/test/test-built/dist/node_modules", + "presnap": "rimraf src/test/test-built/dist/node_modules", + "test": "nx run-many -t test", + "test:bootstrap": "bash ./scripts/test-bootstrap.sh", + "snap": "TAP_TYPECHECK=0 TAP_TIMEOUT=240 nx run-many -t snap", + "format": "nx run-many -t format", + "typedoc": "typedoc", + "bootstrap": "bash ./scripts/bootstrap.sh", + "build": "node ./scripts/default-build.mjs", + "pindeps": "node ./scripts/version.mjs pindeps", + "v": "node ./scripts/version.mjs", + "p": "bash ./scripts/bump-changed.sh", + "pub": "npm run v -- pub", + "deploy:docs": "npm run deploy:prod -w src/docs", + "postv": "npm run deploy:docs", + "pj": "node scripts/normalize-package-json.js src/*/package.json" + }, + "repository": "https://github.com/tapjs/tapjs", + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + }, + "overrides": { + "braces@3": "^3.0.3", + "axios@1.0.0 - 1.5.1": "^1.7.2", + "netlify-cli": { + "braces": "^3.0.3", + "micromatch": "^4.0.7", + "chokidar": { + "braces": "^3.0.3" + }, + "http-proxy-middleware": { + "micromatch": { + ".": "^4.0.7", + "braces": "^3.0.3" + } + } + }, + "micromatch@4.0.5": "^4.0.7", + "tar@6.1.11": "6.2" + } +} diff --git a/tests/packagedcode/data/npm/alias/package.json.expected b/tests/packagedcode/data/npm/alias/package.json.expected new file mode 100755 index 00000000000..89bb0db8d8b --- /dev/null +++ b/tests/packagedcode/data/npm/alias/package.json.expected @@ -0,0 +1,88 @@ +[ + { + "type": "npm", + "namespace": "@tapjs", + "name": "tapjs", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": "https://github.com/tapjs/tapjs", + "copyright": null, + "holder": null, + "declared_license_expression": "blueoak-1.0.0", + "declared_license_expression_spdx": "BlueOak-1.0.0", + "license_detections": [ + { + "license_expression": "blueoak-1.0.0", + "license_expression_spdx": "BlueOak-1.0.0", + "matches": [ + { + "license_expression": "blueoak-1.0.0", + "spdx_license_expression": "BlueOak-1.0.0", + "from_file": null, + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 4, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-blueoak_1_0_0-a27d3d91aab5047de087c05901869c5f4a1f12e7", + "rule_url": null, + "matched_text": "BlueOak-1.0.0" + } + ], + "identifier": "blueoak_1_0_0-3c25fef0-5634-6497-b6c8-0c16ab8320b3" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "- BlueOak-1.0.0\n", + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": true, + "is_virtual": false, + "extra_data": { + "workspaces": [ + "src/*" + ], + "engines": { + "node": "20 || >=22" + } + }, + "dependencies": [ + { + "purl": "pkg:npm/strip-ansi", + "extracted_requirement": "^6.0.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "npm_package_json", + "purl": "pkg:npm/%40tapjs/tapjs" + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe-pnpm-lock.yaml-expected b/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe-pnpm-lock.yaml-expected index 4e039f6cb80..fbb9c8a8d1b 100644 --- a/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe-pnpm-lock.yaml-expected +++ b/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe-pnpm-lock.yaml-expected @@ -788,7 +788,7 @@ } }, { - "purl": "pkg:npm/%40napi-rs/nextra@2.0.0-alpha.56", + "purl": "pkg:npm/nextra@2.0.0-alpha.56", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -797,7 +797,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", + "namespace": null, "name": "nextra", "version": "2.0.0-alpha.56", "qualifiers": {}, @@ -970,12 +970,12 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/nextra@2.0.0-alpha.56" + "purl": "pkg:npm/nextra@2.0.0-alpha.56" }, "extra_data": {} }, { - "purl": "pkg:npm/%40napi-rs/react-is@16.13.1", + "purl": "pkg:npm/react-is@16.13.1", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -984,7 +984,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", + "namespace": null, "name": "react-is", "version": "16.13.1", "qualifiers": {}, @@ -1024,12 +1024,12 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/react-is@16.13.1" + "purl": "pkg:npm/react-is@16.13.1" }, "extra_data": {} }, { - "purl": "pkg:npm/%40napi-rs/react-spring@9.5.5", + "purl": "pkg:npm/react-spring@9.5.5", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -1038,7 +1038,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", + "namespace": null, "name": "react-spring", "version": "9.5.5", "qualifiers": {}, @@ -1244,12 +1244,12 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/react-spring@9.5.5" + "purl": "pkg:npm/react-spring@9.5.5" }, "extra_data": {} }, { - "purl": "pkg:npm/%40napi-rs/remark-gfm@3.0.1", + "purl": "pkg:npm/remark-gfm@3.0.1", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -1258,7 +1258,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", + "namespace": null, "name": "remark-gfm", "version": "3.0.1", "qualifiers": {}, @@ -1354,12 +1354,12 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/remark-gfm@3.0.1" + "purl": "pkg:npm/remark-gfm@3.0.1" }, "extra_data": {} }, { - "purl": "pkg:npm/%40napi-rs/styled-jsx@5.0.2", + "purl": "pkg:npm/styled-jsx@5.0.2", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -1368,7 +1368,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", + "namespace": null, "name": "styled-jsx", "version": "5.0.2", "qualifiers": {}, @@ -1442,7 +1442,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/styled-jsx@5.0.2" + "purl": "pkg:npm/styled-jsx@5.0.2" }, "extra_data": { "engines": { @@ -1451,7 +1451,7 @@ } }, { - "purl": "pkg:npm/%40napi-rs/zustand@3.7.2", + "purl": "pkg:npm/zustand@3.7.2", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -1460,7 +1460,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", + "namespace": null, "name": "zustand", "version": "3.7.2", "qualifiers": {}, @@ -1512,7 +1512,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/zustand@3.7.2" + "purl": "pkg:npm/zustand@3.7.2" }, "extra_data": { "engines": { @@ -1521,7 +1521,7 @@ } }, { - "purl": "pkg:npm/%40napi-rs/zwitch@2.0.2", + "purl": "pkg:npm/zwitch@2.0.2", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -1530,7 +1530,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", + "namespace": null, "name": "zwitch", "version": "2.0.2", "qualifiers": {}, @@ -1570,7 +1570,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/zwitch@2.0.2" + "purl": "pkg:npm/zwitch@2.0.2" }, "extra_data": {} } diff --git a/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe-scan.expected.json b/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe-scan.expected.json index 0f7abfd6fac..60601988637 100644 --- a/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe-scan.expected.json +++ b/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe-scan.expected.json @@ -58,6 +58,85 @@ ], "purl": "pkg:npm/cobe@0.6.3" }, + { + "type": "npm", + "namespace": null, + "name": "cobe-site", + "version": "1.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Shu Ding", + "email": "g@shud.in", + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": "https://registry.npmjs.org/cobe-site/-/cobe-site-1.0.0.tgz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "cobe/website/package.json", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "- MIT\n", + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://www.npmjs.com/package/cobe-site", + "repository_download_url": "https://registry.npmjs.org/cobe-site/-/cobe-site-1.0.0.tgz", + "api_data_url": "https://registry.npmjs.org/cobe-site/1.0.0", + "package_uid": "pkg:npm/cobe-site@1.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "cobe/website/package.json" + ], + "datasource_ids": [ + "npm_package_json" + ], + "purl": "pkg:npm/cobe-site@1.0.0" + }, { "type": "npm", "namespace": null, @@ -132,8 +211,8 @@ ], "dependencies": [ { - "purl": "pkg:npm/phenomenon", - "extracted_requirement": "^1.6.0", + "purl": "pkg:npm/cobe", + "extracted_requirement": "workspace:*", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -141,133 +220,118 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/phenomenon?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "cobe/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/esbuild", - "extracted_requirement": "^0.13.14", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/esbuild?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "cobe/package.json", + "dependency_uid": "pkg:npm/cobe?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe-site@1.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/glslx", - "extracted_requirement": "^0.2.13", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/leva", + "extracted_requirement": "^0.9.34", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/glslx?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "cobe/package.json", + "dependency_uid": "pkg:npm/leva?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe-site@1.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/website/package.json", "datasource_id": "npm_package_json" }, { "purl": "pkg:npm/next", - "extracted_requirement": "^12.2.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "extracted_requirement": "^12.1.6-canary.6", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/next?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "cobe/package.json", + "for_package_uid": "pkg:npm/cobe-site@1.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/website/package.json", "datasource_id": "npm_package_json" }, { "purl": "pkg:npm/nextra", - "extracted_requirement": "2.0.0-alpha.50", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "extracted_requirement": "2.0.0-alpha.56", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/nextra?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "cobe/package.json", + "for_package_uid": "pkg:npm/cobe-site@1.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/website/package.json", "datasource_id": "npm_package_json" }, { "purl": "pkg:npm/nextra-theme-docs", - "extracted_requirement": "2.0.0-alpha.53", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "extracted_requirement": "2.0.0-alpha.59", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/nextra-theme-docs?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "cobe/package.json", + "for_package_uid": "pkg:npm/cobe-site@1.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/website/package.json", "datasource_id": "npm_package_json" }, { "purl": "pkg:npm/react", - "extracted_requirement": "^18.2.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "extracted_requirement": "^18.0.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/react?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "cobe/package.json", + "for_package_uid": "pkg:npm/cobe-site@1.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/website/package.json", "datasource_id": "npm_package_json" }, { "purl": "pkg:npm/react-dom", - "extracted_requirement": "^18.2.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "extracted_requirement": "^18.0.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/react-dom?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "cobe/package.json", + "for_package_uid": "pkg:npm/cobe-site@1.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^4.5.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/react-spring", + "extracted_requirement": "^9.4.4", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "cobe/package.json", + "dependency_uid": "pkg:npm/react-spring?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe-site@1.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/runtime@7.18.9", + "purl": "pkg:npm/nextra@2.0.0-alpha.56", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -276,9 +340,9 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@babel", - "name": "runtime", - "version": "7.18.9", + "namespace": null, + "name": "nextra", + "version": "2.0.0-alpha.56", "qualifiers": {}, "subpath": null, "primary_language": "JavaScript", @@ -292,7 +356,7 @@ "sha1": null, "md5": null, "sha256": null, - "sha512": "964a970dcbe5153e6bbc48e2bbaf9060efb5197ac41d1a362ceb52ec4e06b57e4448864e81ea6ab19055223e8fbfe6baceab326bd5428222b52802b806f24303", + "sha512": "53abc5a148f839cf8fc7d5b234e50959db5aea3f01f9d2ad8db5af1358c2a33f70740011b56c486649c810c2badb2b7de3365e523260e4a0b38f51c165ce94a5", "bug_tracking_url": null, "code_view_url": null, "vcs_url": null, @@ -313,11 +377,11 @@ "extra_data": {}, "dependencies": [ { - "purl": "pkg:npm/regenerator-runtime", - "extracted_requirement": "0.13.9", - "scope": "dependencies", + "purl": "pkg:npm/react", + "extracted_requirement": ">=16.13.1", + "scope": "peerDependencies", "is_runtime": false, - "is_optional": false, + "is_optional": true, "is_resolved": true, "is_direct": false, "resolved_package": {}, @@ -328,20 +392,16 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40babel/runtime@7.18.9" - }, - "extra_data": { - "engines": { - "node": ">=6.9.0" - } + "purl": "pkg:npm/nextra@2.0.0-alpha.56" }, - "dependency_uid": "pkg:npm/%40babel/runtime@7.18.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "cobe/pnpm-lock.yaml", + "extra_data": {}, + "dependency_uid": "pkg:npm/nextra@2.0.0-alpha.56?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe-site@1.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/website/pnpm-lock.yaml", "datasource_id": "pnpm_lock_yaml" }, { - "purl": "pkg:npm/%40headlessui/react@1.6.6", + "purl": "pkg:npm/react@18.0.0", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -350,9 +410,9 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@headlessui", + "namespace": null, "name": "react", - "version": "1.6.6", + "version": "18.0.0", "qualifiers": {}, "subpath": null, "primary_language": "JavaScript", @@ -366,7 +426,7 @@ "sha1": null, "md5": null, "sha256": null, - "sha512": "30526d9a3f5787f86104c84b71c19b0684a4fac93ad4194feac25ee2e41c54cb576610a01aa7761b2210cf39ac74f753116192178df80818bc9a7851eae9b8e9", + "sha512": "c7e54beb06d3e094553e6ec41b15e167cc3c2d344e6b13d73aa8651b2552aefd2c0758e4c851a05f127c2d5a0f44bbcf47afc221918599fcea51ad8d61e32bd8", "bug_tracking_url": null, "code_view_url": null, "vcs_url": null, @@ -385,90 +445,361 @@ "is_private": false, "is_virtual": true, "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/react", - "extracted_requirement": "^16 || ^17 || ^18", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/react-dom", - "extracted_requirement": "^16 || ^17 || ^18", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - } - ], + "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40headlessui/react@1.6.6" + "purl": "pkg:npm/react@18.0.0" }, "extra_data": { "engines": { - "node": ">=10" + "node": ">=0.10.0" } }, - "dependency_uid": "pkg:npm/%40headlessui/react@1.6.6?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "cobe/pnpm-lock.yaml", + "dependency_uid": "pkg:npm/react@18.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe-site@1.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/website/pnpm-lock.yaml", "datasource_id": "pnpm_lock_yaml" }, { - "purl": "pkg:npm/%40mdx-js/mdx@2.1.2", - "extracted_requirement": null, - "scope": null, + "purl": "pkg:npm/phenomenon", + "extracted_requirement": "^1.6.0", + "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "@mdx-js", - "name": "mdx", - "version": "2.1.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": "0123751941f4817b20276503fd377b173268d52c059244395758bd6ade68fd13ab6bb6eb93231c06ca2db0e589591ce65d968bc36b975a7e1a37c0773cc34530", - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/phenomenon?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/esbuild", + "extracted_requirement": "^0.13.14", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/esbuild?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/glslx", + "extracted_requirement": "^0.2.13", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/glslx?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/next", + "extracted_requirement": "^12.2.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/next?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/nextra", + "extracted_requirement": "2.0.0-alpha.50", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/nextra?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/nextra-theme-docs", + "extracted_requirement": "2.0.0-alpha.53", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/nextra-theme-docs?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/react", + "extracted_requirement": "^18.2.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/react?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/react-dom", + "extracted_requirement": "^18.2.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/react-dom?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/typescript", + "extracted_requirement": "^4.5.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/%40babel/runtime@7.18.9", + "extracted_requirement": null, + "scope": null, + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": "@babel", + "name": "runtime", + "version": "7.18.9", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": "964a970dcbe5153e6bbc48e2bbaf9060efb5197ac41d1a362ceb52ec4e06b57e4448864e81ea6ab19055223e8fbfe6baceab326bd5428222b52802b806f24303", + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/regenerator-runtime", + "extracted_requirement": "0.13.9", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "pnpm_lock_yaml", + "purl": "pkg:npm/%40babel/runtime@7.18.9" + }, + "extra_data": { + "engines": { + "node": ">=6.9.0" + } + }, + "dependency_uid": "pkg:npm/%40babel/runtime@7.18.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/pnpm-lock.yaml", + "datasource_id": "pnpm_lock_yaml" + }, + { + "purl": "pkg:npm/%40headlessui/react@1.6.6", + "extracted_requirement": null, + "scope": null, + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": "@headlessui", + "name": "react", + "version": "1.6.6", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": "30526d9a3f5787f86104c84b71c19b0684a4fac93ad4194feac25ee2e41c54cb576610a01aa7761b2210cf39ac74f753116192178df80818bc9a7851eae9b8e9", + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/react", + "extracted_requirement": "^16 || ^17 || ^18", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/react-dom", + "extracted_requirement": "^16 || ^17 || ^18", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "pnpm_lock_yaml", + "purl": "pkg:npm/%40headlessui/react@1.6.6" + }, + "extra_data": { + "engines": { + "node": ">=10" + } + }, + "dependency_uid": "pkg:npm/%40headlessui/react@1.6.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "cobe/pnpm-lock.yaml", + "datasource_id": "pnpm_lock_yaml" + }, + { + "purl": "pkg:npm/%40mdx-js/mdx@2.1.2", + "extracted_requirement": null, + "scope": null, + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": "@mdx-js", + "name": "mdx", + "version": "2.1.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": "0123751941f4817b20276503fd377b173268d52c059244395758bd6ade68fd13ab6bb6eb93231c06ca2db0e589591ce65d968bc36b975a7e1a37c0773cc34530", + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, "extra_data": {}, "dependencies": [ { @@ -1047,7 +1378,7 @@ "datasource_id": "pnpm_lock_yaml" }, { - "purl": "pkg:npm/%40napi-rs/nextra@2.0.0-alpha.56", + "purl": "pkg:npm/nextra@2.0.0-alpha.56", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -1056,7 +1387,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", + "namespace": null, "name": "nextra", "version": "2.0.0-alpha.56", "qualifiers": {}, @@ -1229,16 +1560,16 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/nextra@2.0.0-alpha.56" + "purl": "pkg:npm/nextra@2.0.0-alpha.56" }, "extra_data": {}, - "dependency_uid": "pkg:npm/%40napi-rs/nextra@2.0.0-alpha.56?uuid=fixed-uid-done-for-testing-5642512d1758", + "dependency_uid": "pkg:npm/nextra@2.0.0-alpha.56?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_path": "cobe/pnpm-lock.yaml", "datasource_id": "pnpm_lock_yaml" }, { - "purl": "pkg:npm/%40napi-rs/react-is@16.13.1", + "purl": "pkg:npm/react-is@16.13.1", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -1247,7 +1578,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", + "namespace": null, "name": "react-is", "version": "16.13.1", "qualifiers": {}, @@ -1287,16 +1618,16 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/react-is@16.13.1" + "purl": "pkg:npm/react-is@16.13.1" }, "extra_data": {}, - "dependency_uid": "pkg:npm/%40napi-rs/react-is@16.13.1?uuid=fixed-uid-done-for-testing-5642512d1758", + "dependency_uid": "pkg:npm/react-is@16.13.1?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_path": "cobe/pnpm-lock.yaml", "datasource_id": "pnpm_lock_yaml" }, { - "purl": "pkg:npm/%40napi-rs/react-spring@9.5.5", + "purl": "pkg:npm/react-spring@9.5.5", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -1305,7 +1636,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", + "namespace": null, "name": "react-spring", "version": "9.5.5", "qualifiers": {}, @@ -1511,16 +1842,16 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/react-spring@9.5.5" + "purl": "pkg:npm/react-spring@9.5.5" }, "extra_data": {}, - "dependency_uid": "pkg:npm/%40napi-rs/react-spring@9.5.5?uuid=fixed-uid-done-for-testing-5642512d1758", + "dependency_uid": "pkg:npm/react-spring@9.5.5?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_path": "cobe/pnpm-lock.yaml", "datasource_id": "pnpm_lock_yaml" }, { - "purl": "pkg:npm/%40napi-rs/remark-gfm@3.0.1", + "purl": "pkg:npm/remark-gfm@3.0.1", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -1529,7 +1860,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", + "namespace": null, "name": "remark-gfm", "version": "3.0.1", "qualifiers": {}, @@ -1625,16 +1956,16 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/remark-gfm@3.0.1" + "purl": "pkg:npm/remark-gfm@3.0.1" }, "extra_data": {}, - "dependency_uid": "pkg:npm/%40napi-rs/remark-gfm@3.0.1?uuid=fixed-uid-done-for-testing-5642512d1758", + "dependency_uid": "pkg:npm/remark-gfm@3.0.1?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_path": "cobe/pnpm-lock.yaml", "datasource_id": "pnpm_lock_yaml" }, { - "purl": "pkg:npm/%40napi-rs/styled-jsx@5.0.2", + "purl": "pkg:npm/styled-jsx@5.0.2", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -1643,7 +1974,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", + "namespace": null, "name": "styled-jsx", "version": "5.0.2", "qualifiers": {}, @@ -1717,20 +2048,20 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/styled-jsx@5.0.2" + "purl": "pkg:npm/styled-jsx@5.0.2" }, "extra_data": { "engines": { "node": ">= 12.0.0" } }, - "dependency_uid": "pkg:npm/%40napi-rs/styled-jsx@5.0.2?uuid=fixed-uid-done-for-testing-5642512d1758", + "dependency_uid": "pkg:npm/styled-jsx@5.0.2?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_path": "cobe/pnpm-lock.yaml", "datasource_id": "pnpm_lock_yaml" }, { - "purl": "pkg:npm/%40napi-rs/zustand@3.7.2", + "purl": "pkg:npm/zustand@3.7.2", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -1739,7 +2070,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", + "namespace": null, "name": "zustand", "version": "3.7.2", "qualifiers": {}, @@ -1791,20 +2122,20 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/zustand@3.7.2" + "purl": "pkg:npm/zustand@3.7.2" }, "extra_data": { "engines": { "node": ">=12.7.0" } }, - "dependency_uid": "pkg:npm/%40napi-rs/zustand@3.7.2?uuid=fixed-uid-done-for-testing-5642512d1758", + "dependency_uid": "pkg:npm/zustand@3.7.2?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_path": "cobe/pnpm-lock.yaml", "datasource_id": "pnpm_lock_yaml" }, { - "purl": "pkg:npm/%40napi-rs/zwitch@2.0.2", + "purl": "pkg:npm/zwitch@2.0.2", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -1813,7 +2144,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", + "namespace": null, "name": "zwitch", "version": "2.0.2", "qualifiers": {}, @@ -1853,10 +2184,10 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/zwitch@2.0.2" + "purl": "pkg:npm/zwitch@2.0.2" }, "extra_data": {}, - "dependency_uid": "pkg:npm/%40napi-rs/zwitch@2.0.2?uuid=fixed-uid-done-for-testing-5642512d1758", + "dependency_uid": "pkg:npm/zwitch@2.0.2?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", "datafile_path": "cobe/pnpm-lock.yaml", "datasource_id": "pnpm_lock_yaml" @@ -1928,7 +2259,6 @@ } ], "for_packages": [ - "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758", "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] @@ -2550,27 +2880,179 @@ "extra_data": {} } ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40mdx-js/mdx@2.1.2" - }, - "extra_data": {} + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "pnpm_lock_yaml", + "purl": "pkg:npm/%40mdx-js/mdx@2.1.2" + }, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40mdx-js/react@2.1.2", + "extracted_requirement": null, + "scope": null, + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": "@mdx-js", + "name": "react", + "version": "2.1.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": "e767b70d3241ae3b30dd4e75642759dcdd4805aaa76f32c89e00925e92ad898886afb3c8aa9dff3fffa4ca6d0c3d3c012ffcbd64198289e0fc172ad7b840eb47", + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40types/mdx", + "extracted_requirement": "2.0.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/react", + "extracted_requirement": "18.0.17", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/react", + "extracted_requirement": ">=16", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "pnpm_lock_yaml", + "purl": "pkg:npm/%40mdx-js/react@2.1.2" + }, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40napi-rs/simple-git-android-arm-eabi@0.1.8", + "extracted_requirement": null, + "scope": null, + "is_runtime": true, + "is_optional": true, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": "@napi-rs", + "name": "simple-git-android-arm-eabi", + "version": "0.1.8", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": "24909e8c7041d46e8ef27c6340b4f8aae58272f2e90b7a1174927d1b73056120a8612f22d5b58259e53e2bb06bfb14fe0fab35b7dabc90d240c09bfd620a62d2", + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "pnpm_lock_yaml", + "purl": "pkg:npm/%40napi-rs/simple-git-android-arm-eabi@0.1.8" + }, + "extra_data": { + "cpu": [ + "arm" + ], + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + } }, { - "purl": "pkg:npm/%40mdx-js/react@2.1.2", + "purl": "pkg:npm/%40napi-rs/simple-git-android-arm64@0.1.8", "extracted_requirement": null, "scope": null, "is_runtime": true, - "is_optional": false, + "is_optional": true, "is_resolved": true, "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@mdx-js", - "name": "react", - "version": "2.1.2", + "namespace": "@napi-rs", + "name": "simple-git-android-arm64", + "version": "0.1.8", "qualifiers": {}, "subpath": null, "primary_language": "JavaScript", @@ -2584,7 +3066,7 @@ "sha1": null, "md5": null, "sha256": null, - "sha512": "e767b70d3241ae3b30dd4e75642759dcdd4805aaa76f32c89e00925e92ad898886afb3c8aa9dff3fffa4ca6d0c3d3c012ffcbd64198289e0fc172ad7b840eb47", + "sha512": "9ab687cf0581c37b5d45eb4d392e4a9c54a3bdd01b3419e314b03c2383f04c23c98f7438b71ae281c3e9d9de7d709d130b9d71a673d79d98d874dc30488f60ea", "bug_tracking_url": null, "code_view_url": null, "vcs_url": null, @@ -2603,51 +3085,27 @@ "is_private": false, "is_virtual": true, "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40types/mdx", - "extracted_requirement": "2.0.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/react", - "extracted_requirement": "18.0.17", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/react", - "extracted_requirement": ">=16", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - } - ], + "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40mdx-js/react@2.1.2" + "purl": "pkg:npm/%40napi-rs/simple-git-android-arm64@0.1.8" }, - "extra_data": {} + "extra_data": { + "cpu": [ + "arm64" + ], + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + } }, { - "purl": "pkg:npm/%40napi-rs/simple-git-android-arm-eabi@0.1.8", + "purl": "pkg:npm/%40napi-rs/simple-git-darwin-arm64@0.1.8", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -2657,7 +3115,7 @@ "resolved_package": { "type": "npm", "namespace": "@napi-rs", - "name": "simple-git-android-arm-eabi", + "name": "simple-git-darwin-arm64", "version": "0.1.8", "qualifiers": {}, "subpath": null, @@ -2672,7 +3130,7 @@ "sha1": null, "md5": null, "sha256": null, - "sha512": "24909e8c7041d46e8ef27c6340b4f8aae58272f2e90b7a1174927d1b73056120a8612f22d5b58259e53e2bb06bfb14fe0fab35b7dabc90d240c09bfd620a62d2", + "sha512": "b9fcbfdfa788fe3e14b2412ebea487eee5eda77a1778b0e68d009f289cf7bb9571f7c2a638c2aba809b61fcd4007658eb42a399aa4ba3db05e51747c0495fc95", "bug_tracking_url": null, "code_view_url": null, "vcs_url": null, @@ -2696,14 +3154,14 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/simple-git-android-arm-eabi@0.1.8" + "purl": "pkg:npm/%40napi-rs/simple-git-darwin-arm64@0.1.8" }, "extra_data": { "cpu": [ - "arm" + "arm64" ], "os": [ - "android" + "darwin" ], "engines": { "node": ">= 10" @@ -2711,7 +3169,7 @@ } }, { - "purl": "pkg:npm/%40napi-rs/simple-git-android-arm64@0.1.8", + "purl": "pkg:npm/%40napi-rs/simple-git-darwin-x64@0.1.8", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -2721,7 +3179,7 @@ "resolved_package": { "type": "npm", "namespace": "@napi-rs", - "name": "simple-git-android-arm64", + "name": "simple-git-darwin-x64", "version": "0.1.8", "qualifiers": {}, "subpath": null, @@ -2736,7 +3194,7 @@ "sha1": null, "md5": null, "sha256": null, - "sha512": "9ab687cf0581c37b5d45eb4d392e4a9c54a3bdd01b3419e314b03c2383f04c23c98f7438b71ae281c3e9d9de7d709d130b9d71a673d79d98d874dc30488f60ea", + "sha512": "55bdb553ebf7b4f24d97ef09b481c74fc1c67ba599f28d53ab77faa7e271f42cfbd7311b708881f45084318d649d2fe3c1010eba186523d424edde0763eae9ac", "bug_tracking_url": null, "code_view_url": null, "vcs_url": null, @@ -2760,97 +3218,220 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/simple-git-android-arm64@0.1.8" + "purl": "pkg:npm/%40napi-rs/simple-git-darwin-x64@0.1.8" }, "extra_data": { "cpu": [ - "arm64" + "x64" ], "os": [ - "android" + "darwin" + ], + "engines": { + "node": ">= 10" + } + } + }, + { + "purl": "pkg:npm/nextra@2.0.0-alpha.56", + "extracted_requirement": null, + "scope": null, + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": null, + "name": "nextra", + "version": "2.0.0-alpha.56", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": "53abc5a148f839cf8fc7d5b234e50959db5aea3f01f9d2ad8db5af1358c2a33f70740011b56c486649c810c2badb2b7de3365e523260e4a0b38f51c165ce94a5", + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40mdx-js/mdx", + "extracted_requirement": "2.1.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40napi-rs/simple-git", + "extracted_requirement": "0.1.8", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/github-slugger", + "extracted_requirement": "1.4.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graceful-fs", + "extracted_requirement": "4.2.10", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/gray-matter", + "extracted_requirement": "4.0.3", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/p-limit", + "extracted_requirement": "4.0.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/react", + "extracted_requirement": ">=16.13.1", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/rehype-pretty-code", + "extracted_requirement": "0.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/remark-gfm", + "extracted_requirement": "3.0.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/shiki", + "extracted_requirement": "0.10.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/slash", + "extracted_requirement": "3.0.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/supports-color", + "extracted_requirement": null, + "scope": "transitivePeerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } ], - "engines": { - "node": ">= 10" - } - } - }, - { - "purl": "pkg:npm/%40napi-rs/simple-git-darwin-arm64@0.1.8", - "extracted_requirement": null, - "scope": null, - "is_runtime": true, - "is_optional": true, - "is_resolved": true, - "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "@napi-rs", - "name": "simple-git-darwin-arm64", - "version": "0.1.8", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": "b9fcbfdfa788fe3e14b2412ebea487eee5eda77a1778b0e68d009f289cf7bb9571f7c2a638c2aba809b61fcd4007658eb42a399aa4ba3db05e51747c0495fc95", - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/simple-git-darwin-arm64@0.1.8" + "purl": "pkg:npm/nextra@2.0.0-alpha.56" }, - "extra_data": { - "cpu": [ - "arm64" - ], - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - } + "extra_data": {} }, { - "purl": "pkg:npm/%40napi-rs/simple-git-darwin-x64@0.1.8", + "purl": "pkg:npm/react-is@16.13.1", "extracted_requirement": null, "scope": null, "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": true, "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", - "name": "simple-git-darwin-x64", - "version": "0.1.8", + "namespace": null, + "name": "react-is", + "version": "16.13.1", "qualifiers": {}, "subpath": null, "primary_language": "JavaScript", @@ -2864,7 +3445,7 @@ "sha1": null, "md5": null, "sha256": null, - "sha512": "55bdb553ebf7b4f24d97ef09b481c74fc1c67ba599f28d53ab77faa7e271f42cfbd7311b708881f45084318d649d2fe3c1010eba186523d424edde0763eae9ac", + "sha512": "db87baca71361fe38ab7892ab0ebcd77c901a55eb9ce8c5b038055b04381dc0455590922fc31f3694a02e4ab8e37f06271c0da0824d906e39c7d9b3bd2447c6d", "bug_tracking_url": null, "code_view_url": null, "vcs_url": null, @@ -2888,22 +3469,12 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/simple-git-darwin-x64@0.1.8" + "purl": "pkg:npm/react-is@16.13.1" }, - "extra_data": { - "cpu": [ - "x64" - ], - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - } + "extra_data": {} }, { - "purl": "pkg:npm/%40napi-rs/nextra@2.0.0-alpha.56", + "purl": "pkg:npm/react-spring@9.5.5", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -2912,9 +3483,9 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", - "name": "nextra", - "version": "2.0.0-alpha.56", + "namespace": null, + "name": "react-spring", + "version": "9.5.5", "qualifiers": {}, "subpath": null, "primary_language": "JavaScript", @@ -2928,7 +3499,7 @@ "sha1": null, "md5": null, "sha256": null, - "sha512": "53abc5a148f839cf8fc7d5b234e50959db5aea3f01f9d2ad8db5af1358c2a33f70740011b56c486649c810c2badb2b7de3365e523260e4a0b38f51c165ce94a5", + "sha512": "bcc195776ca383159c442ce82e7f400f5776e3e5a9ba71c1460e43a1e85c45d881a1c68e1faaa095ed3137d0b92cfa655dfbf8c88a52e5058637930aad6c5266", "bug_tracking_url": null, "code_view_url": null, "vcs_url": null, @@ -2949,8 +3520,8 @@ "extra_data": {}, "dependencies": [ { - "purl": "pkg:npm/%40mdx-js/mdx", - "extracted_requirement": "2.1.2", + "purl": "pkg:npm/%40react-spring/core", + "extracted_requirement": "9.5.5", "scope": "dependencies", "is_runtime": false, "is_optional": false, @@ -2960,8 +3531,8 @@ "extra_data": {} }, { - "purl": "pkg:npm/%40napi-rs/simple-git", - "extracted_requirement": "0.1.8", + "purl": "pkg:npm/%40react-spring/konva", + "extracted_requirement": "9.5.5", "scope": "dependencies", "is_runtime": false, "is_optional": false, @@ -2971,8 +3542,8 @@ "extra_data": {} }, { - "purl": "pkg:npm/github-slugger", - "extracted_requirement": "1.4.0", + "purl": "pkg:npm/%40react-spring/native", + "extracted_requirement": "9.5.5", "scope": "dependencies", "is_runtime": false, "is_optional": false, @@ -2982,8 +3553,8 @@ "extra_data": {} }, { - "purl": "pkg:npm/graceful-fs", - "extracted_requirement": "4.2.10", + "purl": "pkg:npm/%40react-spring/three", + "extracted_requirement": "9.5.5", "scope": "dependencies", "is_runtime": false, "is_optional": false, @@ -2993,8 +3564,8 @@ "extra_data": {} }, { - "purl": "pkg:npm/gray-matter", - "extracted_requirement": "4.0.3", + "purl": "pkg:npm/%40react-spring/web", + "extracted_requirement": "9.5.5", "scope": "dependencies", "is_runtime": false, "is_optional": false, @@ -3004,8 +3575,8 @@ "extra_data": {} }, { - "purl": "pkg:npm/p-limit", - "extracted_requirement": "4.0.0", + "purl": "pkg:npm/%40react-spring/zdog", + "extracted_requirement": "9.5.5", "scope": "dependencies", "is_runtime": false, "is_optional": false, @@ -3016,7 +3587,18 @@ }, { "purl": "pkg:npm/react", - "extracted_requirement": ">=16.13.1", + "extracted_requirement": "^16.8.0 || ^17.0.0 || ^18.0.0", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/react-dom", + "extracted_requirement": "^16.8.0 || ^17.0.0 || ^18.0.0", "scope": "peerDependencies", "is_runtime": false, "is_optional": true, @@ -3026,8 +3608,140 @@ "extra_data": {} }, { - "purl": "pkg:npm/rehype-pretty-code", - "extracted_requirement": "0.1.0", + "purl": "pkg:npm/%40react-three/fiber", + "extracted_requirement": null, + "scope": "transitivePeerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/konva", + "extracted_requirement": null, + "scope": "transitivePeerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/react-konva", + "extracted_requirement": null, + "scope": "transitivePeerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/react-native", + "extracted_requirement": null, + "scope": "transitivePeerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/react-zdog", + "extracted_requirement": null, + "scope": "transitivePeerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/three", + "extracted_requirement": null, + "scope": "transitivePeerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/zdog", + "extracted_requirement": null, + "scope": "transitivePeerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "pnpm_lock_yaml", + "purl": "pkg:npm/react-spring@9.5.5" + }, + "extra_data": {} + }, + { + "purl": "pkg:npm/remark-gfm@3.0.1", + "extracted_requirement": null, + "scope": null, + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": null, + "name": "remark-gfm", + "version": "3.0.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": "944143a22d8f20227236b00214e7c30f72652e4b926ce6b959df043edd3a1d4769b6ff069f46f161375b53f5d7437b3000f904686c713cdf5c6e7307bd5bb522", + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40types/mdast", + "extracted_requirement": "3.0.10", "scope": "dependencies", "is_runtime": false, "is_optional": false, @@ -3037,8 +3751,8 @@ "extra_data": {} }, { - "purl": "pkg:npm/remark-gfm", - "extracted_requirement": "3.0.1", + "purl": "pkg:npm/mdast-util-gfm", + "extracted_requirement": "2.0.1", "scope": "dependencies", "is_runtime": false, "is_optional": false, @@ -3048,8 +3762,8 @@ "extra_data": {} }, { - "purl": "pkg:npm/shiki", - "extracted_requirement": "0.10.1", + "purl": "pkg:npm/micromark-extension-gfm", + "extracted_requirement": "2.0.1", "scope": "dependencies", "is_runtime": false, "is_optional": false, @@ -3059,8 +3773,8 @@ "extra_data": {} }, { - "purl": "pkg:npm/slash", - "extracted_requirement": "3.0.0", + "purl": "pkg:npm/unified", + "extracted_requirement": "10.1.2", "scope": "dependencies", "is_runtime": false, "is_optional": false, @@ -3085,12 +3799,12 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/nextra@2.0.0-alpha.56" + "purl": "pkg:npm/remark-gfm@3.0.1" }, "extra_data": {} }, { - "purl": "pkg:npm/%40napi-rs/react-is@16.13.1", + "purl": "pkg:npm/styled-jsx@5.0.2", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -3099,9 +3813,9 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", - "name": "react-is", - "version": "16.13.1", + "namespace": null, + "name": "styled-jsx", + "version": "5.0.2", "qualifiers": {}, "subpath": null, "primary_language": "JavaScript", @@ -3115,7 +3829,7 @@ "sha1": null, "md5": null, "sha256": null, - "sha512": "db87baca71361fe38ab7892ab0ebcd77c901a55eb9ce8c5b038055b04381dc0455590922fc31f3694a02e4ab8e37f06271c0da0824d906e39c7d9b3bd2447c6d", + "sha512": "2ea3d0adb061dde803e7b341707113e2a720b213e4b3ec9b97284f947d8663ca1a0e02acf122b80b7741877a122638332771b9b7549811918790ff901295fd11", "bug_tracking_url": null, "code_view_url": null, "vcs_url": null, @@ -3134,17 +3848,55 @@ "is_private": false, "is_virtual": true, "extra_data": {}, - "dependencies": [], + "dependencies": [ + { + "purl": "pkg:npm/react", + "extracted_requirement": ">= 16.8.0 || 17.x.x || ^18.0.0-0", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40babel/core", + "extracted_requirement": "*", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/babel-plugin-macros", + "extracted_requirement": "*", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": false, + "resolved_package": {}, + "extra_data": {} + } + ], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/react-is@16.13.1" + "purl": "pkg:npm/styled-jsx@5.0.2" }, - "extra_data": {} + "extra_data": { + "engines": { + "node": ">= 12.0.0" + } + } }, { - "purl": "pkg:npm/%40napi-rs/react-spring@9.5.5", + "purl": "pkg:npm/zustand@3.7.2", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -3153,9 +3905,9 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", - "name": "react-spring", - "version": "9.5.5", + "namespace": null, + "name": "zustand", + "version": "3.7.2", "qualifiers": {}, "subpath": null, "primary_language": "JavaScript", @@ -3169,7 +3921,7 @@ "sha1": null, "md5": null, "sha256": null, - "sha512": "bcc195776ca383159c442ce82e7f400f5776e3e5a9ba71c1460e43a1e85c45d881a1c68e1faaa095ed3137d0b92cfa655dfbf8c88a52e5058637930aad6c5266", + "sha512": "3c82432192ada248687fef7eeb4729a1c9153aad39b09cc70ab8b2bda2c1984262c6c790d5ae4a768bfa7d665f58ebb948af5cf85847d63534b67b4bc5125830", "bug_tracking_url": null, "code_view_url": null, "vcs_url": null, @@ -3189,168 +3941,14 @@ "is_virtual": true, "extra_data": {}, "dependencies": [ - { - "purl": "pkg:npm/%40react-spring/core", - "extracted_requirement": "9.5.5", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40react-spring/konva", - "extracted_requirement": "9.5.5", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40react-spring/native", - "extracted_requirement": "9.5.5", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40react-spring/three", - "extracted_requirement": "9.5.5", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40react-spring/web", - "extracted_requirement": "9.5.5", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40react-spring/zdog", - "extracted_requirement": "9.5.5", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, { "purl": "pkg:npm/react", - "extracted_requirement": "^16.8.0 || ^17.0.0 || ^18.0.0", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/react-dom", - "extracted_requirement": "^16.8.0 || ^17.0.0 || ^18.0.0", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40react-three/fiber", - "extracted_requirement": null, - "scope": "transitivePeerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/konva", - "extracted_requirement": null, - "scope": "transitivePeerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/react-konva", - "extracted_requirement": null, - "scope": "transitivePeerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/react-native", - "extracted_requirement": null, - "scope": "transitivePeerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/react-zdog", - "extracted_requirement": null, - "scope": "transitivePeerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/three", - "extracted_requirement": null, - "scope": "transitivePeerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/zdog", - "extracted_requirement": null, - "scope": "transitivePeerDependencies", + "extracted_requirement": ">=16.8", + "scope": "peerDependencies", "is_runtime": false, - "is_optional": false, + "is_optional": true, "is_resolved": false, - "is_direct": true, + "is_direct": false, "resolved_package": {}, "extra_data": {} } @@ -3359,12 +3957,16 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/react-spring@9.5.5" + "purl": "pkg:npm/zustand@3.7.2" }, - "extra_data": {} + "extra_data": { + "engines": { + "node": ">=12.7.0" + } + } }, { - "purl": "pkg:npm/%40napi-rs/remark-gfm@3.0.1", + "purl": "pkg:npm/zwitch@2.0.2", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -3373,9 +3975,9 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", - "name": "remark-gfm", - "version": "3.0.1", + "namespace": null, + "name": "zwitch", + "version": "2.0.2", "qualifiers": {}, "subpath": null, "primary_language": "JavaScript", @@ -3389,7 +3991,7 @@ "sha1": null, "md5": null, "sha256": null, - "sha512": "944143a22d8f20227236b00214e7c30f72652e4b926ce6b959df043edd3a1d4769b6ff069f46f161375b53f5d7437b3000f904686c713cdf5c6e7307bd5bb522", + "sha512": "259c68b65ed2c40247d23edd378a71b1357a64b5e82dd18c13e3ec8e42ff0da06b56bc8af644c6ab4e867caaf07123aaca93fe7dd5c6a021c4dfa6fdf5f595a0", "bug_tracking_url": null, "code_view_url": null, "vcs_url": null, @@ -3408,165 +4010,315 @@ "is_private": false, "is_virtual": true, "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40types/mdast", - "extracted_requirement": "3.0.10", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/mdast-util-gfm", - "extracted_requirement": "2.0.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/micromark-extension-gfm", - "extracted_requirement": "2.0.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/unified", - "extracted_requirement": "10.1.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/supports-color", - "extracted_requirement": null, - "scope": "transitivePeerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], + "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/remark-gfm@3.0.1" + "purl": "pkg:npm/zwitch@2.0.2" }, "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "pnpm_lock_yaml", + "purl": null + } + ], + "for_packages": [ + "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "scan_errors": [] + }, + { + "path": "cobe/pnpm-workspace.yaml", + "type": "file", + "package_data": [ + { + "type": "npm", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": { + "workspaces": [ + "website" + ] + }, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "pnpm_workspace_yaml", + "purl": null + } + ], + "for_packages": [ + "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "scan_errors": [] + }, + { + "path": "cobe/website", + "type": "directory", + "package_data": [], + "for_packages": [ + "pkg:npm/cobe-site@1.0.0?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "scan_errors": [] + }, + { + "path": "cobe/website/package.json", + "type": "file", + "package_data": [ + { + "type": "npm", + "namespace": null, + "name": "cobe-site", + "version": "1.0.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Shu Ding", + "email": "g@shud.in", + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": "https://registry.npmjs.org/cobe-site/-/cobe-site-1.0.0.tgz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "cobe/website/package.json", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "- MIT\n", + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/cobe", + "extracted_requirement": "workspace:*", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/leva", + "extracted_requirement": "^0.9.34", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/next", + "extracted_requirement": "^12.1.6-canary.6", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/nextra", + "extracted_requirement": "2.0.0-alpha.56", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} }, { - "purl": "pkg:npm/%40napi-rs/styled-jsx@5.0.2", - "extracted_requirement": null, - "scope": null, + "purl": "pkg:npm/nextra-theme-docs", + "extracted_requirement": "2.0.0-alpha.59", + "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "@napi-rs", - "name": "styled-jsx", - "version": "5.0.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": "2ea3d0adb061dde803e7b341707113e2a720b213e4b3ec9b97284f947d8663ca1a0e02acf122b80b7741877a122638332771b9b7549811918790ff901295fd11", - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/react", - "extracted_requirement": ">= 16.8.0 || 17.x.x || ^18.0.0-0", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40babel/core", - "extracted_requirement": "*", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/babel-plugin-macros", - "extracted_requirement": "*", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": false, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/styled-jsx@5.0.2" - }, - "extra_data": { - "engines": { - "node": ">= 12.0.0" - } - } + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/react", + "extracted_requirement": "^18.0.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/react-dom", + "extracted_requirement": "^18.0.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} }, { - "purl": "pkg:npm/%40napi-rs/zustand@3.7.2", + "purl": "pkg:npm/react-spring", + "extracted_requirement": "^9.4.4", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": "https://www.npmjs.com/package/cobe-site", + "repository_download_url": "https://registry.npmjs.org/cobe-site/-/cobe-site-1.0.0.tgz", + "api_data_url": "https://registry.npmjs.org/cobe-site/1.0.0", + "datasource_id": "npm_package_json", + "purl": "pkg:npm/cobe-site@1.0.0" + } + ], + "for_packages": [ + "pkg:npm/cobe-site@1.0.0?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "scan_errors": [] + }, + { + "path": "cobe/website/pnpm-lock.yaml", + "type": "file", + "package_data": [ + { + "type": "npm", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": { + "lockfileVersion": "5.4" + }, + "dependencies": [ + { + "purl": "pkg:npm/nextra@2.0.0-alpha.56", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -3575,9 +4327,9 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", - "name": "zustand", - "version": "3.7.2", + "namespace": null, + "name": "nextra", + "version": "2.0.0-alpha.56", "qualifiers": {}, "subpath": null, "primary_language": "JavaScript", @@ -3591,7 +4343,7 @@ "sha1": null, "md5": null, "sha256": null, - "sha512": "3c82432192ada248687fef7eeb4729a1c9153aad39b09cc70ab8b2bda2c1984262c6c790d5ae4a768bfa7d665f58ebb948af5cf85847d63534b67b4bc5125830", + "sha512": "53abc5a148f839cf8fc7d5b234e50959db5aea3f01f9d2ad8db5af1358c2a33f70740011b56c486649c810c2badb2b7de3365e523260e4a0b38f51c165ce94a5", "bug_tracking_url": null, "code_view_url": null, "vcs_url": null, @@ -3613,11 +4365,11 @@ "dependencies": [ { "purl": "pkg:npm/react", - "extracted_requirement": ">=16.8", + "extracted_requirement": ">=16.13.1", "scope": "peerDependencies", "is_runtime": false, "is_optional": true, - "is_resolved": false, + "is_resolved": true, "is_direct": false, "resolved_package": {}, "extra_data": {} @@ -3627,16 +4379,12 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/zustand@3.7.2" + "purl": "pkg:npm/nextra@2.0.0-alpha.56" }, - "extra_data": { - "engines": { - "node": ">=12.7.0" - } - } + "extra_data": {} }, { - "purl": "pkg:npm/%40napi-rs/zwitch@2.0.2", + "purl": "pkg:npm/react@18.0.0", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -3645,9 +4393,9 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@napi-rs", - "name": "zwitch", - "version": "2.0.2", + "namespace": null, + "name": "react", + "version": "18.0.0", "qualifiers": {}, "subpath": null, "primary_language": "JavaScript", @@ -3661,7 +4409,7 @@ "sha1": null, "md5": null, "sha256": null, - "sha512": "259c68b65ed2c40247d23edd378a71b1357a64b5e82dd18c13e3ec8e42ff0da06b56bc8af644c6ab4e867caaf07123aaca93fe7dd5c6a021c4dfa6fdf5f595a0", + "sha512": "c7e54beb06d3e094553e6ec41b15e167cc3c2d344e6b13d73aa8651b2552aefd2c0758e4c851a05f127c2d5a0f44bbcf47afc221918599fcea51ad8d61e32bd8", "bug_tracking_url": null, "code_view_url": null, "vcs_url": null, @@ -3685,9 +4433,13 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40napi-rs/zwitch@2.0.2" + "purl": "pkg:npm/react@18.0.0" }, - "extra_data": {} + "extra_data": { + "engines": { + "node": ">=0.10.0" + } + } } ], "repository_homepage_url": null, @@ -3698,65 +4450,7 @@ } ], "for_packages": [ - "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758" - ], - "scan_errors": [] - }, - { - "path": "cobe/pnpm-workspace.yaml", - "type": "file", - "package_data": [ - { - "type": "npm", - "namespace": null, - "name": null, - "version": null, - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": false, - "extra_data": { - "workspaces": [ - "website" - ] - }, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "pnpm_workspace_yaml", - "purl": null - } - ], - "for_packages": [ - "pkg:npm/cobe@0.6.3?uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:npm/cobe-site@1.0.0?uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] } diff --git a/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe/website/package.json b/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe/website/package.json new file mode 100644 index 00000000000..cff030e5354 --- /dev/null +++ b/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe/website/package.json @@ -0,0 +1,24 @@ +{ + "name": "cobe-site", + "version": "1.0.0", + "description": "", + "main": "theme.config.js", + "dependencies": { + "cobe": "workspace:*", + "leva": "^0.9.34", + "next": "^12.1.6-canary.6", + "nextra": "2.0.0-alpha.56", + "nextra-theme-docs": "2.0.0-alpha.59", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "react-spring": "^9.4.4" + }, + "scripts": { + "build": "next build", + "dev": "next dev", + "start": "next start" + }, + "author": "Shu Ding ", + "license": "MIT" + } + \ No newline at end of file diff --git a/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe/website/pnpm-lock.yaml b/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe/website/pnpm-lock.yaml new file mode 100644 index 00000000000..3e8b18f2780 --- /dev/null +++ b/tests/packagedcode/data/npm/pnpm/pnpm-lock/v5/cobe/website/pnpm-lock.yaml @@ -0,0 +1,26 @@ +lockfileVersion: 5.4 + +specifiers: + cobe: ^0.6.1 + nextra: 2.0.0-alpha.56 + react: ^18.0.0 + +dependencies: + cobe: 0.6.1 + nextra: 2.0.0-alpha.56_react@18.0.0 + react: 18.0.0 + +packages: + + /nextra/2.0.0-alpha.56_react@18.0.0: + resolution: {integrity: sha512-U6vFoUj4Oc+Px9WyNOUJWdta6j8B+dKtjbWvE1jCoz9wdAARtWxIZknIEMK62yt94zZeUjJg5KCzj1HBZc6UpQ==} + peerDependencies: + react: '>=16.13.1' + dependencies: + react: 18.0.0 + dev: false + + /react/18.0.0: + resolution: {integrity: sha512-x+VL6wbT4JRVPm7EGxXhZ8w8LTROaxPXOqhlGyVSrv0sB1jkyFGgXxJ8LVoPRLvPR6/CIZGFmfzqUa2NYeMr2A==} + engines: {node: '>=0.10.0'} + dev: false diff --git a/tests/packagedcode/data/npm/pnpm/shrinkwrap/v3/vuepack-shrinkwrap.yaml-expected b/tests/packagedcode/data/npm/pnpm/shrinkwrap/v3/vuepack-shrinkwrap.yaml-expected index f2a004405c3..f493133dbbf 100644 --- a/tests/packagedcode/data/npm/pnpm/shrinkwrap/v3/vuepack-shrinkwrap.yaml-expected +++ b/tests/packagedcode/data/npm/pnpm/shrinkwrap/v3/vuepack-shrinkwrap.yaml-expected @@ -832,7 +832,7 @@ "extra_data": {} }, { - "purl": "pkg:npm/%40babel/babel-template@6.26.0", + "purl": "pkg:npm/babel-template@6.26.0", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -841,7 +841,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@babel", + "namespace": null, "name": "babel-template", "version": "6.26.0", "qualifiers": {}, @@ -937,12 +937,12 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40babel/babel-template@6.26.0" + "purl": "pkg:npm/babel-template@6.26.0" }, "extra_data": {} }, { - "purl": "pkg:npm/%40babel/split2@2.2.0", + "purl": "pkg:npm/split2@2.2.0", "extracted_requirement": null, "scope": null, "is_runtime": false, @@ -951,7 +951,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@babel", + "namespace": null, "name": "split2", "version": "2.2.0", "qualifiers": {}, @@ -1003,12 +1003,12 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40babel/split2@2.2.0" + "purl": "pkg:npm/split2@2.2.0" }, "extra_data": {} }, { - "purl": "pkg:npm/%40babel/sprintf-js@1.0.3", + "purl": "pkg:npm/sprintf-js@1.0.3", "extracted_requirement": null, "scope": null, "is_runtime": false, @@ -1017,7 +1017,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@babel", + "namespace": null, "name": "sprintf-js", "version": "1.0.3", "qualifiers": {}, @@ -1057,12 +1057,12 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40babel/sprintf-js@1.0.3" + "purl": "pkg:npm/sprintf-js@1.0.3" }, "extra_data": {} }, { - "purl": "pkg:npm/%40babel/yargs@7.1.0", + "purl": "pkg:npm/yargs@7.1.0", "extracted_requirement": null, "scope": null, "is_runtime": true, @@ -1071,7 +1071,7 @@ "is_direct": true, "resolved_package": { "type": "npm", - "namespace": "@babel", + "namespace": null, "name": "yargs", "version": "7.1.0", "qualifiers": {}, @@ -1255,7 +1255,7 @@ "repository_download_url": null, "api_data_url": null, "datasource_id": "pnpm_lock_yaml", - "purl": "pkg:npm/%40babel/yargs@7.1.0" + "purl": "pkg:npm/yargs@7.1.0" }, "extra_data": {} }, diff --git a/tests/packagedcode/data/npm/workspace/change-case.expected.json b/tests/packagedcode/data/npm/workspace/change-case.expected.json new file mode 100644 index 00000000000..957fe4a185b --- /dev/null +++ b/tests/packagedcode/data/npm/workspace/change-case.expected.json @@ -0,0 +1,1229 @@ +{ + "packages": [ + { + "type": "npm", + "namespace": null, + "name": "change-case", + "version": "5.4.4", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": "Transform a string between `camelCase`, `PascalCase`, `Capital Case`, `snake_case`, `kebab-case`, `CONSTANT_CASE` and others", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + } + ], + "keywords": [ + "change", + "case", + "convert", + "transform", + "camel-case", + "pascal-case", + "param-case", + "kebab-case", + "header-case" + ], + "homepage_url": "https://github.com/blakeembrey/change-case/tree/master/packages/change-case#readme", + "download_url": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/blakeembrey/change-case/issues", + "code_view_url": null, + "vcs_url": "git://github.com/blakeembrey/change-case.git", + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "change-case/packages/change-case/package.json", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "- MIT\n", + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://www.npmjs.com/package/change-case", + "repository_download_url": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "api_data_url": "https://registry.npmjs.org/change-case/5.4.4", + "package_uid": "pkg:npm/change-case@5.4.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "change-case/packages/change-case/package.json" + ], + "datasource_ids": [ + "npm_package_json" + ], + "purl": "pkg:npm/change-case@5.4.4" + }, + { + "type": "npm", + "namespace": null, + "name": "sponge-case", + "version": "2.0.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": "Transform into a string with random capitalization applied", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Nate Rabins", + "email": "nrabins@gmail.com", + "url": "http://rabins.dev" + } + ], + "keywords": [ + "random", + "randomize", + "spongebob", + "mocking", + "capital", + "case", + "convert", + "transform", + "capitalize" + ], + "homepage_url": "https://github.com/blakeembrey/change-case/tree/master/packages/sponge-case#readme", + "download_url": "https://registry.npmjs.org/sponge-case/-/sponge-case-2.0.3.tgz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/blakeembrey/change-case/issues", + "code_view_url": null, + "vcs_url": "git://github.com/blakeembrey/change-case.git", + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "change-case/packages/sponge-case/package.json", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "- MIT\n", + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://www.npmjs.com/package/sponge-case", + "repository_download_url": "https://registry.npmjs.org/sponge-case/-/sponge-case-2.0.3.tgz", + "api_data_url": "https://registry.npmjs.org/sponge-case/2.0.3", + "package_uid": "pkg:npm/sponge-case@2.0.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "change-case/packages/sponge-case/package.json" + ], + "datasource_ids": [ + "npm_package_json" + ], + "purl": "pkg:npm/sponge-case@2.0.3" + }, + { + "type": "npm", + "namespace": null, + "name": "swap-case", + "version": "3.0.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": "Transform a string by swapping every character from upper to lower case, or lower to upper case", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + } + ], + "keywords": [ + "swap", + "case", + "invert", + "convert", + "transform", + "lower", + "upper" + ], + "homepage_url": "https://github.com/blakeembrey/change-case/tree/master/packages/swap-case#readme", + "download_url": "https://registry.npmjs.org/swap-case/-/swap-case-3.0.3.tgz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/blakeembrey/change-case/issues", + "code_view_url": null, + "vcs_url": "git://github.com/blakeembrey/change-case.git", + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "change-case/packages/swap-case/package.json", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "- MIT\n", + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://www.npmjs.com/package/swap-case", + "repository_download_url": "https://registry.npmjs.org/swap-case/-/swap-case-3.0.3.tgz", + "api_data_url": "https://registry.npmjs.org/swap-case/3.0.3", + "package_uid": "pkg:npm/swap-case@3.0.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "change-case/packages/swap-case/package.json" + ], + "datasource_ids": [ + "npm_package_json" + ], + "purl": "pkg:npm/swap-case@3.0.3" + }, + { + "type": "npm", + "namespace": null, + "name": "title-case", + "version": "4.3.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": "Transform a string into title case following English rules", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + } + ], + "keywords": [ + "title", + "case", + "english", + "capital", + "sentence", + "convert", + "transform" + ], + "homepage_url": "https://github.com/blakeembrey/change-case/tree/master/packages/title-case#readme", + "download_url": "https://registry.npmjs.org/title-case/-/title-case-4.3.1.tgz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/blakeembrey/change-case/issues", + "code_view_url": null, + "vcs_url": "git://github.com/blakeembrey/change-case.git", + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "change-case/packages/title-case/package.json", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "- MIT\n", + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://www.npmjs.com/package/title-case", + "repository_download_url": "https://registry.npmjs.org/title-case/-/title-case-4.3.1.tgz", + "api_data_url": "https://registry.npmjs.org/title-case/4.3.1", + "package_uid": "pkg:npm/title-case@4.3.1?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "change-case/packages/title-case/package.json" + ], + "datasource_ids": [ + "npm_package_json" + ], + "purl": "pkg:npm/title-case@4.3.1" + } + ], + "dependencies": [ + { + "purl": "pkg:npm/%40borderless/ts-scripts", + "extracted_requirement": "^0.15.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/%40borderless/ts-scripts?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "change-case/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/%40vitest/coverage-v8", + "extracted_requirement": "^1.0.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/%40vitest/coverage-v8?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "change-case/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "change-case/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/vitest", + "extracted_requirement": "^1.0.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/vitest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "change-case/package.json", + "datasource_id": "npm_package_json" + } + ], + "license_detections": [ + { + "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 4, + "reference_matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "change-case/packages/change-case/package.json", + "start_line": 24, + "end_line": 24, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_30.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE" + } + ] + }, + { + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 4, + "reference_matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "change-case/packages/change-case/package.json", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null + } + ] + }, + { + "identifier": "mit-d5ea549d-8e03-2a31-f0cc-bdb0a5b86996", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 2, + "reference_matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "change-case/LICENSE", + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 4, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_26.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_26.RULE" + } + ] + } + ], + "files": [ + { + "path": "change-case", + "type": "directory", + "package_data": [], + "for_packages": [], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "scan_errors": [] + }, + { + "path": "change-case/LICENSE", + "type": "file", + "package_data": [], + "for_packages": [ + "pkg:npm/change-case@5.4.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/sponge-case@2.0.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/swap-case@3.0.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/title-case@4.3.1?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": "mit", + "detected_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "change-case/LICENSE", + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 4, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_26.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_26.RULE" + } + ], + "identifier": "mit-d5ea549d-8e03-2a31-f0cc-bdb0a5b86996" + } + ], + "license_clues": [], + "percentage_of_license_text": 33.33, + "scan_errors": [] + }, + { + "path": "change-case/package.json", + "type": "file", + "package_data": [ + { + "type": "npm", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "change-case/LICENSE", + "start_line": 1, + "end_line": 1, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 4, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_26.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_26.RULE" + } + ], + "identifier": "mit-d5ea549d-8e03-2a31-f0cc-bdb0a5b86996" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": true, + "is_virtual": false, + "extra_data": { + "workspaces": [ + "packages/*" + ] + }, + "dependencies": [ + { + "purl": "pkg:npm/%40borderless/ts-scripts", + "extracted_requirement": "^0.15.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40vitest/coverage-v8", + "extracted_requirement": "^1.0.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/vitest", + "extracted_requirement": "^1.0.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "npm_package_json", + "purl": null + } + ], + "for_packages": [ + "pkg:npm/change-case@5.4.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/sponge-case@2.0.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/swap-case@3.0.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/title-case@4.3.1?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "scan_errors": [] + }, + { + "path": "change-case/packages", + "type": "directory", + "package_data": [], + "for_packages": [ + "pkg:npm/change-case@5.4.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/sponge-case@2.0.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/swap-case@3.0.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/title-case@4.3.1?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "scan_errors": [] + }, + { + "path": "change-case/packages/change-case", + "type": "directory", + "package_data": [], + "for_packages": [ + "pkg:npm/change-case@5.4.4?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "scan_errors": [] + }, + { + "path": "change-case/packages/change-case/package.json", + "type": "file", + "package_data": [ + { + "type": "npm", + "namespace": null, + "name": "change-case", + "version": "5.4.4", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": "Transform a string between `camelCase`, `PascalCase`, `Capital Case`, `snake_case`, `kebab-case`, `CONSTANT_CASE` and others", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + } + ], + "keywords": [ + "change", + "case", + "convert", + "transform", + "camel-case", + "pascal-case", + "param-case", + "kebab-case", + "header-case" + ], + "homepage_url": "https://github.com/blakeembrey/change-case/tree/master/packages/change-case#readme", + "download_url": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/blakeembrey/change-case/issues", + "code_view_url": null, + "vcs_url": "git://github.com/blakeembrey/change-case.git", + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "change-case/packages/change-case/package.json", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "- MIT\n", + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://www.npmjs.com/package/change-case", + "repository_download_url": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "api_data_url": "https://registry.npmjs.org/change-case/5.4.4", + "datasource_id": "npm_package_json", + "purl": "pkg:npm/change-case@5.4.4" + } + ], + "for_packages": [ + "pkg:npm/change-case@5.4.4?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": "mit", + "detected_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "change-case/packages/change-case/package.json", + "start_line": 24, + "end_line": 24, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_30.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE" + } + ], + "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee" + } + ], + "license_clues": [], + "percentage_of_license_text": 1.5, + "scan_errors": [] + }, + { + "path": "change-case/packages/sponge-case", + "type": "directory", + "package_data": [], + "for_packages": [ + "pkg:npm/sponge-case@2.0.3?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "scan_errors": [] + }, + { + "path": "change-case/packages/sponge-case/package.json", + "type": "file", + "package_data": [ + { + "type": "npm", + "namespace": null, + "name": "sponge-case", + "version": "2.0.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": "Transform into a string with random capitalization applied", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Nate Rabins", + "email": "nrabins@gmail.com", + "url": "http://rabins.dev" + } + ], + "keywords": [ + "random", + "randomize", + "spongebob", + "mocking", + "capital", + "case", + "convert", + "transform", + "capitalize" + ], + "homepage_url": "https://github.com/blakeembrey/change-case/tree/master/packages/sponge-case#readme", + "download_url": "https://registry.npmjs.org/sponge-case/-/sponge-case-2.0.3.tgz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/blakeembrey/change-case/issues", + "code_view_url": null, + "vcs_url": "git://github.com/blakeembrey/change-case.git", + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "change-case/packages/sponge-case/package.json", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "- MIT\n", + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://www.npmjs.com/package/sponge-case", + "repository_download_url": "https://registry.npmjs.org/sponge-case/-/sponge-case-2.0.3.tgz", + "api_data_url": "https://registry.npmjs.org/sponge-case/2.0.3", + "datasource_id": "npm_package_json", + "purl": "pkg:npm/sponge-case@2.0.3" + } + ], + "for_packages": [ + "pkg:npm/sponge-case@2.0.3?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": "mit", + "detected_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "change-case/packages/sponge-case/package.json", + "start_line": 24, + "end_line": 24, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_30.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE" + } + ], + "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee" + } + ], + "license_clues": [], + "percentage_of_license_text": 1.72, + "scan_errors": [] + }, + { + "path": "change-case/packages/swap-case", + "type": "directory", + "package_data": [], + "for_packages": [ + "pkg:npm/swap-case@3.0.3?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "scan_errors": [] + }, + { + "path": "change-case/packages/swap-case/package.json", + "type": "file", + "package_data": [ + { + "type": "npm", + "namespace": null, + "name": "swap-case", + "version": "3.0.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": "Transform a string by swapping every character from upper to lower case, or lower to upper case", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + } + ], + "keywords": [ + "swap", + "case", + "invert", + "convert", + "transform", + "lower", + "upper" + ], + "homepage_url": "https://github.com/blakeembrey/change-case/tree/master/packages/swap-case#readme", + "download_url": "https://registry.npmjs.org/swap-case/-/swap-case-3.0.3.tgz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/blakeembrey/change-case/issues", + "code_view_url": null, + "vcs_url": "git://github.com/blakeembrey/change-case.git", + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "change-case/packages/swap-case/package.json", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "- MIT\n", + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://www.npmjs.com/package/swap-case", + "repository_download_url": "https://registry.npmjs.org/swap-case/-/swap-case-3.0.3.tgz", + "api_data_url": "https://registry.npmjs.org/swap-case/3.0.3", + "datasource_id": "npm_package_json", + "purl": "pkg:npm/swap-case@3.0.3" + } + ], + "for_packages": [ + "pkg:npm/swap-case@3.0.3?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": "mit", + "detected_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "change-case/packages/swap-case/package.json", + "start_line": 22, + "end_line": 22, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_30.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE" + } + ], + "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee" + } + ], + "license_clues": [], + "percentage_of_license_text": 1.63, + "scan_errors": [] + }, + { + "path": "change-case/packages/title-case", + "type": "directory", + "package_data": [], + "for_packages": [ + "pkg:npm/title-case@4.3.1?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "scan_errors": [] + }, + { + "path": "change-case/packages/title-case/package.json", + "type": "file", + "package_data": [ + { + "type": "npm", + "namespace": null, + "name": "title-case", + "version": "4.3.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": "Transform a string into title case following English rules", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + } + ], + "keywords": [ + "title", + "case", + "english", + "capital", + "sentence", + "convert", + "transform" + ], + "homepage_url": "https://github.com/blakeembrey/change-case/tree/master/packages/title-case#readme", + "download_url": "https://registry.npmjs.org/title-case/-/title-case-4.3.1.tgz", + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": "https://github.com/blakeembrey/change-case/issues", + "code_view_url": null, + "vcs_url": "git://github.com/blakeembrey/change-case.git", + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "change-case/packages/title-case/package.json", + "start_line": 1, + "end_line": 1, + "matcher": "1-spdx-id", + "score": 100.0, + "matched_length": 1, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "spdx-license-identifier-mit-5da48780aba670b0860c46d899ed42a0f243ff06", + "rule_url": null, + "matched_text": "MIT" + } + ], + "identifier": "mit-a822f434-d61f-f2b1-c792-8b8cb9e7b9bf" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "- MIT\n", + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://www.npmjs.com/package/title-case", + "repository_download_url": "https://registry.npmjs.org/title-case/-/title-case-4.3.1.tgz", + "api_data_url": "https://registry.npmjs.org/title-case/4.3.1", + "datasource_id": "npm_package_json", + "purl": "pkg:npm/title-case@4.3.1" + } + ], + "for_packages": [ + "pkg:npm/title-case@4.3.1?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "detected_license_expression": "mit", + "detected_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "change-case/packages/title-case/package.json", + "start_line": 22, + "end_line": 22, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_30.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_30.RULE" + } + ], + "identifier": "mit-3fce6ea2-8abd-6c6b-3ede-a37af7c6efee" + } + ], + "license_clues": [], + "percentage_of_license_text": 1.74, + "scan_errors": [] + } + ] +} \ No newline at end of file diff --git a/tests/packagedcode/data/npm/workspace/change-case/LICENSE b/tests/packagedcode/data/npm/workspace/change-case/LICENSE new file mode 100644 index 00000000000..c51aa3a85a6 --- /dev/null +++ b/tests/packagedcode/data/npm/workspace/change-case/LICENSE @@ -0,0 +1,3 @@ +The MIT License (MIT) + +Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) diff --git a/tests/packagedcode/data/npm/workspace/change-case/package.json b/tests/packagedcode/data/npm/workspace/change-case/package.json new file mode 100644 index 00000000000..9e0857b284b --- /dev/null +++ b/tests/packagedcode/data/npm/workspace/change-case/package.json @@ -0,0 +1,15 @@ +{ + "private": true, + "workspaces": [ + "packages/*" + ], + "scripts": { + "prepare": "ts-scripts install" + }, + "devDependencies": { + "@borderless/ts-scripts": "^0.15.0", + "@vitest/coverage-v8": "^1.0.1", + "typescript": "^5.2.2", + "vitest": "^1.0.1" + } +} diff --git a/tests/packagedcode/data/npm/workspace/change-case/packages/change-case/package.json b/tests/packagedcode/data/npm/workspace/change-case/packages/change-case/package.json new file mode 100644 index 00000000000..38588b70c56 --- /dev/null +++ b/tests/packagedcode/data/npm/workspace/change-case/packages/change-case/package.json @@ -0,0 +1,51 @@ +{ + "name": "change-case", + "version": "5.4.4", + "description": "Transform a string between `camelCase`, `PascalCase`, `Capital Case`, `snake_case`, `kebab-case`, `CONSTANT_CASE` and others", + "keywords": [ + "change", + "case", + "convert", + "transform", + "camel-case", + "pascal-case", + "param-case", + "kebab-case", + "header-case" + ], + "homepage": "https://github.com/blakeembrey/change-case/tree/master/packages/change-case#readme", + "bugs": { + "url": "https://github.com/blakeembrey/change-case/issues" + }, + "repository": { + "type": "git", + "url": "git://github.com/blakeembrey/change-case.git" + }, + "license": "MIT", + "author": { + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + }, + "type": "module", + "exports": { + ".": "./dist/index.js", + "./keys": "./dist/keys.js" + }, + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist/" + ], + "scripts": { + "bench": "vitest bench", + "build": "ts-scripts build", + "format": "ts-scripts format", + "prepublishOnly": "npm run build", + "specs": "ts-scripts specs", + "test": "ts-scripts test" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/tests/packagedcode/data/npm/workspace/change-case/packages/sponge-case/package.json b/tests/packagedcode/data/npm/workspace/change-case/packages/sponge-case/package.json new file mode 100644 index 00000000000..2cb47f1a489 --- /dev/null +++ b/tests/packagedcode/data/npm/workspace/change-case/packages/sponge-case/package.json @@ -0,0 +1,50 @@ +{ + "name": "sponge-case", + "version": "2.0.3", + "description": "Transform into a string with random capitalization applied", + "keywords": [ + "random", + "randomize", + "spongebob", + "mocking", + "capital", + "case", + "convert", + "transform", + "capitalize" + ], + "homepage": "https://github.com/blakeembrey/change-case/tree/master/packages/sponge-case#readme", + "bugs": { + "url": "https://github.com/blakeembrey/change-case/issues" + }, + "repository": { + "type": "git", + "url": "git://github.com/blakeembrey/change-case.git" + }, + "license": "MIT", + "author": { + "name": "Nate Rabins", + "email": "nrabins@gmail.com", + "url": "http://rabins.dev" + }, + "type": "module", + "exports": { + ".": "./dist/index.js" + }, + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist/" + ], + "scripts": { + "bench": "vitest bench", + "build": "ts-scripts build", + "format": "ts-scripts format", + "prepublishOnly": "npm run build", + "specs": "ts-scripts specs", + "test": "ts-scripts test" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/tests/packagedcode/data/npm/workspace/change-case/packages/swap-case/package.json b/tests/packagedcode/data/npm/workspace/change-case/packages/swap-case/package.json new file mode 100644 index 00000000000..91697e54bc3 --- /dev/null +++ b/tests/packagedcode/data/npm/workspace/change-case/packages/swap-case/package.json @@ -0,0 +1,48 @@ +{ + "name": "swap-case", + "version": "3.0.3", + "description": "Transform a string by swapping every character from upper to lower case, or lower to upper case", + "keywords": [ + "swap", + "case", + "invert", + "convert", + "transform", + "lower", + "upper" + ], + "homepage": "https://github.com/blakeembrey/change-case/tree/master/packages/swap-case#readme", + "bugs": { + "url": "https://github.com/blakeembrey/change-case/issues" + }, + "repository": { + "type": "git", + "url": "git://github.com/blakeembrey/change-case.git" + }, + "license": "MIT", + "author": { + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + }, + "type": "module", + "exports": { + ".": "./dist/index.js" + }, + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist/" + ], + "scripts": { + "bench": "vitest bench", + "build": "ts-scripts build", + "format": "ts-scripts format", + "prepublishOnly": "npm run build", + "specs": "ts-scripts specs", + "test": "ts-scripts test" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/tests/packagedcode/data/npm/workspace/change-case/packages/title-case/package.json b/tests/packagedcode/data/npm/workspace/change-case/packages/title-case/package.json new file mode 100644 index 00000000000..53ee8a7a966 --- /dev/null +++ b/tests/packagedcode/data/npm/workspace/change-case/packages/title-case/package.json @@ -0,0 +1,48 @@ +{ + "name": "title-case", + "version": "4.3.1", + "description": "Transform a string into title case following English rules", + "keywords": [ + "title", + "case", + "english", + "capital", + "sentence", + "convert", + "transform" + ], + "homepage": "https://github.com/blakeembrey/change-case/tree/master/packages/title-case#readme", + "bugs": { + "url": "https://github.com/blakeembrey/change-case/issues" + }, + "repository": { + "type": "git", + "url": "git://github.com/blakeembrey/change-case.git" + }, + "license": "MIT", + "author": { + "name": "Blake Embrey", + "email": "hello@blakeembrey.com", + "url": "http://blakeembrey.me" + }, + "type": "module", + "exports": { + ".": "./dist/index.js" + }, + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "dist/" + ], + "scripts": { + "bench": "vitest bench", + "build": "ts-scripts build", + "format": "ts-scripts format", + "prepublishOnly": "npm run build", + "specs": "ts-scripts specs", + "test": "ts-scripts test" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/tests/packagedcode/data/npm/workspace/crystal.expected.json b/tests/packagedcode/data/npm/workspace/crystal.expected.json index c44ba3762a1..584b00b9423 100644 --- a/tests/packagedcode/data/npm/workspace/crystal.expected.json +++ b/tests/packagedcode/data/npm/workspace/crystal.expected.json @@ -2490,8 +2490,8 @@ ], "dependencies": [ { - "purl": "pkg:npm/%40changesets/changelog-github", - "extracted_requirement": "^0.4.8", + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -2499,14 +2499,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40changesets/changelog-github?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/bench/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40changesets/cli", - "extracted_requirement": "^2.26.2", + "purl": "pkg:npm/graphile-config", + "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -2514,44 +2514,44 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40changesets/cli?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/bench/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/cli", - "extracted_requirement": "^7.22.10", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/cli?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/bench/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/core", - "extracted_requirement": "^7.22.11", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/core?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/bench/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/eslint-parser", - "extracted_requirement": "^7.22.11", + "purl": "pkg:npm/%40types/glob", + "extracted_requirement": "^8.1.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2559,14 +2559,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/eslint-parser?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/%40types/glob?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/bench/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/plugin-syntax-object-rest-spread", - "extracted_requirement": "^7.8.3", + "purl": "pkg:npm/glob", + "extracted_requirement": "^10.3.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2574,14 +2574,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/plugin-syntax-object-rest-spread?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/glob?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/bench/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/plugin-transform-modules-commonjs", - "extracted_requirement": "^7.22.11", + "purl": "pkg:npm/nodemon", + "extracted_requirement": "^3.0.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2589,14 +2589,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/plugin-transform-modules-commonjs?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/bench/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/plugin-transform-runtime", - "extracted_requirement": "^7.22.10", + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2604,14 +2604,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/plugin-transform-runtime?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/bench/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/preset-env", - "extracted_requirement": "^7.22.14", + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2619,44 +2619,44 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/preset-env?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/bench/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/preset-react", - "extracted_requirement": "^7.22.5", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/chalk", + "extracted_requirement": "^4.1.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/preset-react?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/chalk?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-json/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/preset-typescript", - "extracted_requirement": "^7.22.11", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/preset-typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-json/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40knodes/typedoc-plugin-monorepo-readmes", - "extracted_requirement": "^0.23.1", + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2664,14 +2664,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40knodes/typedoc-plugin-monorepo-readmes?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-json/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40knodes/typedoc-plugin-pages", - "extracted_requirement": "^0.23.4", + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2679,14 +2679,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40knodes/typedoc-plugin-pages?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-json/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40localrepo/prettier2-for-jest", - "extracted_requirement": "npm:prettier@^2", + "purl": "pkg:npm/jest-serializer-simple", + "extracted_requirement": "workspace:^", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2694,14 +2694,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40localrepo/prettier2-for-jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/jest-serializer-simple?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-json/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40tsconfig/node16", - "extracted_requirement": "^16.1.1", + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2709,164 +2709,164 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40tsconfig/node16?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-json/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-json/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/mock-fs", - "extracted_requirement": "4.13.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40graphile/lru", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/mock-fs?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { "purl": "pkg:npm/%40types/node", "extracted_requirement": "^20.5.7", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/rimraf", - "extracted_requirement": "^4.0.5", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/chalk", + "extracted_requirement": "^4.1.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/rimraf?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/chalk?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40typescript-eslint/eslint-plugin", - "extracted_requirement": "^6.5.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/debug", + "extracted_requirement": "^4.3.4", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40typescript-eslint/eslint-plugin?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40typescript-eslint/parser", - "extracted_requirement": "^6.5.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/eventemitter3", + "extracted_requirement": "^5.0.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40typescript-eslint/parser?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/eventemitter3?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40typescript-eslint/typescript-estree", - "extracted_requirement": "^6.5.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/pg-sql2", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40typescript-eslint/typescript-estree?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/babel-jest", - "extracted_requirement": "^29.6.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/postgres-array", + "extracted_requirement": "~3.0.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/babel-jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/postgres-array?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/babel-plugin-transform-import-meta", - "extracted_requirement": "^2.2.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/postgres-range", + "extracted_requirement": "^1.1.3", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/babel-plugin-transform-import-meta?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/postgres-range?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/concurrently", - "extracted_requirement": "^8.2.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/concurrently?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eslint", - "extracted_requirement": "^8.48.0", + "purl": "pkg:npm/%40mermaid-js/mermaid-cli", + "extracted_requirement": "^9.0.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2874,14 +2874,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eslint?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/%40mermaid-js/mermaid-cli?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eslint-config-prettier", - "extracted_requirement": "^9.0.0", + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2889,14 +2889,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eslint-config-prettier?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eslint-plugin-graphql", - "extracted_requirement": "^4.0.0", + "purl": "pkg:npm/%40types/json5", + "extracted_requirement": "^2.2.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2904,14 +2904,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eslint-plugin-graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/%40types/json5?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eslint-plugin-import", - "extracted_requirement": "^2.28.1", + "purl": "pkg:npm/%40types/license-checker-webpack-plugin", + "extracted_requirement": "^0.2.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2919,14 +2919,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eslint-plugin-import?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/%40types/license-checker-webpack-plugin?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eslint-plugin-jest", - "extracted_requirement": "^27.2.3", + "purl": "pkg:npm/%40types/nodemon", + "extracted_requirement": "1.19.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2934,14 +2934,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eslint-plugin-jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/%40types/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eslint-plugin-jsx-a11y", - "extracted_requirement": "^6.7.1", + "purl": "pkg:npm/eventemitter3", + "extracted_requirement": "^5.0.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2949,14 +2949,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eslint-plugin-jsx-a11y?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/eventemitter3?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eslint-plugin-react", - "extracted_requirement": "^7.33.2", + "purl": "pkg:npm/glob", + "extracted_requirement": "^10.3.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2964,14 +2964,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eslint-plugin-react?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/glob?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eslint-plugin-react-hooks", - "extracted_requirement": "^4.6.0", + "purl": "pkg:npm/grafserv", + "extracted_requirement": "workspace:*", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2979,14 +2979,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eslint-plugin-react-hooks?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/grafserv?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eslint-plugin-simple-import-sort", - "extracted_requirement": "^10.0.0", + "purl": "pkg:npm/graphile-export", + "extracted_requirement": "workspace:*", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -2994,14 +2994,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eslint-plugin-simple-import-sort?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/graphile-export?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eslint-plugin-tsdoc", - "extracted_requirement": "^0.2.17", + "purl": "pkg:npm/graphql", + "extracted_requirement": "16.1.0-experimental-stream-defer.6", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -3009,14 +3009,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eslint-plugin-tsdoc?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eslint_d", - "extracted_requirement": "^12.2.1", + "purl": "pkg:npm/iterall", + "extracted_requirement": "^1.3.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -3024,14 +3024,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eslint_d?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/iterall?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/glob", - "extracted_requirement": "^10.3.4", + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -3039,14 +3039,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/glob?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "16.1.0-experimental-stream-defer.6", + "purl": "pkg:npm/jest-serializer-simple", + "extracted_requirement": "5.0.0-beta.3:^", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -3054,14 +3054,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/jest-serializer-simple?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", + "purl": "pkg:npm/json5", + "extracted_requirement": "^2.2.3", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -3069,14 +3069,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/json5?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/mock-fs", - "extracted_requirement": "^5.2.0", + "purl": "pkg:npm/license-checker-webpack-plugin", + "extracted_requirement": "^0.2.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -3084,14 +3084,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/mock-fs?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/license-checker-webpack-plugin?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg", - "extracted_requirement": "^8.11.3", + "purl": "pkg:npm/nodemon", + "extracted_requirement": "^3.0.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -3099,14 +3099,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/prettier", - "extracted_requirement": "^3.0.3", + "purl": "pkg:npm/terser-webpack-plugin", + "extracted_requirement": "^5.3.9", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -3114,14 +3114,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/prettier?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/terser-webpack-plugin?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/rimraf", - "extracted_requirement": "^5.0.1", + "purl": "pkg:npm/ts-loader", + "extracted_requirement": "^9.4.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -3129,14 +3129,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/rimraf?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/ts-loader?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typedoc", - "extracted_requirement": "^0.25.0", + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -3144,14 +3144,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typedoc?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typedoc-monorepo-link-types", - "extracted_requirement": "^0.0.4", + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -3159,14 +3159,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typedoc-monorepo-link-types?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", + "purl": "pkg:npm/webpack", + "extracted_requirement": "^5.88.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -3174,14 +3174,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/webpack?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/webpack", - "extracted_requirement": "^5.88.2", + "purl": "pkg:npm/webpack-cli", + "extracted_requirement": "^5.1.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -3189,9 +3189,24 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/webpack?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/webpack-cli?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/webpack-node-externals", + "extracted_requirement": "^3.0.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/webpack-node-externals?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { @@ -3205,3083 +3220,373 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/zx?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "16.1.0-experimental-stream-defer.6", - "scope": "resolutions", + "purl": "pkg:npm/%40dataplan/json", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, - "is_resolved": true, + "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/package.json", + "dependency_uid": "pkg:npm/%40dataplan/json?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40aashutoshrathi/word-wrap@1.2.6", - "extracted_requirement": "1.2.6", - "scope": "dependencies", + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, - "is_resolved": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "@aashutoshrathi", - "name": "word-wrap", - "version": "1.2.6", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/%40aashutoshrathi/word-wrap@1.2.6" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40aashutoshrathi/word-wrap@1.2.6?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40algolia/autocomplete-core@1.9.3", - "extracted_requirement": "1.9.3", - "scope": "dependencies", + "purl": "pkg:npm/graphile-config", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, - "is_resolved": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "@algolia", - "name": "autocomplete-core", - "version": "1.9.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40algolia/autocomplete-plugin-algolia-insights", - "extracted_requirement": "npm:1.9.3", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40algolia/autocomplete-shared", - "extracted_requirement": "npm:1.9.3", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/%40algolia/autocomplete-core@1.9.3" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40algolia/autocomplete-core@1.9.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40algolia/autocomplete-plugin-algolia-insights@1.9.3", - "extracted_requirement": "1.9.3", + "purl": "pkg:npm/pg", + "extracted_requirement": "^8.7.1", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/pg-sql2", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/%40graphile/lru", + "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "@algolia", - "name": "autocomplete-plugin-algolia-insights", - "version": "1.9.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40algolia/autocomplete-shared", - "extracted_requirement": "npm:1.9.3", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/search-insights", - "extracted_requirement": ">= 1 < 3", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/%40algolia/autocomplete-plugin-algolia-insights@1.9.3" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40algolia/autocomplete-plugin-algolia-insights@1.9.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/cli@7.22.10", - "extracted_requirement": "7.22.10", + "purl": "pkg:npm/chalk", + "extracted_requirement": "^4.1.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "@babel", - "name": "cli", - "version": "7.22.10", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40jridgewell/trace-mapping", - "extracted_requirement": "npm:^0.3.17", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40nicolo-ribaudo/chokidar-2", - "extracted_requirement": "npm:2.1.8-no-fsevents.3", - "scope": "dependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/chokidar", - "extracted_requirement": "npm:^3.4.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/commander", - "extracted_requirement": "npm:^4.0.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/convert-source-map", - "extracted_requirement": "npm:^1.1.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/fs-readdir-recursive", - "extracted_requirement": "npm:^1.1.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/glob", - "extracted_requirement": "npm:^7.2.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/make-dir", - "extracted_requirement": "npm:^2.1.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/slash", - "extracted_requirement": "npm:^2.0.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40babel/core", - "extracted_requirement": "^7.0.0-0", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/%40babel/cli@7.22.10" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/cli@7.22.10?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/chalk?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40graphql-tools/utils@7.10.0", - "extracted_requirement": "7.10.0", + "purl": "pkg:npm/debug", + "extracted_requirement": "^4.3.4", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "@graphql-tools", - "name": "utils", - "version": "7.10.0", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40ardatan/aggregate-error", - "extracted_requirement": "npm:0.0.6", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/camel-case", - "extracted_requirement": "npm:4.1.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/tslib", - "extracted_requirement": "npm:~2.2.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^14.0.0 || ^15.0.0", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/%40graphql-tools/utils@7.10.0" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40graphql-tools/utils@7.10.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40graphql-tools/utils@9.2.1", - "extracted_requirement": "9.2.1", + "purl": "pkg:npm/eventemitter3", + "extracted_requirement": "^5.0.1", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "@graphql-tools", - "name": "utils", - "version": "9.2.1", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40graphql-typed-document-node/core", - "extracted_requirement": "npm:^3.1.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/tslib", - "extracted_requirement": "npm:^2.4.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/%40graphql-tools/utils@9.2.1" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40graphql-tools/utils@9.2.1?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/eventemitter3?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40graphql-tools/wrap@7.0.8", - "extracted_requirement": "7.0.8", + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "@graphql-tools", - "name": "wrap", - "version": "7.0.8", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40graphql-tools/delegate", - "extracted_requirement": "npm:^7.1.5", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40graphql-tools/schema", - "extracted_requirement": "npm:^7.1.5", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40graphql-tools/utils", - "extracted_requirement": "npm:^7.8.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/tslib", - "extracted_requirement": "npm:~2.2.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/value-or-promise", - "extracted_requirement": "npm:1.0.6", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^14.0.0 || ^15.0.0", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/%40graphql-tools/wrap@7.0.8" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40graphql-tools/wrap@7.0.8?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-build-pg@workspace:graphile-build/graphile-build-pg", - "extracted_requirement": "workspace:graphile-build/graphile-build-pg", + "purl": "pkg:npm/iterall", + "extracted_requirement": "^1.3.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "", - "name": "graphile-build-pg", - "version": "workspace:graphile-build/graphile-build-pg", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40envelop/core", - "extracted_requirement": "npm:^5.0.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40envelop/parser-cache", - "extracted_requirement": "npm:^7.0.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40envelop/validation-cache", - "extracted_requirement": "npm:^7.0.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/debug", - "extracted_requirement": "npm:^4.1.8", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/express", - "extracted_requirement": "npm:^4.17.17", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "npm:^29.5.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/jsonwebtoken", - "extracted_requirement": "npm:^9.0.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "npm:^20.5.7", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/chalk", - "extracted_requirement": "npm:^4.1.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/debug", - "extracted_requirement": "npm:^4.3.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/express", - "extracted_requirement": "npm:^4.19.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/express-graphql", - "extracted_requirement": "npm:^0.12.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/fastify", - "extracted_requirement": "npm:^4.22.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/fastify-static", - "extracted_requirement": "npm:^4.7.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphile-export", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphql-helix", - "extracted_requirement": "npm:^1.13.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphql-ws", - "extracted_requirement": "npm:^5.14.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/jest", - "extracted_requirement": "npm:^29.6.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/jsonwebtoken", - "extracted_requirement": "npm:^9.0.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/pg", - "extracted_requirement": "^8.7.1", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/pg-introspection", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/ruru", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "npm:^10.9.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/tslib", - "extracted_requirement": "npm:^2.6.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/typescript", - "extracted_requirement": "npm:^5.2.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/ws", - "extracted_requirement": "npm:^8.13.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40dataplan/pg", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/grafast", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphile-build", - "extracted_requirement": "workspace:*", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/pg-sql2", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/tamedevil", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/graphile-build-pg@workspace:graphile-build/graphile-build-pg" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-build-pg@workspace:graphile-build/graphile-build-pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/iterall?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-build@workspace:graphile-build/graphile-build", - "extracted_requirement": "workspace:graphile-build/graphile-build", + "purl": "pkg:npm/tamedevil", + "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "", - "name": "graphile-build", - "version": "workspace:graphile-build/graphile-build", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40types/debug", - "extracted_requirement": "npm:^4.1.8", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "npm:^29.5.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "npm:^20.5.7", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/pluralize", - "extracted_requirement": "npm:^0.0.30", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/semver", - "extracted_requirement": "npm:^7.5.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/chalk", - "extracted_requirement": "npm:^4.1.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/debug", - "extracted_requirement": "npm:^4.3.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphile-export", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/jest", - "extracted_requirement": "npm:^29.6.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/lodash", - "extracted_requirement": "npm:^4.17.21", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/pluralize", - "extracted_requirement": "npm:^7.0.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/semver", - "extracted_requirement": "npm:^7.5.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/tamedevil", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "npm:^10.9.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/tslib", - "extracted_requirement": "npm:^2.6.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/typescript", - "extracted_requirement": "npm:^5.2.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/grafast", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/graphile-build@workspace:graphile-build/graphile-build" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-build@workspace:graphile-build/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-export@workspace:utils/graphile-export", - "extracted_requirement": "workspace:utils/graphile-export", + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "", - "name": "graphile-export", - "version": "workspace:utils/graphile-export", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40babel/generator", - "extracted_requirement": "npm:^7.22.10", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40babel/parser", - "extracted_requirement": "npm:^7.22.14", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40babel/template", - "extracted_requirement": "npm:^7.22.5", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40babel/traverse", - "extracted_requirement": "npm:^7.23.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40babel/types", - "extracted_requirement": "npm:^7.22.11", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/babel__generator", - "extracted_requirement": "npm:^7.6.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/babel__template", - "extracted_requirement": "npm:^7.4.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "npm:^29.5.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "npm:^20.5.7", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/prettier", - "extracted_requirement": "npm:^3.0.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/jest", - "extracted_requirement": "npm:^29.6.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/prettier", - "extracted_requirement": "npm:^3.0.3", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "npm:^10.9.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/tslib", - "extracted_requirement": "npm:^2.6.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/typescript", - "extracted_requirement": "npm:^5.2.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/eslint", - "extracted_requirement": "^8.48.0", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/grafast", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/pg-sql2", - "extracted_requirement": "workspace:^5.0.0-beta.6", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/graphile-export@workspace:utils/graphile-export" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-export@workspace:utils/graphile-export?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-utils@workspace:graphile-build/graphile-utils", - "extracted_requirement": "workspace:graphile-build/graphile-utils", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": true, + "purl": "pkg:npm/%40types/chai", + "extracted_requirement": "^4.3.5", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "", - "name": "graphile-utils", - "version": "workspace:graphile-build/graphile-utils", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/debug", - "extracted_requirement": "npm:^4.3.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphile-build", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphile-build-pg", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/jest", - "extracted_requirement": "npm:^29.6.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/jest-serializer-graphql-schema", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/json5", - "extracted_requirement": "npm:^2.2.3", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/nodemon", - "extracted_requirement": "npm:^3.0.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/postgraphile", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "npm:^10.9.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/tslib", - "extracted_requirement": "npm:^2.6.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/typescript", - "extracted_requirement": "npm:^5.2.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40dataplan/pg", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/grafast", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/tamedevil", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/graphile-utils@workspace:graphile-build/graphile-utils" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-utils@workspace:graphile-build/graphile-utils?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/%40types/chai?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile@workspace:utils/graphile", - "extracted_requirement": "workspace:utils/graphile", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": true, + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "", - "name": "graphile", - "version": "workspace:utils/graphile", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "npm:^29.5.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "npm:^20.5.7", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40typescript/vfs", - "extracted_requirement": "npm:^1.5.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/chalk", - "extracted_requirement": "npm:^4.1.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/jest", - "extracted_requirement": "npm:^29.6.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "npm:^10.9.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/tslib", - "extracted_requirement": "npm:^2.6.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/typescript", - "extracted_requirement": "npm:^5.2.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphile-build", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/postgraphile", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/graphile@workspace:utils/graphile" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile@workspace:utils/graphile?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest-haste-map@29.6.4", - "extracted_requirement": "29.6.4", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": true, + "purl": "pkg:npm/%40types/lodash", + "extracted_requirement": "^4.14.197", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "", - "name": "jest-haste-map", - "version": "29.6.4", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40jest/types", - "extracted_requirement": "npm:^29.6.3", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/graceful-fs", - "extracted_requirement": "npm:^4.1.3", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "npm:*", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/anymatch", - "extracted_requirement": "npm:^3.0.3", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/fb-watchman", - "extracted_requirement": "npm:^2.0.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/fsevents", - "extracted_requirement": "npm:^2.3.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graceful-fs", - "extracted_requirement": "npm:^4.2.9", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/jest-regex-util", - "extracted_requirement": "npm:^29.6.3", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/jest-util", - "extracted_requirement": "npm:^29.6.3", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/jest-worker", - "extracted_requirement": "npm:^29.6.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/micromatch", - "extracted_requirement": "npm:^4.0.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/walker", - "extracted_requirement": "npm:^1.0.8", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/jest-haste-map@29.6.4" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest-haste-map@29.6.4?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/%40types/lodash?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ruru-components@workspace:grafast/ruru-components", - "extracted_requirement": "workspace:grafast/ruru-components", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": true, + "purl": "pkg:npm/%40types/mermaid", + "extracted_requirement": "^9.2.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "", - "name": "ruru-components", - "version": "workspace:grafast/ruru-components", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40graphiql/plugin-explorer", - "extracted_requirement": "npm:^1.0.3-canary-64994e0e.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40graphiql/react", - "extracted_requirement": "npm:^0.20.3-canary-64994e0e.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40graphiql/toolkit", - "extracted_requirement": "npm:^0.9.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/codemirror", - "extracted_requirement": "npm:^5.60.9", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/debug", - "extracted_requirement": "npm:^4.1.8", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "npm:^29.5.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "npm:^20.5.7", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/nodemon", - "extracted_requirement": "npm:1.19.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/react", - "extracted_requirement": "npm:^18.2.21", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/react-dom", - "extracted_requirement": "npm:^18.2.7", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/grafast", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphiql", - "extracted_requirement": "npm:^3.1.1-canary-64994e0e.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/graphql-ws", - "extracted_requirement": "npm:^5.14.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/jest", - "extracted_requirement": "npm:^29.6.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/nodemon", - "extracted_requirement": "npm:^3.0.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/react", - "extracted_requirement": "npm:^18.2.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/react-dom", - "extracted_requirement": "npm:^18.2.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/tslib", - "extracted_requirement": "npm:^2.6.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/typescript", - "extracted_requirement": "npm:^5.2.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/tamedevil", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/ruru-components@workspace:grafast/ruru-components" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ruru-components@workspace:grafast/ruru-components?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/%40types/mermaid?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript@5.2.2", - "extracted_requirement": "5.2.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": true, + "purl": "pkg:npm/%40types/mocha", + "extracted_requirement": "^10.0.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "", - "name": "typescript", - "version": "5.2.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/typescript@5.2.2" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript@5.2.2?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/%40types/mocha?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript%40patch:typescript@npm%253A5.2.2%23optional%21builtin%3Ccompat/typescript%3E::version%3D5.2.2%26hash%3Dad5954", - "extracted_requirement": "npm%3A5.2.2#optional!builtin::version=5.2.2&hash=ad5954", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": true, + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "^20.5.7", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "", - "name": "typescript@patch:typescript", - "version": "npm%3A5.2.2#optional!builtin::version=5.2.2&hash=ad5954", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/typescript%40patch:typescript@npm%253A5.2.2%23optional%21builtin%3Ccompat/typescript%3E::version%3D5.2.2%26hash%3Dad5954" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript%40patch:typescript@npm%253A5.2.2%23optional%21builtin%3Ccompat/typescript%3E::version%3D5.2.2%26hash%3Dad5954?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/use-sidecar@1.1.2", - "extracted_requirement": "1.1.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": true, + "purl": "pkg:npm/%40types/nodemon", + "extracted_requirement": "1.19.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "", - "name": "use-sidecar", - "version": "1.1.2", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/detect-node-es", - "extracted_requirement": "npm:^1.1.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/tslib", - "extracted_requirement": "npm:^2.0.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/react", - "extracted_requirement": "^16.9.0 || ^17.0.0 || ^18.0.0", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/react", - "extracted_requirement": "^16.8.0 || ^17.0.0 || ^18.0.0", - "scope": "peerDependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/use-sidecar@1.1.2" - }, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/use-sidecar@1.1.2?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" + "dependency_uid": "pkg:npm/%40types/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/zx@7.2.3", - "extracted_requirement": "7.2.3", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": true, - "is_direct": true, - "resolved_package": { - "type": "npm", - "namespace": "", - "name": "zx", - "version": "7.2.3", - "qualifiers": {}, - "subpath": null, - "primary_language": "JavaScript", - "description": null, - "release_date": null, - "parties": [], - "keywords": [], - "homepage_url": null, - "download_url": null, - "size": null, - "sha1": null, - "md5": null, - "sha256": null, - "sha512": null, - "bug_tracking_url": null, - "code_view_url": null, - "vcs_url": null, - "copyright": null, - "holder": null, - "declared_license_expression": null, - "declared_license_expression_spdx": null, - "license_detections": [], - "other_license_expression": null, - "other_license_expression_spdx": null, - "other_license_detections": [], - "extracted_license_statement": null, - "notice_text": null, - "source_packages": [], - "file_references": [], - "is_private": false, - "is_virtual": true, - "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:npm/%40types/fs-extra", - "extracted_requirement": "npm:^11.0.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/minimist", - "extracted_requirement": "npm:^1.2.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "npm:^18.16.3", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/ps-tree", - "extracted_requirement": "npm:^1.1.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/%40types/which", - "extracted_requirement": "npm:^3.0.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/chalk", - "extracted_requirement": "npm:^5.2.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/fs-extra", - "extracted_requirement": "npm:^11.1.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/fx", - "extracted_requirement": "npm:*", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/globby", - "extracted_requirement": "npm:^13.1.4", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/minimist", - "extracted_requirement": "npm:^1.2.8", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/node-fetch", - "extracted_requirement": "npm:3.3.1", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/ps-tree", - "extracted_requirement": "npm:^1.2.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/webpod", - "extracted_requirement": "npm:^0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/which", - "extracted_requirement": "npm:^3.0.0", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, - { - "purl": "pkg:npm/yaml", - "extracted_requirement": "npm:^2.2.2", - "scope": "dependencies", - "is_runtime": false, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], - "repository_homepage_url": null, - "repository_download_url": null, - "api_data_url": null, - "datasource_id": "yarn_lock_v2", - "purl": "pkg:npm/zx@7.2.3" - }, - "extra_data": {}, - "dependency_uid": "pkg:npm/zx@7.2.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": null, - "datafile_path": "crystal/yarn.lock", - "datasource_id": "yarn_lock_v2" - }, - { - "purl": "pkg:npm/grafast", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, + "purl": "pkg:npm/chai", + "extracted_requirement": "^4.3.8", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/bench/package.json", + "dependency_uid": "pkg:npm/chai?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/graphql", + "extracted_requirement": "16.1.0-experimental-stream-defer.6", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/bench/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/bench/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/lodash", + "extracted_requirement": "^4.17.21", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/bench/package.json", + "dependency_uid": "pkg:npm/lodash?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/glob", - "extracted_requirement": "^8.1.0", + "purl": "pkg:npm/mermaid", + "extracted_requirement": "^9.4.3", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6289,14 +3594,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/glob?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/bench/package.json", + "dependency_uid": "pkg:npm/mermaid?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/glob", - "extracted_requirement": "^10.3.4", + "purl": "pkg:npm/mocha", + "extracted_requirement": "^10.2.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6304,9 +3609,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/glob?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/bench/package.json", + "dependency_uid": "pkg:npm/mocha?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { @@ -6320,13 +3625,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/bench/package.json", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", + "purl": "pkg:npm/pg-sql2", + "extracted_requirement": "workspace:^", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6334,14 +3639,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/bench/package.json", + "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", + "purl": "pkg:npm/spec-md", + "extracted_requirement": "^3.1.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6349,44 +3654,44 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/bench/package.json", + "dependency_uid": "pkg:npm/spec-md?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/chalk", - "extracted_requirement": "^4.1.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/sqlite3", + "extracted_requirement": "^5.1.7", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/chalk?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-json/package.json", + "dependency_uid": "pkg:npm/sqlite3?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-json/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6394,14 +3699,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-json/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", + "purl": "pkg:npm/zx", + "extracted_requirement": "^7.2.3", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6409,43 +3714,28 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-json/package.json", + "dependency_uid": "pkg:npm/zx?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest-serializer-simple", - "extracted_requirement": "workspace:^", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40envelop/core", + "extracted_requirement": "^5.0.0", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest-serializer-simple?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-json/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-json/package.json", + "dependency_uid": "pkg:npm/%40envelop/core?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafast", + "purl": "pkg:npm/graphile-config", "extracted_requirement": "workspace:^", "scope": "peerDependencies", "is_runtime": true, @@ -6454,44 +3744,44 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-json/package.json", + "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40graphile/lru", - "extracted_requirement": "workspace:^", - "scope": "dependencies", + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "^20.5.7", - "scope": "dependencies", + "purl": "pkg:npm/tamedevil", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafast/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/chalk", - "extracted_requirement": "^4.1.2", + "purl": "pkg:npm/%40graphile/lru", + "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -6499,9 +3789,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/chalk?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { @@ -6515,8 +3805,8 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { @@ -6530,12 +3820,12 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/eventemitter3?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg-sql2", + "purl": "pkg:npm/graphile-config", "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, @@ -6544,14 +3834,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/postgres-array", - "extracted_requirement": "~3.0.2", + "purl": "pkg:npm/graphql-ws", + "extracted_requirement": "^5.14.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -6559,14 +3849,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/postgres-array?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/graphql-ws?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/postgres-range", - "extracted_requirement": "^1.1.3", + "purl": "pkg:npm/ruru", + "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -6574,9 +3864,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/postgres-range?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/ruru?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { @@ -6590,13 +3880,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40mermaid-js/mermaid-cli", - "extracted_requirement": "^9.0.0", + "purl": "pkg:npm/%40envelop/core", + "extracted_requirement": "^5.0.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6604,14 +3894,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40mermaid-js/mermaid-cli?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/%40envelop/core?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", + "purl": "pkg:npm/%40fastify/websocket", + "extracted_requirement": "^8.2.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6619,14 +3909,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/%40fastify/websocket?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/json5", - "extracted_requirement": "^2.2.0", + "purl": "pkg:npm/%40types/aws-lambda", + "extracted_requirement": "^8.10.123", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6634,14 +3924,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/json5?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/%40types/aws-lambda?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/license-checker-webpack-plugin", - "extracted_requirement": "^0.2.2", + "purl": "pkg:npm/%40types/express", + "extracted_requirement": "^4.17.17", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6649,14 +3939,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/license-checker-webpack-plugin?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/%40types/express?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/nodemon", - "extracted_requirement": "1.19.2", + "purl": "pkg:npm/%40types/koa", + "extracted_requirement": "^2.13.8", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6664,14 +3954,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/%40types/koa?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eventemitter3", - "extracted_requirement": "^5.0.1", + "purl": "pkg:npm/%40types/koa-bodyparser", + "extracted_requirement": "^4.3.10", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6679,14 +3969,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eventemitter3?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/%40types/koa-bodyparser?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/glob", - "extracted_requirement": "^10.3.4", + "purl": "pkg:npm/%40whatwg-node/fetch", + "extracted_requirement": "^0.9.10", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6694,14 +3984,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/glob?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/%40whatwg-node/fetch?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafserv", - "extracted_requirement": "workspace:*", + "purl": "pkg:npm/express", + "extracted_requirement": "^4.19.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6709,14 +3999,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafserv?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/express?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-export", - "extracted_requirement": "workspace:*", + "purl": "pkg:npm/fastify", + "extracted_requirement": "^4.22.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6724,14 +4014,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-export?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/fastify?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "16.1.0-experimental-stream-defer.6", + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6739,14 +4029,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/iterall", - "extracted_requirement": "^1.3.0", + "purl": "pkg:npm/graphql-http", + "extracted_requirement": "^1.22.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6754,14 +4044,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/iterall?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/graphql-http?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", + "purl": "pkg:npm/h3", + "extracted_requirement": "^1.8.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6769,14 +4059,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/h3?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest-serializer-simple", - "extracted_requirement": "5.0.0-beta.3:^", + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6784,14 +4074,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest-serializer-simple?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/json5", - "extracted_requirement": "^2.2.3", + "purl": "pkg:npm/jest-serializer-graphql-schema", + "extracted_requirement": "workspace:^", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6799,14 +4089,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/json5?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/jest-serializer-graphql-schema?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/license-checker-webpack-plugin", - "extracted_requirement": "^0.2.1", + "purl": "pkg:npm/koa", + "extracted_requirement": "^2.14.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6814,14 +4104,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/license-checker-webpack-plugin?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/koa?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/nodemon", - "extracted_requirement": "^3.0.1", + "purl": "pkg:npm/koa-bodyparser", + "extracted_requirement": "^4.4.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6829,29 +4119,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/terser-webpack-plugin", - "extracted_requirement": "^5.3.9", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/terser-webpack-plugin?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/koa-bodyparser?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-loader", - "extracted_requirement": "^9.4.4", + "purl": "pkg:npm/nodemon", + "extracted_requirement": "^3.0.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -6859,9 +4134,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-loader?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { @@ -6875,8 +4150,8 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { @@ -6890,73 +4165,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/webpack", - "extracted_requirement": "^5.88.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/webpack?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/webpack-cli", - "extracted_requirement": "^5.1.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/webpack-cli?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/webpack-node-externals", - "extracted_requirement": "^3.0.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/webpack-node-externals?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/zx", - "extracted_requirement": "^7.2.3", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/zx?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40dataplan/json", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/%40envelop/core", + "extracted_requirement": "^5.0.0", "scope": "peerDependencies", "is_runtime": true, "is_optional": false, @@ -6964,9 +4179,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40dataplan/json?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/%40envelop/core?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { @@ -6980,8 +4195,8 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { @@ -6995,13 +4210,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg", - "extracted_requirement": "^8.7.1", + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", "scope": "peerDependencies", "is_runtime": true, "is_optional": false, @@ -7009,14 +4224,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg-sql2", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/h3", + "extracted_requirement": "^1.7.1", "scope": "peerDependencies", "is_runtime": true, "is_optional": false, @@ -7024,29 +4239,29 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/dataplan-pg/package.json", + "dependency_uid": "pkg:npm/h3?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40graphile/lru", - "extracted_requirement": "workspace:^", - "scope": "dependencies", + "purl": "pkg:npm/ws", + "extracted_requirement": "^8.12.1", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/ws?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/chalk", - "extracted_requirement": "^4.1.2", + "purl": "pkg:npm/%40graphile/lru", + "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -7054,14 +4269,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/chalk?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv-persisted/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/debug", - "extracted_requirement": "^4.3.4", + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -7069,89 +4284,89 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv-persisted/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eventemitter3", - "extracted_requirement": "^5.0.1", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eventemitter3?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv-persisted/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/grafserv", + "extracted_requirement": "workspace:^", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/grafserv?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv-persisted/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/iterall", - "extracted_requirement": "^1.3.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/graphile-config", + "extracted_requirement": "workspace:^", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/iterall?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv-persisted/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tamedevil", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv-persisted/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/jest-serializer-graphql-schema", + "extracted_requirement": "workspace:^", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/jest-serializer-graphql-schema?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv-persisted/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/chai", - "extracted_requirement": "^4.3.5", + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7159,14 +4374,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/chai?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", - "datasource_id": "npm_package_json" + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv-persisted/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7174,149 +4389,149 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv-persisted/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/lodash", - "extracted_requirement": "^4.14.197", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/lodash?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv-persisted/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/mermaid", - "extracted_requirement": "^9.2.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/grafserv", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/mermaid?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/grafserv?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv-persisted/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/mocha", - "extracted_requirement": "^10.0.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/graphile-config", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/mocha?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/grafserv-persisted/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "^20.5.7", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40emotion/is-prop-valid", + "extracted_requirement": "^1.2.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/%40emotion/is-prop-valid?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/nodemon", - "extracted_requirement": "1.19.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/graphile-config", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/chai", - "extracted_requirement": "^4.3.8", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/chai?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "16.1.0-experimental-stream-defer.6", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/http-proxy", + "extracted_requirement": "^1.18.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/http-proxy?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/lodash", - "extracted_requirement": "^4.17.21", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/yargs", + "extracted_requirement": "^17.7.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/lodash?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/yargs?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/mermaid", - "extracted_requirement": "^9.4.3", + "purl": "pkg:npm/%40types/http-proxy", + "extracted_requirement": "^1.17.11", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7324,14 +4539,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/mermaid?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/%40types/http-proxy?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/mocha", - "extracted_requirement": "^10.2.0", + "purl": "pkg:npm/%40types/webpack-bundle-analyzer", + "extracted_requirement": "^4.6.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7339,14 +4554,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/mocha?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/%40types/webpack-bundle-analyzer?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/nodemon", - "extracted_requirement": "^3.0.1", + "purl": "pkg:npm/%40types/yargs", + "extracted_requirement": "^17.0.24", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7354,14 +4569,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/%40types/yargs?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg-sql2", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/css-loader", + "extracted_requirement": "^6.8.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7369,14 +4584,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/css-loader?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/spec-md", - "extracted_requirement": "^3.1.0", + "purl": "pkg:npm/file-loader", + "extracted_requirement": "^6.2.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7384,14 +4599,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/spec-md?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/file-loader?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/sqlite3", - "extracted_requirement": "^5.1.7", + "purl": "pkg:npm/graphql", + "extracted_requirement": "16.1.0-experimental-stream-defer.6", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7399,14 +4614,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/sqlite3?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", + "purl": "pkg:npm/ruru-components", + "extracted_requirement": "2.0.0-beta.19:^", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7414,14 +4629,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/ruru-components?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", + "purl": "pkg:npm/style-loader", + "extracted_requirement": "^3.3.3", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7429,14 +4644,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/style-loader?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/zx", - "extracted_requirement": "^7.2.3", + "purl": "pkg:npm/svg-inline-loader", + "extracted_requirement": "^0.8.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7444,24 +4659,84 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/zx?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/svg-inline-loader?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40envelop/core", - "extracted_requirement": "^5.0.0", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, + "purl": "pkg:npm/ts-loader", + "extracted_requirement": "^9.4.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40envelop/core?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/ts-loader?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/webpack", + "extracted_requirement": "^5.88.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/webpack?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/webpack-bundle-analyzer", + "extracted_requirement": "^4.9.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/webpack-bundle-analyzer?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/webpack-cli", + "extracted_requirement": "^5.1.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/webpack-cli?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { @@ -7475,8 +4750,8 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { @@ -7490,28 +4765,28 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tamedevil", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", + "purl": "pkg:npm/%40graphiql/plugin-explorer", + "extracted_requirement": "^1.0.3-canary-64994e0e.0", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafast/package.json", + "dependency_uid": "pkg:npm/%40graphiql/plugin-explorer?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40graphile/lru", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/%40graphiql/react", + "extracted_requirement": "^0.20.3-canary-64994e0e.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -7519,14 +4794,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40graphiql/react?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/debug", - "extracted_requirement": "^4.3.4", + "purl": "pkg:npm/%40graphiql/toolkit", + "extracted_requirement": "^0.9.1", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -7534,14 +4809,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40graphiql/toolkit?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eventemitter3", - "extracted_requirement": "^5.0.1", + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "^20.5.7", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -7549,13 +4824,13 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eventemitter3?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-config", + "purl": "pkg:npm/grafast", "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, @@ -7564,9 +4839,24 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/graphiql", + "extracted_requirement": "^3.1.1-canary-64994e0e.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/graphiql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { @@ -7580,13 +4870,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/graphql-ws?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ruru", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/react", + "extracted_requirement": "^18.2.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -7594,9 +4884,24 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ruru?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/react?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/react-dom", + "extracted_requirement": "^18.2.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/react-dom?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { @@ -7610,13 +4915,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40envelop/core", - "extracted_requirement": "^5.0.0", + "purl": "pkg:npm/%40types/codemirror", + "extracted_requirement": "^5.60.9", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7624,14 +4929,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40envelop/core?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40types/codemirror?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40fastify/websocket", - "extracted_requirement": "^8.2.0", + "purl": "pkg:npm/%40types/debug", + "extracted_requirement": "^4.1.8", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7639,14 +4944,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40fastify/websocket?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/aws-lambda", - "extracted_requirement": "^8.10.123", + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7654,14 +4959,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/aws-lambda?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/express", - "extracted_requirement": "^4.17.17", + "purl": "pkg:npm/%40types/nodemon", + "extracted_requirement": "1.19.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7669,14 +4974,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/express?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40types/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/koa", - "extracted_requirement": "^2.13.8", + "purl": "pkg:npm/%40types/react", + "extracted_requirement": "^18.2.21", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7684,14 +4989,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/koa?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40types/react?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/koa-bodyparser", - "extracted_requirement": "^4.3.10", + "purl": "pkg:npm/%40types/react-dom", + "extracted_requirement": "^18.2.7", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7699,14 +5004,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/koa-bodyparser?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40types/react-dom?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40whatwg-node/fetch", - "extracted_requirement": "^0.9.10", + "purl": "pkg:npm/graphql", + "extracted_requirement": "16.1.0-experimental-stream-defer.6", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7714,14 +5019,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40whatwg-node/fetch?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/express", - "extracted_requirement": "^4.19.2", + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7729,14 +5034,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/express?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/fastify", - "extracted_requirement": "^4.22.1", + "purl": "pkg:npm/nodemon", + "extracted_requirement": "^3.0.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7744,14 +5049,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/fastify?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafast", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -7759,165 +5064,165 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql-http", - "extracted_requirement": "^1.22.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql-http?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/h3", - "extracted_requirement": "^1.8.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/tamedevil", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/h3?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/ruru-components/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40docusaurus/core", + "extracted_requirement": "2.4.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/core?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest-serializer-graphql-schema", - "extracted_requirement": "workspace:^", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40docusaurus/preset-classic", + "extracted_requirement": "2.4.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest-serializer-graphql-schema?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/preset-classic?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/koa", - "extracted_requirement": "^2.14.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40docusaurus/remark-plugin-npm2yarn", + "extracted_requirement": "^2.4.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/koa?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/remark-plugin-npm2yarn?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/koa-bodyparser", - "extracted_requirement": "^4.4.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40mdx-js/react", + "extracted_requirement": "^1.6.22", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/koa-bodyparser?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40mdx-js/react?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/nodemon", - "extracted_requirement": "^3.0.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40uiw/react-codemirror", + "extracted_requirement": "^4.21.12", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40uiw/react-codemirror?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/clsx", + "extracted_requirement": "^2.0.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/clsx?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/codemirror", + "extracted_requirement": "^5.65.16", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/codemirror?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40envelop/core", - "extracted_requirement": "^5.0.0", - "scope": "peerDependencies", + "purl": "pkg:npm/codemirror-graphql", + "extracted_requirement": "^2.0.10", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40envelop/core?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/codemirror-graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { "purl": "pkg:npm/grafast", "extracted_requirement": "workspace:^", - "scope": "peerDependencies", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, @@ -7925,133 +5230,88 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", + "purl": "pkg:npm/prism-react-renderer", + "extracted_requirement": "^2.0.6", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/prism-react-renderer?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", - "scope": "peerDependencies", + "purl": "pkg:npm/react", + "extracted_requirement": "^18.2.0", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/react?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/h3", - "extracted_requirement": "^1.7.1", - "scope": "peerDependencies", + "purl": "pkg:npm/react-dom", + "extracted_requirement": "^18.2.0", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/h3?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/react-dom?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ws", - "extracted_requirement": "^8.12.1", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40docusaurus/module-type-aliases", + "extracted_requirement": "2.4.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ws?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/module-type-aliases?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40graphile/lru", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/dataloader", + "extracted_requirement": "^2.2.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv-persisted/package.json", + "dependency_uid": "pkg:npm/dataloader?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv-persisted/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/grafast", - "extracted_requirement": "workspace:^", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv-persisted/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/grafserv", - "extracted_requirement": "workspace:^", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/grafserv?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv-persisted/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/mermaid", + "extracted_requirement": "^9.4.3", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8059,14 +5319,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv-persisted/package.json", + "dependency_uid": "pkg:npm/mermaid?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", + "purl": "pkg:npm/sqlite3", + "extracted_requirement": "^5.1.6", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8074,90 +5334,90 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv-persisted/package.json", + "dependency_uid": "pkg:npm/sqlite3?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/grafast/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest-serializer-graphql-schema", - "extracted_requirement": "workspace:^", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "^20.5.7", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest-serializer-graphql-schema?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv-persisted/package.json", + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40types/pluralize", + "extracted_requirement": "^0.0.30", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv-persisted/package.json", + "dependency_uid": "pkg:npm/%40types/pluralize?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40types/semver", + "extracted_requirement": "^7.5.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv-persisted/package.json", + "dependency_uid": "pkg:npm/%40types/semver?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafast", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", + "purl": "pkg:npm/chalk", + "extracted_requirement": "^4.1.2", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv-persisted/package.json", + "dependency_uid": "pkg:npm/chalk?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafserv", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", + "purl": "pkg:npm/debug", + "extracted_requirement": "^4.3.4", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafserv?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv-persisted/package.json", + "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { "purl": "pkg:npm/graphile-config", "extracted_requirement": "workspace:^", - "scope": "peerDependencies", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, @@ -8165,13 +5425,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/grafserv-persisted/package.json", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40emotion/is-prop-valid", - "extracted_requirement": "^1.2.1", + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -8179,14 +5439,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40emotion/is-prop-valid?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/lodash", + "extracted_requirement": "^4.17.21", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -8194,14 +5454,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "dependency_uid": "pkg:npm/lodash?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", + "purl": "pkg:npm/pluralize", + "extracted_requirement": "^7.0.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -8209,14 +5469,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "dependency_uid": "pkg:npm/pluralize?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/http-proxy", - "extracted_requirement": "^1.18.1", + "purl": "pkg:npm/semver", + "extracted_requirement": "^7.5.4", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -8224,14 +5484,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/http-proxy?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "dependency_uid": "pkg:npm/semver?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", + "purl": "pkg:npm/tamedevil", + "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -8239,14 +5499,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/yargs", - "extracted_requirement": "^17.7.2", + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -8254,14 +5514,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/yargs?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/http-proxy", - "extracted_requirement": "^1.17.11", + "purl": "pkg:npm/%40types/debug", + "extracted_requirement": "^4.1.8", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8269,14 +5529,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/http-proxy?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/webpack-bundle-analyzer", - "extracted_requirement": "^4.6.0", + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8284,14 +5544,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/webpack-bundle-analyzer?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/yargs", - "extracted_requirement": "^17.0.24", + "purl": "pkg:npm/graphile-export", + "extracted_requirement": "workspace:^", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8299,14 +5559,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/yargs?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "dependency_uid": "pkg:npm/graphile-export?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/css-loader", - "extracted_requirement": "^6.8.1", + "purl": "pkg:npm/graphql", + "extracted_requirement": "16.1.0-experimental-stream-defer.6", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8314,14 +5574,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/css-loader?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/file-loader", - "extracted_requirement": "^6.2.0", + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8329,14 +5589,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/file-loader?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "16.1.0-experimental-stream-defer.6", + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8344,69 +5604,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/ruru-components", - "extracted_requirement": "2.0.0-beta.19:^", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/ruru-components?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/style-loader", - "extracted_requirement": "^3.3.3", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/style-loader?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/svg-inline-loader", - "extracted_requirement": "^0.8.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/svg-inline-loader?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/ts-loader", - "extracted_requirement": "^9.4.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/ts-loader?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { @@ -8420,53 +5620,23 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/webpack", - "extracted_requirement": "^5.88.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/webpack?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/webpack-bundle-analyzer", - "extracted_requirement": "^4.9.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/webpack-bundle-analyzer?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/webpack-cli", - "extracted_requirement": "^5.1.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/webpack-cli?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { @@ -8480,8 +5650,8 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { @@ -8495,13 +5665,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru/package.json", + "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40graphiql/plugin-explorer", - "extracted_requirement": "^1.0.3-canary-64994e0e.0", + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "^20.5.7", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -8509,14 +5679,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40graphiql/plugin-explorer?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40graphiql/react", - "extracted_requirement": "^0.20.3-canary-64994e0e.0", + "purl": "pkg:npm/debug", + "extracted_requirement": "^4.3.4", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -8524,14 +5694,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40graphiql/react?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40graphiql/toolkit", - "extracted_requirement": "^0.9.1", + "purl": "pkg:npm/graphile-config", + "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -8539,14 +5709,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40graphiql/toolkit?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "^20.5.7", + "purl": "pkg:npm/jsonwebtoken", + "extracted_requirement": "^9.0.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -8554,13 +5724,13 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/jsonwebtoken?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafast", + "purl": "pkg:npm/pg-introspection", "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, @@ -8569,14 +5739,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/pg-introspection?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphiql", - "extracted_requirement": "^3.1.1-canary-64994e0e.0", + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -8584,74 +5754,74 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphiql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql-ws", - "extracted_requirement": "^5.14.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40envelop/core", + "extracted_requirement": "^5.0.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql-ws?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/%40envelop/core?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/react", - "extracted_requirement": "^18.2.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40envelop/parser-cache", + "extracted_requirement": "^7.0.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/react?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/%40envelop/parser-cache?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/react-dom", - "extracted_requirement": "^18.2.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40envelop/validation-cache", + "extracted_requirement": "^7.0.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/react-dom?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/%40envelop/validation-cache?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/debug", + "extracted_requirement": "^4.1.8", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/codemirror", - "extracted_requirement": "^5.60.9", + "purl": "pkg:npm/%40types/express", + "extracted_requirement": "^4.17.17", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8659,24 +5829,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/codemirror?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/%40types/debug", - "extracted_requirement": "^4.1.8", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/%40types/express?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { @@ -8690,13 +5845,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/nodemon", - "extracted_requirement": "1.19.2", + "purl": "pkg:npm/%40types/jsonwebtoken", + "extracted_requirement": "^9.0.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8704,14 +5859,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/%40types/jsonwebtoken?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/react", - "extracted_requirement": "^18.2.21", + "purl": "pkg:npm/chalk", + "extracted_requirement": "^4.1.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8719,14 +5874,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/react?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/chalk?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/react-dom", - "extracted_requirement": "^18.2.7", + "purl": "pkg:npm/express", + "extracted_requirement": "^4.19.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8734,14 +5889,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/react-dom?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/express?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "16.1.0-experimental-stream-defer.6", + "purl": "pkg:npm/express-graphql", + "extracted_requirement": "^0.12.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8749,14 +5904,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/express-graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", + "purl": "pkg:npm/fastify", + "extracted_requirement": "^4.22.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8764,14 +5919,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/fastify?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/nodemon", - "extracted_requirement": "^3.0.1", + "purl": "pkg:npm/fastify-static", + "extracted_requirement": "^4.7.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8779,14 +5934,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/fastify-static?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", + "purl": "pkg:npm/graphile-export", + "extracted_requirement": "workspace:^", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -8794,165 +5949,165 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/graphile-export?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "extracted_requirement": "16.1.0-experimental-stream-defer.6", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tamedevil", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/graphql-helix", + "extracted_requirement": "^1.13.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/ruru-components/package.json", + "dependency_uid": "pkg:npm/graphql-helix?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40docusaurus/core", - "extracted_requirement": "2.4.1", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/graphql-ws", + "extracted_requirement": "^5.14.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/core?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "dependency_uid": "pkg:npm/graphql-ws?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40docusaurus/preset-classic", - "extracted_requirement": "2.4.1", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/preset-classic?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40docusaurus/remark-plugin-npm2yarn", - "extracted_requirement": "^2.4.1", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/pg", + "extracted_requirement": "^8.11.3", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/remark-plugin-npm2yarn?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40mdx-js/react", - "extracted_requirement": "^1.6.22", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/ruru", + "extracted_requirement": "2.0.0-beta.13:^", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40mdx-js/react?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "dependency_uid": "pkg:npm/ruru?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40uiw/react-codemirror", - "extracted_requirement": "^4.21.12", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40uiw/react-codemirror?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/clsx", - "extracted_requirement": "^2.0.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/clsx?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/codemirror", - "extracted_requirement": "^5.65.16", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/ws", + "extracted_requirement": "^8.13.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/codemirror?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "dependency_uid": "pkg:npm/ws?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/codemirror-graphql", - "extracted_requirement": "^2.0.10", - "scope": "dependencies", + "purl": "pkg:npm/%40dataplan/pg", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/codemirror-graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "dependency_uid": "pkg:npm/%40dataplan/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { "purl": "pkg:npm/grafast", "extracted_requirement": "workspace:^", - "scope": "dependencies", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, @@ -8960,103 +6115,103 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/prism-react-renderer", - "extracted_requirement": "^2.0.6", - "scope": "dependencies", + "purl": "pkg:npm/graphile-build", + "extracted_requirement": "workspace:*", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/prism-react-renderer?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", - "datasource_id": "npm_package_json" + "dependency_uid": "pkg:npm/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/react", - "extracted_requirement": "^18.2.0", - "scope": "dependencies", + "purl": "pkg:npm/graphile-config", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/react?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/react-dom", - "extracted_requirement": "^18.2.0", - "scope": "dependencies", + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/react-dom?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40docusaurus/module-type-aliases", - "extracted_requirement": "2.4.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/pg", + "extracted_requirement": "^8.7.1", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/module-type-aliases?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/dataloader", - "extracted_requirement": "^2.2.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/pg-sql2", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/dataloader?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/mermaid", - "extracted_requirement": "^9.4.3", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/tamedevil", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/mermaid?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/sqlite3", - "extracted_requirement": "^5.1.6", + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "^20.5.7", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -9064,44 +6219,44 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/sqlite3?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/grafast/website/package.json", + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/simplify-inflection@8.0.0-beta.5?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-simplify-inflection/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "^20.5.7", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/postgraphile", + "extracted_requirement": "workspace:^", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/postgraphile?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/simplify-inflection@8.0.0-beta.5?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-simplify-inflection/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/pluralize", - "extracted_requirement": "^0.0.30", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/pluralize?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/simplify-inflection@8.0.0-beta.5?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-simplify-inflection/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/semver", - "extracted_requirement": "^7.5.1", + "purl": "pkg:npm/debug", + "extracted_requirement": "^4.3.4", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -9109,14 +6264,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/semver?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/chalk", - "extracted_requirement": "^4.1.2", + "purl": "pkg:npm/json5", + "extracted_requirement": "^2.2.3", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -9124,14 +6279,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/chalk?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/json5?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/debug", - "extracted_requirement": "^4.3.4", + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -9139,134 +6294,119 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-config", + "purl": "pkg:npm/graphile-build", "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/graphile-build-pg", + "extracted_requirement": "workspace:^", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/graphile-build-pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/lodash", - "extracted_requirement": "^4.17.21", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/lodash?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pluralize", - "extracted_requirement": "^7.0.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/jest-serializer-graphql-schema", + "extracted_requirement": "5.0.0-beta.3:^", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pluralize?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/jest-serializer-graphql-schema?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/semver", - "extracted_requirement": "^7.5.4", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/nodemon", + "extracted_requirement": "^3.0.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/semver?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tamedevil", + "purl": "pkg:npm/postgraphile", "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/postgraphile?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/debug", - "extracted_requirement": "^4.1.8", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -9274,89 +6414,89 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-export", + "purl": "pkg:npm/%40dataplan/pg", "extracted_requirement": "workspace:^", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-export?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/%40dataplan/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "16.1.0-experimental-stream-defer.6", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/graphile-build", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/graphile-build-pg", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/graphile-build-pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/graphile-config", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafast", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", "scope": "peerDependencies", "is_runtime": true, "is_optional": false, @@ -9364,13 +6504,13 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-config", + "purl": "pkg:npm/tamedevil", "extracted_requirement": "workspace:^", "scope": "peerDependencies", "is_runtime": true, @@ -9379,29 +6519,29 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/graphile-utils/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", - "scope": "peerDependencies", + "purl": "pkg:npm/%40docusaurus/core", + "extracted_requirement": "2.4.1", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/core?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "^20.5.7", + "purl": "pkg:npm/%40docusaurus/preset-classic", + "extracted_requirement": "2.4.1", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -9409,14 +6549,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/preset-classic?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/debug", - "extracted_requirement": "^4.3.4", + "purl": "pkg:npm/%40mdx-js/react", + "extracted_requirement": "^1.6.22", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -9424,14 +6564,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/%40mdx-js/react?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/clsx", + "extracted_requirement": "^2.0.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -9439,14 +6579,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/clsx?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jsonwebtoken", - "extracted_requirement": "^9.0.2", + "purl": "pkg:npm/prism-react-renderer", + "extracted_requirement": "^2.0.6", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -9454,14 +6594,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jsonwebtoken?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/prism-react-renderer?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg-introspection", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/react", + "extracted_requirement": "^18.2.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -9469,14 +6609,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg-introspection?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/react?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", + "purl": "pkg:npm/react-dom", + "extracted_requirement": "^18.2.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -9484,14 +6624,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/react-dom?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40envelop/core", - "extracted_requirement": "^5.0.0", + "purl": "pkg:npm/%40docusaurus/module-type-aliases", + "extracted_requirement": "2.4.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -9499,449 +6639,419 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40envelop/core?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/module-type-aliases?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/graphile-build/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40envelop/parser-cache", - "extracted_requirement": "^7.0.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40dataplan/json", + "extracted_requirement": "workspace:*", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40envelop/parser-cache?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/%40dataplan/json?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40envelop/validation-cache", - "extracted_requirement": "^7.0.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40dataplan/pg", + "extracted_requirement": "workspace:*", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40envelop/validation-cache?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/%40dataplan/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/debug", - "extracted_requirement": "^4.1.8", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40graphile/lru", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/express", - "extracted_requirement": "^4.17.17", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/express?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "^20.5.7", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jsonwebtoken", - "extracted_requirement": "^9.0.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40types/pg", + "extracted_requirement": "^8.10.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jsonwebtoken?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/%40types/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/chalk", - "extracted_requirement": "^4.1.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/debug", + "extracted_requirement": "^4.3.4", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/chalk?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/express", - "extracted_requirement": "^4.19.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/express?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/express-graphql", - "extracted_requirement": "^0.12.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/grafserv", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/express-graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/grafserv?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/fastify", - "extracted_requirement": "^4.22.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/graphile-build", + "extracted_requirement": "workspace:*", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/fastify?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/fastify-static", - "extracted_requirement": "^4.7.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/graphile-build-pg", + "extracted_requirement": "workspace:*", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/fastify-static?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/graphile-build-pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-export", + "purl": "pkg:npm/graphile-config", "extracted_requirement": "workspace:^", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-export?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { "purl": "pkg:npm/graphql", "extracted_requirement": "16.1.0-experimental-stream-defer.6", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql-helix", - "extracted_requirement": "^1.13.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/iterall", + "extracted_requirement": "^1.3.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql-helix?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/iterall?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql-ws", - "extracted_requirement": "^5.14.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/jsonwebtoken", + "extracted_requirement": "^9.0.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql-ws?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/jsonwebtoken?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/pg", + "extracted_requirement": "^8.11.3", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg", - "extracted_requirement": "^8.11.3", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/pg-introspection", + "extracted_requirement": "0.0.1-beta.8:^", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/pg-introspection?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ruru", - "extracted_requirement": "2.0.0-beta.13:^", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/pg-sql2", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ruru?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/postgraphile", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/postgraphile?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/tamedevil", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/ws", - "extracted_requirement": "^8.13.0", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/ws?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40dataplan/pg", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40dataplan/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafast", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", + "purl": "pkg:npm/ws", + "extracted_requirement": "^8.13.0", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/ws?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-build", - "extracted_requirement": "workspace:*", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/debug", + "extracted_requirement": "^4.1.8", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/express", + "extracted_requirement": "^4.17.17", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/%40types/express?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg", - "extracted_requirement": "^8.7.1", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/jsonwebtoken", + "extracted_requirement": "^9.0.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/%40types/jsonwebtoken?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg-sql2", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/nodemon", + "extracted_requirement": "1.19.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/%40types/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tamedevil", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-build-pg/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "^20.5.7", + "purl": "pkg:npm/nodemon", + "extracted_requirement": "^3.0.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -9949,14 +7059,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/simplify-inflection@8.0.0-beta.5?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-simplify-inflection/package.json", + "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/postgraphile", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -9964,9 +7074,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/postgraphile?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/simplify-inflection@8.0.0-beta.5?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-simplify-inflection/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { @@ -9980,13 +7090,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/simplify-inflection@8.0.0-beta.5?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-simplify-inflection/package.json", + "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/pgl/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/debug", - "extracted_requirement": "^4.3.4", + "purl": "pkg:npm/%40dataplan/json", + "extracted_requirement": "workspace:*", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -9994,14 +7104,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", + "dependency_uid": "pkg:npm/%40dataplan/json?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/json5", - "extracted_requirement": "^2.2.3", + "purl": "pkg:npm/%40dataplan/pg", + "extracted_requirement": "workspace:*", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10009,14 +7119,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/json5?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", + "dependency_uid": "pkg:npm/%40dataplan/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", + "purl": "pkg:npm/%40graphile/lru", + "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10024,165 +7134,90 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", + "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-build", - "extracted_requirement": "workspace:^", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "^20.5.7", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-build-pg", - "extracted_requirement": "workspace:^", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40types/pg", + "extracted_requirement": "^8.10.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-build-pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", + "dependency_uid": "pkg:npm/%40types/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/debug", + "extracted_requirement": "^4.3.4", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", + "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest-serializer-graphql-schema", - "extracted_requirement": "5.0.0-beta.3:^", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest-serializer-graphql-schema?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", + "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/nodemon", - "extracted_requirement": "^3.0.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/postgraphile", - "extracted_requirement": "workspace:^", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/postgraphile?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/%40dataplan/pg", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/%40dataplan/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/grafast", + "purl": "pkg:npm/grafserv", "extracted_requirement": "workspace:^", - "scope": "peerDependencies", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", + "dependency_uid": "pkg:npm/grafserv?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { "purl": "pkg:npm/graphile-build", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", + "extracted_requirement": "workspace:*", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, @@ -10190,14 +7225,14 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { "purl": "pkg:npm/graphile-build-pg", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", + "extracted_requirement": "workspace:*", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, @@ -10205,14 +7240,14 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/graphile-build-pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { "purl": "pkg:npm/graphile-config", "extracted_requirement": "workspace:^", - "scope": "peerDependencies", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, @@ -10220,43 +7255,43 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", - "scope": "peerDependencies", + "purl": "pkg:npm/graphile-utils", + "extracted_requirement": "5.0.0-beta.25:^", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", + "dependency_uid": "pkg:npm/graphile-utils?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tamedevil", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/graphile-utils/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40docusaurus/core", - "extracted_requirement": "2.4.1", + "purl": "pkg:npm/iterall", + "extracted_requirement": "^1.3.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10264,14 +7299,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/core?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/website/package.json", + "dependency_uid": "pkg:npm/iterall?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40docusaurus/preset-classic", - "extracted_requirement": "2.4.1", + "purl": "pkg:npm/jsonwebtoken", + "extracted_requirement": "^9.0.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10279,14 +7314,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/preset-classic?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/website/package.json", + "dependency_uid": "pkg:npm/jsonwebtoken?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40mdx-js/react", - "extracted_requirement": "^1.6.22", + "purl": "pkg:npm/pg", + "extracted_requirement": "^8.11.3", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10294,14 +7329,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40mdx-js/react?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/website/package.json", + "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/clsx", - "extracted_requirement": "^2.0.0", + "purl": "pkg:npm/pg-sql2", + "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10309,14 +7344,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/clsx?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/website/package.json", + "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/prism-react-renderer", - "extracted_requirement": "^2.0.6", + "purl": "pkg:npm/tamedevil", + "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10324,14 +7359,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/prism-react-renderer?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/website/package.json", + "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/react", - "extracted_requirement": "^18.2.0", + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10339,14 +7374,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/react?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/website/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/react-dom", - "extracted_requirement": "^18.2.0", + "purl": "pkg:npm/ws", + "extracted_requirement": "^8.13.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10354,14 +7389,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/react-dom?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/website/package.json", + "dependency_uid": "pkg:npm/ws?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40docusaurus/module-type-aliases", - "extracted_requirement": "2.4.1", + "purl": "pkg:npm/%40types/debug", + "extracted_requirement": "^4.1.8", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -10369,464 +7404,464 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/module-type-aliases?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/graphile-build/website/package.json", + "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40dataplan/json", - "extracted_requirement": "workspace:*", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/express", + "extracted_requirement": "^4.17.17", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40dataplan/json?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/%40types/express?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40dataplan/pg", - "extracted_requirement": "workspace:*", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40dataplan/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40graphile/lru", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/jsonwebtoken", + "extracted_requirement": "^9.0.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", - "datasource_id": "npm_package_json" + "dependency_uid": "pkg:npm/%40types/jsonwebtoken?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "^20.5.7", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/nodemon", + "extracted_requirement": "1.19.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/%40types/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/pg", - "extracted_requirement": "^8.10.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/graphile", + "extracted_requirement": "5.0.0-beta.26:^", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/graphile?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/debug", - "extracted_requirement": "^4.3.4", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/graphile-export", + "extracted_requirement": "0.0.2-beta.16:^", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/graphile-export?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafast", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafserv", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/nodemon", + "extracted_requirement": "^3.0.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafserv?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-build", - "extracted_requirement": "workspace:*", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-build-pg", - "extracted_requirement": "workspace:*", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-build-pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "workspace:^", - "scope": "dependencies", + "purl": "pkg:npm/%40dataplan/json", + "extracted_requirement": "0.0.1-beta.20:*", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/%40dataplan/json?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "16.1.0-experimental-stream-defer.6", - "scope": "dependencies", + "purl": "pkg:npm/%40dataplan/pg", + "extracted_requirement": "0.0.1-beta.22:*", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/%40dataplan/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/iterall", - "extracted_requirement": "^1.3.0", - "scope": "dependencies", + "purl": "pkg:npm/%40envelop/core", + "extracted_requirement": "^5.0.0", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/iterall?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/%40envelop/core?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jsonwebtoken", - "extracted_requirement": "^9.0.2", - "scope": "dependencies", + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jsonwebtoken?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg", - "extracted_requirement": "^8.11.3", - "scope": "dependencies", + "purl": "pkg:npm/grafserv", + "extracted_requirement": "0.1.1-beta.13:^", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/grafserv?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg-introspection", - "extracted_requirement": "0.0.1-beta.8:^", - "scope": "dependencies", + "purl": "pkg:npm/graphile-build", + "extracted_requirement": "workspace:*", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg-introspection?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg-sql2", - "extracted_requirement": "workspace:^", - "scope": "dependencies", + "purl": "pkg:npm/graphile-build-pg", + "extracted_requirement": "5.0.0-beta.25:*", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/graphile-build-pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/postgraphile", + "purl": "pkg:npm/graphile-config", "extracted_requirement": "workspace:^", - "scope": "dependencies", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/postgraphile?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tamedevil", - "extracted_requirement": "workspace:^", - "scope": "dependencies", + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", - "scope": "dependencies", + "purl": "pkg:npm/pg", + "extracted_requirement": "^8.7.1", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ws", - "extracted_requirement": "^8.13.0", - "scope": "dependencies", + "purl": "pkg:npm/pg-sql2", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ws?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/debug", - "extracted_requirement": "^4.1.8", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/tamedevil", + "extracted_requirement": "0.0.0-beta.7:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/postgraphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/express", - "extracted_requirement": "^4.17.17", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40docusaurus/core", + "extracted_requirement": "2.4.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/express?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/core?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40docusaurus/preset-classic", + "extracted_requirement": "2.4.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/preset-classic?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jsonwebtoken", - "extracted_requirement": "^9.0.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40docusaurus/remark-plugin-npm2yarn", + "extracted_requirement": "^2.4.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jsonwebtoken?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/remark-plugin-npm2yarn?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/nodemon", - "extracted_requirement": "1.19.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40docusaurus/theme-mermaid", + "extracted_requirement": "^2.4.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/theme-mermaid?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40fortawesome/fontawesome-svg-core", + "extracted_requirement": "^6.5.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/%40fortawesome/fontawesome-svg-core?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/nodemon", - "extracted_requirement": "^3.0.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40fortawesome/free-brands-svg-icons", + "extracted_requirement": "^6.5.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/%40fortawesome/free-brands-svg-icons?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40fortawesome/free-regular-svg-icons", + "extracted_requirement": "^6.5.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/%40fortawesome/free-regular-svg-icons?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40fortawesome/free-solid-svg-icons", + "extracted_requirement": "^6.5.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/pgl/package.json", + "dependency_uid": "pkg:npm/%40fortawesome/free-solid-svg-icons?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40dataplan/json", - "extracted_requirement": "workspace:*", + "purl": "pkg:npm/%40fortawesome/react-fontawesome", + "extracted_requirement": "^0.2.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10834,14 +7869,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40dataplan/json?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/%40fortawesome/react-fontawesome?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40dataplan/pg", - "extracted_requirement": "workspace:*", + "purl": "pkg:npm/%40mdx-js/react", + "extracted_requirement": "^1.6.22", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10849,14 +7884,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40dataplan/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/%40mdx-js/react?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40graphile/lru", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/clsx", + "extracted_requirement": "^2.0.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10864,14 +7899,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/clsx?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "^20.5.7", + "purl": "pkg:npm/postcss-nested", + "extracted_requirement": "^6.0.1", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10879,14 +7914,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/postcss-nested?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/pg", - "extracted_requirement": "^8.10.2", + "purl": "pkg:npm/prism-react-renderer", + "extracted_requirement": "^2.0.6", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10894,14 +7929,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/prism-react-renderer?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/debug", - "extracted_requirement": "^4.3.4", + "purl": "pkg:npm/react", + "extracted_requirement": "^18.2.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10909,14 +7944,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/react?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafast", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/react-dom", + "extracted_requirement": "^18.2.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10924,29 +7959,29 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/react-dom?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafserv", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40docusaurus/module-type-aliases", + "extracted_requirement": "2.4.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafserv?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/module-type-aliases?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/postgraphile/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-build", - "extracted_requirement": "workspace:*", + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -10954,134 +7989,134 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-build-pg", - "extracted_requirement": "workspace:*", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40babel/types", + "extracted_requirement": "^7.22.11", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-build-pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/%40babel/types?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/eslint", + "extracted_requirement": "^8.44.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/%40types/eslint?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-utils", - "extracted_requirement": "5.0.0-beta.25:^", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/estree", + "extracted_requirement": "^1.0.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-utils?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/%40types/estree?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/iterall", - "extracted_requirement": "^1.3.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/iterall?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jsonwebtoken", - "extracted_requirement": "^9.0.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jsonwebtoken?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg", - "extracted_requirement": "^8.11.3", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg-sql2", - "extracted_requirement": "workspace:^", - "scope": "dependencies", + "purl": "pkg:npm/eslint", + "extracted_requirement": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/eslint?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tamedevil", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/%40typescript/vfs", + "extracted_requirement": "^1.5.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -11089,14 +8124,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/%40typescript/vfs?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", + "purl": "pkg:npm/chalk", + "extracted_requirement": "^4.1.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -11104,14 +8139,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/chalk?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ws", - "extracted_requirement": "^8.13.0", + "purl": "pkg:npm/graphile-config", + "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -11119,39 +8154,39 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ws?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/debug", - "extracted_requirement": "^4.1.8", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/express", - "extracted_requirement": "^4.17.17", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/express?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile/package.json", "datasource_id": "npm_package_json" }, { @@ -11165,13 +8200,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jsonwebtoken", - "extracted_requirement": "^9.0.2", + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "^20.5.7", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -11179,14 +8214,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jsonwebtoken?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/nodemon", - "extracted_requirement": "1.19.2", + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -11194,14 +8229,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile", - "extracted_requirement": "5.0.0-beta.26:^", + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -11209,284 +8244,284 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-export", - "extracted_requirement": "0.0.2-beta.16:^", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/graphile-build", + "extracted_requirement": "5.0.0-beta.21:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-export?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/graphile-config", + "extracted_requirement": "0.0.1-beta.9:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/nodemon", - "extracted_requirement": "^3.0.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/postgraphile", + "extracted_requirement": "5.0.0-beta.26:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/nodemon?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/postgraphile?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40types/interpret", + "extracted_requirement": "^1.1.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", - "datasource_id": "npm_package_json" + "dependency_uid": "pkg:npm/%40types/interpret?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", + "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "^20.5.7", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40dataplan/json", - "extracted_requirement": "0.0.1-beta.20:*", - "scope": "peerDependencies", + "purl": "pkg:npm/%40types/semver", + "extracted_requirement": "^7.5.1", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40dataplan/json?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/%40types/semver?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40dataplan/pg", - "extracted_requirement": "0.0.1-beta.22:*", - "scope": "peerDependencies", + "purl": "pkg:npm/chalk", + "extracted_requirement": "^4.1.2", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40dataplan/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/chalk?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40envelop/core", - "extracted_requirement": "^5.0.0", - "scope": "peerDependencies", + "purl": "pkg:npm/debug", + "extracted_requirement": "^4.3.4", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40envelop/core?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafast", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", + "purl": "pkg:npm/interpret", + "extracted_requirement": "^3.1.1", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/interpret?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafserv", - "extracted_requirement": "0.1.1-beta.13:^", - "scope": "peerDependencies", + "purl": "pkg:npm/semver", + "extracted_requirement": "^7.5.4", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafserv?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/semver?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-build", - "extracted_requirement": "workspace:*", - "scope": "peerDependencies", + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-build-pg", - "extracted_requirement": "5.0.0-beta.25:*", - "scope": "peerDependencies", + "purl": "pkg:npm/yargs", + "extracted_requirement": "^17.7.2", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-build-pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/yargs?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/debug", + "extracted_requirement": "^4.1.8", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "^16.1.0-experimental-stream-defer.6", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/mocha", + "extracted_requirement": "^10.0.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/%40types/mocha?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg", - "extracted_requirement": "^8.7.1", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/chai", + "extracted_requirement": "^4.3.8", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/chai?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg-sql2", - "extracted_requirement": "workspace:^", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/mocha", + "extracted_requirement": "^10.2.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/mocha?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tamedevil", - "extracted_requirement": "0.0.0-beta.7:^", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tamedevil?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/postgraphile/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40docusaurus/core", - "extracted_requirement": "2.4.1", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/core?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-config/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40docusaurus/preset-classic", - "extracted_requirement": "2.4.1", + "purl": "pkg:npm/%40babel/generator", + "extracted_requirement": "^7.22.10", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -11494,14 +8529,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/preset-classic?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/%40babel/generator?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40docusaurus/remark-plugin-npm2yarn", - "extracted_requirement": "^2.4.1", + "purl": "pkg:npm/%40babel/parser", + "extracted_requirement": "^7.22.14", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -11509,14 +8544,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/remark-plugin-npm2yarn?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/%40babel/parser?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40docusaurus/theme-mermaid", - "extracted_requirement": "^2.4.1", + "purl": "pkg:npm/%40babel/template", + "extracted_requirement": "^7.22.5", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -11524,14 +8559,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/theme-mermaid?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/%40babel/template?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40fortawesome/fontawesome-svg-core", - "extracted_requirement": "^6.5.1", + "purl": "pkg:npm/%40babel/traverse", + "extracted_requirement": "^7.23.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -11539,14 +8574,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40fortawesome/fontawesome-svg-core?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/%40babel/traverse?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40fortawesome/free-brands-svg-icons", - "extracted_requirement": "^6.5.1", + "purl": "pkg:npm/%40babel/types", + "extracted_requirement": "^7.22.11", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -11554,14 +8589,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40fortawesome/free-brands-svg-icons?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/%40babel/types?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40fortawesome/free-regular-svg-icons", - "extracted_requirement": "^6.5.1", + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "^20.5.7", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -11569,14 +8604,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40fortawesome/free-regular-svg-icons?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40fortawesome/free-solid-svg-icons", - "extracted_requirement": "^6.5.1", + "purl": "pkg:npm/prettier", + "extracted_requirement": "^3.0.3", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -11584,14 +8619,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40fortawesome/free-solid-svg-icons?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/prettier?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40fortawesome/react-fontawesome", - "extracted_requirement": "^0.2.0", + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -11599,104 +8634,104 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40fortawesome/react-fontawesome?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40mdx-js/react", - "extracted_requirement": "^1.6.22", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/babel__generator", + "extracted_requirement": "^7.6.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40mdx-js/react?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/%40types/babel__generator?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/clsx", - "extracted_requirement": "^2.0.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/babel__template", + "extracted_requirement": "^7.4.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/clsx?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/%40types/babel__template?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/postcss-nested", - "extracted_requirement": "^6.0.1", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/postcss-nested?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/prism-react-renderer", - "extracted_requirement": "^2.0.6", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/prettier", + "extracted_requirement": "^3.0.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/prism-react-renderer?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/%40types/prettier?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/react", - "extracted_requirement": "^18.2.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/react?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/react-dom", - "extracted_requirement": "^18.2.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/react-dom?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40docusaurus/module-type-aliases", - "extracted_requirement": "2.4.1", + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -11704,59 +8739,59 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/module-type-aliases?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/postgraphile/website/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", - "scope": "dependencies", + "purl": "pkg:npm/eslint", + "extracted_requirement": "^8.48.0", + "scope": "peerDependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", + "dependency_uid": "pkg:npm/eslint?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/types", - "extracted_requirement": "^7.22.11", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/grafast", + "extracted_requirement": "0.1.1-beta.11:^", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/types?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", + "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/eslint", - "extracted_requirement": "^8.44.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/pg-sql2", + "extracted_requirement": "5.0.0-beta.6:^5.0.0-beta.6", + "scope": "peerDependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/eslint?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", + "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/graphile-export/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/estree", - "extracted_requirement": "^1.0.1", + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -11764,14 +8799,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/estree?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", + "purl": "pkg:npm/graphql", + "extracted_requirement": "16.1.0-experimental-stream-defer.6", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -11779,9 +8814,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", "datasource_id": "npm_package_json" }, { @@ -11795,8 +8830,23 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", + "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/pretty-format", + "extracted_requirement": "^29.6.3", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/pretty-format?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", "datasource_id": "npm_package_json" }, { @@ -11810,8 +8860,23 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", + "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", "datasource_id": "npm_package_json" }, { @@ -11825,13 +8890,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", + "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eslint", - "extracted_requirement": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0", + "purl": "pkg:npm/graphql", + "extracted_requirement": ">=15 <17", "scope": "peerDependencies", "is_runtime": true, "is_optional": false, @@ -11839,14 +8904,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eslint?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/eslint-plugin-graphile-export/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40typescript/vfs", - "extracted_requirement": "^1.5.0", + "purl": "pkg:npm/%40types/json5", + "extracted_requirement": "^2.2.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -11854,14 +8919,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40typescript/vfs?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile/package.json", + "dependency_uid": "pkg:npm/%40types/json5?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-simple/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/chalk", - "extracted_requirement": "^4.1.2", + "purl": "pkg:npm/json5", + "extracted_requirement": "^2.2.3", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -11869,14 +8934,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/chalk?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile/package.json", + "dependency_uid": "pkg:npm/json5?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-simple/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "workspace:^", + "purl": "pkg:npm/prettier", + "extracted_requirement": "^3.0.3", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -11884,9 +8949,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile/package.json", + "dependency_uid": "pkg:npm/prettier?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-simple/package.json", "datasource_id": "npm_package_json" }, { @@ -11900,23 +8965,8 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile/package.json", + "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-simple/package.json", "datasource_id": "npm_package_json" }, { @@ -11930,13 +8980,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile/package.json", + "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-simple/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "^20.5.7", + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -11944,14 +8994,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-simple/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", + "purl": "pkg:npm/pretty-format", + "extracted_requirement": "^29.6.3", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -11959,9 +9009,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile/package.json", + "dependency_uid": "pkg:npm/pretty-format?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-simple/package.json", "datasource_id": "npm_package_json" }, { @@ -11975,58 +9025,58 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile/package.json", + "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-simple/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-build", - "extracted_requirement": "5.0.0-beta.21:^", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/jest-serializer-simple/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphile-config", - "extracted_requirement": "0.0.1-beta.9:^", - "scope": "peerDependencies", + "purl": "pkg:npm/%40types/pg", + "extracted_requirement": "^8.10.2", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphile-config?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile/package.json", + "dependency_uid": "pkg:npm/%40types/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lds/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/postgraphile", - "extracted_requirement": "5.0.0-beta.26:^", - "scope": "peerDependencies", + "purl": "pkg:npm/%40types/ws", + "extracted_requirement": "^8.5.5", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/postgraphile?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile/package.json", + "dependency_uid": "pkg:npm/%40types/ws?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lds/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/interpret", - "extracted_requirement": "^1.1.1", + "purl": "pkg:npm/pg", + "extracted_requirement": "^8.11.3", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -12034,14 +9084,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/interpret?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", + "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lds/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "^20.5.7", + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -12049,14 +9099,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lds/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/semver", - "extracted_requirement": "^7.5.1", + "purl": "pkg:npm/ws", + "extracted_requirement": "^8.13.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -12064,69 +9114,69 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/semver?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", + "dependency_uid": "pkg:npm/ws?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lds/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/chalk", - "extracted_requirement": "^4.1.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/chalk?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lds/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/debug", - "extracted_requirement": "^4.3.4", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lds/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/interpret", - "extracted_requirement": "^3.1.1", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/interpret?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lds/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/semver", - "extracted_requirement": "^7.5.4", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/semver?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lds/package.json", "datasource_id": "npm_package_json" }, { @@ -12140,28 +9190,28 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", + "for_package_uid": "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/yargs", - "extracted_requirement": "^17.7.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/yargs?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/debug", - "extracted_requirement": "^4.1.8", + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "^20.5.7", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12169,14 +9219,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/mocha", - "extracted_requirement": "^10.0.1", + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12184,14 +9234,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/mocha?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/chai", - "extracted_requirement": "^4.3.8", + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12199,14 +9249,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/chai?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/mocha", - "extracted_requirement": "^10.2.0", + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12214,29 +9264,29 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/mocha?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/lru/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-introspection/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", + "purl": "pkg:npm/%40types/debug", + "extracted_requirement": "4.1.8", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12244,104 +9294,89 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-config/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/%40babel/generator", - "extracted_requirement": "^7.22.10", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/generator?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-introspection/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/parser", - "extracted_requirement": "^7.22.14", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/parser?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-introspection/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/template", - "extracted_requirement": "^7.22.5", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "20.5.7", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/template?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-introspection/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/traverse", - "extracted_requirement": "^7.23.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/traverse?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-introspection/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40babel/types", - "extracted_requirement": "^7.22.11", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/ts-node", + "extracted_requirement": "^10.9.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40babel/types?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-introspection/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "^20.5.7", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-introspection/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/prettier", - "extracted_requirement": "^3.0.3", + "purl": "pkg:npm/%40graphile/lru", + "extracted_requirement": "workspace:^", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -12349,9 +9384,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/prettier?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-sql2/package.json", "datasource_id": "npm_package_json" }, { @@ -12365,13 +9400,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-sql2/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/babel__generator", - "extracted_requirement": "^7.6.4", + "purl": "pkg:npm/%40types/debug", + "extracted_requirement": "4.1.8", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12379,14 +9414,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/babel__generator?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-sql2/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/babel__template", - "extracted_requirement": "^7.4.1", + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12394,14 +9429,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/babel__template?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-sql2/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "20.5.7", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12409,14 +9444,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-sql2/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/prettier", - "extracted_requirement": "^3.0.0", + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12424,14 +9459,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/prettier?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-sql2/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", + "purl": "pkg:npm/markdown-doctest", + "extracted_requirement": "^1.1.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12439,9 +9474,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/markdown-doctest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-sql2/package.json", "datasource_id": "npm_package_json" }, { @@ -12455,8 +9490,8 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-sql2/package.json", "datasource_id": "npm_package_json" }, { @@ -12470,53 +9505,53 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/pg-sql2/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/eslint", - "extracted_requirement": "^8.48.0", - "scope": "peerDependencies", + "purl": "pkg:npm/%40graphile/lru", + "extracted_requirement": "5.0.0-beta.3:^", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/eslint?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/tamedevil/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/grafast", - "extracted_requirement": "0.1.1-beta.11:^", - "scope": "peerDependencies", + "purl": "pkg:npm/tslib", + "extracted_requirement": "^2.6.2", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/grafast?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/tamedevil/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg-sql2", - "extracted_requirement": "5.0.0-beta.6:^5.0.0-beta.6", - "scope": "peerDependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/debug", + "extracted_requirement": "4.1.8", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg-sql2?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/graphile-export/package.json", + "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/tamedevil/package.json", "datasource_id": "npm_package_json" }, { @@ -12530,13 +9565,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", + "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/tamedevil/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": "16.1.0-experimental-stream-defer.6", + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "20.5.7", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12544,9 +9579,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/tamedevil/package.json", "datasource_id": "npm_package_json" }, { @@ -12560,13 +9595,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", + "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/tamedevil/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pretty-format", - "extracted_requirement": "^29.6.3", + "purl": "pkg:npm/markdown-doctest", + "extracted_requirement": "^1.1.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12574,9 +9609,9 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pretty-format?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", + "dependency_uid": "pkg:npm/markdown-doctest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/tamedevil/package.json", "datasource_id": "npm_package_json" }, { @@ -12590,13 +9625,13 @@ "resolved_package": {}, "extra_data": {}, "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", + "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/tamedevil/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12604,44 +9639,44 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/tamedevil/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40docusaurus/core", + "extracted_requirement": "2.4.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/core?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/graphql", - "extracted_requirement": ">=15 <17", - "scope": "peerDependencies", + "purl": "pkg:npm/%40docusaurus/preset-classic", + "extracted_requirement": "2.4.1", + "scope": "dependencies", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-graphql-schema/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/preset-classic?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/json5", - "extracted_requirement": "^2.2.0", + "purl": "pkg:npm/%40mdx-js/react", + "extracted_requirement": "^1.6.22", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -12649,14 +9684,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/json5?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-simple/package.json", + "dependency_uid": "pkg:npm/%40mdx-js/react?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/json5", - "extracted_requirement": "^2.2.3", + "purl": "pkg:npm/clsx", + "extracted_requirement": "^2.0.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -12664,14 +9699,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/json5?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-simple/package.json", + "dependency_uid": "pkg:npm/clsx?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/prettier", - "extracted_requirement": "^3.0.3", + "purl": "pkg:npm/prism-react-renderer", + "extracted_requirement": "^2.0.6", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -12679,14 +9714,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/prettier?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-simple/package.json", + "dependency_uid": "pkg:npm/prism-react-renderer?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", + "purl": "pkg:npm/react", + "extracted_requirement": "^18.2.0", "scope": "dependencies", "is_runtime": true, "is_optional": false, @@ -12694,29 +9729,29 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-simple/package.json", + "dependency_uid": "pkg:npm/react?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/react-dom", + "extracted_requirement": "^18.2.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-simple/package.json", + "dependency_uid": "pkg:npm/react-dom?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", + "purl": "pkg:npm/%40docusaurus/module-type-aliases", + "extracted_requirement": "2.4.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12724,44 +9759,44 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-simple/package.json", + "dependency_uid": "pkg:npm/%40docusaurus/module-type-aliases?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "crystal/utils/website/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pretty-format", - "extracted_requirement": "^29.6.3", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40changesets/changelog-github", + "extracted_requirement": "^0.4.8", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pretty-format?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-simple/package.json", + "dependency_uid": "pkg:npm/%40changesets/changelog-github?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, + "purl": "pkg:npm/%40changesets/cli", + "extracted_requirement": "^2.26.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-simple/package.json", + "dependency_uid": "pkg:npm/%40changesets/cli?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", + "purl": "pkg:npm/%40babel/cli", + "extracted_requirement": "^7.22.10", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12769,89 +9804,89 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/jest-serializer-simple/package.json", + "dependency_uid": "pkg:npm/%40babel/cli?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/pg", - "extracted_requirement": "^8.10.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40babel/core", + "extracted_requirement": "^7.22.11", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lds/package.json", + "dependency_uid": "pkg:npm/%40babel/core?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/ws", - "extracted_requirement": "^8.5.5", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40babel/eslint-parser", + "extracted_requirement": "^7.22.11", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/ws?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lds/package.json", + "dependency_uid": "pkg:npm/%40babel/eslint-parser?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/pg", - "extracted_requirement": "^8.11.3", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40babel/plugin-syntax-object-rest-spread", + "extracted_requirement": "^7.8.3", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lds/package.json", + "dependency_uid": "pkg:npm/%40babel/plugin-syntax-object-rest-spread?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40babel/plugin-transform-modules-commonjs", + "extracted_requirement": "^7.22.11", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lds/package.json", + "dependency_uid": "pkg:npm/%40babel/plugin-transform-modules-commonjs?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ws", - "extracted_requirement": "^8.13.0", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40babel/plugin-transform-runtime", + "extracted_requirement": "^7.22.10", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ws?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lds/package.json", + "dependency_uid": "pkg:npm/%40babel/plugin-transform-runtime?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", + "purl": "pkg:npm/%40babel/preset-env", + "extracted_requirement": "^7.22.14", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12859,14 +9894,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lds/package.json", + "dependency_uid": "pkg:npm/%40babel/preset-env?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", + "purl": "pkg:npm/%40babel/preset-react", + "extracted_requirement": "^7.22.5", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12874,14 +9909,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lds/package.json", + "dependency_uid": "pkg:npm/%40babel/preset-react?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", + "purl": "pkg:npm/%40babel/preset-typescript", + "extracted_requirement": "^7.22.11", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12889,14 +9924,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lds/package.json", + "dependency_uid": "pkg:npm/%40babel/preset-typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", + "purl": "pkg:npm/%40knodes/typedoc-plugin-monorepo-readmes", + "extracted_requirement": "^0.23.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12904,29 +9939,29 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lds/package.json", + "dependency_uid": "pkg:npm/%40knodes/typedoc-plugin-monorepo-readmes?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40knodes/typedoc-plugin-pages", + "extracted_requirement": "^0.23.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lru/package.json", + "dependency_uid": "pkg:npm/%40knodes/typedoc-plugin-pages?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", + "purl": "pkg:npm/prettier", + "extracted_requirement": "^2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12934,14 +9969,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lru/package.json", + "dependency_uid": "pkg:npm/prettier?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "^20.5.7", + "purl": "pkg:npm/%40tsconfig/node16", + "extracted_requirement": "^16.1.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12949,14 +9984,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lru/package.json", + "dependency_uid": "pkg:npm/%40tsconfig/node16?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "^29.5.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12964,14 +9999,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lru/package.json", + "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", + "purl": "pkg:npm/%40types/mock-fs", + "extracted_requirement": "4.13.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12979,14 +10014,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lru/package.json", + "dependency_uid": "pkg:npm/%40types/mock-fs?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "^20.5.7", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -12994,29 +10029,29 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/lru/package.json", + "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/%40types/rimraf", + "extracted_requirement": "^4.0.5", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-introspection/package.json", + "dependency_uid": "pkg:npm/%40types/rimraf?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/debug", - "extracted_requirement": "4.1.8", + "purl": "pkg:npm/%40typescript-eslint/eslint-plugin", + "extracted_requirement": "^6.5.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13024,14 +10059,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-introspection/package.json", + "dependency_uid": "pkg:npm/%40typescript-eslint/eslint-plugin?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", + "purl": "pkg:npm/%40typescript-eslint/parser", + "extracted_requirement": "^6.5.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13039,14 +10074,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-introspection/package.json", + "dependency_uid": "pkg:npm/%40typescript-eslint/parser?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "20.5.7", + "purl": "pkg:npm/%40typescript-eslint/typescript-estree", + "extracted_requirement": "^6.5.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13054,13 +10089,13 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-introspection/package.json", + "dependency_uid": "pkg:npm/%40typescript-eslint/typescript-estree?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", + "purl": "pkg:npm/babel-jest", "extracted_requirement": "^29.6.4", "scope": "devDependencies", "is_runtime": false, @@ -13069,14 +10104,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-introspection/package.json", + "dependency_uid": "pkg:npm/babel-jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", + "purl": "pkg:npm/babel-plugin-transform-import-meta", + "extracted_requirement": "^2.2.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13084,14 +10119,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-introspection/package.json", + "dependency_uid": "pkg:npm/babel-plugin-transform-import-meta?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", + "purl": "pkg:npm/concurrently", + "extracted_requirement": "^8.2.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13099,44 +10134,44 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-introspection/package.json", + "dependency_uid": "pkg:npm/concurrently?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40graphile/lru", - "extracted_requirement": "workspace:^", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/eslint", + "extracted_requirement": "^8.48.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-sql2/package.json", + "dependency_uid": "pkg:npm/eslint?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/eslint-config-prettier", + "extracted_requirement": "^9.0.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-sql2/package.json", + "dependency_uid": "pkg:npm/eslint-config-prettier?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/debug", - "extracted_requirement": "4.1.8", + "purl": "pkg:npm/eslint-plugin-graphql", + "extracted_requirement": "^4.0.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13144,14 +10179,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-sql2/package.json", + "dependency_uid": "pkg:npm/eslint-plugin-graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", + "purl": "pkg:npm/eslint-plugin-import", + "extracted_requirement": "^2.28.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13159,14 +10194,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-sql2/package.json", + "dependency_uid": "pkg:npm/eslint-plugin-import?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "20.5.7", + "purl": "pkg:npm/eslint-plugin-jest", + "extracted_requirement": "^27.2.3", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13174,14 +10209,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-sql2/package.json", + "dependency_uid": "pkg:npm/eslint-plugin-jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", + "purl": "pkg:npm/eslint-plugin-jsx-a11y", + "extracted_requirement": "^6.7.1", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13189,14 +10224,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-sql2/package.json", + "dependency_uid": "pkg:npm/eslint-plugin-jsx-a11y?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/markdown-doctest", - "extracted_requirement": "^1.1.0", + "purl": "pkg:npm/eslint-plugin-react", + "extracted_requirement": "^7.33.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13204,14 +10239,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/markdown-doctest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-sql2/package.json", + "dependency_uid": "pkg:npm/eslint-plugin-react?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", + "purl": "pkg:npm/eslint-plugin-react-hooks", + "extracted_requirement": "^4.6.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13219,14 +10254,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-sql2/package.json", + "dependency_uid": "pkg:npm/eslint-plugin-react-hooks?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", + "purl": "pkg:npm/eslint-plugin-simple-import-sort", + "extracted_requirement": "^10.0.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13234,44 +10269,44 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/pg-sql2/package.json", + "dependency_uid": "pkg:npm/eslint-plugin-simple-import-sort?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40graphile/lru", - "extracted_requirement": "5.0.0-beta.3:^", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/eslint-plugin-tsdoc", + "extracted_requirement": "^0.2.17", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40graphile/lru?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/tamedevil/package.json", + "dependency_uid": "pkg:npm/eslint-plugin-tsdoc?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/tslib", - "extracted_requirement": "^2.6.2", - "scope": "dependencies", - "is_runtime": true, - "is_optional": false, + "purl": "pkg:npm/eslint_d", + "extracted_requirement": "^12.2.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, "is_resolved": false, "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/tslib?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/tamedevil/package.json", + "dependency_uid": "pkg:npm/eslint_d?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/debug", - "extracted_requirement": "4.1.8", + "purl": "pkg:npm/glob", + "extracted_requirement": "^10.3.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13279,14 +10314,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/debug?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/tamedevil/package.json", + "dependency_uid": "pkg:npm/glob?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/jest", - "extracted_requirement": "^29.5.4", + "purl": "pkg:npm/graphql", + "extracted_requirement": "16.1.0-experimental-stream-defer.6", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13294,14 +10329,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/tamedevil/package.json", + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/%40types/node", - "extracted_requirement": "20.5.7", + "purl": "pkg:npm/jest", + "extracted_requirement": "^29.6.4", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13309,14 +10344,14 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/%40types/node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/tamedevil/package.json", + "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/jest", - "extracted_requirement": "^29.6.4", + "purl": "pkg:npm/mock-fs", + "extracted_requirement": "^5.2.0", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13324,14 +10359,89 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/jest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/tamedevil/package.json", + "dependency_uid": "pkg:npm/mock-fs?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", "datasource_id": "npm_package_json" }, { - "purl": "pkg:npm/markdown-doctest", - "extracted_requirement": "^1.1.0", + "purl": "pkg:npm/pg", + "extracted_requirement": "^8.11.3", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/prettier", + "extracted_requirement": "^3.0.3", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/prettier?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/rimraf", + "extracted_requirement": "^5.0.1", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/rimraf?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/typedoc", + "extracted_requirement": "^0.25.0", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/typedoc?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/typedoc-monorepo-link-types", + "extracted_requirement": "^0.0.4", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/typedoc-monorepo-link-types?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/typescript", + "extracted_requirement": "^5.2.2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -13339,160 +10449,3050 @@ "is_direct": true, "resolved_package": {}, "extra_data": {}, - "dependency_uid": "pkg:npm/markdown-doctest?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/tamedevil/package.json", - "datasource_id": "npm_package_json" + "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/webpack", + "extracted_requirement": "^5.88.2", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/webpack?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/zx", + "extracted_requirement": "^7.2.3", + "scope": "devDependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/zx?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/graphql", + "extracted_requirement": "16.1.0-experimental-stream-defer.6", + "scope": "resolutions", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {}, + "dependency_uid": "pkg:npm/graphql?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/package.json", + "datasource_id": "npm_package_json" + }, + { + "purl": "pkg:npm/%40aashutoshrathi/word-wrap@1.2.6", + "extracted_requirement": "1.2.6", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": "@aashutoshrathi", + "name": "word-wrap", + "version": "1.2.6", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/%40aashutoshrathi/word-wrap@1.2.6" + }, + "extra_data": {}, + "dependency_uid": "pkg:npm/%40aashutoshrathi/word-wrap@1.2.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" + }, + { + "purl": "pkg:npm/%40algolia/autocomplete-core@1.9.3", + "extracted_requirement": "1.9.3", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": "@algolia", + "name": "autocomplete-core", + "version": "1.9.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40algolia/autocomplete-plugin-algolia-insights", + "extracted_requirement": "npm:1.9.3", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40algolia/autocomplete-shared", + "extracted_requirement": "npm:1.9.3", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/%40algolia/autocomplete-core@1.9.3" + }, + "extra_data": {}, + "dependency_uid": "pkg:npm/%40algolia/autocomplete-core@1.9.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" + }, + { + "purl": "pkg:npm/%40algolia/autocomplete-plugin-algolia-insights@1.9.3", + "extracted_requirement": "1.9.3", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": "@algolia", + "name": "autocomplete-plugin-algolia-insights", + "version": "1.9.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40algolia/autocomplete-shared", + "extracted_requirement": "npm:1.9.3", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/search-insights", + "extracted_requirement": ">= 1 < 3", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/%40algolia/autocomplete-plugin-algolia-insights@1.9.3" + }, + "extra_data": {}, + "dependency_uid": "pkg:npm/%40algolia/autocomplete-plugin-algolia-insights@1.9.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" + }, + { + "purl": "pkg:npm/%40babel/cli@7.22.10", + "extracted_requirement": "7.22.10", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": "@babel", + "name": "cli", + "version": "7.22.10", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40jridgewell/trace-mapping", + "extracted_requirement": "npm:^0.3.17", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40nicolo-ribaudo/chokidar-2", + "extracted_requirement": "npm:2.1.8-no-fsevents.3", + "scope": "dependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/chokidar", + "extracted_requirement": "npm:^3.4.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/commander", + "extracted_requirement": "npm:^4.0.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/convert-source-map", + "extracted_requirement": "npm:^1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/fs-readdir-recursive", + "extracted_requirement": "npm:^1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/glob", + "extracted_requirement": "npm:^7.2.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/make-dir", + "extracted_requirement": "npm:^2.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/slash", + "extracted_requirement": "npm:^2.0.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40babel/core", + "extracted_requirement": "^7.0.0-0", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/%40babel/cli@7.22.10" + }, + "extra_data": {}, + "dependency_uid": "pkg:npm/%40babel/cli@7.22.10?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" + }, + { + "purl": "pkg:npm/%40graphql-tools/utils@7.10.0", + "extracted_requirement": "7.10.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": "@graphql-tools", + "name": "utils", + "version": "7.10.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40ardatan/aggregate-error", + "extracted_requirement": "npm:0.0.6", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/camel-case", + "extracted_requirement": "npm:4.1.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tslib", + "extracted_requirement": "npm:~2.2.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphql", + "extracted_requirement": "^14.0.0 || ^15.0.0", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/%40graphql-tools/utils@7.10.0" + }, + "extra_data": {}, + "dependency_uid": "pkg:npm/%40graphql-tools/utils@7.10.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" + }, + { + "purl": "pkg:npm/%40graphql-tools/utils@9.2.1", + "extracted_requirement": "9.2.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": "@graphql-tools", + "name": "utils", + "version": "9.2.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40graphql-typed-document-node/core", + "extracted_requirement": "npm:^3.1.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tslib", + "extracted_requirement": "npm:^2.4.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphql", + "extracted_requirement": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/%40graphql-tools/utils@9.2.1" + }, + "extra_data": {}, + "dependency_uid": "pkg:npm/%40graphql-tools/utils@9.2.1?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" + }, + { + "purl": "pkg:npm/%40graphql-tools/wrap@7.0.8", + "extracted_requirement": "7.0.8", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": "@graphql-tools", + "name": "wrap", + "version": "7.0.8", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40graphql-tools/delegate", + "extracted_requirement": "npm:^7.1.5", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40graphql-tools/schema", + "extracted_requirement": "npm:^7.1.5", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40graphql-tools/utils", + "extracted_requirement": "npm:^7.8.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tslib", + "extracted_requirement": "npm:~2.2.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/value-or-promise", + "extracted_requirement": "npm:1.0.6", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphql", + "extracted_requirement": "^14.0.0 || ^15.0.0", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/%40graphql-tools/wrap@7.0.8" + }, + "extra_data": {}, + "dependency_uid": "pkg:npm/%40graphql-tools/wrap@7.0.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" + }, + { + "purl": "pkg:npm/graphile-build-pg@workspace:graphile-build/graphile-build-pg", + "extracted_requirement": "workspace:graphile-build/graphile-build-pg", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": "", + "name": "graphile-build-pg", + "version": "workspace:graphile-build/graphile-build-pg", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40envelop/core", + "extracted_requirement": "npm:^5.0.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40envelop/parser-cache", + "extracted_requirement": "npm:^7.0.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40envelop/validation-cache", + "extracted_requirement": "npm:^7.0.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/debug", + "extracted_requirement": "npm:^4.1.8", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/express", + "extracted_requirement": "npm:^4.17.17", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "npm:^29.5.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/jsonwebtoken", + "extracted_requirement": "npm:^9.0.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "npm:^20.5.7", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/chalk", + "extracted_requirement": "npm:^4.1.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/debug", + "extracted_requirement": "npm:^4.3.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/express", + "extracted_requirement": "npm:^4.19.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/express-graphql", + "extracted_requirement": "npm:^0.12.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/fastify", + "extracted_requirement": "npm:^4.22.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/fastify-static", + "extracted_requirement": "npm:^4.7.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphile-config", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphile-export", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphql-helix", + "extracted_requirement": "npm:^1.13.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphql-ws", + "extracted_requirement": "npm:^5.14.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/jest", + "extracted_requirement": "npm:^29.6.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/jsonwebtoken", + "extracted_requirement": "npm:^9.0.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/pg", + "extracted_requirement": "^8.7.1", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/pg-introspection", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/ruru", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/ts-node", + "extracted_requirement": "npm:^10.9.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tslib", + "extracted_requirement": "npm:^2.6.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/typescript", + "extracted_requirement": "npm:^5.2.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/ws", + "extracted_requirement": "npm:^8.13.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40dataplan/pg", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphile-build", + "extracted_requirement": "workspace:*", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/pg-sql2", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tamedevil", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/graphile-build-pg@workspace:graphile-build/graphile-build-pg" + }, + "extra_data": {}, + "dependency_uid": "pkg:npm/graphile-build-pg@workspace:graphile-build/graphile-build-pg?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" + }, + { + "purl": "pkg:npm/graphile-build@workspace:graphile-build/graphile-build", + "extracted_requirement": "workspace:graphile-build/graphile-build", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "npm", + "namespace": "", + "name": "graphile-build", + "version": "workspace:graphile-build/graphile-build", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40types/debug", + "extracted_requirement": "npm:^4.1.8", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "npm:^29.5.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "npm:^20.5.7", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/pluralize", + "extracted_requirement": "npm:^0.0.30", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/semver", + "extracted_requirement": "npm:^7.5.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/chalk", + "extracted_requirement": "npm:^4.1.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/debug", + "extracted_requirement": "npm:^4.3.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphile-config", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphile-export", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/jest", + "extracted_requirement": "npm:^29.6.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/lodash", + "extracted_requirement": "npm:^4.17.21", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/pluralize", + "extracted_requirement": "npm:^7.0.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/semver", + "extracted_requirement": "npm:^7.5.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tamedevil", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/ts-node", + "extracted_requirement": "npm:^10.9.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tslib", + "extracted_requirement": "npm:^2.6.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/typescript", + "extracted_requirement": "npm:^5.2.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/graphile-build@workspace:graphile-build/graphile-build" + }, + "extra_data": {}, + "dependency_uid": "pkg:npm/graphile-build@workspace:graphile-build/graphile-build?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" }, { - "purl": "pkg:npm/ts-node", - "extracted_requirement": "^10.9.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, + "purl": "pkg:npm/graphile-export@workspace:utils/graphile-export", + "extracted_requirement": "workspace:utils/graphile-export", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, "is_direct": true, - "resolved_package": {}, + "resolved_package": { + "type": "npm", + "namespace": "", + "name": "graphile-export", + "version": "workspace:utils/graphile-export", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40babel/generator", + "extracted_requirement": "npm:^7.22.10", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40babel/parser", + "extracted_requirement": "npm:^7.22.14", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40babel/template", + "extracted_requirement": "npm:^7.22.5", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40babel/traverse", + "extracted_requirement": "npm:^7.23.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40babel/types", + "extracted_requirement": "npm:^7.22.11", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/babel__generator", + "extracted_requirement": "npm:^7.6.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/babel__template", + "extracted_requirement": "npm:^7.4.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "npm:^29.5.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "npm:^20.5.7", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/prettier", + "extracted_requirement": "npm:^3.0.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/jest", + "extracted_requirement": "npm:^29.6.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/prettier", + "extracted_requirement": "npm:^3.0.3", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/ts-node", + "extracted_requirement": "npm:^10.9.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tslib", + "extracted_requirement": "npm:^2.6.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/typescript", + "extracted_requirement": "npm:^5.2.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/eslint", + "extracted_requirement": "^8.48.0", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/pg-sql2", + "extracted_requirement": "workspace:^5.0.0-beta.6", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/graphile-export@workspace:utils/graphile-export" + }, "extra_data": {}, - "dependency_uid": "pkg:npm/ts-node?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/tamedevil/package.json", - "datasource_id": "npm_package_json" + "dependency_uid": "pkg:npm/graphile-export@workspace:utils/graphile-export?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" }, { - "purl": "pkg:npm/typescript", - "extracted_requirement": "^5.2.2", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, + "purl": "pkg:npm/graphile-utils@workspace:graphile-build/graphile-utils", + "extracted_requirement": "workspace:graphile-build/graphile-utils", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, "is_direct": true, - "resolved_package": {}, + "resolved_package": { + "type": "npm", + "namespace": "", + "name": "graphile-utils", + "version": "workspace:graphile-build/graphile-utils", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/debug", + "extracted_requirement": "npm:^4.3.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphile-build", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphile-build-pg", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/jest", + "extracted_requirement": "npm:^29.6.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/jest-serializer-graphql-schema", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/json5", + "extracted_requirement": "npm:^2.2.3", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/nodemon", + "extracted_requirement": "npm:^3.0.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/postgraphile", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/ts-node", + "extracted_requirement": "npm:^10.9.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tslib", + "extracted_requirement": "npm:^2.6.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/typescript", + "extracted_requirement": "npm:^5.2.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40dataplan/pg", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphile-config", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tamedevil", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/graphile-utils@workspace:graphile-build/graphile-utils" + }, "extra_data": {}, - "dependency_uid": "pkg:npm/typescript?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/tamedevil/package.json", - "datasource_id": "npm_package_json" + "dependency_uid": "pkg:npm/graphile-utils@workspace:graphile-build/graphile-utils?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" }, { - "purl": "pkg:npm/%40docusaurus/core", - "extracted_requirement": "2.4.1", + "purl": "pkg:npm/graphile@workspace:utils/graphile", + "extracted_requirement": "workspace:utils/graphile", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": false, + "is_resolved": true, "is_direct": true, - "resolved_package": {}, + "resolved_package": { + "type": "npm", + "namespace": "", + "name": "graphile", + "version": "workspace:utils/graphile", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "npm:^29.5.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "npm:^20.5.7", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40typescript/vfs", + "extracted_requirement": "npm:^1.5.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/chalk", + "extracted_requirement": "npm:^4.1.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphile-config", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/jest", + "extracted_requirement": "npm:^29.6.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/ts-node", + "extracted_requirement": "npm:^10.9.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tslib", + "extracted_requirement": "npm:^2.6.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/typescript", + "extracted_requirement": "npm:^5.2.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphile-build", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/postgraphile", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/graphile@workspace:utils/graphile" + }, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/core?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/website/package.json", - "datasource_id": "npm_package_json" + "dependency_uid": "pkg:npm/graphile@workspace:utils/graphile?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" }, { - "purl": "pkg:npm/%40docusaurus/preset-classic", - "extracted_requirement": "2.4.1", + "purl": "pkg:npm/jest-haste-map@29.6.4", + "extracted_requirement": "29.6.4", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": false, + "is_resolved": true, "is_direct": true, - "resolved_package": {}, + "resolved_package": { + "type": "npm", + "namespace": "", + "name": "jest-haste-map", + "version": "29.6.4", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40jest/types", + "extracted_requirement": "npm:^29.6.3", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/graceful-fs", + "extracted_requirement": "npm:^4.1.3", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "npm:*", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/anymatch", + "extracted_requirement": "npm:^3.0.3", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/fb-watchman", + "extracted_requirement": "npm:^2.0.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/fsevents", + "extracted_requirement": "npm:^2.3.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": true, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graceful-fs", + "extracted_requirement": "npm:^4.2.9", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/jest-regex-util", + "extracted_requirement": "npm:^29.6.3", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/jest-util", + "extracted_requirement": "npm:^29.6.3", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/jest-worker", + "extracted_requirement": "npm:^29.6.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/micromatch", + "extracted_requirement": "npm:^4.0.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/walker", + "extracted_requirement": "npm:^1.0.8", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/jest-haste-map@29.6.4" + }, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/preset-classic?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/website/package.json", - "datasource_id": "npm_package_json" + "dependency_uid": "pkg:npm/jest-haste-map@29.6.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" }, { - "purl": "pkg:npm/%40mdx-js/react", - "extracted_requirement": "^1.6.22", + "purl": "pkg:npm/ruru-components@workspace:grafast/ruru-components", + "extracted_requirement": "workspace:grafast/ruru-components", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": false, + "is_resolved": true, "is_direct": true, - "resolved_package": {}, + "resolved_package": { + "type": "npm", + "namespace": "", + "name": "ruru-components", + "version": "workspace:grafast/ruru-components", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40graphiql/plugin-explorer", + "extracted_requirement": "npm:^1.0.3-canary-64994e0e.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40graphiql/react", + "extracted_requirement": "npm:^0.20.3-canary-64994e0e.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40graphiql/toolkit", + "extracted_requirement": "npm:^0.9.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/codemirror", + "extracted_requirement": "npm:^5.60.9", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/debug", + "extracted_requirement": "npm:^4.1.8", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/jest", + "extracted_requirement": "npm:^29.5.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "npm:^20.5.7", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/nodemon", + "extracted_requirement": "npm:1.19.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/react", + "extracted_requirement": "npm:^18.2.21", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/react-dom", + "extracted_requirement": "npm:^18.2.7", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/grafast", + "extracted_requirement": "workspace:^", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphiql", + "extracted_requirement": "npm:^3.1.1-canary-64994e0e.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphql", + "extracted_requirement": "^16.1.0-experimental-stream-defer.6", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/graphql-ws", + "extracted_requirement": "npm:^5.14.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/jest", + "extracted_requirement": "npm:^29.6.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/nodemon", + "extracted_requirement": "npm:^3.0.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/react", + "extracted_requirement": "npm:^18.2.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/react-dom", + "extracted_requirement": "npm:^18.2.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tslib", + "extracted_requirement": "npm:^2.6.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/typescript", + "extracted_requirement": "npm:^5.2.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tamedevil", + "extracted_requirement": "workspace:^", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/ruru-components@workspace:grafast/ruru-components" + }, "extra_data": {}, - "dependency_uid": "pkg:npm/%40mdx-js/react?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/website/package.json", - "datasource_id": "npm_package_json" + "dependency_uid": "pkg:npm/ruru-components@workspace:grafast/ruru-components?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" }, { - "purl": "pkg:npm/clsx", - "extracted_requirement": "^2.0.0", + "purl": "pkg:npm/typescript@5.2.2", + "extracted_requirement": "5.2.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": false, + "is_resolved": true, "is_direct": true, - "resolved_package": {}, + "resolved_package": { + "type": "npm", + "namespace": "", + "name": "typescript", + "version": "5.2.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/typescript@5.2.2" + }, "extra_data": {}, - "dependency_uid": "pkg:npm/clsx?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/website/package.json", - "datasource_id": "npm_package_json" + "dependency_uid": "pkg:npm/typescript@5.2.2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" }, { - "purl": "pkg:npm/prism-react-renderer", - "extracted_requirement": "^2.0.6", + "purl": "pkg:npm/typescript%40patch:typescript@npm%253A5.2.2%23optional%21builtin%3Ccompat/typescript%3E::version%3D5.2.2%26hash%3Dad5954", + "extracted_requirement": "npm%3A5.2.2#optional!builtin::version=5.2.2&hash=ad5954", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": false, + "is_resolved": true, "is_direct": true, - "resolved_package": {}, + "resolved_package": { + "type": "npm", + "namespace": "", + "name": "typescript@patch:typescript", + "version": "npm%3A5.2.2#optional!builtin::version=5.2.2&hash=ad5954", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/typescript%40patch:typescript@npm%253A5.2.2%23optional%21builtin%3Ccompat/typescript%3E::version%3D5.2.2%26hash%3Dad5954" + }, "extra_data": {}, - "dependency_uid": "pkg:npm/prism-react-renderer?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/website/package.json", - "datasource_id": "npm_package_json" + "dependency_uid": "pkg:npm/typescript%40patch:typescript@npm%253A5.2.2%23optional%21builtin%3Ccompat/typescript%3E::version%3D5.2.2%26hash%3Dad5954?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" }, { - "purl": "pkg:npm/react", - "extracted_requirement": "^18.2.0", + "purl": "pkg:npm/use-sidecar@1.1.2", + "extracted_requirement": "1.1.2", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": false, + "is_resolved": true, "is_direct": true, - "resolved_package": {}, + "resolved_package": { + "type": "npm", + "namespace": "", + "name": "use-sidecar", + "version": "1.1.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/detect-node-es", + "extracted_requirement": "npm:^1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/tslib", + "extracted_requirement": "npm:^2.0.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/react", + "extracted_requirement": "^16.9.0 || ^17.0.0 || ^18.0.0", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/react", + "extracted_requirement": "^16.8.0 || ^17.0.0 || ^18.0.0", + "scope": "peerDependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/use-sidecar@1.1.2" + }, "extra_data": {}, - "dependency_uid": "pkg:npm/react?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/website/package.json", - "datasource_id": "npm_package_json" + "dependency_uid": "pkg:npm/use-sidecar@1.1.2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" }, { - "purl": "pkg:npm/react-dom", - "extracted_requirement": "^18.2.0", + "purl": "pkg:npm/zx@7.2.3", + "extracted_requirement": "7.2.3", "scope": "dependencies", "is_runtime": true, "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {}, - "dependency_uid": "pkg:npm/react-dom?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/website/package.json", - "datasource_id": "npm_package_json" - }, - { - "purl": "pkg:npm/%40docusaurus/module-type-aliases", - "extracted_requirement": "2.4.1", - "scope": "devDependencies", - "is_runtime": false, - "is_optional": true, - "is_resolved": false, + "is_resolved": true, "is_direct": true, - "resolved_package": {}, + "resolved_package": { + "type": "npm", + "namespace": "", + "name": "zx", + "version": "7.2.3", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40types/fs-extra", + "extracted_requirement": "npm:^11.0.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/minimist", + "extracted_requirement": "npm:^1.2.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/node", + "extracted_requirement": "npm:^18.16.3", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/ps-tree", + "extracted_requirement": "npm:^1.1.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/%40types/which", + "extracted_requirement": "npm:^3.0.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/chalk", + "extracted_requirement": "npm:^5.2.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/fs-extra", + "extracted_requirement": "npm:^11.1.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/fx", + "extracted_requirement": "npm:*", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/globby", + "extracted_requirement": "npm:^13.1.4", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/minimist", + "extracted_requirement": "npm:^1.2.8", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/node-fetch", + "extracted_requirement": "npm:3.3.1", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/ps-tree", + "extracted_requirement": "npm:^1.2.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/webpod", + "extracted_requirement": "npm:^0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/which", + "extracted_requirement": "npm:^3.0.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/yaml", + "extracted_requirement": "npm:^2.2.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v2", + "purl": "pkg:npm/zx@7.2.3" + }, "extra_data": {}, - "dependency_uid": "pkg:npm/%40docusaurus/module-type-aliases?uuid=fixed-uid-done-for-testing-5642512d1758", - "for_package_uid": "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "crystal/utils/website/package.json", - "datasource_id": "npm_package_json" + "dependency_uid": "pkg:npm/zx@7.2.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": null, + "datafile_path": "crystal/yarn.lock", + "datasource_id": "yarn_lock_v2" } ], "files": [ @@ -13507,14 +13507,46 @@ "path": "crystal/grafast", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/simplify-inflection@8.0.0-beta.5?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { "path": "crystal/grafast/bench", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -13710,7 +13742,9 @@ "path": "crystal/grafast/dataplan-json", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -13891,7 +13925,9 @@ "path": "crystal/grafast/dataplan-pg", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -14417,7 +14453,9 @@ "path": "crystal/grafast/grafast", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -14880,14 +14918,18 @@ "path": "crystal/grafast/grafserv", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { "path": "crystal/grafast/grafserv-persisted", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -15577,14 +15619,18 @@ "path": "crystal/grafast/ruru", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { "path": "crystal/grafast/ruru-components", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -16268,7 +16314,9 @@ "path": "crystal/grafast/website", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -16510,21 +16558,55 @@ "path": "crystal/graphile-build", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/simplify-inflection@8.0.0-beta.5?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { "path": "crystal/graphile-build/graphile-build", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { "path": "crystal/graphile-build/graphile-build-pg", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -17372,7 +17454,9 @@ "path": "crystal/graphile-build/graphile-simplify-inflection", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40graphile/simplify-inflection@8.0.0-beta.5?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -17508,7 +17592,9 @@ "path": "crystal/graphile-build/graphile-utils", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -17813,7 +17899,9 @@ "path": "crystal/graphile-build/website", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -18161,8 +18249,8 @@ "extra_data": {} }, { - "purl": "pkg:npm/%40localrepo/prettier2-for-jest", - "extracted_requirement": "npm:prettier@^2", + "purl": "pkg:npm/prettier", + "extracted_requirement": "^2", "scope": "devDependencies", "is_runtime": false, "is_optional": true, @@ -18564,21 +18652,83 @@ "purl": null } ], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/simplify-inflection@8.0.0-beta.5?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { "path": "crystal/postgraphile", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/simplify-inflection@8.0.0-beta.5?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { "path": "crystal/postgraphile/pgl", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -19019,7 +19169,9 @@ "path": "crystal/postgraphile/postgraphile", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -19602,7 +19754,9 @@ "path": "crystal/postgraphile/website", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -19844,14 +19998,46 @@ "path": "crystal/utils", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/simplify-inflection@8.0.0-beta.5?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { "path": "crystal/utils/eslint-plugin-graphile-export", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -20053,14 +20239,18 @@ "path": "crystal/utils/graphile", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { "path": "crystal/utils/graphile-config", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -20326,7 +20516,9 @@ "path": "crystal/utils/graphile-export", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -20857,7 +21049,9 @@ "path": "crystal/utils/jest-serializer-graphql-schema", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -21044,7 +21238,9 @@ "path": "crystal/utils/jest-serializer-simple", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -21242,7 +21438,9 @@ "path": "crystal/utils/lds", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -21445,7 +21643,9 @@ "path": "crystal/utils/lru", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -21612,7 +21812,9 @@ "path": "crystal/utils/pg-introspection", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -21797,7 +21999,9 @@ "path": "crystal/utils/pg-sql2", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -22005,7 +22209,9 @@ "path": "crystal/utils/tamedevil", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -22213,7 +22419,9 @@ "path": "crystal/utils/website", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { @@ -25336,7 +25544,37 @@ "purl": null } ], - "for_packages": [], + "for_packages": [ + "pkg:npm/%40localrepo/grafast-bench@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40dataplan/json@0.0.1-beta.20?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40dataplan/pg@0.0.1-beta.22?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/grafast@0.1.1-beta.11?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/grafserv@0.1.1-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40grafserv/persisted@0.0.0-beta.23?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/ruru@2.0.0-beta.13?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/ruru-components@2.0.0-beta.19?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/grafast-website@0.0.1-beta.12?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-build@5.0.0-beta.21?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-build-pg@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/simplify-inflection@8.0.0-beta.5?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-utils@5.0.0-beta.25?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/graphile-build-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pgl@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/postgraphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/postgraphile-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/eslint-plugin-graphile-export@0.0.2-beta.4?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile@5.0.0-beta.26?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-config@0.0.1-beta.9?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/graphile-export@0.0.2-beta.16?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/jest-serializer-graphql-schema@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/jest-serializer-simple@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/lds@5.0.0-beta.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40graphile/lru@5.0.0-beta.3?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pg-introspection@0.0.1-beta.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/pg-sql2@5.0.0-beta.6?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/tamedevil@0.0.0-beta.7?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:npm/%40localrepo/star-website@0.0.0?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] } ] diff --git a/tests/packagedcode/data/npm/yarn-lock/v1-alias/yarn.lock b/tests/packagedcode/data/npm/yarn-lock/v1-alias/yarn.lock new file mode 100644 index 00000000000..51b688b7921 --- /dev/null +++ b/tests/packagedcode/data/npm/yarn-lock/v1-alias/yarn.lock @@ -0,0 +1,14 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== + dependencies: + string-width "^5.1.2" + string-width-cjs "npm:string-width@^4.2.0" + strip-ansi "^7.0.1" + strip-ansi-cjs "npm:strip-ansi@^6.0.1" + wrap-ansi "^8.1.0" diff --git a/tests/packagedcode/data/npm/yarn-lock/v1-alias/yarn.lock-expected b/tests/packagedcode/data/npm/yarn-lock/v1-alias/yarn.lock-expected new file mode 100644 index 00000000000..5c6d955a7eb --- /dev/null +++ b/tests/packagedcode/data/npm/yarn-lock/v1-alias/yarn.lock-expected @@ -0,0 +1,157 @@ +[ + { + "type": "npm", + "namespace": null, + "name": null, + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/%40isaacs/cliui@8.0.2", + "extracted_requirement": "^8.0.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "npm", + "namespace": "@isaacs", + "name": "cliui", + "version": "8.0.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "JavaScript", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz", + "size": null, + "sha1": "b37667b7bc181c168782259bab42474fbf52b550", + "md5": null, + "sha256": null, + "sha512": "3bc8dc8da6d76a578e1bd0d0d3e0115d66414df9cfe16340ab3ba224aee5978e009b118abff2763384cf8f18d8df39c109fbc15c5cee726d6dc1dc85c9b16a10", + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:npm/string-width", + "extracted_requirement": "^5.1.2", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/string-width", + "extracted_requirement": "^4.2.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/strip-ansi", + "extracted_requirement": "^7.0.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/strip-ansi", + "extracted_requirement": "^6.0.1", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:npm/wrap-ansi", + "extracted_requirement": "^8.1.0", + "scope": "dependencies", + "is_runtime": true, + "is_optional": false, + "is_resolved": false, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": "https://www.npmjs.com/package/@isaacs/cliui", + "repository_download_url": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "api_data_url": "https://registry.npmjs.org/@isaacs%2fcliui/8.0.2", + "datasource_id": "yarn_lock_v1", + "purl": "pkg:npm/%40isaacs/cliui@8.0.2" + }, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "yarn_lock_v1", + "purl": null + } +] \ No newline at end of file diff --git a/tests/packagedcode/data/plugin/maven-package-expected.json b/tests/packagedcode/data/plugin/maven-package-expected.json index 82012a5cc8e..9c548288fe7 100644 --- a/tests/packagedcode/data/plugin/maven-package-expected.json +++ b/tests/packagedcode/data/plugin/maven-package-expected.json @@ -1424,10 +1424,10 @@ "start_line": 1, "end_line": 1, "matcher": "2-aho", - "score": 75.0, + "score": 60.0, "matched_length": 1, "match_coverage": 100.0, - "rule_relevance": 75, + "rule_relevance": 60, "rule_identifier": "lgpl_bare_single_word.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl_bare_single_word.RULE", "matched_text": "- name: LGPL" @@ -1448,7 +1448,7 @@ "matched_text": " url: http://www.gnu.org/copyleft/lesser.html" } ], - "identifier": "lgpl_2_0_plus_and_lgpl_2_1_plus-b52b959e-48c6-d927-c4d0-cf7842fb12fa" + "identifier": "lgpl_2_0_plus_and_lgpl_2_1_plus-99bbf99a-48ea-24c4-e2df-f242abe6446f" } ], "other_license_expression": null, @@ -9312,10 +9312,10 @@ "start_line": 1, "end_line": 1, "matcher": "2-aho", - "score": 75.0, + "score": 60.0, "matched_length": 1, "match_coverage": 100.0, - "rule_relevance": 75, + "rule_relevance": 60, "rule_identifier": "lgpl_bare_single_word.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl_bare_single_word.RULE", "matched_text": "- name: LGPL" @@ -9336,7 +9336,7 @@ "matched_text": " url: http://www.gnu.org/copyleft/lesser.html" } ], - "identifier": "lgpl_2_0_plus_and_lgpl_2_1_plus-b52b959e-48c6-d927-c4d0-cf7842fb12fa" + "identifier": "lgpl_2_0_plus_and_lgpl_2_1_plus-99bbf99a-48ea-24c4-e2df-f242abe6446f" } ], "other_license_expression": null, diff --git a/tests/packagedcode/data/plugin/maven-package-with-license-expected.json b/tests/packagedcode/data/plugin/maven-package-with-license-expected.json index 82012a5cc8e..9c548288fe7 100644 --- a/tests/packagedcode/data/plugin/maven-package-with-license-expected.json +++ b/tests/packagedcode/data/plugin/maven-package-with-license-expected.json @@ -1424,10 +1424,10 @@ "start_line": 1, "end_line": 1, "matcher": "2-aho", - "score": 75.0, + "score": 60.0, "matched_length": 1, "match_coverage": 100.0, - "rule_relevance": 75, + "rule_relevance": 60, "rule_identifier": "lgpl_bare_single_word.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl_bare_single_word.RULE", "matched_text": "- name: LGPL" @@ -1448,7 +1448,7 @@ "matched_text": " url: http://www.gnu.org/copyleft/lesser.html" } ], - "identifier": "lgpl_2_0_plus_and_lgpl_2_1_plus-b52b959e-48c6-d927-c4d0-cf7842fb12fa" + "identifier": "lgpl_2_0_plus_and_lgpl_2_1_plus-99bbf99a-48ea-24c4-e2df-f242abe6446f" } ], "other_license_expression": null, @@ -9312,10 +9312,10 @@ "start_line": 1, "end_line": 1, "matcher": "2-aho", - "score": 75.0, + "score": 60.0, "matched_length": 1, "match_coverage": 100.0, - "rule_relevance": 75, + "rule_relevance": 60, "rule_identifier": "lgpl_bare_single_word.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl_bare_single_word.RULE", "matched_text": "- name: LGPL" @@ -9336,7 +9336,7 @@ "matched_text": " url: http://www.gnu.org/copyleft/lesser.html" } ], - "identifier": "lgpl_2_0_plus_and_lgpl_2_1_plus-b52b959e-48c6-d927-c4d0-cf7842fb12fa" + "identifier": "lgpl_2_0_plus_and_lgpl_2_1_plus-99bbf99a-48ea-24c4-e2df-f242abe6446f" } ], "other_license_expression": null, diff --git a/tests/packagedcode/data/plugin/plugins_list_linux.txt b/tests/packagedcode/data/plugin/plugins_list_linux.txt new file mode 100755 index 00000000000..45585388487 --- /dev/null +++ b/tests/packagedcode/data/plugin/plugins_list_linux.txt @@ -0,0 +1,931 @@ +-------------------------------------------- +Package type: about + datasource_id: about_file + documentation URL: https://aboutcode-toolkit.readthedocs.io/en/latest/specification.html + primary language: None + description: AboutCode ABOUT file + path_patterns: '*.ABOUT' +-------------------------------------------- +Package type: alpine + datasource_id: alpine_apk_archive + documentation URL: https://wiki.alpinelinux.org/wiki/Alpine_package_format + primary language: None + description: Alpine Linux .apk package archive + path_patterns: '*.apk' +-------------------------------------------- +Package type: alpine + datasource_id: alpine_apkbuild + documentation URL: https://wiki.alpinelinux.org/wiki/APKBUILD_Reference + primary language: None + description: Alpine Linux APKBUILD package script + path_patterns: '*APKBUILD' +-------------------------------------------- +Package type: alpine + datasource_id: alpine_installed_db + documentation URL: None + primary language: None + description: Alpine Linux installed package database + path_patterns: '*lib/apk/db/installed' +-------------------------------------------- +Package type: android + datasource_id: android_apk + documentation URL: https://en.wikipedia.org/wiki/Apk_(file_format) + primary language: Java + description: Android application package + path_patterns: '*.apk' +-------------------------------------------- +Package type: android_lib + datasource_id: android_aar_library + documentation URL: https://developer.android.com/studio/projects/android-library + primary language: Java + description: Android library archive + path_patterns: '*.aar' +-------------------------------------------- +Package type: autotools + datasource_id: autotools_configure + documentation URL: https://www.gnu.org/software/automake/ + primary language: None + description: Autotools configure script + path_patterns: '*/configure', '*/configure.ac' +-------------------------------------------- +Package type: axis2 + datasource_id: axis2_mar + documentation URL: https://axis.apache.org/axis2/java/core/docs/modules.html + primary language: Java + description: Apache Axis2 module archive + path_patterns: '*.mar' +-------------------------------------------- +Package type: axis2 + datasource_id: axis2_module_xml + documentation URL: https://axis.apache.org/axis2/java/core/docs/modules.html + primary language: Java + description: Apache Axis2 module.xml + path_patterns: '*/meta-inf/module.xml' +-------------------------------------------- +Package type: bazel + datasource_id: bazel_build + documentation URL: https://bazel.build/ + primary language: None + description: Bazel BUILD + path_patterns: '*/BUILD' +-------------------------------------------- +Package type: bower + datasource_id: bower_json + documentation URL: https://bower.io + primary language: JavaScript + description: Bower package + path_patterns: '*/bower.json', '*/.bower.json' +-------------------------------------------- +Package type: buck + datasource_id: buck_file + documentation URL: https://buck.build/ + primary language: None + description: Buck file + path_patterns: '*/BUCK' +-------------------------------------------- +Package type: buck + datasource_id: buck_metadata + documentation URL: https://buck.build/ + primary language: None + description: Buck metadata file + path_patterns: '*/METADATA.bzl' +-------------------------------------------- +Package type: cab + datasource_id: microsoft_cabinet + documentation URL: https://docs.microsoft.com/en-us/windows/win32/msi/cabinet-files + primary language: C + description: Microsoft cabinet archive + path_patterns: '*.cab' +-------------------------------------------- +Package type: cargo + datasource_id: cargo_lock + documentation URL: https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html + primary language: Rust + description: Rust Cargo.lock dependencies lockfile + path_patterns: '*/Cargo.lock', '*/cargo.lock' +-------------------------------------------- +Package type: cargo + datasource_id: cargo_toml + documentation URL: https://doc.rust-lang.org/cargo/reference/manifest.html + primary language: Rust + description: Rust Cargo.toml package manifest + path_patterns: '*/Cargo.toml', '*/cargo.toml' +-------------------------------------------- +Package type: chef + datasource_id: chef_cookbook_metadata_json + documentation URL: https://docs.chef.io/config_rb_metadata/ + primary language: Ruby + description: Chef cookbook metadata.json + path_patterns: '*/metadata.json' +-------------------------------------------- +Package type: chef + datasource_id: chef_cookbook_metadata_rb + documentation URL: https://docs.chef.io/config_rb_metadata/ + primary language: Ruby + description: Chef cookbook metadata.rb + path_patterns: '*/metadata.rb' +-------------------------------------------- +Package type: chrome + datasource_id: chrome_crx + documentation URL: https://chrome.google.com/extensions + primary language: JavaScript + description: Chrome extension + path_patterns: '*.crx' +-------------------------------------------- +Package type: cocoapods + datasource_id: cocoapods_podfile + documentation URL: https://guides.cocoapods.org/using/the-podfile.html + primary language: Objective-C + description: Cocoapods Podfile + path_patterns: '*Podfile' +-------------------------------------------- +Package type: cocoapods + datasource_id: cocoapods_podfile_lock + documentation URL: https://guides.cocoapods.org/using/the-podfile.html + primary language: Objective-C + description: Cocoapods Podfile.lock + path_patterns: '*Podfile.lock' +-------------------------------------------- +Package type: cocoapods + datasource_id: cocoapods_podspec + documentation URL: https://guides.cocoapods.org/syntax/podspec.html + primary language: Objective-C + description: Cocoapods .podspec + path_patterns: '*.podspec' +-------------------------------------------- +Package type: cocoapods + datasource_id: cocoapods_podspec_json + documentation URL: https://guides.cocoapods.org/syntax/podspec.html + primary language: Objective-C + description: Cocoapods .podspec.json + path_patterns: '*.podspec.json' +-------------------------------------------- +Package type: composer + datasource_id: php_composer_json + documentation URL: https://getcomposer.org/doc/04-schema.md + primary language: PHP + description: PHP composer manifest + path_patterns: '*composer.json' +-------------------------------------------- +Package type: composer + datasource_id: php_composer_lock + documentation URL: https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control + primary language: PHP + description: PHP composer lockfile + path_patterns: '*composer.lock' +-------------------------------------------- +Package type: conan + datasource_id: conan_conandata_yml + documentation URL: https://docs.conan.io/2/tutorial/creating_packages/handle_sources_in_packages.html#using-the-conandata-yml-file + primary language: C++ + description: conan external source + path_patterns: '*/conandata.yml' +-------------------------------------------- +Package type: conan + datasource_id: conan_conanfile_py + documentation URL: https://docs.conan.io/2.0/reference/conanfile.html + primary language: C++ + description: conan recipe + path_patterns: '*/conanfile.py' +-------------------------------------------- +Package type: conda + datasource_id: conda_meta_yaml + documentation URL: https://docs.conda.io/ + primary language: None + description: Conda meta.yml manifest + path_patterns: '*/meta.yaml' +-------------------------------------------- +Package type: cpan + datasource_id: cpan_dist_ini + documentation URL: https://metacpan.org/pod/Dist::Zilla::Tutorial + primary language: Perl + description: CPAN Perl dist.ini + path_patterns: '*/dist.ini' +-------------------------------------------- +Package type: cpan + datasource_id: cpan_makefile + documentation URL: https://www.perlmonks.org/?node_id=128077 + primary language: Perl + description: CPAN Perl Makefile.PL + path_patterns: '*/Makefile.PL' +-------------------------------------------- +Package type: cpan + datasource_id: cpan_manifest + documentation URL: https://metacpan.org/pod/Module::Manifest + primary language: Perl + description: CPAN Perl module MANIFEST + path_patterns: '*/MANIFEST' +-------------------------------------------- +Package type: cpan + datasource_id: cpan_meta_json + documentation URL: https://metacpan.org/pod/Parse::CPAN::Meta + primary language: Perl + description: CPAN Perl META.json + path_patterns: '*/META.json' +-------------------------------------------- +Package type: cpan + datasource_id: cpan_meta_yml + documentation URL: https://metacpan.org/pod/CPAN::Meta::YAML + primary language: Perl + description: CPAN Perl META.yml + path_patterns: '*/META.yml' +-------------------------------------------- +Package type: cran + datasource_id: cran_description + documentation URL: https://r-pkgs.org/description.html + primary language: R + description: CRAN package DESCRIPTION + path_patterns: '*/DESCRIPTION' +-------------------------------------------- +Package type: deb + datasource_id: debian_control_extracted_deb + documentation URL: https://www.debian.org/doc/debian-policy/ch-controlfields.html + primary language: None + description: Debian control file - extracted layout + path_patterns: '*/control.tar.gz-extract/control', '*/control.tar.xz-extract/control' +-------------------------------------------- +Package type: deb + datasource_id: debian_control_in_source + documentation URL: https://www.debian.org/doc/debian-policy/ch-controlfields.html + primary language: None + description: Debian control file - source layout + path_patterns: '*/debian/control' +-------------------------------------------- +Package type: deb + datasource_id: debian_copyright_in_package + documentation URL: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + primary language: None + description: Debian machine readable file in source + path_patterns: '*usr/share/doc/*/copyright' +-------------------------------------------- +Package type: deb + datasource_id: debian_copyright_in_source + documentation URL: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + primary language: None + description: Debian machine readable file in source + path_patterns: '*/debian/copyright' +-------------------------------------------- +Package type: deb + datasource_id: debian_copyright_standalone + documentation URL: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + primary language: None + description: Debian machine readable file standalone + path_patterns: '*/copyright', '*_copyright' +-------------------------------------------- +Package type: deb + datasource_id: debian_deb + documentation URL: https://manpages.debian.org/unstable/dpkg-dev/deb.5.en.html + primary language: None + description: Debian binary package archive + path_patterns: '*.deb' +-------------------------------------------- +Package type: deb + datasource_id: debian_distroless_installed_db + documentation URL: https://www.debian.org/doc/debian-policy/ch-controlfields.html + primary language: None + description: Debian distroless installed database + path_patterns: '*var/lib/dpkg/status.d/*' +-------------------------------------------- +Package type: deb + datasource_id: debian_installed_files_list + documentation URL: None + primary language: None + description: Debian installed file paths list + path_patterns: '*var/lib/dpkg/info/*.list' +-------------------------------------------- +Package type: deb + datasource_id: debian_installed_md5sums + documentation URL: https://www.debian.org/doc/manuals/debian-handbook/sect.package-meta-information.en.html#sect.configuration-scripts + primary language: None + description: Debian installed file MD5 and paths list + path_patterns: '*var/lib/dpkg/info/*.md5sums' +-------------------------------------------- +Package type: deb + datasource_id: debian_installed_status_db + documentation URL: https://www.debian.org/doc/debian-policy/ch-controlfields.html + primary language: None + description: Debian installed packages database + path_patterns: '*var/lib/dpkg/status' +-------------------------------------------- +Package type: deb + datasource_id: debian_md5sums_in_extracted_deb + documentation URL: https://www.debian.org/doc/manuals/debian-handbook/sect.package-meta-information.en.html#sect.configuration-scripts + primary language: None + description: Debian file MD5 and paths list in .deb archive + path_patterns: '*/control.tar.gz-extract/md5sums', '*/control.tar.xz-extract/md5sums' +-------------------------------------------- +Package type: deb + datasource_id: debian_original_source_tarball + documentation URL: https://manpages.debian.org/unstable/dpkg-dev/deb.5.en.html + primary language: None + description: Debian package original source archive + path_patterns: '*.orig.tar.xz', '*.orig.tar.gz' +-------------------------------------------- +Package type: deb + datasource_id: debian_source_control_dsc + documentation URL: https://wiki.debian.org/dsc + primary language: None + description: Debian source control file + path_patterns: '*.dsc' +-------------------------------------------- +Package type: deb + datasource_id: debian_source_metadata_tarball + documentation URL: https://manpages.debian.org/unstable/dpkg-dev/deb.5.en.html + primary language: None + description: Debian source package metadata archive + path_patterns: '*.debian.tar.xz', '*.debian.tar.gz' +-------------------------------------------- +Package type: dmg + datasource_id: apple_dmg + documentation URL: https://en.wikipedia.org/wiki/Apple_Disk_Image + primary language: None + description: macOS disk image file + path_patterns: '*.dmg', '*.sparseimage' +-------------------------------------------- +Package type: ear + datasource_id: java_ear_application_xml + documentation URL: https://en.wikipedia.org/wiki/EAR_(file_format) + primary language: Java + description: Java EAR application.xml + path_patterns: '*/META-INF/application.xml' +-------------------------------------------- +Package type: ear + datasource_id: java_ear_archive + documentation URL: https://en.wikipedia.org/wiki/EAR_(file_format) + primary language: Java + description: Java EAR Enterprise application archive + path_patterns: '*.ear' +-------------------------------------------- +Package type: freebsd + datasource_id: freebsd_compact_manifest + documentation URL: https://www.freebsd.org/cgi/man.cgi?pkg-create(8)#MANIFEST_FILE_DETAILS + primary language: None + description: FreeBSD compact package manifest + path_patterns: '*/+COMPACT_MANIFEST' +-------------------------------------------- +Package type: gem + datasource_id: gem_archive + documentation URL: https://web.archive.org/web/20220326093616/https://piotrmurach.com/articles/looking-inside-a-ruby-gem/ + primary language: Ruby + description: RubyGems gem package archive + path_patterns: '*.gem' +-------------------------------------------- +Package type: gem + datasource_id: gem_archive_extracted + documentation URL: https://web.archive.org/web/20220326093616/https://piotrmurach.com/articles/looking-inside-a-ruby-gem/ + primary language: Ruby + description: RubyGems gem package extracted archive + path_patterns: '*/metadata.gz-extract' +-------------------------------------------- +Package type: gem + datasource_id: gem_gemspec_installed_specifications + documentation URL: https://guides.rubygems.org/specification-reference/ + primary language: Ruby + description: RubyGems gemspec manifest - installed vendor/bundle/specifications layout + path_patterns: '*/specifications/*.gemspec' +-------------------------------------------- +Package type: gem + datasource_id: gemfile + documentation URL: https://bundler.io/man/gemfile.5.html + primary language: Ruby + description: RubyGems Bundler Gemfile + path_patterns: '*/Gemfile', '*/*.gemfile', '*/Gemfile-*' +-------------------------------------------- +Package type: gem + datasource_id: gemfile_extracted + documentation URL: https://bundler.io/man/gemfile.5.html + primary language: Ruby + description: RubyGems Bundler Gemfile - extracted layout + path_patterns: '*/data.gz-extract/Gemfile' +-------------------------------------------- +Package type: gem + datasource_id: gemfile_lock + documentation URL: https://bundler.io/man/gemfile.5.html + primary language: Ruby + description: RubyGems Bundler Gemfile.lock + path_patterns: '*/Gemfile.lock' +-------------------------------------------- +Package type: gem + datasource_id: gemfile_lock_extracted + documentation URL: https://bundler.io/man/gemfile.5.html + primary language: Ruby + description: RubyGems Bundler Gemfile.lock - extracted layout + path_patterns: '*/data.gz-extract/Gemfile.lock' +-------------------------------------------- +Package type: gem + datasource_id: gemspec + documentation URL: https://guides.rubygems.org/specification-reference/ + primary language: Ruby + description: RubyGems gemspec manifest + path_patterns: '*.gemspec' +-------------------------------------------- +Package type: gem + datasource_id: gemspec_extracted + documentation URL: https://guides.rubygems.org/specification-reference/ + primary language: Ruby + description: RubyGems gemspec manifest - extracted data layout + path_patterns: '*/data.gz-extract/*.gemspec' +-------------------------------------------- +Package type: golang + datasource_id: go_mod + documentation URL: https://go.dev/ref/mod + primary language: Go + description: Go modules file + path_patterns: '*/go.mod' +-------------------------------------------- +Package type: golang + datasource_id: go_sum + documentation URL: https://go.dev/ref/mod#go-sum-files + primary language: Go + description: Go module cheksums file + path_patterns: '*/go.sum' +-------------------------------------------- +Package type: golang + datasource_id: godeps + documentation URL: https://github.com/tools/godep + primary language: Go + description: Go Godeps + path_patterns: '*/Godeps.json' +-------------------------------------------- +Package type: golang + datasource_id: golang_binary + documentation URL: https://github.com/nexB/go-inspector/ + primary language: Go + description: Go binary + path_patterns: +-------------------------------------------- +Package type: haxe + datasource_id: haxelib_json + documentation URL: https://lib.haxe.org/documentation/creating-a-haxelib-package/ + primary language: Haxe + description: Haxe haxelib.json metadata file + path_patterns: '*/haxelib.json' +-------------------------------------------- +Package type: installshield + datasource_id: installshield_installer + documentation URL: https://www.revenera.com/install/products/installshield + primary language: None + description: InstallShield installer + path_patterns: '*.exe' +-------------------------------------------- +Package type: ios + datasource_id: ios_ipa + documentation URL: https://en.wikipedia.org/wiki/.ipa + primary language: Objective-C + description: iOS package archive + path_patterns: '*.ipa' +-------------------------------------------- +Package type: iso + datasource_id: iso_disk_image + documentation URL: https://en.wikipedia.org/wiki/ISO_9660 + primary language: None + description: ISO disk image + path_patterns: '*.iso', '*.udf', '*.img' +-------------------------------------------- +Package type: ivy + datasource_id: ant_ivy_xml + documentation URL: https://ant.apache.org/ivy/history/latest-milestone/ivyfile.html + primary language: Java + description: Ant IVY dependency file + path_patterns: '*/ivy.xml' +-------------------------------------------- +Package type: jar + datasource_id: java_jar + documentation URL: https://en.wikipedia.org/wiki/JAR_(file_format) + primary language: None + description: JAR Java Archive + path_patterns: '*.jar' +-------------------------------------------- +Package type: jar + datasource_id: java_jar_manifest + documentation URL: https://docs.oracle.com/javase/tutorial/deployment/jar/manifestindex.html + primary language: Java + description: Java JAR MANIFEST.MF + path_patterns: '*/META-INF/MANIFEST.MF' +-------------------------------------------- +Package type: jboss-service + datasource_id: jboss_sar + documentation URL: https://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/ch02s01.html + primary language: Java + description: JBOSS service archive + path_patterns: '*.sar' +-------------------------------------------- +Package type: jboss-service + datasource_id: jboss_service_xml + documentation URL: https://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/ch02s01.html + primary language: Java + description: JBOSS service.xml + path_patterns: '*/meta-inf/jboss-service.xml' +-------------------------------------------- +Package type: linux-distro + datasource_id: etc_os_release + documentation URL: https://www.freedesktop.org/software/systemd/man/os-release.html + primary language: None + description: Linux OS release metadata file + path_patterns: '*etc/os-release', '*usr/lib/os-release' +-------------------------------------------- +Package type: maven + datasource_id: build_gradle + documentation URL: None + primary language: None + description: Gradle build script + path_patterns: '*/build.gradle', '*/build.gradle.kts' +-------------------------------------------- +Package type: maven + datasource_id: maven_pom + documentation URL: https://maven.apache.org/pom.html + primary language: Java + description: Apache Maven pom + path_patterns: '*.pom', '*pom.xml' +-------------------------------------------- +Package type: maven + datasource_id: maven_pom_properties + documentation URL: https://maven.apache.org/pom.html + primary language: Java + description: Apache Maven pom properties file + path_patterns: '*/pom.properties' +-------------------------------------------- +Package type: meteor + datasource_id: meteor_package + documentation URL: https://docs.meteor.com/api/packagejs.html + primary language: JavaScript + description: Meteor package.js + path_patterns: '*/package.js' +-------------------------------------------- +Package type: mozilla + datasource_id: mozilla_xpi + documentation URL: https://en.wikipedia.org/wiki/XPInstall + primary language: JavaScript + description: Mozilla XPI extension + path_patterns: '*.xpi' +-------------------------------------------- +Package type: msi + datasource_id: msi_installer + documentation URL: https://docs.microsoft.com/en-us/windows/win32/msi/windows-installer-portal + primary language: None + description: Microsoft MSI installer + path_patterns: '*.msi' +-------------------------------------------- +Package type: npm + datasource_id: npm_package_json + documentation URL: https://docs.npmjs.com/cli/v8/configuring-npm/package-json + primary language: JavaScript + description: npm package.json + path_patterns: '*/package.json' +-------------------------------------------- +Package type: npm + datasource_id: npm_package_lock_json + documentation URL: https://docs.npmjs.com/cli/v8/configuring-npm/package-lock-json + primary language: JavaScript + description: npm package-lock.json lockfile + path_patterns: '*/package-lock.json', '*/.package-lock.json' +-------------------------------------------- +Package type: npm + datasource_id: npm_shrinkwrap_json + documentation URL: https://docs.npmjs.com/cli/v8/configuring-npm/npm-shrinkwrap-json + primary language: JavaScript + description: npm shrinkwrap.json lockfile + path_patterns: '*/npm-shrinkwrap.json' +-------------------------------------------- +Package type: npm + datasource_id: pnpm_lock_yaml + documentation URL: https://github.com/pnpm/spec/blob/master/lockfile/6.0.md + primary language: JavaScript + description: pnpm pnpm-lock.yaml lockfile + path_patterns: '*/pnpm-lock.yaml' +-------------------------------------------- +Package type: npm + datasource_id: pnpm_shrinkwrap_yaml + documentation URL: https://github.com/pnpm/spec/blob/master/lockfile/4.md + primary language: JavaScript + description: pnpm shrinkwrap.yaml lockfile + path_patterns: '*/shrinkwrap.yaml' +-------------------------------------------- +Package type: npm + datasource_id: pnpm_workspace_yaml + documentation URL: https://pnpm.io/pnpm-workspace_yaml + primary language: JavaScript + description: pnpm workspace yaml file + path_patterns: '*/pnpm-workspace.yaml' +-------------------------------------------- +Package type: npm + datasource_id: yarn_lock_v1 + documentation URL: https://classic.yarnpkg.com/lang/en/docs/yarn-lock/ + primary language: JavaScript + description: yarn.lock lockfile v1 format + path_patterns: '*/yarn.lock' +-------------------------------------------- +Package type: npm + datasource_id: yarn_lock_v2 + documentation URL: https://classic.yarnpkg.com/lang/en/docs/yarn-lock/ + primary language: JavaScript + description: yarn.lock lockfile v2 format + path_patterns: '*/yarn.lock' +-------------------------------------------- +Package type: nsis + datasource_id: nsis_installer + documentation URL: https://nsis.sourceforge.io/Main_Page + primary language: None + description: NSIS installer + path_patterns: '*.exe' +-------------------------------------------- +Package type: nuget + datasource_id: nuget_nupkg + documentation URL: https://en.wikipedia.org/wiki/Open_Packaging_Conventions + primary language: None + description: NuGet nupkg package archive + path_patterns: '*.nupkg' +-------------------------------------------- +Package type: nuget + datasource_id: nuget_nupsec + documentation URL: https://docs.microsoft.com/en-us/nuget/reference/nuspec + primary language: None + description: NuGet nuspec package manifest + path_patterns: '*.nuspec' +-------------------------------------------- +Package type: nuget + datasource_id: nuget_packages_lock + documentation URL: https://learn.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-restore + primary language: None + description: NuGet packages.lock.json file + path_patterns: '*packages.lock.json' +-------------------------------------------- +Package type: opam + datasource_id: opam_file + documentation URL: https://opam.ocaml.org/doc/Manual.html#Common-file-format + primary language: Ocaml + description: Ocaml Opam file + path_patterns: '*opam' +-------------------------------------------- +Package type: osgi + datasource_id: java_osgi_manifest + documentation URL: https://docs.oracle.com/javase/tutorial/deployment/jar/manifestindex.html + primary language: Java + description: Java OSGi MANIFEST.MF + path_patterns: +-------------------------------------------- +Package type: pubspec + datasource_id: pubspec_lock + documentation URL: https://web.archive.org/web/20220330081004/https://gpalma.pt/blog/what-is-the-pubspec-lock/ + primary language: dart + description: Dart pubspec lockfile + path_patterns: '*pubspec.lock' +-------------------------------------------- +Package type: pubspec + datasource_id: pubspec_yaml + documentation URL: https://dart.dev/tools/pub/pubspec + primary language: dart + description: Dart pubspec manifest + path_patterns: '*pubspec.yaml' +-------------------------------------------- +Package type: pypi + datasource_id: conda_yaml + documentation URL: https://docs.conda.io/ + primary language: Python + description: Conda yaml manifest + path_patterns: '*conda.yaml', '*conda.yml' +-------------------------------------------- +Package type: pypi + datasource_id: pip_requirements + documentation URL: https://pip.pypa.io/en/latest/reference/requirements-file-format/ + primary language: Python + description: pip requirements file + path_patterns: '*requirement*.txt', '*requirement*.pip', '*requirement*.in', '*requires.txt', '*requirements/*.txt', '*requirements/*.pip', '*requirements/*.in', '*reqs.txt' +-------------------------------------------- +Package type: pypi + datasource_id: pipfile + documentation URL: https://github.com/pypa/pipfile + primary language: Python + description: Pipfile + path_patterns: '*Pipfile' +-------------------------------------------- +Package type: pypi + datasource_id: pipfile_lock + documentation URL: https://github.com/pypa/pipfile + primary language: Python + description: Pipfile.lock + path_patterns: '*Pipfile.lock' +-------------------------------------------- +Package type: pypi + datasource_id: pypi_editable_egg_pkginfo + documentation URL: https://peps.python.org/pep-0376/ + primary language: Python + description: PyPI editable local installation PKG-INFO + path_patterns: '*.egg-info/PKG-INFO' +-------------------------------------------- +Package type: pypi + datasource_id: pypi_egg + documentation URL: https://web.archive.org/web/20210604075235/http://peak.telecommunity.com/DevCenter/PythonEggs + primary language: Python + description: PyPI egg + path_patterns: '*.egg' +-------------------------------------------- +Package type: pypi + datasource_id: pypi_egg_pkginfo + documentation URL: https://peps.python.org/pep-0376/ + primary language: Python + description: PyPI extracted egg PKG-INFO + path_patterns: '*/EGG-INFO/PKG-INFO' +-------------------------------------------- +Package type: pypi + datasource_id: pypi_inspect_deplock + documentation URL: https://pip.pypa.io/en/stable/cli/pip_inspect/ + primary language: Python + description: Python poetry pyproject.toml + path_patterns: '*pip-inspect.deplock' +-------------------------------------------- +Package type: pypi + datasource_id: pypi_poetry_lock + documentation URL: https://python-poetry.org/docs/basic-usage/#installing-with-poetrylock + primary language: Python + description: Python poetry lockfile + path_patterns: '*poetry.lock' +-------------------------------------------- +Package type: pypi + datasource_id: pypi_poetry_pyproject_toml + documentation URL: https://packaging.python.org/en/latest/specifications/pyproject-toml/ + primary language: Python + description: Python poetry pyproject.toml + path_patterns: '*pyproject.toml' +-------------------------------------------- +Package type: pypi + datasource_id: pypi_pyproject_toml + documentation URL: https://packaging.python.org/en/latest/specifications/pyproject-toml/ + primary language: Python + description: Python pyproject.toml + path_patterns: '*pyproject.toml' +-------------------------------------------- +Package type: pypi + datasource_id: pypi_sdist_pkginfo + documentation URL: https://peps.python.org/pep-0314/ + primary language: Python + description: PyPI extracted sdist PKG-INFO + path_patterns: '*/PKG-INFO' +-------------------------------------------- +Package type: pypi + datasource_id: pypi_setup_cfg + documentation URL: https://peps.python.org/pep-0390/ + primary language: Python + description: Python setup.cfg + path_patterns: '*setup.cfg' +-------------------------------------------- +Package type: pypi + datasource_id: pypi_setup_py + documentation URL: https://docs.python.org/3.11/distutils/setupscript.html + primary language: Python + description: Python setup.py + path_patterns: '*setup.py' +-------------------------------------------- +Package type: pypi + datasource_id: pypi_wheel + documentation URL: https://peps.python.org/pep-0427/ + primary language: Python + description: PyPI wheel + path_patterns: '*.whl' +-------------------------------------------- +Package type: pypi + datasource_id: pypi_wheel_metadata + documentation URL: https://packaging.python.org/en/latest/specifications/core-metadata/ + primary language: Python + description: PyPI installed wheel METADATA + path_patterns: '*.dist-info/METADATA' +-------------------------------------------- +Package type: readme + datasource_id: readme + documentation URL: + primary language: None + description: + path_patterns: '*/README.android', '*/README.chromium', '*/README.facebook', '*/README.google', '*/README.thirdparty' +-------------------------------------------- +Package type: rpm + datasource_id: rpm_archive + documentation URL: https://en.wikipedia.org/wiki/RPM_Package_Manager + primary language: None + description: RPM package archive + path_patterns: '*.rpm', '*.src.rpm', '*.srpm', '*.mvl', '*.vip' +-------------------------------------------- +Package type: rpm + datasource_id: rpm_installed_database_bdb + documentation URL: https://man7.org/linux/man-pages/man8/rpmdb.8.html + primary language: None + description: RPM installed package BDB database + path_patterns: '*var/lib/rpm/Packages' +-------------------------------------------- +Package type: rpm + datasource_id: rpm_installed_database_ndb + documentation URL: https://fedoraproject.org/wiki/Changes/NewRpmDBFormat + primary language: None + description: RPM installed package NDB database + path_patterns: '*usr/lib/sysimage/rpm/Packages.db' +-------------------------------------------- +Package type: rpm + datasource_id: rpm_installed_database_sqlite + documentation URL: https://fedoraproject.org/wiki/Changes/Sqlite_Rpmdb + primary language: None + description: RPM installed package SQLite database + path_patterns: '*rpm/rpmdb.sqlite' +-------------------------------------------- +Package type: rpm + datasource_id: rpm_mariner_manifest + documentation URL: https://github.com/microsoft/marinara/ + primary language: None + description: RPM mariner distroless package manifest + path_patterns: '*var/lib/rpmmanifest/container-manifest-2' +-------------------------------------------- +Package type: rpm + datasource_id: rpm_package_licenses + documentation URL: https://github.com/microsoft/marinara/ + primary language: None + description: RPM mariner distroless package license files + path_patterns: '*usr/share/licenses/*/COPYING*', '*usr/share/licenses/*/LICENSE*' +-------------------------------------------- +Package type: rpm + datasource_id: rpm_spefile + documentation URL: https://en.wikipedia.org/wiki/RPM_Package_Manager + primary language: None + description: RPM specfile + path_patterns: '*.spec' +-------------------------------------------- +Package type: shar + datasource_id: shar_shell_archive + documentation URL: https://en.wikipedia.org/wiki/Shar + primary language: None + description: shell archive + path_patterns: '*.shar' +-------------------------------------------- +Package type: squashfs + datasource_id: squashfs_disk_image + documentation URL: https://en.wikipedia.org/wiki/SquashFS + primary language: None + description: Squashfs disk image + path_patterns: +-------------------------------------------- +Package type: swift + datasource_id: swift_package_manifest_json + documentation URL: https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html + primary language: Swift + description: JSON dump of Package.swift created by DepLock or with ``swift package dump-package > Package.swift.json`` + path_patterns: '*/Package.swift.json', '*/Package.swift.deplock' +-------------------------------------------- +Package type: swift + datasource_id: swift_package_resolved + documentation URL: https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html#package-dependency + primary language: swift + description: Resolved full dependency lockfile for Package.swift created with ``swift package resolve`` + path_patterns: '*/Package.resolved', '*/.package.resolved' +-------------------------------------------- +Package type: swift + datasource_id: swift_package_show_dependencies + documentation URL: https://forums.swift.org/t/swiftpm-show-dependencies-without-fetching-dependencies/51154 + primary language: Swift + description: Swift dependency graph created by DepLock + path_patterns: '*/swift-show-dependencies.deplock' +-------------------------------------------- +Package type: war + datasource_id: java_war_archive + documentation URL: https://en.wikipedia.org/wiki/WAR_(file_format) + primary language: Java + description: Java Web Application Archive + path_patterns: '*.war' +-------------------------------------------- +Package type: war + datasource_id: java_war_web_xml + documentation URL: https://en.wikipedia.org/wiki/WAR_(file_format) + primary language: Java + description: Java WAR web/xml + path_patterns: '*/WEB-INF/web.xml' +-------------------------------------------- +Package type: windows-program + datasource_id: win_reg_installed_programs_docker_file_software + documentation URL: https://en.wikipedia.org/wiki/Windows_Registry + primary language: None + description: Windows Registry Installed Program - Docker SOFTWARE + path_patterns: '*/Files/Windows/System32/config/SOFTWARE' +-------------------------------------------- +Package type: windows-program + datasource_id: win_reg_installed_programs_docker_software_delta + documentation URL: https://en.wikipedia.org/wiki/Windows_Registry + primary language: None + description: Windows Registry Installed Program - Docker Software Delta + path_patterns: '*/Hives/Software_Delta' +-------------------------------------------- +Package type: windows-program + datasource_id: win_reg_installed_programs_docker_utility_software + documentation URL: https://en.wikipedia.org/wiki/Windows_Registry + primary language: None + description: Windows Registry Installed Program - Docker UtilityVM SOFTWARE + path_patterns: '*/UtilityVM/Files/Windows/System32/config/SOFTWARE' +-------------------------------------------- +Package type: windows-update + datasource_id: microsoft_update_manifest_mum + documentation URL: None + primary language: None + description: Microsoft Update Manifest .mum file + path_patterns: '*.mum' +-------------------------------------------- +Package type: winexe + datasource_id: windows_executable + documentation URL: https://en.wikipedia.org/wiki/Portable_Executable + primary language: None + description: Windows Portable Executable metadata + path_patterns: '*.exe', '*.dll', '*.mui', '*.mun', '*.com', '*.winmd', '*.sys', '*.tlb', '*.exe_*', '*.dll_*', '*.mui_*', '*.mun_*', '*.com_*', '*.winmd_*', '*.sys_*', '*.tlb_*', '*.ocx' diff --git a/tests/packagedcode/data/pypi/setup.cfg/wheel-0.34.2/setup.cfg-expected.json b/tests/packagedcode/data/pypi/setup.cfg/wheel-0.34.2/setup.cfg-expected.json index 448658caa0e..6a9ecf3dcb3 100644 --- a/tests/packagedcode/data/pypi/setup.cfg/wheel-0.34.2/setup.cfg-expected.json +++ b/tests/packagedcode/data/pypi/setup.cfg/wheel-0.34.2/setup.cfg-expected.json @@ -79,17 +79,6 @@ "resolved_package": {}, "extra_data": {} }, - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - }, { "purl": "pkg:pypi/pytest", "extracted_requirement": "pytest>=3.0.0", diff --git a/tests/packagedcode/data/pypi/setup.py-versions/chardet-3.0.4/setup.py-expected.json b/tests/packagedcode/data/pypi/setup.py-versions/chardet-3.0.4/setup.py-expected.json index 8efbf3c4127..62c144804cc 100644 --- a/tests/packagedcode/data/pypi/setup.py-versions/chardet-3.0.4/setup.py-expected.json +++ b/tests/packagedcode/data/pypi/setup.py-versions/chardet-3.0.4/setup.py-expected.json @@ -70,16 +70,16 @@ "start_line": 1, "end_line": 1, "matcher": "1-hash", - "score": 75.0, + "score": 60.0, "matched_length": 1, "match_coverage": 100.0, - "rule_relevance": 75, + "rule_relevance": 60, "rule_identifier": "lgpl_bare_single_word.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl_bare_single_word.RULE", "matched_text": "LGPL" } ], - "identifier": "lgpl_2_0_plus-64f6d457-252f-6fe3-26b9-ae66d29ef973" + "identifier": "lgpl_2_0_plus-e66c5b24-33ce-ea1b-0e3b-28952361ec32" }, { "license_expression": "lgpl-2.0-plus", diff --git a/tests/packagedcode/data/pypi/unpacked_sdist/prefer-egg-info-pkg-info/celery-expected.json b/tests/packagedcode/data/pypi/unpacked_sdist/prefer-egg-info-pkg-info/celery-expected.json index 03032881d7e..9f1b11f1bc7 100644 --- a/tests/packagedcode/data/pypi/unpacked_sdist/prefer-egg-info-pkg-info/celery-expected.json +++ b/tests/packagedcode/data/pypi/unpacked_sdist/prefer-egg-info-pkg-info/celery-expected.json @@ -125,127 +125,215 @@ "dependencies": [ { "purl": "pkg:pypi/pytz", - "extracted_requirement": ">=2021.3", + "extracted_requirement": "pytz>=2021.3", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pytz?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/billiard", - "extracted_requirement": "<4.0,>=3.6.4.0", + "extracted_requirement": "billiard>=3.6.4.0,<4.0", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/billiard?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/kombu", - "extracted_requirement": "<6.0,>=5.2.3", + "extracted_requirement": "kombu>=5.2.3,<6.0", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/kombu?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/vine", - "extracted_requirement": "<6.0,>=5.0.0", + "extracted_requirement": "vine>=5.0.0,<6.0", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/vine?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/click", - "extracted_requirement": "<9.0,>=8.0.3", + "extracted_requirement": "click>=8.0.3,<9.0", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/click?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/click-didyoumean", - "extracted_requirement": ">=0.0.3", + "extracted_requirement": "click-didyoumean>=0.0.3", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/click-didyoumean?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/click-repl", - "extracted_requirement": ">=0.2.0", + "extracted_requirement": "click-repl>=0.2.0", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/click-repl?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/click-plugins", - "extracted_requirement": ">=1.1.1", + "extracted_requirement": "click-plugins>=1.1.1", "scope": "install", "is_runtime": true, "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/click-plugins?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/importlib-metadata", - "extracted_requirement": ">=1.4.0", + "extracted_requirement": "importlib-metadata>=1.4.0", "scope": "install", "is_runtime": true, "is_optional": false, @@ -253,507 +341,879 @@ "is_direct": true, "resolved_package": {}, "extra_data": { - "python_version": "< 3.8" + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null }, "dependency_uid": "pkg:pypi/importlib-metadata?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pyarango", - "extracted_requirement": ">=1.3.2", - "scope": "arangodb", + "extracted_requirement": "pyArango>=1.3.2", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pyarango?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/cryptography", - "extracted_requirement": null, - "scope": "auth", + "extracted_requirement": "cryptography", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/cryptography?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/azure-storage-blob@12.9.0", - "extracted_requirement": "==12.9.0", - "scope": "azureblockblob", + "extracted_requirement": "azure-storage-blob==12.9.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": true, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/azure-storage-blob@12.9.0?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/brotli", - "extracted_requirement": ">=1.0.0", - "scope": "brotli", + "extracted_requirement": "brotli>=1.0.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/brotli?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/brotlipy", - "extracted_requirement": ">=0.7.0", - "scope": "brotli", + "extracted_requirement": "brotlipy>=0.7.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/brotlipy?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/cassandra-driver", - "extracted_requirement": "<3.21.0", - "scope": "cassandra", + "extracted_requirement": "cassandra-driver<3.21.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/cassandra-driver?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/python-consul2", - "extracted_requirement": null, - "scope": "consul", + "extracted_requirement": "python-consul2", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/python-consul2?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pydocumentdb@2.3.2", - "extracted_requirement": "==2.3.2", - "scope": "cosmosdbsql", + "extracted_requirement": "pydocumentdb==2.3.2", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": true, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pydocumentdb@2.3.2?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/couchbase", - "extracted_requirement": ">=3.0.0", - "scope": "couchbase", + "extracted_requirement": "couchbase>=3.0.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/couchbase?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pycouchdb", - "extracted_requirement": null, - "scope": "couchdb", + "extracted_requirement": "pycouchdb", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pycouchdb?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/django", - "extracted_requirement": ">=1.11", - "scope": "django", + "extracted_requirement": "Django>=1.11", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/django?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/boto3", - "extracted_requirement": ">=1.9.178", - "scope": "dynamodb", + "extracted_requirement": "boto3>=1.9.178", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/boto3?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/elasticsearch", - "extracted_requirement": null, - "scope": "elasticsearch", + "extracted_requirement": "elasticsearch", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/elasticsearch?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/eventlet", - "extracted_requirement": ">=0.32.0", - "scope": "eventlet", + "extracted_requirement": "eventlet>=0.32.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/eventlet?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/gevent", - "extracted_requirement": ">=1.5.0", - "scope": "gevent", + "extracted_requirement": "gevent>=1.5.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/gevent?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/librabbitmq", - "extracted_requirement": ">=1.5.0", - "scope": "librabbitmq", + "extracted_requirement": "librabbitmq>=1.5.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/librabbitmq?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pylibmc", - "extracted_requirement": null, - "scope": "memcache", + "extracted_requirement": "pylibmc", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pylibmc?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pymongo", - "extracted_requirement": ">=3.11.1", - "scope": "mongodb", + "extracted_requirement": "pymongo[srv]>=3.11.1", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pymongo?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/msgpack", - "extracted_requirement": null, - "scope": "msgpack", + "extracted_requirement": "msgpack", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/msgpack?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/python-memcached", - "extracted_requirement": null, - "scope": "pymemcache", + "extracted_requirement": "python-memcached", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/python-memcached?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pyro4", - "extracted_requirement": null, - "scope": "pyro", + "extracted_requirement": "pyro4", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pyro4?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pytest-celery", - "extracted_requirement": null, - "scope": "pytest", + "extracted_requirement": "pytest-celery", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pytest-celery?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/redis", - "extracted_requirement": "!=4.0.0,!=4.0.1,>=3.4.1", - "scope": "redis", + "extracted_requirement": "redis>=3.4.1,!=4.0.0,!=4.0.1", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/redis?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/boto3", - "extracted_requirement": ">=1.9.125", - "scope": "s3", + "extracted_requirement": "boto3>=1.9.125", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/boto3?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/softlayer-messaging", - "extracted_requirement": ">=1.0.3", - "scope": "slmq", + "extracted_requirement": "softlayer_messaging>=1.0.3", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/softlayer-messaging?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/ephem", - "extracted_requirement": null, - "scope": "solar", + "extracted_requirement": "ephem", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/ephem?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/sqlalchemy", - "extracted_requirement": null, - "scope": "sqlalchemy", + "extracted_requirement": "sqlalchemy", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/sqlalchemy?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/kombu", - "extracted_requirement": null, - "scope": "sqs", + "extracted_requirement": "kombu[sqs]", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/kombu?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/tblib", - "extracted_requirement": ">=1.3.0", - "scope": "tblib", + "extracted_requirement": "tblib>=1.3.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/tblib?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/tblib", - "extracted_requirement": ">=1.5.0", - "scope": "tblib", + "extracted_requirement": "tblib>=1.5.0", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/tblib?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/pyyaml", - "extracted_requirement": ">=3.10", - "scope": "yaml", + "extracted_requirement": "PyYAML>=3.10", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/pyyaml?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/kazoo", - "extracted_requirement": ">=1.3.1", - "scope": "zookeeper", + "extracted_requirement": "kazoo>=1.3.1", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/kazoo?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" }, { "purl": "pkg:pypi/zstandard", - "extracted_requirement": null, - "scope": "zstd", + "extracted_requirement": "zstandard", + "scope": "install", "is_runtime": true, - "is_optional": true, + "is_optional": false, "is_resolved": false, "is_direct": true, "resolved_package": {}, - "extra_data": {}, + "extra_data": { + "is_editable": false, + "link": null, + "hash_options": [], + "is_constraint": false, + "is_archive": null, + "is_wheel": false, + "is_url": null, + "is_vcs_url": null, + "is_name_at_url": false, + "is_local_path": null + }, "dependency_uid": "pkg:pypi/zstandard?uuid=fixed-uid-done-for-testing-5642512d1758", "for_package_uid": "pkg:pypi/celery@5.2.7?uuid=fixed-uid-done-for-testing-5642512d1758", - "datafile_path": "celery/celery.egg-info/PKG-INFO", - "datasource_id": "pypi_editable_egg_pkginfo" + "datafile_path": "celery/celery.egg-info/requires.txt", + "datasource_id": "pip_requirements" } ], "files": [ diff --git a/tests/packagedcode/data/rpm_installed/end-to-end/bdb-fedora-rootfs.tar.xz-expected.json b/tests/packagedcode/data/rpm_installed/end-to-end/bdb-fedora-rootfs.tar.xz-expected.json index 610e9d84770..b91e559caf3 100644 --- a/tests/packagedcode/data/rpm_installed/end-to-end/bdb-fedora-rootfs.tar.xz-expected.json +++ b/tests/packagedcode/data/rpm_installed/end-to-end/bdb-fedora-rootfs.tar.xz-expected.json @@ -197714,12 +197714,12 @@ "vcs_url": null, "copyright": null, "holder": null, - "declared_license_expression": "gpl-2.0 AND gpl-2.0-plus AND lgpl-2.0-plus AND public-domain", - "declared_license_expression_spdx": "GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LicenseRef-scancode-public-domain", + "declared_license_expression": "(gpl-2.0 AND gpl-2.0-plus AND lgpl-2.0-plus) AND public-domain", + "declared_license_expression_spdx": "(GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.0-or-later) AND LicenseRef-scancode-public-domain", "license_detections": [ { - "license_expression": "gpl-2.0 AND gpl-2.0-plus AND lgpl-2.0-plus AND public-domain", - "license_expression_spdx": "GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LicenseRef-scancode-public-domain", + "license_expression": "gpl-2.0 AND gpl-2.0-plus AND lgpl-2.0-plus", + "license_expression_spdx": "GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0", @@ -197765,7 +197765,14 @@ "rule_identifier": "lgpl-2.0-plus_68.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.0-plus_68.RULE", "matched_text": "GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain" - }, + } + ], + "identifier": "gpl_2_0_and_gpl_2_0_plus_and_lgpl_2_0_plus-bd982d63-f4d1-02a6-78c8-2d4f38d0725b" + }, + { + "license_expression": "public-domain", + "license_expression_spdx": "LicenseRef-scancode-public-domain", + "matches": [ { "license_expression": "public-domain", "license_expression_spdx": "LicenseRef-scancode-public-domain", @@ -197782,7 +197789,7 @@ "matched_text": "GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain" } ], - "identifier": "gpl_2_0_and_gpl_2_0_plus_and_lgpl_2_0_plus_and_public_domain-9df80b2e-1f8f-4b93-bab5-db0fafee93fd" + "identifier": "public_domain-3dd945ae-65df-7d90-6467-60f8ecf2eb77" } ], "other_license_expression": null, @@ -435806,12 +435813,12 @@ "vcs_url": null, "copyright": null, "holder": null, - "declared_license_expression": "gpl-2.0 AND gpl-2.0-plus AND lgpl-2.0-plus AND public-domain", - "declared_license_expression_spdx": "GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LicenseRef-scancode-public-domain", + "declared_license_expression": "(gpl-2.0 AND gpl-2.0-plus AND lgpl-2.0-plus) AND public-domain", + "declared_license_expression_spdx": "(GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.0-or-later) AND LicenseRef-scancode-public-domain", "license_detections": [ { - "license_expression": "gpl-2.0 AND gpl-2.0-plus AND lgpl-2.0-plus AND public-domain", - "license_expression_spdx": "GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LicenseRef-scancode-public-domain", + "license_expression": "gpl-2.0 AND gpl-2.0-plus AND lgpl-2.0-plus", + "license_expression_spdx": "GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.0-or-later", "matches": [ { "license_expression": "gpl-2.0", @@ -435857,7 +435864,14 @@ "rule_identifier": "lgpl-2.0-plus_68.RULE", "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/lgpl-2.0-plus_68.RULE", "matched_text": "GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain" - }, + } + ], + "identifier": "gpl_2_0_and_gpl_2_0_plus_and_lgpl_2_0_plus-bd982d63-f4d1-02a6-78c8-2d4f38d0725b" + }, + { + "license_expression": "public-domain", + "license_expression_spdx": "LicenseRef-scancode-public-domain", + "matches": [ { "license_expression": "public-domain", "license_expression_spdx": "LicenseRef-scancode-public-domain", @@ -435874,7 +435888,7 @@ "matched_text": "GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain" } ], - "identifier": "gpl_2_0_and_gpl_2_0_plus_and_lgpl_2_0_plus_and_public_domain-9df80b2e-1f8f-4b93-bab5-db0fafee93fd" + "identifier": "public_domain-3dd945ae-65df-7d90-6467-60f8ecf2eb77" } ], "other_license_expression": null, diff --git a/tests/packagedcode/data/swift/packages/fastlane_resolved_v1/Package.resolved b/tests/packagedcode/data/swift/packages/fastlane_resolved_v1/Package.resolved index 91aa2bec40f..657bdf9f950 100644 --- a/tests/packagedcode/data/swift/packages/fastlane_resolved_v1/Package.resolved +++ b/tests/packagedcode/data/swift/packages/fastlane_resolved_v1/Package.resolved @@ -1,16 +1,25 @@ { - "object": { - "pins": [ - { - "package": "SwiftShell", - "repositoryURL": "https://github.com/kareman/SwiftShell", - "state": { - "branch": null, - "revision": "99680b2efc7c7dbcace1da0b3979d266f02e213c", - "version": "5.1.0" - } - } - ] - }, - "version": 1 + "object":{ + "pins":[ + { + "package":"SwiftShell", + "repositoryURL":"https://github.com/kareman/SwiftShell", + "state":{ + "branch":null, + "revision":"99680b2efc7c7dbcace1da0b3979d266f02e213c", + "version":"5.1.0" + } + }, + { + "package":"swift-atomics", + "repositoryURL":"https://github.com/apple/swift-atomics.git", + "state":{ + "branch":null, + "revision":"6c89474e62719ddcc1e9614989fff2f68208fe10", + "version":"1.1.0" + } + } + ] + }, + "version":1 } \ No newline at end of file diff --git a/tests/packagedcode/data/swift/packages/vercelui_show_dependencies/swift-show-dependencies.deplock b/tests/packagedcode/data/swift/packages/vercelui_show_dependencies/swift-show-dependencies.deplock new file mode 100644 index 00000000000..a714d1d31c8 --- /dev/null +++ b/tests/packagedcode/data/swift/packages/vercelui_show_dependencies/swift-show-dependencies.deplock @@ -0,0 +1,65 @@ +{ + "identity":"vercelui", + "name":"VercelUI", + "url":"/workspace/vercel/VercelUI", + "version":"unspecified", + "path":"/workspace/vercel/VercelUI", + "dependencies":[ + { + "identity":"vercel", + "name":"Vercel", + "url":"https://github.com/swift-cloud/Vercel", + "version":"1.15.2", + "path":"/workspace/vercel/VercelUI/.build/checkouts/Vercel", + "dependencies":[ + { + "identity":"vapor", + "name":"vapor", + "url":"https://github.com/vapor/vapor", + "version":"4.79.0", + "path":"/workspace/vercel/VercelUI/.build/checkouts/vapor", + "dependencies":[ + { + "identity":"async-http-client", + "name":"async-http-client", + "url":"https://github.com/swift-server/async-http-client.git", + "version":"1.19.0", + "path":"/workspace/vercel/VercelUI/.build/checkouts/async-http-client", + "dependencies":[ + { + "identity":"swift-nio", + "name":"swift-nio", + "url":"https://github.com/apple/swift-nio.git", + "version":"2.58.0", + "path":"/workspace/vercel/VercelUI/.build/checkouts/swift-nio", + "dependencies":[ + { + "identity":"swift-atomics", + "name":"swift-atomics", + "url":"https://github.com/apple/swift-atomics.git", + "version":"1.1.0", + "path":"/workspace/vercel/VercelUI/.build/checkouts/swift-atomics", + "dependencies":[ + + ] + } + ] + }, + { + "identity":"swift-atomics", + "name":"swift-atomics", + "url":"https://github.com/apple/swift-atomics.git", + "version":"1.1.0", + "path":"/workspace/vercel/VercelUI/.build/checkouts/swift-atomics", + "dependencies":[ + + ] + } + ] + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/packagedcode/data/swift/swift-fastlane-resolved-v1-package-expected.json b/tests/packagedcode/data/swift/swift-fastlane-resolved-v1-package-expected.json index 7e171a4099f..479f0d9f8eb 100644 --- a/tests/packagedcode/data/swift/swift-fastlane-resolved-v1-package-expected.json +++ b/tests/packagedcode/data/swift/swift-fastlane-resolved-v1-package-expected.json @@ -47,6 +47,54 @@ "swift_package_resolved" ], "purl": "pkg:swift/github.com/kareman/SwiftShell@5.1.0" + }, + { + "type": "swift", + "namespace": "github.com/apple", + "name": "swift-atomics", + "version": "1.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "package_uid": "pkg:swift/github.com/apple/swift-atomics@1.1.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "Package.resolved" + ], + "datasource_ids": [ + "swift_package_resolved" + ], + "purl": "pkg:swift/github.com/apple/swift-atomics@1.1.0" } ], "dependencies": [], @@ -98,10 +146,55 @@ "api_data_url": null, "datasource_id": "swift_package_resolved", "purl": "pkg:swift/github.com/kareman/SwiftShell@5.1.0" + }, + { + "type": "swift", + "namespace": "github.com/apple", + "name": "swift-atomics", + "version": "1.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_resolved", + "purl": "pkg:swift/github.com/apple/swift-atomics@1.1.0" } ], "for_packages": [ - "pkg:swift/github.com/kareman/SwiftShell@5.1.0?uuid=fixed-uid-done-for-testing-5642512d1758" + "pkg:swift/github.com/kareman/SwiftShell@5.1.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:swift/github.com/apple/swift-atomics@1.1.0?uuid=fixed-uid-done-for-testing-5642512d1758" ], "scan_errors": [] }, @@ -109,14 +202,20 @@ "path": "src", "type": "directory", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:swift/github.com/kareman/SwiftShell@5.1.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:swift/github.com/apple/swift-atomics@1.1.0?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] }, { "path": "src/mapbox.swift", "type": "file", "package_data": [], - "for_packages": [], + "for_packages": [ + "pkg:swift/github.com/kareman/SwiftShell@5.1.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "pkg:swift/github.com/apple/swift-atomics@1.1.0?uuid=fixed-uid-done-for-testing-5642512d1758" + ], "scan_errors": [] } ] diff --git a/tests/packagedcode/data/swift/swift-vercelui-show-dependencies-expected.json b/tests/packagedcode/data/swift/swift-vercelui-show-dependencies-expected.json new file mode 100644 index 00000000000..7ccab546fa7 --- /dev/null +++ b/tests/packagedcode/data/swift/swift-vercelui-show-dependencies-expected.json @@ -0,0 +1,889 @@ +{ + "packages": [ + { + "type": "swift", + "namespace": null, + "name": "VercelUI", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "package_uid": "pkg:swift/VercelUI?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "swift-show-dependencies.deplock" + ], + "datasource_ids": [ + "swift_package_show_dependencies" + ], + "purl": "pkg:swift/VercelUI" + } + ], + "dependencies": [ + { + "purl": "pkg:swift/github.com/swift-cloud/Vercel@1.15.2", + "extracted_requirement": "1.15.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "swift", + "namespace": "github.com/swift-cloud", + "name": "Vercel", + "version": "1.15.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:swift/github.com/vapor/vapor@4.79.0", + "extracted_requirement": "4.79.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {}, + "dependency_uid": "pkg:swift/github.com/swift-cloud/Vercel@1.15.2?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:swift/VercelUI?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "swift-show-dependencies.deplock", + "datasource_id": "swift_package_show_dependencies" + }, + { + "purl": "pkg:swift/github.com/vapor/vapor@4.79.0", + "extracted_requirement": "4.79.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/vapor", + "name": "vapor", + "version": "4.79.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:swift/github.com/swift-server/async-http-client@1.19.0", + "extracted_requirement": "1.19.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {}, + "dependency_uid": "pkg:swift/github.com/vapor/vapor@4.79.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:swift/VercelUI?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "swift-show-dependencies.deplock", + "datasource_id": "swift_package_show_dependencies" + }, + { + "purl": "pkg:swift/github.com/swift-server/async-http-client@1.19.0", + "extracted_requirement": "1.19.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/swift-server", + "name": "async-http-client", + "version": "1.19.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:swift/github.com/apple/swift-nio@2.58.0", + "extracted_requirement": "2.58.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:swift/github.com/apple/swift-atomics@1.1.0", + "extracted_requirement": "1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {}, + "dependency_uid": "pkg:swift/github.com/swift-server/async-http-client@1.19.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:swift/VercelUI?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "swift-show-dependencies.deplock", + "datasource_id": "swift_package_show_dependencies" + }, + { + "purl": "pkg:swift/github.com/apple/swift-nio@2.58.0", + "extracted_requirement": "2.58.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/apple", + "name": "swift-nio", + "version": "2.58.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:swift/github.com/apple/swift-atomics@1.1.0", + "extracted_requirement": "1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {}, + "dependency_uid": "pkg:swift/github.com/apple/swift-nio@2.58.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:swift/VercelUI?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "swift-show-dependencies.deplock", + "datasource_id": "swift_package_show_dependencies" + }, + { + "purl": "pkg:swift/github.com/apple/swift-atomics@1.1.0", + "extracted_requirement": "1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/apple", + "name": "swift-atomics", + "version": "1.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {}, + "dependency_uid": "pkg:swift/github.com/apple/swift-atomics@1.1.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:swift/VercelUI?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "swift-show-dependencies.deplock", + "datasource_id": "swift_package_show_dependencies" + }, + { + "purl": "pkg:swift/github.com/apple/swift-atomics@1.1.0", + "extracted_requirement": "1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/apple", + "name": "swift-atomics", + "version": "1.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {}, + "dependency_uid": "pkg:swift/github.com/apple/swift-atomics@1.1.0?uuid=fixed-uid-done-for-testing-5642512d1758", + "for_package_uid": "pkg:swift/VercelUI?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_path": "swift-show-dependencies.deplock", + "datasource_id": "swift_package_show_dependencies" + } + ], + "files": [ + { + "path": "swift-show-dependencies.deplock", + "type": "file", + "package_data": [ + { + "type": "swift", + "namespace": null, + "name": "VercelUI", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:swift/github.com/swift-cloud/Vercel@1.15.2", + "extracted_requirement": "1.15.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "swift", + "namespace": "github.com/swift-cloud", + "name": "Vercel", + "version": "1.15.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:swift/github.com/vapor/vapor@4.79.0", + "extracted_requirement": "4.79.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {} + }, + { + "purl": "pkg:swift/github.com/vapor/vapor@4.79.0", + "extracted_requirement": "4.79.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/vapor", + "name": "vapor", + "version": "4.79.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:swift/github.com/swift-server/async-http-client@1.19.0", + "extracted_requirement": "1.19.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {} + }, + { + "purl": "pkg:swift/github.com/swift-server/async-http-client@1.19.0", + "extracted_requirement": "1.19.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/swift-server", + "name": "async-http-client", + "version": "1.19.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:swift/github.com/apple/swift-nio@2.58.0", + "extracted_requirement": "2.58.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:swift/github.com/apple/swift-atomics@1.1.0", + "extracted_requirement": "1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {} + }, + { + "purl": "pkg:swift/github.com/apple/swift-nio@2.58.0", + "extracted_requirement": "2.58.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/apple", + "name": "swift-nio", + "version": "2.58.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:swift/github.com/apple/swift-atomics@1.1.0", + "extracted_requirement": "1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {} + }, + { + "purl": "pkg:swift/github.com/apple/swift-atomics@1.1.0", + "extracted_requirement": "1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/apple", + "name": "swift-atomics", + "version": "1.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {} + }, + { + "purl": "pkg:swift/github.com/apple/swift-atomics@1.1.0", + "extracted_requirement": "1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/apple", + "name": "swift-atomics", + "version": "1.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies", + "purl": "pkg:swift/VercelUI" + } + ], + "for_packages": [ + "pkg:swift/VercelUI?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "scan_errors": [] + } + ] +} \ No newline at end of file diff --git a/tests/packagedcode/data/swift/swift-vercelui-show-dependencies-parse-expected.json b/tests/packagedcode/data/swift/swift-vercelui-show-dependencies-parse-expected.json new file mode 100644 index 00000000000..53688c57dfe --- /dev/null +++ b/tests/packagedcode/data/swift/swift-vercelui-show-dependencies-parse-expected.json @@ -0,0 +1,424 @@ +[ + { + "type": "swift", + "namespace": null, + "name": "VercelUI", + "version": null, + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:swift/github.com/swift-cloud/Vercel@1.15.2", + "extracted_requirement": "1.15.2", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": { + "type": "swift", + "namespace": "github.com/swift-cloud", + "name": "Vercel", + "version": "1.15.2", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:swift/github.com/vapor/vapor@4.79.0", + "extracted_requirement": "4.79.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {} + }, + { + "purl": "pkg:swift/github.com/vapor/vapor@4.79.0", + "extracted_requirement": "4.79.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/vapor", + "name": "vapor", + "version": "4.79.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:swift/github.com/swift-server/async-http-client@1.19.0", + "extracted_requirement": "1.19.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {} + }, + { + "purl": "pkg:swift/github.com/swift-server/async-http-client@1.19.0", + "extracted_requirement": "1.19.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/swift-server", + "name": "async-http-client", + "version": "1.19.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:swift/github.com/apple/swift-nio@2.58.0", + "extracted_requirement": "2.58.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + }, + { + "purl": "pkg:swift/github.com/apple/swift-atomics@1.1.0", + "extracted_requirement": "1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {} + }, + { + "purl": "pkg:swift/github.com/apple/swift-nio@2.58.0", + "extracted_requirement": "2.58.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/apple", + "name": "swift-nio", + "version": "2.58.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [ + { + "purl": "pkg:swift/github.com/apple/swift-atomics@1.1.0", + "extracted_requirement": "1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": true, + "resolved_package": {}, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {} + }, + { + "purl": "pkg:swift/github.com/apple/swift-atomics@1.1.0", + "extracted_requirement": "1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/apple", + "name": "swift-atomics", + "version": "1.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {} + }, + { + "purl": "pkg:swift/github.com/apple/swift-atomics@1.1.0", + "extracted_requirement": "1.1.0", + "scope": "dependencies", + "is_runtime": false, + "is_optional": false, + "is_resolved": true, + "is_direct": false, + "resolved_package": { + "type": "swift", + "namespace": "github.com/apple", + "name": "swift-atomics", + "version": "1.1.0", + "qualifiers": {}, + "subpath": null, + "primary_language": "Swift", + "description": null, + "release_date": null, + "parties": [], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": null, + "declared_license_expression_spdx": null, + "license_detections": [], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": true, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies" + }, + "extra_data": {} + } + ], + "repository_homepage_url": null, + "repository_download_url": null, + "api_data_url": null, + "datasource_id": "swift_package_show_dependencies", + "purl": "pkg:swift/VercelUI" + } +] \ No newline at end of file diff --git a/tests/packagedcode/test_npm.py b/tests/packagedcode/test_npm.py index 5f9d2129b5f..2e5d5e4f336 100644 --- a/tests/packagedcode/test_npm.py +++ b/tests/packagedcode/test_npm.py @@ -275,6 +275,13 @@ def test_parse_package_lock_v2_2(self): packages = npm.NpmPackageLockJsonHandler.parse(test_file) self.check_packages_data(packages, expected_loc, regen=REGEN_TEST_FIXTURES) + def test_parse_package_lock_v2_alias(self): + test_file = self.get_test_loc('npm/alias/package-lock.json') + expected_loc = self.get_test_loc( + 'npm/alias/package-lock.json.expected') + packages = npm.NpmPackageLockJsonHandler.parse(test_file) + self.check_packages_data(packages, expected_loc, regen=REGEN_TEST_FIXTURES) + def test_is_datafile_npm_shrinkwrap_json(self): test_file = self.get_test_loc('npm/npm-shrinkwrap/npm-shrinkwrap.json') assert npm.NpmShrinkwrapJsonHandler.is_datafile(test_file) @@ -360,6 +367,13 @@ def test_npm_yarn_with_package_json_resolve_dependencies(self): expected_file, result_file, remove_uuid=True, regen=REGEN_TEST_FIXTURES ) + def test_npm_yarn_lock_v1_parse_alias(self): + test_file = self.get_test_loc('npm/yarn-lock/v1-alias/yarn.lock') + expected_loc = self.get_test_loc( + 'npm/yarn-lock/v1-alias/yarn.lock-expected') + packages = npm.YarnLockV1Handler.parse(test_file) + self.check_packages_data(packages, expected_loc, regen=REGEN_TEST_FIXTURES) + def test_is_datafile_pnpm_shrinkwrap_yaml(self): test_file = self.get_test_loc('npm/pnpm/shrinkwrap/v3/vuepack/shrinkwrap.yaml') assert npm.PnpmShrinkwrapYamlHandler.is_datafile(test_file) @@ -386,6 +400,12 @@ def test_parse_pnpm_shrinkwrap_yaml(self): packages = npm.PnpmLockYamlHandler.parse(test_file) self.check_packages_data(packages, expected_loc, regen=REGEN_TEST_FIXTURES) + def test_parse_package_json_alias_requirements(self): + test_file = self.get_test_loc('npm/alias/package.json') + expected_loc = self.get_test_loc('npm/alias/package.json.expected') + packages = npm.NpmPackageJsonHandler.parse(test_file) + self.check_packages_data(packages, expected_loc, regen=REGEN_TEST_FIXTURES) + def test_pnpm_scan_with_workspace_package_json(self): test_folder = self.get_test_loc('npm/pnpm/pnpm-lock/v5/cobe/') expected_file = self.get_test_loc('npm/pnpm/pnpm-lock/v5/cobe-scan.expected.json') @@ -413,6 +433,15 @@ def test_npm_yarn_scan_with_workspace_package_json(self): expected_file, result_file, remove_uuid=True, regen=REGEN_TEST_FIXTURES ) + def test_npm_scan_with_workspace_with_purl_package_json(self): + test_folder = self.get_test_loc('npm/workspace/change-case/') + expected_file = self.get_test_loc('npm/workspace/change-case.expected.json') + result_file = self.get_temp_file('results.json') + run_scan_click(['--package', '--license', test_folder, '--json', result_file]) + check_json_scan( + expected_file, result_file, remove_uuid=True, regen=REGEN_TEST_FIXTURES + ) + def test_is_datafile_pnpm_workspace_yaml(self): test_file = self.get_test_loc('npm/pnpm/workspace/pnpm-workspace.yaml') assert npm.PnpmWorkspaceYamlHandler.is_datafile(test_file) diff --git a/tests/packagedcode/test_plugin_package.py b/tests/packagedcode/test_plugin_package.py index 2594b4fbd64..0d558e42979 100644 --- a/tests/packagedcode/test_plugin_package.py +++ b/tests/packagedcode/test_plugin_package.py @@ -17,6 +17,7 @@ from scancode.cli_test_utils import check_json_scan from scancode.cli_test_utils import run_scan_click from scancode_config import REGEN_TEST_FIXTURES +from commoncode.system import on_linux class TestPlugins(PackageTester): @@ -220,7 +221,10 @@ def test_package_command_scan_winmd(self): check_json_scan(expected_file, result_file, remove_uuid=True, regen=REGEN_TEST_FIXTURES) def test_package_list_command(self, regen=REGEN_TEST_FIXTURES): - expected_file = self.get_test_loc('plugin/help.txt') + if on_linux: + expected_file = self.get_test_loc('plugin/plugins_list_linux.txt') + else: + expected_file = self.get_test_loc('plugin/plugins_list.txt') result = run_scan_click(['--list-packages']) if regen: with open(expected_file, 'w') as ef: diff --git a/tests/packagedcode/test_pypi.py b/tests/packagedcode/test_pypi.py index 7164214dd95..37bd2043275 100644 --- a/tests/packagedcode/test_pypi.py +++ b/tests/packagedcode/test_pypi.py @@ -296,7 +296,7 @@ def test_parse_metadata_prefer_pkg_info_from_egg_info_from_command_line(self): # `celery/celery.egg-info/PKG-INFO` vc = VirtualCodebase(location=result_file) for dep in vc.attributes.dependencies: - assert dep['datafile_path'] == 'celery/celery.egg-info/PKG-INFO' + assert dep['datafile_path'] == 'celery/celery.egg-info/requires.txt' for pkg in vc.attributes.packages: for path in pkg['datafile_paths']: assert path == 'celery/celery.egg-info/PKG-INFO' diff --git a/tests/packagedcode/test_swift.py b/tests/packagedcode/test_swift.py index f4e1337edef..c4000de0d85 100644 --- a/tests/packagedcode/test_swift.py +++ b/tests/packagedcode/test_swift.py @@ -19,6 +19,24 @@ class TestSwiftHandler(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), "data/swift") + def test_swift_manifest_json_dump_is_datafile(self): + test_file = self.get_test_loc( + "packages/mapboxmaps_manifest_and_resolved/Package.swift.json" + ) + assert swift.SwiftManifestJsonHandler.is_datafile(test_file) + + def test_swift_package_resolved_is_datafile(self): + test_file = self.get_test_loc( + "packages/mapboxmaps_manifest_and_resolved/Package.resolved" + ) + assert swift.SwiftPackageResolvedHandler.is_datafile(test_file) + + def test_swift_show_dependencies_deplock_is_datafile(self): + test_file = self.get_test_loc( + "packages/vercelui/swift-show-dependencies.deplock" + ) + assert swift.SwiftShowDependenciesDepLockHandler.is_datafile(test_file) + def test_parse_for_mapboxmaps_manifest(self): test_file = self.get_test_loc( "packages/mapboxmaps_manifest_and_resolved/Package.swift.json" @@ -35,6 +53,16 @@ def test_parse_for_mapboxmaps_resolved(self): packages = swift.SwiftPackageResolvedHandler.parse(test_file) self.check_packages_data(packages, expected_loc, regen=REGEN_TEST_FIXTURES) + def test_parse_for_show_dependencies_deplock(self): + test_file = self.get_test_loc( + "packages/vercelui/swift-show-dependencies.deplock" + ) + expected_loc = self.get_test_loc( + "swift-vercelui-show-dependencies-parse-expected.json" + ) + packages = swift.SwiftShowDependenciesDepLockHandler.parse(test_file) + self.check_packages_data(packages, expected_loc, regen=REGEN_TEST_FIXTURES) + class TestSwiftEndtoEnd(PackageTester): test_data_dir = os.path.join(os.path.dirname(__file__), "data/swift") @@ -102,11 +130,30 @@ def test_package_scan_swift_end_to_end_full_mapboxmaps_resolved_only(self): expected_file, result_file, remove_uuid=True, regen=REGEN_TEST_FIXTURES ) - def test_package_scan_swift_end_to_end_full_vercelui_resolved_only(self): + def test_package_scan_swift_end_to_end_full_vercelui(self): test_dir = self.get_test_loc("packages/vercelui") result_file = self.get_temp_file("json") + expected_file = self.get_test_loc("swift-vercelui-expected.json") + run_scan_click( + [ + "--package", + "--strip-root", + "--processes", + "-1", + test_dir, + "--json", + result_file, + ] + ) + check_json_scan( + expected_file, result_file, remove_uuid=True, regen=REGEN_TEST_FIXTURES + ) + + def test_package_scan_swift_end_to_end_full_vercelui_show_dependencies_only(self): + test_dir = self.get_test_loc("packages/vercelui_show_dependencies") + result_file = self.get_temp_file("json") expected_file = self.get_test_loc( - "swift-vercelui-expected.json" + "swift-vercelui-show-dependencies-expected.json" ) run_scan_click( [ diff --git a/tests/scancode/data/help/help_linux.txt b/tests/scancode/data/help/help_linux.txt new file mode 100644 index 00000000000..1295e3c4745 --- /dev/null +++ b/tests/scancode/data/help/help_linux.txt @@ -0,0 +1,182 @@ +Usage: scancode [OPTIONS] ... + + scan the file or directory for license, origin and packages and save + results to FILE(s) using one or more output format option. + + Error and progress are printed to stderr. + +Options: + + primary scans: + -l, --license Scan for licenses. + -p, --package Scan for application package and dependency + manifests, lockfiles and related data. + --system-package Scan for installed system package databases. + --package-only Scan for system and application package data and skip + license/copyright detection and top-level package creation. + -c, --copyright Scan for copyrights. + --go-symbol Collect Go symbols. + + other scans: + -i, --info Scan for file information (size, checksums, etc). + --generated Classify automatically generated code files with a flag. + -e, --email Scan for emails. + -u, --url Scan for urls. + + scan options: + --license-diagnostics In license detections, include diagnostic details + to figure out the license detection post + processing steps applied. + --license-score INTEGER Do not return license matches with a score lower + than this score. A number between 0 and 100. + [default: 0] + --license-text Include the detected licenses matched text. + --license-text-diagnostics In the matched license text, include diagnostic + highlights surrounding with square brackets [] + words that are not matched. + --license-url-template TEXT Set the template URL used for the license + reference URLs. Curly braces ({}) are replaced by + the license key. [default: https://scancode- + licensedb.aboutcode.org/{}] + --max-email INT Report only up to INT emails found in a file. Use + 0 for no limit. [default: 50] + --max-url INT Report only up to INT urls found in a file. Use 0 + for no limit. [default: 50] + --unknown-licenses [EXPERIMENTAL] Detect unknown licenses. + + output formats: + --json FILE Write scan output as compact JSON to FILE. + --json-pp FILE Write scan output as pretty-printed JSON to FILE. + --json-lines FILE Write scan output as JSON Lines to FILE. + --yaml FILE Write scan output as YAML to FILE. + --csv FILE [DEPRECATED] Write scan output as CSV to FILE. The + --csv option is deprecated and will be replaced by new + CSV and tabular output formats in the next ScanCode + release. Visit https://github.com/nexB/scancode- + toolkit/issues/3043 to provide inputs and feedback. + --html FILE Write scan output as HTML to FILE. + --custom-output FILE Write scan output to FILE formatted with the custom + Jinja template file. + --debian FILE Write scan output in machine-readable Debian copyright + format to FILE. + --custom-template FILE Use this Jinja template FILE as a custom template. + --cyclonedx FILE Write scan output in CycloneDX JSON format to FILE. + --cyclonedx-xml FILE Write scan output in CycloneDX XML format to FILE. + --spdx-rdf FILE Write scan output as SPDX RDF to FILE. + --spdx-tv FILE Write scan output as SPDX Tag/Value to FILE. + + output filters: + --ignore-author Ignore a file (and all its findings) if an + author contains a match to the + regular expression. Note that this will ignore + a file even if it has other findings such as a + license or errors. + --ignore-copyright-holder + Ignore a file (and all its findings) if a + copyright holder contains a match to the + regular expression. Note that this + will ignore a file even if it has other + scanned data such as a license or errors. + --only-findings Only return files or directories with findings + for the requested scans. Files and directories + without findings are omitted (file information + is not treated as findings). + + output control: + --full-root Report full, absolute paths. + --strip-root Strip the root directory segment of all paths. The default is to + always include the last directory segment of the scanned path + such that all paths have a common root directory. + + pre-scan: + --ignore Ignore files matching . + --include Include files matching . + --facet = Add the to files with a path matching + . + + post-scan: + --classify Classify files with flags telling if the file is a + legal, or readme or test file, etc. + --consolidate Group resources by Packages or license and copyright + holder and return those groupings as a list of + consolidated packages and a list of consolidated + components. This requires the scan to have/be run + with the copyright, license, and package options + active + --filter-clues Filter redundant duplicated clues already contained + in detected license and copyright texts and notices. + --license-clarity-score Compute a summary license clarity score at the + codebase level. + --license-policy FILE Load a License Policy file and apply it to the scan + at the Resource level. + --license-references Return reference data for all licenses and license + rules present in detections. + --mark-source Set the "is_source" to true for directories that + contain over 90% of source files as children and + descendants. Count the number of source files in a + directory as a new source_file_counts attribute + --summary Summarize scans by providing declared origin + information and other detected origin info at the + codebase attribute level. + --tallies Compute tallies for license, copyright and other + scans at the codebase level. + --tallies-by-facet Compute tallies for license, copyright and other + scans and group the results by facet. + --tallies-key-files Compute tallies for license, copyright and other + scans for key, top-level files. Key files are top- + level codebase files such as COPYING, README and + package manifests as reported by the --classify + option "is_legal", "is_readme", "is_manifest" and + "is_top_level" flags. + --tallies-with-details Compute tallies of license, copyright and other scans + at the codebase level, keeping intermediate details + at the file and directory level. + --todo Summarize scans by providing all ambiguous detections + which are todo items and needs manual review. + + core: + --timeout Stop an unfinished file scan after a timeout in + seconds. [default: 120 seconds] + -n, --processes INT Set the number of parallel processes to use. Disable + parallel processing if 0. Also disable threading if + -1. [default: 1] + -q, --quiet Do not print summary or progress. + -v, --verbose Print progress as file-by-file path instead of a + progress bar. Print verbose scan counters. + --from-json Load codebase from one or more JSON scan + file(s). + --max-in-memory INTEGER Maximum number of files and directories scan details + kept in memory during a scan. Additional files and + directories scan details above this number are cached + on-disk rather than in memory. Use 0 to use unlimited + memory and disable on-disk caching. Use -1 to use + only on-disk caching. [default: 10000] + --max-depth INTEGER Maximum nesting depth of subdirectories to scan. + Descend at most INTEGER levels of directories below + and including the starting directory. Use 0 for no + scan depth limit. + + documentation: + -h, --help Show this message and exit. + -A, --about Show information about ScanCode and licensing and exit. + -V, --version Show the version and exit. + --examples Show command examples and exit. + --list-packages Show the list of supported package manifest parsers and exit. + --plugins Show the list of available ScanCode plugins and exit. + --print-options Show the list of selected options and exit. + + Examples (use --examples for more): + + Scan the 'samples' directory for licenses and copyrights. + Save scan results to the 'scancode_result.json' JSON file: + + scancode --license --copyright --json-pp scancode_result.json samples + + Scan the 'samples' directory for licenses and package manifests. Print scan + results on screen as pretty-formatted JSON (using the special '-' FILE to print + to on screen/to stdout): + + scancode --json-pp - --license --package samples + + Note: when you run scancode, a progress bar is displayed with a counter of the + number of files processed. Use --verbose to display file-by-file progress. diff --git a/tests/scancode/test_cli.py b/tests/scancode/test_cli.py index 746da180513..93d56ba0d93 100644 --- a/tests/scancode/test_cli.py +++ b/tests/scancode/test_cli.py @@ -679,7 +679,10 @@ def test_scan_does_scan_rpm(): def test_scan_cli_help(regen=REGEN_TEST_FIXTURES): - expected_file = test_env.get_test_loc('help/help.txt') + if on_linux: + expected_file = test_env.get_test_loc('help/help_linux.txt') + else: + expected_file = test_env.get_test_loc('help/help.txt') result = run_scan_click(['--help']) result = result.output if regen: diff --git a/tests/summarycode/data/score/no_license_ambiguity-expected.json b/tests/summarycode/data/score/no_license_ambiguity-expected.json index 7db8bbeeacb..2122913a5df 100644 --- a/tests/summarycode/data/score/no_license_ambiguity-expected.json +++ b/tests/summarycode/data/score/no_license_ambiguity-expected.json @@ -1,6 +1,6 @@ { "summary": { - "declared_license_expression": "apache-2.0 AND (apache-2.0 OR mit)", + "declared_license_expression": "mit OR apache-2.0", "license_clarity_score": { "score": 100, "declared_license": true, @@ -268,92 +268,6 @@ } ] }, - { - "identifier": "apache_2_0_and__apache_2_0_or_mit-7ff6dd9d-b5e8-3fa4-dd61-c5a634c9b300", - "license_expression": "apache-2.0 AND (apache-2.0 OR mit)", - "license_expression_spdx": "Apache-2.0 AND (Apache-2.0 OR MIT)", - "detection_count": 1, - "reference_matches": [ - { - "license_expression": "apache-2.0", - "license_expression_spdx": "Apache-2.0", - "from_file": "no_license_ambiguity/COPYRIGHT", - "start_line": 1, - "end_line": 7, - "matcher": "3-seq", - "score": 94.12, - "matched_length": 48, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "apache-2.0_1060.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1060.RULE" - }, - { - "license_expression": "apache-2.0 OR mit", - "license_expression_spdx": "Apache-2.0 OR MIT", - "from_file": "no_license_ambiguity/COPYRIGHT", - "start_line": 6, - "end_line": 9, - "matcher": "3-seq", - "score": 97.83, - "matched_length": 45, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "apache-2.0_or_mit_47.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_47.RULE" - } - ] - }, - { - "identifier": "mit-a9138d4e-bc0e-0a20-76fd-237047e6d41c", - "license_expression": "mit", - "license_expression_spdx": "MIT", - "detection_count": 1, - "reference_matches": [ - { - "license_expression": "mit OR apache-2.0", - "license_expression_spdx": "MIT OR Apache-2.0", - "from_file": "no_license_ambiguity/README.md", - "start_line": 152, - "end_line": 157, - "matcher": "3-seq", - "score": 57.69, - "matched_length": 15, - "match_coverage": 57.69, - "rule_relevance": 100, - "rule_identifier": "mit_or_apache-2.0_9.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_or_apache-2.0_9.RULE" - }, - { - "license_expression": "mit", - "license_expression_spdx": "MIT", - "from_file": "no_license_ambiguity/README.md", - "start_line": 157, - "end_line": 157, - "matcher": "2-aho", - "score": 100.0, - "matched_length": 4, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "mit_154.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_154.RULE" - }, - { - "license_expression": "mit", - "license_expression_spdx": "MIT", - "from_file": "no_license_ambiguity/LICENSE-MIT", - "start_line": 4, - "end_line": 26, - "matcher": "2-aho", - "score": 100.0, - "matched_length": 161, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "mit.LICENSE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE" - } - ] - }, { "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", "license_expression": "mit", @@ -419,6 +333,50 @@ "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_or_apache-2.0_14.RULE" } ] + }, + { + "identifier": "mit_or_apache_2_0-a43a1e15-1968-4de7-fe27-2129ebf57d54", + "license_expression": "mit OR apache-2.0", + "license_expression_spdx": "MIT OR Apache-2.0", + "detection_count": 1, + "reference_matches": [ + { + "license_expression": "mit OR apache-2.0", + "license_expression_spdx": "MIT OR Apache-2.0", + "from_file": "no_license_ambiguity/COPYRIGHT", + "start_line": 1, + "end_line": 12, + "matcher": "3-seq", + "score": 97.78, + "matched_length": 88, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_or_apache-2.0_38.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_or_apache-2.0_38.RULE" + } + ] + }, + { + "identifier": "mit_or_apache_2_0-d9d84ae7-113e-249f-5302-6054bdbcdadb", + "license_expression": "mit OR apache-2.0", + "license_expression_spdx": "MIT OR Apache-2.0", + "detection_count": 1, + "reference_matches": [ + { + "license_expression": "mit OR apache-2.0", + "license_expression_spdx": "MIT OR Apache-2.0", + "from_file": "no_license_ambiguity/README.md", + "start_line": 152, + "end_line": 158, + "matcher": "3-seq", + "score": 97.06, + "matched_length": 33, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit_or_apache-2.0_33.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_or_apache-2.0_33.RULE" + } + ] } ], "files": [ @@ -526,47 +484,33 @@ "is_readme": false, "is_top_level": true, "is_key_file": true, - "detected_license_expression": "apache-2.0 AND (apache-2.0 OR mit)", - "detected_license_expression_spdx": "Apache-2.0 AND (Apache-2.0 OR MIT)", + "detected_license_expression": "mit OR apache-2.0", + "detected_license_expression_spdx": "MIT OR Apache-2.0", "license_detections": [ { - "license_expression": "apache-2.0 AND (apache-2.0 OR mit)", - "license_expression_spdx": "Apache-2.0 AND (Apache-2.0 OR MIT)", + "license_expression": "mit OR apache-2.0", + "license_expression_spdx": "MIT OR Apache-2.0", "matches": [ { - "license_expression": "apache-2.0", - "license_expression_spdx": "Apache-2.0", + "license_expression": "mit OR apache-2.0", + "license_expression_spdx": "MIT OR Apache-2.0", "from_file": "no_license_ambiguity/COPYRIGHT", "start_line": 1, - "end_line": 7, + "end_line": 12, "matcher": "3-seq", - "score": 94.12, - "matched_length": 48, + "score": 97.78, + "matched_length": 88, "match_coverage": 100.0, "rule_relevance": 100, - "rule_identifier": "apache-2.0_1060.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_1060.RULE" - }, - { - "license_expression": "apache-2.0 OR mit", - "license_expression_spdx": "Apache-2.0 OR MIT", - "from_file": "no_license_ambiguity/COPYRIGHT", - "start_line": 6, - "end_line": 9, - "matcher": "3-seq", - "score": 97.83, - "matched_length": 45, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "apache-2.0_or_mit_47.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/apache-2.0_or_mit_47.RULE" + "rule_identifier": "mit_or_apache-2.0_38.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_or_apache-2.0_38.RULE" } ], - "identifier": "apache_2_0_and__apache_2_0_or_mit-7ff6dd9d-b5e8-3fa4-dd61-c5a634c9b300" + "identifier": "mit_or_apache_2_0-a43a1e15-1968-4de7-fe27-2129ebf57d54" } ], "license_clues": [], - "percentage_of_license_text": 81.11, + "percentage_of_license_text": 97.78, "copyrights": [], "holders": [], "authors": [], @@ -1026,64 +970,33 @@ "is_readme": true, "is_top_level": true, "is_key_file": true, - "detected_license_expression": "mit", - "detected_license_expression_spdx": "MIT", + "detected_license_expression": "mit OR apache-2.0", + "detected_license_expression_spdx": "MIT OR Apache-2.0", "license_detections": [ { - "license_expression": "mit", - "license_expression_spdx": "MIT", + "license_expression": "mit OR apache-2.0", + "license_expression_spdx": "MIT OR Apache-2.0", "matches": [ { "license_expression": "mit OR apache-2.0", "license_expression_spdx": "MIT OR Apache-2.0", "from_file": "no_license_ambiguity/README.md", "start_line": 152, - "end_line": 157, + "end_line": 158, "matcher": "3-seq", - "score": 57.69, - "matched_length": 15, - "match_coverage": 57.69, - "rule_relevance": 100, - "rule_identifier": "mit_or_apache-2.0_9.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_or_apache-2.0_9.RULE" - }, - { - "license_expression": "mit", - "license_expression_spdx": "MIT", - "from_file": "no_license_ambiguity/README.md", - "start_line": 157, - "end_line": 157, - "matcher": "2-aho", - "score": 100.0, - "matched_length": 4, - "match_coverage": 100.0, - "rule_relevance": 100, - "rule_identifier": "mit_154.RULE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_154.RULE" - }, - { - "license_expression": "mit", - "license_expression_spdx": "MIT", - "from_file": "no_license_ambiguity/LICENSE-MIT", - "start_line": 4, - "end_line": 26, - "matcher": "2-aho", - "score": 100.0, - "matched_length": 161, + "score": 97.06, + "matched_length": 33, "match_coverage": 100.0, "rule_relevance": 100, - "rule_identifier": "mit.LICENSE", - "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE" + "rule_identifier": "mit_or_apache-2.0_33.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/mit_or_apache-2.0_33.RULE" } ], - "identifier": "mit-a9138d4e-bc0e-0a20-76fd-237047e6d41c", - "detection_log": [ - "unknown-reference-to-local-file" - ] + "identifier": "mit_or_apache_2_0-d9d84ae7-113e-249f-5302-6054bdbcdadb" } ], "license_clues": [], - "percentage_of_license_text": 1.69, + "percentage_of_license_text": 2.93, "copyrights": [], "holders": [], "authors": [], diff --git a/tests/summarycode/data/summary/embedded_packages/bunkerweb.expected.json b/tests/summarycode/data/summary/embedded_packages/bunkerweb.expected.json new file mode 100644 index 00000000000..66801f6ebe5 --- /dev/null +++ b/tests/summarycode/data/summary/embedded_packages/bunkerweb.expected.json @@ -0,0 +1,890 @@ +{ + "summary": { + "declared_license_expression": "mit", + "license_clarity_score": { + "score": 100, + "declared_license": true, + "identification_precision": true, + "has_license_text": true, + "declared_copyrights": true, + "conflicting_license_categories": false, + "ambiguous_compound_licensing": false + }, + "declared_holder": "Nick Galbreath", + "primary_language": "Python", + "other_license_expressions": [ + { + "value": "bsd-new", + "count": 3 + }, + { + "value": null, + "count": 1 + } + ], + "other_holders": [ + { + "value": null, + "count": 1 + } + ], + "other_languages": [] + }, + "packages": [ + { + "type": "pypi", + "namespace": null, + "name": "BunkerWeb", + "version": "1.5.8", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Make your web services secure by default !", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Bunkerity", + "email": "contact@bunkerity.com", + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "bunkerweb/LICENSE.md", + "start_line": 4, + "end_line": 21, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 161, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit.LICENSE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE" + } + ], + "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "repository_homepage_url": "https://pypi.org/project/BunkerWeb", + "repository_download_url": "https://pypi.org/packages/source/B/BunkerWeb/BunkerWeb-1.5.8.tar.gz", + "api_data_url": "https://pypi.org/pypi/BunkerWeb/1.5.8/json", + "package_uid": "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758", + "datafile_paths": [ + "bunkerweb/pyproject.toml" + ], + "datasource_ids": [ + "pypi_pyproject_toml" + ], + "purl": "pkg:pypi/bunkerweb@1.5.8" + } + ], + "dependencies": [], + "license_detections": [ + { + "identifier": "bsd_new-f4e99f86-00ab-18d9-a65d-a3a12767dcf5", + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "detection_count": 2, + "reference_matches": [ + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/setup.py", + "start_line": 41, + "end_line": 41, + "matcher": "2-aho", + "score": 99.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "pypi_bsd_license.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE" + } + ] + }, + { + "identifier": "bsd_new-90c8b089-2f85-4a93-d0c8-a411247c6395", + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "detection_count": 1, + "reference_matches": [ + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/setup.py", + "start_line": 6, + "end_line": 6, + "matcher": "2-aho", + "score": 99.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "bsd-new_26.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_26.RULE" + }, + { + "license_expression": "unknown-license-reference", + "license_expression_spdx": "LicenseRef-scancode-unknown-license-reference", + "from_file": "bunkerweb/deps/libinjection/setup.py", + "start_line": 6, + "end_line": 6, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "unknown-license-reference_98.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_98.RULE" + }, + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 4, + "end_line": 29, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 216, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_105.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_105.RULE" + }, + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 32, + "end_line": 32, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 7, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_226.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_226.RULE" + } + ] + }, + { + "identifier": "bsd_new-99f77058-447d-ca1d-7b17-8e92d1a664e4", + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "detection_count": 1, + "reference_matches": [ + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 4, + "end_line": 29, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 216, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_105.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_105.RULE" + }, + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 32, + "end_line": 32, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 7, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_226.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_226.RULE" + } + ] + }, + { + "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a", + "license_expression": "mit", + "license_expression_spdx": "MIT", + "detection_count": 2, + "reference_matches": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "from_file": "bunkerweb/LICENSE.md", + "start_line": 4, + "end_line": 21, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 161, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit.LICENSE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE" + } + ] + } + ], + "files": [ + { + "path": "bunkerweb", + "type": "directory", + "name": "bunkerweb", + "base_name": "bunkerweb", + "extension": "", + "size": 0, + "sha1": null, + "md5": null, + "sha256": null, + "mime_type": null, + "file_type": null, + "programming_language": null, + "is_binary": false, + "is_text": false, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "package_data": [], + "for_packages": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": true, + "is_key_file": false, + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "copyrights": [], + "holders": [], + "authors": [], + "files_count": 4, + "dirs_count": 2, + "size_count": 4405, + "scan_errors": [] + }, + { + "path": "bunkerweb/LICENSE.md", + "type": "file", + "name": "LICENSE.md", + "base_name": "LICENSE", + "extension": ".md", + "size": 1084, + "sha1": "242b333ee88b352d41d2aafe9994a9f77de370f1", + "md5": "caa29ac8cda378ef687072b0b1c8c0e4", + "sha256": "9a5ef97962dd0750ed94f1ee3aa029136aa2a06586026b179730a777f50c8702", + "mime_type": "text/plain", + "file_type": "ASCII text", + "programming_language": null, + "is_binary": false, + "is_text": true, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "is_legal": true, + "is_manifest": false, + "is_readme": false, + "is_top_level": true, + "is_key_file": true, + "detected_license_expression": "mit", + "detected_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "bunkerweb/LICENSE.md", + "start_line": 4, + "end_line": 21, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 161, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit.LICENSE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE" + } + ], + "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a" + } + ], + "license_clues": [], + "percentage_of_license_text": 94.71, + "copyrights": [ + { + "copyright": "Copyright (c) 2012-2016, Nick Galbreath", + "start_line": 1, + "end_line": 1 + } + ], + "holders": [ + { + "holder": "Nick Galbreath", + "start_line": 1, + "end_line": 1 + } + ], + "authors": [], + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] + }, + { + "path": "bunkerweb/deps", + "type": "directory", + "name": "deps", + "base_name": "deps", + "extension": "", + "size": 0, + "sha1": null, + "md5": null, + "sha256": null, + "mime_type": null, + "file_type": null, + "programming_language": null, + "is_binary": false, + "is_text": false, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "package_data": [], + "for_packages": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": true, + "is_key_file": false, + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "copyrights": [], + "holders": [], + "authors": [], + "files_count": 2, + "dirs_count": 1, + "size_count": 2998, + "scan_errors": [] + }, + { + "path": "bunkerweb/deps/libinjection", + "type": "directory", + "name": "libinjection", + "base_name": "libinjection", + "extension": "", + "size": 0, + "sha1": null, + "md5": null, + "sha256": null, + "mime_type": null, + "file_type": null, + "programming_language": null, + "is_binary": false, + "is_text": false, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "package_data": [], + "for_packages": [], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "copyrights": [], + "holders": [], + "authors": [], + "files_count": 2, + "dirs_count": 0, + "size_count": 2998, + "scan_errors": [] + }, + { + "path": "bunkerweb/deps/libinjection/COPYING.txt", + "type": "file", + "name": "COPYING.txt", + "base_name": "COPYING", + "extension": ".txt", + "size": 1574, + "sha1": "16eb1fced5e1f443e68b3ff36f3328ac8f31d893", + "md5": "2493d74f84f74417cd51943cb1141a42", + "sha256": "88ef2e3f1383c20ad745a60edbce61fe510eda64e6b09a0e833c3660c9386810", + "mime_type": "text/plain", + "file_type": "ASCII text", + "programming_language": null, + "is_binary": false, + "is_text": true, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "package_data": [], + "for_packages": [ + "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "is_legal": true, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "detected_license_expression": "bsd-new", + "detected_license_expression_spdx": "BSD-3-Clause", + "license_detections": [ + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "matches": [ + { + "license_expression": "bsd-new", + "spdx_license_expression": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 4, + "end_line": 29, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 216, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_105.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_105.RULE" + }, + { + "license_expression": "bsd-new", + "spdx_license_expression": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 32, + "end_line": 32, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 7, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_226.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_226.RULE" + } + ], + "identifier": "bsd_new-99f77058-447d-ca1d-7b17-8e92d1a664e4" + } + ], + "license_clues": [], + "percentage_of_license_text": 94.09, + "copyrights": [ + { + "copyright": "Copyright (c) 2012-2016, Nick Galbreath", + "start_line": 1, + "end_line": 1 + } + ], + "holders": [ + { + "holder": "Nick Galbreath", + "start_line": 1, + "end_line": 1 + } + ], + "authors": [], + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] + }, + { + "path": "bunkerweb/deps/libinjection/setup.py", + "type": "file", + "name": "setup.py", + "base_name": "setup", + "extension": ".py", + "size": 1424, + "sha1": "a56c141912506e2eb94bfa164687131ff21fb298", + "md5": "ea7cba7d908eaa03a5b49b245b8119ef", + "sha256": "d61b7ebe3ebdb52e4e1ffe8ae28313ea7560ab619f9f0b211f6cd988d849f907", + "mime_type": "text/plain", + "file_type": "Python script, ASCII text executable", + "programming_language": "Python", + "is_binary": false, + "is_text": true, + "is_archive": false, + "is_media": false, + "is_source": true, + "is_script": true, + "package_data": [ + { + "type": "pypi", + "namespace": null, + "name": "libinjection", + "version": "3.9.1", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Wrapper around libinjection c-code to detect sqli", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Nick Galbreath", + "email": "nickg@client9.com", + "url": null + } + ], + "keywords": [ + "Intended Audience :: Developers", + "Topic :: Database", + "Topic :: Security", + "Operating System :: OS Independent", + "Development Status :: 3 - Alpha", + "Topic :: Internet :: Log Analysis", + "Topic :: Internet :: WWW/HTTP" + ], + "homepage_url": "https://libinjection.client9.com/", + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "bsd-new", + "declared_license_expression_spdx": "BSD-3-Clause", + "license_detections": [ + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "matches": [ + { + "license_expression": "bsd-new", + "spdx_license_expression": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/setup.py", + "start_line": 1, + "end_line": 1, + "matcher": "1-hash", + "score": 99.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "pypi_bsd_license.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE", + "matched_text": "- 'License :: OSI Approved :: BSD License'" + } + ], + "identifier": "bsd_new-f4e99f86-00ab-18d9-a65d-a3a12767dcf5" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": "classifiers:\n - 'License :: OSI Approved :: BSD License'\n", + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://pypi.org/project/libinjection", + "repository_download_url": "https://pypi.org/packages/source/l/libinjection/libinjection-3.9.1.tar.gz", + "api_data_url": "https://pypi.org/pypi/libinjection/3.9.1/json", + "datasource_id": "pypi_setup_py", + "purl": "pkg:pypi/libinjection@3.9.1" + } + ], + "for_packages": [ + "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "detected_license_expression": "bsd-new", + "detected_license_expression_spdx": "BSD-3-Clause", + "license_detections": [ + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "matches": [ + { + "license_expression": "bsd-new", + "spdx_license_expression": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/setup.py", + "start_line": 6, + "end_line": 6, + "matcher": "2-aho", + "score": 99.0, + "matched_length": 2, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "bsd-new_26.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_26.RULE" + }, + { + "license_expression": "unknown-license-reference", + "spdx_license_expression": "LicenseRef-scancode-unknown-license-reference", + "from_file": "bunkerweb/deps/libinjection/setup.py", + "start_line": 6, + "end_line": 6, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 3, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "unknown-license-reference_98.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/unknown-license-reference_98.RULE" + }, + { + "license_expression": "bsd-new", + "spdx_license_expression": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 4, + "end_line": 29, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 216, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_105.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_105.RULE" + }, + { + "license_expression": "bsd-new", + "spdx_license_expression": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/COPYING.txt", + "start_line": 32, + "end_line": 32, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 7, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "bsd-new_226.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/bsd-new_226.RULE" + } + ], + "identifier": "bsd_new-90c8b089-2f85-4a93-d0c8-a411247c6395", + "detection_log": [ + "unknown-reference-to-local-file" + ] + }, + { + "license_expression": "bsd-new", + "license_expression_spdx": "BSD-3-Clause", + "matches": [ + { + "license_expression": "bsd-new", + "spdx_license_expression": "BSD-3-Clause", + "from_file": "bunkerweb/deps/libinjection/setup.py", + "start_line": 41, + "end_line": 41, + "matcher": "2-aho", + "score": 99.0, + "matched_length": 5, + "match_coverage": 100.0, + "rule_relevance": 99, + "rule_identifier": "pypi_bsd_license.RULE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/rules/pypi_bsd_license.RULE" + } + ], + "identifier": "bsd_new-f4e99f86-00ab-18d9-a65d-a3a12767dcf5" + } + ], + "license_clues": [], + "percentage_of_license_text": 7.58, + "copyrights": [ + { + "copyright": "Copyright 2012, 2013, 2014 Nick Galbreath nickg@client9.com", + "start_line": 4, + "end_line": 5 + } + ], + "holders": [ + { + "holder": "Nick Galbreath", + "start_line": 4, + "end_line": 4 + } + ], + "authors": [ + { + "author": "Nick Galbreath", + "start_line": 31, + "end_line": 31 + } + ], + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] + }, + { + "path": "bunkerweb/pyproject.toml", + "type": "file", + "name": "pyproject.toml", + "base_name": "pyproject", + "extension": ".toml", + "size": 323, + "sha1": "e97ff042e27bc5be29abf6483ea57c3abfbfba83", + "md5": "bef2744dd896358a9e799e90cb890883", + "sha256": "2e71a200631f19ee4ebaf8a3c0efe859aa3eeef35adba95268282147ad7b8253", + "mime_type": "text/plain", + "file_type": "ASCII text", + "programming_language": null, + "is_binary": false, + "is_text": true, + "is_archive": false, + "is_media": false, + "is_source": false, + "is_script": false, + "package_data": [ + { + "type": "pypi", + "namespace": null, + "name": "BunkerWeb", + "version": "1.5.8", + "qualifiers": {}, + "subpath": null, + "primary_language": "Python", + "description": "Make your web services secure by default !", + "release_date": null, + "parties": [ + { + "type": "person", + "role": "author", + "name": "Bunkerity", + "email": "contact@bunkerity.com", + "url": null + } + ], + "keywords": [], + "homepage_url": null, + "download_url": null, + "size": null, + "sha1": null, + "md5": null, + "sha256": null, + "sha512": null, + "bug_tracking_url": null, + "code_view_url": null, + "vcs_url": null, + "copyright": null, + "holder": null, + "declared_license_expression": "mit", + "declared_license_expression_spdx": "MIT", + "license_detections": [ + { + "license_expression": "mit", + "license_expression_spdx": "MIT", + "matches": [ + { + "license_expression": "mit", + "spdx_license_expression": "MIT", + "from_file": "bunkerweb/LICENSE.md", + "start_line": 4, + "end_line": 21, + "matcher": "2-aho", + "score": 100.0, + "matched_length": 161, + "match_coverage": 100.0, + "rule_relevance": 100, + "rule_identifier": "mit.LICENSE", + "rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE" + } + ], + "identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a" + } + ], + "other_license_expression": null, + "other_license_expression_spdx": null, + "other_license_detections": [], + "extracted_license_statement": null, + "notice_text": null, + "source_packages": [], + "file_references": [], + "is_private": false, + "is_virtual": false, + "extra_data": {}, + "dependencies": [], + "repository_homepage_url": "https://pypi.org/project/BunkerWeb", + "repository_download_url": "https://pypi.org/packages/source/B/BunkerWeb/BunkerWeb-1.5.8.tar.gz", + "api_data_url": "https://pypi.org/pypi/BunkerWeb/1.5.8/json", + "datasource_id": "pypi_pyproject_toml", + "purl": "pkg:pypi/bunkerweb@1.5.8" + } + ], + "for_packages": [ + "pkg:pypi/bunkerweb@1.5.8?uuid=fixed-uid-done-for-testing-5642512d1758" + ], + "is_legal": false, + "is_manifest": false, + "is_readme": false, + "is_top_level": false, + "is_key_file": false, + "detected_license_expression": null, + "detected_license_expression_spdx": null, + "license_detections": [], + "license_clues": [], + "percentage_of_license_text": 0, + "copyrights": [], + "holders": [], + "authors": [], + "files_count": 0, + "dirs_count": 0, + "size_count": 0, + "scan_errors": [] + } + ] +} \ No newline at end of file diff --git a/tests/summarycode/data/summary/embedded_packages/bunkerweb/LICENSE.md b/tests/summarycode/data/summary/embedded_packages/bunkerweb/LICENSE.md new file mode 100644 index 00000000000..8d45d9625d3 --- /dev/null +++ b/tests/summarycode/data/summary/embedded_packages/bunkerweb/LICENSE.md @@ -0,0 +1,21 @@ +Copyright (c) 2012-2016, Nick Galbreath +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +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. +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. \ No newline at end of file diff --git a/tests/summarycode/data/summary/embedded_packages/bunkerweb/deps/libinjection/COPYING.txt b/tests/summarycode/data/summary/embedded_packages/bunkerweb/deps/libinjection/COPYING.txt new file mode 100644 index 00000000000..35edb2a6aed --- /dev/null +++ b/tests/summarycode/data/summary/embedded_packages/bunkerweb/deps/libinjection/COPYING.txt @@ -0,0 +1,32 @@ +Copyright (c) 2012-2016, Nick Galbreath +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +https://github.com/client9/libinjection +http://opensource.org/licenses/BSD-3-Clause \ No newline at end of file diff --git a/tests/summarycode/data/summary/embedded_packages/bunkerweb/deps/libinjection/setup.py b/tests/summarycode/data/summary/embedded_packages/bunkerweb/deps/libinjection/setup.py new file mode 100644 index 00000000000..10a8f54333e --- /dev/null +++ b/tests/summarycode/data/summary/embedded_packages/bunkerweb/deps/libinjection/setup.py @@ -0,0 +1,49 @@ +""" +libinjection module for python + + Copyright 2012, 2013, 2014 Nick Galbreath + nickg@client9.com + BSD License -- see COPYING.txt for details +""" +try: + from setuptools import setup, Extension +except ImportError: + from distutils.core import setup, Extension + +MODULE = Extension( + '_libinjection', [ + 'libinjection/libinjection_wrap.c', + 'libinjection/libinjection_sqli.c', + 'libinjection/libinjection_html5.c', + 'libinjection/libinjection_xss.c' + ], + swig_opts=['-Wextra', '-builtin'], + define_macros = [], + include_dirs = [], + libraries = [], + library_dirs = [], + ) + +setup ( + name = 'libinjection', + version = '3.9.1', + description = 'Wrapper around libinjection c-code to detect sqli', + author = 'Nick Galbreath', + author_email = 'nickg@client9.com', + url = 'https://libinjection.client9.com/', + ext_modules = [MODULE], + packages = ['libinjection'], + long_description = ''' +wrapper around libinjection +''', + classifiers = [ + 'Intended Audience :: Developers', + 'License :: OSI Approved :: BSD License', + 'Topic :: Database', + 'Topic :: Security', + 'Operating System :: OS Independent', + 'Development Status :: 3 - Alpha', + 'Topic :: Internet :: Log Analysis', + 'Topic :: Internet :: WWW/HTTP' + ] + ) \ No newline at end of file diff --git a/tests/summarycode/data/summary/embedded_packages/bunkerweb/pyproject.toml b/tests/summarycode/data/summary/embedded_packages/bunkerweb/pyproject.toml new file mode 100644 index 00000000000..6a2fa300d5a --- /dev/null +++ b/tests/summarycode/data/summary/embedded_packages/bunkerweb/pyproject.toml @@ -0,0 +1,19 @@ +[project] +name = "BunkerWeb" +description = "Make your web services secure by default !" +version = "1.5.8" +authors = [ + { name = "Bunkerity", email = "contact@bunkerity.com" } +] + +[tool.black] +line-length = 160 +include = '\.pyi?$' +exclude = ''' +/( + | \.git + | src/deps/src + | src/common/core/modsecurity + | env +)/ +''' diff --git a/tests/summarycode/data/tallies/end-2-end/bug-1141.expected.json b/tests/summarycode/data/tallies/end-2-end/bug-1141.expected.json index c2f79df0eed..a372443b23c 100644 --- a/tests/summarycode/data/tallies/end-2-end/bug-1141.expected.json +++ b/tests/summarycode/data/tallies/end-2-end/bug-1141.expected.json @@ -68,11 +68,11 @@ "count": 2 }, { - "value": "Copyright (c) - Members of the Gmerlin project", + "value": "Copyright (c) Members of the Gmerlin project", "count": 1 }, { - "value": "Copyright (c) - Members of the Gmerlin project gmerlin-general@lists.sourceforge.net http://gmerlin.sourceforge.net", + "value": "Copyright (c) Members of the Gmerlin project gmerlin-general@lists.sourceforge.net http://gmerlin.sourceforge.net", "count": 1 } ], diff --git a/tests/summarycode/data/todo/todo_present/incomplete-setup-cfg-expected.json b/tests/summarycode/data/todo/todo_present/incomplete-setup-cfg-expected.json index 2a9073e967a..41aa25c6f43 100644 --- a/tests/summarycode/data/todo/todo_present/incomplete-setup-cfg-expected.json +++ b/tests/summarycode/data/todo/todo_present/incomplete-setup-cfg-expected.json @@ -44,19 +44,7 @@ "is_private": false, "is_virtual": false, "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>=3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], + "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, @@ -107,19 +95,7 @@ "is_private": false, "is_virtual": false, "extra_data": {}, - "dependencies": [ - { - "purl": "pkg:generic/python", - "extracted_requirement": "python_requires>=3.7", - "scope": "python", - "is_runtime": true, - "is_optional": false, - "is_resolved": false, - "is_direct": true, - "resolved_package": {}, - "extra_data": {} - } - ], + "dependencies": [], "repository_homepage_url": null, "repository_download_url": null, "api_data_url": null, diff --git a/tests/summarycode/test_summarizer.py b/tests/summarycode/test_summarizer.py index 4be0380906c..0e695c79845 100644 --- a/tests/summarycode/test_summarizer.py +++ b/tests/summarycode/test_summarizer.py @@ -124,6 +124,18 @@ def test_summary_multiple_package_data(self): ]) check_json_scan(expected_file, result_file, remove_uuid=True, remove_file_date=True, regen=REGEN_TEST_FIXTURES) + def test_summary_root_package_with_embedded_packages(self): + test_dir = self.get_test_loc('summary/embedded_packages/bunkerweb') + result_file = self.get_temp_file('json') + expected_file = self.get_test_loc('summary/embedded_packages/bunkerweb.expected.json') + run_scan_click([ + '-clip', + '--summary', + '--classify', + '--json-pp', result_file, test_dir + ]) + check_json_scan(expected_file, result_file, remove_uuid=True, remove_file_date=True, regen=REGEN_TEST_FIXTURES) + def test_summary_use_holder_from_package_resource(self): test_dir = self.get_test_loc('summary/use_holder_from_package_resource/codebase') result_file = self.get_temp_file('json') diff --git a/tests/textcode/data/markup/404.htm b/tests/textcode/data/markup/404.htm deleted file mode 100644 index 6cd76c49428..00000000000 --- a/tests/textcode/data/markup/404.htm +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - Page not found · GitHub - - - - -
    -
    - -
    -
    -
    - - 404 “This is not the web page you are looking for” - - - - - - - - - - - - -
    - -
    - -
    - - - - - - - -
    - - - - diff --git a/tests/textcode/data/markup/JSON.phps b/tests/textcode/data/markup/JSON.phps deleted file mode 100644 index c1c74915945..00000000000 --- a/tests/textcode/data/markup/JSON.phps +++ /dev/null @@ -1,4 +0,0 @@ - -<?php
    /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

    /**
     * Converts to and from JSON format.
     *
     * JSON (JavaScript Object Notation) is a lightweight data-interchange
     * format. It is easy for humans to read and write. It is easy for machines
     * to parse and generate. It is based on a subset of the JavaScript
     * Programming Language, Standard ECMA-262 3rd Edition - December 1999.
     * This feature can also be found in  Python. JSON is a text format that is
     * completely language independent but uses conventions that are familiar
     * to programmers of the C-family of languages, including C, C++, C#, Java,
     * JavaScript, Perl, TCL, and many others. These properties make JSON an
     * ideal data-interchange language.
     *
     * This package provides a simple encoder and decoder for JSON notation. It
     * is intended for use with client-side Javascript applications that make
     * use of HTTPRequest to perform server communication functions - data can
     * be encoded into JSON notation for use in a client-side javascript, or
     * decoded from incoming Javascript requests. JSON format is native to
     * Javascript, and can be directly eval()'ed with no further parsing
     * overhead
     *
     * All strings should be in ASCII or UTF-8 format!
     *
     * LICENSE: Redistribution and use in source and binary forms, with or
     * without modification, are permitted provided that the following
     * conditions are met: Redistributions of source code must retain the
     * above copyright notice, this list of conditions and the following
     * disclaimer. Redistributions in binary form must reproduce the above
     * copyright notice, this list of conditions and the following disclaimer
     * in the documentation and/or other materials provided with the
     * distribution.
     *
     * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
     * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
     * NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
     * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
     * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
     * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
     * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
     * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
     * DAMAGE.
     *
     * @category
     * @package     Services_JSON
     * @author      Michal Migurski <mike-json@teczno.com>
     * @author      Matt Knapp <mdknapp[at]gmail[dot]com>
     * @author      Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
     * @copyright   2005 Michal Migurski
     * @version     CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $
     * @license     http://www.opensource.org/licenses/bsd-license.php
     * @link        http://pear.php.net/pepr/pepr-proposal-show.php?id=198
     */

    /**
     * Marker constant for Services_JSON::decode(), used to flag stack state
     */
    define('SERVICES_JSON_SLICE',   1);

    /**
     * Marker constant for Services_JSON::decode(), used to flag stack state
     */
    define('SERVICES_JSON_IN_STR',  2);

    /**
     * Marker constant for Services_JSON::decode(), used to flag stack state
     */
    define('SERVICES_JSON_IN_ARR',  3);

    /**
     * Marker constant for Services_JSON::decode(), used to flag stack state
     */
    define('SERVICES_JSON_IN_OBJ',  4);

    /**
     * Marker constant for Services_JSON::decode(), used to flag stack state
     */
    define('SERVICES_JSON_IN_CMT'5);

    /**
     * Behavior switch for Services_JSON::decode()
     */
    define('SERVICES_JSON_LOOSE_TYPE'16);

    /**
     * Behavior switch for Services_JSON::decode()
     */
    define('SERVICES_JSON_SUPPRESS_ERRORS'32);

    /**
     * Converts to and from JSON format.
     *
     * Brief example of use:
     *
     * <code>
     * // create a new instance of Services_JSON
     * $json = new Services_JSON();
     *
     * // convert a complexe value to JSON notation, and send it to the browser
     * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
     * $output = $json->encode($value);
     *
     * print($output);
     * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
     *
     * // accept incoming POST data, assumed to be in JSON notation
     * $input = file_get_contents('php://input', 1000000);
     * $value = $json->decode($input);
     * </code>
     */
    class Services_JSON
    {
       
    /**
        * constructs a new JSON instance
        *
        * @param    int     $use    object behavior flags; combine with boolean-OR
        *
        *                           possible values:
        *                           - SERVICES_JSON_LOOSE_TYPE:  loose typing.
        *                                   "{...}" syntax creates associative arrays
        *                                   instead of objects in decode().
        *                           - SERVICES_JSON_SUPPRESS_ERRORS:  error suppression.
        *                                   Values which can't be encoded (e.g. resources)
        *                                   appear as NULL instead of throwing errors.
        *                                   By default, a deeply-nested resource will
        *                                   bubble up with an error, so all return values
        *                                   from encode() should be checked with isError()
        */
        
    function Services_JSON($use 0)
        {
            
    $this->use $use;
        }

       
    /**
        * convert a string from one UTF-16 char to one UTF-8 char
        *
        * Normally should be handled by mb_convert_encoding, but
        * provides a slower PHP-only method for installations
        * that lack the multibye string extension.
        *
        * @param    string  $utf16  UTF-16 character
        * @return   string  UTF-8 character
        * @access   private
        */
        
    function utf162utf8($utf16)
        {
            
    // oh please oh please oh please oh please oh please
            
    if(function_exists('mb_convert_encoding')) {
                return 
    mb_convert_encoding($utf16'UTF-8''UTF-16');
            }

            
    $bytes = (ord($utf16{0}) << 8) | ord($utf16{1});

            switch(
    true) {
                case ((
    0x7F $bytes) == $bytes):
                    
    // this case should never be reached, because we are in ASCII range
                    // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                    
    return chr(0x7F $bytes);

                case (
    0x07FF $bytes) == $bytes:
                    
    // return a 2-byte UTF-8 character
                    // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                    
    return chr(0xC0 | (($bytes >> 6) & 0x1F))
                         . 
    chr(0x80 | ($bytes 0x3F));

                case (
    0xFFFF $bytes) == $bytes:
                    
    // return a 3-byte UTF-8 character
                    // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                    
    return chr(0xE0 | (($bytes >> 12) & 0x0F))
                         . 
    chr(0x80 | (($bytes >> 6) & 0x3F))
                         . 
    chr(0x80 | ($bytes 0x3F));
            }

            
    // ignoring UTF-32 for now, sorry
            
    return '';
        }

       
    /**
        * convert a string from one UTF-8 char to one UTF-16 char
        *
        * Normally should be handled by mb_convert_encoding, but
        * provides a slower PHP-only method for installations
        * that lack the multibye string extension.
        *
        * @param    string  $utf8   UTF-8 character
        * @return   string  UTF-16 character
        * @access   private
        */
        
    function utf82utf16($utf8)
        {
            
    // oh please oh please oh please oh please oh please
            
    if(function_exists('mb_convert_encoding')) {
                return 
    mb_convert_encoding($utf8'UTF-16''UTF-8');
            }

            switch(
    strlen($utf8)) {
                case 
    1:
                    
    // this case should never be reached, because we are in ASCII range
                    // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                    
    return $utf8;

                case 
    2:
                    
    // return a UTF-16 character from a 2-byte UTF-8 char
                    // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                    
    return chr(0x07 & (ord($utf8{0}) >> 2))
                         . 
    chr((0xC0 & (ord($utf8{0}) << 6))
                             | (
    0x3F ord($utf8{1})));

                case 
    3:
                    
    // return a UTF-16 character from a 3-byte UTF-8 char
                    // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                    
    return chr((0xF0 & (ord($utf8{0}) << 4))
                             | (
    0x0F & (ord($utf8{1}) >> 2)))
                         . 
    chr((0xC0 & (ord($utf8{1}) << 6))
                             | (
    0x7F ord($utf8{2})));
            }

            
    // ignoring UTF-32 for now, sorry
            
    return '';
        }

       
    /**
        * encodes an arbitrary variable into JSON format
        *
        * @param    mixed   $var    any number, boolean, string, array, or object to be encoded.
        *                           see argument 1 to Services_JSON() above for array-parsing behavior.
        *                           if var is a strng, note that encode() always expects it
        *                           to be in ASCII or UTF-8 format!
        *
        * @return   mixed   JSON string representation of input var or an error if a problem occurs
        * @access   public
        */
        
    function encode($var)
        {
            switch (
    gettype($var)) {
                case 
    'boolean':
                    return 
    $var 'true' 'false';

                case 
    'NULL':
                    return 
    'null';

                case 
    'integer':
                    return (int) 
    $var;

                case 
    'double':
                case 
    'float':
                    return (float) 
    $var;

                case 
    'string':
                    
    // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
                    
    $ascii '';
                    
    $strlen_var strlen($var);

                   
    /*
                    * Iterate over every character in the string,
                    * escaping with a slash or encoding to UTF-8 where necessary
                    */
                    
    for ($c 0$c $strlen_var; ++$c) {

                        
    $ord_var_c ord($var{$c});

                        switch (
    true) {
                            case 
    $ord_var_c == 0x08:
                                
    $ascii .= '\b';
                                break;
                            case 
    $ord_var_c == 0x09:
                                
    $ascii .= '\t';
                                break;
                            case 
    $ord_var_c == 0x0A:
                                
    $ascii .= '\n';
                                break;
                            case 
    $ord_var_c == 0x0C:
                                
    $ascii .= '\f';
                                break;
                            case 
    $ord_var_c == 0x0D:
                                
    $ascii .= '\r';
                                break;

                            case 
    $ord_var_c == 0x22:
                            case 
    $ord_var_c == 0x2F:
                            case 
    $ord_var_c == 0x5C:
                                
    // double quote, slash, slosh
                                
    $ascii .= '\\'.$var{$c};
                                break;

                            case ((
    $ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
                                
    // characters U-00000000 - U-0000007F (same as ASCII)
                                
    $ascii .= $var{$c};
                                break;

                            case ((
    $ord_var_c 0xE0) == 0xC0):
                                
    // characters U-00000080 - U-000007FF, mask 110XXXXX
                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                
    $char pack('C*'$ord_var_cord($var{$c 1}));
                                
    $c += 1;
                                
    $utf16 $this->utf82utf16($char);
                                
    $ascii .= sprintf('\u%04s'bin2hex($utf16));
                                break;

                            case ((
    $ord_var_c 0xF0) == 0xE0):
                                
    // characters U-00000800 - U-0000FFFF, mask 1110XXXX
                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                
    $char pack('C*'$ord_var_c,
                                             
    ord($var{$c 1}),
                                             
    ord($var{$c 2}));
                                
    $c += 2;
                                
    $utf16 $this->utf82utf16($char);
                                
    $ascii .= sprintf('\u%04s'bin2hex($utf16));
                                break;

                            case ((
    $ord_var_c 0xF8) == 0xF0):
                                
    // characters U-00010000 - U-001FFFFF, mask 11110XXX
                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                
    $char pack('C*'$ord_var_c,
                                             
    ord($var{$c 1}),
                                             
    ord($var{$c 2}),
                                             
    ord($var{$c 3}));
                                
    $c += 3;
                                
    $utf16 $this->utf82utf16($char);
                                
    $ascii .= sprintf('\u%04s'bin2hex($utf16));
                                break;

                            case ((
    $ord_var_c 0xFC) == 0xF8):
                                
    // characters U-00200000 - U-03FFFFFF, mask 111110XX
                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                
    $char pack('C*'$ord_var_c,
                                             
    ord($var{$c 1}),
                                             
    ord($var{$c 2}),
                                             
    ord($var{$c 3}),
                                             
    ord($var{$c 4}));
                                
    $c += 4;
                                
    $utf16 $this->utf82utf16($char);
                                
    $ascii .= sprintf('\u%04s'bin2hex($utf16));
                                break;

                            case ((
    $ord_var_c 0xFE) == 0xFC):
                                
    // characters U-04000000 - U-7FFFFFFF, mask 1111110X
                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                
    $char pack('C*'$ord_var_c,
                                             
    ord($var{$c 1}),
                                             
    ord($var{$c 2}),
                                             
    ord($var{$c 3}),
                                             
    ord($var{$c 4}),
                                             
    ord($var{$c 5}));
                                
    $c += 5;
                                
    $utf16 $this->utf82utf16($char);
                                
    $ascii .= sprintf('\u%04s'bin2hex($utf16));
                                break;
                        }
                    }

                    return 
    '"'.$ascii.'"';

                case 
    'array':
                   
    /*
                    * As per JSON spec if any array key is not an integer
                    * we must treat the the whole array as an object. We
                    * also try to catch a sparsely populated associative
                    * array with numeric keys here because some JS engines
                    * will create an array with empty indexes up to
                    * max_index which can cause memory issues and because
                    * the keys, which may be relevant, will be remapped
                    * otherwise.
                    *
                    * As per the ECMA and JSON specification an object may
                    * have any string as a property. Unfortunately due to
                    * a hole in the ECMA specification if the key is a
                    * ECMA reserved word or starts with a digit the
                    * parameter is only accessible using ECMAScript's
                    * bracket notation.
                    */

                    // treat as a JSON object
                    
    if (is_array($var) && count($var) && (array_keys($var) !== range(0sizeof($var) - 1))) {
                        
    $properties array_map(array($this'name_value'),
                                                
    array_keys($var),
                                                
    array_values($var));

                        foreach(
    $properties as $property) {
                            if(
    Services_JSON::isError($property)) {
                                return 
    $property;
                            }
                        }

                        return 
    '{' join(','$properties) . '}';
                    }

                    
    // treat it like a regular array
                    
    $elements array_map(array($this'encode'), $var);

                    foreach(
    $elements as $element) {
                        if(
    Services_JSON::isError($element)) {
                            return 
    $element;
                        }
                    }

                    return 
    '[' join(','$elements) . ']';

                case 
    'object':
                    
    $vars get_object_vars($var);

                    
    $properties array_map(array($this'name_value'),
                                            
    array_keys($vars),
                                            
    array_values($vars));

                    foreach(
    $properties as $property) {
                        if(
    Services_JSON::isError($property)) {
                            return 
    $property;
                        }
                    }

                    return 
    '{' join(','$properties) . '}';

                default:
                    return (
    $this->use SERVICES_JSON_SUPPRESS_ERRORS)
                        ? 
    'null'
                        
    : new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
            }
        }

       
    /**
        * array-walking function for use in generating JSON-formatted name-value pairs
        *
        * @param    string  $name   name of key to use
        * @param    mixed   $value  reference to an array element to be encoded
        *
        * @return   string  JSON-formatted name-value pair, like '"name":value'
        * @access   private
        */
        
    function name_value($name$value)
        {
            
    $encoded_value $this->encode($value);

            if(
    Services_JSON::isError($encoded_value)) {
                return 
    $encoded_value;
            }

            return 
    $this->encode(strval($name)) . ':' $encoded_value;
        }

       
    /**
        * reduce a string by removing leading and trailing comments and whitespace
        *
        * @param    $str    string      string value to strip of comments and whitespace
        *
        * @return   string  string value stripped of comments and whitespace
        * @access   private
        */
        
    function reduce_string($str)
        {
            
    $str preg_replace(array(

                    
    // eliminate single line comments in '// ...' form
                    
    '#^\s*//(.+)$#m',

                    
    // eliminate multi-line comments in '/* ... */' form, at start of string
                    
    '#^\s*/\*(.+)\*/#Us',

                    
    // eliminate multi-line comments in '/* ... */' form, at end of string
                    
    '#/\*(.+)\*/\s*$#Us'

                
    ), ''$str);

            
    // eliminate extraneous space
            
    return trim($str);
        }

       
    /**
        * decodes a JSON string into appropriate variable
        *
        * @param    string  $str    JSON-formatted string
        *
        * @return   mixed   number, boolean, string, array, or object
        *                   corresponding to given JSON input string.
        *                   See argument 1 to Services_JSON() above for object-output behavior.
        *                   Note that decode() always returns strings
        *                   in ASCII or UTF-8 format!
        * @access   public
        */
        
    function decode($str)
        {
            
    $str $this->reduce_string($str);

            switch (
    strtolower($str)) {
                case 
    'true':
                    return 
    true;

                case 
    'false':
                    return 
    false;

                case 
    'null':
                    return 
    null;

                default:
                    
    $m = array();

                    if (
    is_numeric($str)) {
                        
    // Lookie-loo, it's a number

                        // This would work on its own, but I'm trying to be
                        // good about returning integers where appropriate:
                        // return (float)$str;

                        // Return float or int, as appropriate
                        
    return ((float)$str == (integer)$str)
                            ? (integer)
    $str
                            
    : (float)$str;

                    } elseif (
    preg_match('/^("|\').*(\1)$/s'$str$m) && $m[1] == $m[2]) {
                        
    // STRINGS RETURNED IN UTF-8 FORMAT
                        
    $delim substr($str01);
                        
    $chrs substr($str1, -1);
                        
    $utf8 '';
                        
    $strlen_chrs strlen($chrs);

                        for (
    $c 0$c $strlen_chrs; ++$c) {

                            
    $substr_chrs_c_2 substr($chrs$c2);
                            
    $ord_chrs_c ord($chrs{$c});

                            switch (
    true) {
                                case 
    $substr_chrs_c_2 == '\b':
                                    
    $utf8 .= chr(0x08);
                                    ++
    $c;
                                    break;
                                case 
    $substr_chrs_c_2 == '\t':
                                    
    $utf8 .= chr(0x09);
                                    ++
    $c;
                                    break;
                                case 
    $substr_chrs_c_2 == '\n':
                                    
    $utf8 .= chr(0x0A);
                                    ++
    $c;
                                    break;
                                case 
    $substr_chrs_c_2 == '\f':
                                    
    $utf8 .= chr(0x0C);
                                    ++
    $c;
                                    break;
                                case 
    $substr_chrs_c_2 == '\r':
                                    
    $utf8 .= chr(0x0D);
                                    ++
    $c;
                                    break;

                                case 
    $substr_chrs_c_2 == '\\"':
                                case 
    $substr_chrs_c_2 == '\\\'':
                                case 
    $substr_chrs_c_2 == '\\\\':
                                case 
    $substr_chrs_c_2 == '\\/':
                                    if ((
    $delim == '"' && $substr_chrs_c_2 != '\\\'') ||
                                       (
    $delim == "'" && $substr_chrs_c_2 != '\\"')) {
                                        
    $utf8 .= $chrs{++$c};
                                    }
                                    break;

                                case 
    preg_match('/\\\u[0-9A-F]{4}/i'substr($chrs$c6)):
                                    
    // single, escaped unicode character
                                    
    $utf16 chr(hexdec(substr($chrs, ($c 2), 2)))
                                           . 
    chr(hexdec(substr($chrs, ($c 4), 2)));
                                    
    $utf8 .= $this->utf162utf8($utf16);
                                    
    $c += 5;
                                    break;

                                case (
    $ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
                                    
    $utf8 .= $chrs{$c};
                                    break;

                                case (
    $ord_chrs_c 0xE0) == 0xC0:
                                    
    // characters U-00000080 - U-000007FF, mask 110XXXXX
                                    //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                    
    $utf8 .= substr($chrs$c2);
                                    ++
    $c;
                                    break;

                                case (
    $ord_chrs_c 0xF0) == 0xE0:
                                    
    // characters U-00000800 - U-0000FFFF, mask 1110XXXX
                                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                    
    $utf8 .= substr($chrs$c3);
                                    
    $c += 2;
                                    break;

                                case (
    $ord_chrs_c 0xF8) == 0xF0:
                                    
    // characters U-00010000 - U-001FFFFF, mask 11110XXX
                                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                    
    $utf8 .= substr($chrs$c4);
                                    
    $c += 3;
                                    break;

                                case (
    $ord_chrs_c 0xFC) == 0xF8:
                                    
    // characters U-00200000 - U-03FFFFFF, mask 111110XX
                                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                    
    $utf8 .= substr($chrs$c5);
                                    
    $c += 4;
                                    break;

                                case (
    $ord_chrs_c 0xFE) == 0xFC:
                                    
    // characters U-04000000 - U-7FFFFFFF, mask 1111110X
                                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                    
    $utf8 .= substr($chrs$c6);
                                    
    $c += 5;
                                    break;

                            }

                        }

                        return 
    $utf8;

                    } elseif (
    preg_match('/^\[.*\]$/s'$str) || preg_match('/^\{.*\}$/s'$str)) {
                        
    // array, or object notation

                        
    if ($str{0} == '[') {
                            
    $stk = array(SERVICES_JSON_IN_ARR);
                            
    $arr = array();
                        } else {
                            if (
    $this->use SERVICES_JSON_LOOSE_TYPE) {
                                
    $stk = array(SERVICES_JSON_IN_OBJ);
                                
    $obj = array();
                            } else {
                                
    $stk = array(SERVICES_JSON_IN_OBJ);
                                
    $obj = new stdClass();
                            }
                        }

                        
    array_push($stk, array('what'  => SERVICES_JSON_SLICE,
                                               
    'where' => 0,
                                               
    'delim' => false));

                        
    $chrs substr($str1, -1);
                        
    $chrs $this->reduce_string($chrs);

                        if (
    $chrs == '') {
                            if (
    reset($stk) == SERVICES_JSON_IN_ARR) {
                                return 
    $arr;

                            } else {
                                return 
    $obj;

                            }
                        }

                        
    //print("\nparsing {$chrs}\n");

                        
    $strlen_chrs strlen($chrs);

                        for (
    $c 0$c <= $strlen_chrs; ++$c) {

                            
    $top end($stk);
                            
    $substr_chrs_c_2 substr($chrs$c2);

                            if ((
    $c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
                                
    // found a comma that is not inside a string, array, etc.,
                                // OR we've reached the end of the character list
                                
    $slice substr($chrs$top['where'], ($c $top['where']));
                                
    array_push($stk, array('what' => SERVICES_JSON_SLICE'where' => ($c 1), 'delim' => false));
                                
    //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");

                                
    if (reset($stk) == SERVICES_JSON_IN_ARR) {
                                    
    // we are in an array, so just push an element onto the stack
                                    
    array_push($arr$this->decode($slice));

                                } elseif (
    reset($stk) == SERVICES_JSON_IN_OBJ) {
                                    
    // we are in an object, so figure
                                    // out the property name and set an
                                    // element in an associative array,
                                    // for now
                                    
    $parts = array();
                                    
                                    if (
    preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis'$slice$parts)) {
                                        
    // "name":value pair
                                        
    $key $this->decode($parts[1]);
                                        
    $val $this->decode($parts[2]);

                                        if (
    $this->use SERVICES_JSON_LOOSE_TYPE) {
                                            
    $obj[$key] = $val;
                                        } else {
                                            
    $obj->$key $val;
                                        }
                                    } elseif (
    preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis'$slice$parts)) {
                                        
    // name:value pair, where name is unquoted
                                        
    $key $parts[1];
                                        
    $val $this->decode($parts[2]);

                                        if (
    $this->use SERVICES_JSON_LOOSE_TYPE) {
                                            
    $obj[$key] = $val;
                                        } else {
                                            
    $obj->$key $val;
                                        }
                                    }

                                }

                            } elseif (((
    $chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
                                
    // found a quote, and we are not inside a string
                                
    array_push($stk, array('what' => SERVICES_JSON_IN_STR'where' => $c'delim' => $chrs{$c}));
                                
    //print("Found start of string at {$c}\n");

                            
    } elseif (($chrs{$c} == $top['delim']) &&
                                     (
    $top['what'] == SERVICES_JSON_IN_STR) &&
                                     ((
    strlen(substr($chrs0$c)) - strlen(rtrim(substr($chrs0$c), '\\'))) % != 1)) {
                                
    // found a quote, we're in a string, and it's not escaped
                                // we know that it's not escaped becase there is _not_ an
                                // odd number of backslashes at the end of the string so far
                                
    array_pop($stk);
                                
    //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");

                            
    } elseif (($chrs{$c} == '[') &&
                                     
    in_array($top['what'], array(SERVICES_JSON_SLICESERVICES_JSON_IN_ARRSERVICES_JSON_IN_OBJ))) {
                                
    // found a left-bracket, and we are in an array, object, or slice
                                
    array_push($stk, array('what' => SERVICES_JSON_IN_ARR'where' => $c'delim' => false));
                                
    //print("Found start of array at {$c}\n");

                            
    } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
                                
    // found a right-bracket, and we're in an array
                                
    array_pop($stk);
                                
    //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");

                            
    } elseif (($chrs{$c} == '{') &&
                                     
    in_array($top['what'], array(SERVICES_JSON_SLICESERVICES_JSON_IN_ARRSERVICES_JSON_IN_OBJ))) {
                                
    // found a left-brace, and we are in an array, object, or slice
                                
    array_push($stk, array('what' => SERVICES_JSON_IN_OBJ'where' => $c'delim' => false));
                                
    //print("Found start of object at {$c}\n");

                            
    } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
                                
    // found a right-brace, and we're in an object
                                
    array_pop($stk);
                                
    //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");

                            
    } elseif (($substr_chrs_c_2 == '/*') &&
                                     
    in_array($top['what'], array(SERVICES_JSON_SLICESERVICES_JSON_IN_ARRSERVICES_JSON_IN_OBJ))) {
                                
    // found a comment start, and we are in an array, object, or slice
                                
    array_push($stk, array('what' => SERVICES_JSON_IN_CMT'where' => $c'delim' => false));
                                
    $c++;
                                
    //print("Found start of comment at {$c}\n");

                            
    } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {
                                
    // found a comment end, and we're in one now
                                
    array_pop($stk);
                                
    $c++;

                                for (
    $i $top['where']; $i <= $c; ++$i)
                                    
    $chrs substr_replace($chrs' '$i1);

                                
    //print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");

                            
    }

                        }

                        if (
    reset($stk) == SERVICES_JSON_IN_ARR) {
                            return 
    $arr;

                        } elseif (
    reset($stk) == SERVICES_JSON_IN_OBJ) {
                            return 
    $obj;

                        }

                    }
            }
        }

        
    /**
         * @todo Ultimately, this should just call PEAR::isError()
         */
        
    function isError($data$code null)
        {
            if (
    class_exists('pear')) {
                return 
    PEAR::isError($data$code);
            } elseif (
    is_object($data) && (get_class($data) == 'services_json_error' ||
                                     
    is_subclass_of($data'services_json_error'))) {
                return 
    true;
            }

            return 
    false;
        }
    }

    if (
    class_exists('PEAR_Error')) {

        class 
    Services_JSON_Error extends PEAR_Error
        
    {
            function 
    Services_JSON_Error($message 'unknown error'$code null,
                                         
    $mode null$options null$userinfo null)
            {
                
    parent::PEAR_Error($message$code$mode$options$userinfo);
            }
        }

    } else {

        
    /**
         * @todo Ultimately, this class shall be descended from PEAR_Error
         */
        
    class Services_JSON_Error
        
    {
            function 
    Services_JSON_Error($message 'unknown error'$code null,
                                         
    $mode null$options null$userinfo null)
            {

            }
        }

    }
        
    ?>
    -
    -
    \ No newline at end of file diff --git a/tests/textcode/data/markup/JSON.phps.html b/tests/textcode/data/markup/JSON.phps.html deleted file mode 100644 index c1c74915945..00000000000 --- a/tests/textcode/data/markup/JSON.phps.html +++ /dev/null @@ -1,4 +0,0 @@ - -<?php
    /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

    /**
     * Converts to and from JSON format.
     *
     * JSON (JavaScript Object Notation) is a lightweight data-interchange
     * format. It is easy for humans to read and write. It is easy for machines
     * to parse and generate. It is based on a subset of the JavaScript
     * Programming Language, Standard ECMA-262 3rd Edition - December 1999.
     * This feature can also be found in  Python. JSON is a text format that is
     * completely language independent but uses conventions that are familiar
     * to programmers of the C-family of languages, including C, C++, C#, Java,
     * JavaScript, Perl, TCL, and many others. These properties make JSON an
     * ideal data-interchange language.
     *
     * This package provides a simple encoder and decoder for JSON notation. It
     * is intended for use with client-side Javascript applications that make
     * use of HTTPRequest to perform server communication functions - data can
     * be encoded into JSON notation for use in a client-side javascript, or
     * decoded from incoming Javascript requests. JSON format is native to
     * Javascript, and can be directly eval()'ed with no further parsing
     * overhead
     *
     * All strings should be in ASCII or UTF-8 format!
     *
     * LICENSE: Redistribution and use in source and binary forms, with or
     * without modification, are permitted provided that the following
     * conditions are met: Redistributions of source code must retain the
     * above copyright notice, this list of conditions and the following
     * disclaimer. Redistributions in binary form must reproduce the above
     * copyright notice, this list of conditions and the following disclaimer
     * in the documentation and/or other materials provided with the
     * distribution.
     *
     * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
     * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
     * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
     * NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
     * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
     * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
     * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
     * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
     * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
     * DAMAGE.
     *
     * @category
     * @package     Services_JSON
     * @author      Michal Migurski <mike-json@teczno.com>
     * @author      Matt Knapp <mdknapp[at]gmail[dot]com>
     * @author      Brett Stimmerman <brettstimmerman[at]gmail[dot]com>
     * @copyright   2005 Michal Migurski
     * @version     CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $
     * @license     http://www.opensource.org/licenses/bsd-license.php
     * @link        http://pear.php.net/pepr/pepr-proposal-show.php?id=198
     */

    /**
     * Marker constant for Services_JSON::decode(), used to flag stack state
     */
    define('SERVICES_JSON_SLICE',   1);

    /**
     * Marker constant for Services_JSON::decode(), used to flag stack state
     */
    define('SERVICES_JSON_IN_STR',  2);

    /**
     * Marker constant for Services_JSON::decode(), used to flag stack state
     */
    define('SERVICES_JSON_IN_ARR',  3);

    /**
     * Marker constant for Services_JSON::decode(), used to flag stack state
     */
    define('SERVICES_JSON_IN_OBJ',  4);

    /**
     * Marker constant for Services_JSON::decode(), used to flag stack state
     */
    define('SERVICES_JSON_IN_CMT'5);

    /**
     * Behavior switch for Services_JSON::decode()
     */
    define('SERVICES_JSON_LOOSE_TYPE'16);

    /**
     * Behavior switch for Services_JSON::decode()
     */
    define('SERVICES_JSON_SUPPRESS_ERRORS'32);

    /**
     * Converts to and from JSON format.
     *
     * Brief example of use:
     *
     * <code>
     * // create a new instance of Services_JSON
     * $json = new Services_JSON();
     *
     * // convert a complexe value to JSON notation, and send it to the browser
     * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4)));
     * $output = $json->encode($value);
     *
     * print($output);
     * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]]
     *
     * // accept incoming POST data, assumed to be in JSON notation
     * $input = file_get_contents('php://input', 1000000);
     * $value = $json->decode($input);
     * </code>
     */
    class Services_JSON
    {
       
    /**
        * constructs a new JSON instance
        *
        * @param    int     $use    object behavior flags; combine with boolean-OR
        *
        *                           possible values:
        *                           - SERVICES_JSON_LOOSE_TYPE:  loose typing.
        *                                   "{...}" syntax creates associative arrays
        *                                   instead of objects in decode().
        *                           - SERVICES_JSON_SUPPRESS_ERRORS:  error suppression.
        *                                   Values which can't be encoded (e.g. resources)
        *                                   appear as NULL instead of throwing errors.
        *                                   By default, a deeply-nested resource will
        *                                   bubble up with an error, so all return values
        *                                   from encode() should be checked with isError()
        */
        
    function Services_JSON($use 0)
        {
            
    $this->use $use;
        }

       
    /**
        * convert a string from one UTF-16 char to one UTF-8 char
        *
        * Normally should be handled by mb_convert_encoding, but
        * provides a slower PHP-only method for installations
        * that lack the multibye string extension.
        *
        * @param    string  $utf16  UTF-16 character
        * @return   string  UTF-8 character
        * @access   private
        */
        
    function utf162utf8($utf16)
        {
            
    // oh please oh please oh please oh please oh please
            
    if(function_exists('mb_convert_encoding')) {
                return 
    mb_convert_encoding($utf16'UTF-8''UTF-16');
            }

            
    $bytes = (ord($utf16{0}) << 8) | ord($utf16{1});

            switch(
    true) {
                case ((
    0x7F $bytes) == $bytes):
                    
    // this case should never be reached, because we are in ASCII range
                    // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                    
    return chr(0x7F $bytes);

                case (
    0x07FF $bytes) == $bytes:
                    
    // return a 2-byte UTF-8 character
                    // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                    
    return chr(0xC0 | (($bytes >> 6) & 0x1F))
                         . 
    chr(0x80 | ($bytes 0x3F));

                case (
    0xFFFF $bytes) == $bytes:
                    
    // return a 3-byte UTF-8 character
                    // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                    
    return chr(0xE0 | (($bytes >> 12) & 0x0F))
                         . 
    chr(0x80 | (($bytes >> 6) & 0x3F))
                         . 
    chr(0x80 | ($bytes 0x3F));
            }

            
    // ignoring UTF-32 for now, sorry
            
    return '';
        }

       
    /**
        * convert a string from one UTF-8 char to one UTF-16 char
        *
        * Normally should be handled by mb_convert_encoding, but
        * provides a slower PHP-only method for installations
        * that lack the multibye string extension.
        *
        * @param    string  $utf8   UTF-8 character
        * @return   string  UTF-16 character
        * @access   private
        */
        
    function utf82utf16($utf8)
        {
            
    // oh please oh please oh please oh please oh please
            
    if(function_exists('mb_convert_encoding')) {
                return 
    mb_convert_encoding($utf8'UTF-16''UTF-8');
            }

            switch(
    strlen($utf8)) {
                case 
    1:
                    
    // this case should never be reached, because we are in ASCII range
                    // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                    
    return $utf8;

                case 
    2:
                    
    // return a UTF-16 character from a 2-byte UTF-8 char
                    // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                    
    return chr(0x07 & (ord($utf8{0}) >> 2))
                         . 
    chr((0xC0 & (ord($utf8{0}) << 6))
                             | (
    0x3F ord($utf8{1})));

                case 
    3:
                    
    // return a UTF-16 character from a 3-byte UTF-8 char
                    // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                    
    return chr((0xF0 & (ord($utf8{0}) << 4))
                             | (
    0x0F & (ord($utf8{1}) >> 2)))
                         . 
    chr((0xC0 & (ord($utf8{1}) << 6))
                             | (
    0x7F ord($utf8{2})));
            }

            
    // ignoring UTF-32 for now, sorry
            
    return '';
        }

       
    /**
        * encodes an arbitrary variable into JSON format
        *
        * @param    mixed   $var    any number, boolean, string, array, or object to be encoded.
        *                           see argument 1 to Services_JSON() above for array-parsing behavior.
        *                           if var is a strng, note that encode() always expects it
        *                           to be in ASCII or UTF-8 format!
        *
        * @return   mixed   JSON string representation of input var or an error if a problem occurs
        * @access   public
        */
        
    function encode($var)
        {
            switch (
    gettype($var)) {
                case 
    'boolean':
                    return 
    $var 'true' 'false';

                case 
    'NULL':
                    return 
    'null';

                case 
    'integer':
                    return (int) 
    $var;

                case 
    'double':
                case 
    'float':
                    return (float) 
    $var;

                case 
    'string':
                    
    // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT
                    
    $ascii '';
                    
    $strlen_var strlen($var);

                   
    /*
                    * Iterate over every character in the string,
                    * escaping with a slash or encoding to UTF-8 where necessary
                    */
                    
    for ($c 0$c $strlen_var; ++$c) {

                        
    $ord_var_c ord($var{$c});

                        switch (
    true) {
                            case 
    $ord_var_c == 0x08:
                                
    $ascii .= '\b';
                                break;
                            case 
    $ord_var_c == 0x09:
                                
    $ascii .= '\t';
                                break;
                            case 
    $ord_var_c == 0x0A:
                                
    $ascii .= '\n';
                                break;
                            case 
    $ord_var_c == 0x0C:
                                
    $ascii .= '\f';
                                break;
                            case 
    $ord_var_c == 0x0D:
                                
    $ascii .= '\r';
                                break;

                            case 
    $ord_var_c == 0x22:
                            case 
    $ord_var_c == 0x2F:
                            case 
    $ord_var_c == 0x5C:
                                
    // double quote, slash, slosh
                                
    $ascii .= '\\'.$var{$c};
                                break;

                            case ((
    $ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):
                                
    // characters U-00000000 - U-0000007F (same as ASCII)
                                
    $ascii .= $var{$c};
                                break;

                            case ((
    $ord_var_c 0xE0) == 0xC0):
                                
    // characters U-00000080 - U-000007FF, mask 110XXXXX
                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                
    $char pack('C*'$ord_var_cord($var{$c 1}));
                                
    $c += 1;
                                
    $utf16 $this->utf82utf16($char);
                                
    $ascii .= sprintf('\u%04s'bin2hex($utf16));
                                break;

                            case ((
    $ord_var_c 0xF0) == 0xE0):
                                
    // characters U-00000800 - U-0000FFFF, mask 1110XXXX
                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                
    $char pack('C*'$ord_var_c,
                                             
    ord($var{$c 1}),
                                             
    ord($var{$c 2}));
                                
    $c += 2;
                                
    $utf16 $this->utf82utf16($char);
                                
    $ascii .= sprintf('\u%04s'bin2hex($utf16));
                                break;

                            case ((
    $ord_var_c 0xF8) == 0xF0):
                                
    // characters U-00010000 - U-001FFFFF, mask 11110XXX
                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                
    $char pack('C*'$ord_var_c,
                                             
    ord($var{$c 1}),
                                             
    ord($var{$c 2}),
                                             
    ord($var{$c 3}));
                                
    $c += 3;
                                
    $utf16 $this->utf82utf16($char);
                                
    $ascii .= sprintf('\u%04s'bin2hex($utf16));
                                break;

                            case ((
    $ord_var_c 0xFC) == 0xF8):
                                
    // characters U-00200000 - U-03FFFFFF, mask 111110XX
                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                
    $char pack('C*'$ord_var_c,
                                             
    ord($var{$c 1}),
                                             
    ord($var{$c 2}),
                                             
    ord($var{$c 3}),
                                             
    ord($var{$c 4}));
                                
    $c += 4;
                                
    $utf16 $this->utf82utf16($char);
                                
    $ascii .= sprintf('\u%04s'bin2hex($utf16));
                                break;

                            case ((
    $ord_var_c 0xFE) == 0xFC):
                                
    // characters U-04000000 - U-7FFFFFFF, mask 1111110X
                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                
    $char pack('C*'$ord_var_c,
                                             
    ord($var{$c 1}),
                                             
    ord($var{$c 2}),
                                             
    ord($var{$c 3}),
                                             
    ord($var{$c 4}),
                                             
    ord($var{$c 5}));
                                
    $c += 5;
                                
    $utf16 $this->utf82utf16($char);
                                
    $ascii .= sprintf('\u%04s'bin2hex($utf16));
                                break;
                        }
                    }

                    return 
    '"'.$ascii.'"';

                case 
    'array':
                   
    /*
                    * As per JSON spec if any array key is not an integer
                    * we must treat the the whole array as an object. We
                    * also try to catch a sparsely populated associative
                    * array with numeric keys here because some JS engines
                    * will create an array with empty indexes up to
                    * max_index which can cause memory issues and because
                    * the keys, which may be relevant, will be remapped
                    * otherwise.
                    *
                    * As per the ECMA and JSON specification an object may
                    * have any string as a property. Unfortunately due to
                    * a hole in the ECMA specification if the key is a
                    * ECMA reserved word or starts with a digit the
                    * parameter is only accessible using ECMAScript's
                    * bracket notation.
                    */

                    // treat as a JSON object
                    
    if (is_array($var) && count($var) && (array_keys($var) !== range(0sizeof($var) - 1))) {
                        
    $properties array_map(array($this'name_value'),
                                                
    array_keys($var),
                                                
    array_values($var));

                        foreach(
    $properties as $property) {
                            if(
    Services_JSON::isError($property)) {
                                return 
    $property;
                            }
                        }

                        return 
    '{' join(','$properties) . '}';
                    }

                    
    // treat it like a regular array
                    
    $elements array_map(array($this'encode'), $var);

                    foreach(
    $elements as $element) {
                        if(
    Services_JSON::isError($element)) {
                            return 
    $element;
                        }
                    }

                    return 
    '[' join(','$elements) . ']';

                case 
    'object':
                    
    $vars get_object_vars($var);

                    
    $properties array_map(array($this'name_value'),
                                            
    array_keys($vars),
                                            
    array_values($vars));

                    foreach(
    $properties as $property) {
                        if(
    Services_JSON::isError($property)) {
                            return 
    $property;
                        }
                    }

                    return 
    '{' join(','$properties) . '}';

                default:
                    return (
    $this->use SERVICES_JSON_SUPPRESS_ERRORS)
                        ? 
    'null'
                        
    : new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");
            }
        }

       
    /**
        * array-walking function for use in generating JSON-formatted name-value pairs
        *
        * @param    string  $name   name of key to use
        * @param    mixed   $value  reference to an array element to be encoded
        *
        * @return   string  JSON-formatted name-value pair, like '"name":value'
        * @access   private
        */
        
    function name_value($name$value)
        {
            
    $encoded_value $this->encode($value);

            if(
    Services_JSON::isError($encoded_value)) {
                return 
    $encoded_value;
            }

            return 
    $this->encode(strval($name)) . ':' $encoded_value;
        }

       
    /**
        * reduce a string by removing leading and trailing comments and whitespace
        *
        * @param    $str    string      string value to strip of comments and whitespace
        *
        * @return   string  string value stripped of comments and whitespace
        * @access   private
        */
        
    function reduce_string($str)
        {
            
    $str preg_replace(array(

                    
    // eliminate single line comments in '// ...' form
                    
    '#^\s*//(.+)$#m',

                    
    // eliminate multi-line comments in '/* ... */' form, at start of string
                    
    '#^\s*/\*(.+)\*/#Us',

                    
    // eliminate multi-line comments in '/* ... */' form, at end of string
                    
    '#/\*(.+)\*/\s*$#Us'

                
    ), ''$str);

            
    // eliminate extraneous space
            
    return trim($str);
        }

       
    /**
        * decodes a JSON string into appropriate variable
        *
        * @param    string  $str    JSON-formatted string
        *
        * @return   mixed   number, boolean, string, array, or object
        *                   corresponding to given JSON input string.
        *                   See argument 1 to Services_JSON() above for object-output behavior.
        *                   Note that decode() always returns strings
        *                   in ASCII or UTF-8 format!
        * @access   public
        */
        
    function decode($str)
        {
            
    $str $this->reduce_string($str);

            switch (
    strtolower($str)) {
                case 
    'true':
                    return 
    true;

                case 
    'false':
                    return 
    false;

                case 
    'null':
                    return 
    null;

                default:
                    
    $m = array();

                    if (
    is_numeric($str)) {
                        
    // Lookie-loo, it's a number

                        // This would work on its own, but I'm trying to be
                        // good about returning integers where appropriate:
                        // return (float)$str;

                        // Return float or int, as appropriate
                        
    return ((float)$str == (integer)$str)
                            ? (integer)
    $str
                            
    : (float)$str;

                    } elseif (
    preg_match('/^("|\').*(\1)$/s'$str$m) && $m[1] == $m[2]) {
                        
    // STRINGS RETURNED IN UTF-8 FORMAT
                        
    $delim substr($str01);
                        
    $chrs substr($str1, -1);
                        
    $utf8 '';
                        
    $strlen_chrs strlen($chrs);

                        for (
    $c 0$c $strlen_chrs; ++$c) {

                            
    $substr_chrs_c_2 substr($chrs$c2);
                            
    $ord_chrs_c ord($chrs{$c});

                            switch (
    true) {
                                case 
    $substr_chrs_c_2 == '\b':
                                    
    $utf8 .= chr(0x08);
                                    ++
    $c;
                                    break;
                                case 
    $substr_chrs_c_2 == '\t':
                                    
    $utf8 .= chr(0x09);
                                    ++
    $c;
                                    break;
                                case 
    $substr_chrs_c_2 == '\n':
                                    
    $utf8 .= chr(0x0A);
                                    ++
    $c;
                                    break;
                                case 
    $substr_chrs_c_2 == '\f':
                                    
    $utf8 .= chr(0x0C);
                                    ++
    $c;
                                    break;
                                case 
    $substr_chrs_c_2 == '\r':
                                    
    $utf8 .= chr(0x0D);
                                    ++
    $c;
                                    break;

                                case 
    $substr_chrs_c_2 == '\\"':
                                case 
    $substr_chrs_c_2 == '\\\'':
                                case 
    $substr_chrs_c_2 == '\\\\':
                                case 
    $substr_chrs_c_2 == '\\/':
                                    if ((
    $delim == '"' && $substr_chrs_c_2 != '\\\'') ||
                                       (
    $delim == "'" && $substr_chrs_c_2 != '\\"')) {
                                        
    $utf8 .= $chrs{++$c};
                                    }
                                    break;

                                case 
    preg_match('/\\\u[0-9A-F]{4}/i'substr($chrs$c6)):
                                    
    // single, escaped unicode character
                                    
    $utf16 chr(hexdec(substr($chrs, ($c 2), 2)))
                                           . 
    chr(hexdec(substr($chrs, ($c 4), 2)));
                                    
    $utf8 .= $this->utf162utf8($utf16);
                                    
    $c += 5;
                                    break;

                                case (
    $ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):
                                    
    $utf8 .= $chrs{$c};
                                    break;

                                case (
    $ord_chrs_c 0xE0) == 0xC0:
                                    
    // characters U-00000080 - U-000007FF, mask 110XXXXX
                                    //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                    
    $utf8 .= substr($chrs$c2);
                                    ++
    $c;
                                    break;

                                case (
    $ord_chrs_c 0xF0) == 0xE0:
                                    
    // characters U-00000800 - U-0000FFFF, mask 1110XXXX
                                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                    
    $utf8 .= substr($chrs$c3);
                                    
    $c += 2;
                                    break;

                                case (
    $ord_chrs_c 0xF8) == 0xF0:
                                    
    // characters U-00010000 - U-001FFFFF, mask 11110XXX
                                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                    
    $utf8 .= substr($chrs$c4);
                                    
    $c += 3;
                                    break;

                                case (
    $ord_chrs_c 0xFC) == 0xF8:
                                    
    // characters U-00200000 - U-03FFFFFF, mask 111110XX
                                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                    
    $utf8 .= substr($chrs$c5);
                                    
    $c += 4;
                                    break;

                                case (
    $ord_chrs_c 0xFE) == 0xFC:
                                    
    // characters U-04000000 - U-7FFFFFFF, mask 1111110X
                                    // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
                                    
    $utf8 .= substr($chrs$c6);
                                    
    $c += 5;
                                    break;

                            }

                        }

                        return 
    $utf8;

                    } elseif (
    preg_match('/^\[.*\]$/s'$str) || preg_match('/^\{.*\}$/s'$str)) {
                        
    // array, or object notation

                        
    if ($str{0} == '[') {
                            
    $stk = array(SERVICES_JSON_IN_ARR);
                            
    $arr = array();
                        } else {
                            if (
    $this->use SERVICES_JSON_LOOSE_TYPE) {
                                
    $stk = array(SERVICES_JSON_IN_OBJ);
                                
    $obj = array();
                            } else {
                                
    $stk = array(SERVICES_JSON_IN_OBJ);
                                
    $obj = new stdClass();
                            }
                        }

                        
    array_push($stk, array('what'  => SERVICES_JSON_SLICE,
                                               
    'where' => 0,
                                               
    'delim' => false));

                        
    $chrs substr($str1, -1);
                        
    $chrs $this->reduce_string($chrs);

                        if (
    $chrs == '') {
                            if (
    reset($stk) == SERVICES_JSON_IN_ARR) {
                                return 
    $arr;

                            } else {
                                return 
    $obj;

                            }
                        }

                        
    //print("\nparsing {$chrs}\n");

                        
    $strlen_chrs strlen($chrs);

                        for (
    $c 0$c <= $strlen_chrs; ++$c) {

                            
    $top end($stk);
                            
    $substr_chrs_c_2 substr($chrs$c2);

                            if ((
    $c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {
                                
    // found a comma that is not inside a string, array, etc.,
                                // OR we've reached the end of the character list
                                
    $slice substr($chrs$top['where'], ($c $top['where']));
                                
    array_push($stk, array('what' => SERVICES_JSON_SLICE'where' => ($c 1), 'delim' => false));
                                
    //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");

                                
    if (reset($stk) == SERVICES_JSON_IN_ARR) {
                                    
    // we are in an array, so just push an element onto the stack
                                    
    array_push($arr$this->decode($slice));

                                } elseif (
    reset($stk) == SERVICES_JSON_IN_OBJ) {
                                    
    // we are in an object, so figure
                                    // out the property name and set an
                                    // element in an associative array,
                                    // for now
                                    
    $parts = array();
                                    
                                    if (
    preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis'$slice$parts)) {
                                        
    // "name":value pair
                                        
    $key $this->decode($parts[1]);
                                        
    $val $this->decode($parts[2]);

                                        if (
    $this->use SERVICES_JSON_LOOSE_TYPE) {
                                            
    $obj[$key] = $val;
                                        } else {
                                            
    $obj->$key $val;
                                        }
                                    } elseif (
    preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis'$slice$parts)) {
                                        
    // name:value pair, where name is unquoted
                                        
    $key $parts[1];
                                        
    $val $this->decode($parts[2]);

                                        if (
    $this->use SERVICES_JSON_LOOSE_TYPE) {
                                            
    $obj[$key] = $val;
                                        } else {
                                            
    $obj->$key $val;
                                        }
                                    }

                                }

                            } elseif (((
    $chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {
                                
    // found a quote, and we are not inside a string
                                
    array_push($stk, array('what' => SERVICES_JSON_IN_STR'where' => $c'delim' => $chrs{$c}));
                                
    //print("Found start of string at {$c}\n");

                            
    } elseif (($chrs{$c} == $top['delim']) &&
                                     (
    $top['what'] == SERVICES_JSON_IN_STR) &&
                                     ((
    strlen(substr($chrs0$c)) - strlen(rtrim(substr($chrs0$c), '\\'))) % != 1)) {
                                
    // found a quote, we're in a string, and it's not escaped
                                // we know that it's not escaped becase there is _not_ an
                                // odd number of backslashes at the end of the string so far
                                
    array_pop($stk);
                                
    //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");

                            
    } elseif (($chrs{$c} == '[') &&
                                     
    in_array($top['what'], array(SERVICES_JSON_SLICESERVICES_JSON_IN_ARRSERVICES_JSON_IN_OBJ))) {
                                
    // found a left-bracket, and we are in an array, object, or slice
                                
    array_push($stk, array('what' => SERVICES_JSON_IN_ARR'where' => $c'delim' => false));
                                
    //print("Found start of array at {$c}\n");

                            
    } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {
                                
    // found a right-bracket, and we're in an array
                                
    array_pop($stk);
                                
    //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");

                            
    } elseif (($chrs{$c} == '{') &&
                                     
    in_array($top['what'], array(SERVICES_JSON_SLICESERVICES_JSON_IN_ARRSERVICES_JSON_IN_OBJ))) {
                                
    // found a left-brace, and we are in an array, object, or slice
                                
    array_push($stk, array('what' => SERVICES_JSON_IN_OBJ'where' => $c'delim' => false));
                                
    //print("Found start of object at {$c}\n");

                            
    } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {
                                
    // found a right-brace, and we're in an object
                                
    array_pop($stk);
                                
    //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");

                            
    } elseif (($substr_chrs_c_2 == '/*') &&
                                     
    in_array($top['what'], array(SERVICES_JSON_SLICESERVICES_JSON_IN_ARRSERVICES_JSON_IN_OBJ))) {
                                
    // found a comment start, and we are in an array, object, or slice
                                
    array_push($stk, array('what' => SERVICES_JSON_IN_CMT'where' => $c'delim' => false));
                                
    $c++;
                                
    //print("Found start of comment at {$c}\n");

                            
    } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {
                                
    // found a comment end, and we're in one now
                                
    array_pop($stk);
                                
    $c++;

                                for (
    $i $top['where']; $i <= $c; ++$i)
                                    
    $chrs substr_replace($chrs' '$i1);

                                
    //print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");

                            
    }

                        }

                        if (
    reset($stk) == SERVICES_JSON_IN_ARR) {
                            return 
    $arr;

                        } elseif (
    reset($stk) == SERVICES_JSON_IN_OBJ) {
                            return 
    $obj;

                        }

                    }
            }
        }

        
    /**
         * @todo Ultimately, this should just call PEAR::isError()
         */
        
    function isError($data$code null)
        {
            if (
    class_exists('pear')) {
                return 
    PEAR::isError($data$code);
            } elseif (
    is_object($data) && (get_class($data) == 'services_json_error' ||
                                     
    is_subclass_of($data'services_json_error'))) {
                return 
    true;
            }

            return 
    false;
        }
    }

    if (
    class_exists('PEAR_Error')) {

        class 
    Services_JSON_Error extends PEAR_Error
        
    {
            function 
    Services_JSON_Error($message 'unknown error'$code null,
                                         
    $mode null$options null$userinfo null)
            {
                
    parent::PEAR_Error($message$code$mode$options$userinfo);
            }
        }

    } else {

        
    /**
         * @todo Ultimately, this class shall be descended from PEAR_Error
         */
        
    class Services_JSON_Error
        
    {
            function 
    Services_JSON_Error($message 'unknown error'$code null,
                                         
    $mode null$options null$userinfo null)
            {

            }
        }

    }
        
    ?>
    -
    -
    \ No newline at end of file diff --git a/tests/textcode/data/markup/allclasses-frame.html b/tests/textcode/data/markup/allclasses-frame.html deleted file mode 100644 index 597e0cf1054..00000000000 --- a/tests/textcode/data/markup/allclasses-frame.html +++ /dev/null @@ -1,6586 +0,0 @@ - - - - - - -All Classes (Java 2 Platform SE 5.0_13) - - - - - - - - - - -All Classes -
    - - - - - -
    AbstractAction -
    -AbstractBorder -
    -AbstractButton -
    -AbstractCellEditor -
    -AbstractCollection -
    -AbstractColorChooserPanel -
    -AbstractDocument -
    -AbstractDocument.AttributeContext -
    -AbstractDocument.Content -
    -AbstractDocument.ElementEdit -
    -AbstractExecutorService -
    -AbstractInterruptibleChannel -
    -AbstractLayoutCache -
    -AbstractLayoutCache.NodeDimensions -
    -AbstractList -
    -AbstractListModel -
    -AbstractMap -
    -AbstractMethodError -
    -AbstractPreferences -
    -AbstractQueue -
    -AbstractQueuedSynchronizer -
    -AbstractSelectableChannel -
    -AbstractSelectionKey -
    -AbstractSelector -
    -AbstractSequentialList -
    -AbstractSet -
    -AbstractSpinnerModel -
    -AbstractTableModel -
    -AbstractUndoableEdit -
    -AbstractWriter -
    -AccessControlContext -
    -AccessControlException -
    -AccessController -
    -AccessException -
    -Accessible -
    -AccessibleAction -
    -AccessibleAttributeSequence -
    -AccessibleBundle -
    -AccessibleComponent -
    -AccessibleContext -
    -AccessibleEditableText -
    -AccessibleExtendedComponent -
    -AccessibleExtendedTable -
    -AccessibleExtendedText -
    -AccessibleHyperlink -
    -AccessibleHypertext -
    -AccessibleIcon -
    -AccessibleKeyBinding -
    -AccessibleObject -
    -AccessibleRelation -
    -AccessibleRelationSet -
    -AccessibleResourceBundle -
    -AccessibleRole -
    -AccessibleSelection -
    -AccessibleState -
    -AccessibleStateSet -
    -AccessibleStreamable -
    -AccessibleTable -
    -AccessibleTableModelChange -
    -AccessibleText -
    -AccessibleTextSequence -
    -AccessibleValue -
    -AccountException -
    -AccountExpiredException -
    -AccountLockedException -
    -AccountNotFoundException -
    -Acl -
    -AclEntry -
    -AclNotFoundException -
    -Action -
    -ActionEvent -
    -ActionListener -
    -ActionMap -
    -ActionMapUIResource -
    -Activatable -
    -ActivateFailedException -
    -ActivationDesc -
    -ActivationException -
    -ActivationGroup -
    -ActivationGroup_Stub -
    -ActivationGroupDesc -
    -ActivationGroupDesc.CommandEnvironment -
    -ActivationGroupID -
    -ActivationID -
    -ActivationInstantiator -
    -ActivationMonitor -
    -ActivationSystem -
    -Activator -
    -ACTIVE -
    -ActiveEvent -
    -ACTIVITY_COMPLETED -
    -ACTIVITY_REQUIRED -
    -ActivityCompletedException -
    -ActivityRequiredException -
    -AdapterActivator -
    -AdapterActivatorOperations -
    -AdapterAlreadyExists -
    -AdapterAlreadyExistsHelper -
    -AdapterInactive -
    -AdapterInactiveHelper -
    -AdapterManagerIdHelper -
    -AdapterNameHelper -
    -AdapterNonExistent -
    -AdapterNonExistentHelper -
    -AdapterStateHelper -
    -AddressHelper -
    -Adjustable -
    -AdjustmentEvent -
    -AdjustmentListener -
    -Adler32 -
    -AffineTransform -
    -AffineTransformOp -
    -AlgorithmParameterGenerator -
    -AlgorithmParameterGeneratorSpi -
    -AlgorithmParameters -
    -AlgorithmParameterSpec -
    -AlgorithmParametersSpi -
    -AllPermission -
    -AlphaComposite -
    -AlreadyBound -
    -AlreadyBoundException -
    -AlreadyBoundHelper -
    -AlreadyBoundHolder -
    -AlreadyConnectedException -
    -AncestorEvent -
    -AncestorListener -
    -AnnotatedElement -
    -Annotation -
    -Annotation -
    -AnnotationFormatError -
    -AnnotationTypeMismatchException -
    -Any -
    -AnyHolder -
    -AnySeqHelper -
    -AnySeqHelper -
    -AnySeqHolder -
    -AppConfigurationEntry -
    -AppConfigurationEntry.LoginModuleControlFlag -
    -Appendable -
    -Applet -
    -AppletContext -
    -AppletInitializer -
    -AppletStub -
    -ApplicationException -
    -Arc2D -
    -Arc2D.Double -
    -Arc2D.Float -
    -Area -
    -AreaAveragingScaleFilter -
    -ARG_IN -
    -ARG_INOUT -
    -ARG_OUT -
    -ArithmeticException -
    -Array -
    -Array -
    -ArrayBlockingQueue -
    -ArrayIndexOutOfBoundsException -
    -ArrayList -
    -Arrays -
    -ArrayStoreException -
    -ArrayType -
    -AssertionError -
    -AsyncBoxView -
    -AsynchronousCloseException -
    -AtomicBoolean -
    -AtomicInteger -
    -AtomicIntegerArray -
    -AtomicIntegerFieldUpdater -
    -AtomicLong -
    -AtomicLongArray -
    -AtomicLongFieldUpdater -
    -AtomicMarkableReference -
    -AtomicReference -
    -AtomicReferenceArray -
    -AtomicReferenceFieldUpdater -
    -AtomicStampedReference -
    -Attr -
    -Attribute -
    -Attribute -
    -Attribute -
    -AttributeChangeNotification -
    -AttributeChangeNotificationFilter -
    -AttributedCharacterIterator -
    -AttributedCharacterIterator.Attribute -
    -AttributedString -
    -AttributeException -
    -AttributeInUseException -
    -AttributeList -
    -AttributeList -
    -AttributeList -
    -AttributeListImpl -
    -AttributeModificationException -
    -AttributeNotFoundException -
    -Attributes -
    -Attributes -
    -Attributes -
    -Attributes.Name -
    -Attributes2 -
    -Attributes2Impl -
    -AttributeSet -
    -AttributeSet -
    -AttributeSet.CharacterAttribute -
    -AttributeSet.ColorAttribute -
    -AttributeSet.FontAttribute -
    -AttributeSet.ParagraphAttribute -
    -AttributeSetUtilities -
    -AttributesImpl -
    -AttributeValueExp -
    -AudioClip -
    -AudioFileFormat -
    -AudioFileFormat.Type -
    -AudioFileReader -
    -AudioFileWriter -
    -AudioFormat -
    -AudioFormat.Encoding -
    -AudioInputStream -
    -AudioPermission -
    -AudioSystem -
    -AuthenticationException -
    -AuthenticationException -
    -AuthenticationNotSupportedException -
    -Authenticator -
    -Authenticator.RequestorType -
    -AuthorizeCallback -
    -AuthPermission -
    -AuthProvider -
    -Autoscroll -
    -AWTError -
    -AWTEvent -
    -AWTEventListener -
    -AWTEventListenerProxy -
    -AWTEventMulticaster -
    -AWTException -
    -AWTKeyStroke -
    -AWTPermission -
    -BackingStoreException -
    -BAD_CONTEXT -
    -BAD_INV_ORDER -
    -BAD_OPERATION -
    -BAD_PARAM -
    -BAD_POLICY -
    -BAD_POLICY_TYPE -
    -BAD_POLICY_VALUE -
    -BAD_QOS -
    -BAD_TYPECODE -
    -BadAttributeValueExpException -
    -BadBinaryOpValueExpException -
    -BadKind -
    -BadLocationException -
    -BadPaddingException -
    -BadStringOperationException -
    -BandCombineOp -
    -BandedSampleModel -
    -BaseRowSet -
    -BasicArrowButton -
    -BasicAttribute -
    -BasicAttributes -
    -BasicBorders -
    -BasicBorders.ButtonBorder -
    -BasicBorders.FieldBorder -
    -BasicBorders.MarginBorder -
    -BasicBorders.MenuBarBorder -
    -BasicBorders.RadioButtonBorder -
    -BasicBorders.RolloverButtonBorder -
    -BasicBorders.SplitPaneBorder -
    -BasicBorders.ToggleButtonBorder -
    -BasicButtonListener -
    -BasicButtonUI -
    -BasicCheckBoxMenuItemUI -
    -BasicCheckBoxUI -
    -BasicColorChooserUI -
    -BasicComboBoxEditor -
    -BasicComboBoxEditor.UIResource -
    -BasicComboBoxRenderer -
    -BasicComboBoxRenderer.UIResource -
    -BasicComboBoxUI -
    -BasicComboPopup -
    -BasicControl -
    -BasicDesktopIconUI -
    -BasicDesktopPaneUI -
    -BasicDirectoryModel -
    -BasicEditorPaneUI -
    -BasicFileChooserUI -
    -BasicFormattedTextFieldUI -
    -BasicGraphicsUtils -
    -BasicHTML -
    -BasicIconFactory -
    -BasicInternalFrameTitlePane -
    -BasicInternalFrameUI -
    -BasicLabelUI -
    -BasicListUI -
    -BasicLookAndFeel -
    -BasicMenuBarUI -
    -BasicMenuItemUI -
    -BasicMenuUI -
    -BasicOptionPaneUI -
    -BasicOptionPaneUI.ButtonAreaLayout -
    -BasicPanelUI -
    -BasicPasswordFieldUI -
    -BasicPermission -
    -BasicPopupMenuSeparatorUI -
    -BasicPopupMenuUI -
    -BasicProgressBarUI -
    -BasicRadioButtonMenuItemUI -
    -BasicRadioButtonUI -
    -BasicRootPaneUI -
    -BasicScrollBarUI -
    -BasicScrollPaneUI -
    -BasicSeparatorUI -
    -BasicSliderUI -
    -BasicSpinnerUI -
    -BasicSplitPaneDivider -
    -BasicSplitPaneUI -
    -BasicStroke -
    -BasicTabbedPaneUI -
    -BasicTableHeaderUI -
    -BasicTableUI -
    -BasicTextAreaUI -
    -BasicTextFieldUI -
    -BasicTextPaneUI -
    -BasicTextUI -
    -BasicTextUI.BasicCaret -
    -BasicTextUI.BasicHighlighter -
    -BasicToggleButtonUI -
    -BasicToolBarSeparatorUI -
    -BasicToolBarUI -
    -BasicToolTipUI -
    -BasicTreeUI -
    -BasicViewportUI -
    -BatchUpdateException -
    -BeanContext -
    -BeanContextChild -
    -BeanContextChildComponentProxy -
    -BeanContextChildSupport -
    -BeanContextContainerProxy -
    -BeanContextEvent -
    -BeanContextMembershipEvent -
    -BeanContextMembershipListener -
    -BeanContextProxy -
    -BeanContextServiceAvailableEvent -
    -BeanContextServiceProvider -
    -BeanContextServiceProviderBeanInfo -
    -BeanContextServiceRevokedEvent -
    -BeanContextServiceRevokedListener -
    -BeanContextServices -
    -BeanContextServicesListener -
    -BeanContextServicesSupport -
    -BeanContextServicesSupport.BCSSServiceProvider -
    -BeanContextSupport -
    -BeanContextSupport.BCSIterator -
    -BeanDescriptor -
    -BeanInfo -
    -Beans -
    -BevelBorder -
    -Bidi -
    -BigDecimal -
    -BigInteger -
    -BinaryRefAddr -
    -BindException -
    -Binding -
    -Binding -
    -BindingHelper -
    -BindingHolder -
    -BindingIterator -
    -BindingIteratorHelper -
    -BindingIteratorHolder -
    -BindingIteratorOperations -
    -BindingIteratorPOA -
    -BindingListHelper -
    -BindingListHolder -
    -BindingType -
    -BindingTypeHelper -
    -BindingTypeHolder -
    -BitSet -
    -Blob -
    -BlockingQueue -
    -BlockView -
    -BMPImageWriteParam -
    -Book -
    -Boolean -
    -BooleanControl -
    -BooleanControl.Type -
    -BooleanHolder -
    -BooleanSeqHelper -
    -BooleanSeqHolder -
    -Border -
    -BorderFactory -
    -BorderLayout -
    -BorderUIResource -
    -BorderUIResource.BevelBorderUIResource -
    -BorderUIResource.CompoundBorderUIResource -
    -BorderUIResource.EmptyBorderUIResource -
    -BorderUIResource.EtchedBorderUIResource -
    -BorderUIResource.LineBorderUIResource -
    -BorderUIResource.MatteBorderUIResource -
    -BorderUIResource.TitledBorderUIResource -
    -BoundedRangeModel -
    -Bounds -
    -Bounds -
    -Box -
    -Box.Filler -
    -BoxedValueHelper -
    -BoxLayout -
    -BoxView -
    -BreakIterator -
    -BrokenBarrierException -
    -Buffer -
    -BufferCapabilities -
    -BufferCapabilities.FlipContents -
    -BufferedImage -
    -BufferedImageFilter -
    -BufferedImageOp -
    -BufferedInputStream -
    -BufferedOutputStream -
    -BufferedReader -
    -BufferedWriter -
    -BufferOverflowException -
    -BufferStrategy -
    -BufferUnderflowException -
    -Button -
    -ButtonGroup -
    -ButtonModel -
    -ButtonUI -
    -Byte -
    -ByteArrayInputStream -
    -ByteArrayOutputStream -
    -ByteBuffer -
    -ByteChannel -
    -ByteHolder -
    -ByteLookupTable -
    -ByteOrder -
    -CachedRowSet -
    -CacheRequest -
    -CacheResponse -
    -Calendar -
    -Callable -
    -CallableStatement -
    -Callback -
    -CallbackHandler -
    -CancelablePrintJob -
    -CancellationException -
    -CancelledKeyException -
    -CannotProceed -
    -CannotProceedException -
    -CannotProceedHelper -
    -CannotProceedHolder -
    -CannotRedoException -
    -CannotUndoException -
    -Canvas -
    -CardLayout -
    -Caret -
    -CaretEvent -
    -CaretListener -
    -CDATASection -
    -CellEditor -
    -CellEditorListener -
    -CellRendererPane -
    -Certificate -
    -Certificate -
    -Certificate -
    -Certificate.CertificateRep -
    -CertificateEncodingException -
    -CertificateEncodingException -
    -CertificateException -
    -CertificateException -
    -CertificateExpiredException -
    -CertificateExpiredException -
    -CertificateFactory -
    -CertificateFactorySpi -
    -CertificateNotYetValidException -
    -CertificateNotYetValidException -
    -CertificateParsingException -
    -CertificateParsingException -
    -CertPath -
    -CertPath.CertPathRep -
    -CertPathBuilder -
    -CertPathBuilderException -
    -CertPathBuilderResult -
    -CertPathBuilderSpi -
    -CertPathParameters -
    -CertPathTrustManagerParameters -
    -CertPathValidator -
    -CertPathValidatorException -
    -CertPathValidatorResult -
    -CertPathValidatorSpi -
    -CertSelector -
    -CertStore -
    -CertStoreException -
    -CertStoreParameters -
    -CertStoreSpi -
    -ChangedCharSetException -
    -ChangeEvent -
    -ChangeListener -
    -Channel -
    -ChannelBinding -
    -Channels -
    -Character -
    -Character.Subset -
    -Character.UnicodeBlock -
    -CharacterCodingException -
    -CharacterData -
    -CharacterIterator -
    -CharArrayReader -
    -CharArrayWriter -
    -CharBuffer -
    -CharConversionException -
    -CharHolder -
    -CharSeqHelper -
    -CharSeqHolder -
    -CharSequence -
    -Charset -
    -CharsetDecoder -
    -CharsetEncoder -
    -CharsetProvider -
    -Checkbox -
    -CheckboxGroup -
    -CheckboxMenuItem -
    -CheckedInputStream -
    -CheckedOutputStream -
    -Checksum -
    -Choice -
    -ChoiceCallback -
    -ChoiceFormat -
    -Chromaticity -
    -Cipher -
    -CipherInputStream -
    -CipherOutputStream -
    -CipherSpi -
    -Class -
    -ClassCastException -
    -ClassCircularityError -
    -ClassDefinition -
    -ClassDesc -
    -ClassFileTransformer -
    -ClassFormatError -
    -ClassLoader -
    -ClassLoaderRepository -
    -ClassLoadingMXBean -
    -ClassNotFoundException -
    -ClientRequestInfo -
    -ClientRequestInfoOperations -
    -ClientRequestInterceptor -
    -ClientRequestInterceptorOperations -
    -Clip -
    -Clipboard -
    -ClipboardOwner -
    -Clob -
    -Cloneable -
    -CloneNotSupportedException -
    -Closeable -
    -ClosedByInterruptException -
    -ClosedChannelException -
    -ClosedSelectorException -
    -CMMException -
    -Codec -
    -CodecFactory -
    -CodecFactoryHelper -
    -CodecFactoryOperations -
    -CodecOperations -
    -CoderMalfunctionError -
    -CoderResult -
    -CODESET_INCOMPATIBLE -
    -CodeSets -
    -CodeSigner -
    -CodeSource -
    -CodingErrorAction -
    -CollationElementIterator -
    -CollationKey -
    -Collator -
    -Collection -
    -CollectionCertStoreParameters -
    -Collections -
    -Color -
    -ColorChooserComponentFactory -
    -ColorChooserUI -
    -ColorConvertOp -
    -ColorModel -
    -ColorSelectionModel -
    -ColorSpace -
    -ColorSupported -
    -ColorType -
    -ColorUIResource -
    -ComboBoxEditor -
    -ComboBoxModel -
    -ComboBoxUI -
    -ComboPopup -
    -COMM_FAILURE -
    -Comment -
    -CommunicationException -
    -Comparable -
    -Comparator -
    -CompilationMXBean -
    -Compiler -
    -CompletionService -
    -CompletionStatus -
    -CompletionStatusHelper -
    -Component -
    -ComponentAdapter -
    -ComponentColorModel -
    -ComponentEvent -
    -ComponentIdHelper -
    -ComponentInputMap -
    -ComponentInputMapUIResource -
    -ComponentListener -
    -ComponentOrientation -
    -ComponentSampleModel -
    -ComponentUI -
    -ComponentView -
    -Composite -
    -CompositeContext -
    -CompositeData -
    -CompositeDataSupport -
    -CompositeName -
    -CompositeType -
    -CompositeView -
    -CompoundBorder -
    -CompoundControl -
    -CompoundControl.Type -
    -CompoundEdit -
    -CompoundName -
    -Compression -
    -ConcurrentHashMap -
    -ConcurrentLinkedQueue -
    -ConcurrentMap -
    -ConcurrentModificationException -
    -Condition -
    -Configuration -
    -ConfigurationException -
    -ConfirmationCallback -
    -ConnectException -
    -ConnectException -
    -ConnectIOException -
    -Connection -
    -ConnectionEvent -
    -ConnectionEventListener -
    -ConnectionPendingException -
    -ConnectionPoolDataSource -
    -ConsoleHandler -
    -Constructor -
    -Container -
    -ContainerAdapter -
    -ContainerEvent -
    -ContainerListener -
    -ContainerOrderFocusTraversalPolicy -
    -ContentHandler -
    -ContentHandler -
    -ContentHandlerFactory -
    -ContentModel -
    -Context -
    -Context -
    -ContextList -
    -ContextNotEmptyException -
    -ContextualRenderedImageFactory -
    -Control -
    -Control -
    -Control.Type -
    -ControlFactory -
    -ControllerEventListener -
    -ConvolveOp -
    -CookieHandler -
    -CookieHolder -
    -Copies -
    -CopiesSupported -
    -CopyOnWriteArrayList -
    -CopyOnWriteArraySet -
    -CountDownLatch -
    -CounterMonitor -
    -CounterMonitorMBean -
    -CRC32 -
    -CredentialException -
    -CredentialExpiredException -
    -CredentialNotFoundException -
    -CRL -
    -CRLException -
    -CRLSelector -
    -CropImageFilter -
    -CSS -
    -CSS.Attribute -
    -CTX_RESTRICT_SCOPE -
    -CubicCurve2D -
    -CubicCurve2D.Double -
    -CubicCurve2D.Float -
    -Currency -
    -Current -
    -Current -
    -Current -
    -CurrentHelper -
    -CurrentHelper -
    -CurrentHelper -
    -CurrentHolder -
    -CurrentOperations -
    -CurrentOperations -
    -CurrentOperations -
    -Cursor -
    -Customizer -
    -CustomMarshal -
    -CustomValue -
    -CyclicBarrier -
    -DATA_CONVERSION -
    -DatabaseMetaData -
    -DataBuffer -
    -DataBufferByte -
    -DataBufferDouble -
    -DataBufferFloat -
    -DataBufferInt -
    -DataBufferShort -
    -DataBufferUShort -
    -DataFlavor -
    -DataFormatException -
    -DatagramChannel -
    -DatagramPacket -
    -DatagramSocket -
    -DatagramSocketImpl -
    -DatagramSocketImplFactory -
    -DataInput -
    -DataInputStream -
    -DataInputStream -
    -DataLine -
    -DataLine.Info -
    -DataOutput -
    -DataOutputStream -
    -DataOutputStream -
    -DataSource -
    -DataTruncation -
    -DatatypeConfigurationException -
    -DatatypeConstants -
    -DatatypeConstants.Field -
    -DatatypeFactory -
    -Date -
    -Date -
    -DateFormat -
    -DateFormat.Field -
    -DateFormatSymbols -
    -DateFormatter -
    -DateTimeAtCompleted -
    -DateTimeAtCreation -
    -DateTimeAtProcessing -
    -DateTimeSyntax -
    -DebugGraphics -
    -DecimalFormat -
    -DecimalFormatSymbols -
    -DeclHandler -
    -DefaultBoundedRangeModel -
    -DefaultButtonModel -
    -DefaultCaret -
    -DefaultCellEditor -
    -DefaultColorSelectionModel -
    -DefaultComboBoxModel -
    -DefaultDesktopManager -
    -DefaultEditorKit -
    -DefaultEditorKit.BeepAction -
    -DefaultEditorKit.CopyAction -
    -DefaultEditorKit.CutAction -
    -DefaultEditorKit.DefaultKeyTypedAction -
    -DefaultEditorKit.InsertBreakAction -
    -DefaultEditorKit.InsertContentAction -
    -DefaultEditorKit.InsertTabAction -
    -DefaultEditorKit.PasteAction -
    -DefaultFocusManager -
    -DefaultFocusTraversalPolicy -
    -DefaultFormatter -
    -DefaultFormatterFactory -
    -DefaultHandler -
    -DefaultHandler2 -
    -DefaultHighlighter -
    -DefaultHighlighter.DefaultHighlightPainter -
    -DefaultKeyboardFocusManager -
    -DefaultListCellRenderer -
    -DefaultListCellRenderer.UIResource -
    -DefaultListModel -
    -DefaultListSelectionModel -
    -DefaultLoaderRepository -
    -DefaultLoaderRepository -
    -DefaultMenuLayout -
    -DefaultMetalTheme -
    -DefaultMutableTreeNode -
    -DefaultPersistenceDelegate -
    -DefaultSingleSelectionModel -
    -DefaultStyledDocument -
    -DefaultStyledDocument.AttributeUndoableEdit -
    -DefaultStyledDocument.ElementSpec -
    -DefaultTableCellRenderer -
    -DefaultTableCellRenderer.UIResource -
    -DefaultTableColumnModel -
    -DefaultTableModel -
    -DefaultTextUI -
    -DefaultTreeCellEditor -
    -DefaultTreeCellRenderer -
    -DefaultTreeModel -
    -DefaultTreeSelectionModel -
    -DefinitionKind -
    -DefinitionKindHelper -
    -Deflater -
    -DeflaterOutputStream -
    -Delayed -
    -DelayQueue -
    -Delegate -
    -Delegate -
    -Delegate -
    -DelegationPermission -
    -Deprecated -
    -Descriptor -
    -DescriptorAccess -
    -DescriptorSupport -
    -DESedeKeySpec -
    -DesignMode -
    -DESKeySpec -
    -DesktopIconUI -
    -DesktopManager -
    -DesktopPaneUI -
    -Destination -
    -Destroyable -
    -DestroyFailedException -
    -DGC -
    -DHGenParameterSpec -
    -DHKey -
    -DHParameterSpec -
    -DHPrivateKey -
    -DHPrivateKeySpec -
    -DHPublicKey -
    -DHPublicKeySpec -
    -Dialog -
    -Dictionary -
    -DigestException -
    -DigestInputStream -
    -DigestOutputStream -
    -Dimension -
    -Dimension2D -
    -DimensionUIResource -
    -DirContext -
    -DirectColorModel -
    -DirectoryManager -
    -DirObjectFactory -
    -DirStateFactory -
    -DirStateFactory.Result -
    -DISCARDING -
    -DisplayMode -
    -DnDConstants -
    -Doc -
    -DocAttribute -
    -DocAttributeSet -
    -DocFlavor -
    -DocFlavor.BYTE_ARRAY -
    -DocFlavor.CHAR_ARRAY -
    -DocFlavor.INPUT_STREAM -
    -DocFlavor.READER -
    -DocFlavor.SERVICE_FORMATTED -
    -DocFlavor.STRING -
    -DocFlavor.URL -
    -DocPrintJob -
    -Document -
    -Document -
    -DocumentBuilder -
    -DocumentBuilderFactory -
    -Documented -
    -DocumentEvent -
    -DocumentEvent -
    -DocumentEvent.ElementChange -
    -DocumentEvent.EventType -
    -DocumentFilter -
    -DocumentFilter.FilterBypass -
    -DocumentFragment -
    -DocumentHandler -
    -DocumentListener -
    -DocumentName -
    -DocumentParser -
    -DocumentType -
    -DomainCombiner -
    -DomainManager -
    -DomainManagerOperations -
    -DOMConfiguration -
    -DOMError -
    -DOMErrorHandler -
    -DOMException -
    -DOMImplementation -
    -DOMImplementationList -
    -DOMImplementationLS -
    -DOMImplementationRegistry -
    -DOMImplementationSource -
    -DOMLocator -
    -DOMLocator -
    -DOMResult -
    -DOMSource -
    -DOMStringList -
    -Double -
    -DoubleBuffer -
    -DoubleHolder -
    -DoubleSeqHelper -
    -DoubleSeqHolder -
    -DragGestureEvent -
    -DragGestureListener -
    -DragGestureRecognizer -
    -DragSource -
    -DragSourceAdapter -
    -DragSourceContext -
    -DragSourceDragEvent -
    -DragSourceDropEvent -
    -DragSourceEvent -
    -DragSourceListener -
    -DragSourceMotionListener -
    -Driver -
    -DriverManager -
    -DriverPropertyInfo -
    -DropTarget -
    -DropTarget.DropTargetAutoScroller -
    -DropTargetAdapter -
    -DropTargetContext -
    -DropTargetDragEvent -
    -DropTargetDropEvent -
    -DropTargetEvent -
    -DropTargetListener -
    -DSAKey -
    -DSAKeyPairGenerator -
    -DSAParameterSpec -
    -DSAParams -
    -DSAPrivateKey -
    -DSAPrivateKeySpec -
    -DSAPublicKey -
    -DSAPublicKeySpec -
    -DTD -
    -DTDConstants -
    -DTDHandler -
    -DuplicateFormatFlagsException -
    -DuplicateName -
    -DuplicateNameHelper -
    -Duration -
    -DynamicImplementation -
    -DynamicImplementation -
    -DynamicMBean -
    -DynAny -
    -DynAny -
    -DynAnyFactory -
    -DynAnyFactoryHelper -
    -DynAnyFactoryOperations -
    -DynAnyHelper -
    -DynAnyOperations -
    -DynAnySeqHelper -
    -DynArray -
    -DynArray -
    -DynArrayHelper -
    -DynArrayOperations -
    -DynEnum -
    -DynEnum -
    -DynEnumHelper -
    -DynEnumOperations -
    -DynFixed -
    -DynFixed -
    -DynFixedHelper -
    -DynFixedOperations -
    -DynSequence -
    -DynSequence -
    -DynSequenceHelper -
    -DynSequenceOperations -
    -DynStruct -
    -DynStruct -
    -DynStructHelper -
    -DynStructOperations -
    -DynUnion -
    -DynUnion -
    -DynUnionHelper -
    -DynUnionOperations -
    -DynValue -
    -DynValue -
    -DynValueBox -
    -DynValueBoxOperations -
    -DynValueCommon -
    -DynValueCommonOperations -
    -DynValueHelper -
    -DynValueOperations -
    -ECField -
    -ECFieldF2m -
    -ECFieldFp -
    -ECGenParameterSpec -
    -ECKey -
    -ECParameterSpec -
    -ECPoint -
    -ECPrivateKey -
    -ECPrivateKeySpec -
    -ECPublicKey -
    -ECPublicKeySpec -
    -EditorKit -
    -Element -
    -Element -
    -Element -
    -ElementIterator -
    -ElementType -
    -Ellipse2D -
    -Ellipse2D.Double -
    -Ellipse2D.Float -
    -EllipticCurve -
    -EmptyBorder -
    -EmptyStackException -
    -EncodedKeySpec -
    -Encoder -
    -Encoding -
    -ENCODING_CDR_ENCAPS -
    -EncryptedPrivateKeyInfo -
    -Entity -
    -Entity -
    -EntityReference -
    -EntityResolver -
    -EntityResolver2 -
    -Enum -
    -EnumConstantNotPresentException -
    -EnumControl -
    -EnumControl.Type -
    -Enumeration -
    -EnumMap -
    -EnumSet -
    -EnumSyntax -
    -Environment -
    -EOFException -
    -Error -
    -ErrorHandler -
    -ErrorListener -
    -ErrorManager -
    -EtchedBorder -
    -Event -
    -Event -
    -EventContext -
    -EventDirContext -
    -EventException -
    -EventHandler -
    -EventListener -
    -EventListener -
    -EventListenerList -
    -EventListenerProxy -
    -EventObject -
    -EventQueue -
    -EventSetDescriptor -
    -EventTarget -
    -Exception -
    -ExceptionDetailMessage -
    -ExceptionInInitializerError -
    -ExceptionList -
    -ExceptionListener -
    -Exchanger -
    -ExecutionException -
    -Executor -
    -ExecutorCompletionService -
    -Executors -
    -ExecutorService -
    -ExemptionMechanism -
    -ExemptionMechanismException -
    -ExemptionMechanismSpi -
    -ExpandVetoException -
    -ExportException -
    -Expression -
    -ExtendedRequest -
    -ExtendedResponse -
    -Externalizable -
    -FactoryConfigurationError -
    -FailedLoginException -
    -FeatureDescriptor -
    -Fidelity -
    -Field -
    -FieldNameHelper -
    -FieldNameHelper -
    -FieldPosition -
    -FieldView -
    -File -
    -FileCacheImageInputStream -
    -FileCacheImageOutputStream -
    -FileChannel -
    -FileChannel.MapMode -
    -FileChooserUI -
    -FileDescriptor -
    -FileDialog -
    -FileFilter -
    -FileFilter -
    -FileHandler -
    -FileImageInputStream -
    -FileImageOutputStream -
    -FileInputStream -
    -FileLock -
    -FileLockInterruptionException -
    -FilenameFilter -
    -FileNameMap -
    -FileNotFoundException -
    -FileOutputStream -
    -FilePermission -
    -FileReader -
    -FileSystemView -
    -FileView -
    -FileWriter -
    -Filter -
    -FilteredImageSource -
    -FilteredRowSet -
    -FilterInputStream -
    -FilterOutputStream -
    -FilterReader -
    -FilterWriter -
    -Finishings -
    -FixedHeightLayoutCache -
    -FixedHolder -
    -FlatteningPathIterator -
    -FlavorEvent -
    -FlavorException -
    -FlavorListener -
    -FlavorMap -
    -FlavorTable -
    -Float -
    -FloatBuffer -
    -FloatControl -
    -FloatControl.Type -
    -FloatHolder -
    -FloatSeqHelper -
    -FloatSeqHolder -
    -FlowLayout -
    -FlowView -
    -FlowView.FlowStrategy -
    -Flushable -
    -FocusAdapter -
    -FocusEvent -
    -FocusListener -
    -FocusManager -
    -FocusTraversalPolicy -
    -Font -
    -FontFormatException -
    -FontMetrics -
    -FontRenderContext -
    -FontUIResource -
    -Format -
    -Format.Field -
    -FormatConversionProvider -
    -FormatFlagsConversionMismatchException -
    -FormatMismatch -
    -FormatMismatchHelper -
    -Formattable -
    -FormattableFlags -
    -Formatter -
    -Formatter -
    -Formatter.BigDecimalLayoutForm -
    -FormatterClosedException -
    -FormSubmitEvent -
    -FormSubmitEvent.MethodType -
    -FormView -
    -ForwardRequest -
    -ForwardRequest -
    -ForwardRequestHelper -
    -ForwardRequestHelper -
    -Frame -
    -FREE_MEM -
    -Future -
    -FutureTask -
    -GapContent -
    -GarbageCollectorMXBean -
    -GatheringByteChannel -
    -GaugeMonitor -
    -GaugeMonitorMBean -
    -GeneralPath -
    -GeneralSecurityException -
    -GenericArrayType -
    -GenericDeclaration -
    -GenericSignatureFormatError -
    -GlyphJustificationInfo -
    -GlyphMetrics -
    -GlyphVector -
    -GlyphView -
    -GlyphView.GlyphPainter -
    -GradientPaint -
    -GraphicAttribute -
    -Graphics -
    -Graphics2D -
    -GraphicsConfigTemplate -
    -GraphicsConfiguration -
    -GraphicsDevice -
    -GraphicsEnvironment -
    -GrayFilter -
    -GregorianCalendar -
    -GridBagConstraints -
    -GridBagLayout -
    -GridLayout -
    -Group -
    -GSSContext -
    -GSSCredential -
    -GSSException -
    -GSSManager -
    -GSSName -
    -Guard -
    -GuardedObject -
    -GZIPInputStream -
    -GZIPOutputStream -
    -Handler -
    -HandlerBase -
    -HandshakeCompletedEvent -
    -HandshakeCompletedListener -
    -HasControls -
    -HashAttributeSet -
    -HashDocAttributeSet -
    -HashMap -
    -HashPrintJobAttributeSet -
    -HashPrintRequestAttributeSet -
    -HashPrintServiceAttributeSet -
    -HashSet -
    -Hashtable -
    -HeadlessException -
    -HierarchyBoundsAdapter -
    -HierarchyBoundsListener -
    -HierarchyEvent -
    -HierarchyListener -
    -Highlighter -
    -Highlighter.Highlight -
    -Highlighter.HighlightPainter -
    -HOLDING -
    -HostnameVerifier -
    -HTML -
    -HTML.Attribute -
    -HTML.Tag -
    -HTML.UnknownTag -
    -HTMLDocument -
    -HTMLDocument.Iterator -
    -HTMLEditorKit -
    -HTMLEditorKit.HTMLFactory -
    -HTMLEditorKit.HTMLTextAction -
    -HTMLEditorKit.InsertHTMLTextAction -
    -HTMLEditorKit.LinkController -
    -HTMLEditorKit.Parser -
    -HTMLEditorKit.ParserCallback -
    -HTMLFrameHyperlinkEvent -
    -HTMLWriter -
    -HttpRetryException -
    -HttpsURLConnection -
    -HttpURLConnection -
    -HyperlinkEvent -
    -HyperlinkEvent.EventType -
    -HyperlinkListener -
    -ICC_ColorSpace -
    -ICC_Profile -
    -ICC_ProfileGray -
    -ICC_ProfileRGB -
    -Icon -
    -IconUIResource -
    -IconView -
    -ID_ASSIGNMENT_POLICY_ID -
    -ID_UNIQUENESS_POLICY_ID -
    -IdAssignmentPolicy -
    -IdAssignmentPolicyOperations -
    -IdAssignmentPolicyValue -
    -IdentifierHelper -
    -Identity -
    -IdentityHashMap -
    -IdentityScope -
    -IDLEntity -
    -IDLType -
    -IDLTypeHelper -
    -IDLTypeOperations -
    -IdUniquenessPolicy -
    -IdUniquenessPolicyOperations -
    -IdUniquenessPolicyValue -
    -IIOByteBuffer -
    -IIOException -
    -IIOImage -
    -IIOInvalidTreeException -
    -IIOMetadata -
    -IIOMetadataController -
    -IIOMetadataFormat -
    -IIOMetadataFormatImpl -
    -IIOMetadataNode -
    -IIOParam -
    -IIOParamController -
    -IIOReadProgressListener -
    -IIOReadUpdateListener -
    -IIOReadWarningListener -
    -IIORegistry -
    -IIOServiceProvider -
    -IIOWriteProgressListener -
    -IIOWriteWarningListener -
    -IllegalAccessError -
    -IllegalAccessException -
    -IllegalArgumentException -
    -IllegalBlockingModeException -
    -IllegalBlockSizeException -
    -IllegalCharsetNameException -
    -IllegalClassFormatException -
    -IllegalComponentStateException -
    -IllegalFormatCodePointException -
    -IllegalFormatConversionException -
    -IllegalFormatException -
    -IllegalFormatFlagsException -
    -IllegalFormatPrecisionException -
    -IllegalFormatWidthException -
    -IllegalMonitorStateException -
    -IllegalPathStateException -
    -IllegalSelectorException -
    -IllegalStateException -
    -IllegalThreadStateException -
    -Image -
    -ImageCapabilities -
    -ImageConsumer -
    -ImageFilter -
    -ImageGraphicAttribute -
    -ImageIcon -
    -ImageInputStream -
    -ImageInputStreamImpl -
    -ImageInputStreamSpi -
    -ImageIO -
    -ImageObserver -
    -ImageOutputStream -
    -ImageOutputStreamImpl -
    -ImageOutputStreamSpi -
    -ImageProducer -
    -ImageReader -
    -ImageReaderSpi -
    -ImageReaderWriterSpi -
    -ImageReadParam -
    -ImageTranscoder -
    -ImageTranscoderSpi -
    -ImageTypeSpecifier -
    -ImageView -
    -ImageWriteParam -
    -ImageWriter -
    -ImageWriterSpi -
    -ImagingOpException -
    -IMP_LIMIT -
    -IMPLICIT_ACTIVATION_POLICY_ID -
    -ImplicitActivationPolicy -
    -ImplicitActivationPolicyOperations -
    -ImplicitActivationPolicyValue -
    -INACTIVE -
    -IncompatibleClassChangeError -
    -IncompleteAnnotationException -
    -InconsistentTypeCode -
    -InconsistentTypeCode -
    -InconsistentTypeCodeHelper -
    -IndexColorModel -
    -IndexedPropertyChangeEvent -
    -IndexedPropertyDescriptor -
    -IndexOutOfBoundsException -
    -IndirectionException -
    -Inet4Address -
    -Inet6Address -
    -InetAddress -
    -InetSocketAddress -
    -Inflater -
    -InflaterInputStream -
    -InheritableThreadLocal -
    -Inherited -
    -InitialContext -
    -InitialContextFactory -
    -InitialContextFactoryBuilder -
    -InitialDirContext -
    -INITIALIZE -
    -InitialLdapContext -
    -InlineView -
    -InputContext -
    -InputEvent -
    -InputMap -
    -InputMapUIResource -
    -InputMethod -
    -InputMethodContext -
    -InputMethodDescriptor -
    -InputMethodEvent -
    -InputMethodHighlight -
    -InputMethodListener -
    -InputMethodRequests -
    -InputMismatchException -
    -InputSource -
    -InputStream -
    -InputStream -
    -InputStream -
    -InputStreamReader -
    -InputSubset -
    -InputVerifier -
    -Insets -
    -InsetsUIResource -
    -InstanceAlreadyExistsException -
    -InstanceNotFoundException -
    -InstantiationError -
    -InstantiationException -
    -Instrument -
    -Instrumentation -
    -InsufficientResourcesException -
    -IntBuffer -
    -Integer -
    -IntegerSyntax -
    -Interceptor -
    -InterceptorOperations -
    -INTERNAL -
    -InternalError -
    -InternalFrameAdapter -
    -InternalFrameEvent -
    -InternalFrameFocusTraversalPolicy -
    -InternalFrameListener -
    -InternalFrameUI -
    -InternationalFormatter -
    -InterruptedException -
    -InterruptedIOException -
    -InterruptedNamingException -
    -InterruptibleChannel -
    -INTF_REPOS -
    -IntHolder -
    -IntrospectionException -
    -IntrospectionException -
    -Introspector -
    -INV_FLAG -
    -INV_IDENT -
    -INV_OBJREF -
    -INV_POLICY -
    -Invalid -
    -INVALID_ACTIVITY -
    -INVALID_TRANSACTION -
    -InvalidActivityException -
    -InvalidAddress -
    -InvalidAddressHelper -
    -InvalidAddressHolder -
    -InvalidAlgorithmParameterException -
    -InvalidApplicationException -
    -InvalidAttributeIdentifierException -
    -InvalidAttributesException -
    -InvalidAttributeValueException -
    -InvalidAttributeValueException -
    -InvalidClassException -
    -InvalidDnDOperationException -
    -InvalidKeyException -
    -InvalidKeyException -
    -InvalidKeySpecException -
    -InvalidMarkException -
    -InvalidMidiDataException -
    -InvalidName -
    -InvalidName -
    -InvalidName -
    -InvalidNameException -
    -InvalidNameHelper -
    -InvalidNameHelper -
    -InvalidNameHolder -
    -InvalidObjectException -
    -InvalidOpenTypeException -
    -InvalidParameterException -
    -InvalidParameterSpecException -
    -InvalidPolicy -
    -InvalidPolicyHelper -
    -InvalidPreferencesFormatException -
    -InvalidPropertiesFormatException -
    -InvalidRelationIdException -
    -InvalidRelationServiceException -
    -InvalidRelationTypeException -
    -InvalidRoleInfoException -
    -InvalidRoleValueException -
    -InvalidSearchControlsException -
    -InvalidSearchFilterException -
    -InvalidSeq -
    -InvalidSlot -
    -InvalidSlotHelper -
    -InvalidTargetObjectTypeException -
    -InvalidTransactionException -
    -InvalidTypeForEncoding -
    -InvalidTypeForEncodingHelper -
    -InvalidValue -
    -InvalidValue -
    -InvalidValueHelper -
    -InvocationEvent -
    -InvocationHandler -
    -InvocationTargetException -
    -InvokeHandler -
    -IOException -
    -IOR -
    -IORHelper -
    -IORHolder -
    -IORInfo -
    -IORInfoOperations -
    -IORInterceptor -
    -IORInterceptor_3_0 -
    -IORInterceptor_3_0Helper -
    -IORInterceptor_3_0Holder -
    -IORInterceptor_3_0Operations -
    -IORInterceptorOperations -
    -IRObject -
    -IRObjectOperations -
    -IstringHelper -
    -ItemEvent -
    -ItemListener -
    -ItemSelectable -
    -Iterable -
    -Iterator -
    -IvParameterSpec -
    -JApplet -
    -JarEntry -
    -JarException -
    -JarFile -
    -JarInputStream -
    -JarOutputStream -
    -JarURLConnection -
    -JButton -
    -JCheckBox -
    -JCheckBoxMenuItem -
    -JColorChooser -
    -JComboBox -
    -JComboBox.KeySelectionManager -
    -JComponent -
    -JdbcRowSet -
    -JDesktopPane -
    -JDialog -
    -JEditorPane -
    -JFileChooser -
    -JFormattedTextField -
    -JFormattedTextField.AbstractFormatter -
    -JFormattedTextField.AbstractFormatterFactory -
    -JFrame -
    -JInternalFrame -
    -JInternalFrame.JDesktopIcon -
    -JLabel -
    -JLayeredPane -
    -JList -
    -JMenu -
    -JMenuBar -
    -JMenuItem -
    -JMException -
    -JMRuntimeException -
    -JMXAuthenticator -
    -JMXConnectionNotification -
    -JMXConnector -
    -JMXConnectorFactory -
    -JMXConnectorProvider -
    -JMXConnectorServer -
    -JMXConnectorServerFactory -
    -JMXConnectorServerMBean -
    -JMXConnectorServerProvider -
    -JMXPrincipal -
    -JMXProviderException -
    -JMXServerErrorException -
    -JMXServiceURL -
    -JobAttributes -
    -JobAttributes.DefaultSelectionType -
    -JobAttributes.DestinationType -
    -JobAttributes.DialogType -
    -JobAttributes.MultipleDocumentHandlingType -
    -JobAttributes.SidesType -
    -JobHoldUntil -
    -JobImpressions -
    -JobImpressionsCompleted -
    -JobImpressionsSupported -
    -JobKOctets -
    -JobKOctetsProcessed -
    -JobKOctetsSupported -
    -JobMediaSheets -
    -JobMediaSheetsCompleted -
    -JobMediaSheetsSupported -
    -JobMessageFromOperator -
    -JobName -
    -JobOriginatingUserName -
    -JobPriority -
    -JobPrioritySupported -
    -JobSheets -
    -JobState -
    -JobStateReason -
    -JobStateReasons -
    -Joinable -
    -JoinRowSet -
    -JOptionPane -
    -JPanel -
    -JPasswordField -
    -JPEGHuffmanTable -
    -JPEGImageReadParam -
    -JPEGImageWriteParam -
    -JPEGQTable -
    -JPopupMenu -
    -JPopupMenu.Separator -
    -JProgressBar -
    -JRadioButton -
    -JRadioButtonMenuItem -
    -JRootPane -
    -JScrollBar -
    -JScrollPane -
    -JSeparator -
    -JSlider -
    -JSpinner -
    -JSpinner.DateEditor -
    -JSpinner.DefaultEditor -
    -JSpinner.ListEditor -
    -JSpinner.NumberEditor -
    -JSplitPane -
    -JTabbedPane -
    -JTable -
    -JTable.PrintMode -
    -JTableHeader -
    -JTextArea -
    -JTextComponent -
    -JTextComponent.KeyBinding -
    -JTextField -
    -JTextPane -
    -JToggleButton -
    -JToggleButton.ToggleButtonModel -
    -JToolBar -
    -JToolBar.Separator -
    -JToolTip -
    -JTree -
    -JTree.DynamicUtilTreeNode -
    -JTree.EmptySelectionModel -
    -JViewport -
    -JWindow -
    -KerberosKey -
    -KerberosPrincipal -
    -KerberosTicket -
    -Kernel -
    -Key -
    -KeyAdapter -
    -KeyAgreement -
    -KeyAgreementSpi -
    -KeyAlreadyExistsException -
    -KeyboardFocusManager -
    -KeyEvent -
    -KeyEventDispatcher -
    -KeyEventPostProcessor -
    -KeyException -
    -KeyFactory -
    -KeyFactorySpi -
    -KeyGenerator -
    -KeyGeneratorSpi -
    -KeyListener -
    -KeyManagementException -
    -KeyManager -
    -KeyManagerFactory -
    -KeyManagerFactorySpi -
    -Keymap -
    -KeyPair -
    -KeyPairGenerator -
    -KeyPairGeneratorSpi -
    -KeyRep -
    -KeyRep.Type -
    -KeySpec -
    -KeyStore -
    -KeyStore.Builder -
    -KeyStore.CallbackHandlerProtection -
    -KeyStore.Entry -
    -KeyStore.LoadStoreParameter -
    -KeyStore.PasswordProtection -
    -KeyStore.PrivateKeyEntry -
    -KeyStore.ProtectionParameter -
    -KeyStore.SecretKeyEntry -
    -KeyStore.TrustedCertificateEntry -
    -KeyStoreBuilderParameters -
    -KeyStoreException -
    -KeyStoreSpi -
    -KeyStroke -
    -Label -
    -LabelUI -
    -LabelView -
    -LanguageCallback -
    -LastOwnerException -
    -LayeredHighlighter -
    -LayeredHighlighter.LayerPainter -
    -LayoutFocusTraversalPolicy -
    -LayoutManager -
    -LayoutManager2 -
    -LayoutQueue -
    -LDAPCertStoreParameters -
    -LdapContext -
    -LdapName -
    -LdapReferralException -
    -Lease -
    -Level -
    -LexicalHandler -
    -LIFESPAN_POLICY_ID -
    -LifespanPolicy -
    -LifespanPolicyOperations -
    -LifespanPolicyValue -
    -LimitExceededException -
    -Line -
    -Line.Info -
    -Line2D -
    -Line2D.Double -
    -Line2D.Float -
    -LineBorder -
    -LineBreakMeasurer -
    -LineEvent -
    -LineEvent.Type -
    -LineListener -
    -LineMetrics -
    -LineNumberInputStream -
    -LineNumberReader -
    -LineUnavailableException -
    -LinkageError -
    -LinkedBlockingQueue -
    -LinkedHashMap -
    -LinkedHashSet -
    -LinkedList -
    -LinkException -
    -LinkLoopException -
    -LinkRef -
    -List -
    -List -
    -ListCellRenderer -
    -ListDataEvent -
    -ListDataListener -
    -ListenerNotFoundException -
    -ListIterator -
    -ListModel -
    -ListResourceBundle -
    -ListSelectionEvent -
    -ListSelectionListener -
    -ListSelectionModel -
    -ListUI -
    -ListView -
    -LoaderHandler -
    -Locale -
    -LocalObject -
    -LocateRegistry -
    -LOCATION_FORWARD -
    -Locator -
    -Locator2 -
    -Locator2Impl -
    -LocatorImpl -
    -Lock -
    -LockSupport -
    -Logger -
    -LoggingMXBean -
    -LoggingPermission -
    -LoginContext -
    -LoginException -
    -LoginModule -
    -LogManager -
    -LogRecord -
    -LogStream -
    -Long -
    -LongBuffer -
    -LongHolder -
    -LongLongSeqHelper -
    -LongLongSeqHolder -
    -LongSeqHelper -
    -LongSeqHolder -
    -LookAndFeel -
    -LookupOp -
    -LookupTable -
    -LSException -
    -LSInput -
    -LSLoadEvent -
    -LSOutput -
    -LSParser -
    -LSParserFilter -
    -LSProgressEvent -
    -LSResourceResolver -
    -LSSerializer -
    -LSSerializerFilter -
    -Mac -
    -MacSpi -
    -MalformedInputException -
    -MalformedLinkException -
    -MalformedObjectNameException -
    -MalformedParameterizedTypeException -
    -MalformedURLException -
    -ManagementFactory -
    -ManagementPermission -
    -ManageReferralControl -
    -ManagerFactoryParameters -
    -Manifest -
    -Map -
    -Map.Entry -
    -MappedByteBuffer -
    -MARSHAL -
    -MarshalException -
    -MarshalledObject -
    -MaskFormatter -
    -Matcher -
    -MatchResult -
    -Math -
    -MathContext -
    -MatteBorder -
    -MBeanAttributeInfo -
    -MBeanConstructorInfo -
    -MBeanException -
    -MBeanFeatureInfo -
    -MBeanInfo -
    -MBeanNotificationInfo -
    -MBeanOperationInfo -
    -MBeanParameterInfo -
    -MBeanPermission -
    -MBeanRegistration -
    -MBeanRegistrationException -
    -MBeanServer -
    -MBeanServerBuilder -
    -MBeanServerConnection -
    -MBeanServerDelegate -
    -MBeanServerDelegateMBean -
    -MBeanServerFactory -
    -MBeanServerForwarder -
    -MBeanServerInvocationHandler -
    -MBeanServerNotification -
    -MBeanServerNotificationFilter -
    -MBeanServerPermission -
    -MBeanTrustPermission -
    -Media -
    -MediaName -
    -MediaPrintableArea -
    -MediaSize -
    -MediaSize.Engineering -
    -MediaSize.ISO -
    -MediaSize.JIS -
    -MediaSize.NA -
    -MediaSize.Other -
    -MediaSizeName -
    -MediaTracker -
    -MediaTray -
    -Member -
    -MemoryCacheImageInputStream -
    -MemoryCacheImageOutputStream -
    -MemoryHandler -
    -MemoryImageSource -
    -MemoryManagerMXBean -
    -MemoryMXBean -
    -MemoryNotificationInfo -
    -MemoryPoolMXBean -
    -MemoryType -
    -MemoryUsage -
    -Menu -
    -MenuBar -
    -MenuBarUI -
    -MenuComponent -
    -MenuContainer -
    -MenuDragMouseEvent -
    -MenuDragMouseListener -
    -MenuElement -
    -MenuEvent -
    -MenuItem -
    -MenuItemUI -
    -MenuKeyEvent -
    -MenuKeyListener -
    -MenuListener -
    -MenuSelectionManager -
    -MenuShortcut -
    -MessageDigest -
    -MessageDigestSpi -
    -MessageFormat -
    -MessageFormat.Field -
    -MessageProp -
    -MetaEventListener -
    -MetalBorders -
    -MetalBorders.ButtonBorder -
    -MetalBorders.Flush3DBorder -
    -MetalBorders.InternalFrameBorder -
    -MetalBorders.MenuBarBorder -
    -MetalBorders.MenuItemBorder -
    -MetalBorders.OptionDialogBorder -
    -MetalBorders.PaletteBorder -
    -MetalBorders.PopupMenuBorder -
    -MetalBorders.RolloverButtonBorder -
    -MetalBorders.ScrollPaneBorder -
    -MetalBorders.TableHeaderBorder -
    -MetalBorders.TextFieldBorder -
    -MetalBorders.ToggleButtonBorder -
    -MetalBorders.ToolBarBorder -
    -MetalButtonUI -
    -MetalCheckBoxIcon -
    -MetalCheckBoxUI -
    -MetalComboBoxButton -
    -MetalComboBoxEditor -
    -MetalComboBoxEditor.UIResource -
    -MetalComboBoxIcon -
    -MetalComboBoxUI -
    -MetalDesktopIconUI -
    -MetalFileChooserUI -
    -MetalIconFactory -
    -MetalIconFactory.FileIcon16 -
    -MetalIconFactory.FolderIcon16 -
    -MetalIconFactory.PaletteCloseIcon -
    -MetalIconFactory.TreeControlIcon -
    -MetalIconFactory.TreeFolderIcon -
    -MetalIconFactory.TreeLeafIcon -
    -MetalInternalFrameTitlePane -
    -MetalInternalFrameUI -
    -MetalLabelUI -
    -MetalLookAndFeel -
    -MetalMenuBarUI -
    -MetalPopupMenuSeparatorUI -
    -MetalProgressBarUI -
    -MetalRadioButtonUI -
    -MetalRootPaneUI -
    -MetalScrollBarUI -
    -MetalScrollButton -
    -MetalScrollPaneUI -
    -MetalSeparatorUI -
    -MetalSliderUI -
    -MetalSplitPaneUI -
    -MetalTabbedPaneUI -
    -MetalTextFieldUI -
    -MetalTheme -
    -MetalToggleButtonUI -
    -MetalToolBarUI -
    -MetalToolTipUI -
    -MetalTreeUI -
    -MetaMessage -
    -Method -
    -MethodDescriptor -
    -MGF1ParameterSpec -
    -MidiChannel -
    -MidiDevice -
    -MidiDevice.Info -
    -MidiDeviceProvider -
    -MidiEvent -
    -MidiFileFormat -
    -MidiFileReader -
    -MidiFileWriter -
    -MidiMessage -
    -MidiSystem -
    -MidiUnavailableException -
    -MimeTypeParseException -
    -MinimalHTMLWriter -
    -MissingFormatArgumentException -
    -MissingFormatWidthException -
    -MissingResourceException -
    -Mixer -
    -Mixer.Info -
    -MixerProvider -
    -MLet -
    -MLetMBean -
    -ModelMBean -
    -ModelMBeanAttributeInfo -
    -ModelMBeanConstructorInfo -
    -ModelMBeanInfo -
    -ModelMBeanInfoSupport -
    -ModelMBeanNotificationBroadcaster -
    -ModelMBeanNotificationInfo -
    -ModelMBeanOperationInfo -
    -ModificationItem -
    -Modifier -
    -Monitor -
    -MonitorMBean -
    -MonitorNotification -
    -MonitorSettingException -
    -MouseAdapter -
    -MouseDragGestureRecognizer -
    -MouseEvent -
    -MouseEvent -
    -MouseInfo -
    -MouseInputAdapter -
    -MouseInputListener -
    -MouseListener -
    -MouseMotionAdapter -
    -MouseMotionListener -
    -MouseWheelEvent -
    -MouseWheelListener -
    -MultiButtonUI -
    -MulticastSocket -
    -MultiColorChooserUI -
    -MultiComboBoxUI -
    -MultiDesktopIconUI -
    -MultiDesktopPaneUI -
    -MultiDoc -
    -MultiDocPrintJob -
    -MultiDocPrintService -
    -MultiFileChooserUI -
    -MultiInternalFrameUI -
    -MultiLabelUI -
    -MultiListUI -
    -MultiLookAndFeel -
    -MultiMenuBarUI -
    -MultiMenuItemUI -
    -MultiOptionPaneUI -
    -MultiPanelUI -
    -MultiPixelPackedSampleModel -
    -MultipleComponentProfileHelper -
    -MultipleComponentProfileHolder -
    -MultipleDocumentHandling -
    -MultipleMaster -
    -MultiPopupMenuUI -
    -MultiProgressBarUI -
    -MultiRootPaneUI -
    -MultiScrollBarUI -
    -MultiScrollPaneUI -
    -MultiSeparatorUI -
    -MultiSliderUI -
    -MultiSpinnerUI -
    -MultiSplitPaneUI -
    -MultiTabbedPaneUI -
    -MultiTableHeaderUI -
    -MultiTableUI -
    -MultiTextUI -
    -MultiToolBarUI -
    -MultiToolTipUI -
    -MultiTreeUI -
    -MultiViewportUI -
    -MutableAttributeSet -
    -MutableComboBoxModel -
    -MutableTreeNode -
    -MutationEvent -
    -Name -
    -NameAlreadyBoundException -
    -NameCallback -
    -NameClassPair -
    -NameComponent -
    -NameComponentHelper -
    -NameComponentHolder -
    -NamedNodeMap -
    -NamedValue -
    -NameDynAnyPair -
    -NameDynAnyPairHelper -
    -NameDynAnyPairSeqHelper -
    -NameHelper -
    -NameHolder -
    -NameList -
    -NameNotFoundException -
    -NameParser -
    -NamespaceChangeListener -
    -NamespaceContext -
    -NamespaceSupport -
    -NameValuePair -
    -NameValuePair -
    -NameValuePairHelper -
    -NameValuePairHelper -
    -NameValuePairSeqHelper -
    -Naming -
    -NamingContext -
    -NamingContextExt -
    -NamingContextExtHelper -
    -NamingContextExtHolder -
    -NamingContextExtOperations -
    -NamingContextExtPOA -
    -NamingContextHelper -
    -NamingContextHolder -
    -NamingContextOperations -
    -NamingContextPOA -
    -NamingEnumeration -
    -NamingEvent -
    -NamingException -
    -NamingExceptionEvent -
    -NamingListener -
    -NamingManager -
    -NamingSecurityException -
    -NavigationFilter -
    -NavigationFilter.FilterBypass -
    -NegativeArraySizeException -
    -NetPermission -
    -NetworkInterface -
    -NO_IMPLEMENT -
    -NO_MEMORY -
    -NO_PERMISSION -
    -NO_RESOURCES -
    -NO_RESPONSE -
    -NoClassDefFoundError -
    -NoConnectionPendingException -
    -NoContext -
    -NoContextHelper -
    -Node -
    -NodeChangeEvent -
    -NodeChangeListener -
    -NodeList -
    -NoInitialContextException -
    -NON_EXISTENT -
    -NoninvertibleTransformException -
    -NonReadableChannelException -
    -NonWritableChannelException -
    -NoPermissionException -
    -NoRouteToHostException -
    -NoServant -
    -NoServantHelper -
    -NoSuchAlgorithmException -
    -NoSuchAttributeException -
    -NoSuchElementException -
    -NoSuchFieldError -
    -NoSuchFieldException -
    -NoSuchMethodError -
    -NoSuchMethodException -
    -NoSuchObjectException -
    -NoSuchPaddingException -
    -NoSuchProviderException -
    -NotActiveException -
    -Notation -
    -NotBoundException -
    -NotCompliantMBeanException -
    -NotContextException -
    -NotEmpty -
    -NotEmptyHelper -
    -NotEmptyHolder -
    -NotFound -
    -NotFoundHelper -
    -NotFoundHolder -
    -NotFoundReason -
    -NotFoundReasonHelper -
    -NotFoundReasonHolder -
    -Notification -
    -NotificationBroadcaster -
    -NotificationBroadcasterSupport -
    -NotificationEmitter -
    -NotificationFilter -
    -NotificationFilterSupport -
    -NotificationListener -
    -NotificationResult -
    -NotOwnerException -
    -NotSerializableException -
    -NotYetBoundException -
    -NotYetConnectedException -
    -NullCipher -
    -NullPointerException -
    -Number -
    -NumberFormat -
    -NumberFormat.Field -
    -NumberFormatException -
    -NumberFormatter -
    -NumberOfDocuments -
    -NumberOfInterveningJobs -
    -NumberUp -
    -NumberUpSupported -
    -NumericShaper -
    -NVList -
    -OAEPParameterSpec -
    -OBJ_ADAPTER -
    -Object -
    -Object -
    -OBJECT_NOT_EXIST -
    -ObjectAlreadyActive -
    -ObjectAlreadyActiveHelper -
    -ObjectChangeListener -
    -ObjectFactory -
    -ObjectFactoryBuilder -
    -ObjectHelper -
    -ObjectHolder -
    -ObjectIdHelper -
    -ObjectIdHelper -
    -ObjectImpl -
    -ObjectImpl -
    -ObjectInput -
    -ObjectInputStream -
    -ObjectInputStream.GetField -
    -ObjectInputValidation -
    -ObjectInstance -
    -ObjectName -
    -ObjectNotActive -
    -ObjectNotActiveHelper -
    -ObjectOutput -
    -ObjectOutputStream -
    -ObjectOutputStream.PutField -
    -ObjectReferenceFactory -
    -ObjectReferenceFactoryHelper -
    -ObjectReferenceFactoryHolder -
    -ObjectReferenceTemplate -
    -ObjectReferenceTemplateHelper -
    -ObjectReferenceTemplateHolder -
    -ObjectReferenceTemplateSeqHelper -
    -ObjectReferenceTemplateSeqHolder -
    -ObjectStreamClass -
    -ObjectStreamConstants -
    -ObjectStreamException -
    -ObjectStreamField -
    -ObjectView -
    -ObjID -
    -Observable -
    -Observer -
    -OceanTheme -
    -OctetSeqHelper -
    -OctetSeqHolder -
    -Oid -
    -OMGVMCID -
    -OpenDataException -
    -OpenMBeanAttributeInfo -
    -OpenMBeanAttributeInfoSupport -
    -OpenMBeanConstructorInfo -
    -OpenMBeanConstructorInfoSupport -
    -OpenMBeanInfo -
    -OpenMBeanInfoSupport -
    -OpenMBeanOperationInfo -
    -OpenMBeanOperationInfoSupport -
    -OpenMBeanParameterInfo -
    -OpenMBeanParameterInfoSupport -
    -OpenType -
    -OpenType -
    -OperatingSystemMXBean -
    -Operation -
    -OperationNotSupportedException -
    -OperationsException -
    -Option -
    -OptionalDataException -
    -OptionPaneUI -
    -ORB -
    -ORB -
    -ORBIdHelper -
    -ORBInitializer -
    -ORBInitializerOperations -
    -ORBInitInfo -
    -ORBInitInfoOperations -
    -OrientationRequested -
    -OutOfMemoryError -
    -OutputDeviceAssigned -
    -OutputKeys -
    -OutputStream -
    -OutputStream -
    -OutputStream -
    -OutputStreamWriter -
    -OverlappingFileLockException -
    -OverlayLayout -
    -Override -
    -Owner -
    -Pack200 -
    -Pack200.Packer -
    -Pack200.Unpacker -
    -Package -
    -PackedColorModel -
    -Pageable -
    -PageAttributes -
    -PageAttributes.ColorType -
    -PageAttributes.MediaType -
    -PageAttributes.OrientationRequestedType -
    -PageAttributes.OriginType -
    -PageAttributes.PrintQualityType -
    -PagedResultsControl -
    -PagedResultsResponseControl -
    -PageFormat -
    -PageRanges -
    -PagesPerMinute -
    -PagesPerMinuteColor -
    -Paint -
    -PaintContext -
    -PaintEvent -
    -Panel -
    -PanelUI -
    -Paper -
    -ParagraphView -
    -ParagraphView -
    -Parameter -
    -ParameterBlock -
    -ParameterDescriptor -
    -ParameterizedType -
    -ParameterMetaData -
    -ParameterMode -
    -ParameterModeHelper -
    -ParameterModeHolder -
    -ParseException -
    -ParsePosition -
    -Parser -
    -Parser -
    -ParserAdapter -
    -ParserConfigurationException -
    -ParserDelegator -
    -ParserFactory -
    -PartialResultException -
    -PasswordAuthentication -
    -PasswordCallback -
    -PasswordView -
    -Patch -
    -PathIterator -
    -Pattern -
    -PatternSyntaxException -
    -PBEKey -
    -PBEKeySpec -
    -PBEParameterSpec -
    -PDLOverrideSupported -
    -Permission -
    -Permission -
    -PermissionCollection -
    -Permissions -
    -PERSIST_STORE -
    -PersistenceDelegate -
    -PersistentMBean -
    -PhantomReference -
    -Pipe -
    -Pipe.SinkChannel -
    -Pipe.SourceChannel -
    -PipedInputStream -
    -PipedOutputStream -
    -PipedReader -
    -PipedWriter -
    -PixelGrabber -
    -PixelInterleavedSampleModel -
    -PKCS8EncodedKeySpec -
    -PKIXBuilderParameters -
    -PKIXCertPathBuilderResult -
    -PKIXCertPathChecker -
    -PKIXCertPathValidatorResult -
    -PKIXParameters -
    -PlainDocument -
    -PlainView -
    -POA -
    -POAHelper -
    -POAManager -
    -POAManagerOperations -
    -POAOperations -
    -Point -
    -Point2D -
    -Point2D.Double -
    -Point2D.Float -
    -PointerInfo -
    -Policy -
    -Policy -
    -Policy -
    -PolicyError -
    -PolicyErrorCodeHelper -
    -PolicyErrorHelper -
    -PolicyErrorHolder -
    -PolicyFactory -
    -PolicyFactoryOperations -
    -PolicyHelper -
    -PolicyHolder -
    -PolicyListHelper -
    -PolicyListHolder -
    -PolicyNode -
    -PolicyOperations -
    -PolicyQualifierInfo -
    -PolicyTypeHelper -
    -Polygon -
    -PooledConnection -
    -Popup -
    -PopupFactory -
    -PopupMenu -
    -PopupMenuEvent -
    -PopupMenuListener -
    -PopupMenuUI -
    -Port -
    -Port.Info -
    -PortableRemoteObject -
    -PortableRemoteObjectDelegate -
    -PortUnreachableException -
    -Position -
    -Position.Bias -
    -Predicate -
    -PreferenceChangeEvent -
    -PreferenceChangeListener -
    -Preferences -
    -PreferencesFactory -
    -PreparedStatement -
    -PresentationDirection -
    -Principal -
    -Principal -
    -PrincipalHolder -
    -Printable -
    -PrinterAbortException -
    -PrinterException -
    -PrinterGraphics -
    -PrinterInfo -
    -PrinterIOException -
    -PrinterIsAcceptingJobs -
    -PrinterJob -
    -PrinterLocation -
    -PrinterMakeAndModel -
    -PrinterMessageFromOperator -
    -PrinterMoreInfo -
    -PrinterMoreInfoManufacturer -
    -PrinterName -
    -PrinterResolution -
    -PrinterState -
    -PrinterStateReason -
    -PrinterStateReasons -
    -PrinterURI -
    -PrintEvent -
    -PrintException -
    -PrintGraphics -
    -PrintJob -
    -PrintJobAdapter -
    -PrintJobAttribute -
    -PrintJobAttributeEvent -
    -PrintJobAttributeListener -
    -PrintJobAttributeSet -
    -PrintJobEvent -
    -PrintJobListener -
    -PrintQuality -
    -PrintRequestAttribute -
    -PrintRequestAttributeSet -
    -PrintService -
    -PrintServiceAttribute -
    -PrintServiceAttributeEvent -
    -PrintServiceAttributeListener -
    -PrintServiceAttributeSet -
    -PrintServiceLookup -
    -PrintStream -
    -PrintWriter -
    -PriorityBlockingQueue -
    -PriorityQueue -
    -PRIVATE_MEMBER -
    -PrivateClassLoader -
    -PrivateCredentialPermission -
    -PrivateKey -
    -PrivateMLet -
    -PrivilegedAction -
    -PrivilegedActionException -
    -PrivilegedExceptionAction -
    -Process -
    -ProcessBuilder -
    -ProcessingInstruction -
    -ProfileDataException -
    -ProfileIdHelper -
    -ProgressBarUI -
    -ProgressMonitor -
    -ProgressMonitorInputStream -
    -Properties -
    -PropertyChangeEvent -
    -PropertyChangeListener -
    -PropertyChangeListenerProxy -
    -PropertyChangeSupport -
    -PropertyDescriptor -
    -PropertyEditor -
    -PropertyEditorManager -
    -PropertyEditorSupport -
    -PropertyPermission -
    -PropertyResourceBundle -
    -PropertyVetoException -
    -ProtectionDomain -
    -ProtocolException -
    -Provider -
    -Provider.Service -
    -ProviderException -
    -Proxy -
    -Proxy -
    -Proxy.Type -
    -ProxySelector -
    -PSource -
    -PSource.PSpecified -
    -PSSParameterSpec -
    -PUBLIC_MEMBER -
    -PublicKey -
    -PushbackInputStream -
    -PushbackReader -
    -QName -
    -QuadCurve2D -
    -QuadCurve2D.Double -
    -QuadCurve2D.Float -
    -Query -
    -QueryEval -
    -QueryExp -
    -Queue -
    -QueuedJobCount -
    -Random -
    -RandomAccess -
    -RandomAccessFile -
    -Raster -
    -RasterFormatException -
    -RasterOp -
    -RC2ParameterSpec -
    -RC5ParameterSpec -
    -Rdn -
    -Readable -
    -ReadableByteChannel -
    -Reader -
    -ReadOnlyBufferException -
    -ReadWriteLock -
    -RealmCallback -
    -RealmChoiceCallback -
    -REBIND -
    -Receiver -
    -Rectangle -
    -Rectangle2D -
    -Rectangle2D.Double -
    -Rectangle2D.Float -
    -RectangularShape -
    -ReentrantLock -
    -ReentrantReadWriteLock -
    -ReentrantReadWriteLock.ReadLock -
    -ReentrantReadWriteLock.WriteLock -
    -Ref -
    -RefAddr -
    -Reference -
    -Reference -
    -Referenceable -
    -ReferenceQueue -
    -ReferenceUriSchemesSupported -
    -ReferralException -
    -ReflectionException -
    -ReflectPermission -
    -Refreshable -
    -RefreshFailedException -
    -Region -
    -RegisterableService -
    -Registry -
    -RegistryHandler -
    -RejectedExecutionException -
    -RejectedExecutionHandler -
    -Relation -
    -RelationException -
    -RelationNotFoundException -
    -RelationNotification -
    -RelationService -
    -RelationServiceMBean -
    -RelationServiceNotRegisteredException -
    -RelationSupport -
    -RelationSupportMBean -
    -RelationType -
    -RelationTypeNotFoundException -
    -RelationTypeSupport -
    -RemarshalException -
    -Remote -
    -RemoteCall -
    -RemoteException -
    -RemoteObject -
    -RemoteObjectInvocationHandler -
    -RemoteRef -
    -RemoteServer -
    -RemoteStub -
    -RenderableImage -
    -RenderableImageOp -
    -RenderableImageProducer -
    -RenderContext -
    -RenderedImage -
    -RenderedImageFactory -
    -Renderer -
    -RenderingHints -
    -RenderingHints.Key -
    -RepaintManager -
    -ReplicateScaleFilter -
    -RepositoryIdHelper -
    -Request -
    -REQUEST_PROCESSING_POLICY_ID -
    -RequestInfo -
    -RequestInfoOperations -
    -RequestingUserName -
    -RequestProcessingPolicy -
    -RequestProcessingPolicyOperations -
    -RequestProcessingPolicyValue -
    -RequiredModelMBean -
    -RescaleOp -
    -ResolutionSyntax -
    -Resolver -
    -ResolveResult -
    -ResourceBundle -
    -ResponseCache -
    -ResponseHandler -
    -Result -
    -ResultSet -
    -ResultSetMetaData -
    -Retention -
    -RetentionPolicy -
    -ReverbType -
    -RGBImageFilter -
    -RMIClassLoader -
    -RMIClassLoaderSpi -
    -RMIClientSocketFactory -
    -RMIConnection -
    -RMIConnectionImpl -
    -RMIConnectionImpl_Stub -
    -RMIConnector -
    -RMIConnectorServer -
    -RMICustomMaxStreamFormat -
    -RMIFailureHandler -
    -RMIIIOPServerImpl -
    -RMIJRMPServerImpl -
    -RMISecurityException -
    -RMISecurityManager -
    -RMIServer -
    -RMIServerImpl -
    -RMIServerImpl_Stub -
    -RMIServerSocketFactory -
    -RMISocketFactory -
    -Robot -
    -Role -
    -RoleInfo -
    -RoleInfoNotFoundException -
    -RoleList -
    -RoleNotFoundException -
    -RoleResult -
    -RoleStatus -
    -RoleUnresolved -
    -RoleUnresolvedList -
    -RootPaneContainer -
    -RootPaneUI -
    -RoundingMode -
    -RoundRectangle2D -
    -RoundRectangle2D.Double -
    -RoundRectangle2D.Float -
    -RowMapper -
    -RowSet -
    -RowSetEvent -
    -RowSetInternal -
    -RowSetListener -
    -RowSetMetaData -
    -RowSetMetaDataImpl -
    -RowSetReader -
    -RowSetWarning -
    -RowSetWriter -
    -RSAKey -
    -RSAKeyGenParameterSpec -
    -RSAMultiPrimePrivateCrtKey -
    -RSAMultiPrimePrivateCrtKeySpec -
    -RSAOtherPrimeInfo -
    -RSAPrivateCrtKey -
    -RSAPrivateCrtKeySpec -
    -RSAPrivateKey -
    -RSAPrivateKeySpec -
    -RSAPublicKey -
    -RSAPublicKeySpec -
    -RTFEditorKit -
    -RuleBasedCollator -
    -Runnable -
    -Runtime -
    -RunTime -
    -RuntimeErrorException -
    -RuntimeException -
    -RuntimeMBeanException -
    -RuntimeMXBean -
    -RunTimeOperations -
    -RuntimeOperationsException -
    -RuntimePermission -
    -SampleModel -
    -Sasl -
    -SaslClient -
    -SaslClientFactory -
    -SaslException -
    -SaslServer -
    -SaslServerFactory -
    -Savepoint -
    -SAXException -
    -SAXNotRecognizedException -
    -SAXNotSupportedException -
    -SAXParseException -
    -SAXParser -
    -SAXParserFactory -
    -SAXResult -
    -SAXSource -
    -SAXTransformerFactory -
    -Scanner -
    -ScatteringByteChannel -
    -ScheduledExecutorService -
    -ScheduledFuture -
    -ScheduledThreadPoolExecutor -
    -Schema -
    -SchemaFactory -
    -SchemaFactoryLoader -
    -SchemaViolationException -
    -Scrollable -
    -Scrollbar -
    -ScrollBarUI -
    -ScrollPane -
    -ScrollPaneAdjustable -
    -ScrollPaneConstants -
    -ScrollPaneLayout -
    -ScrollPaneLayout.UIResource -
    -ScrollPaneUI -
    -SealedObject -
    -SearchControls -
    -SearchResult -
    -SecretKey -
    -SecretKeyFactory -
    -SecretKeyFactorySpi -
    -SecretKeySpec -
    -SecureCacheResponse -
    -SecureClassLoader -
    -SecureRandom -
    -SecureRandomSpi -
    -Security -
    -SecurityException -
    -SecurityManager -
    -SecurityPermission -
    -Segment -
    -SelectableChannel -
    -SelectionKey -
    -Selector -
    -SelectorProvider -
    -Semaphore -
    -SeparatorUI -
    -Sequence -
    -SequenceInputStream -
    -Sequencer -
    -Sequencer.SyncMode -
    -SerialArray -
    -SerialBlob -
    -SerialClob -
    -SerialDatalink -
    -SerialException -
    -Serializable -
    -SerializablePermission -
    -SerialJavaObject -
    -SerialRef -
    -SerialStruct -
    -Servant -
    -SERVANT_RETENTION_POLICY_ID -
    -ServantActivator -
    -ServantActivatorHelper -
    -ServantActivatorOperations -
    -ServantActivatorPOA -
    -ServantAlreadyActive -
    -ServantAlreadyActiveHelper -
    -ServantLocator -
    -ServantLocatorHelper -
    -ServantLocatorOperations -
    -ServantLocatorPOA -
    -ServantManager -
    -ServantManagerOperations -
    -ServantNotActive -
    -ServantNotActiveHelper -
    -ServantObject -
    -ServantRetentionPolicy -
    -ServantRetentionPolicyOperations -
    -ServantRetentionPolicyValue -
    -ServerCloneException -
    -ServerError -
    -ServerException -
    -ServerIdHelper -
    -ServerNotActiveException -
    -ServerRef -
    -ServerRequest -
    -ServerRequestInfo -
    -ServerRequestInfoOperations -
    -ServerRequestInterceptor -
    -ServerRequestInterceptorOperations -
    -ServerRuntimeException -
    -ServerSocket -
    -ServerSocketChannel -
    -ServerSocketFactory -
    -ServiceContext -
    -ServiceContextHelper -
    -ServiceContextHolder -
    -ServiceContextListHelper -
    -ServiceContextListHolder -
    -ServiceDetail -
    -ServiceDetailHelper -
    -ServiceIdHelper -
    -ServiceInformation -
    -ServiceInformationHelper -
    -ServiceInformationHolder -
    -ServiceNotFoundException -
    -ServicePermission -
    -ServiceRegistry -
    -ServiceRegistry.Filter -
    -ServiceUI -
    -ServiceUIFactory -
    -ServiceUnavailableException -
    -Set -
    -SetOfIntegerSyntax -
    -SetOverrideType -
    -SetOverrideTypeHelper -
    -Severity -
    -Shape -
    -ShapeGraphicAttribute -
    -SheetCollate -
    -Short -
    -ShortBuffer -
    -ShortBufferException -
    -ShortHolder -
    -ShortLookupTable -
    -ShortMessage -
    -ShortSeqHelper -
    -ShortSeqHolder -
    -Sides -
    -Signature -
    -SignatureException -
    -SignatureSpi -
    -SignedObject -
    -Signer -
    -SimpleAttributeSet -
    -SimpleBeanInfo -
    -SimpleDateFormat -
    -SimpleDoc -
    -SimpleFormatter -
    -SimpleTimeZone -
    -SimpleType -
    -SinglePixelPackedSampleModel -
    -SingleSelectionModel -
    -Size2DSyntax -
    -SizeLimitExceededException -
    -SizeRequirements -
    -SizeSequence -
    -Skeleton -
    -SkeletonMismatchException -
    -SkeletonNotFoundException -
    -SliderUI -
    -Socket -
    -SocketAddress -
    -SocketChannel -
    -SocketException -
    -SocketFactory -
    -SocketHandler -
    -SocketImpl -
    -SocketImplFactory -
    -SocketOptions -
    -SocketPermission -
    -SocketSecurityException -
    -SocketTimeoutException -
    -SoftBevelBorder -
    -SoftReference -
    -SortControl -
    -SortedMap -
    -SortedSet -
    -SortingFocusTraversalPolicy -
    -SortKey -
    -SortResponseControl -
    -Soundbank -
    -SoundbankReader -
    -SoundbankResource -
    -Source -
    -SourceDataLine -
    -SourceLocator -
    -SpinnerDateModel -
    -SpinnerListModel -
    -SpinnerModel -
    -SpinnerNumberModel -
    -SpinnerUI -
    -SplitPaneUI -
    -Spring -
    -SpringLayout -
    -SpringLayout.Constraints -
    -SQLData -
    -SQLException -
    -SQLInput -
    -SQLInputImpl -
    -SQLOutput -
    -SQLOutputImpl -
    -SQLPermission -
    -SQLWarning -
    -SSLContext -
    -SSLContextSpi -
    -SSLEngine -
    -SSLEngineResult -
    -SSLEngineResult.HandshakeStatus -
    -SSLEngineResult.Status -
    -SSLException -
    -SSLHandshakeException -
    -SSLKeyException -
    -SSLPeerUnverifiedException -
    -SSLPermission -
    -SSLProtocolException -
    -SslRMIClientSocketFactory -
    -SslRMIServerSocketFactory -
    -SSLServerSocket -
    -SSLServerSocketFactory -
    -SSLSession -
    -SSLSessionBindingEvent -
    -SSLSessionBindingListener -
    -SSLSessionContext -
    -SSLSocket -
    -SSLSocketFactory -
    -Stack -
    -StackOverflowError -
    -StackTraceElement -
    -StandardMBean -
    -StartTlsRequest -
    -StartTlsResponse -
    -State -
    -StateEdit -
    -StateEditable -
    -StateFactory -
    -Statement -
    -Statement -
    -Streamable -
    -StreamableValue -
    -StreamCorruptedException -
    -StreamHandler -
    -StreamPrintService -
    -StreamPrintServiceFactory -
    -StreamResult -
    -StreamSource -
    -StreamTokenizer -
    -StrictMath -
    -String -
    -StringBuffer -
    -StringBufferInputStream -
    -StringBuilder -
    -StringCharacterIterator -
    -StringContent -
    -StringHolder -
    -StringIndexOutOfBoundsException -
    -StringMonitor -
    -StringMonitorMBean -
    -StringNameHelper -
    -StringReader -
    -StringRefAddr -
    -StringSelection -
    -StringSeqHelper -
    -StringSeqHolder -
    -StringTokenizer -
    -StringValueExp -
    -StringValueHelper -
    -StringWriter -
    -Stroke -
    -Struct -
    -StructMember -
    -StructMemberHelper -
    -Stub -
    -StubDelegate -
    -StubNotFoundException -
    -Style -
    -StyleConstants -
    -StyleConstants.CharacterConstants -
    -StyleConstants.ColorConstants -
    -StyleConstants.FontConstants -
    -StyleConstants.ParagraphConstants -
    -StyleContext -
    -StyledDocument -
    -StyledEditorKit -
    -StyledEditorKit.AlignmentAction -
    -StyledEditorKit.BoldAction -
    -StyledEditorKit.FontFamilyAction -
    -StyledEditorKit.FontSizeAction -
    -StyledEditorKit.ForegroundAction -
    -StyledEditorKit.ItalicAction -
    -StyledEditorKit.StyledTextAction -
    -StyledEditorKit.UnderlineAction -
    -StyleSheet -
    -StyleSheet.BoxPainter -
    -StyleSheet.ListPainter -
    -Subject -
    -SubjectDelegationPermission -
    -SubjectDomainCombiner -
    -SUCCESSFUL -
    -SupportedValuesAttribute -
    -SuppressWarnings -
    -SwingConstants -
    -SwingPropertyChangeSupport -
    -SwingUtilities -
    -SYNC_WITH_TRANSPORT -
    -SyncFactory -
    -SyncFactoryException -
    -SyncFailedException -
    -SynchronousQueue -
    -SyncProvider -
    -SyncProviderException -
    -SyncResolver -
    -SyncScopeHelper -
    -SynthConstants -
    -SynthContext -
    -Synthesizer -
    -SynthGraphicsUtils -
    -SynthLookAndFeel -
    -SynthPainter -
    -SynthStyle -
    -SynthStyleFactory -
    -SysexMessage -
    -System -
    -SYSTEM_EXCEPTION -
    -SystemColor -
    -SystemException -
    -SystemFlavorMap -
    -TabableView -
    -TabbedPaneUI -
    -TabExpander -
    -TableCellEditor -
    -TableCellRenderer -
    -TableColumn -
    -TableColumnModel -
    -TableColumnModelEvent -
    -TableColumnModelListener -
    -TableHeaderUI -
    -TableModel -
    -TableModelEvent -
    -TableModelListener -
    -TableUI -
    -TableView -
    -TabSet -
    -TabStop -
    -TabularData -
    -TabularDataSupport -
    -TabularType -
    -TAG_ALTERNATE_IIOP_ADDRESS -
    -TAG_CODE_SETS -
    -TAG_INTERNET_IOP -
    -TAG_JAVA_CODEBASE -
    -TAG_MULTIPLE_COMPONENTS -
    -TAG_ORB_TYPE -
    -TAG_POLICIES -
    -TAG_RMI_CUSTOM_MAX_STREAM_FORMAT -
    -TagElement -
    -TaggedComponent -
    -TaggedComponentHelper -
    -TaggedComponentHolder -
    -TaggedProfile -
    -TaggedProfileHelper -
    -TaggedProfileHolder -
    -Target -
    -TargetDataLine -
    -TargetedNotification -
    -TCKind -
    -Templates -
    -TemplatesHandler -
    -Text -
    -TextAction -
    -TextArea -
    -TextAttribute -
    -TextComponent -
    -TextEvent -
    -TextField -
    -TextHitInfo -
    -TextInputCallback -
    -TextLayout -
    -TextLayout.CaretPolicy -
    -TextListener -
    -TextMeasurer -
    -TextOutputCallback -
    -TextSyntax -
    -TextUI -
    -TexturePaint -
    -Thread -
    -Thread.State -
    -Thread.UncaughtExceptionHandler -
    -THREAD_POLICY_ID -
    -ThreadDeath -
    -ThreadFactory -
    -ThreadGroup -
    -ThreadInfo -
    -ThreadLocal -
    -ThreadMXBean -
    -ThreadPolicy -
    -ThreadPolicyOperations -
    -ThreadPolicyValue -
    -ThreadPoolExecutor -
    -ThreadPoolExecutor.AbortPolicy -
    -ThreadPoolExecutor.CallerRunsPolicy -
    -ThreadPoolExecutor.DiscardOldestPolicy -
    -ThreadPoolExecutor.DiscardPolicy -
    -Throwable -
    -Tie -
    -TileObserver -
    -Time -
    -TimeLimitExceededException -
    -TIMEOUT -
    -TimeoutException -
    -Timer -
    -Timer -
    -Timer -
    -TimerAlarmClockNotification -
    -TimerMBean -
    -TimerNotification -
    -TimerTask -
    -Timestamp -
    -Timestamp -
    -TimeUnit -
    -TimeZone -
    -TitledBorder -
    -ToolBarUI -
    -Toolkit -
    -ToolTipManager -
    -ToolTipUI -
    -TooManyListenersException -
    -Track -
    -TRANSACTION_MODE -
    -TRANSACTION_REQUIRED -
    -TRANSACTION_ROLLEDBACK -
    -TRANSACTION_UNAVAILABLE -
    -TransactionalWriter -
    -TransactionRequiredException -
    -TransactionRolledbackException -
    -TransactionService -
    -Transferable -
    -TransferHandler -
    -TransformAttribute -
    -Transformer -
    -TransformerConfigurationException -
    -TransformerException -
    -TransformerFactory -
    -TransformerFactoryConfigurationError -
    -TransformerHandler -
    -TRANSIENT -
    -Transmitter -
    -Transparency -
    -TRANSPORT_RETRY -
    -TreeCellEditor -
    -TreeCellRenderer -
    -TreeExpansionEvent -
    -TreeExpansionListener -
    -TreeMap -
    -TreeModel -
    -TreeModelEvent -
    -TreeModelListener -
    -TreeNode -
    -TreePath -
    -TreeSelectionEvent -
    -TreeSelectionListener -
    -TreeSelectionModel -
    -TreeSet -
    -TreeUI -
    -TreeWillExpandListener -
    -TrustAnchor -
    -TrustManager -
    -TrustManagerFactory -
    -TrustManagerFactorySpi -
    -Type -
    -TypeCode -
    -TypeCodeHolder -
    -TypeInfo -
    -TypeInfoProvider -
    -TypeMismatch -
    -TypeMismatch -
    -TypeMismatch -
    -TypeMismatchHelper -
    -TypeMismatchHelper -
    -TypeNotPresentException -
    -Types -
    -TypeVariable -
    -UID -
    -UIDefaults -
    -UIDefaults.ActiveValue -
    -UIDefaults.LazyInputMap -
    -UIDefaults.LazyValue -
    -UIDefaults.ProxyLazyValue -
    -UIEvent -
    -UIManager -
    -UIManager.LookAndFeelInfo -
    -UIResource -
    -ULongLongSeqHelper -
    -ULongLongSeqHolder -
    -ULongSeqHelper -
    -ULongSeqHolder -
    -UndeclaredThrowableException -
    -UndoableEdit -
    -UndoableEditEvent -
    -UndoableEditListener -
    -UndoableEditSupport -
    -UndoManager -
    -UnexpectedException -
    -UnicastRemoteObject -
    -UnionMember -
    -UnionMemberHelper -
    -UNKNOWN -
    -UNKNOWN -
    -UnknownEncoding -
    -UnknownEncodingHelper -
    -UnknownError -
    -UnknownException -
    -UnknownFormatConversionException -
    -UnknownFormatFlagsException -
    -UnknownGroupException -
    -UnknownHostException -
    -UnknownHostException -
    -UnknownObjectException -
    -UnknownServiceException -
    -UnknownUserException -
    -UnknownUserExceptionHelper -
    -UnknownUserExceptionHolder -
    -UnmappableCharacterException -
    -UnmarshalException -
    -UnmodifiableClassException -
    -UnmodifiableSetException -
    -UnrecoverableEntryException -
    -UnrecoverableKeyException -
    -Unreferenced -
    -UnresolvedAddressException -
    -UnresolvedPermission -
    -UnsatisfiedLinkError -
    -UnsolicitedNotification -
    -UnsolicitedNotificationEvent -
    -UnsolicitedNotificationListener -
    -UNSUPPORTED_POLICY -
    -UNSUPPORTED_POLICY_VALUE -
    -UnsupportedAddressTypeException -
    -UnsupportedAudioFileException -
    -UnsupportedCallbackException -
    -UnsupportedCharsetException -
    -UnsupportedClassVersionError -
    -UnsupportedEncodingException -
    -UnsupportedFlavorException -
    -UnsupportedLookAndFeelException -
    -UnsupportedOperationException -
    -URI -
    -URIException -
    -URIResolver -
    -URISyntax -
    -URISyntaxException -
    -URL -
    -URLClassLoader -
    -URLConnection -
    -URLDecoder -
    -URLEncoder -
    -URLStreamHandler -
    -URLStreamHandlerFactory -
    -URLStringHelper -
    -USER_EXCEPTION -
    -UserDataHandler -
    -UserException -
    -UShortSeqHelper -
    -UShortSeqHolder -
    -UTFDataFormatException -
    -Util -
    -UtilDelegate -
    -Utilities -
    -UUID -
    -Validator -
    -ValidatorHandler -
    -ValueBase -
    -ValueBaseHelper -
    -ValueBaseHolder -
    -ValueExp -
    -ValueFactory -
    -ValueHandler -
    -ValueHandlerMultiFormat -
    -ValueInputStream -
    -ValueMember -
    -ValueMemberHelper -
    -ValueOutputStream -
    -VariableHeightLayoutCache -
    -Vector -
    -VerifyError -
    -VersionSpecHelper -
    -VetoableChangeListener -
    -VetoableChangeListenerProxy -
    -VetoableChangeSupport -
    -View -
    -ViewFactory -
    -ViewportLayout -
    -ViewportUI -
    -VirtualMachineError -
    -Visibility -
    -VisibilityHelper -
    -VM_ABSTRACT -
    -VM_CUSTOM -
    -VM_NONE -
    -VM_TRUNCATABLE -
    -VMID -
    -VoiceStatus -
    -Void -
    -VolatileImage -
    -WCharSeqHelper -
    -WCharSeqHolder -
    -WeakHashMap -
    -WeakReference -
    -WebRowSet -
    -WildcardType -
    -Window -
    -WindowAdapter -
    -WindowConstants -
    -WindowEvent -
    -WindowFocusListener -
    -WindowListener -
    -WindowStateListener -
    -WrappedPlainView -
    -WritableByteChannel -
    -WritableRaster -
    -WritableRenderedImage -
    -WriteAbortedException -
    -Writer -
    -WrongAdapter -
    -WrongAdapterHelper -
    -WrongPolicy -
    -WrongPolicyHelper -
    -WrongTransaction -
    -WrongTransactionHelper -
    -WrongTransactionHolder -
    -WStringSeqHelper -
    -WStringSeqHolder -
    -WStringValueHelper -
    -X500Principal -
    -X500PrivateCredential -
    -X509Certificate -
    -X509Certificate -
    -X509CertSelector -
    -X509CRL -
    -X509CRLEntry -
    -X509CRLSelector -
    -X509EncodedKeySpec -
    -X509ExtendedKeyManager -
    -X509Extension -
    -X509KeyManager -
    -X509TrustManager -
    -XAConnection -
    -XADataSource -
    -XAException -
    -XAResource -
    -Xid -
    -XMLConstants -
    -XMLDecoder -
    -XMLEncoder -
    -XMLFilter -
    -XMLFilterImpl -
    -XMLFormatter -
    -XMLGregorianCalendar -
    -XMLParseException -
    -XmlReader -
    -XMLReader -
    -XMLReaderAdapter -
    -XMLReaderFactory -
    -XmlWriter -
    -XPath -
    -XPathConstants -
    -XPathException -
    -XPathExpression -
    -XPathExpressionException -
    -XPathFactory -
    -XPathFactoryConfigurationException -
    -XPathFunction -
    -XPathFunctionException -
    -XPathFunctionResolver -
    -XPathVariableResolver -
    -ZipEntry -
    -ZipException -
    -ZipFile -
    -ZipInputStream -
    -ZipOutputStream -
    -ZoneView -
    -_BindingIteratorImplBase -
    -_BindingIteratorStub -
    -_DynAnyFactoryStub -
    -_DynAnyStub -
    -_DynArrayStub -
    -_DynEnumStub -
    -_DynFixedStub -
    -_DynSequenceStub -
    -_DynStructStub -
    -_DynUnionStub -
    -_DynValueStub -
    -_IDLTypeStub -
    -_NamingContextExtStub -
    -_NamingContextImplBase -
    -_NamingContextStub -
    -_PolicyStub -
    -_Remote_Stub -
    -_ServantActivatorStub -
    -_ServantLocatorStub -
    -
    - - - diff --git a/tests/textcode/data/markup/chinese.htm b/tests/textcode/data/markup/chinese.htm deleted file mode 100644 index 4058799f873..00000000000 --- a/tests/textcode/data/markup/chinese.htm +++ /dev/null @@ -1,769 +0,0 @@ - - - - - - - - Ͱ1688.com - ȫȵIJɹƽ̨ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - -
    -
    -
    - ֻ -
    - -
    -
      -
    • - - -
    • -
    • - - -
    • -
    • - - -
    • -
    • - - -
    • -
    • - - -
    • -
    • - - -
    • -
    • - - -
    • -
    -
    -
    -
    -
    - -
    ͰйվԱԱʺϵͰͷɵ¼ͬʱ¼ɹ鿴>>
    -
    -
    -
    -
    - -
    - -
    -
    - - - - -   ֻ - - - ѯ۵ - -
    - - - -
    -
    - - - - - -
    - - -
    -

    ҵг

    - - ҸȤҵ -
    -
    -
    - -
    - -
    - - -
    - -
    - -
    - -
    - -
    - -
    - - - - -
    - - - \ No newline at end of file diff --git a/tests/textcode/data/markup/java.jsp-expected.json b/tests/textcode/data/markup/java.jsp-expected.json deleted file mode 100644 index 21de6517dad..00000000000 --- a/tests/textcode/data/markup/java.jsp-expected.json +++ /dev/null @@ -1,185 +0,0 @@ -[ - " version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n", - "<%@page session=\"false\" contentType=\"text/html; charset=ISO-8859-1\" %>\r\n", - "<%@page import=\"clime.messadmin.model.IServerInfo\" %>\r\n", - "<%@taglib prefix=\"core\" uri=\"messadmin-core\" %>\r\n", - "<%@taglib prefix=\"format\" uri=\"messadmin-fmt\" %>\r\n", - " HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"--%>\r\n", - " HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"--%>\r\n", - " html \r\n", - " PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n", - " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n", - " html \r\n", - " PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\r\n", - " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"--%>\r\n", - " html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\r\n", - " \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"--%>\r\n", - "\r\n", - " xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\r\n", - " IServerInfo serverInfos = (IServerInfo) request.getAttribute(\"serverInfos\");\r\n", - " String webFilesRoot = (String) request.getAttribute(\"WebFilesRoot\"); %>\r\n", - " value=\"${pageContext.request.servletPath}\" var=\"submitUrl\" scope=\"page\"/--%> can use value=\"${pageContext.request.servletPath}\" because this JSP is include()'ed --%>\r\n", - " or use directly ${pageContext.request.requestURI} --%>\r\n", - " String submitUrl = request.getContextPath() + request.getServletPath(); /* Can use +request.getServletPath() because this JSP is include()'ed */ %>\r\n", - " \r\n", - " http-equiv=\"content-type\" content=\"text/html; charset=iso-8859-1 \r\n", - "\t http-equiv=\"pragma\" content=\"no-cache HTTP 1.0 -->\r\n", - "\t http-equiv=\"cache-control\" content=\"no-cache,must-revalidate HTTP 1.1 -->\r\n", - "\t http-equiv=\"expires\" content=\"0 0 is an invalid value and should be treated as 'now' -->\r\n", - "\t http-equiv=\"content-language\" content=\"en fr-FR --%>\r\n", - "\t name=\"author\" content=\"Cedrik LIME \r\n", - "\t name=\"copyright\" content=\"copyright 2005-2006 Cedrik LIME \r\n", - "\t name=\"robots\" content=\"noindex,nofollow,noarchive \r\n", - "\t Server System Informations \r\n", - "\t rel=\"stylesheet\" type=\"text/css\" =\" MessAdmin.css \r\n", - "\t type=\"text/css\">\r\n", - "\t \r\n", - "\t type=\"text/javascript\" src=\" js/getElementsBySelector.js\"> \r\n", - "\t type=\"text/javascript\" src=\" js/behavior.js\"> \r\n", - "\t type=\"text/javascript\" src=\" js/MessAdmin.js\"> \r\n", - "\t type=\"text/javascript\">// \n", - "\t\tfunction reloadPage() {\r\n", - "\t\t\twindow.location.reload();\r\n", - "\t\t}\r\n", - "\t//]]>\r\n", - "\t \r\n", - " \r\n", - " \r\n", - "\r\n", - " \n", - " border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\">\r\n", - " \r\n", - " align=\"right\" class=\"topheading\" width=\"44\"> alt=\"Indus Logo\" border=\"0\" height=\"39\" width=\"44\" src=\" /MessAdmin/images/logo.gif\"> class=\"topheading\">Indus Application Management Console \r\n", - " \r\n", - " \r\n", - " \r\n", - " \r\n", - " border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n", - " \r\n", - " class=\"backtab\"> class=\"tabs\" =\"http://localhost:8083/serverbydomain?querynames=*ias50%3A*\">Server view \r\n", - " width=\"2\"> class=\"backtab\"> class=\"tabs\" =\"http://localhost:8083/empty?template=emptymbean\">MBean view width=\"2\"> \r\n", - " class=\"backtab\"> class=\"tabs\" =\"http://localhost:8083/mbean?objectname=JMImplementation%3Atype%3DMBeanServerDelegate&template=about\">About \r\n", - " width=\"2\"> class=\"fronttab\"> class=\"tabs\" =\"http://localhost:8888/ias50/MessAdmin\">Session Admin \r\n", - " \r\n", - " \r\n", - "------------------------>\r\n", - "\r\n", - "\r\n", - " \r\n", - " class=\"darker\"> \r\n", - " \r\n", - " \r\n", - " class=\"lighter\">\r\n", - " id=\"menu\" style=\"font-size: small;\">\r\n", - " [\r\n", - " Server Informations\r\n", - " |\r\n", - " =\" ?action=webAppsList\">Web Applications list \r\n", - " ]\r\n", - " \r\n", - " \r\n", - " \r\n", - " \r\n", - " \r\n", - "\r\n", - " \r\n", - "\tServer Information\r\n", - " style=\"text-align: left;\" border=\"0\">\r\n", - "\t \r\n", - "\t\t Server name \r\n", - "\t\t title='Working directory: serverInfos.getSystemProperties().get(\"user.dir\") %>'> getServletConfig().getServletContext().getServerInfo() %> \r\n", - "\t\t Servlet version \r\n", - "\t\t getServletConfig().getServletContext().getMajorVersion() %>. getServletConfig().getServletContext().getMinorVersion() %> \r\n", - "\t \r\n", - "\t \r\n", - "\t\t Temp file directory \r\n", - "\t\t value=' serverInfos.getSystemProperties().get(\"java.io.tmpdir\") %> \r\n", - "\t\t Running as \r\n", - "\t\t title='Home directory: serverInfos.getSystemProperties().get(\"user.home\") %>'> value=' serverInfos.getSystemProperties().get(\"user.name\") %> \r\n", - "\t \r\n", - "\t \r\n", - "\t\t Startup date \r\n", - "\t\t value=\" serverInfos.getStartupTime() %>\" type=\"both\" pattern=\"yyyy-MM-dd HH:mm:ss \r\n", - "\t\t colspan=\"2\"> \r\n", - "\t \r\n", - " \r\n", - " \r\n", - "\r\n", - " \r\n", - "\tCPU and Memory\r\n", - " style=\"text-align: left;\" border=\"0\">\r\n", - " test=\" serverInfos.getCpuCount() >= 0 %>\">\r\n", - "\t \r\n", - "\t\t title=\"maximum number of processors available to the Java virtual machine\">Number of CPUs \r\n", - "\t\t align=\"center\"> value=\" serverInfos.getCpuCount() %>\" type=\"number \r\n", - "\t \r\n", - " \r\n", - "\t \r\n", - "\t\t title=\"amount of free memory in the system\">Free Memory \r\n", - "\t\t class=\"number\"> value=\" serverInfos.getFreeMemory() %>\" type=\"bytes \r\n", - "\t \r\n", - "\t \r\n", - "\t\t title=\"total amount of memory in the Java Virtual Machine\">Total Memory \r\n", - "\t\t class=\"number\"> value=\" serverInfos.getTotalMemory() %>\" type=\"bytes \r\n", - "\t \r\n", - " test=\" serverInfos.getMaxMemory() >= 0 %>\">\r\n", - "\t \r\n", - "\t\t title=\"maximum amount of memory that the Java virtual machine will attempt to use\">Max Memory \r\n", - "\t\t class=\"number\"> value=\" serverInfos.getMaxMemory() %>\" type=\"bytes \r\n", - "\t \r\n", - " \r\n", - " \r\n", - " \r\n", - "\r\n", - " \r\n", - "\tVM Info\r\n", - " extracted properties from System.getProperties() (see JavaDoc) -->\r\n", - " style=\"text-align: left;\" border=\"0\">\r\n", - "\t VM Info \r\n", - "\t \r\n", - "\t\t Java VM \r\n", - "\t\t \r\n", - "\t\t\t value=' serverInfos.getSystemProperties().get(\"java.vm.vendor\") %> \r\n", - "\t\t\t value=' serverInfos.getSystemProperties().get(\"java.vm.name\") %> \r\n", - "\t\t\t value=' serverInfos.getSystemProperties().get(\"java.vm.version\") %> \r\n", - "\t\t \r\n", - "\t \r\n", - "\t \r\n", - "\t\t Java RE \r\n", - "\t\t \r\n", - "\t\t\t =\" serverInfos.getSystemProperties().get(\"java.vendor.url\") %>\"> value=' serverInfos.getSystemProperties().get(\"java.vendor\") %> \r\n", - "\t\t\t value=' serverInfos.getSystemProperties().get(\"java.version\") %> @ value=' serverInfos.getSystemProperties().get(\"java.home\") %> \r\n", - "\t\t \r\n", - "\t \r\n", - "\t \r\n", - "\t\t Platform \r\n", - "\t\t \r\n", - "\t\t\t value=' serverInfos.getSystemProperties().get(\"os.name\") %> / value=' serverInfos.getSystemProperties().get(\"os.arch\") %> \r\n", - "\t\t\t value=' serverInfos.getSystemProperties().get(\"os.version\") %> \r\n", - "\t\t \r\n", - "\t \r\n", - " \r\n", - " \r\n", - "\r\n", - " style=\"text-align: center;\"> type=\"button\" onclick=\"window.location.reload()\">Refresh \r\n", - "\r\n", - " class=\"error\"> value=' request.getAttribute(\"error\") %> \r\n", - " class=\"message\"> value=' request.getAttribute(\"message\") %> \r\n", - "\r\n", - " id=\"extraServerAttributes\">\r\n", - " items=\" serverInfos.getServerSpecificData() %>\" var=\"serverSpecificData\" varStatus=\"status\">\r\n", - " java.util.Map.Entry serverSpecificData = (java.util.Map.Entry) pageContext.getAttribute(\"serverSpecificData\"); %>\r\n", - "\t \r\n", - "\t\t serverSpecificData.getKey() %>\r\n", - "\t\t serverSpecificData.getValue() %>\r\n", - "\t \r\n", - " \r\n", - " \r\n", - "\r\n", - " - - - - - - - - Form/AbstractTypeExtension.php at master · symfony/Form - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Skip to content -
    - - - - - - - - - - - - -
    -
    -
    - -
    -
    -
    - -
      - -
    • -
      - -
      - - - - Watch - - - - -
      - -
      -
      -
      -
    • - -
    • - -
      - -
      - - -
      -
      - - -
      - -
    • - -
    • -
      - - -
    • - -
    - -

    - - /Form - - - - - -

    -
    -
    - -
    -
    -
    - - - -
    - -
    -

    HTTPS clone URL

    -
    - - - - -
    -
    - - -
    -

    SSH clone URL

    -
    - - - - -
    -
    - - -
    -

    Subversion checkout URL

    -
    - - - - -
    -
    - - - -

    You can clone with - HTTPS, SSH, or Subversion. - - - -

    - - - - - Clone in Desktop - - - - - - Download ZIP - -
    -
    - -
    - - - - - - -
    - -
    - - - branch: - master - - - -
    - -
    - - - - -
    - - -
    - - -
    - - -
    -

    - - 8 - contributors - -

    - @webmozart - @colinfrei - @fabpot - @vicb - @peterrehm - @stof - @Tobion - @willdurand - - -
    - -
    - -
    -
    -
    - -
    - Raw - Blame - History -
    - - - - - -
    - -
    -
    - -
    - -
    - 49 lines (41 sloc) - - 0.974 kb -
    -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    <?php
    /*
    * This file is part of the Symfony package.
    *
    * (c) Fabien Potencier <fabien@symfony.com>
    *
    * For the full copyright and license information, please view the LICENSE
    * file that was distributed with this source code.
    */
    namespace Symfony\Component\Form;
    use Symfony\Component\OptionsResolver\OptionsResolver;
    /**
    * @author Bernhard Schussek <bschussek@gmail.com>
    */
    abstract class AbstractTypeExtension implements FormTypeExtensionInterface
    {
    /**
    * {@inheritdoc}
    */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
    }
    /**
    * {@inheritdoc}
    */
    public function buildView(FormView $view, FormInterface $form, array $options)
    {
    }
    /**
    * {@inheritdoc}
    */
    public function finishView(FormView $view, FormInterface $form, array $options)
    {
    }
    /**
    * {@inheritdoc}
    */
    public function configureOptions(OptionsResolver $resolver)
    {
    }
    }
    - -
    - -
    - -Jump to Line - - -
    - -
    - -
    -
    - - -
    - -
    - -
    - - -
    -
    -
    - -
    -
    -
    -
    -
    - -
    - - - - - - -
    - - - Something went wrong with that request. Please try again. -
    - - - - - - - -
    - - - - diff --git a/tests/textcode/data/markup/rhi.txt b/tests/textcode/data/markup/rhi.txt new file mode 100644 index 00000000000..5560423ac9b --- /dev/null +++ b/tests/textcode/data/markup/rhi.txt @@ -0,0 +1 @@ + * Copyright (C) 2009 Eric Paris diff --git a/tests/textcode/data/markup/rst_highlighted.html b/tests/textcode/data/markup/rst_highlighted.html deleted file mode 100644 index 9f9dca5c12f..00000000000 --- a/tests/textcode/data/markup/rst_highlighted.html +++ /dev/null @@ -1,1539 +0,0 @@ - - - - - - - - - - - - symfony-docs/license.rst at 2.7 · symfony/symfony-docs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Skip to content -
    - - - - - - - - - - - - -
    -
    -
    - -
    -
    -
    - -
      - -
    • -
      - -
      - - - - Watch - - - - -
      - -
      -
      -
      -
    • - -
    • - -
      - -
      - - -
      -
      - - -
      - -
    • - -
    • -
      - - -
    • - -
    - -

    - - /symfony-docs - - - - - -

    -
    -
    - -
    -
    -
    - - - -
    - -
    -

    HTTPS clone URL

    -
    - - - - -
    -
    - - -
    -

    SSH clone URL

    -
    - - - - -
    -
    - - -
    -

    Subversion checkout URL

    -
    - - - - -
    -
    - - - -

    You can clone with - HTTPS, SSH, or Subversion. - - - -

    - - - - - Clone in Desktop - - - - - - Download ZIP - -
    -
    - -
    - - - - - - -
    - -
    - - - branch: - 2.7 - - - -
    - -
    - - - - -
    - - -
    - - -
    -
    - @xabbuh - xabbuh - - -
    - - - -
    - -
    -
    -
    - -
    - Raw - Blame - History -
    - - - - - -
    - -
    -
    - -
    - -
    - 53 lines (34 sloc) - - 1.795 kb -
    -
    -
    -

    -Symfony Documentation License

    -

    The Symfony documentation is licensed under a Creative Commons -Attribution-Share Alike 3.0 Unported License (CC BY-SA 3.0).

    -

    You are free:

    -
      -
    • to Share — to copy, distribute and transmit the work;
    • -
    • to Remix — to adapt the work.
    • -
    -

    Under the following conditions:

    -
      -
    • -Attribution — You must attribute the work in the manner specified by -the author or licensor (but not in any way that suggests that they -endorse you or your use of the work);
    • -
    • -Share Alike — If you alter, transform, or build upon this work, you -may distribute the resulting work only under the same or similar license -to this one.
    • -
    -

    With the understanding that:

    -
      -
    • -Waiver — Any of the above conditions can be waived if you get -permission from the copyright holder;
    • -
    • -Public Domain — Where the work or any of its elements is in the public -domain under applicable law, that status is in no way affected by the -license;
    • -
    • -Other Rights — In no way are any of the following rights affected by the -license:
        -
      • Your fair dealing or fair use rights, or other applicable copyright exceptions -and limitations;
      • -
      • The author's moral rights;
      • -
      • Rights other persons may have either in the work itself or in how the -work is used, such as publicity or privacy rights.
      • -
      -
    • -
    • -Notice — For any reuse or distribution, you must make clear to others -the license terms of this work. The best way to do this is with a link -to this web page.
    • -
    -

    This is a human-readable summary of the Legal Code (the full license).

    - -
    -
    - -
    - -Jump to Line - - -
    - -
    - -
    -
    - - -
    - -
    - -
    - - -
    -
    -
    - -
    -
    -
    -
    -
    - -
    - - - - - - -
    - - - Something went wrong with that request. Please try again. -
    - - - - - - - -
    - - - - diff --git a/tests/textcode/data/markup_expected/404.htm b/tests/textcode/data/markup_expected/404.htm deleted file mode 100644 index 5b11a559e43..00000000000 --- a/tests/textcode/data/markup_expected/404.htm +++ /dev/null @@ -1,294 +0,0 @@ - - - - Page not found · GitHub - - body { - background-color: #f1f1f1; - margin: 0; - } - body, - input, - button { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - } - .container { margin: 30px auto 40px auto; width: 800px; text-align: center; } - - a { color: #4183c4; text-decoration: none; font-weight: bold; } - a:hover { text-decoration: underline; } - - h3 { color: #666; } - ul { list-style: none; padding: 25px 0; } - li { - display: inline; - margin: 10px 50px 10px 0px; - } - input[type=text], - input[type=password] { - font-size: 13px; - min-height: 32px; - margin: 0; - padding: 7px 8px; - outline: none; - color: #333; - background-color: #fff; - background-repeat: no-repeat; - background-position: right center; - border: 1px solid #ccc; - border-radius: 3px; - box-shadow: inset 0 1px 2px rgba(0,0,0,0.075); - -moz-box-sizing: border-box; - box-sizing: border-box; - -webkit-transition: all 0.15s ease-in; - transition: all 0.15s ease-in; - vertical-align: middle; - } - .button { - position: relative; - display: inline-block; - margin: 0; - padding: 8px 15px; - font-size: 13px; - font-weight: bold; - color: #333; - text-shadow: 0 1px 0 rgba(255,255,255,0.9); - white-space: nowrap; - background-color: #eaeaea; - background-image: -moz-linear-gradient(#fafafa, #eaeaea); - background-image: -webkit-linear-gradient(#fafafa, #eaeaea); - background-image: linear-gradient(#fafafa, #eaeaea); - background-repeat: repeat-x; - border-radius: 3px; - border: 1px solid #ddd; - border-bottom-color: #c5c5c5; - box-shadow: 0 1px 3px rgba(0,0,0,.05); - vertical-align: middle; - cursor: pointer; - -moz-box-sizing: border-box; - box-sizing: border-box; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - -webkit-appearance: none; - } - .button:hover, - .button:active { - background-position: 0 -15px; - border-color: #ccc #ccc #b5b5b5; - } - .button:active { - background-color: #dadada; - border-color: #b5b5b5; - background-image: none; - box-shadow: inset 0 3px 5px rgba(0,0,0,.15); - } - .button:focus, - input[type=text]:focus, - input[type=password]:focus { - outline: none; - border-color: #51a7e8; - box-shadow: inset 0 1px 2px rgba(0,0,0,.075), 0 0 5px rgba(81,167,232,.5); - } - #auth { - position: absolute; - top: 0; - right: 0; - z-index: 50; - min-height: 32px; - background-color: rgba(53,95,120,.4); - padding: 7px 10px; - border-bottom-right-radius: 10px; - border-bottom-left-radius: 10px; - box-shadow: 0 3px 0 rgba(0, 0, 0, 0.28); - display: none; - } - #auth h1, #auth p, #auth label { - display: none; - } - .auth-form-body { - display: inline; - } - #auth input[type=text], - #auth input[type=password] { - float: left; - width: 175px; - margin-right: 9px; - border: 0; - background-color: #f5f5f5; - } - #auth input[type=text]:focus, - #auth input[type=password]:focus { - background-color: #fff; - box-shadow: 0 0 5px rgba(255,255,255,.5); - } - #auth .button { - border: 0; - } - #auth .button:focus { - box-shadow: 0 0 5px rgba(255,255,255,.5); - } - label[for=search] { - display: block; - text-align: left; - } - #search label { - font-weight: 200; - padding: 5px 0; - } - #search input[type=text] { - font-size: 18px; - width: 705px; - } - #search .button { - padding: 10px; - width: 90px; - } - .logo { display: inline-block; margin-top: 35px; } - .logo-img-2x { display: none; } - @media - only screen and (-webkit-min-device-pixel-ratio: 2), - only screen and ( min--moz-device-pixel-ratio: 2), - only screen and ( -o-min-device-pixel-ratio: 2/1), - only screen and ( min-device-pixel-ratio: 2), - only screen and ( min-resolution: 192dpi), - only screen and ( min-resolution: 2dppx) { - .logo-img-1x { display: none; } - .logo-img-2x { display: inline-block; } - } - #suggestions { - margin-top: 35px; - color: #ccc; - } - #suggestions a { - color: #666666; - font-weight: 200; - font-size: 14px; - margin: 0 10px; - } - - #parallax_wrapper { - position: relative; - z-index: 0; - -webkit-transition: all 0.25s ease-in; - transition: all 0.25s ease-in; - } - #parallax_field { - overflow: hidden; - position: absolute; - left: 0; - top: 0; - height: 370px; - width: 100%; - } - #parallax_field #parallax_bg { - position: absolute; - top: -20px; - left: -20px; - width: 110%; - height: 425px; - z-index: 1; - } - #parallax_illustration { - display: block; - margin: 0 auto; - width: 940px; - height: 370px; - position: relative; - overflow: hidden; - clear: both; - } - #parallax_illustration img { - position: absolute; - } - #parallax_illustration #parallax_error_text { - top: 72px; - left: 72px; - z-index: 10; - } - #parallax_illustration #parallax_octocat { - top: 94px; - left: 356px; - z-index: 9; - } - #parallax_illustration #parallax_speeder { - top: 150px; - left: 432px; - z-index: 8; - } - #parallax_illustration #parallax_octocatshadow { - top: 297px; - left: 371px; - z-index: 7; - } - #parallax_illustration #parallax_speedershadow { - top: 263px; - left: 442px; - z-index: 6; - } - #parallax_illustration #parallax_building_1 { - top: 73px; - left: 467px; - z-index: 5; - } - #parallax_illustration #parallax_building_2 { - top: 113px; - left: 762px; - z-index: 4; - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Find code, projects, and people on GitHub: - - - - - - - Contact Support — - GitHub Status — - @githubstatus - - - - - - - - - - - - - - diff --git a/tests/textcode/data/markup_expected/JSON.phps b/tests/textcode/data/markup_expected/JSON.phps deleted file mode 100644 index 3ada1833699..00000000000 --- a/tests/textcode/data/markup_expected/JSON.phps +++ /dev/null @@ -1,3 +0,0 @@ - - * @author      Matt Knapp  * @author      Brett Stimmerman  * @copyright   2005 Michal Migurski * @version     CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $ * @license     http://www.opensource.org/licenses/bsd-license.php * @link        http://pear.php.net/pepr/pepr-proposal-show.php?id=198 *//** * Marker constant for Services_JSON::decode(), used to flag stack state */define('SERVICES_JSON_SLICE',   1);/** * Marker constant for Services_JSON::decode(), used to flag stack state */define('SERVICES_JSON_IN_STR',  2);/** * Marker constant for Services_JSON::decode(), used to flag stack state */define('SERVICES_JSON_IN_ARR',  3);/** * Marker constant for Services_JSON::decode(), used to flag stack state */define('SERVICES_JSON_IN_OBJ',  4);/** * Marker constant for Services_JSON::decode(), used to flag stack state */define('SERVICES_JSON_IN_CMT', 5);/** * Behavior switch for Services_JSON::decode() */define('SERVICES_JSON_LOOSE_TYPE', 16);/** * Behavior switch for Services_JSON::decode() */define('SERVICES_JSON_SUPPRESS_ERRORS', 32);/** * Converts to and from JSON format. * * Brief example of use: * *  * // create a new instance of Services_JSON * $json = new Services_JSON(); * * // convert a complexe value to JSON notation, and send it to the browser * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4))); * $output = $json->encode($value); * * print($output); * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]] * * // accept incoming POST data, assumed to be in JSON notation * $input = file_get_contents('php://input', 1000000); * $value = $json->decode($input); *  */class Services_JSON{   /**    * constructs a new JSON instance    *    * @param    int     $use    object behavior flags; combine with boolean-OR    *    *                           possible values:    *                           - SERVICES_JSON_LOOSE_TYPE:  loose typing.    *                                   "{...}" syntax creates associative arrays    *                                   instead of objects in decode().    *                           - SERVICES_JSON_SUPPRESS_ERRORS:  error suppression.    *                                   Values which can't be encoded (e.g. resources)    *                                   appear as NULL instead of throwing errors.    *                                   By default, a deeply-nested resource will    *                                   bubble up with an error, so all return values    *                                   from encode() should be checked with isError()    */    function Services_JSON($use = 0)    {        $this->use = $use;    }   /**    * convert a string from one UTF-16 char to one UTF-8 char    *    * Normally should be handled by mb_convert_encoding, but    * provides a slower PHP-only method for installations    * that lack the multibye string extension.    *    * @param    string  $utf16  UTF-16 character    * @return   string  UTF-8 character    * @access   private    */    function utf162utf8($utf16)    {        // oh please oh please oh please oh please oh please        if(function_exists('mb_convert_encoding')) {            return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');        }        $bytes = (ord($utf16{0}) << 8) | ord($utf16{1});        switch(true) {            case ((0x7F & $bytes) == $bytes):                // this case should never be reached, because we are in ASCII range                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                return chr(0x7F & $bytes);            case (0x07FF & $bytes) == $bytes:                // return a 2-byte UTF-8 character                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                return chr(0xC0 | (($bytes >> 6) & 0x1F))                     . chr(0x80 | ($bytes & 0x3F));            case (0xFFFF & $bytes) == $bytes:                // return a 3-byte UTF-8 character                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                return chr(0xE0 | (($bytes >> 12) & 0x0F))                     . chr(0x80 | (($bytes >> 6) & 0x3F))                     . chr(0x80 | ($bytes & 0x3F));        }        // ignoring UTF-32 for now, sorry        return '';    }   /**    * convert a string from one UTF-8 char to one UTF-16 char    *    * Normally should be handled by mb_convert_encoding, but    * provides a slower PHP-only method for installations    * that lack the multibye string extension.    *    * @param    string  $utf8   UTF-8 character    * @return   string  UTF-16 character    * @access   private    */    function utf82utf16($utf8)    {        // oh please oh please oh please oh please oh please        if(function_exists('mb_convert_encoding')) {            return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');        }        switch(strlen($utf8)) {            case 1:                // this case should never be reached, because we are in ASCII range                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                return $utf8;            case 2:                // return a UTF-16 character from a 2-byte UTF-8 char                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                return chr(0x07 & (ord($utf8{0}) >> 2))                     . chr((0xC0 & (ord($utf8{0}) << 6))                         | (0x3F & ord($utf8{1})));            case 3:                // return a UTF-16 character from a 3-byte UTF-8 char                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                return chr((0xF0 & (ord($utf8{0}) << 4))                         | (0x0F & (ord($utf8{1}) >> 2)))                     . chr((0xC0 & (ord($utf8{1}) << 6))                         | (0x7F & ord($utf8{2})));        }        // ignoring UTF-32 for now, sorry        return '';    }   /**    * encodes an arbitrary variable into JSON format    *    * @param    mixed   $var    any number, boolean, string, array, or object to be encoded.    *                           see argument 1 to Services_JSON() above for array-parsing behavior.    *                           if var is a strng, note that encode() always expects it    *                           to be in ASCII or UTF-8 format!    *    * @return   mixed   JSON string representation of input var or an error if a problem occurs    * @access   public    */    function encode($var)    {        switch (gettype($var)) {            case 'boolean':                return $var ? 'true' : 'false';            case 'NULL':                return 'null';            case 'integer':                return (int) $var;            case 'double':            case 'float':                return (float) $var;            case 'string':                // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT                $ascii = '';                $strlen_var = strlen($var);               /*                * Iterate over every character in the string,                * escaping with a slash or encoding to UTF-8 where necessary                */                for ($c = 0; $c < $strlen_var; ++$c) {                    $ord_var_c = ord($var{$c});                    switch (true) {                        case $ord_var_c == 0x08:                            $ascii .= '\b';                            break;                        case $ord_var_c == 0x09:                            $ascii .= '\t';                            break;                        case $ord_var_c == 0x0A:                            $ascii .= '\n';                            break;                        case $ord_var_c == 0x0C:                            $ascii .= '\f';                            break;                        case $ord_var_c == 0x0D:                            $ascii .= '\r';                            break;                        case $ord_var_c == 0x22:                        case $ord_var_c == 0x2F:                        case $ord_var_c == 0x5C:                            // double quote, slash, slosh                            $ascii .= '\\'.$var{$c};                            break;                        case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):                            // characters U-00000000 - U-0000007F (same as ASCII)                            $ascii .= $var{$c};                            break;                        case (($ord_var_c & 0xE0) == 0xC0):                            // characters U-00000080 - U-000007FF, mask 110XXXXX                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                            $char = pack('C*', $ord_var_c, ord($var{$c + 1}));                            $c += 1;                            $utf16 = $this->utf82utf16($char);                            $ascii .= sprintf('\u%04s', bin2hex($utf16));                            break;                        case (($ord_var_c & 0xF0) == 0xE0):                            // characters U-00000800 - U-0000FFFF, mask 1110XXXX                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                            $char = pack('C*', $ord_var_c,                                         ord($var{$c + 1}),                                         ord($var{$c + 2}));                            $c += 2;                            $utf16 = $this->utf82utf16($char);                            $ascii .= sprintf('\u%04s', bin2hex($utf16));                            break;                        case (($ord_var_c & 0xF8) == 0xF0):                            // characters U-00010000 - U-001FFFFF, mask 11110XXX                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                            $char = pack('C*', $ord_var_c,                                         ord($var{$c + 1}),                                         ord($var{$c + 2}),                                         ord($var{$c + 3}));                            $c += 3;                            $utf16 = $this->utf82utf16($char);                            $ascii .= sprintf('\u%04s', bin2hex($utf16));                            break;                        case (($ord_var_c & 0xFC) == 0xF8):                            // characters U-00200000 - U-03FFFFFF, mask 111110XX                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                            $char = pack('C*', $ord_var_c,                                         ord($var{$c + 1}),                                         ord($var{$c + 2}),                                         ord($var{$c + 3}),                                         ord($var{$c + 4}));                            $c += 4;                            $utf16 = $this->utf82utf16($char);                            $ascii .= sprintf('\u%04s', bin2hex($utf16));                            break;                        case (($ord_var_c & 0xFE) == 0xFC):                            // characters U-04000000 - U-7FFFFFFF, mask 1111110X                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                            $char = pack('C*', $ord_var_c,                                         ord($var{$c + 1}),                                         ord($var{$c + 2}),                                         ord($var{$c + 3}),                                         ord($var{$c + 4}),                                         ord($var{$c + 5}));                            $c += 5;                            $utf16 = $this->utf82utf16($char);                            $ascii .= sprintf('\u%04s', bin2hex($utf16));                            break;                    }                }                return '"'.$ascii.'"';            case 'array':               /*                * As per JSON spec if any array key is not an integer                * we must treat the the whole array as an object. We                * also try to catch a sparsely populated associative                * array with numeric keys here because some JS engines                * will create an array with empty indexes up to                * max_index which can cause memory issues and because                * the keys, which may be relevant, will be remapped                * otherwise.                *                * As per the ECMA and JSON specification an object may                * have any string as a property. Unfortunately due to                * a hole in the ECMA specification if the key is a                * ECMA reserved word or starts with a digit the                * parameter is only accessible using ECMAScript's                * bracket notation.                */                // treat as a JSON object                if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {                    $properties = array_map(array($this, 'name_value'),                                            array_keys($var),                                            array_values($var));                    foreach($properties as $property) {                        if(Services_JSON::isError($property)) {                            return $property;                        }                    }                    return '{' . join(',', $properties) . '}';                }                // treat it like a regular array                $elements = array_map(array($this, 'encode'), $var);                foreach($elements as $element) {                    if(Services_JSON::isError($element)) {                        return $element;                    }                }                return '[' . join(',', $elements) . ']';            case 'object':                $vars = get_object_vars($var);                $properties = array_map(array($this, 'name_value'),                                        array_keys($vars),                                        array_values($vars));                foreach($properties as $property) {                    if(Services_JSON::isError($property)) {                        return $property;                    }                }                return '{' . join(',', $properties) . '}';            default:                return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)                    ? 'null'                    : new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");        }    }   /**    * array-walking function for use in generating JSON-formatted name-value pairs    *    * @param    string  $name   name of key to use    * @param    mixed   $value  reference to an array element to be encoded    *    * @return   string  JSON-formatted name-value pair, like '"name":value'    * @access   private    */    function name_value($name, $value)    {        $encoded_value = $this->encode($value);        if(Services_JSON::isError($encoded_value)) {            return $encoded_value;        }        return $this->encode(strval($name)) . ':' . $encoded_value;    }   /**    * reduce a string by removing leading and trailing comments and whitespace    *    * @param    $str    string      string value to strip of comments and whitespace    *    * @return   string  string value stripped of comments and whitespace    * @access   private    */    function reduce_string($str)    {        $str = preg_replace(array(                // eliminate single line comments in '// ...' form                '#^\s*//(.+)$#m',                // eliminate multi-line comments in '/* ... */' form, at start of string                '#^\s*/\*(.+)\*/#Us',                // eliminate multi-line comments in '/* ... */' form, at end of string                '#/\*(.+)\*/\s*$#Us'            ), '', $str);        // eliminate extraneous space        return trim($str);    }   /**    * decodes a JSON string into appropriate variable    *    * @param    string  $str    JSON-formatted string    *    * @return   mixed   number, boolean, string, array, or object    *                   corresponding to given JSON input string.    *                   See argument 1 to Services_JSON() above for object-output behavior.    *                   Note that decode() always returns strings    *                   in ASCII or UTF-8 format!    * @access   public    */    function decode($str)    {        $str = $this->reduce_string($str);        switch (strtolower($str)) {            case 'true':                return true;            case 'false':                return false;            case 'null':                return null;            default:                $m = array();                if (is_numeric($str)) {                    // Lookie-loo, it's a number                    // This would work on its own, but I'm trying to be                    // good about returning integers where appropriate:                    // return (float)$str;                    // Return float or int, as appropriate                    return ((float)$str == (integer)$str)                        ? (integer)$str                        : (float)$str;                } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) {                    // STRINGS RETURNED IN UTF-8 FORMAT                    $delim = substr($str, 0, 1);                    $chrs = substr($str, 1, -1);                    $utf8 = '';                    $strlen_chrs = strlen($chrs);                    for ($c = 0; $c < $strlen_chrs; ++$c) {                        $substr_chrs_c_2 = substr($chrs, $c, 2);                        $ord_chrs_c = ord($chrs{$c});                        switch (true) {                            case $substr_chrs_c_2 == '\b':                                $utf8 .= chr(0x08);                                ++$c;                                break;                            case $substr_chrs_c_2 == '\t':                                $utf8 .= chr(0x09);                                ++$c;                                break;                            case $substr_chrs_c_2 == '\n':                                $utf8 .= chr(0x0A);                                ++$c;                                break;                            case $substr_chrs_c_2 == '\f':                                $utf8 .= chr(0x0C);                                ++$c;                                break;                            case $substr_chrs_c_2 == '\r':                                $utf8 .= chr(0x0D);                                ++$c;                                break;                            case $substr_chrs_c_2 == '\\"':                            case $substr_chrs_c_2 == '\\\'':                            case $substr_chrs_c_2 == '\\\\':                            case $substr_chrs_c_2 == '\\/':                                if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||                                   ($delim == "'" && $substr_chrs_c_2 != '\\"')) {                                    $utf8 .= $chrs{++$c};                                }                                break;                            case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):                                // single, escaped unicode character                                $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))                                       . chr(hexdec(substr($chrs, ($c + 4), 2)));                                $utf8 .= $this->utf162utf8($utf16);                                $c += 5;                                break;                            case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):                                $utf8 .= $chrs{$c};                                break;                            case ($ord_chrs_c & 0xE0) == 0xC0:                                // characters U-00000080 - U-000007FF, mask 110XXXXX                                //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                                $utf8 .= substr($chrs, $c, 2);                                ++$c;                                break;                            case ($ord_chrs_c & 0xF0) == 0xE0:                                // characters U-00000800 - U-0000FFFF, mask 1110XXXX                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                                $utf8 .= substr($chrs, $c, 3);                                $c += 2;                                break;                            case ($ord_chrs_c & 0xF8) == 0xF0:                                // characters U-00010000 - U-001FFFFF, mask 11110XXX                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                                $utf8 .= substr($chrs, $c, 4);                                $c += 3;                                break;                            case ($ord_chrs_c & 0xFC) == 0xF8:                                // characters U-00200000 - U-03FFFFFF, mask 111110XX                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                                $utf8 .= substr($chrs, $c, 5);                                $c += 4;                                break;                            case ($ord_chrs_c & 0xFE) == 0xFC:                                // characters U-04000000 - U-7FFFFFFF, mask 1111110X                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                                $utf8 .= substr($chrs, $c, 6);                                $c += 5;                                break;                        }                    }                    return $utf8;                } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {                    // array, or object notation                    if ($str{0} == '[') {                        $stk = array(SERVICES_JSON_IN_ARR);                        $arr = array();                    } else {                        if ($this->use & SERVICES_JSON_LOOSE_TYPE) {                            $stk = array(SERVICES_JSON_IN_OBJ);                            $obj = array();                        } else {                            $stk = array(SERVICES_JSON_IN_OBJ);                            $obj = new stdClass();                        }                    }                    array_push($stk, array('what'  => SERVICES_JSON_SLICE,                                           'where' => 0,                                           'delim' => false));                    $chrs = substr($str, 1, -1);                    $chrs = $this->reduce_string($chrs);                    if ($chrs == '') {                        if (reset($stk) == SERVICES_JSON_IN_ARR) {                            return $arr;                        } else {                            return $obj;                        }                    }                    //print("\nparsing {$chrs}\n");                    $strlen_chrs = strlen($chrs);                    for ($c = 0; $c <= $strlen_chrs; ++$c) {                        $top = end($stk);                        $substr_chrs_c_2 = substr($chrs, $c, 2);                        if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {                            // found a comma that is not inside a string, array, etc.,                            // OR we've reached the end of the character list                            $slice = substr($chrs, $top['where'], ($c - $top['where']));                            array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));                            //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");                            if (reset($stk) == SERVICES_JSON_IN_ARR) {                                // we are in an array, so just push an element onto the stack                                array_push($arr, $this->decode($slice));                            } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {                                // we are in an object, so figure                                // out the property name and set an                                // element in an associative array,                                // for now                                $parts = array();                                                                if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {                                    // "name":value pair                                    $key = $this->decode($parts[1]);                                    $val = $this->decode($parts[2]);                                    if ($this->use & SERVICES_JSON_LOOSE_TYPE) {                                        $obj[$key] = $val;                                    } else {                                        $obj->$key = $val;                                    }                                } elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {                                    // name:value pair, where name is unquoted                                    $key = $parts[1];                                    $val = $this->decode($parts[2]);                                    if ($this->use & SERVICES_JSON_LOOSE_TYPE) {                                        $obj[$key] = $val;                                    } else {                                        $obj->$key = $val;                                    }                                }                            }                        } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {                            // found a quote, and we are not inside a string                            array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));                            //print("Found start of string at {$c}\n");                        } elseif (($chrs{$c} == $top['delim']) &&                                 ($top['what'] == SERVICES_JSON_IN_STR) &&                                 ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) {                            // found a quote, we're in a string, and it's not escaped                            // we know that it's not escaped becase there is _not_ an                            // odd number of backslashes at the end of the string so far                            array_pop($stk);                            //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");                        } elseif (($chrs{$c} == '[') &&                                 in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {                            // found a left-bracket, and we are in an array, object, or slice                            array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));                            //print("Found start of array at {$c}\n");                        } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {                            // found a right-bracket, and we're in an array                            array_pop($stk);                            //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");                        } elseif (($chrs{$c} == '{') &&                                 in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {                            // found a left-brace, and we are in an array, object, or slice                            array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));                            //print("Found start of object at {$c}\n");                        } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {                            // found a right-brace, and we're in an object                            array_pop($stk);                            //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");                        } elseif (($substr_chrs_c_2 == '/*') &&                                 in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {                            // found a comment start, and we are in an array, object, or slice                            array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));                            $c++;                            //print("Found start of comment at {$c}\n");                        } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {                            // found a comment end, and we're in one now                            array_pop($stk);                            $c++;                            for ($i = $top['where']; $i <= $c; ++$i)                                $chrs = substr_replace($chrs, ' ', $i, 1);                            //print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");                        }                    }                    if (reset($stk) == SERVICES_JSON_IN_ARR) {                        return $arr;                    } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {                        return $obj;                    }                }        }    }    /**     * @todo Ultimately, this should just call PEAR::isError()     */    function isError($data, $code = null)    {        if (class_exists('pear')) {            return PEAR::isError($data, $code);        } elseif (is_object($data) && (get_class($data) == 'services_json_error' ||                                 is_subclass_of($data, 'services_json_error'))) {            return true;        }        return false;    }}if (class_exists('PEAR_Error')) {    class Services_JSON_Error extends PEAR_Error    {        function Services_JSON_Error($message = 'unknown error', $code = null,                                     $mode = null, $options = null, $userinfo = null)        {            parent::PEAR_Error($message, $code, $mode, $options, $userinfo);        }    }} else {    /**     * @todo Ultimately, this class shall be descended from PEAR_Error     */    class Services_JSON_Error    {        function Services_JSON_Error($message = 'unknown error', $code = null,                                     $mode = null, $options = null, $userinfo = null)        {        }    }}    ?> - diff --git a/tests/textcode/data/markup_expected/JSON.phps.html b/tests/textcode/data/markup_expected/JSON.phps.html deleted file mode 100644 index 3ada1833699..00000000000 --- a/tests/textcode/data/markup_expected/JSON.phps.html +++ /dev/null @@ -1,3 +0,0 @@ - - * @author      Matt Knapp  * @author      Brett Stimmerman  * @copyright   2005 Michal Migurski * @version     CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $ * @license     http://www.opensource.org/licenses/bsd-license.php * @link        http://pear.php.net/pepr/pepr-proposal-show.php?id=198 *//** * Marker constant for Services_JSON::decode(), used to flag stack state */define('SERVICES_JSON_SLICE',   1);/** * Marker constant for Services_JSON::decode(), used to flag stack state */define('SERVICES_JSON_IN_STR',  2);/** * Marker constant for Services_JSON::decode(), used to flag stack state */define('SERVICES_JSON_IN_ARR',  3);/** * Marker constant for Services_JSON::decode(), used to flag stack state */define('SERVICES_JSON_IN_OBJ',  4);/** * Marker constant for Services_JSON::decode(), used to flag stack state */define('SERVICES_JSON_IN_CMT', 5);/** * Behavior switch for Services_JSON::decode() */define('SERVICES_JSON_LOOSE_TYPE', 16);/** * Behavior switch for Services_JSON::decode() */define('SERVICES_JSON_SUPPRESS_ERRORS', 32);/** * Converts to and from JSON format. * * Brief example of use: * *  * // create a new instance of Services_JSON * $json = new Services_JSON(); * * // convert a complexe value to JSON notation, and send it to the browser * $value = array('foo', 'bar', array(1, 2, 'baz'), array(3, array(4))); * $output = $json->encode($value); * * print($output); * // prints: ["foo","bar",[1,2,"baz"],[3,[4]]] * * // accept incoming POST data, assumed to be in JSON notation * $input = file_get_contents('php://input', 1000000); * $value = $json->decode($input); *  */class Services_JSON{   /**    * constructs a new JSON instance    *    * @param    int     $use    object behavior flags; combine with boolean-OR    *    *                           possible values:    *                           - SERVICES_JSON_LOOSE_TYPE:  loose typing.    *                                   "{...}" syntax creates associative arrays    *                                   instead of objects in decode().    *                           - SERVICES_JSON_SUPPRESS_ERRORS:  error suppression.    *                                   Values which can't be encoded (e.g. resources)    *                                   appear as NULL instead of throwing errors.    *                                   By default, a deeply-nested resource will    *                                   bubble up with an error, so all return values    *                                   from encode() should be checked with isError()    */    function Services_JSON($use = 0)    {        $this->use = $use;    }   /**    * convert a string from one UTF-16 char to one UTF-8 char    *    * Normally should be handled by mb_convert_encoding, but    * provides a slower PHP-only method for installations    * that lack the multibye string extension.    *    * @param    string  $utf16  UTF-16 character    * @return   string  UTF-8 character    * @access   private    */    function utf162utf8($utf16)    {        // oh please oh please oh please oh please oh please        if(function_exists('mb_convert_encoding')) {            return mb_convert_encoding($utf16, 'UTF-8', 'UTF-16');        }        $bytes = (ord($utf16{0}) << 8) | ord($utf16{1});        switch(true) {            case ((0x7F & $bytes) == $bytes):                // this case should never be reached, because we are in ASCII range                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                return chr(0x7F & $bytes);            case (0x07FF & $bytes) == $bytes:                // return a 2-byte UTF-8 character                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                return chr(0xC0 | (($bytes >> 6) & 0x1F))                     . chr(0x80 | ($bytes & 0x3F));            case (0xFFFF & $bytes) == $bytes:                // return a 3-byte UTF-8 character                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                return chr(0xE0 | (($bytes >> 12) & 0x0F))                     . chr(0x80 | (($bytes >> 6) & 0x3F))                     . chr(0x80 | ($bytes & 0x3F));        }        // ignoring UTF-32 for now, sorry        return '';    }   /**    * convert a string from one UTF-8 char to one UTF-16 char    *    * Normally should be handled by mb_convert_encoding, but    * provides a slower PHP-only method for installations    * that lack the multibye string extension.    *    * @param    string  $utf8   UTF-8 character    * @return   string  UTF-16 character    * @access   private    */    function utf82utf16($utf8)    {        // oh please oh please oh please oh please oh please        if(function_exists('mb_convert_encoding')) {            return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8');        }        switch(strlen($utf8)) {            case 1:                // this case should never be reached, because we are in ASCII range                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                return $utf8;            case 2:                // return a UTF-16 character from a 2-byte UTF-8 char                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                return chr(0x07 & (ord($utf8{0}) >> 2))                     . chr((0xC0 & (ord($utf8{0}) << 6))                         | (0x3F & ord($utf8{1})));            case 3:                // return a UTF-16 character from a 3-byte UTF-8 char                // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                return chr((0xF0 & (ord($utf8{0}) << 4))                         | (0x0F & (ord($utf8{1}) >> 2)))                     . chr((0xC0 & (ord($utf8{1}) << 6))                         | (0x7F & ord($utf8{2})));        }        // ignoring UTF-32 for now, sorry        return '';    }   /**    * encodes an arbitrary variable into JSON format    *    * @param    mixed   $var    any number, boolean, string, array, or object to be encoded.    *                           see argument 1 to Services_JSON() above for array-parsing behavior.    *                           if var is a strng, note that encode() always expects it    *                           to be in ASCII or UTF-8 format!    *    * @return   mixed   JSON string representation of input var or an error if a problem occurs    * @access   public    */    function encode($var)    {        switch (gettype($var)) {            case 'boolean':                return $var ? 'true' : 'false';            case 'NULL':                return 'null';            case 'integer':                return (int) $var;            case 'double':            case 'float':                return (float) $var;            case 'string':                // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT                $ascii = '';                $strlen_var = strlen($var);               /*                * Iterate over every character in the string,                * escaping with a slash or encoding to UTF-8 where necessary                */                for ($c = 0; $c < $strlen_var; ++$c) {                    $ord_var_c = ord($var{$c});                    switch (true) {                        case $ord_var_c == 0x08:                            $ascii .= '\b';                            break;                        case $ord_var_c == 0x09:                            $ascii .= '\t';                            break;                        case $ord_var_c == 0x0A:                            $ascii .= '\n';                            break;                        case $ord_var_c == 0x0C:                            $ascii .= '\f';                            break;                        case $ord_var_c == 0x0D:                            $ascii .= '\r';                            break;                        case $ord_var_c == 0x22:                        case $ord_var_c == 0x2F:                        case $ord_var_c == 0x5C:                            // double quote, slash, slosh                            $ascii .= '\\'.$var{$c};                            break;                        case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):                            // characters U-00000000 - U-0000007F (same as ASCII)                            $ascii .= $var{$c};                            break;                        case (($ord_var_c & 0xE0) == 0xC0):                            // characters U-00000080 - U-000007FF, mask 110XXXXX                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                            $char = pack('C*', $ord_var_c, ord($var{$c + 1}));                            $c += 1;                            $utf16 = $this->utf82utf16($char);                            $ascii .= sprintf('\u%04s', bin2hex($utf16));                            break;                        case (($ord_var_c & 0xF0) == 0xE0):                            // characters U-00000800 - U-0000FFFF, mask 1110XXXX                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                            $char = pack('C*', $ord_var_c,                                         ord($var{$c + 1}),                                         ord($var{$c + 2}));                            $c += 2;                            $utf16 = $this->utf82utf16($char);                            $ascii .= sprintf('\u%04s', bin2hex($utf16));                            break;                        case (($ord_var_c & 0xF8) == 0xF0):                            // characters U-00010000 - U-001FFFFF, mask 11110XXX                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                            $char = pack('C*', $ord_var_c,                                         ord($var{$c + 1}),                                         ord($var{$c + 2}),                                         ord($var{$c + 3}));                            $c += 3;                            $utf16 = $this->utf82utf16($char);                            $ascii .= sprintf('\u%04s', bin2hex($utf16));                            break;                        case (($ord_var_c & 0xFC) == 0xF8):                            // characters U-00200000 - U-03FFFFFF, mask 111110XX                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                            $char = pack('C*', $ord_var_c,                                         ord($var{$c + 1}),                                         ord($var{$c + 2}),                                         ord($var{$c + 3}),                                         ord($var{$c + 4}));                            $c += 4;                            $utf16 = $this->utf82utf16($char);                            $ascii .= sprintf('\u%04s', bin2hex($utf16));                            break;                        case (($ord_var_c & 0xFE) == 0xFC):                            // characters U-04000000 - U-7FFFFFFF, mask 1111110X                            // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                            $char = pack('C*', $ord_var_c,                                         ord($var{$c + 1}),                                         ord($var{$c + 2}),                                         ord($var{$c + 3}),                                         ord($var{$c + 4}),                                         ord($var{$c + 5}));                            $c += 5;                            $utf16 = $this->utf82utf16($char);                            $ascii .= sprintf('\u%04s', bin2hex($utf16));                            break;                    }                }                return '"'.$ascii.'"';            case 'array':               /*                * As per JSON spec if any array key is not an integer                * we must treat the the whole array as an object. We                * also try to catch a sparsely populated associative                * array with numeric keys here because some JS engines                * will create an array with empty indexes up to                * max_index which can cause memory issues and because                * the keys, which may be relevant, will be remapped                * otherwise.                *                * As per the ECMA and JSON specification an object may                * have any string as a property. Unfortunately due to                * a hole in the ECMA specification if the key is a                * ECMA reserved word or starts with a digit the                * parameter is only accessible using ECMAScript's                * bracket notation.                */                // treat as a JSON object                if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {                    $properties = array_map(array($this, 'name_value'),                                            array_keys($var),                                            array_values($var));                    foreach($properties as $property) {                        if(Services_JSON::isError($property)) {                            return $property;                        }                    }                    return '{' . join(',', $properties) . '}';                }                // treat it like a regular array                $elements = array_map(array($this, 'encode'), $var);                foreach($elements as $element) {                    if(Services_JSON::isError($element)) {                        return $element;                    }                }                return '[' . join(',', $elements) . ']';            case 'object':                $vars = get_object_vars($var);                $properties = array_map(array($this, 'name_value'),                                        array_keys($vars),                                        array_values($vars));                foreach($properties as $property) {                    if(Services_JSON::isError($property)) {                        return $property;                    }                }                return '{' . join(',', $properties) . '}';            default:                return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)                    ? 'null'                    : new Services_JSON_Error(gettype($var)." can not be encoded as JSON string");        }    }   /**    * array-walking function for use in generating JSON-formatted name-value pairs    *    * @param    string  $name   name of key to use    * @param    mixed   $value  reference to an array element to be encoded    *    * @return   string  JSON-formatted name-value pair, like '"name":value'    * @access   private    */    function name_value($name, $value)    {        $encoded_value = $this->encode($value);        if(Services_JSON::isError($encoded_value)) {            return $encoded_value;        }        return $this->encode(strval($name)) . ':' . $encoded_value;    }   /**    * reduce a string by removing leading and trailing comments and whitespace    *    * @param    $str    string      string value to strip of comments and whitespace    *    * @return   string  string value stripped of comments and whitespace    * @access   private    */    function reduce_string($str)    {        $str = preg_replace(array(                // eliminate single line comments in '// ...' form                '#^\s*//(.+)$#m',                // eliminate multi-line comments in '/* ... */' form, at start of string                '#^\s*/\*(.+)\*/#Us',                // eliminate multi-line comments in '/* ... */' form, at end of string                '#/\*(.+)\*/\s*$#Us'            ), '', $str);        // eliminate extraneous space        return trim($str);    }   /**    * decodes a JSON string into appropriate variable    *    * @param    string  $str    JSON-formatted string    *    * @return   mixed   number, boolean, string, array, or object    *                   corresponding to given JSON input string.    *                   See argument 1 to Services_JSON() above for object-output behavior.    *                   Note that decode() always returns strings    *                   in ASCII or UTF-8 format!    * @access   public    */    function decode($str)    {        $str = $this->reduce_string($str);        switch (strtolower($str)) {            case 'true':                return true;            case 'false':                return false;            case 'null':                return null;            default:                $m = array();                if (is_numeric($str)) {                    // Lookie-loo, it's a number                    // This would work on its own, but I'm trying to be                    // good about returning integers where appropriate:                    // return (float)$str;                    // Return float or int, as appropriate                    return ((float)$str == (integer)$str)                        ? (integer)$str                        : (float)$str;                } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) {                    // STRINGS RETURNED IN UTF-8 FORMAT                    $delim = substr($str, 0, 1);                    $chrs = substr($str, 1, -1);                    $utf8 = '';                    $strlen_chrs = strlen($chrs);                    for ($c = 0; $c < $strlen_chrs; ++$c) {                        $substr_chrs_c_2 = substr($chrs, $c, 2);                        $ord_chrs_c = ord($chrs{$c});                        switch (true) {                            case $substr_chrs_c_2 == '\b':                                $utf8 .= chr(0x08);                                ++$c;                                break;                            case $substr_chrs_c_2 == '\t':                                $utf8 .= chr(0x09);                                ++$c;                                break;                            case $substr_chrs_c_2 == '\n':                                $utf8 .= chr(0x0A);                                ++$c;                                break;                            case $substr_chrs_c_2 == '\f':                                $utf8 .= chr(0x0C);                                ++$c;                                break;                            case $substr_chrs_c_2 == '\r':                                $utf8 .= chr(0x0D);                                ++$c;                                break;                            case $substr_chrs_c_2 == '\\"':                            case $substr_chrs_c_2 == '\\\'':                            case $substr_chrs_c_2 == '\\\\':                            case $substr_chrs_c_2 == '\\/':                                if (($delim == '"' && $substr_chrs_c_2 != '\\\'') ||                                   ($delim == "'" && $substr_chrs_c_2 != '\\"')) {                                    $utf8 .= $chrs{++$c};                                }                                break;                            case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):                                // single, escaped unicode character                                $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))                                       . chr(hexdec(substr($chrs, ($c + 4), 2)));                                $utf8 .= $this->utf162utf8($utf16);                                $c += 5;                                break;                            case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):                                $utf8 .= $chrs{$c};                                break;                            case ($ord_chrs_c & 0xE0) == 0xC0:                                // characters U-00000080 - U-000007FF, mask 110XXXXX                                //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                                $utf8 .= substr($chrs, $c, 2);                                ++$c;                                break;                            case ($ord_chrs_c & 0xF0) == 0xE0:                                // characters U-00000800 - U-0000FFFF, mask 1110XXXX                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                                $utf8 .= substr($chrs, $c, 3);                                $c += 2;                                break;                            case ($ord_chrs_c & 0xF8) == 0xF0:                                // characters U-00010000 - U-001FFFFF, mask 11110XXX                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                                $utf8 .= substr($chrs, $c, 4);                                $c += 3;                                break;                            case ($ord_chrs_c & 0xFC) == 0xF8:                                // characters U-00200000 - U-03FFFFFF, mask 111110XX                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                                $utf8 .= substr($chrs, $c, 5);                                $c += 4;                                break;                            case ($ord_chrs_c & 0xFE) == 0xFC:                                // characters U-04000000 - U-7FFFFFFF, mask 1111110X                                // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8                                $utf8 .= substr($chrs, $c, 6);                                $c += 5;                                break;                        }                    }                    return $utf8;                } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) {                    // array, or object notation                    if ($str{0} == '[') {                        $stk = array(SERVICES_JSON_IN_ARR);                        $arr = array();                    } else {                        if ($this->use & SERVICES_JSON_LOOSE_TYPE) {                            $stk = array(SERVICES_JSON_IN_OBJ);                            $obj = array();                        } else {                            $stk = array(SERVICES_JSON_IN_OBJ);                            $obj = new stdClass();                        }                    }                    array_push($stk, array('what'  => SERVICES_JSON_SLICE,                                           'where' => 0,                                           'delim' => false));                    $chrs = substr($str, 1, -1);                    $chrs = $this->reduce_string($chrs);                    if ($chrs == '') {                        if (reset($stk) == SERVICES_JSON_IN_ARR) {                            return $arr;                        } else {                            return $obj;                        }                    }                    //print("\nparsing {$chrs}\n");                    $strlen_chrs = strlen($chrs);                    for ($c = 0; $c <= $strlen_chrs; ++$c) {                        $top = end($stk);                        $substr_chrs_c_2 = substr($chrs, $c, 2);                        if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {                            // found a comma that is not inside a string, array, etc.,                            // OR we've reached the end of the character list                            $slice = substr($chrs, $top['where'], ($c - $top['where']));                            array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));                            //print("Found split at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");                            if (reset($stk) == SERVICES_JSON_IN_ARR) {                                // we are in an array, so just push an element onto the stack                                array_push($arr, $this->decode($slice));                            } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {                                // we are in an object, so figure                                // out the property name and set an                                // element in an associative array,                                // for now                                $parts = array();                                                                if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {                                    // "name":value pair                                    $key = $this->decode($parts[1]);                                    $val = $this->decode($parts[2]);                                    if ($this->use & SERVICES_JSON_LOOSE_TYPE) {                                        $obj[$key] = $val;                                    } else {                                        $obj->$key = $val;                                    }                                } elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) {                                    // name:value pair, where name is unquoted                                    $key = $parts[1];                                    $val = $this->decode($parts[2]);                                    if ($this->use & SERVICES_JSON_LOOSE_TYPE) {                                        $obj[$key] = $val;                                    } else {                                        $obj->$key = $val;                                    }                                }                            }                        } elseif ((($chrs{$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != SERVICES_JSON_IN_STR)) {                            // found a quote, and we are not inside a string                            array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));                            //print("Found start of string at {$c}\n");                        } elseif (($chrs{$c} == $top['delim']) &&                                 ($top['what'] == SERVICES_JSON_IN_STR) &&                                 ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) {                            // found a quote, we're in a string, and it's not escaped                            // we know that it's not escaped becase there is _not_ an                            // odd number of backslashes at the end of the string so far                            array_pop($stk);                            //print("Found end of string at {$c}: ".substr($chrs, $top['where'], (1 + 1 + $c - $top['where']))."\n");                        } elseif (($chrs{$c} == '[') &&                                 in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {                            // found a left-bracket, and we are in an array, object, or slice                            array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));                            //print("Found start of array at {$c}\n");                        } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {                            // found a right-bracket, and we're in an array                            array_pop($stk);                            //print("Found end of array at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");                        } elseif (($chrs{$c} == '{') &&                                 in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {                            // found a left-brace, and we are in an array, object, or slice                            array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));                            //print("Found start of object at {$c}\n");                        } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {                            // found a right-brace, and we're in an object                            array_pop($stk);                            //print("Found end of object at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");                        } elseif (($substr_chrs_c_2 == '/*') &&                                 in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {                            // found a comment start, and we are in an array, object, or slice                            array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));                            $c++;                            //print("Found start of comment at {$c}\n");                        } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {                            // found a comment end, and we're in one now                            array_pop($stk);                            $c++;                            for ($i = $top['where']; $i <= $c; ++$i)                                $chrs = substr_replace($chrs, ' ', $i, 1);                            //print("Found end of comment at {$c}: ".substr($chrs, $top['where'], (1 + $c - $top['where']))."\n");                        }                    }                    if (reset($stk) == SERVICES_JSON_IN_ARR) {                        return $arr;                    } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {                        return $obj;                    }                }        }    }    /**     * @todo Ultimately, this should just call PEAR::isError()     */    function isError($data, $code = null)    {        if (class_exists('pear')) {            return PEAR::isError($data, $code);        } elseif (is_object($data) && (get_class($data) == 'services_json_error' ||                                 is_subclass_of($data, 'services_json_error'))) {            return true;        }        return false;    }}if (class_exists('PEAR_Error')) {    class Services_JSON_Error extends PEAR_Error    {        function Services_JSON_Error($message = 'unknown error', $code = null,                                     $mode = null, $options = null, $userinfo = null)        {            parent::PEAR_Error($message, $code, $mode, $options, $userinfo);        }    }} else {    /**     * @todo Ultimately, this class shall be descended from PEAR_Error     */    class Services_JSON_Error    {        function Services_JSON_Error($message = 'unknown error', $code = null,                                     $mode = null, $options = null, $userinfo = null)        {        }    }}    ?> - diff --git a/tests/textcode/data/markup_expected/Label.html b/tests/textcode/data/markup_expected/Label.html deleted file mode 100644 index 38910f9a04d..00000000000 --- a/tests/textcode/data/markup_expected/Label.html +++ /dev/null @@ -1,644 +0,0 @@ - - - -Label (Java 2 Platform SE 5.0_13) - - - - - - - - - - - - - - - - - -function windowTitle() -{ - parent.document.title="Label (Java 2 Platform SE 5.0_13)"; -} - - - - - - - - - - - - - - - - - - - Overview  - Package  -  Class  - Use  - Tree  - Deprecated  - Index  - Help  - - - - -JavaTM 2 PlatformStandard Ed. 5.0_13 - - - - - - PREV CLASS  - NEXT CLASS - - FRAMES   - NO FRAMES   -  - - - - All Classes - - - - - - - - SUMMARY: NESTED | FIELD | CONSTR | METHOD - -DETAIL: FIELD | CONSTR | METHOD - - - - - - - - - -java.awt - -Class Label -java.lang.Object - java.awt.Component - java.awt.Label - - -All Implemented Interfaces: ImageObserver, MenuContainer, Serializable, Accessible - - - -public class Labelextends Componentimplements Accessible - - - -A Label object is a component for placing text in a - container. A label displays a single line of read-only text. - The text can be changed by the application, but a user cannot edit it - directly. - - For example, the code . . . - - setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10)); - add(new Label("Hi There!")); - add(new Label("Another Label")); - - - produces the following labels: - - - - - - -Since: - JDK1.0 -See Also:Serialized Form - - - - - - - - - -Nested Class Summary - - - -protected  class -Label.AccessibleAWTLabel - - -          This class implements accessibility support for the - Label class. - - -  - - -Nested classes/interfaces inherited from class java.awt.Component - - -Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy - - -  - - - - - - -Field Summary - - - -static int -CENTER - - -          Indicates that the label should be centered. - - - -static int -LEFT - - -          Indicates that the label should be left justified. - - - -static int -RIGHT - - -          Indicates that the label should be right justified. - - -  - - -Fields inherited from class java.awt.Component - - -BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT - - -  - - -Fields inherited from interface java.awt.image.ImageObserver - - -ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH - - -  - - - - - - -Constructor Summary - - -Label() - - -          Constructs an empty label. - - -Label(String text) - - -          Constructs a new label with the specified string of text, - left justified. - - -Label(String text, - int alignment) - - -          Constructs a new label that presents the specified string of - text with the specified alignment. - - -  - - - - - - -Method Summary - - - - void -addNotify() - - -          Creates the peer for this label. - - - - AccessibleContext -getAccessibleContext() - - -          Gets the AccessibleContext associated with this Label. - - - - int -getAlignment() - - -          Gets the current alignment of this label. - - - - String -getText() - - -          Gets the text of this label. - - - -protected  String -paramString() - - -          Returns a string representing the state of this Label. - - - - void -setAlignment(int alignment) - - -          Sets the alignment for this label to the specified alignment. - - - - void -setText(String text) - - -          Sets the text for this label to the specified text. - - -  - - -Methods inherited from class java.awt.Component - - -action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate - - -  - - -Methods inherited from class java.lang.Object - - -clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait - - -  - - - - - - - - -Field Detail - - - - -LEFT -public static final int LEFT - -Indicates that the label should be left justified. - - -See Also:Constant Field Values - - - - -CENTER -public static final int CENTER - -Indicates that the label should be centered. - - -See Also:Constant Field Values - - - - -RIGHT -public static final int RIGHT - -Indicates that the label should be right justified. - - -Since: - JDK1.0t. -See Also:Constant Field Values - - - - - - - - -Constructor Detail - - - - -Label -public Label() - throws HeadlessException - -Constructs an empty label. - The text of the label is the empty string "". - - - -Throws: -HeadlessException - if GraphicsEnvironment.isHeadless() - returns true.See Also:GraphicsEnvironment.isHeadless() - - - - -Label -public Label(String text) - throws HeadlessException - -Constructs a new label with the specified string of text, - left justified. - - -Parameters:text - the string that the label presents. - A null value - will be accepted without causing a NullPointerException - to be thrown. -Throws: -HeadlessException - if GraphicsEnvironment.isHeadless() - returns true.See Also:GraphicsEnvironment.isHeadless() - - - - -Label -public Label(String text, - int alignment) - throws HeadlessException - -Constructs a new label that presents the specified string of - text with the specified alignment. - Possible values for alignment are Label.LEFT, - Label.RIGHT, and Label.CENTER. - - -Parameters:text - the string that the label presents. - A null value - will be accepted without causing a NullPointerException - to be thrown.alignment - the alignment value. -Throws: -HeadlessException - if GraphicsEnvironment.isHeadless() - returns true.See Also:GraphicsEnvironment.isHeadless() - - - - - - - - -Method Detail - - - - -addNotify -public void addNotify() - -Creates the peer for this label. The peer allows us to - modify the appearance of the label without changing its - functionality. - - -Overrides:addNotify in class Component - - -See Also:Component.isDisplayable(), -Component.removeNotify() - - - - - -getAlignment -public int getAlignment() - -Gets the current alignment of this label. Possible values are - Label.LEFT, Label.RIGHT, and - Label.CENTER. - - - - - -See Also:setAlignment(int) - - - - - -setAlignment -public void setAlignment(int alignment) - -Sets the alignment for this label to the specified alignment. - Possible values are Label.LEFT, - Label.RIGHT, and Label.CENTER. - - - - - -Parameters:alignment - the alignment to be set. -Throws: -IllegalArgumentException - if an improper value for - alignment is given.See Also:getAlignment() - - - - - -getText -public String getText() - -Gets the text of this label. - - - - - - -Returns:the text of this label, or null if - the text has been set to null.See Also:setText(java.lang.String) - - - - - -setText -public void setText(String text) - -Sets the text for this label to the specified text. - - - - - -Parameters:text - the text that this label displays. If - text is null, it is - treated for display purposes like an empty - string "".See Also:getText() - - - - - -paramString -protected String paramString() - -Returns a string representing the state of this Label. - This method is intended to be used only for debugging purposes, and the - content and format of the returned string may vary between - implementations. The returned string may be empty but may not be - null. - - -Overrides:paramString in class Component - - - -Returns:the parameter string of this label - - - - - -getAccessibleContext -public AccessibleContext getAccessibleContext() - -Gets the AccessibleContext associated with this Label. - For labels, the AccessibleContext takes the form of an - AccessibleAWTLabel. - A new AccessibleAWTLabel instance is created if necessary. - - -Specified by:getAccessibleContext in interface AccessibleOverrides:getAccessibleContext in class Component - - - -Returns:an AccessibleAWTLabel that serves as the - AccessibleContext of this Label - - - - - - - - - - - - - - - - Overview  - Package  -  Class  - Use  - Tree  - Deprecated  - Index  - Help  - - - - -JavaTM 2 PlatformStandard Ed. 5.0_13 - - - - - - PREV CLASS  - NEXT CLASS - - FRAMES   - NO FRAMES   -  - - - - All Classes - - - - - - - - SUMMARY: NESTED | FIELD | CONSTR | METHOD - -DETAIL: FIELD | CONSTR | METHOD - - - - - - -Submit a bug or featureFor further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy. - - diff --git a/tests/textcode/data/markup_expected/Label.html.demarkup.json b/tests/textcode/data/markup_expected/Label.html.demarkup.json new file mode 100644 index 00000000000..22f473b6a83 --- /dev/null +++ b/tests/textcode/data/markup_expected/Label.html.demarkup.json @@ -0,0 +1,665 @@ +[ + "HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">", + "", + "", + "", + "Generated by javadoc (build 1.5.0_13) on Fri Jun 27 03:49:51 PDT 2008 -->", + "", + "Label (Java 2 Platform SE 5.0_13)", + "", + "", + "NAME=\"keywords\" CONTENT=\"java.awt.Label class\">", + "NAME=\"keywords\" CONTENT=\"LEFT\">", + "NAME=\"keywords\" CONTENT=\"CENTER\">", + "NAME=\"keywords\" CONTENT=\"RIGHT\">", + "NAME=\"keywords\" CONTENT=\"addNotify()\">", + "NAME=\"keywords\" CONTENT=\"getAlignment()\">", + "NAME=\"keywords\" CONTENT=\"setAlignment()\">", + "NAME=\"keywords\" CONTENT=\"getText()\">", + "NAME=\"keywords\" CONTENT=\"setText()\">", + "NAME=\"keywords\" CONTENT=\"paramString()\">", + "NAME=\"keywords\" CONTENT=\"getAccessibleContext()\">", + "", + "REL =\"stylesheet\" TYPE=\"text/css\" =\"../../stylesheet.css\" TITLE=\"Style\">", + "", + "type=\"text/javascript\">", + "function windowTitle()", + "{", + "parent.document.title=\"Label (Java 2 Platform SE 5.0_13)\";", + "}", + "", + "", + "", + "", + "", + "", + "BGCOLOR=\"white\" onload=\"windowTitle();\">", + "", + "", + "========= START OF TOP NAVBAR ======= -->", + "NAME=\"navbar_top\"> -->", + "=\"#skip-navbar_top\" title=\"Skip navigation links\">", + "BORDER=\"0\" WIDTH=\"100%\" CELLPADDING=\"1\" CELLSPACING=\"0\" SUMMARY=\"\">", + "", + "COLSPAN=2 BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\">", + "NAME=\"navbar_top_firstrow\"> -->", + "BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"3\" SUMMARY=\"\">", + "ALIGN=\"center\" VALIGN=\"top\">", + "BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> =\"../../overview-summary.html\"> CLASS=\"NavBarFont1\"> Overview", + "BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> =\"package-summary.html\"> CLASS=\"NavBarFont1\"> Package", + "BGCOLOR=\"#FFFFFF\" CLASS=\"NavBarCell1Rev\"> CLASS=\"NavBarFont1Rev\"> Class", + "BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> =\"class-use/Label.html\"> CLASS=\"NavBarFont1\"> Use", + "BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> =\"package-tree.html\"> CLASS=\"NavBarFont1\"> Tree", + "BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> =\"../../deprecated-list.html\"> CLASS=\"NavBarFont1\"> Deprecated", + "BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> =\"../../index-files/index-1.html\"> CLASS=\"NavBarFont1\"> Index", + "BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> =\"../../help-doc.html\"> CLASS=\"NavBarFont1\"> Help", + "", + "", + "", + "ALIGN=\"right\" VALIGN=\"top\" ROWSPAN=3>", + "Java size=-2>TM 2 Platform Standard Ed. 5.0_13", + "", + "", + "", + "", + "BGCOLOR=\"white\" CLASS=\"NavBarCell2\"> SIZE=\"-2\">", + "=\"../../java/awt/KeyEventPostProcessor.html\" title=\"interface in java.awt\"> PREV CLASS", + "=\"../../java/awt/Label.AccessibleAWTLabel.html\" title=\"class in java.awt\"> NEXT CLASS", + "BGCOLOR=\"white\" CLASS=\"NavBarCell2\"> SIZE=\"-2\">", + "=\"../../index.html?java/awt/Label.html\" target=\"_top\"> FRAMES", + "=\"Label.html\" target=\"_top\"> NO FRAMES", + "type=\"text/javascript\">", + "", + "if(window==top) {", + "document.writeln(' =\"../../allclasses-noframe.html\"> All Classes ');", + "}", + "//-->", + "", + "", + "=\"../../allclasses-noframe.html\"> All Classes", + "", + "", + "", + "", + "", + "", + "VALIGN=\"top\" CLASS=\"NavBarCell3\"> SIZE=\"-2\">", + "SUMMARY: =\"#nested_class_summary\">NESTED | =\"#field_summary\">FIELD | =\"#constructor_summary\">CONSTR | =\"#method_summary\">METHOD", + "VALIGN=\"top\" CLASS=\"NavBarCell3\"> SIZE=\"-2\">", + "DETAIL: =\"#field_detail\">FIELD | =\"#constructor_detail\">CONSTR | =\"#method_detail\">METHOD", + "", + "", + "NAME=\"skip-navbar_top\">", + "========= END OF TOP NAVBAR ========= -->", + "", + "", + "======== START OF CLASS DATA ======== -->", + "

    ", + "SIZE=\"-1\">", + "java.awt", + "", + "Class Label

    ", + "", + "=\"../../java/lang/Object.html\" title=\"class in java.lang\">java.lang.Object", + "SRC=\"../../resources/inherit.gif\" ALT=\"extended by \"> =\"../../java/awt/Component.html\" title=\"class in java.awt\">java.awt.Component", + "SRC=\"../../resources/inherit.gif\" ALT=\"extended by \"> java.awt.Label", + "", + "", + "All Implemented Interfaces: =\"../../java/awt/image/ImageObserver.html\" title=\"interface in java.awt.image\">ImageObserver , =\"../../java/awt/MenuContainer.html\" title=\"interface in java.awt\">MenuContainer , =\"../../java/io/Serializable.html\" title=\"interface in java.io\">Serializable , =\"../../javax/accessibility/Accessible.html\" title=\"interface in javax.accessibility\">Accessible", + "", + "", + "", + "public class Label extends =\"../../java/awt/Component.html\" title=\"class in java.awt\">Component implements =\"../../javax/accessibility/Accessible.html\" title=\"interface in javax.accessibility\">Accessible", + "", + "", + "", + "A Label object is a component for placing text in a", + "container. A label displays a single line of read-only text.", + "The text can be changed by the application, but a user cannot edit it", + "directly.", + "", + "For example, the code . . .", + "", + "", + "setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10));", + "add(new Label(\"Hi There!\"));", + "add(new Label(\"Another Label\"));", + "", + "", + "produces the following labels:", + "", + "src=\"doc-files/Label-1.gif\" alt=\"Two labels: 'Hi There!' and 'Another label'\"", + "ALIGN=center HSPACE=10 VSPACE=7>", + "", + "", + "", + "", + "Since:", + "JDK1.0", + "See Also: =\"../../serialized-form.html#java.awt.Label\">Serialized Form", + "", + "", + "", + "======== NESTED CLASS SUMMARY ======== -->", + "", + "NAME=\"nested_class_summary\"> -->", + "BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">", + "BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\">", + "ALIGN=\"left\" COLSPAN=\"2\"> SIZE=\"+2\">", + "Nested Class Summary", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"> SIZE=\"-1\">", + "protected class", + "=\"../../java/awt/Label.AccessibleAWTLabel.html\" title=\"class in java.awt\">Label.AccessibleAWTLabel", + "", + "", + "This class implements accessibility support for the", + "Label class.", + "", + "", + "NAME=\"nested_classes_inherited_from_class_java.awt.Component\"> -->", + "BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">", + "BGCOLOR=\"#EEEEFF\" CLASS=\"TableSubHeadingColor\">", + "ALIGN=\"left\"> Nested classes/interfaces inherited from class java.awt. =\"../../java/awt/Component.html\" title=\"class in java.awt\">Component", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "=\"../../java/awt/Component.AccessibleAWTComponent.html\" title=\"class in java.awt\">Component.AccessibleAWTComponent , =\"../../java/awt/Component.BltBufferStrategy.html\" title=\"class in java.awt\">Component.BltBufferStrategy , =\"../../java/awt/Component.FlipBufferStrategy.html\" title=\"class in java.awt\">Component.FlipBufferStrategy", + "", + "", + "", + "=========== FIELD SUMMARY =========== -->", + "", + "NAME=\"field_summary\"> -->", + "BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">", + "BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\">", + "ALIGN=\"left\" COLSPAN=\"2\"> SIZE=\"+2\">", + "Field Summary", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"> SIZE=\"-1\">", + "static int", + "=\"../../java/awt/Label.html#CENTER\">CENTER", + "", + "", + "Indicates that the label should be centered.", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"> SIZE=\"-1\">", + "static int", + "=\"../../java/awt/Label.html#LEFT\">LEFT", + "", + "", + "Indicates that the label should be left justified.", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"> SIZE=\"-1\">", + "static int", + "=\"../../java/awt/Label.html#RIGHT\">RIGHT", + "", + "", + "Indicates that the label should be right justified.", + "", + "", + "NAME=\"fields_inherited_from_class_java.awt.Component\"> -->", + "BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">", + "BGCOLOR=\"#EEEEFF\" CLASS=\"TableSubHeadingColor\">", + "ALIGN=\"left\"> Fields inherited from class java.awt. =\"../../java/awt/Component.html\" title=\"class in java.awt\">Component", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "=\"../../java/awt/Component.html#BOTTOM_ALIGNMENT\">BOTTOM_ALIGNMENT , =\"../../java/awt/Component.html#CENTER_ALIGNMENT\">CENTER_ALIGNMENT , =\"../../java/awt/Component.html#LEFT_ALIGNMENT\">LEFT_ALIGNMENT , =\"../../java/awt/Component.html#RIGHT_ALIGNMENT\">RIGHT_ALIGNMENT , =\"../../java/awt/Component.html#TOP_ALIGNMENT\">TOP_ALIGNMENT", + "", + "", + "NAME=\"fields_inherited_from_class_java.awt.image.ImageObserver\"> -->", + "BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">", + "BGCOLOR=\"#EEEEFF\" CLASS=\"TableSubHeadingColor\">", + "ALIGN=\"left\"> Fields inherited from interface java.awt.image. =\"../../java/awt/image/ImageObserver.html\" title=\"interface in java.awt.image\">ImageObserver", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "=\"../../java/awt/image/ImageObserver.html#ABORT\">ABORT , =\"../../java/awt/image/ImageObserver.html#ALLBITS\">ALLBITS , =\"../../java/awt/image/ImageObserver.html#ERROR\">ERROR , =\"../../java/awt/image/ImageObserver.html#FRAMEBITS\">FRAMEBITS , =\"../../java/awt/image/ImageObserver.html#HEIGHT\">HEIGHT , =\"../../java/awt/image/ImageObserver.html#PROPERTIES\">PROPERTIES , =\"../../java/awt/image/ImageObserver.html#SOMEBITS\">SOMEBITS , =\"../../java/awt/image/ImageObserver.html#WIDTH\">WIDTH", + "", + "", + "", + "======== CONSTRUCTOR SUMMARY ======== -->", + "", + "NAME=\"constructor_summary\"> -->", + "BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">", + "BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\">", + "ALIGN=\"left\" COLSPAN=\"2\"> SIZE=\"+2\">", + "Constructor Summary", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "=\"../../java/awt/Label.html#Label()\">Label ()", + "", + "", + "Constructs an empty label.", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "=\"../../java/awt/Label.html#Label(java.lang.String)\">Label ( =\"../../java/lang/String.html\" title=\"class in java.lang\">String text)", + "", + "", + "Constructs a new label with the specified string of text,", + "left justified.", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "=\"../../java/awt/Label.html#Label(java.lang.String, int)\">Label ( =\"../../java/lang/String.html\" title=\"class in java.lang\">String text,", + "int alignment)", + "", + "", + "Constructs a new label that presents the specified string of", + "text with the specified alignment.", + "", + "", + "", + "========== METHOD SUMMARY =========== -->", + "", + "NAME=\"method_summary\"> -->", + "BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">", + "BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\">", + "ALIGN=\"left\" COLSPAN=\"2\"> SIZE=\"+2\">", + "Method Summary", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"> SIZE=\"-1\">", + "void", + "=\"../../java/awt/Label.html#addNotify()\">addNotify ()", + "", + "", + "Creates the peer for this label.", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"> SIZE=\"-1\">", + "=\"../../javax/accessibility/AccessibleContext.html\" title=\"class in javax.accessibility\">AccessibleContext", + "=\"../../java/awt/Label.html#getAccessibleContext()\">getAccessibleContext ()", + "", + "", + "Gets the AccessibleContext associated with this Label.", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"> SIZE=\"-1\">", + "int", + "=\"../../java/awt/Label.html#getAlignment()\">getAlignment ()", + "", + "", + "Gets the current alignment of this label.", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"> SIZE=\"-1\">", + "=\"../../java/lang/String.html\" title=\"class in java.lang\">String", + "=\"../../java/awt/Label.html#getText()\">getText ()", + "", + "", + "Gets the text of this label.", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"> SIZE=\"-1\">", + "protected =\"../../java/lang/String.html\" title=\"class in java.lang\">String", + "=\"../../java/awt/Label.html#paramString()\">paramString ()", + "", + "", + "Returns a string representing the state of this Label .", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"> SIZE=\"-1\">", + "void", + "=\"../../java/awt/Label.html#setAlignment(int)\">setAlignment (int alignment)", + "", + "", + "Sets the alignment for this label to the specified alignment.", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"> SIZE=\"-1\">", + "void", + "=\"../../java/awt/Label.html#setText(java.lang.String)\">setText ( =\"../../java/lang/String.html\" title=\"class in java.lang\">String text)", + "", + "", + "Sets the text for this label to the specified text.", + "", + "", + "NAME=\"methods_inherited_from_class_java.awt.Component\"> -->", + "BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">", + "BGCOLOR=\"#EEEEFF\" CLASS=\"TableSubHeadingColor\">", + "ALIGN=\"left\"> Methods inherited from class java.awt. =\"../../java/awt/Component.html\" title=\"class in java.awt\">Component", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "=\"../../java/awt/Component.html#action(java.awt.Event, java.lang.Object)\">action , =\"../../java/awt/Component.html#add(java.awt.PopupMenu)\">add , =\"../../java/awt/Component.html#addComponentListener(java.awt.event.ComponentListener)\">addComponentListener , =\"../../java/awt/Component.html#addFocusListener(java.awt.event.FocusListener)\">addFocusListener , =\"../../java/awt/Component.html#addHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener)\">addHierarchyBoundsListener , =\"../../java/awt/Component.html#addHierarchyListener(java.awt.event.HierarchyListener)\">addHierarchyListener , =\"../../java/awt/Component.html#addInputMethodListener(java.awt.event.InputMethodListener)\">addInputMethodListener , =\"../../java/awt/Component.html#addKeyListener(java.awt.event.KeyListener)\">addKeyListener , =\"../../java/awt/Component.html#addMouseListener(java.awt.event.MouseListener)\">addMouseListener , =\"../../java/awt/Component.html#addMouseMotionListener(java.awt.event.MouseMotionListener)\">addMouseMotionListener , =\"../../java/awt/Component.html#addMouseWheelListener(java.awt.event.MouseWheelListener)\">addMouseWheelListener , =\"../../java/awt/Component.html#addPropertyChangeListener(java.beans.PropertyChangeListener)\">addPropertyChangeListener , =\"../../java/awt/Component.html#addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)\">addPropertyChangeListener , =\"../../java/awt/Component.html#applyComponentOrientation(java.awt.ComponentOrientation)\">applyComponentOrientation , =\"../../java/awt/Component.html#areFocusTraversalKeysSet(int)\">areFocusTraversalKeysSet , =\"../../java/awt/Component.html#bounds()\">bounds , =\"../../java/awt/Component.html#checkImage(java.awt.Image, java.awt.image.ImageObserver)\">checkImage , =\"../../java/awt/Component.html#checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver)\">checkImage , =\"../../java/awt/Component.html#coalesceEvents(java.awt.AWTEvent, java.awt.AWTEvent)\">coalesceEvents , =\"../../java/awt/Component.html#contains(int, int)\">contains , =\"../../java/awt/Component.html#contains(java.awt.Point)\">contains , =\"../../java/awt/Component.html#createImage(java.awt.image.ImageProducer)\">createImage , =\"../../java/awt/Component.html#createImage(int, int)\">createImage , =\"../../java/awt/Component.html#createVolatileImage(int, int)\">createVolatileImage , =\"../../java/awt/Component.html#createVolatileImage(int, int, java.awt.ImageCapabilities)\">createVolatileImage , =\"../../java/awt/Component.html#deliverEvent(java.awt.Event)\">deliverEvent , =\"../../java/awt/Component.html#disable()\">disable , =\"../../java/awt/Component.html#disableEvents(long)\">disableEvents , =\"../../java/awt/Component.html#dispatchEvent(java.awt.AWTEvent)\">dispatchEvent , =\"../../java/awt/Component.html#doLayout()\">doLayout , =\"../../java/awt/Component.html#enable()\">enable , =\"../../java/awt/Component.html#enable(boolean)\">enable , =\"../../java/awt/Component.html#enableEvents(long)\">enableEvents , =\"../../java/awt/Component.html#enableInputMethods(boolean)\">enableInputMethods , =\"../../java/awt/Component.html#firePropertyChange(java.lang.String, boolean, boolean)\">firePropertyChange , =\"../../java/awt/Component.html#firePropertyChange(java.lang.String, byte, byte)\">firePropertyChange , =\"../../java/awt/Component.html#firePropertyChange(java.lang.String, char, char)\">firePropertyChange , =\"../../java/awt/Component.html#firePropertyChange(java.lang.String, double, double)\">firePropertyChange , =\"../../java/awt/Component.html#firePropertyChange(java.lang.String, float, float)\">firePropertyChange , =\"../../java/awt/Component.html#firePropertyChange(java.lang.String, int, int)\">firePropertyChange , =\"../../java/awt/Component.html#firePropertyChange(java.lang.String, long, long)\">firePropertyChange , =\"../../java/awt/Component.html#firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)\">firePropertyChange , =\"../../java/awt/Component.html#firePropertyChange(java.lang.String, short, short)\">firePropertyChange , =\"../../java/awt/Component.html#getAlignmentX()\">getAlignmentX , =\"../../java/awt/Component.html#getAlignmentY()\">getAlignmentY , =\"../../java/awt/Component.html#getBackground()\">getBackground , =\"../../java/awt/Component.html#getBounds()\">getBounds , =\"../../java/awt/Component.html#getBounds(java.awt.Rectangle)\">getBounds , =\"../../java/awt/Component.html#getColorModel()\">getColorModel , =\"../../java/awt/Component.html#getComponentAt(int, int)\">getComponentAt , =\"../../java/awt/Component.html#getComponentAt(java.awt.Point)\">getComponentAt , =\"../../java/awt/Component.html#getComponentListeners()\">getComponentListeners , =\"../../java/awt/Component.html#getComponentOrientation()\">getComponentOrientation , =\"../../java/awt/Component.html#getCursor()\">getCursor , =\"../../java/awt/Component.html#getDropTarget()\">getDropTarget , =\"../../java/awt/Component.html#getFocusCycleRootAncestor()\">getFocusCycleRootAncestor , =\"../../java/awt/Component.html#getFocusListeners()\">getFocusListeners , =\"../../java/awt/Component.html#getFocusTraversalKeys(int)\">getFocusTraversalKeys , =\"../../java/awt/Component.html#getFocusTraversalKeysEnabled()\">getFocusTraversalKeysEnabled , =\"../../java/awt/Component.html#getFont()\">getFont , =\"../../java/awt/Component.html#getFontMetrics(java.awt.Font)\">getFontMetrics , =\"../../java/awt/Component.html#getForeground()\">getForeground , =\"../../java/awt/Component.html#getGraphics()\">getGraphics , =\"../../java/awt/Component.html#getGraphicsConfiguration()\">getGraphicsConfiguration , =\"../../java/awt/Component.html#getHeight()\">getHeight , =\"../../java/awt/Component.html#getHierarchyBoundsListeners()\">getHierarchyBoundsListeners , =\"../../java/awt/Component.html#getHierarchyListeners()\">getHierarchyListeners , =\"../../java/awt/Component.html#getIgnoreRepaint()\">getIgnoreRepaint , =\"../../java/awt/Component.html#getInputContext()\">getInputContext , =\"../../java/awt/Component.html#getInputMethodListeners()\">getInputMethodListeners , =\"../../java/awt/Component.html#getInputMethodRequests()\">getInputMethodRequests , =\"../../java/awt/Component.html#getKeyListeners()\">getKeyListeners , =\"../../java/awt/Component.html#getListeners(java.lang.Class)\">getListeners , =\"../../java/awt/Component.html#getLocale()\">getLocale , =\"../../java/awt/Component.html#getLocation()\">getLocation , =\"../../java/awt/Component.html#getLocation(java.awt.Point)\">getLocation , =\"../../java/awt/Component.html#getLocationOnScreen()\">getLocationOnScreen , =\"../../java/awt/Component.html#getMaximumSize()\">getMaximumSize , =\"../../java/awt/Component.html#getMinimumSize()\">getMinimumSize , =\"../../java/awt/Component.html#getMouseListeners()\">getMouseListeners , =\"../../java/awt/Component.html#getMouseMotionListeners()\">getMouseMotionListeners , =\"../../java/awt/Component.html#getMousePosition()\">getMousePosition , =\"../../java/awt/Component.html#getMouseWheelListeners()\">getMouseWheelListeners , =\"../../java/awt/Component.html#getName()\">getName , =\"../../java/awt/Component.html#getParent()\">getParent , =\"../../java/awt/Component.html#getPeer()\">getPeer , =\"../../java/awt/Component.html#getPreferredSize()\">getPreferredSize , =\"../../java/awt/Component.html#getPropertyChangeListeners()\">getPropertyChangeListeners , =\"../../java/awt/Component.html#getPropertyChangeListeners(java.lang.String)\">getPropertyChangeListeners , =\"../../java/awt/Component.html#getSize()\">getSize , =\"../../java/awt/Component.html#getSize(java.awt.Dimension)\">getSize , =\"../../java/awt/Component.html#getToolkit()\">getToolkit , =\"../../java/awt/Component.html#getTreeLock()\">getTreeLock , =\"../../java/awt/Component.html#getWidth()\">getWidth , =\"../../java/awt/Component.html#getX()\">getX , =\"../../java/awt/Component.html#getY()\">getY , =\"../../java/awt/Component.html#gotFocus(java.awt.Event, java.lang.Object)\">gotFocus , =\"../../java/awt/Component.html#handleEvent(java.awt.Event)\">handleEvent , =\"../../java/awt/Component.html#hasFocus()\">hasFocus , =\"../../java/awt/Component.html#hide()\">hide , =\"../../java/awt/Component.html#imageUpdate(java.awt.Image, int, int, int, int, int)\">imageUpdate , =\"../../java/awt/Component.html#inside(int, int)\">inside , =\"../../java/awt/Component.html#invalidate()\">invalidate , =\"../../java/awt/Component.html#isBackgroundSet()\">isBackgroundSet , =\"../../java/awt/Component.html#isCursorSet()\">isCursorSet , =\"../../java/awt/Component.html#isDisplayable()\">isDisplayable , =\"../../java/awt/Component.html#isDoubleBuffered()\">isDoubleBuffered , =\"../../java/awt/Component.html#isEnabled()\">isEnabled , =\"../../java/awt/Component.html#isFocusable()\">isFocusable , =\"../../java/awt/Component.html#isFocusCycleRoot(java.awt.Container)\">isFocusCycleRoot , =\"../../java/awt/Component.html#isFocusOwner()\">isFocusOwner , =\"../../java/awt/Component.html#isFocusTraversable()\">isFocusTraversable , =\"../../java/awt/Component.html#isFontSet()\">isFontSet , =\"../../java/awt/Component.html#isForegroundSet()\">isForegroundSet , =\"../../java/awt/Component.html#isLightweight()\">isLightweight , =\"../../java/awt/Component.html#isMaximumSizeSet()\">isMaximumSizeSet , =\"../../java/awt/Component.html#isMinimumSizeSet()\">isMinimumSizeSet , =\"../../java/awt/Component.html#isOpaque()\">isOpaque , =\"../../java/awt/Component.html#isPreferredSizeSet()\">isPreferredSizeSet , =\"../../java/awt/Component.html#isShowing()\">isShowing , =\"../../java/awt/Component.html#isValid()\">isValid , =\"../../java/awt/Component.html#isVisible()\">isVisible , =\"../../java/awt/Component.html#keyDown(java.awt.Event, int)\">keyDown , =\"../../java/awt/Component.html#keyUp(java.awt.Event, int)\">keyUp , =\"../../java/awt/Component.html#layout()\">layout , =\"../../java/awt/Component.html#list()\">list , =\"../../java/awt/Component.html#list(java.io.PrintStream)\">list , =\"../../java/awt/Component.html#list(java.io.PrintStream, int)\">list , =\"../../java/awt/Component.html#list(java.io.PrintWriter)\">list , =\"../../java/awt/Component.html#list(java.io.PrintWriter, int)\">list , =\"../../java/awt/Component.html#locate(int, int)\">locate , =\"../../java/awt/Component.html#location()\">location , =\"../../java/awt/Component.html#lostFocus(java.awt.Event, java.lang.Object)\">lostFocus , =\"../../java/awt/Component.html#minimumSize()\">minimumSize , =\"../../java/awt/Component.html#mouseDown(java.awt.Event, int, int)\">mouseDown , =\"../../java/awt/Component.html#mouseDrag(java.awt.Event, int, int)\">mouseDrag , =\"../../java/awt/Component.html#mouseEnter(java.awt.Event, int, int)\">mouseEnter , =\"../../java/awt/Component.html#mouseExit(java.awt.Event, int, int)\">mouseExit , =\"../../java/awt/Component.html#mouseMove(java.awt.Event, int, int)\">mouseMove , =\"../../java/awt/Component.html#mouseUp(java.awt.Event, int, int)\">mouseUp , =\"../../java/awt/Component.html#move(int, int)\">move , =\"../../java/awt/Component.html#nextFocus()\">nextFocus , =\"../../java/awt/Component.html#paint(java.awt.Graphics)\">paint , =\"../../java/awt/Component.html#paintAll(java.awt.Graphics)\">paintAll , =\"../../java/awt/Component.html#postEvent(java.awt.Event)\">postEvent , =\"../../java/awt/Component.html#preferredSize()\">preferredSize , =\"../../java/awt/Component.html#prepareImage(java.awt.Image, java.awt.image.ImageObserver)\">prepareImage , =\"../../java/awt/Component.html#prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver)\">prepareImage , =\"../../java/awt/Component.html#print(java.awt.Graphics)\">print , =\"../../java/awt/Component.html#printAll(java.awt.Graphics)\">printAll , =\"../../java/awt/Component.html#processComponentEvent(java.awt.event.ComponentEvent)\">processComponentEvent , =\"../../java/awt/Component.html#processEvent(java.awt.AWTEvent)\">processEvent , =\"../../java/awt/Component.html#processFocusEvent(java.awt.event.FocusEvent)\">processFocusEvent , =\"../../java/awt/Component.html#processHierarchyBoundsEvent(java.awt.event.HierarchyEvent)\">processHierarchyBoundsEvent , =\"../../java/awt/Component.html#processHierarchyEvent(java.awt.event.HierarchyEvent)\">processHierarchyEvent , =\"../../java/awt/Component.html#processInputMethodEvent(java.awt.event.InputMethodEvent)\">processInputMethodEvent , =\"../../java/awt/Component.html#processKeyEvent(java.awt.event.KeyEvent)\">processKeyEvent , =\"../../java/awt/Component.html#processMouseEvent(java.awt.event.MouseEvent)\">processMouseEvent , =\"../../java/awt/Component.html#processMouseMotionEvent(java.awt.event.MouseEvent)\">processMouseMotionEvent , =\"../../java/awt/Component.html#processMouseWheelEvent(java.awt.event.MouseWheelEvent)\">processMouseWheelEvent , =\"../../java/awt/Component.html#remove(java.awt.MenuComponent)\">remove , =\"../../java/awt/Component.html#removeComponentListener(java.awt.event.ComponentListener)\">removeComponentListener , =\"../../java/awt/Component.html#removeFocusListener(java.awt.event.FocusListener)\">removeFocusListener , =\"../../java/awt/Component.html#removeHierarchyBoundsListener(java.awt.event.HierarchyBoundsListener)\">removeHierarchyBoundsListener , =\"../../java/awt/Component.html#removeHierarchyListener(java.awt.event.HierarchyListener)\">removeHierarchyListener , =\"../../java/awt/Component.html#removeInputMethodListener(java.awt.event.InputMethodListener)\">removeInputMethodListener , =\"../../java/awt/Component.html#removeKeyListener(java.awt.event.KeyListener)\">removeKeyListener , =\"../../java/awt/Component.html#removeMouseListener(java.awt.event.MouseListener)\">removeMouseListener , =\"../../java/awt/Component.html#removeMouseMotionListener(java.awt.event.MouseMotionListener)\">removeMouseMotionListener , =\"../../java/awt/Component.html#removeMouseWheelListener(java.awt.event.MouseWheelListener)\">removeMouseWheelListener , =\"../../java/awt/Component.html#removeNotify()\">removeNotify , =\"../../java/awt/Component.html#removePropertyChangeListener(java.beans.PropertyChangeListener)\">removePropertyChangeListener , =\"../../java/awt/Component.html#removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)\">removePropertyChangeListener , =\"../../java/awt/Component.html#repaint()\">repaint , =\"../../java/awt/Component.html#repaint(int, int, int, int)\">repaint , =\"../../java/awt/Component.html#repaint(long)\">repaint , =\"../../java/awt/Component.html#repaint(long, int, int, int, int)\">repaint , =\"../../java/awt/Component.html#requestFocus()\">requestFocus , =\"../../java/awt/Component.html#requestFocus(boolean)\">requestFocus , =\"../../java/awt/Component.html#requestFocusInWindow()\">requestFocusInWindow , =\"../../java/awt/Component.html#requestFocusInWindow(boolean)\">requestFocusInWindow , =\"../../java/awt/Component.html#reshape(int, int, int, int)\">reshape , =\"../../java/awt/Component.html#resize(java.awt.Dimension)\">resize , =\"../../java/awt/Component.html#resize(int, int)\">resize , =\"../../java/awt/Component.html#setBackground(java.awt.Color)\">setBackground , =\"../../java/awt/Component.html#setBounds(int, int, int, int)\">setBounds , =\"../../java/awt/Component.html#setBounds(java.awt.Rectangle)\">setBounds , =\"../../java/awt/Component.html#setComponentOrientation(java.awt.ComponentOrientation)\">setComponentOrientation , =\"../../java/awt/Component.html#setCursor(java.awt.Cursor)\">setCursor , =\"../../java/awt/Component.html#setDropTarget(java.awt.dnd.DropTarget)\">setDropTarget , =\"../../java/awt/Component.html#setEnabled(boolean)\">setEnabled , =\"../../java/awt/Component.html#setFocusable(boolean)\">setFocusable , =\"../../java/awt/Component.html#setFocusTraversalKeys(int, java.util.Set)\">setFocusTraversalKeys , =\"../../java/awt/Component.html#setFocusTraversalKeysEnabled(boolean)\">setFocusTraversalKeysEnabled , =\"../../java/awt/Component.html#setFont(java.awt.Font)\">setFont , =\"../../java/awt/Component.html#setForeground(java.awt.Color)\">setForeground , =\"../../java/awt/Component.html#setIgnoreRepaint(boolean)\">setIgnoreRepaint , =\"../../java/awt/Component.html#setLocale(java.util.Locale)\">setLocale , =\"../../java/awt/Component.html#setLocation(int, int)\">setLocation , =\"../../java/awt/Component.html#setLocation(java.awt.Point)\">setLocation , =\"../../java/awt/Component.html#setMaximumSize(java.awt.Dimension)\">setMaximumSize , =\"../../java/awt/Component.html#setMinimumSize(java.awt.Dimension)\">setMinimumSize , =\"../../java/awt/Component.html#setName(java.lang.String)\">setName , =\"../../java/awt/Component.html#setPreferredSize(java.awt.Dimension)\">setPreferredSize , =\"../../java/awt/Component.html#setSize(java.awt.Dimension)\">setSize , =\"../../java/awt/Component.html#setSize(int, int)\">setSize , =\"../../java/awt/Component.html#setVisible(boolean)\">setVisible , =\"../../java/awt/Component.html#show()\">show , =\"../../java/awt/Component.html#show(boolean)\">show , =\"../../java/awt/Component.html#size()\">size , =\"../../java/awt/Component.html#toString()\">toString , =\"../../java/awt/Component.html#transferFocus()\">transferFocus , =\"../../java/awt/Component.html#transferFocusBackward()\">transferFocusBackward , =\"../../java/awt/Component.html#transferFocusUpCycle()\">transferFocusUpCycle , =\"../../java/awt/Component.html#update(java.awt.Graphics)\">update , =\"../../java/awt/Component.html#validate()\">validate", + "", + "", + "NAME=\"methods_inherited_from_class_java.lang.Object\"> -->", + "BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">", + "BGCOLOR=\"#EEEEFF\" CLASS=\"TableSubHeadingColor\">", + "ALIGN=\"left\"> Methods inherited from class java.lang. =\"../../java/lang/Object.html\" title=\"class in java.lang\">Object", + "", + "BGCOLOR=\"white\" CLASS=\"TableRowColor\">", + "=\"../../java/lang/Object.html#clone()\">clone , =\"../../java/lang/Object.html#equals(java.lang.Object)\">equals , =\"../../java/lang/Object.html#finalize()\">finalize , =\"../../java/lang/Object.html#getClass()\">getClass , =\"../../java/lang/Object.html#hashCode()\">hashCode , =\"../../java/lang/Object.html#notify()\">notify , =\"../../java/lang/Object.html#notifyAll()\">notifyAll , =\"../../java/lang/Object.html#wait()\">wait , =\"../../java/lang/Object.html#wait(long)\">wait , =\"../../java/lang/Object.html#wait(long, int)\">wait", + "", + "", + "", + "", + "", + "============ FIELD DETAIL =========== -->", + "", + "NAME=\"field_detail\"> -->", + "BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">", + "BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\">", + "ALIGN=\"left\" COLSPAN=\"1\"> SIZE=\"+2\">", + "Field Detail", + "", + "", + "", + "NAME=\"LEFT\"> -->

    ", + "LEFT

    ", + "", + "public static final int LEFT", + "", + "Indicates that the label should be left justified.", + "", + "", + "See Also: =\"../../constant-values.html#java.awt.Label.LEFT\">Constant Field Values", + "", + "", + "", + "NAME=\"CENTER\"> -->

    ", + "CENTER

    ", + "", + "public static final int CENTER", + "", + "Indicates that the label should be centered.", + "", + "", + "See Also: =\"../../constant-values.html#java.awt.Label.CENTER\">Constant Field Values", + "", + "", + "", + "NAME=\"RIGHT\"> -->

    ", + "RIGHT

    ", + "", + "public static final int RIGHT", + "", + "Indicates that the label should be right justified.", + "", + "", + "Since:", + "JDK1.0t.", + "See Also: =\"../../constant-values.html#java.awt.Label.RIGHT\">Constant Field Values", + "", + "", + "========= CONSTRUCTOR DETAIL ======== -->", + "", + "NAME=\"constructor_detail\"> -->", + "BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">", + "BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\">", + "ALIGN=\"left\" COLSPAN=\"1\"> SIZE=\"+2\">", + "Constructor Detail", + "", + "", + "", + "NAME=\"Label()\"> -->

    ", + "Label

    ", + "", + "public Label ()", + "throws =\"../../java/awt/HeadlessException.html\" title=\"class in java.awt\">HeadlessException", + "", + "Constructs an empty label.", + "The text of the label is the empty string \"\" .", + "", + "", + "", + "Throws:", + "=\"../../java/awt/HeadlessException.html\" title=\"class in java.awt\">HeadlessException - if GraphicsEnvironment.isHeadless()", + "returns true. See Also: =\"../../java/awt/GraphicsEnvironment.html#isHeadless()\"> GraphicsEnvironment.isHeadless()", + "", + "", + "", + "NAME=\"Label(java.lang.String)\"> -->

    ", + "Label

    ", + "", + "public Label ( =\"../../java/lang/String.html\" title=\"class in java.lang\">String text)", + "throws =\"../../java/awt/HeadlessException.html\" title=\"class in java.awt\">HeadlessException", + "", + "Constructs a new label with the specified string of text,", + "left justified.", + "", + "", + "Parameters: text - the string that the label presents.", + "A null value", + "will be accepted without causing a NullPointerException", + "to be thrown.", + "Throws:", + "=\"../../java/awt/HeadlessException.html\" title=\"class in java.awt\">HeadlessException - if GraphicsEnvironment.isHeadless()", + "returns true. See Also: =\"../../java/awt/GraphicsEnvironment.html#isHeadless()\"> GraphicsEnvironment.isHeadless()", + "", + "", + "", + "NAME=\"Label(java.lang.String, int)\"> -->

    ", + "Label

    ", + "", + "public Label ( =\"../../java/lang/String.html\" title=\"class in java.lang\">String text,", + "int alignment)", + "throws =\"../../java/awt/HeadlessException.html\" title=\"class in java.awt\">HeadlessException", + "", + "Constructs a new label that presents the specified string of", + "text with the specified alignment.", + "Possible values for alignment are Label.LEFT ,", + "Label.RIGHT , and Label.CENTER .", + "", + "", + "Parameters: text - the string that the label presents.", + "A null value", + "will be accepted without causing a NullPointerException", + "to be thrown. alignment - the alignment value.", + "Throws:", + "=\"../../java/awt/HeadlessException.html\" title=\"class in java.awt\">HeadlessException - if GraphicsEnvironment.isHeadless()", + "returns true. See Also: =\"../../java/awt/GraphicsEnvironment.html#isHeadless()\"> GraphicsEnvironment.isHeadless()", + "", + "", + "============ METHOD DETAIL ========== -->", + "", + "NAME=\"method_detail\"> -->", + "BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">", + "BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\">", + "ALIGN=\"left\" COLSPAN=\"1\"> SIZE=\"+2\">", + "Method Detail", + "", + "", + "", + "NAME=\"addNotify()\"> -->

    ", + "addNotify

    ", + "", + "public void addNotify ()", + "", + "Creates the peer for this label. The peer allows us to", + "modify the appearance of the label without changing its", + "functionality.", + "", + "", + "Overrides: =\"../../java/awt/Component.html#addNotify()\">addNotify in class =\"../../java/awt/Component.html\" title=\"class in java.awt\">Component", + "", + "", + "See Also: =\"../../java/awt/Component.html#isDisplayable()\"> Component.isDisplayable() ,", + "=\"../../java/awt/Component.html#removeNotify()\"> Component.removeNotify()", + "", + "", + "", + "", + "NAME=\"getAlignment()\"> -->

    ", + "getAlignment

    ", + "", + "public int getAlignment ()", + "", + "Gets the current alignment of this label. Possible values are", + "Label.LEFT , Label.RIGHT , and", + "Label.CENTER .", + "", + "", + "", + "", + "", + "See Also: =\"../../java/awt/Label.html#setAlignment(int)\"> setAlignment(int)", + "", + "", + "", + "", + "NAME=\"setAlignment(int)\"> -->

    ", + "setAlignment

    ", + "", + "public void setAlignment (int alignment)", + "", + "Sets the alignment for this label to the specified alignment.", + "Possible values are Label.LEFT ,", + "Label.RIGHT , and Label.CENTER .", + "", + "", + "", + "", + "", + "Parameters: alignment - the alignment to be set.", + "Throws:", + "=\"../../java/lang/IllegalArgumentException.html\" title=\"class in java.lang\">IllegalArgumentException - if an improper value for", + "alignment is given. See Also: =\"../../java/awt/Label.html#getAlignment()\"> getAlignment()", + "", + "", + "", + "", + "NAME=\"getText()\"> -->

    ", + "getText

    ", + "", + "public =\"../../java/lang/String.html\" title=\"class in java.lang\">String getText ()", + "", + "Gets the text of this label.", + "", + "", + "", + "", + "", + "", + "Returns: the text of this label, or null if", + "the text has been set to null . See Also: =\"../../java/awt/Label.html#setText(java.lang.String)\"> setText(java.lang.String)", + "", + "", + "", + "", + "NAME=\"setText(java.lang.String)\"> -->

    ", + "setText

    ", + "", + "public void setText ( =\"../../java/lang/String.html\" title=\"class in java.lang\">String text)", + "", + "Sets the text for this label to the specified text.", + "", + "", + "", + "", + "", + "Parameters: text - the text that this label displays. If", + "text is null , it is", + "treated for display purposes like an empty", + "string \"\" . See Also: =\"../../java/awt/Label.html#getText()\"> getText()", + "", + "", + "", + "", + "NAME=\"paramString()\"> -->

    ", + "paramString

    ", + "", + "protected =\"../../java/lang/String.html\" title=\"class in java.lang\">String paramString ()", + "", + "Returns a string representing the state of this Label .", + "This method is intended to be used only for debugging purposes, and the", + "content and format of the returned string may vary between", + "implementations. The returned string may be empty but may not be", + "null .", + "", + "", + "Overrides: =\"../../java/awt/Component.html#paramString()\">paramString in class =\"../../java/awt/Component.html\" title=\"class in java.awt\">Component", + "", + "", + "", + "Returns: the parameter string of this label", + "", + "", + "", + "", + "NAME=\"getAccessibleContext()\"> -->

    ", + "getAccessibleContext

    ", + "", + "public =\"../../javax/accessibility/AccessibleContext.html\" title=\"class in javax.accessibility\">AccessibleContext getAccessibleContext ()", + "", + "Gets the AccessibleContext associated with this Label.", + "For labels, the AccessibleContext takes the form of an", + "AccessibleAWTLabel.", + "A new AccessibleAWTLabel instance is created if necessary.", + "", + "", + "Specified by: =\"../../javax/accessibility/Accessible.html#getAccessibleContext()\">getAccessibleContext in interface =\"../../javax/accessibility/Accessible.html\" title=\"interface in javax.accessibility\">Accessible Overrides: =\"../../java/awt/Component.html#getAccessibleContext()\">getAccessibleContext in class =\"../../java/awt/Component.html\" title=\"class in java.awt\">Component", + "", + "", + "", + "Returns: an AccessibleAWTLabel that serves as the", + "AccessibleContext of this Label", + "", + "", + "========= END OF CLASS DATA ========= -->", + "", + "", + "", + "======= START OF BOTTOM NAVBAR ====== -->", + "NAME=\"navbar_bottom\"> -->", + "=\"#skip-navbar_bottom\" title=\"Skip navigation links\">", + "BORDER=\"0\" WIDTH=\"100%\" CELLPADDING=\"1\" CELLSPACING=\"0\" SUMMARY=\"\">", + "", + "COLSPAN=2 BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\">", + "NAME=\"navbar_bottom_firstrow\"> -->", + "BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"3\" SUMMARY=\"\">", + "ALIGN=\"center\" VALIGN=\"top\">", + "BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> =\"../../overview-summary.html\"> CLASS=\"NavBarFont1\"> Overview", + "BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> =\"package-summary.html\"> CLASS=\"NavBarFont1\"> Package", + "BGCOLOR=\"#FFFFFF\" CLASS=\"NavBarCell1Rev\"> CLASS=\"NavBarFont1Rev\"> Class", + "BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> =\"class-use/Label.html\"> CLASS=\"NavBarFont1\"> Use", + "BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> =\"package-tree.html\"> CLASS=\"NavBarFont1\"> Tree", + "BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> =\"../../deprecated-list.html\"> CLASS=\"NavBarFont1\"> Deprecated", + "BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> =\"../../index-files/index-1.html\"> CLASS=\"NavBarFont1\"> Index", + "BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> =\"../../help-doc.html\"> CLASS=\"NavBarFont1\"> Help", + "", + "", + "", + "ALIGN=\"right\" VALIGN=\"top\" ROWSPAN=3>", + "Java size=-2>TM 2 Platform Standard Ed. 5.0_13", + "", + "", + "", + "", + "BGCOLOR=\"white\" CLASS=\"NavBarCell2\"> SIZE=\"-2\">", + "=\"../../java/awt/KeyEventPostProcessor.html\" title=\"interface in java.awt\"> PREV CLASS", + "=\"../../java/awt/Label.AccessibleAWTLabel.html\" title=\"class in java.awt\"> NEXT CLASS", + "BGCOLOR=\"white\" CLASS=\"NavBarCell2\"> SIZE=\"-2\">", + "=\"../../index.html?java/awt/Label.html\" target=\"_top\"> FRAMES", + "=\"Label.html\" target=\"_top\"> NO FRAMES", + "type=\"text/javascript\">", + "", + "if(window==top) {", + "document.writeln(' =\"../../allclasses-noframe.html\"> All Classes ');", + "}", + "//-->", + "", + "", + "=\"../../allclasses-noframe.html\"> All Classes", + "", + "", + "", + "", + "", + "", + "VALIGN=\"top\" CLASS=\"NavBarCell3\"> SIZE=\"-2\">", + "SUMMARY: =\"#nested_class_summary\">NESTED | =\"#field_summary\">FIELD | =\"#constructor_summary\">CONSTR | =\"#method_summary\">METHOD", + "VALIGN=\"top\" CLASS=\"NavBarCell3\"> SIZE=\"-2\">", + "DETAIL: =\"#field_detail\">FIELD | =\"#constructor_detail\">CONSTR | =\"#method_detail\">METHOD", + "", + "", + "NAME=\"skip-navbar_bottom\">", + "======== END OF BOTTOM NAVBAR ======= -->", + "", + "", + "size=\"-1\"> =\"http://java.sun.com/cgi-bin/bugreport.cgi\">Submit a bug or feature For further API reference and developer documentation, see =\"../../../relnotes/devdocs-vs-specs.html\">Java 2 SDK SE Developer Documentation . That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to =\"../../../relnotes/license.html\">license terms . Also see the =\"http://java.sun.com/docs/redist.html\">documentation redistribution policy .", + "", + "" +] \ No newline at end of file diff --git a/tests/textcode/data/markup_expected/Label.html.stripmarkup-legacy.json b/tests/textcode/data/markup_expected/Label.html.stripmarkup-legacy.json new file mode 100644 index 00000000000..00948710bb5 --- /dev/null +++ b/tests/textcode/data/markup_expected/Label.html.stripmarkup-legacy.json @@ -0,0 +1,665 @@ +[ + "", + "", + "", + "", + "", + "", + "Label (Java 2 Platform SE 5.0_13)", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "function windowTitle()", + "{", + "parent.document.title=\"Label (Java 2 Platform SE 5.0_13)\";", + "}", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "Overview  ", + "Package  ", + "  Class  ", + "Use  ", + "Tree  ", + "Deprecated  ", + "Index  ", + "Help  ", + "", + "", + "", + "", + "Java TM  2 Platform Standard Ed. 5.0_13", + "", + "", + "", + "", + "", + "  PREV CLASS ", + "  NEXT CLASS", + "", + "FRAMES  ", + "  NO FRAMES  ", + " ", + "", + "", + "", + "All Classes", + "", + "", + "", + "", + "", + "", + "", + "SUMMARY:  NESTED |  FIELD |  CONSTR |  METHOD", + "", + "DETAIL:  FIELD |  CONSTR |  METHOD", + "", + "", + "", + "", + "", + "
    ", + "", + "

    ", + "", + "java.awt", + "", + "Class Label

    ", + "", + "java.lang.Object", + "java.awt.Component", + "java.awt.Label", + "", + "", + "All Implemented Interfaces: ImageObserver, MenuContainer, Serializable, Accessible", + "", + "
    ", + "", + "public class Label extends Component implements Accessible", + "", + "", + "

    ", + "A Label object is a component for placing text in a", + "container. A label displays a single line of read-only text.", + "The text can be changed by the application, but a user cannot edit it", + "directly.", + "

    ", + "For example, the code . . .", + "

    ", + "


    ", + "setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10));", + "add(new Label(\"Hi There!\"));", + "add(new Label(\"Another Label\"));", + "
    ", + "

    ", + "produces the following labels:", + "

    ", + "\"Two", + "

    ", + "", + "

    ", + "", + "Since:", + "JDK1.0", + "See Also: Serialized Form", + "


    ", + "", + "

    ", + "", + "", + "", + "", + "", + "", + "Nested Class Summary", + "", + "", + "", + "protected  class", + " Label.AccessibleAWTLabel", + "", + "", + "          This class implements accessibility support for the", + "Label class.", + "", + "", + "  ", + "", + "", + "Nested classes/interfaces inherited from class java.awt. Component", + "", + "", + "Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy", + "", + "", + " ", + "", + "", + "", + "", + "", + "", + "Field Summary", + "", + "", + "", + "static int", + " CENTER", + "", + "", + "          Indicates that the label should be centered.", + "", + "", + "", + "static int", + " LEFT", + "", + "", + "          Indicates that the label should be left justified.", + "", + "", + "", + "static int", + " RIGHT", + "", + "", + "          Indicates that the label should be right justified.", + "", + "", + "  ", + "", + "", + "Fields inherited from class java.awt. Component", + "", + "", + "BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT", + "", + "", + "  ", + "", + "", + "Fields inherited from interface java.awt.image. ImageObserver", + "", + "", + "ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH", + "", + "", + " ", + "", + "", + "", + "", + "", + "", + "Constructor Summary", + "", + "", + "Label()", + "", + "", + "          Constructs an empty label.", + "", + "", + "Label( String text)", + "", + "", + "          Constructs a new label with the specified string of text,", + "left justified.", + "", + "", + "Label( String text,", + "int alignment)", + "", + "", + "          Constructs a new label that presents the specified string of", + "text with the specified alignment.", + "", + "", + " ", + "", + "", + "", + "", + "", + "", + "Method Summary", + "", + "", + "", + " void", + "addNotify()", + "", + "", + "          Creates the peer for this label.", + "", + "", + "", + "  AccessibleContext", + "getAccessibleContext()", + "", + "", + "          Gets the AccessibleContext associated with this Label.", + "", + "", + "", + " int", + "getAlignment()", + "", + "", + "          Gets the current alignment of this label.", + "", + "", + "", + "  String", + "getText()", + "", + "", + "          Gets the text of this label.", + "", + "", + "", + "protected   String", + "paramString()", + "", + "", + "          Returns a string representing the state of this Label .", + "", + "", + "", + " void", + "setAlignment(int alignment)", + "", + "", + "          Sets the alignment for this label to the specified alignment.", + "", + "", + "", + " void", + "setText( String text)", + "", + "", + "          Sets the text for this label to the specified text.", + "", + "", + "  ", + "", + "", + "Methods inherited from class java.awt. Component", + "", + "", + "action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate", + "", + "", + "  ", + "", + "", + "Methods inherited from class java.lang. Object", + "", + "", + "clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait", + "", + "", + " ", + "

    ", + "", + "", + "", + "", + "", + "", + "", + "Field Detail", + "", + "", + "", + "

    ", + "LEFT

    ", + "", + "public static final int LEFT", + "", + "Indicates that the label should be left justified.", + "

    ", + "", + "See Also: Constant Field Values", + "", + "


    ", + "", + "

    ", + "CENTER

    ", + "", + "public static final int CENTER", + "", + "Indicates that the label should be centered.", + "

    ", + "", + "See Also: Constant Field Values", + "", + "


    ", + "", + "

    ", + "RIGHT

    ", + "", + "public static final int RIGHT", + "", + "Indicates that the label should be right justified.", + "

    ", + "", + "Since:", + "JDK1.0t.", + "See Also: Constant Field Values", + "", + "", + "", + "", + "", + "", + "", + "", + "Constructor Detail", + "", + "", + "", + "

    ", + "Label

    ", + "", + "public Label()", + "throws HeadlessException", + "", + "Constructs an empty label.", + "The text of the label is the empty string \"\" .", + "

    ", + "", + "", + "Throws:", + "HeadlessException - if GraphicsEnvironment.isHeadless()", + "returns true. See Also: GraphicsEnvironment.isHeadless() ", + "", + "


    ", + "", + "

    ", + "Label

    ", + "", + "public Label( String text)", + "throws HeadlessException", + "", + "Constructs a new label with the specified string of text,", + "left justified.", + "

    ", + "", + "Parameters: text - the string that the label presents.", + "A null value", + "will be accepted without causing a NullPointerException", + "to be thrown.", + "Throws:", + "HeadlessException - if GraphicsEnvironment.isHeadless()", + "returns true. See Also: GraphicsEnvironment.isHeadless() ", + "", + "


    ", + "", + "

    ", + "Label

    ", + "", + "public Label( String text,", + "int alignment)", + "throws HeadlessException", + "", + "Constructs a new label that presents the specified string of", + "text with the specified alignment.", + "Possible values for alignment are Label.LEFT ,", + "Label.RIGHT , and Label.CENTER .", + "

    ", + "", + "Parameters: text - the string that the label presents.", + "A null value", + "will be accepted without causing a NullPointerException", + "to be thrown. alignment - the alignment value.", + "Throws:", + "HeadlessException - if GraphicsEnvironment.isHeadless()", + "returns true. See Also: GraphicsEnvironment.isHeadless() ", + "", + "", + "", + "", + "", + "", + "", + "", + "Method Detail", + "", + "", + "", + "

    ", + "addNotify

    ", + "", + "public void addNotify()", + "", + "Creates the peer for this label. The peer allows us to", + "modify the appearance of the label without changing its", + "functionality.", + "

    ", + "", + "Overrides: addNotify in class Component", + "", + "", + "See Also: Component.isDisplayable() ,", + " Component.removeNotify() ", + "", + "", + "


    ", + "", + "

    ", + "getAlignment

    ", + "", + "public int getAlignment()", + "", + "Gets the current alignment of this label. Possible values are", + "Label.LEFT , Label.RIGHT , and", + "Label.CENTER .", + "

    ", + "", + "", + "", + "", + "See Also: setAlignment(int) ", + "", + "", + "


    ", + "", + "

    ", + "setAlignment

    ", + "", + "public void setAlignment(int alignment)", + "", + "Sets the alignment for this label to the specified alignment.", + "Possible values are Label.LEFT ,", + "Label.RIGHT , and Label.CENTER .", + "

    ", + "", + "", + "", + "", + "Parameters: alignment - the alignment to be set.", + "Throws:", + "IllegalArgumentException - if an improper value for", + "alignment is given. See Also: getAlignment() ", + "", + "", + "


    ", + "", + "

    ", + "getText

    ", + "", + "public String getText()", + "", + "Gets the text of this label.", + "

    ", + "", + "", + "", + "", + "", + "Returns: the text of this label, or null if", + "the text has been set to null . See Also: setText(java.lang.String) ", + "", + "", + "


    ", + "", + "

    ", + "setText

    ", + "", + "public void setText( String text)", + "", + "Sets the text for this label to the specified text.", + "

    ", + "", + "", + "", + "", + "Parameters: text - the text that this label displays. If", + "text is null , it is", + "treated for display purposes like an empty", + "string \"\" . See Also: getText() ", + "", + "", + "


    ", + "", + "

    ", + "paramString

    ", + "", + "protected String paramString()", + "", + "Returns a string representing the state of this Label .", + "This method is intended to be used only for debugging purposes, and the", + "content and format of the returned string may vary between", + "implementations. The returned string may be empty but may not be", + "null .", + "

    ", + "", + "Overrides: paramString in class Component", + "", + "", + "", + "Returns: the parameter string of this label", + "", + "", + "


    ", + "", + "

    ", + "getAccessibleContext

    ", + "", + "public AccessibleContext getAccessibleContext()", + "", + "Gets the AccessibleContext associated with this Label.", + "For labels, the AccessibleContext takes the form of an", + "AccessibleAWTLabel.", + "A new AccessibleAWTLabel instance is created if necessary.", + "

    ", + "", + "Specified by: getAccessibleContext in interface Accessible Overrides: getAccessibleContext in class Component", + "", + "", + "", + "Returns: an AccessibleAWTLabel that serves as the", + "AccessibleContext of this Label", + "", + "", + "", + "


    ", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "Overview  ", + "Package  ", + "  Class  ", + "Use  ", + "Tree  ", + "Deprecated  ", + "Index  ", + "Help  ", + "", + "", + "", + "", + "Java TM  2 Platform Standard Ed. 5.0_13", + "", + "", + "", + "", + "", + "  PREV CLASS ", + "  NEXT CLASS", + "", + "FRAMES  ", + "  NO FRAMES  ", + " ", + "", + "", + "", + "All Classes", + "", + "", + "", + "", + "", + "", + "", + "SUMMARY:  NESTED |  FIELD |  CONSTR |  METHOD", + "", + "DETAIL:  FIELD |  CONSTR |  METHOD", + "", + "", + "", + "", + "", + "
    ", + "Submit a bug or feature For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

    Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.", + "", + "" +] \ No newline at end of file diff --git a/tests/textcode/data/markup_expected/Label.html.stripmarkup.json b/tests/textcode/data/markup_expected/Label.html.stripmarkup.json new file mode 100644 index 00000000000..4865b3d637c --- /dev/null +++ b/tests/textcode/data/markup_expected/Label.html.stripmarkup.json @@ -0,0 +1,665 @@ +[ + "", + "A Label object is a component for placing text in a", + "container. A label displays a single line of read-only text.", + "The text can be changed by the application, but a user cannot edit it", + "directly.", + "

    ", + "For example, the code . . .", + "

    ", + "", + "setLayout(new FlowLayout(FlowLayout.CENTER, 10, 10));", + "add(new Label(\"Hi There!\"));", + "add(new Label(\"Another Label\"));", + "", + "

    ", + "produces the following labels:", + "

    ", + "src=\"doc-files/Label-1.gif\" alt=\"Two labels: 'Hi There!' and 'Another label'\"", + "ALIGN=center HSPACE=10 VSPACE=7", + "

    ", + "", + "

    ", + "", + "Since:", + "JDK1.0", + "See Also: Serialized Form", + "", + "", + "

    ", + " value=\"ast\">Asturianu (ast)", + "Czech --> value=\"cs\">\u010ce\u0161tina (cs)", + "Danish --> value=\"da\">Dansk (da)", + "German --> value=\"de\">Deutsch (de)", + "English [British] value=\"en-gb\">English [British] (en-gb) -->", + "English [US] --> value=\"?redirect=soft\" selected=\"selected\">English (en)", + "Spanish --> value=\"es\">Espa\u00f1ol (es)", + "Basque --> value=\"eu\">Euskara (eu)", + "Finnish --> value=\"fi\">Suomi (fi)", + "French --> value=\"fr\">Fran\u00e7ais (fr)", + "Scottish --> value=\"gd\">G\u00e0idhlig (gd)", + "Galician --> value=\"gl\">Galego (gl)", + "Italian --> value=\"it\">Italiano (it)", + "Lithuanian --> value=\"lt\">Lietuvi\u0173 (lt)", + "Hungarian --> value=\"hu\">Magyar (hu)", + "Dutch --> value=\"nl\">Nederlands (nl)", + "Norwegian [Bokm\u00e5l] --> value=\"no\">Norsk [Bokm\u00e5l] (nb)", + "Norwegian [Nynorsk] --> value=\"no\">Norsk [Nynorsk] (no)", + "Polish --> value=\"pl\">Polski (pl)", + "Portuguese [Brazilian] --> value=\"pt-br\">Portugu\u00eas [do Brasil] (pt-br)", + "Portuguese [European] --> value=\"pt\">Portugu\u00eas [Europeu] (pt)", + "Slovak --> value=\"sk\">sloven\u010dina (sk)", + "Slovenian --> value=\"sl\">sloven\u0161\u010dina (sl)", + "Swidish --> value=\"sv\">Svenska (sv)", + "Turkish --> value=\"tr\">T\u00fcrk\u00e7e (tr)", + "Vietnamese --> value=\"vi\">Ti\u1ebfng Vi\u1ec7t (vi)", + "Greek --> value=\"el\">\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac (el)", + "Bulgarian --> value=\"bg\">\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438 \u0435\u0437\u0438\u043a (bg)", + "Russian --> value=\"ru\">\u0420\u0443\u0441\u0441\u043a\u0438\u0439 (ru)", + "Serbian [Cyrillic] --> value=\"sr\">C\u0440\u043f\u0441\u043a\u0438 [\u045b\u0438\u0440\u0438\u043b\u0438\u0446\u043e\u043c] (sr)", + "Arabic value=\"ar\">\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (ar) -->", + "Hebrew --> value=\"he\">\u05e2\u05d1\u05e8\u05d9\u05ea (he)", + "Hindi --> value=\"hi\">\u0939\u093f\u0928\u094d\u0926\u0940 (hi)", + "Khmer --> value=\"km\">\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a (km)", + "Tamil --> value=\"ta\">\u0ba4\u0bae\u0bbf\u0bb4\u0bcd (ta)", + "Thai --> value=\"th\">\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (th)", + "Chinese [simplified] --> value=\"zh-cn\">\u7b80\u4f53\u4e2d\u6587 (zh-cn)", + "Chinese [traditional] --> value=\"zh-tw\">\u6b63\u9ad4\u4e2d\u6587 (zh-tw)", + "Japanese --> value=\"ja\">\u65e5\u672c\u8a9e (ja)", + "Korean --> value=\"ko\">\ud55c\uad6d\uc5b4 (ko)", + "", + "", + "var lang = \"en\";", + "var dropdown = document.getElementById('selectlanguage');", + "var options = dropdown.options;", + "for( var i = 0; i < dropdown.options.length; i++ ) {", + "if( dropdown.options[ i ].value == lang ) {", + "dropdown.selectedIndex = i;", + "break;", + "}", + "}", + "", + "", + "id=\"bannerleft\"> title=\"Apache OpenOffice\" =\"/\"> id=\"ooo-logo\" alt=\"Apache OpenOffice\" src=\"/images/AOO_logos/100MillAOO100px.png", + "id=\"bannerright\">", + "id=\"searchdiv\">", + "id=\"cse-search-box-header\" action=\"http://www.google.com/search\" method=\"get\">", + "", + "type=\"hidden\" name=\"domains\" value=\"www.openoffice.org", + "type=\"hidden\" name=\"sitesearch\" value=\"www.openoffice.org", + "", + "class=\"topsrchbox\">", + "name=\"resultsPerPage\" value=\"40\" type=\"hidden", + "name=\"q\" id=\"query\" type=\"text\" title=\"search query", + "name=\"Button\" value=\"search\" type=\"submit\" class=\"topsrchbutton", + "", + "", + "", + "", + "id=\"bannercenter\"> The Free and Open Productivity Suite", + "", + "id=\"announce\"> =\"https://cwiki.apache.org/confluence/display/OOOUSERS/AOO+4.1.1+Release+Notes\" title=\"New: Apache OpenOffice 4.1.1 released!\">New: Apache OpenOffice 4.1.1 released!", + "", + "id=\"topbara\">", + "id=\"topnava\">", + "=\"/product/index.html\" title=\"Apache OpenOffice product description\">Product", + "=\"/download/index.html\" title=\"Download OpenOffice\">Download", + "=\"/support/index.html\" title=\"Find Support for OpenOffice\">Support", + "=\"http://blogs.apache.org/ooo/\" title=\"Apache OpenOffice Blog\">Blog", + "=\"/extensions/index.html\" title=\"Extensions and Templates for OpenOffice\">Extend", + "=\"http://openoffice.apache.org/get-involved.html\" title=\"Get involved in Apache OpenOffice\">Develop", + "=\"/projects/accepted.html\" title=\"Apache OpenOffice development focus areas\">Focus Areas", + "=\"/projects/native-lang.html\" title=\"Apache OpenOffice in your Native Language\">Native Language", + "", + "", + "id=\"breadcrumbsa\"> =\"/\">home =\"/licenses/\">licenses", + "", + "id=\"clear\">", + "", + "", + "id=\"content\">", + "", + "", + "", + "

    PUBLIC DOCUMENTATION LICENSE

    ", + "

    Version 1.0

    ", + "", + "

    1.0 DEFINITIONS.

    ", + "", + "1.1. Commercial Use means distribution or otherwise", + "making the Documentation available to a third party.", + "", + "1.2. Contributor means a person or entity who", + "creates or contributes to the creation of Modifications.", + "", + "1.3. Documentation means the Original Documentation", + "or Modifications or the combination of the Original Documentation and Modifications,", + "in each case including portions thereof.", + "", + "1.4. Electronic Distribution Mechanism means a", + "mechanism generally accepted for the electronic transfer of data.", + "", + "1.5. Initial Writer means the individual or entity", + "identified as the Initial Writer in the notice required by the Appendix .", + "", + "", + "1.6. Larger Work means a work which combines Documentation", + "or portions thereof with documentation or other writings not governed by the", + "terms of this License.", + "", + "1.7. License means this document.", + "", + "1.8. Modifications means any addition to or deletion", + "from the substance or structure of either the Original Documentation or any", + "previous Modifications, such as a translation, abridgment, condensation, or", + "any other form in which the Original Documentation or previous Modifications", + "may be recast, transformed or adapted. A work consisting of editorial revisions,", + "annotations, elaborations, and other modifications which, as a whole represent", + "an original work of authorship, is a Modification. For example, when Documentation", + "is released as a series of documents, a Modification is:", + "", + "class =\"subp\"> A . Any addition to or deletion from the contents", + "of the Original Documentation or previous Modifications.", + "", + "class =\"subp\"> B. Any new documentation that contains any part", + "of the Original Documentation or previous Modifications.", + "", + "1.9. Original Documentation means documentation", + "described as Original Documentation in the notice required by the Appendix ,", + "and which, at the time of its release under this License is not already Documentation", + "governed by this License.", + "", + "1.10. Editable Form means the preferred form of", + "the Documentation for making Modifications to it. The Documentation can be in", + "an electronic, compressed or archival form, provided the appropriate decompression", + "or de-archiving software is widely available for no charge.", + "", + "1.11. You (or Your ) means an individual", + "or a legal entity exercising rights under, and complying with all of the terms", + "of this License or a future version of this License issued under Section 5.0", + "( Versions of the License ). For legal entities, You includes", + "any entity which controls, is controlled by, or is under common control with", + "You. For purposes of this definition, control means (a) the power,", + "direct or indirect, to cause the direction or management of such entity, whether", + "by contract or otherwise, or (b) ownership of more than fifty percent (50%)", + "of the outstanding shares or beneficial ownership of such entity.", + "", + "

    2.0 LICENSE GRANTS.

    ", + "", + "

    2.1 Initial Writer Grant.

    ", + "", + "The Initial Writer hereby grants You a world-wide, royalty-free, non-exclusive", + "license to use, reproduce, prepare Modifications of, compile, publicly perform,", + "publicly display, demonstrate, market, disclose and distribute the Documentation", + "in any form, on any media or via any Electronic Distribution Mechanism or other", + "method now known or later discovered, and to sublicense the foregoing rights", + "to third parties through multiple tiers of sublicensees in accordance with the", + "terms of this License.", + "The license rights granted in this Section 2.1 ( Initial Writer Grant )", + "are effective on the date Initial Writer first distributes Original Documentation", + "under the terms of this License.", + "", + "

    2.2. Contributor Grant.

    ", + "", + "Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive", + "license to use, reproduce, prepare Modifications of, compile, publicly perform,", + "publicly display, demonstrate, market, disclose and distribute the Documentation", + "in any form, on any media or via any Electronic Distribution Mechanism or other", + "method now known or later discovered, and to sublicense the foregoing rights", + "to third parties through multiple tiers of sublicensees in accordance with the", + "terms of this License.", + "The license rights granted in this Section 2.2 ( Contributor Grant )", + "are effective on the date Contributor first makes Commercial Use of the Documentation.", + "", + "", + "

    3.0 DISTRIBUTION OBLIGATIONS

    ", + "", + "

    3.1. Application of License

    ", + "", + "The Modifications which You create or to which You contribute are governed", + "by the terms of this License, including without limitation Section 2.2 ( Contributor", + "Grant ). The Documentation may be distributed only under the terms of this", + "License or a future version of this License released in accordance with Section", + "5.0 ( Versions of the License ), and You must include a copy of this", + "License with every copy of the Documentation You distribute. You may not offer", + "or impose any terms that alter or restrict the applicable version of this License", + "or the recipients' rights hereunder. However, You may include an additional", + "document offering the additional rights described in Section 3.5 ( Required", + "Notices ).", + "", + "

    3.2. Availability of Documentation.

    ", + "", + "Any Modification which You create or to which You contribute must be made", + "available publicly in Editable Form under the terms of this License via a fixed", + "medium or an accepted Electronic Distribution Mechanism.", + "", + "

    3.3. Description of Modifications.

    ", + "", + "All Documentation to which You contribute must identify the changes You made", + "to create that Documentation and the date of any change. You must include a", + "prominent statement that the Modification is derived, directly or indirectly,", + "from Original Documentation provided by the Initial Writer and include the name", + "of the Initial Writer in the Documentation or via an electronic link that describes", + "the origin or ownership of the Documentation. The foregoing change documentation", + "may be created by using an electronic program that automatically tracks changes", + "to the Documentation, and such changes must be available publicly for at least", + "five years following release of the changed Documentation.", + "", + "

    3.4. Intellectual Property Matters.

    ", + "", + "Contributor represents that Contributor believes that Contributor's Modifications", + "are Contributor's original creation(s) and/or Contributor has sufficient rights", + "to grant the rights conveyed by this License.", + "", + "

    3.5. Required Notices.

    ", + "", + "You must duplicate the notice in the Appendix in each file", + "of the Documentation. If it is not possible to put such notice in a particular", + "Documentation file due to its structure, then You must include such notice in", + "a location (such as a relevant directory) where a reader would be likely to", + "look for such a notice, for example, via a hyperlink in each file of the Documentation", + "that takes the reader to a page that describes the origin and ownership of the", + "Documentation. If You created one or more Modification(s) You may add your name", + "as a Contributor to the notice described in the Appendix .", + "", + "You must also duplicate this License in any Documentation file (or with a", + "hyperlink in each file of the Documentation) where You describe recipients'", + "rights or ownership rights.", + "You may choose to offer, and to charge a fee for, warranty, support, indemnity", + "or liability obligations to one or more recipients of Documentation. However,", + "You may do so only on Your own behalf, and not on behalf of the Initial Writer", + "or any Contributor. You must make it absolutely clear than any such warranty,", + "support, indemnity or liability obligation is offered by You alone, and You", + "hereby agree to indemnify the Initial Writer and every Contributor for any liability", + "incurred by the Initial Writer or such Contributor as a result of warranty,", + "support, indemnity or liability terms You offer.", + "", + "

    3.6. Larger Works.

    ", + "", + "You may create a Larger Work by combining Documentation with other documents", + "not governed by the terms of this License and distribute the Larger Work as", + "a single product. In such a case, You must make sure the requirements of this", + "License are fulfilled for the Documentation.", + "", + "

    4.0 APPLICATION OF THIS LICENSE.

    ", + "", + "This License applies to Documentation to which the Initial Writer has attached", + "this License and the notice in style=\"font-weight: medium\">the Appendix .", + "", + "

    5.0 VERSIONS OF THE LICENSE.

    ", + "", + "

    5.1. New Versions.

    ", + "", + "Initial Writer may publish revised and/or new versions of the License from", + "time to time. Each version will be given a distinguishing version number.", + "", + "

    5.2. Effect of New Versions.

    ", + "", + "Once Documentation has been published under a particular version of the License,", + "You may always continue to use it under the terms of that version. You may also", + "choose to use such Documentation under the terms of any subsequent version of", + "the License published by __________________ [Insert name of the foundation,", + "company, Initial Writer, or whoever may modify this License] . No one other", + "than _________________ [Insert name of the foundation, company, Initial Writer,", + "or whoever may modify this License] has the right to modify the terms of", + "this License. Filling in the name of the Initial Writer, Original Documentation", + "or Contributor in the notice described in style=\"font-weight: medium\">the", + "Appendix shall not be deemed to be Modifications of this License.", + "", + "

    6.0 DISCLAIMER OF WARRANTY.

    ", + "", + "DOCUMENTATION IS PROVIDED UNDER THIS LICENSE ON AN AS IS'' BASIS, WITHOUT", + "WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION,", + "WARRANTIES THAT THE DOCUMENTATION IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR", + "A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY, ACCURACY,", + "AND PERFORMANCE OF THE DOCUMENTATION IS WITH YOU. SHOULD ANY DOCUMENTATION PROVE", + "DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL WRITER OR ANY OTHER CONTRIBUTOR)", + "ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER", + "OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY DOCUMENTATION", + "IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.", + "", + "

    7.0 TERMINATION.

    ", + "", + "This License and the rights granted hereunder will terminate automatically", + "if You fail to comply with terms herein and fail to cure such breach within", + "30 days of becoming aware of the breach. All sublicenses to the Documentation", + "which are properly granted shall survive any termination of this License. Provisions", + "which, by their nature, must remain in effect beyond the termination of this", + "License shall survive.", + "", + "", + "

    8.0 LIMITATION OF LIABILITY.

    ", + "", + "UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING", + "NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL WRITER, ANY OTHER CONTRIBUTOR,", + "OR ANY DISTRIBUTOR OF DOCUMENTATION, OR ANY SUPPLIER OF ANY OF SUCH PARTIES,", + "BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL", + "DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF", + "GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER", + "DAMAGES OR LOSSES ARISING OUT OF OR RELATING TO THE USE OF THE DOCUMENTATION,", + "EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.", + "", + "", + "

    9.0 U.S. GOVERNMENT END USERS.

    ", + "", + "If Documentation is being acquired by or on behalf of the U.S. Government", + "or by a U.S. Government prime contractor or subcontractor (at any tier), then", + "the Government's rights in Documentation will be only as set forth in this Agreement;", + "this is in accordance with 48 CFR 227.7201 through 227.7202-4 (for Department", + "of Defense (DOD) acquisitions) and with 48 CFR 2.101 and 12.212 (for non-DOD", + "acquisitions).", + "align=left style=\"margin-bottom: 0cm; line-height: 0.46cm\">", + "

    10.0 MISCELLANEOUS.

    ", + "", + "This License represents the complete agreement concerning the subject matter", + "hereof. If any provision of this License is held to be unenforceable, such provision", + "shall be reformed only to the extent necessary to make it enforceable. This", + "License shall be governed by California law, excluding its conflict-of-law provisions.", + "With respect to disputes or any litigation relating to this License, the losing", + "party is responsible for costs, including without limitation, court costs and", + "reasonable attorneys' fees and expenses. The application of the United Nations", + "Convention on Contracts for the International Sale of Goods is expressly excluded.", + "Any law or regulation which provides that the language of a contract shall be", + "construed against the drafter shall not apply to this License.", + "", + "width=\"100%\">", + "

    Appendix

    ", + "

    Public Documentation License Notice

    ", + "", + "The contents of this Documentation are subject to the Public Documentation", + "License Version 1.0 (the License you may only use this Documentation", + "if you comply with the terms of this License. A copy of the License is available", + "at __________________ [Insert hyperlink] .", + "", + "The Original Documentation is _________________. The Initial Writer of the", + "Original Documentation is ___________ Copyright (C)_________ [Insert year(s)].", + "All Rights Reserved. (Initial Writer contact(s):________________ [Insert hyperlink/alias] ).", + "", + "Contributor(s): ______________________________________.", + "Portions created by ______ are Copyright (C)_________ [Insert year(s)] .", + "All Rights Reserved. (Contributor contact(s):________________ [Insert hyperlink/alias] ).", + "", + "", + "NOTE : The text of this Appendix may differ", + "slightly from the text of the notices in the files of the Original Documentation.", + "You should use the text of this Appendix rather than the text", + "found in the Original Documentation for Your Modifications.", + "", + "", + "id=\"footera\">", + "Add a banner logo and link to announce an event and to show it in the footer on the left.", + "id=\"asfbanner\">", + "", + "=\"http://apachecon.com/\">", + "src=\"http://www.openoffice.org/images/2014-eu-234x60.png\" alt=\"Logo ApacheCon Europe 2014\"", + "", + "", + "", + "-->", + "id=\"poweredbya\">", + "", + "=\"http://www.apache.org/\">", + "src=\"/images/feather-small.gif\" alt=\"Apache Feather\"", + "", + "", + "", + "id=\"copyrighta\">", + "style=\"text-align:center;\">", + "=\"/license.html\">Copyright License |", + "=\"/privacy.html\">Privacy |", + "=\"http://survey.openoffice.org/index.php/833861/lang-en\">Website Feedback |", + "=\"/contact_us.html\">Contact Us |", + "=\"/donations.html\">Donate |", + "=\"http://www.apache.org/foundation/thanks.html\">Thanks", + "", + "", + "Apache, the Apache feather logo, and OpenOffice are trademarks of The Apache Software Foundation.", + "OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation.", + "Other names appearing on the site may be trademarks of their respective owners.", + "", + "", + "", + "", + "", + "" +] \ No newline at end of file diff --git a/tests/textcode/data/markup_expected/PDL.html.stripmarkup-legacy.json b/tests/textcode/data/markup_expected/PDL.html.stripmarkup-legacy.json new file mode 100644 index 00000000000..ba4bd8a14e4 --- /dev/null +++ b/tests/textcode/data/markup_expected/PDL.html.stripmarkup-legacy.json @@ -0,0 +1,529 @@ +[ + "", + "", + "", + "", + "", + "", + "", + "Public Documentation License", + "", + "", + "", + "", + "", + "body, p, h1, h2, h3, h4, h5, div, li, td, th, dd, input, select, span, font\t{", + "font-family:\tTimes, Times New Roman; 11pt; color: #000;", + "}", + "h1 {text-align: center;", + "}", + "h2 {text-align: center;", + "}", + "h3 {text-align: left; text-indent: 1em;", + "}", + "h4 {text-align:left; text-indent: 2em;", + "}", + "h5 {text-align:left; text-indent: 4em;", + "}", + "p {text-indent: 3em;", + "}", + ".subp {text-indent: 4em;", + "}", + "", + "", + "", + "var _gaq = _gaq || [];", + "_gaq.push(['_setAccount', 'UA-30193653-1']);", + "_gaq.push(['_setDomainName', 'openoffice.org']);", + "_gaq.push(['_trackPageview']);", + "", + "(function() {", + "var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;", + "ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';", + "var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);", + "})();", + "", + "", + "", + "", + "", + "/*!", + "* Entourage 1.1.2 - Automatic Download Tracking for Asynchronous Google Analytics", + "*", + "* Copyright (c) 2011 by Tian Valdemar Davis (http://techoctave.com/c7)", + "* Licensed under the MIT (http://en.wikipedia.org/wiki/MIT_License) license.", + "*", + "* Learn More: http://techoctave.com/c7/posts/58-entourage-js-automatic-download-tracking-for-asynchronous-google-analytics", + "*", + "* 2012-04-24 Mod by robweir to whitelist additional file extensions as used in AOO project", + "* 2012-04-25 Mod by robweir to remove trailing \"/download\" from SourceForge file names, a hack we can hopefully remove someday", + "*/", + "", + "/*jshint strict:false */", + "", + "(function() {", + "var entourage = new (function() {", + "var version = \"1.1.2\";", + "var whitelist = /\\.pdf$|\\.zip$|\\.gz$|\\.gz\\/download$|\\.bz2$|\\.bz2\\/download$|\\.od*|\\.doc*|\\.xls*|\\.ppt*|\\.exe$|\\.exe\\/download$|\\.dmg$|\\.dmg\\/download$|\\.mov$|\\.avi$|\\.mp3$/i;", + "", + "//Get true FileName from link pathname", + "var getFileName = function(pathname) {", + "//Remove the anchor at the end (if one exists)", + "pathname = pathname.substring(0, (pathname.indexOf(\"#\") === -1) ? pathname.length : pathname.indexOf(\"#\"));", + "", + "//Removes the query after the file pathname (if one exists)", + "pathname = pathname.substring(0, (pathname.indexOf(\"?\") === -1) ? pathname.length : pathname.indexOf(\"?\"));", + "", + "//Remove trailing /download", + "if (/\\/download$/.test(pathname))", + "pathname = pathname.substring(0, pathname.length-\"/download\".length);", + "", + "//Removes everything before the last slash in the path", + "pathname = pathname.substring(pathname.lastIndexOf(\"/\") + 1, pathname.length);", + "", + "return pathname;", + "};", + "", + "var autograph = function() {", + "var fileName, associate;", + "", + "//Get the file name", + "fileName = getFileName(this.pathname); //The link object is now available in \"this\"", + "", + "//Add file to the Google Analytics Queue", + "associate = '/download/' + fileName;", + "", + "//Track download using Asynchronous Google Analytics", + "_gaq.push(['_trackPageview', associate]);", + "};", + "", + "var initialize = function() {", + "var links = document.links;", + "", + "for (var i = 0, l = links.length; i < l; i++) {", + "//Compare the fileType to the whitelist", + "var match = links[i].pathname.match(whitelist);", + "", + "//If the link is for a file download . . .", + "if (typeof match !== \"undefined\" && match !== null) {", + "//Call Entourage whenever the link is clicked", + "links[i].onclick = autograph;", + "}", + "}", + "};", + "", + "return {", + "version: version,", + "initialize: initialize", + "};", + "})(); //Entourage.js", + "", + "//Add entourage to the global namespace", + "window.entourage = entourage;", + "", + "//Execute entourage onload - ensuring links are present in the DOM", + "window.onload = entourage.initialize;", + "})();", + "", + "", + "", + "", + "", + "English:", + "