cchardet 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.gitmodules +3 -0
- data/.rubocop.yml +11 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +10 -0
- data/README.md +35 -0
- data/Rakefile +15 -0
- data/cchardet.gemspec +30 -0
- data/ext/cchardet/extconf.rb +26 -0
- data/ext/uchardet/.gitignore +1 -0
- data/ext/uchardet/.gitlab-ci.yml +106 -0
- data/ext/uchardet/AUTHORS +16 -0
- data/ext/uchardet/CMakeLists.txt +74 -0
- data/ext/uchardet/COPYING +1316 -0
- data/ext/uchardet/INSTALL +26 -0
- data/ext/uchardet/README.md +295 -0
- data/ext/uchardet/build-mac/uchardet.cpp +7 -0
- data/ext/uchardet/build-mac/uchardet.xcodeproj/project.pbxproj +543 -0
- data/ext/uchardet/build-mac/uchardet.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/ext/uchardet/build-mac/uchardet.xcodeproj/project.xcworkspace/xcshareddata/uchardet.xccheckout +41 -0
- data/ext/uchardet/build-mac/uchardet.xcodeproj/xcshareddata/xcschemes/uchardet-ios.xcscheme +77 -0
- data/ext/uchardet/build-mac/uchardet.xcodeproj/xcshareddata/xcschemes/uchardet.xcscheme +77 -0
- data/ext/uchardet/doc/CMakeLists.txt +6 -0
- data/ext/uchardet/doc/README.maintainer +59 -0
- data/ext/uchardet/doc/uchardet.1 +18 -0
- data/ext/uchardet/script/BuildLangModel.py +533 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangArabicModel.log +142 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangCroatianModel.log +157 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangCzechModel.log +161 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangDanishModel.log +158 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangEsperantoModel.log +110 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangEstonianModel.log +159 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangFinnishModel.log +156 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangFrenchModel.log +116 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangGermanModel.log +159 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangGreekModel.log +272 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangHungarianModel.log +109 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangIrishModel.log +156 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangItalianModel.log +162 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangLatvianModel.log +162 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangLithuanianModel.log +162 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangMalteseModel.log +147 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangPolishModel.log +154 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangPortugueseModel.log +166 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangRomanianModel.log +153 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangSlovakModel.log +158 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangSloveneModel.log +148 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangSpanishModel.log +109 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangSwedishModel.log +151 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangThaiModel.log +141 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangTurkishModel.log +113 -0
- data/ext/uchardet/script/BuildLangModelLogs/LangVietnameseModel.log +121 -0
- data/ext/uchardet/script/README +63 -0
- data/ext/uchardet/script/charsets/codepoints.py +53 -0
- data/ext/uchardet/script/charsets/db.py +73 -0
- data/ext/uchardet/script/charsets/ibm852.py +72 -0
- data/ext/uchardet/script/charsets/iso-8859-1.py +85 -0
- data/ext/uchardet/script/charsets/iso-8859-10.py +73 -0
- data/ext/uchardet/script/charsets/iso-8859-11.py +77 -0
- data/ext/uchardet/script/charsets/iso-8859-13.py +72 -0
- data/ext/uchardet/script/charsets/iso-8859-15.py +80 -0
- data/ext/uchardet/script/charsets/iso-8859-16.py +83 -0
- data/ext/uchardet/script/charsets/iso-8859-2.py +73 -0
- data/ext/uchardet/script/charsets/iso-8859-3.py +75 -0
- data/ext/uchardet/script/charsets/iso-8859-4.py +73 -0
- data/ext/uchardet/script/charsets/iso-8859-6.py +73 -0
- data/ext/uchardet/script/charsets/iso-8859-7.py +73 -0
- data/ext/uchardet/script/charsets/iso-8859-9.py +76 -0
- data/ext/uchardet/script/charsets/mac-centraleurope.py +72 -0
- data/ext/uchardet/script/charsets/tis-620.py +77 -0
- data/ext/uchardet/script/charsets/viscii.py +72 -0
- data/ext/uchardet/script/charsets/windows-1250.py +75 -0
- data/ext/uchardet/script/charsets/windows-1252.py +76 -0
- data/ext/uchardet/script/charsets/windows-1253.py +72 -0
- data/ext/uchardet/script/charsets/windows-1256.py +75 -0
- data/ext/uchardet/script/charsets/windows-1257.py +72 -0
- data/ext/uchardet/script/charsets/windows-1258.py +72 -0
- data/ext/uchardet/script/debug.sh +9 -0
- data/ext/uchardet/script/header-template.cpp +38 -0
- data/ext/uchardet/script/langs/ar.py +59 -0
- data/ext/uchardet/script/langs/cs.py +80 -0
- data/ext/uchardet/script/langs/da.py +69 -0
- data/ext/uchardet/script/langs/de.py +69 -0
- data/ext/uchardet/script/langs/el.py +55 -0
- data/ext/uchardet/script/langs/eo.py +67 -0
- data/ext/uchardet/script/langs/es.py +69 -0
- data/ext/uchardet/script/langs/et.py +57 -0
- data/ext/uchardet/script/langs/fi.py +60 -0
- data/ext/uchardet/script/langs/fr.py +79 -0
- data/ext/uchardet/script/langs/ga.py +60 -0
- data/ext/uchardet/script/langs/hr.py +59 -0
- data/ext/uchardet/script/langs/hu.py +66 -0
- data/ext/uchardet/script/langs/it.py +56 -0
- data/ext/uchardet/script/langs/lt.py +70 -0
- data/ext/uchardet/script/langs/lv.py +69 -0
- data/ext/uchardet/script/langs/mt.py +80 -0
- data/ext/uchardet/script/langs/pl.py +81 -0
- data/ext/uchardet/script/langs/pt.py +80 -0
- data/ext/uchardet/script/langs/ro.py +65 -0
- data/ext/uchardet/script/langs/sk.py +80 -0
- data/ext/uchardet/script/langs/sl.py +59 -0
- data/ext/uchardet/script/langs/sv.py +56 -0
- data/ext/uchardet/script/langs/th.py +55 -0
- data/ext/uchardet/script/langs/tr.py +67 -0
- data/ext/uchardet/script/langs/vi.py +64 -0
- data/ext/uchardet/script/release.sh +8 -0
- data/ext/uchardet/script/win32.sh +7 -0
- data/ext/uchardet/src/Big5Freq.tab +943 -0
- data/ext/uchardet/src/CMakeLists.txt +160 -0
- data/ext/uchardet/src/CharDistribution.cpp +109 -0
- data/ext/uchardet/src/CharDistribution.h +242 -0
- data/ext/uchardet/src/EUCKRFreq.tab +614 -0
- data/ext/uchardet/src/EUCTWFreq.tab +447 -0
- data/ext/uchardet/src/GB2312Freq.tab +491 -0
- data/ext/uchardet/src/JISFreq.tab +589 -0
- data/ext/uchardet/src/JpCntx.cpp +230 -0
- data/ext/uchardet/src/JpCntx.h +140 -0
- data/ext/uchardet/src/LangModels/LangArabicModel.cpp +267 -0
- data/ext/uchardet/src/LangModels/LangBulgarianModel.cpp +249 -0
- data/ext/uchardet/src/LangModels/LangCroatianModel.cpp +298 -0
- data/ext/uchardet/src/LangModels/LangCzechModel.cpp +285 -0
- data/ext/uchardet/src/LangModels/LangDanishModel.cpp +201 -0
- data/ext/uchardet/src/LangModels/LangEsperantoModel.cpp +142 -0
- data/ext/uchardet/src/LangModels/LangEstonianModel.cpp +268 -0
- data/ext/uchardet/src/LangModels/LangFinnishModel.cpp +297 -0
- data/ext/uchardet/src/LangModels/LangFrenchModel.cpp +209 -0
- data/ext/uchardet/src/LangModels/LangGermanModel.cpp +170 -0
- data/ext/uchardet/src/LangModels/LangGreekModel.cpp +231 -0
- data/ext/uchardet/src/LangModels/LangHebrewModel.cpp +220 -0
- data/ext/uchardet/src/LangModels/LangHungarianModel.cpp +171 -0
- data/ext/uchardet/src/LangModels/LangIrishModel.cpp +234 -0
- data/ext/uchardet/src/LangModels/LangItalianModel.cpp +269 -0
- data/ext/uchardet/src/LangModels/LangLatvianModel.cpp +210 -0
- data/ext/uchardet/src/LangModels/LangLithuanianModel.cpp +209 -0
- data/ext/uchardet/src/LangModels/LangMalteseModel.cpp +138 -0
- data/ext/uchardet/src/LangModels/LangPolishModel.cpp +304 -0
- data/ext/uchardet/src/LangModels/LangPortugueseModel.cpp +241 -0
- data/ext/uchardet/src/LangModels/LangRomanianModel.cpp +236 -0
- data/ext/uchardet/src/LangModels/LangRussianModel.cpp +367 -0
- data/ext/uchardet/src/LangModels/LangSlovakModel.cpp +293 -0
- data/ext/uchardet/src/LangModels/LangSloveneModel.cpp +264 -0
- data/ext/uchardet/src/LangModels/LangSpanishModel.cpp +204 -0
- data/ext/uchardet/src/LangModels/LangSwedishModel.cpp +266 -0
- data/ext/uchardet/src/LangModels/LangThaiModel.cpp +267 -0
- data/ext/uchardet/src/LangModels/LangTurkishModel.cpp +175 -0
- data/ext/uchardet/src/LangModels/LangVietnameseModel.cpp +249 -0
- data/ext/uchardet/src/nsBig5Prober.cpp +88 -0
- data/ext/uchardet/src/nsBig5Prober.h +75 -0
- data/ext/uchardet/src/nsCharSetProber.cpp +125 -0
- data/ext/uchardet/src/nsCharSetProber.h +77 -0
- data/ext/uchardet/src/nsCodingStateMachine.h +105 -0
- data/ext/uchardet/src/nsEUCJPProber.cpp +99 -0
- data/ext/uchardet/src/nsEUCJPProber.h +79 -0
- data/ext/uchardet/src/nsEUCKRProber.cpp +91 -0
- data/ext/uchardet/src/nsEUCKRProber.h +81 -0
- data/ext/uchardet/src/nsEUCTWProber.cpp +91 -0
- data/ext/uchardet/src/nsEUCTWProber.h +75 -0
- data/ext/uchardet/src/nsEscCharsetProber.cpp +101 -0
- data/ext/uchardet/src/nsEscCharsetProber.h +70 -0
- data/ext/uchardet/src/nsEscSM.cpp +267 -0
- data/ext/uchardet/src/nsGB2312Prober.cpp +96 -0
- data/ext/uchardet/src/nsGB2312Prober.h +77 -0
- data/ext/uchardet/src/nsHebrewProber.cpp +194 -0
- data/ext/uchardet/src/nsHebrewProber.h +177 -0
- data/ext/uchardet/src/nsLatin1Prober.cpp +182 -0
- data/ext/uchardet/src/nsLatin1Prober.h +73 -0
- data/ext/uchardet/src/nsMBCSGroupProber.cpp +242 -0
- data/ext/uchardet/src/nsMBCSGroupProber.h +81 -0
- data/ext/uchardet/src/nsMBCSSM.cpp +513 -0
- data/ext/uchardet/src/nsPkgInt.h +89 -0
- data/ext/uchardet/src/nsSBCSGroupProber.cpp +343 -0
- data/ext/uchardet/src/nsSBCSGroupProber.h +71 -0
- data/ext/uchardet/src/nsSBCharSetProber.cpp +160 -0
- data/ext/uchardet/src/nsSBCharSetProber.h +258 -0
- data/ext/uchardet/src/nsSJISProber.cpp +98 -0
- data/ext/uchardet/src/nsSJISProber.h +81 -0
- data/ext/uchardet/src/nsUTF8Prober.cpp +87 -0
- data/ext/uchardet/src/nsUTF8Prober.h +66 -0
- data/ext/uchardet/src/nsUniversalDetector.cpp +339 -0
- data/ext/uchardet/src/nsUniversalDetector.h +91 -0
- data/ext/uchardet/src/nscore.h +59 -0
- data/ext/uchardet/src/prmem.h +49 -0
- data/ext/uchardet/src/symbols.cmake +41 -0
- data/ext/uchardet/src/tools/CMakeLists.txt +23 -0
- data/ext/uchardet/src/tools/uchardet.cpp +254 -0
- data/ext/uchardet/src/uchardet.cpp +274 -0
- data/ext/uchardet/src/uchardet.h +136 -0
- data/ext/uchardet/test/CMakeLists.txt +47 -0
- data/ext/uchardet/test/ar/iso-8859-6.txt +3 -0
- data/ext/uchardet/test/ar/utf-8.txt +3 -0
- data/ext/uchardet/test/ar/windows-1256.txt +3 -0
- data/ext/uchardet/test/bg/windows-1251.txt +3 -0
- data/ext/uchardet/test/cs/ibm852.txt +4 -0
- data/ext/uchardet/test/cs/iso-8859-2.txt +4 -0
- data/ext/uchardet/test/cs/mac-centraleurope.txt +4 -0
- data/ext/uchardet/test/cs/utf-8.txt +4 -0
- data/ext/uchardet/test/cs/windows-1250.txt +4 -0
- data/ext/uchardet/test/da/iso-8859-1.txt +7 -0
- data/ext/uchardet/test/da/iso-8859-15.txt +10 -0
- data/ext/uchardet/test/da/utf-8.txt +10 -0
- data/ext/uchardet/test/da/windows-1252.txt +10 -0
- data/ext/uchardet/test/de/iso-8859-1.txt +11 -0
- data/ext/uchardet/test/de/windows-1252.txt +11 -0
- data/ext/uchardet/test/el/iso-8859-7.txt +3 -0
- data/ext/uchardet/test/el/utf-8.txt +3 -0
- data/ext/uchardet/test/el/windows-1253.txt +5 -0
- data/ext/uchardet/test/en/ascii.txt +4 -0
- data/ext/uchardet/test/eo/iso-8859-3.txt +7 -0
- data/ext/uchardet/test/es/iso-8859-1.txt +5 -0
- data/ext/uchardet/test/es/iso-8859-15.txt +5 -0
- data/ext/uchardet/test/es/utf-8.txt +5 -0
- data/ext/uchardet/test/es/windows-1252.txt +5 -0
- data/ext/uchardet/test/et/iso-8859-13.txt +6 -0
- data/ext/uchardet/test/et/iso-8859-15.txt +6 -0
- data/ext/uchardet/test/et/iso-8859-4.txt +6 -0
- data/ext/uchardet/test/et/utf-8.txt +6 -0
- data/ext/uchardet/test/et/windows-1252.txt +6 -0
- data/ext/uchardet/test/et/windows-1257.txt +6 -0
- data/ext/uchardet/test/fi/iso-8859-1.txt +8 -0
- data/ext/uchardet/test/fi/utf-8.txt +8 -0
- data/ext/uchardet/test/fr/iso-8859-1.txt +5 -0
- data/ext/uchardet/test/fr/iso-8859-15.txt +16 -0
- data/ext/uchardet/test/fr/utf-16.be +0 -0
- data/ext/uchardet/test/fr/utf-32.le +0 -0
- data/ext/uchardet/test/fr/utf-8.txt +14 -0
- data/ext/uchardet/test/fr/windows-1252.txt +3 -0
- data/ext/uchardet/test/ga/iso-8859-1.txt +6 -0
- data/ext/uchardet/test/ga/utf-8.txt +6 -0
- data/ext/uchardet/test/ga/windows-1252.txt +6 -0
- data/ext/uchardet/test/he/iso-8859-8.txt +2 -0
- data/ext/uchardet/test/he/utf-8.txt +3 -0
- data/ext/uchardet/test/he/windows-1255.txt +1 -0
- data/ext/uchardet/test/hr/ibm852.txt +4 -0
- data/ext/uchardet/test/hr/iso-8859-13.txt +4 -0
- data/ext/uchardet/test/hr/iso-8859-16.txt +4 -0
- data/ext/uchardet/test/hr/iso-8859-2.txt +4 -0
- data/ext/uchardet/test/hr/mac-centraleurope.txt +4 -0
- data/ext/uchardet/test/hr/utf-8.txt +4 -0
- data/ext/uchardet/test/hr/windows-1250.txt +4 -0
- data/ext/uchardet/test/hu/iso-8859-2.txt +3 -0
- data/ext/uchardet/test/hu/windows-1250.txt +1 -0
- data/ext/uchardet/test/it/iso-8859-1.txt +18 -0
- data/ext/uchardet/test/it/utf-8.txt +18 -0
- data/ext/uchardet/test/ja/euc-jp.txt +10 -0
- data/ext/uchardet/test/ja/iso-2022-jp.txt +8 -0
- data/ext/uchardet/test/ja/shift_jis.txt +1 -0
- data/ext/uchardet/test/ja/utf-16be.txt +0 -0
- data/ext/uchardet/test/ja/utf-16le.txt +0 -0
- data/ext/uchardet/test/ja/utf-8.txt +9 -0
- data/ext/uchardet/test/ko/iso-2022-kr.txt +8 -0
- data/ext/uchardet/test/ko/uhc.smi +16 -0
- data/ext/uchardet/test/ko/utf-16.le +0 -0
- data/ext/uchardet/test/ko/utf-32.be +0 -0
- data/ext/uchardet/test/ko/utf-8.txt +3 -0
- data/ext/uchardet/test/lt/iso-8859-10.txt +3 -0
- data/ext/uchardet/test/lt/iso-8859-13.txt +3 -0
- data/ext/uchardet/test/lt/iso-8859-4.txt +3 -0
- data/ext/uchardet/test/lt/utf-8.txt +3 -0
- data/ext/uchardet/test/lv/iso-8859-10.txt +6 -0
- data/ext/uchardet/test/lv/iso-8859-13.txt +6 -0
- data/ext/uchardet/test/lv/iso-8859-4.txt +6 -0
- data/ext/uchardet/test/lv/utf-8.txt +6 -0
- data/ext/uchardet/test/mt/iso-8859-3.txt +4 -0
- data/ext/uchardet/test/mt/utf-8.txt +4 -0
- data/ext/uchardet/test/pl/ibm852.txt +3 -0
- data/ext/uchardet/test/pl/iso-8859-13.txt +3 -0
- data/ext/uchardet/test/pl/iso-8859-16.txt +3 -0
- data/ext/uchardet/test/pl/iso-8859-2.txt +3 -0
- data/ext/uchardet/test/pl/mac-centraleurope.txt +3 -0
- data/ext/uchardet/test/pl/utf-8.txt +3 -0
- data/ext/uchardet/test/pl/windows-1250.txt +3 -0
- data/ext/uchardet/test/pt/iso-8859-1.txt +6 -0
- data/ext/uchardet/test/pt/utf-8.txt +6 -0
- data/ext/uchardet/test/ro/ibm852.txt +9 -0
- data/ext/uchardet/test/ro/iso-8859-16.txt +9 -0
- data/ext/uchardet/test/ro/utf-8.txt +9 -0
- data/ext/uchardet/test/ro/windows-1250.txt +9 -0
- data/ext/uchardet/test/ru/ibm855.txt +5 -0
- data/ext/uchardet/test/ru/ibm866.txt +11 -0
- data/ext/uchardet/test/ru/iso-8859-5.txt +3 -0
- data/ext/uchardet/test/ru/koi8-r.txt +1 -0
- data/ext/uchardet/test/ru/mac-cyrillic.txt +9 -0
- data/ext/uchardet/test/ru/windows-1251.txt +4 -0
- data/ext/uchardet/test/sk/ibm852.txt +3 -0
- data/ext/uchardet/test/sk/iso-8859-2.txt +3 -0
- data/ext/uchardet/test/sk/mac-centraleurope.txt +3 -0
- data/ext/uchardet/test/sk/utf-8.txt +3 -0
- data/ext/uchardet/test/sk/windows-1250.txt +3 -0
- data/ext/uchardet/test/sl/ibm852.txt +9 -0
- data/ext/uchardet/test/sl/iso-8859-16.txt +9 -0
- data/ext/uchardet/test/sl/iso-8859-2.txt +9 -0
- data/ext/uchardet/test/sl/mac-centraleurope.txt +9 -0
- data/ext/uchardet/test/sl/utf-8.txt +9 -0
- data/ext/uchardet/test/sl/windows-1250.txt +9 -0
- data/ext/uchardet/test/sv/iso-8859-1.txt +10 -0
- data/ext/uchardet/test/sv/utf-8.txt +10 -0
- data/ext/uchardet/test/sv/windows-1252.txt +10 -0
- data/ext/uchardet/test/th/iso-8859-11.txt +5 -0
- data/ext/uchardet/test/th/tis-620.txt +5 -0
- data/ext/uchardet/test/th/utf-8.txt +1 -0
- data/ext/uchardet/test/tr/iso-8859-3.txt +13 -0
- data/ext/uchardet/test/tr/iso-8859-9.txt +13 -0
- data/ext/uchardet/test/uchardet-tests.c +130 -0
- data/ext/uchardet/test/vi/utf-8.txt +4 -0
- data/ext/uchardet/test/vi/viscii.txt +4 -0
- data/ext/uchardet/test/vi/windows-1258.txt +4 -0
- data/ext/uchardet/test/zh/big5.txt +1 -0
- data/ext/uchardet/test/zh/euc-tw.txt +1 -0
- data/ext/uchardet/test/zh/gb18030.txt +1 -0
- data/ext/uchardet/test/zh/utf-8.txt +1 -0
- data/ext/uchardet/uchardet.doap +51 -0
- data/ext/uchardet/uchardet.pc.in +10 -0
- data/lib/cchardet.rb +56 -0
- data/lib/cchardet/lib_finder.rb +32 -0
- data/lib/cchardet/version.rb +5 -0
- metadata +362 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 79caccb90dff4c75480521201b58e917391cd7aa456b4d07734a627364ec8005
|
4
|
+
data.tar.gz: e8f9e53f10e87ef646dcee859bbd97cd77ace093ffee8c23da8e3efdadd9efc2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d8fb41ab84b626fa1da30517ce706ec89aad3f61652865fcea6d6d4293f4b431d7ea5d37d490fa5e2bb29f6f2e00f99c1a465544a9565c2900aa6518b2b83811
|
7
|
+
data.tar.gz: 62a8ee2996e8315115436b4ab0cbec41f3af658eb0778f7252d02dbc35f1567445a57622d80c6a5a14200225cb5a0080853dbfc1eaa2ac23cdc65b382a2e73db
|
data/.gitignore
ADDED
data/.gitmodules
ADDED
data/.rubocop.yml
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Cchardet
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/cchardet`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'cchardet'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle install
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install cchardet
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/cchardet.
|
data/Rakefile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
require "rake/testtask"
|
5
|
+
require "rake/extensiontask"
|
6
|
+
|
7
|
+
Rake::TestTask.new(:test) do |t|
|
8
|
+
t.libs << "test"
|
9
|
+
t.libs << "lib"
|
10
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
11
|
+
end
|
12
|
+
|
13
|
+
task default: :test
|
14
|
+
|
15
|
+
Rake::ExtensionTask.new "cchardet"
|
data/cchardet.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/cchardet/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "cchardet"
|
7
|
+
spec.version = CChardet::VERSION
|
8
|
+
spec.authors = ["Eddie Lebow"]
|
9
|
+
spec.email = ["elebow@users.noreply.github.com"]
|
10
|
+
|
11
|
+
spec.summary = "Ruby bindings for freedesktop.org's libuchardet, for encoding detection."
|
12
|
+
spec.homepage = "https://github.com/elebow/cchardet"
|
13
|
+
spec.license = "public domain"
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
15
|
+
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
spec.metadata["source_code_uri"] = "https://github.com/elebow/cchardet"
|
18
|
+
spec.metadata["changelog_uri"] = "https://github.com/elebow/cchardet/blob/trunk/CHANGELOG.md"
|
19
|
+
|
20
|
+
# Specify which files should be added to the gem when it is released.
|
21
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
22
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
23
|
+
`git ls-files -z --recurse-submodules`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
24
|
+
end
|
25
|
+
spec.bindir = "exe"
|
26
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
27
|
+
spec.require_paths = ["lib"]
|
28
|
+
|
29
|
+
spec.extensions = %w[ext/cchardet/extconf.rb]
|
30
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "mkmf"
|
4
|
+
|
5
|
+
open("Makefile", "w") do |makefile|
|
6
|
+
if with_config("unreleased-uchardet")
|
7
|
+
# Note the tab characters in the Makefile contents
|
8
|
+
makefile.puts <<~MAKEFILE
|
9
|
+
make:
|
10
|
+
cd ../uchardet && cmake . -DCMAKE_BUILD_TYPE=Release -DBUILD_BINARY=OFF && make
|
11
|
+
install:
|
12
|
+
# The gem will load the library from where it was built.
|
13
|
+
clean:
|
14
|
+
# Any files will be cleaned up when the gem is uninstalled.
|
15
|
+
MAKEFILE
|
16
|
+
else
|
17
|
+
makefile.puts <<~MAKEFILE
|
18
|
+
make:
|
19
|
+
|
20
|
+
install:
|
21
|
+
|
22
|
+
clean:
|
23
|
+
|
24
|
+
MAKEFILE
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
__pycache__/
|
@@ -0,0 +1,106 @@
|
|
1
|
+
image: debian:testing
|
2
|
+
|
3
|
+
stages:
|
4
|
+
- build
|
5
|
+
|
6
|
+
variables:
|
7
|
+
GIT_DEPTH: "1"
|
8
|
+
|
9
|
+
## GNU/Linux 64-bit CIs ##
|
10
|
+
|
11
|
+
debian/testing-gcc:
|
12
|
+
stage: build
|
13
|
+
artifacts:
|
14
|
+
expire_in: 1 week
|
15
|
+
when: always
|
16
|
+
name: "uchardet-build-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
17
|
+
paths:
|
18
|
+
- _build
|
19
|
+
before_script:
|
20
|
+
- apt-get update
|
21
|
+
- apt-get install -y --no-install-recommends
|
22
|
+
build-essential
|
23
|
+
cmake
|
24
|
+
script:
|
25
|
+
- mkdir _build
|
26
|
+
- cd _build
|
27
|
+
- cmake ..
|
28
|
+
- make -j "$(nproc)"
|
29
|
+
- make test
|
30
|
+
- make install
|
31
|
+
|
32
|
+
debian/testing-clang:
|
33
|
+
extends: debian/testing-gcc
|
34
|
+
variables:
|
35
|
+
CC: "clang"
|
36
|
+
CXX: "clang++"
|
37
|
+
before_script:
|
38
|
+
- apt-get update
|
39
|
+
- apt-get install -y --no-install-recommends
|
40
|
+
build-essential
|
41
|
+
clang
|
42
|
+
cmake
|
43
|
+
|
44
|
+
## Windows CIs ##
|
45
|
+
|
46
|
+
win64:
|
47
|
+
stage: build
|
48
|
+
artifacts:
|
49
|
+
expire_in: 1 week
|
50
|
+
when: always
|
51
|
+
name: "uchardet-build-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
52
|
+
paths:
|
53
|
+
- _build
|
54
|
+
before_script:
|
55
|
+
- apt-get update
|
56
|
+
- apt-get install -y --no-install-recommends
|
57
|
+
build-essential
|
58
|
+
cmake
|
59
|
+
cpio
|
60
|
+
gcc-mingw-w64-x86-64
|
61
|
+
g++-mingw-w64-x86-64
|
62
|
+
git
|
63
|
+
python3-distutils
|
64
|
+
python3-docutils
|
65
|
+
rpm
|
66
|
+
- apt-get install -y --reinstall ca-certificates
|
67
|
+
- git clone --depth=${GIT_DEPTH} git://git.tuxfamily.org/gitroot/crossroad/crossroad.git
|
68
|
+
- cd crossroad
|
69
|
+
- ./setup.py install --prefix=`pwd`/../.local
|
70
|
+
- cd ..
|
71
|
+
script:
|
72
|
+
- export PATH="`pwd`/.local/bin:$PATH"
|
73
|
+
- mkdir _build
|
74
|
+
- cd _build
|
75
|
+
- echo 'crossroad cmake .. && make && make install' | crossroad w64 gimp --run="-"
|
76
|
+
|
77
|
+
win32:
|
78
|
+
stage: build
|
79
|
+
artifacts:
|
80
|
+
expire_in: 1 week
|
81
|
+
when: always
|
82
|
+
name: "uchardet-build-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
83
|
+
paths:
|
84
|
+
- _build
|
85
|
+
before_script:
|
86
|
+
- apt-get update
|
87
|
+
- apt-get install -y --no-install-recommends
|
88
|
+
build-essential
|
89
|
+
cmake
|
90
|
+
cpio
|
91
|
+
gcc-mingw-w64-i686
|
92
|
+
g++-mingw-w64-i686
|
93
|
+
git
|
94
|
+
python3-distutils
|
95
|
+
python3-docutils
|
96
|
+
rpm
|
97
|
+
- apt-get install -y --reinstall ca-certificates
|
98
|
+
- git clone --depth=${GIT_DEPTH} git://git.tuxfamily.org/gitroot/crossroad/crossroad.git
|
99
|
+
- cd crossroad
|
100
|
+
- ./setup.py install --prefix=`pwd`/../.local
|
101
|
+
- cd ..
|
102
|
+
script:
|
103
|
+
- export PATH="`pwd`/.local/bin:$PATH"
|
104
|
+
- mkdir _build
|
105
|
+
- cd _build
|
106
|
+
- echo 'crossroad cmake .. && make && make install' | crossroad w32 gimp --run="-"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
== Original Authors ==
|
2
|
+
|
3
|
+
The original code is Mozilla Universal charset detector code.
|
4
|
+
The initial developer of the Original Code is Netscape Communications Corporation.
|
5
|
+
The initial developer of the C wrapper is BYVoid.
|
6
|
+
|
7
|
+
== Maintainers ==
|
8
|
+
|
9
|
+
BYVoid <byvoid.kcp@gmail.com>
|
10
|
+
Jehan <jehan@girinstud.io>
|
11
|
+
|
12
|
+
== Contributors ==
|
13
|
+
|
14
|
+
You can obtain the full list of contributors to uchardet with the
|
15
|
+
following git command in the source repository:
|
16
|
+
$ git shortlog -s
|
@@ -0,0 +1,74 @@
|
|
1
|
+
######## Project settings
|
2
|
+
cmake_minimum_required(VERSION 2.8.5)
|
3
|
+
include(CheckCCompilerFlag)
|
4
|
+
set (PACKAGE_NAME uchardet)
|
5
|
+
project (${PACKAGE_NAME} CXX C)
|
6
|
+
enable_testing()
|
7
|
+
|
8
|
+
######## Package information
|
9
|
+
set (PACKAGE_URL https://www.freedesktop.org/wiki/Software/uchardet/)
|
10
|
+
set (PACKAGE_BUGREPORT https://gitlab.freedesktop.org/uchardet/uchardet/-/issues)
|
11
|
+
set (UCHARDET_VERSION_MAJOR 0)
|
12
|
+
set (UCHARDET_VERSION_MINOR 0)
|
13
|
+
set (UCHARDET_VERSION_REVISION 7)
|
14
|
+
|
15
|
+
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
16
|
+
set (version_suffix .debug)
|
17
|
+
endif (CMAKE_BUILD_TYPE MATCHES Debug)
|
18
|
+
|
19
|
+
set (
|
20
|
+
UCHARDET_VERSION
|
21
|
+
${UCHARDET_VERSION_MAJOR}.${UCHARDET_VERSION_MINOR}.${UCHARDET_VERSION_REVISION}${version_suffix}
|
22
|
+
)
|
23
|
+
set(CMAKE_CXX_STANDARD 11)
|
24
|
+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
25
|
+
|
26
|
+
######## Directory
|
27
|
+
|
28
|
+
include(GNUInstallDirs)
|
29
|
+
|
30
|
+
######## Configuration
|
31
|
+
|
32
|
+
option(BUILD_BINARY "Build the CLI tool." ON)
|
33
|
+
option(BUILD_SHARED_LIBS "Build shared library and link executable to it." ON)
|
34
|
+
option(CHECK_SSE2 "Check and enable SSE2 extensions if supported. Disabling SSE on platforms which support it may decrease performances." ON)
|
35
|
+
set(TARGET_ARCHITECTURE "" CACHE STRING "Target CPU architecture. It is autodetected if not specified.")
|
36
|
+
|
37
|
+
if (BUILD_SHARED_LIBS)
|
38
|
+
option(BUILD_STATIC "Build static library" ON)
|
39
|
+
endif (BUILD_SHARED_LIBS)
|
40
|
+
|
41
|
+
if (TARGET_ARCHITECTURE STREQUAL "")
|
42
|
+
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} TARGET_ARCHITECTURE)
|
43
|
+
endif (TARGET_ARCHITECTURE STREQUAL "")
|
44
|
+
|
45
|
+
if (TARGET_ARCHITECTURE MATCHES ".*(x86)|(amd).*")
|
46
|
+
CHECK_C_COMPILER_FLAG(-msse2 SUPPORTS_CFLAG_SSE2)
|
47
|
+
CHECK_C_COMPILER_FLAG(-mfpmath=sse SUPPORTS_CFLAG_SSE_MATH)
|
48
|
+
if (CHECK_SSE2 AND SUPPORTS_CFLAG_SSE2 AND SUPPORTS_CFLAG_SSE_MATH)
|
49
|
+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse")
|
50
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse")
|
51
|
+
else (CHECK_SSE2 AND SUPPORTS_CFLAG_SSE2 AND SUPPORTS_CFLAG_SSE_MATH)
|
52
|
+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffloat-store")
|
53
|
+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffloat-store")
|
54
|
+
endif (CHECK_SSE2 AND SUPPORTS_CFLAG_SSE2 AND SUPPORTS_CFLAG_SSE_MATH)
|
55
|
+
endif (TARGET_ARCHITECTURE MATCHES ".*(x86)|(amd).*")
|
56
|
+
|
57
|
+
configure_file(
|
58
|
+
uchardet.pc.in
|
59
|
+
uchardet.pc
|
60
|
+
@ONLY
|
61
|
+
)
|
62
|
+
|
63
|
+
install(
|
64
|
+
FILES
|
65
|
+
${CMAKE_BINARY_DIR}/uchardet.pc
|
66
|
+
DESTINATION
|
67
|
+
${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
68
|
+
)
|
69
|
+
|
70
|
+
######## Subdirectories
|
71
|
+
|
72
|
+
add_subdirectory(src)
|
73
|
+
add_subdirectory(doc)
|
74
|
+
add_subdirectory(test)
|
@@ -0,0 +1,1316 @@
|
|
1
|
+
MOZILLA PUBLIC LICENSE
|
2
|
+
Version 1.1
|
3
|
+
|
4
|
+
---------------
|
5
|
+
|
6
|
+
1. Definitions.
|
7
|
+
|
8
|
+
1.0.1. "Commercial Use" means distribution or otherwise making the
|
9
|
+
Covered Code available to a third party.
|
10
|
+
|
11
|
+
1.1. "Contributor" means each entity that creates or contributes to
|
12
|
+
the creation of Modifications.
|
13
|
+
|
14
|
+
1.2. "Contributor Version" means the combination of the Original
|
15
|
+
Code, prior Modifications used by a Contributor, and the Modifications
|
16
|
+
made by that particular Contributor.
|
17
|
+
|
18
|
+
1.3. "Covered Code" means the Original Code or Modifications or the
|
19
|
+
combination of the Original Code and Modifications, in each case
|
20
|
+
including portions thereof.
|
21
|
+
|
22
|
+
1.4. "Electronic Distribution Mechanism" means a mechanism generally
|
23
|
+
accepted in the software development community for the electronic
|
24
|
+
transfer of data.
|
25
|
+
|
26
|
+
1.5. "Executable" means Covered Code in any form other than Source
|
27
|
+
Code.
|
28
|
+
|
29
|
+
1.6. "Initial Developer" means the individual or entity identified
|
30
|
+
as the Initial Developer in the Source Code notice required by Exhibit
|
31
|
+
A.
|
32
|
+
|
33
|
+
1.7. "Larger Work" means a work which combines Covered Code or
|
34
|
+
portions thereof with code not governed by the terms of this License.
|
35
|
+
|
36
|
+
1.8. "License" means this document.
|
37
|
+
|
38
|
+
1.8.1. "Licensable" means having the right to grant, to the maximum
|
39
|
+
extent possible, whether at the time of the initial grant or
|
40
|
+
subsequently acquired, any and all of the rights conveyed herein.
|
41
|
+
|
42
|
+
1.9. "Modifications" means any addition to or deletion from the
|
43
|
+
substance or structure of either the Original Code or any previous
|
44
|
+
Modifications. When Covered Code is released as a series of files, a
|
45
|
+
Modification is:
|
46
|
+
A. Any addition to or deletion from the contents of a file
|
47
|
+
containing Original Code or previous Modifications.
|
48
|
+
|
49
|
+
B. Any new file that contains any part of the Original Code or
|
50
|
+
previous Modifications.
|
51
|
+
|
52
|
+
1.10. "Original Code" means Source Code of computer software code
|
53
|
+
which is described in the Source Code notice required by Exhibit A as
|
54
|
+
Original Code, and which, at the time of its release under this
|
55
|
+
License is not already Covered Code governed by this License.
|
56
|
+
|
57
|
+
1.10.1. "Patent Claims" means any patent claim(s), now owned or
|
58
|
+
hereafter acquired, including without limitation, method, process,
|
59
|
+
and apparatus claims, in any patent Licensable by grantor.
|
60
|
+
|
61
|
+
1.11. "Source Code" means the preferred form of the Covered Code for
|
62
|
+
making modifications to it, including all modules it contains, plus
|
63
|
+
any associated interface definition files, scripts used to control
|
64
|
+
compilation and installation of an Executable, or source code
|
65
|
+
differential comparisons against either the Original Code or another
|
66
|
+
well known, available Covered Code of the Contributor's choice. The
|
67
|
+
Source Code can be in a compressed or archival form, provided the
|
68
|
+
appropriate decompression or de-archiving software is widely available
|
69
|
+
for no charge.
|
70
|
+
|
71
|
+
1.12. "You" (or "Your") means an individual or a legal entity
|
72
|
+
exercising rights under, and complying with all of the terms of, this
|
73
|
+
License or a future version of this License issued under Section 6.1.
|
74
|
+
For legal entities, "You" includes any entity which controls, is
|
75
|
+
controlled by, or is under common control with You. For purposes of
|
76
|
+
this definition, "control" means (a) the power, direct or indirect,
|
77
|
+
to cause the direction or management of such entity, whether by
|
78
|
+
contract or otherwise, or (b) ownership of more than fifty percent
|
79
|
+
(50%) of the outstanding shares or beneficial ownership of such
|
80
|
+
entity.
|
81
|
+
|
82
|
+
2. Source Code License.
|
83
|
+
|
84
|
+
2.1. The Initial Developer Grant.
|
85
|
+
The Initial Developer hereby grants You a world-wide, royalty-free,
|
86
|
+
non-exclusive license, subject to third party intellectual property
|
87
|
+
claims:
|
88
|
+
(a) under intellectual property rights (other than patent or
|
89
|
+
trademark) Licensable by Initial Developer to use, reproduce,
|
90
|
+
modify, display, perform, sublicense and distribute the Original
|
91
|
+
Code (or portions thereof) with or without Modifications, and/or
|
92
|
+
as part of a Larger Work; and
|
93
|
+
|
94
|
+
(b) under Patents Claims infringed by the making, using or
|
95
|
+
selling of Original Code, to make, have made, use, practice,
|
96
|
+
sell, and offer for sale, and/or otherwise dispose of the
|
97
|
+
Original Code (or portions thereof).
|
98
|
+
|
99
|
+
(c) the licenses granted in this Section 2.1(a) and (b) are
|
100
|
+
effective on the date Initial Developer first distributes
|
101
|
+
Original Code under the terms of this License.
|
102
|
+
|
103
|
+
(d) Notwithstanding Section 2.1(b) above, no patent license is
|
104
|
+
granted: 1) for code that You delete from the Original Code; 2)
|
105
|
+
separate from the Original Code; or 3) for infringements caused
|
106
|
+
by: i) the modification of the Original Code or ii) the
|
107
|
+
combination of the Original Code with other software or devices.
|
108
|
+
|
109
|
+
2.2. Contributor Grant.
|
110
|
+
Subject to third party intellectual property claims, each Contributor
|
111
|
+
hereby grants You a world-wide, royalty-free, non-exclusive license
|
112
|
+
|
113
|
+
(a) under intellectual property rights (other than patent or
|
114
|
+
trademark) Licensable by Contributor, to use, reproduce, modify,
|
115
|
+
display, perform, sublicense and distribute the Modifications
|
116
|
+
created by such Contributor (or portions thereof) either on an
|
117
|
+
unmodified basis, with other Modifications, as Covered Code
|
118
|
+
and/or as part of a Larger Work; and
|
119
|
+
|
120
|
+
(b) under Patent Claims infringed by the making, using, or
|
121
|
+
selling of Modifications made by that Contributor either alone
|
122
|
+
and/or in combination with its Contributor Version (or portions
|
123
|
+
of such combination), to make, use, sell, offer for sale, have
|
124
|
+
made, and/or otherwise dispose of: 1) Modifications made by that
|
125
|
+
Contributor (or portions thereof); and 2) the combination of
|
126
|
+
Modifications made by that Contributor with its Contributor
|
127
|
+
Version (or portions of such combination).
|
128
|
+
|
129
|
+
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
|
130
|
+
effective on the date Contributor first makes Commercial Use of
|
131
|
+
the Covered Code.
|
132
|
+
|
133
|
+
(d) Notwithstanding Section 2.2(b) above, no patent license is
|
134
|
+
granted: 1) for any code that Contributor has deleted from the
|
135
|
+
Contributor Version; 2) separate from the Contributor Version;
|
136
|
+
3) for infringements caused by: i) third party modifications of
|
137
|
+
Contributor Version or ii) the combination of Modifications made
|
138
|
+
by that Contributor with other software (except as part of the
|
139
|
+
Contributor Version) or other devices; or 4) under Patent Claims
|
140
|
+
infringed by Covered Code in the absence of Modifications made by
|
141
|
+
that Contributor.
|
142
|
+
|
143
|
+
3. Distribution Obligations.
|
144
|
+
|
145
|
+
3.1. Application of License.
|
146
|
+
The Modifications which You create or to which You contribute are
|
147
|
+
governed by the terms of this License, including without limitation
|
148
|
+
Section 2.2. The Source Code version of Covered Code may be
|
149
|
+
distributed only under the terms of this License or a future version
|
150
|
+
of this License released under Section 6.1, and You must include a
|
151
|
+
copy of this License with every copy of the Source Code You
|
152
|
+
distribute. You may not offer or impose any terms on any Source Code
|
153
|
+
version that alters or restricts the applicable version of this
|
154
|
+
License or the recipients' rights hereunder. However, You may include
|
155
|
+
an additional document offering the additional rights described in
|
156
|
+
Section 3.5.
|
157
|
+
|
158
|
+
3.2. Availability of Source Code.
|
159
|
+
Any Modification which You create or to which You contribute must be
|
160
|
+
made available in Source Code form under the terms of this License
|
161
|
+
either on the same media as an Executable version or via an accepted
|
162
|
+
Electronic Distribution Mechanism to anyone to whom you made an
|
163
|
+
Executable version available; and if made available via Electronic
|
164
|
+
Distribution Mechanism, must remain available for at least twelve (12)
|
165
|
+
months after the date it initially became available, or at least six
|
166
|
+
(6) months after a subsequent version of that particular Modification
|
167
|
+
has been made available to such recipients. You are responsible for
|
168
|
+
ensuring that the Source Code version remains available even if the
|
169
|
+
Electronic Distribution Mechanism is maintained by a third party.
|
170
|
+
|
171
|
+
3.3. Description of Modifications.
|
172
|
+
You must cause all Covered Code to which You contribute to contain a
|
173
|
+
file documenting the changes You made to create that Covered Code and
|
174
|
+
the date of any change. You must include a prominent statement that
|
175
|
+
the Modification is derived, directly or indirectly, from Original
|
176
|
+
Code provided by the Initial Developer and including the name of the
|
177
|
+
Initial Developer in (a) the Source Code, and (b) in any notice in an
|
178
|
+
Executable version or related documentation in which You describe the
|
179
|
+
origin or ownership of the Covered Code.
|
180
|
+
|
181
|
+
3.4. Intellectual Property Matters
|
182
|
+
(a) Third Party Claims.
|
183
|
+
If Contributor has knowledge that a license under a third party's
|
184
|
+
intellectual property rights is required to exercise the rights
|
185
|
+
granted by such Contributor under Sections 2.1 or 2.2,
|
186
|
+
Contributor must include a text file with the Source Code
|
187
|
+
distribution titled "LEGAL" which describes the claim and the
|
188
|
+
party making the claim in sufficient detail that a recipient will
|
189
|
+
know whom to contact. If Contributor obtains such knowledge after
|
190
|
+
the Modification is made available as described in Section 3.2,
|
191
|
+
Contributor shall promptly modify the LEGAL file in all copies
|
192
|
+
Contributor makes available thereafter and shall take other steps
|
193
|
+
(such as notifying appropriate mailing lists or newsgroups)
|
194
|
+
reasonably calculated to inform those who received the Covered
|
195
|
+
Code that new knowledge has been obtained.
|
196
|
+
|
197
|
+
(b) Contributor APIs.
|
198
|
+
If Contributor's Modifications include an application programming
|
199
|
+
interface and Contributor has knowledge of patent licenses which
|
200
|
+
are reasonably necessary to implement that API, Contributor must
|
201
|
+
also include this information in the LEGAL file.
|
202
|
+
|
203
|
+
(c) Representations.
|
204
|
+
Contributor represents that, except as disclosed pursuant to
|
205
|
+
Section 3.4(a) above, Contributor believes that Contributor's
|
206
|
+
Modifications are Contributor's original creation(s) and/or
|
207
|
+
Contributor has sufficient rights to grant the rights conveyed by
|
208
|
+
this License.
|
209
|
+
|
210
|
+
3.5. Required Notices.
|
211
|
+
You must duplicate the notice in Exhibit A in each file of the Source
|
212
|
+
Code. If it is not possible to put such notice in a particular Source
|
213
|
+
Code file due to its structure, then You must include such notice in a
|
214
|
+
location (such as a relevant directory) where a user would be likely
|
215
|
+
to look for such a notice. If You created one or more Modification(s)
|
216
|
+
You may add your name as a Contributor to the notice described in
|
217
|
+
Exhibit A. You must also duplicate this License in any documentation
|
218
|
+
for the Source Code where You describe recipients' rights or ownership
|
219
|
+
rights relating to Covered Code. You may choose to offer, and to
|
220
|
+
charge a fee for, warranty, support, indemnity or liability
|
221
|
+
obligations to one or more recipients of Covered Code. However, You
|
222
|
+
may do so only on Your own behalf, and not on behalf of the Initial
|
223
|
+
Developer or any Contributor. You must make it absolutely clear than
|
224
|
+
any such warranty, support, indemnity or liability obligation is
|
225
|
+
offered by You alone, and You hereby agree to indemnify the Initial
|
226
|
+
Developer and every Contributor for any liability incurred by the
|
227
|
+
Initial Developer or such Contributor as a result of warranty,
|
228
|
+
support, indemnity or liability terms You offer.
|
229
|
+
|
230
|
+
3.6. Distribution of Executable Versions.
|
231
|
+
You may distribute Covered Code in Executable form only if the
|
232
|
+
requirements of Section 3.1-3.5 have been met for that Covered Code,
|
233
|
+
and if You include a notice stating that the Source Code version of
|
234
|
+
the Covered Code is available under the terms of this License,
|
235
|
+
including a description of how and where You have fulfilled the
|
236
|
+
obligations of Section 3.2. The notice must be conspicuously included
|
237
|
+
in any notice in an Executable version, related documentation or
|
238
|
+
collateral in which You describe recipients' rights relating to the
|
239
|
+
Covered Code. You may distribute the Executable version of Covered
|
240
|
+
Code or ownership rights under a license of Your choice, which may
|
241
|
+
contain terms different from this License, provided that You are in
|
242
|
+
compliance with the terms of this License and that the license for the
|
243
|
+
Executable version does not attempt to limit or alter the recipient's
|
244
|
+
rights in the Source Code version from the rights set forth in this
|
245
|
+
License. If You distribute the Executable version under a different
|
246
|
+
license You must make it absolutely clear that any terms which differ
|
247
|
+
from this License are offered by You alone, not by the Initial
|
248
|
+
Developer or any Contributor. You hereby agree to indemnify the
|
249
|
+
Initial Developer and every Contributor for any liability incurred by
|
250
|
+
the Initial Developer or such Contributor as a result of any such
|
251
|
+
terms You offer.
|
252
|
+
|
253
|
+
3.7. Larger Works.
|
254
|
+
You may create a Larger Work by combining Covered Code with other code
|
255
|
+
not governed by the terms of this License and distribute the Larger
|
256
|
+
Work as a single product. In such a case, You must make sure the
|
257
|
+
requirements of this License are fulfilled for the Covered Code.
|
258
|
+
|
259
|
+
4. Inability to Comply Due to Statute or Regulation.
|
260
|
+
|
261
|
+
If it is impossible for You to comply with any of the terms of this
|
262
|
+
License with respect to some or all of the Covered Code due to
|
263
|
+
statute, judicial order, or regulation then You must: (a) comply with
|
264
|
+
the terms of this License to the maximum extent possible; and (b)
|
265
|
+
describe the limitations and the code they affect. Such description
|
266
|
+
must be included in the LEGAL file described in Section 3.4 and must
|
267
|
+
be included with all distributions of the Source Code. Except to the
|
268
|
+
extent prohibited by statute or regulation, such description must be
|
269
|
+
sufficiently detailed for a recipient of ordinary skill to be able to
|
270
|
+
understand it.
|
271
|
+
|
272
|
+
5. Application of this License.
|
273
|
+
|
274
|
+
This License applies to code to which the Initial Developer has
|
275
|
+
attached the notice in Exhibit A and to related Covered Code.
|
276
|
+
|
277
|
+
6. Versions of the License.
|
278
|
+
|
279
|
+
6.1. New Versions.
|
280
|
+
Netscape Communications Corporation ("Netscape") may publish revised
|
281
|
+
and/or new versions of the License from time to time. Each version
|
282
|
+
will be given a distinguishing version number.
|
283
|
+
|
284
|
+
6.2. Effect of New Versions.
|
285
|
+
Once Covered Code has been published under a particular version of the
|
286
|
+
License, You may always continue to use it under the terms of that
|
287
|
+
version. You may also choose to use such Covered Code under the terms
|
288
|
+
of any subsequent version of the License published by Netscape. No one
|
289
|
+
other than Netscape has the right to modify the terms applicable to
|
290
|
+
Covered Code created under this License.
|
291
|
+
|
292
|
+
6.3. Derivative Works.
|
293
|
+
If You create or use a modified version of this License (which you may
|
294
|
+
only do in order to apply it to code which is not already Covered Code
|
295
|
+
governed by this License), You must (a) rename Your license so that
|
296
|
+
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
|
297
|
+
"MPL", "NPL" or any confusingly similar phrase do not appear in your
|
298
|
+
license (except to note that your license differs from this License)
|
299
|
+
and (b) otherwise make it clear that Your version of the license
|
300
|
+
contains terms which differ from the Mozilla Public License and
|
301
|
+
Netscape Public License. (Filling in the name of the Initial
|
302
|
+
Developer, Original Code or Contributor in the notice described in
|
303
|
+
Exhibit A shall not of themselves be deemed to be modifications of
|
304
|
+
this License.)
|
305
|
+
|
306
|
+
7. DISCLAIMER OF WARRANTY.
|
307
|
+
|
308
|
+
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
|
309
|
+
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
310
|
+
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
|
311
|
+
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
|
312
|
+
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
|
313
|
+
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
|
314
|
+
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
|
315
|
+
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
|
316
|
+
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
|
317
|
+
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
318
|
+
|
319
|
+
8. TERMINATION.
|
320
|
+
|
321
|
+
8.1. This License and the rights granted hereunder will terminate
|
322
|
+
automatically if You fail to comply with terms herein and fail to cure
|
323
|
+
such breach within 30 days of becoming aware of the breach. All
|
324
|
+
sublicenses to the Covered Code which are properly granted shall
|
325
|
+
survive any termination of this License. Provisions which, by their
|
326
|
+
nature, must remain in effect beyond the termination of this License
|
327
|
+
shall survive.
|
328
|
+
|
329
|
+
8.2. If You initiate litigation by asserting a patent infringement
|
330
|
+
claim (excluding declatory judgment actions) against Initial Developer
|
331
|
+
or a Contributor (the Initial Developer or Contributor against whom
|
332
|
+
You file such action is referred to as "Participant") alleging that:
|
333
|
+
|
334
|
+
(a) such Participant's Contributor Version directly or indirectly
|
335
|
+
infringes any patent, then any and all rights granted by such
|
336
|
+
Participant to You under Sections 2.1 and/or 2.2 of this License
|
337
|
+
shall, upon 60 days notice from Participant terminate prospectively,
|
338
|
+
unless if within 60 days after receipt of notice You either: (i)
|
339
|
+
agree in writing to pay Participant a mutually agreeable reasonable
|
340
|
+
royalty for Your past and future use of Modifications made by such
|
341
|
+
Participant, or (ii) withdraw Your litigation claim with respect to
|
342
|
+
the Contributor Version against such Participant. If within 60 days
|
343
|
+
of notice, a reasonable royalty and payment arrangement are not
|
344
|
+
mutually agreed upon in writing by the parties or the litigation claim
|
345
|
+
is not withdrawn, the rights granted by Participant to You under
|
346
|
+
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
|
347
|
+
the 60 day notice period specified above.
|
348
|
+
|
349
|
+
(b) any software, hardware, or device, other than such Participant's
|
350
|
+
Contributor Version, directly or indirectly infringes any patent, then
|
351
|
+
any rights granted to You by such Participant under Sections 2.1(b)
|
352
|
+
and 2.2(b) are revoked effective as of the date You first made, used,
|
353
|
+
sold, distributed, or had made, Modifications made by that
|
354
|
+
Participant.
|
355
|
+
|
356
|
+
8.3. If You assert a patent infringement claim against Participant
|
357
|
+
alleging that such Participant's Contributor Version directly or
|
358
|
+
indirectly infringes any patent where such claim is resolved (such as
|
359
|
+
by license or settlement) prior to the initiation of patent
|
360
|
+
infringement litigation, then the reasonable value of the licenses
|
361
|
+
granted by such Participant under Sections 2.1 or 2.2 shall be taken
|
362
|
+
into account in determining the amount or value of any payment or
|
363
|
+
license.
|
364
|
+
|
365
|
+
8.4. In the event of termination under Sections 8.1 or 8.2 above,
|
366
|
+
all end user license agreements (excluding distributors and resellers)
|
367
|
+
which have been validly granted by You or any distributor hereunder
|
368
|
+
prior to termination shall survive termination.
|
369
|
+
|
370
|
+
9. LIMITATION OF LIABILITY.
|
371
|
+
|
372
|
+
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
|
373
|
+
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
|
374
|
+
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
|
375
|
+
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
|
376
|
+
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
|
377
|
+
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
|
378
|
+
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
|
379
|
+
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
|
380
|
+
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
|
381
|
+
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
382
|
+
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
383
|
+
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
|
384
|
+
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
|
385
|
+
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
386
|
+
|
387
|
+
10. U.S. GOVERNMENT END USERS.
|
388
|
+
|
389
|
+
The Covered Code is a "commercial item," as that term is defined in
|
390
|
+
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
|
391
|
+
software" and "commercial computer software documentation," as such
|
392
|
+
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
|
393
|
+
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
|
394
|
+
all U.S. Government End Users acquire Covered Code with only those
|
395
|
+
rights set forth herein.
|
396
|
+
|
397
|
+
11. MISCELLANEOUS.
|
398
|
+
|
399
|
+
This License represents the complete agreement concerning subject
|
400
|
+
matter hereof. If any provision of this License is held to be
|
401
|
+
unenforceable, such provision shall be reformed only to the extent
|
402
|
+
necessary to make it enforceable. This License shall be governed by
|
403
|
+
California law provisions (except to the extent applicable law, if
|
404
|
+
any, provides otherwise), excluding its conflict-of-law provisions.
|
405
|
+
With respect to disputes in which at least one party is a citizen of,
|
406
|
+
or an entity chartered or registered to do business in the United
|
407
|
+
States of America, any litigation relating to this License shall be
|
408
|
+
subject to the jurisdiction of the Federal Courts of the Northern
|
409
|
+
District of California, with venue lying in Santa Clara County,
|
410
|
+
California, with the losing party responsible for costs, including
|
411
|
+
without limitation, court costs and reasonable attorneys' fees and
|
412
|
+
expenses. The application of the United Nations Convention on
|
413
|
+
Contracts for the International Sale of Goods is expressly excluded.
|
414
|
+
Any law or regulation which provides that the language of a contract
|
415
|
+
shall be construed against the drafter shall not apply to this
|
416
|
+
License.
|
417
|
+
|
418
|
+
12. RESPONSIBILITY FOR CLAIMS.
|
419
|
+
|
420
|
+
As between Initial Developer and the Contributors, each party is
|
421
|
+
responsible for claims and damages arising, directly or indirectly,
|
422
|
+
out of its utilization of rights under this License and You agree to
|
423
|
+
work with Initial Developer and Contributors to distribute such
|
424
|
+
responsibility on an equitable basis. Nothing herein is intended or
|
425
|
+
shall be deemed to constitute any admission of liability.
|
426
|
+
|
427
|
+
13. MULTIPLE-LICENSED CODE.
|
428
|
+
|
429
|
+
Initial Developer may designate portions of the Covered Code as
|
430
|
+
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
|
431
|
+
Developer permits you to utilize portions of the Covered Code under
|
432
|
+
Your choice of the NPL or the alternative licenses, if any, specified
|
433
|
+
by the Initial Developer in the file described in Exhibit A.
|
434
|
+
|
435
|
+
EXHIBIT A -Mozilla Public License.
|
436
|
+
|
437
|
+
``The contents of this file are subject to the Mozilla Public License
|
438
|
+
Version 1.1 (the "License"); you may not use this file except in
|
439
|
+
compliance with the License. You may obtain a copy of the License at
|
440
|
+
http://www.mozilla.org/MPL/
|
441
|
+
|
442
|
+
Software distributed under the License is distributed on an "AS IS"
|
443
|
+
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
444
|
+
License for the specific language governing rights and limitations
|
445
|
+
under the License.
|
446
|
+
|
447
|
+
The Original Code is ______________________________________.
|
448
|
+
|
449
|
+
The Initial Developer of the Original Code is ________________________.
|
450
|
+
Portions created by ______________________ are Copyright (C) ______
|
451
|
+
_______________________. All Rights Reserved.
|
452
|
+
|
453
|
+
Contributor(s): ______________________________________.
|
454
|
+
|
455
|
+
Alternatively, the contents of this file may be used under the terms
|
456
|
+
of the _____ license (the "[___] License"), in which case the
|
457
|
+
provisions of [______] License are applicable instead of those
|
458
|
+
above. If you wish to allow use of your version of this file only
|
459
|
+
under the terms of the [____] License and not to allow others to use
|
460
|
+
your version of this file under the MPL, indicate your decision by
|
461
|
+
deleting the provisions above and replace them with the notice and
|
462
|
+
other provisions required by the [___] License. If you do not delete
|
463
|
+
the provisions above, a recipient may use your version of this file
|
464
|
+
under either the MPL or the [___] License."
|
465
|
+
|
466
|
+
[NOTE: The text of this Exhibit A may differ slightly from the text of
|
467
|
+
the notices in the Source Code files of the Original Code. You should
|
468
|
+
use the text of this Exhibit A rather than the text found in the
|
469
|
+
Original Code Source Code for Your Modifications.]
|
470
|
+
|
471
|
+
------------------------------------------------------------------------
|
472
|
+
|
473
|
+
GNU GENERAL PUBLIC LICENSE
|
474
|
+
Version 2, June 1991
|
475
|
+
|
476
|
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
477
|
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
478
|
+
Everyone is permitted to copy and distribute verbatim copies
|
479
|
+
of this license document, but changing it is not allowed.
|
480
|
+
|
481
|
+
Preamble
|
482
|
+
|
483
|
+
The licenses for most software are designed to take away your
|
484
|
+
freedom to share and change it. By contrast, the GNU General Public
|
485
|
+
License is intended to guarantee your freedom to share and change free
|
486
|
+
software--to make sure the software is free for all its users. This
|
487
|
+
General Public License applies to most of the Free Software
|
488
|
+
Foundation's software and to any other program whose authors commit to
|
489
|
+
using it. (Some other Free Software Foundation software is covered by
|
490
|
+
the GNU Lesser General Public License instead.) You can apply it to
|
491
|
+
your programs, too.
|
492
|
+
|
493
|
+
When we speak of free software, we are referring to freedom, not
|
494
|
+
price. Our General Public Licenses are designed to make sure that you
|
495
|
+
have the freedom to distribute copies of free software (and charge for
|
496
|
+
this service if you wish), that you receive source code or can get it
|
497
|
+
if you want it, that you can change the software or use pieces of it
|
498
|
+
in new free programs; and that you know you can do these things.
|
499
|
+
|
500
|
+
To protect your rights, we need to make restrictions that forbid
|
501
|
+
anyone to deny you these rights or to ask you to surrender the rights.
|
502
|
+
These restrictions translate to certain responsibilities for you if you
|
503
|
+
distribute copies of the software, or if you modify it.
|
504
|
+
|
505
|
+
For example, if you distribute copies of such a program, whether
|
506
|
+
gratis or for a fee, you must give the recipients all the rights that
|
507
|
+
you have. You must make sure that they, too, receive or can get the
|
508
|
+
source code. And you must show them these terms so they know their
|
509
|
+
rights.
|
510
|
+
|
511
|
+
We protect your rights with two steps: (1) copyright the software, and
|
512
|
+
(2) offer you this license which gives you legal permission to copy,
|
513
|
+
distribute and/or modify the software.
|
514
|
+
|
515
|
+
Also, for each author's protection and ours, we want to make certain
|
516
|
+
that everyone understands that there is no warranty for this free
|
517
|
+
software. If the software is modified by someone else and passed on, we
|
518
|
+
want its recipients to know that what they have is not the original, so
|
519
|
+
that any problems introduced by others will not reflect on the original
|
520
|
+
authors' reputations.
|
521
|
+
|
522
|
+
Finally, any free program is threatened constantly by software
|
523
|
+
patents. We wish to avoid the danger that redistributors of a free
|
524
|
+
program will individually obtain patent licenses, in effect making the
|
525
|
+
program proprietary. To prevent this, we have made it clear that any
|
526
|
+
patent must be licensed for everyone's free use or not licensed at all.
|
527
|
+
|
528
|
+
The precise terms and conditions for copying, distribution and
|
529
|
+
modification follow.
|
530
|
+
|
531
|
+
GNU GENERAL PUBLIC LICENSE
|
532
|
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
533
|
+
|
534
|
+
0. This License applies to any program or other work which contains
|
535
|
+
a notice placed by the copyright holder saying it may be distributed
|
536
|
+
under the terms of this General Public License. The "Program", below,
|
537
|
+
refers to any such program or work, and a "work based on the Program"
|
538
|
+
means either the Program or any derivative work under copyright law:
|
539
|
+
that is to say, a work containing the Program or a portion of it,
|
540
|
+
either verbatim or with modifications and/or translated into another
|
541
|
+
language. (Hereinafter, translation is included without limitation in
|
542
|
+
the term "modification".) Each licensee is addressed as "you".
|
543
|
+
|
544
|
+
Activities other than copying, distribution and modification are not
|
545
|
+
covered by this License; they are outside its scope. The act of
|
546
|
+
running the Program is not restricted, and the output from the Program
|
547
|
+
is covered only if its contents constitute a work based on the
|
548
|
+
Program (independent of having been made by running the Program).
|
549
|
+
Whether that is true depends on what the Program does.
|
550
|
+
|
551
|
+
1. You may copy and distribute verbatim copies of the Program's
|
552
|
+
source code as you receive it, in any medium, provided that you
|
553
|
+
conspicuously and appropriately publish on each copy an appropriate
|
554
|
+
copyright notice and disclaimer of warranty; keep intact all the
|
555
|
+
notices that refer to this License and to the absence of any warranty;
|
556
|
+
and give any other recipients of the Program a copy of this License
|
557
|
+
along with the Program.
|
558
|
+
|
559
|
+
You may charge a fee for the physical act of transferring a copy, and
|
560
|
+
you may at your option offer warranty protection in exchange for a fee.
|
561
|
+
|
562
|
+
2. You may modify your copy or copies of the Program or any portion
|
563
|
+
of it, thus forming a work based on the Program, and copy and
|
564
|
+
distribute such modifications or work under the terms of Section 1
|
565
|
+
above, provided that you also meet all of these conditions:
|
566
|
+
|
567
|
+
a) You must cause the modified files to carry prominent notices
|
568
|
+
stating that you changed the files and the date of any change.
|
569
|
+
|
570
|
+
b) You must cause any work that you distribute or publish, that in
|
571
|
+
whole or in part contains or is derived from the Program or any
|
572
|
+
part thereof, to be licensed as a whole at no charge to all third
|
573
|
+
parties under the terms of this License.
|
574
|
+
|
575
|
+
c) If the modified program normally reads commands interactively
|
576
|
+
when run, you must cause it, when started running for such
|
577
|
+
interactive use in the most ordinary way, to print or display an
|
578
|
+
announcement including an appropriate copyright notice and a
|
579
|
+
notice that there is no warranty (or else, saying that you provide
|
580
|
+
a warranty) and that users may redistribute the program under
|
581
|
+
these conditions, and telling the user how to view a copy of this
|
582
|
+
License. (Exception: if the Program itself is interactive but
|
583
|
+
does not normally print such an announcement, your work based on
|
584
|
+
the Program is not required to print an announcement.)
|
585
|
+
|
586
|
+
These requirements apply to the modified work as a whole. If
|
587
|
+
identifiable sections of that work are not derived from the Program,
|
588
|
+
and can be reasonably considered independent and separate works in
|
589
|
+
themselves, then this License, and its terms, do not apply to those
|
590
|
+
sections when you distribute them as separate works. But when you
|
591
|
+
distribute the same sections as part of a whole which is a work based
|
592
|
+
on the Program, the distribution of the whole must be on the terms of
|
593
|
+
this License, whose permissions for other licensees extend to the
|
594
|
+
entire whole, and thus to each and every part regardless of who wrote it.
|
595
|
+
|
596
|
+
Thus, it is not the intent of this section to claim rights or contest
|
597
|
+
your rights to work written entirely by you; rather, the intent is to
|
598
|
+
exercise the right to control the distribution of derivative or
|
599
|
+
collective works based on the Program.
|
600
|
+
|
601
|
+
In addition, mere aggregation of another work not based on the Program
|
602
|
+
with the Program (or with a work based on the Program) on a volume of
|
603
|
+
a storage or distribution medium does not bring the other work under
|
604
|
+
the scope of this License.
|
605
|
+
|
606
|
+
3. You may copy and distribute the Program (or a work based on it,
|
607
|
+
under Section 2) in object code or executable form under the terms of
|
608
|
+
Sections 1 and 2 above provided that you also do one of the following:
|
609
|
+
|
610
|
+
a) Accompany it with the complete corresponding machine-readable
|
611
|
+
source code, which must be distributed under the terms of Sections
|
612
|
+
1 and 2 above on a medium customarily used for software interchange; or,
|
613
|
+
|
614
|
+
b) Accompany it with a written offer, valid for at least three
|
615
|
+
years, to give any third party, for a charge no more than your
|
616
|
+
cost of physically performing source distribution, a complete
|
617
|
+
machine-readable copy of the corresponding source code, to be
|
618
|
+
distributed under the terms of Sections 1 and 2 above on a medium
|
619
|
+
customarily used for software interchange; or,
|
620
|
+
|
621
|
+
c) Accompany it with the information you received as to the offer
|
622
|
+
to distribute corresponding source code. (This alternative is
|
623
|
+
allowed only for noncommercial distribution and only if you
|
624
|
+
received the program in object code or executable form with such
|
625
|
+
an offer, in accord with Subsection b above.)
|
626
|
+
|
627
|
+
The source code for a work means the preferred form of the work for
|
628
|
+
making modifications to it. For an executable work, complete source
|
629
|
+
code means all the source code for all modules it contains, plus any
|
630
|
+
associated interface definition files, plus the scripts used to
|
631
|
+
control compilation and installation of the executable. However, as a
|
632
|
+
special exception, the source code distributed need not include
|
633
|
+
anything that is normally distributed (in either source or binary
|
634
|
+
form) with the major components (compiler, kernel, and so on) of the
|
635
|
+
operating system on which the executable runs, unless that component
|
636
|
+
itself accompanies the executable.
|
637
|
+
|
638
|
+
If distribution of executable or object code is made by offering
|
639
|
+
access to copy from a designated place, then offering equivalent
|
640
|
+
access to copy the source code from the same place counts as
|
641
|
+
distribution of the source code, even though third parties are not
|
642
|
+
compelled to copy the source along with the object code.
|
643
|
+
|
644
|
+
4. You may not copy, modify, sublicense, or distribute the Program
|
645
|
+
except as expressly provided under this License. Any attempt
|
646
|
+
otherwise to copy, modify, sublicense or distribute the Program is
|
647
|
+
void, and will automatically terminate your rights under this License.
|
648
|
+
However, parties who have received copies, or rights, from you under
|
649
|
+
this License will not have their licenses terminated so long as such
|
650
|
+
parties remain in full compliance.
|
651
|
+
|
652
|
+
5. You are not required to accept this License, since you have not
|
653
|
+
signed it. However, nothing else grants you permission to modify or
|
654
|
+
distribute the Program or its derivative works. These actions are
|
655
|
+
prohibited by law if you do not accept this License. Therefore, by
|
656
|
+
modifying or distributing the Program (or any work based on the
|
657
|
+
Program), you indicate your acceptance of this License to do so, and
|
658
|
+
all its terms and conditions for copying, distributing or modifying
|
659
|
+
the Program or works based on it.
|
660
|
+
|
661
|
+
6. Each time you redistribute the Program (or any work based on the
|
662
|
+
Program), the recipient automatically receives a license from the
|
663
|
+
original licensor to copy, distribute or modify the Program subject to
|
664
|
+
these terms and conditions. You may not impose any further
|
665
|
+
restrictions on the recipients' exercise of the rights granted herein.
|
666
|
+
You are not responsible for enforcing compliance by third parties to
|
667
|
+
this License.
|
668
|
+
|
669
|
+
7. If, as a consequence of a court judgment or allegation of patent
|
670
|
+
infringement or for any other reason (not limited to patent issues),
|
671
|
+
conditions are imposed on you (whether by court order, agreement or
|
672
|
+
otherwise) that contradict the conditions of this License, they do not
|
673
|
+
excuse you from the conditions of this License. If you cannot
|
674
|
+
distribute so as to satisfy simultaneously your obligations under this
|
675
|
+
License and any other pertinent obligations, then as a consequence you
|
676
|
+
may not distribute the Program at all. For example, if a patent
|
677
|
+
license would not permit royalty-free redistribution of the Program by
|
678
|
+
all those who receive copies directly or indirectly through you, then
|
679
|
+
the only way you could satisfy both it and this License would be to
|
680
|
+
refrain entirely from distribution of the Program.
|
681
|
+
|
682
|
+
If any portion of this section is held invalid or unenforceable under
|
683
|
+
any particular circumstance, the balance of the section is intended to
|
684
|
+
apply and the section as a whole is intended to apply in other
|
685
|
+
circumstances.
|
686
|
+
|
687
|
+
It is not the purpose of this section to induce you to infringe any
|
688
|
+
patents or other property right claims or to contest validity of any
|
689
|
+
such claims; this section has the sole purpose of protecting the
|
690
|
+
integrity of the free software distribution system, which is
|
691
|
+
implemented by public license practices. Many people have made
|
692
|
+
generous contributions to the wide range of software distributed
|
693
|
+
through that system in reliance on consistent application of that
|
694
|
+
system; it is up to the author/donor to decide if he or she is willing
|
695
|
+
to distribute software through any other system and a licensee cannot
|
696
|
+
impose that choice.
|
697
|
+
|
698
|
+
This section is intended to make thoroughly clear what is believed to
|
699
|
+
be a consequence of the rest of this License.
|
700
|
+
|
701
|
+
8. If the distribution and/or use of the Program is restricted in
|
702
|
+
certain countries either by patents or by copyrighted interfaces, the
|
703
|
+
original copyright holder who places the Program under this License
|
704
|
+
may add an explicit geographical distribution limitation excluding
|
705
|
+
those countries, so that distribution is permitted only in or among
|
706
|
+
countries not thus excluded. In such case, this License incorporates
|
707
|
+
the limitation as if written in the body of this License.
|
708
|
+
|
709
|
+
9. The Free Software Foundation may publish revised and/or new versions
|
710
|
+
of the General Public License from time to time. Such new versions will
|
711
|
+
be similar in spirit to the present version, but may differ in detail to
|
712
|
+
address new problems or concerns.
|
713
|
+
|
714
|
+
Each version is given a distinguishing version number. If the Program
|
715
|
+
specifies a version number of this License which applies to it and "any
|
716
|
+
later version", you have the option of following the terms and conditions
|
717
|
+
either of that version or of any later version published by the Free
|
718
|
+
Software Foundation. If the Program does not specify a version number of
|
719
|
+
this License, you may choose any version ever published by the Free Software
|
720
|
+
Foundation.
|
721
|
+
|
722
|
+
10. If you wish to incorporate parts of the Program into other free
|
723
|
+
programs whose distribution conditions are different, write to the author
|
724
|
+
to ask for permission. For software which is copyrighted by the Free
|
725
|
+
Software Foundation, write to the Free Software Foundation; we sometimes
|
726
|
+
make exceptions for this. Our decision will be guided by the two goals
|
727
|
+
of preserving the free status of all derivatives of our free software and
|
728
|
+
of promoting the sharing and reuse of software generally.
|
729
|
+
|
730
|
+
NO WARRANTY
|
731
|
+
|
732
|
+
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
733
|
+
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
734
|
+
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
735
|
+
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
736
|
+
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
737
|
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
738
|
+
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
739
|
+
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
740
|
+
REPAIR OR CORRECTION.
|
741
|
+
|
742
|
+
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
743
|
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
744
|
+
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
745
|
+
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
746
|
+
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
747
|
+
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
748
|
+
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
749
|
+
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
750
|
+
POSSIBILITY OF SUCH DAMAGES.
|
751
|
+
|
752
|
+
END OF TERMS AND CONDITIONS
|
753
|
+
|
754
|
+
How to Apply These Terms to Your New Programs
|
755
|
+
|
756
|
+
If you develop a new program, and you want it to be of the greatest
|
757
|
+
possible use to the public, the best way to achieve this is to make it
|
758
|
+
free software which everyone can redistribute and change under these terms.
|
759
|
+
|
760
|
+
To do so, attach the following notices to the program. It is safest
|
761
|
+
to attach them to the start of each source file to most effectively
|
762
|
+
convey the exclusion of warranty; and each file should have at least
|
763
|
+
the "copyright" line and a pointer to where the full notice is found.
|
764
|
+
|
765
|
+
<one line to give the program's name and a brief idea of what it does.>
|
766
|
+
Copyright (C) <year> <name of author>
|
767
|
+
|
768
|
+
This program is free software; you can redistribute it and/or modify
|
769
|
+
it under the terms of the GNU General Public License as published by
|
770
|
+
the Free Software Foundation; either version 2 of the License, or
|
771
|
+
(at your option) any later version.
|
772
|
+
|
773
|
+
This program is distributed in the hope that it will be useful,
|
774
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
775
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
776
|
+
GNU General Public License for more details.
|
777
|
+
|
778
|
+
You should have received a copy of the GNU General Public License along
|
779
|
+
with this program; if not, write to the Free Software Foundation, Inc.,
|
780
|
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
781
|
+
|
782
|
+
Also add information on how to contact you by electronic and paper mail.
|
783
|
+
|
784
|
+
If the program is interactive, make it output a short notice like this
|
785
|
+
when it starts in an interactive mode:
|
786
|
+
|
787
|
+
Gnomovision version 69, Copyright (C) year name of author
|
788
|
+
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
789
|
+
This is free software, and you are welcome to redistribute it
|
790
|
+
under certain conditions; type `show c' for details.
|
791
|
+
|
792
|
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
793
|
+
parts of the General Public License. Of course, the commands you use may
|
794
|
+
be called something other than `show w' and `show c'; they could even be
|
795
|
+
mouse-clicks or menu items--whatever suits your program.
|
796
|
+
|
797
|
+
You should also get your employer (if you work as a programmer) or your
|
798
|
+
school, if any, to sign a "copyright disclaimer" for the program, if
|
799
|
+
necessary. Here is a sample; alter the names:
|
800
|
+
|
801
|
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
802
|
+
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
803
|
+
|
804
|
+
<signature of Ty Coon>, 1 April 1989
|
805
|
+
Ty Coon, President of Vice
|
806
|
+
|
807
|
+
This General Public License does not permit incorporating your program into
|
808
|
+
proprietary programs. If your program is a subroutine library, you may
|
809
|
+
consider it more useful to permit linking proprietary applications with the
|
810
|
+
library. If this is what you want to do, use the GNU Lesser General
|
811
|
+
Public License instead of this License.
|
812
|
+
|
813
|
+
------------------------------------------------------------------------
|
814
|
+
|
815
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
816
|
+
Version 2.1, February 1999
|
817
|
+
|
818
|
+
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
819
|
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
820
|
+
Everyone is permitted to copy and distribute verbatim copies
|
821
|
+
of this license document, but changing it is not allowed.
|
822
|
+
|
823
|
+
[This is the first released version of the Lesser GPL. It also counts
|
824
|
+
as the successor of the GNU Library Public License, version 2, hence
|
825
|
+
the version number 2.1.]
|
826
|
+
|
827
|
+
Preamble
|
828
|
+
|
829
|
+
The licenses for most software are designed to take away your
|
830
|
+
freedom to share and change it. By contrast, the GNU General Public
|
831
|
+
Licenses are intended to guarantee your freedom to share and change
|
832
|
+
free software--to make sure the software is free for all its users.
|
833
|
+
|
834
|
+
This license, the Lesser General Public License, applies to some
|
835
|
+
specially designated software packages--typically libraries--of the
|
836
|
+
Free Software Foundation and other authors who decide to use it. You
|
837
|
+
can use it too, but we suggest you first think carefully about whether
|
838
|
+
this license or the ordinary General Public License is the better
|
839
|
+
strategy to use in any particular case, based on the explanations below.
|
840
|
+
|
841
|
+
When we speak of free software, we are referring to freedom of use,
|
842
|
+
not price. Our General Public Licenses are designed to make sure that
|
843
|
+
you have the freedom to distribute copies of free software (and charge
|
844
|
+
for this service if you wish); that you receive source code or can get
|
845
|
+
it if you want it; that you can change the software and use pieces of
|
846
|
+
it in new free programs; and that you are informed that you can do
|
847
|
+
these things.
|
848
|
+
|
849
|
+
To protect your rights, we need to make restrictions that forbid
|
850
|
+
distributors to deny you these rights or to ask you to surrender these
|
851
|
+
rights. These restrictions translate to certain responsibilities for
|
852
|
+
you if you distribute copies of the library or if you modify it.
|
853
|
+
|
854
|
+
For example, if you distribute copies of the library, whether gratis
|
855
|
+
or for a fee, you must give the recipients all the rights that we gave
|
856
|
+
you. You must make sure that they, too, receive or can get the source
|
857
|
+
code. If you link other code with the library, you must provide
|
858
|
+
complete object files to the recipients, so that they can relink them
|
859
|
+
with the library after making changes to the library and recompiling
|
860
|
+
it. And you must show them these terms so they know their rights.
|
861
|
+
|
862
|
+
We protect your rights with a two-step method: (1) we copyright the
|
863
|
+
library, and (2) we offer you this license, which gives you legal
|
864
|
+
permission to copy, distribute and/or modify the library.
|
865
|
+
|
866
|
+
To protect each distributor, we want to make it very clear that
|
867
|
+
there is no warranty for the free library. Also, if the library is
|
868
|
+
modified by someone else and passed on, the recipients should know
|
869
|
+
that what they have is not the original version, so that the original
|
870
|
+
author's reputation will not be affected by problems that might be
|
871
|
+
introduced by others.
|
872
|
+
|
873
|
+
Finally, software patents pose a constant threat to the existence of
|
874
|
+
any free program. We wish to make sure that a company cannot
|
875
|
+
effectively restrict the users of a free program by obtaining a
|
876
|
+
restrictive license from a patent holder. Therefore, we insist that
|
877
|
+
any patent license obtained for a version of the library must be
|
878
|
+
consistent with the full freedom of use specified in this license.
|
879
|
+
|
880
|
+
Most GNU software, including some libraries, is covered by the
|
881
|
+
ordinary GNU General Public License. This license, the GNU Lesser
|
882
|
+
General Public License, applies to certain designated libraries, and
|
883
|
+
is quite different from the ordinary General Public License. We use
|
884
|
+
this license for certain libraries in order to permit linking those
|
885
|
+
libraries into non-free programs.
|
886
|
+
|
887
|
+
When a program is linked with a library, whether statically or using
|
888
|
+
a shared library, the combination of the two is legally speaking a
|
889
|
+
combined work, a derivative of the original library. The ordinary
|
890
|
+
General Public License therefore permits such linking only if the
|
891
|
+
entire combination fits its criteria of freedom. The Lesser General
|
892
|
+
Public License permits more lax criteria for linking other code with
|
893
|
+
the library.
|
894
|
+
|
895
|
+
We call this license the "Lesser" General Public License because it
|
896
|
+
does Less to protect the user's freedom than the ordinary General
|
897
|
+
Public License. It also provides other free software developers Less
|
898
|
+
of an advantage over competing non-free programs. These disadvantages
|
899
|
+
are the reason we use the ordinary General Public License for many
|
900
|
+
libraries. However, the Lesser license provides advantages in certain
|
901
|
+
special circumstances.
|
902
|
+
|
903
|
+
For example, on rare occasions, there may be a special need to
|
904
|
+
encourage the widest possible use of a certain library, so that it becomes
|
905
|
+
a de-facto standard. To achieve this, non-free programs must be
|
906
|
+
allowed to use the library. A more frequent case is that a free
|
907
|
+
library does the same job as widely used non-free libraries. In this
|
908
|
+
case, there is little to gain by limiting the free library to free
|
909
|
+
software only, so we use the Lesser General Public License.
|
910
|
+
|
911
|
+
In other cases, permission to use a particular library in non-free
|
912
|
+
programs enables a greater number of people to use a large body of
|
913
|
+
free software. For example, permission to use the GNU C Library in
|
914
|
+
non-free programs enables many more people to use the whole GNU
|
915
|
+
operating system, as well as its variant, the GNU/Linux operating
|
916
|
+
system.
|
917
|
+
|
918
|
+
Although the Lesser General Public License is Less protective of the
|
919
|
+
users' freedom, it does ensure that the user of a program that is
|
920
|
+
linked with the Library has the freedom and the wherewithal to run
|
921
|
+
that program using a modified version of the Library.
|
922
|
+
|
923
|
+
The precise terms and conditions for copying, distribution and
|
924
|
+
modification follow. Pay close attention to the difference between a
|
925
|
+
"work based on the library" and a "work that uses the library". The
|
926
|
+
former contains code derived from the library, whereas the latter must
|
927
|
+
be combined with the library in order to run.
|
928
|
+
|
929
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
930
|
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
931
|
+
|
932
|
+
0. This License Agreement applies to any software library or other
|
933
|
+
program which contains a notice placed by the copyright holder or
|
934
|
+
other authorized party saying it may be distributed under the terms of
|
935
|
+
this Lesser General Public License (also called "this License").
|
936
|
+
Each licensee is addressed as "you".
|
937
|
+
|
938
|
+
A "library" means a collection of software functions and/or data
|
939
|
+
prepared so as to be conveniently linked with application programs
|
940
|
+
(which use some of those functions and data) to form executables.
|
941
|
+
|
942
|
+
The "Library", below, refers to any such software library or work
|
943
|
+
which has been distributed under these terms. A "work based on the
|
944
|
+
Library" means either the Library or any derivative work under
|
945
|
+
copyright law: that is to say, a work containing the Library or a
|
946
|
+
portion of it, either verbatim or with modifications and/or translated
|
947
|
+
straightforwardly into another language. (Hereinafter, translation is
|
948
|
+
included without limitation in the term "modification".)
|
949
|
+
|
950
|
+
"Source code" for a work means the preferred form of the work for
|
951
|
+
making modifications to it. For a library, complete source code means
|
952
|
+
all the source code for all modules it contains, plus any associated
|
953
|
+
interface definition files, plus the scripts used to control compilation
|
954
|
+
and installation of the library.
|
955
|
+
|
956
|
+
Activities other than copying, distribution and modification are not
|
957
|
+
covered by this License; they are outside its scope. The act of
|
958
|
+
running a program using the Library is not restricted, and output from
|
959
|
+
such a program is covered only if its contents constitute a work based
|
960
|
+
on the Library (independent of the use of the Library in a tool for
|
961
|
+
writing it). Whether that is true depends on what the Library does
|
962
|
+
and what the program that uses the Library does.
|
963
|
+
|
964
|
+
1. You may copy and distribute verbatim copies of the Library's
|
965
|
+
complete source code as you receive it, in any medium, provided that
|
966
|
+
you conspicuously and appropriately publish on each copy an
|
967
|
+
appropriate copyright notice and disclaimer of warranty; keep intact
|
968
|
+
all the notices that refer to this License and to the absence of any
|
969
|
+
warranty; and distribute a copy of this License along with the
|
970
|
+
Library.
|
971
|
+
|
972
|
+
You may charge a fee for the physical act of transferring a copy,
|
973
|
+
and you may at your option offer warranty protection in exchange for a
|
974
|
+
fee.
|
975
|
+
|
976
|
+
2. You may modify your copy or copies of the Library or any portion
|
977
|
+
of it, thus forming a work based on the Library, and copy and
|
978
|
+
distribute such modifications or work under the terms of Section 1
|
979
|
+
above, provided that you also meet all of these conditions:
|
980
|
+
|
981
|
+
a) The modified work must itself be a software library.
|
982
|
+
|
983
|
+
b) You must cause the files modified to carry prominent notices
|
984
|
+
stating that you changed the files and the date of any change.
|
985
|
+
|
986
|
+
c) You must cause the whole of the work to be licensed at no
|
987
|
+
charge to all third parties under the terms of this License.
|
988
|
+
|
989
|
+
d) If a facility in the modified Library refers to a function or a
|
990
|
+
table of data to be supplied by an application program that uses
|
991
|
+
the facility, other than as an argument passed when the facility
|
992
|
+
is invoked, then you must make a good faith effort to ensure that,
|
993
|
+
in the event an application does not supply such function or
|
994
|
+
table, the facility still operates, and performs whatever part of
|
995
|
+
its purpose remains meaningful.
|
996
|
+
|
997
|
+
(For example, a function in a library to compute square roots has
|
998
|
+
a purpose that is entirely well-defined independent of the
|
999
|
+
application. Therefore, Subsection 2d requires that any
|
1000
|
+
application-supplied function or table used by this function must
|
1001
|
+
be optional: if the application does not supply it, the square
|
1002
|
+
root function must still compute square roots.)
|
1003
|
+
|
1004
|
+
These requirements apply to the modified work as a whole. If
|
1005
|
+
identifiable sections of that work are not derived from the Library,
|
1006
|
+
and can be reasonably considered independent and separate works in
|
1007
|
+
themselves, then this License, and its terms, do not apply to those
|
1008
|
+
sections when you distribute them as separate works. But when you
|
1009
|
+
distribute the same sections as part of a whole which is a work based
|
1010
|
+
on the Library, the distribution of the whole must be on the terms of
|
1011
|
+
this License, whose permissions for other licensees extend to the
|
1012
|
+
entire whole, and thus to each and every part regardless of who wrote
|
1013
|
+
it.
|
1014
|
+
|
1015
|
+
Thus, it is not the intent of this section to claim rights or contest
|
1016
|
+
your rights to work written entirely by you; rather, the intent is to
|
1017
|
+
exercise the right to control the distribution of derivative or
|
1018
|
+
collective works based on the Library.
|
1019
|
+
|
1020
|
+
In addition, mere aggregation of another work not based on the Library
|
1021
|
+
with the Library (or with a work based on the Library) on a volume of
|
1022
|
+
a storage or distribution medium does not bring the other work under
|
1023
|
+
the scope of this License.
|
1024
|
+
|
1025
|
+
3. You may opt to apply the terms of the ordinary GNU General Public
|
1026
|
+
License instead of this License to a given copy of the Library. To do
|
1027
|
+
this, you must alter all the notices that refer to this License, so
|
1028
|
+
that they refer to the ordinary GNU General Public License, version 2,
|
1029
|
+
instead of to this License. (If a newer version than version 2 of the
|
1030
|
+
ordinary GNU General Public License has appeared, then you can specify
|
1031
|
+
that version instead if you wish.) Do not make any other change in
|
1032
|
+
these notices.
|
1033
|
+
|
1034
|
+
Once this change is made in a given copy, it is irreversible for
|
1035
|
+
that copy, so the ordinary GNU General Public License applies to all
|
1036
|
+
subsequent copies and derivative works made from that copy.
|
1037
|
+
|
1038
|
+
This option is useful when you wish to copy part of the code of
|
1039
|
+
the Library into a program that is not a library.
|
1040
|
+
|
1041
|
+
4. You may copy and distribute the Library (or a portion or
|
1042
|
+
derivative of it, under Section 2) in object code or executable form
|
1043
|
+
under the terms of Sections 1 and 2 above provided that you accompany
|
1044
|
+
it with the complete corresponding machine-readable source code, which
|
1045
|
+
must be distributed under the terms of Sections 1 and 2 above on a
|
1046
|
+
medium customarily used for software interchange.
|
1047
|
+
|
1048
|
+
If distribution of object code is made by offering access to copy
|
1049
|
+
from a designated place, then offering equivalent access to copy the
|
1050
|
+
source code from the same place satisfies the requirement to
|
1051
|
+
distribute the source code, even though third parties are not
|
1052
|
+
compelled to copy the source along with the object code.
|
1053
|
+
|
1054
|
+
5. A program that contains no derivative of any portion of the
|
1055
|
+
Library, but is designed to work with the Library by being compiled or
|
1056
|
+
linked with it, is called a "work that uses the Library". Such a
|
1057
|
+
work, in isolation, is not a derivative work of the Library, and
|
1058
|
+
therefore falls outside the scope of this License.
|
1059
|
+
|
1060
|
+
However, linking a "work that uses the Library" with the Library
|
1061
|
+
creates an executable that is a derivative of the Library (because it
|
1062
|
+
contains portions of the Library), rather than a "work that uses the
|
1063
|
+
library". The executable is therefore covered by this License.
|
1064
|
+
Section 6 states terms for distribution of such executables.
|
1065
|
+
|
1066
|
+
When a "work that uses the Library" uses material from a header file
|
1067
|
+
that is part of the Library, the object code for the work may be a
|
1068
|
+
derivative work of the Library even though the source code is not.
|
1069
|
+
Whether this is true is especially significant if the work can be
|
1070
|
+
linked without the Library, or if the work is itself a library. The
|
1071
|
+
threshold for this to be true is not precisely defined by law.
|
1072
|
+
|
1073
|
+
If such an object file uses only numerical parameters, data
|
1074
|
+
structure layouts and accessors, and small macros and small inline
|
1075
|
+
functions (ten lines or less in length), then the use of the object
|
1076
|
+
file is unrestricted, regardless of whether it is legally a derivative
|
1077
|
+
work. (Executables containing this object code plus portions of the
|
1078
|
+
Library will still fall under Section 6.)
|
1079
|
+
|
1080
|
+
Otherwise, if the work is a derivative of the Library, you may
|
1081
|
+
distribute the object code for the work under the terms of Section 6.
|
1082
|
+
Any executables containing that work also fall under Section 6,
|
1083
|
+
whether or not they are linked directly with the Library itself.
|
1084
|
+
|
1085
|
+
6. As an exception to the Sections above, you may also combine or
|
1086
|
+
link a "work that uses the Library" with the Library to produce a
|
1087
|
+
work containing portions of the Library, and distribute that work
|
1088
|
+
under terms of your choice, provided that the terms permit
|
1089
|
+
modification of the work for the customer's own use and reverse
|
1090
|
+
engineering for debugging such modifications.
|
1091
|
+
|
1092
|
+
You must give prominent notice with each copy of the work that the
|
1093
|
+
Library is used in it and that the Library and its use are covered by
|
1094
|
+
this License. You must supply a copy of this License. If the work
|
1095
|
+
during execution displays copyright notices, you must include the
|
1096
|
+
copyright notice for the Library among them, as well as a reference
|
1097
|
+
directing the user to the copy of this License. Also, you must do one
|
1098
|
+
of these things:
|
1099
|
+
|
1100
|
+
a) Accompany the work with the complete corresponding
|
1101
|
+
machine-readable source code for the Library including whatever
|
1102
|
+
changes were used in the work (which must be distributed under
|
1103
|
+
Sections 1 and 2 above); and, if the work is an executable linked
|
1104
|
+
with the Library, with the complete machine-readable "work that
|
1105
|
+
uses the Library", as object code and/or source code, so that the
|
1106
|
+
user can modify the Library and then relink to produce a modified
|
1107
|
+
executable containing the modified Library. (It is understood
|
1108
|
+
that the user who changes the contents of definitions files in the
|
1109
|
+
Library will not necessarily be able to recompile the application
|
1110
|
+
to use the modified definitions.)
|
1111
|
+
|
1112
|
+
b) Use a suitable shared library mechanism for linking with the
|
1113
|
+
Library. A suitable mechanism is one that (1) uses at run time a
|
1114
|
+
copy of the library already present on the user's computer system,
|
1115
|
+
rather than copying library functions into the executable, and (2)
|
1116
|
+
will operate properly with a modified version of the library, if
|
1117
|
+
the user installs one, as long as the modified version is
|
1118
|
+
interface-compatible with the version that the work was made with.
|
1119
|
+
|
1120
|
+
c) Accompany the work with a written offer, valid for at
|
1121
|
+
least three years, to give the same user the materials
|
1122
|
+
specified in Subsection 6a, above, for a charge no more
|
1123
|
+
than the cost of performing this distribution.
|
1124
|
+
|
1125
|
+
d) If distribution of the work is made by offering access to copy
|
1126
|
+
from a designated place, offer equivalent access to copy the above
|
1127
|
+
specified materials from the same place.
|
1128
|
+
|
1129
|
+
e) Verify that the user has already received a copy of these
|
1130
|
+
materials or that you have already sent this user a copy.
|
1131
|
+
|
1132
|
+
For an executable, the required form of the "work that uses the
|
1133
|
+
Library" must include any data and utility programs needed for
|
1134
|
+
reproducing the executable from it. However, as a special exception,
|
1135
|
+
the materials to be distributed need not include anything that is
|
1136
|
+
normally distributed (in either source or binary form) with the major
|
1137
|
+
components (compiler, kernel, and so on) of the operating system on
|
1138
|
+
which the executable runs, unless that component itself accompanies
|
1139
|
+
the executable.
|
1140
|
+
|
1141
|
+
It may happen that this requirement contradicts the license
|
1142
|
+
restrictions of other proprietary libraries that do not normally
|
1143
|
+
accompany the operating system. Such a contradiction means you cannot
|
1144
|
+
use both them and the Library together in an executable that you
|
1145
|
+
distribute.
|
1146
|
+
|
1147
|
+
7. You may place library facilities that are a work based on the
|
1148
|
+
Library side-by-side in a single library together with other library
|
1149
|
+
facilities not covered by this License, and distribute such a combined
|
1150
|
+
library, provided that the separate distribution of the work based on
|
1151
|
+
the Library and of the other library facilities is otherwise
|
1152
|
+
permitted, and provided that you do these two things:
|
1153
|
+
|
1154
|
+
a) Accompany the combined library with a copy of the same work
|
1155
|
+
based on the Library, uncombined with any other library
|
1156
|
+
facilities. This must be distributed under the terms of the
|
1157
|
+
Sections above.
|
1158
|
+
|
1159
|
+
b) Give prominent notice with the combined library of the fact
|
1160
|
+
that part of it is a work based on the Library, and explaining
|
1161
|
+
where to find the accompanying uncombined form of the same work.
|
1162
|
+
|
1163
|
+
8. You may not copy, modify, sublicense, link with, or distribute
|
1164
|
+
the Library except as expressly provided under this License. Any
|
1165
|
+
attempt otherwise to copy, modify, sublicense, link with, or
|
1166
|
+
distribute the Library is void, and will automatically terminate your
|
1167
|
+
rights under this License. However, parties who have received copies,
|
1168
|
+
or rights, from you under this License will not have their licenses
|
1169
|
+
terminated so long as such parties remain in full compliance.
|
1170
|
+
|
1171
|
+
9. You are not required to accept this License, since you have not
|
1172
|
+
signed it. However, nothing else grants you permission to modify or
|
1173
|
+
distribute the Library or its derivative works. These actions are
|
1174
|
+
prohibited by law if you do not accept this License. Therefore, by
|
1175
|
+
modifying or distributing the Library (or any work based on the
|
1176
|
+
Library), you indicate your acceptance of this License to do so, and
|
1177
|
+
all its terms and conditions for copying, distributing or modifying
|
1178
|
+
the Library or works based on it.
|
1179
|
+
|
1180
|
+
10. Each time you redistribute the Library (or any work based on the
|
1181
|
+
Library), the recipient automatically receives a license from the
|
1182
|
+
original licensor to copy, distribute, link with or modify the Library
|
1183
|
+
subject to these terms and conditions. You may not impose any further
|
1184
|
+
restrictions on the recipients' exercise of the rights granted herein.
|
1185
|
+
You are not responsible for enforcing compliance by third parties with
|
1186
|
+
this License.
|
1187
|
+
|
1188
|
+
11. If, as a consequence of a court judgment or allegation of patent
|
1189
|
+
infringement or for any other reason (not limited to patent issues),
|
1190
|
+
conditions are imposed on you (whether by court order, agreement or
|
1191
|
+
otherwise) that contradict the conditions of this License, they do not
|
1192
|
+
excuse you from the conditions of this License. If you cannot
|
1193
|
+
distribute so as to satisfy simultaneously your obligations under this
|
1194
|
+
License and any other pertinent obligations, then as a consequence you
|
1195
|
+
may not distribute the Library at all. For example, if a patent
|
1196
|
+
license would not permit royalty-free redistribution of the Library by
|
1197
|
+
all those who receive copies directly or indirectly through you, then
|
1198
|
+
the only way you could satisfy both it and this License would be to
|
1199
|
+
refrain entirely from distribution of the Library.
|
1200
|
+
|
1201
|
+
If any portion of this section is held invalid or unenforceable under any
|
1202
|
+
particular circumstance, the balance of the section is intended to apply,
|
1203
|
+
and the section as a whole is intended to apply in other circumstances.
|
1204
|
+
|
1205
|
+
It is not the purpose of this section to induce you to infringe any
|
1206
|
+
patents or other property right claims or to contest validity of any
|
1207
|
+
such claims; this section has the sole purpose of protecting the
|
1208
|
+
integrity of the free software distribution system which is
|
1209
|
+
implemented by public license practices. Many people have made
|
1210
|
+
generous contributions to the wide range of software distributed
|
1211
|
+
through that system in reliance on consistent application of that
|
1212
|
+
system; it is up to the author/donor to decide if he or she is willing
|
1213
|
+
to distribute software through any other system and a licensee cannot
|
1214
|
+
impose that choice.
|
1215
|
+
|
1216
|
+
This section is intended to make thoroughly clear what is believed to
|
1217
|
+
be a consequence of the rest of this License.
|
1218
|
+
|
1219
|
+
12. If the distribution and/or use of the Library is restricted in
|
1220
|
+
certain countries either by patents or by copyrighted interfaces, the
|
1221
|
+
original copyright holder who places the Library under this License may add
|
1222
|
+
an explicit geographical distribution limitation excluding those countries,
|
1223
|
+
so that distribution is permitted only in or among countries not thus
|
1224
|
+
excluded. In such case, this License incorporates the limitation as if
|
1225
|
+
written in the body of this License.
|
1226
|
+
|
1227
|
+
13. The Free Software Foundation may publish revised and/or new
|
1228
|
+
versions of the Lesser General Public License from time to time.
|
1229
|
+
Such new versions will be similar in spirit to the present version,
|
1230
|
+
but may differ in detail to address new problems or concerns.
|
1231
|
+
|
1232
|
+
Each version is given a distinguishing version number. If the Library
|
1233
|
+
specifies a version number of this License which applies to it and
|
1234
|
+
"any later version", you have the option of following the terms and
|
1235
|
+
conditions either of that version or of any later version published by
|
1236
|
+
the Free Software Foundation. If the Library does not specify a
|
1237
|
+
license version number, you may choose any version ever published by
|
1238
|
+
the Free Software Foundation.
|
1239
|
+
|
1240
|
+
14. If you wish to incorporate parts of the Library into other free
|
1241
|
+
programs whose distribution conditions are incompatible with these,
|
1242
|
+
write to the author to ask for permission. For software which is
|
1243
|
+
copyrighted by the Free Software Foundation, write to the Free
|
1244
|
+
Software Foundation; we sometimes make exceptions for this. Our
|
1245
|
+
decision will be guided by the two goals of preserving the free status
|
1246
|
+
of all derivatives of our free software and of promoting the sharing
|
1247
|
+
and reuse of software generally.
|
1248
|
+
|
1249
|
+
NO WARRANTY
|
1250
|
+
|
1251
|
+
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
1252
|
+
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
1253
|
+
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
1254
|
+
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
1255
|
+
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
1256
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
1257
|
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
1258
|
+
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
1259
|
+
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
1260
|
+
|
1261
|
+
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
1262
|
+
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
1263
|
+
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
1264
|
+
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
1265
|
+
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
1266
|
+
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
1267
|
+
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
1268
|
+
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
1269
|
+
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
1270
|
+
DAMAGES.
|
1271
|
+
|
1272
|
+
END OF TERMS AND CONDITIONS
|
1273
|
+
|
1274
|
+
How to Apply These Terms to Your New Libraries
|
1275
|
+
|
1276
|
+
If you develop a new library, and you want it to be of the greatest
|
1277
|
+
possible use to the public, we recommend making it free software that
|
1278
|
+
everyone can redistribute and change. You can do so by permitting
|
1279
|
+
redistribution under these terms (or, alternatively, under the terms of the
|
1280
|
+
ordinary General Public License).
|
1281
|
+
|
1282
|
+
To apply these terms, attach the following notices to the library. It is
|
1283
|
+
safest to attach them to the start of each source file to most effectively
|
1284
|
+
convey the exclusion of warranty; and each file should have at least the
|
1285
|
+
"copyright" line and a pointer to where the full notice is found.
|
1286
|
+
|
1287
|
+
<one line to give the library's name and a brief idea of what it does.>
|
1288
|
+
Copyright (C) <year> <name of author>
|
1289
|
+
|
1290
|
+
This library is free software; you can redistribute it and/or
|
1291
|
+
modify it under the terms of the GNU Lesser General Public
|
1292
|
+
License as published by the Free Software Foundation; either
|
1293
|
+
version 2.1 of the License, or (at your option) any later version.
|
1294
|
+
|
1295
|
+
This library is distributed in the hope that it will be useful,
|
1296
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1297
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
1298
|
+
Lesser General Public License for more details.
|
1299
|
+
|
1300
|
+
You should have received a copy of the GNU Lesser General Public
|
1301
|
+
License along with this library; if not, write to the Free Software
|
1302
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
1303
|
+
|
1304
|
+
Also add information on how to contact you by electronic and paper mail.
|
1305
|
+
|
1306
|
+
You should also get your employer (if you work as a programmer) or your
|
1307
|
+
school, if any, to sign a "copyright disclaimer" for the library, if
|
1308
|
+
necessary. Here is a sample; alter the names:
|
1309
|
+
|
1310
|
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
1311
|
+
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
1312
|
+
|
1313
|
+
<signature of Ty Coon>, 1 April 1990
|
1314
|
+
Ty Coon, President of Vice
|
1315
|
+
|
1316
|
+
That's all there is to it!
|