diff --git a/ABOUT-NLS b/ABOUT-NLS deleted file mode 100644 index b1de1b6..0000000 --- a/ABOUT-NLS +++ /dev/null @@ -1,1282 +0,0 @@ -1 Notes on the Free Translation Project -*************************************** - -Free software is going international! The Free Translation Project is -a way to get maintainers of free software, translators, and users all -together, so that free software will gradually become able to speak many -languages. A few packages already provide translations for their -messages. - - If you found this `ABOUT-NLS' file inside a distribution, you may -assume that the distributed package does use GNU `gettext' internally, -itself available at your nearest GNU archive site. But you do _not_ -need to install GNU `gettext' prior to configuring, installing or using -this package with messages translated. - - Installers will find here some useful hints. These notes also -explain how users should proceed for getting the programs to use the -available translations. They tell how people wanting to contribute and -work on translations can contact the appropriate team. - -1.1 INSTALL Matters -=================== - -Some packages are "localizable" when properly installed; the programs -they contain can be made to speak your own native language. Most such -packages use GNU `gettext'. Other packages have their own ways to -internationalization, predating GNU `gettext'. - - By default, this package will be installed to allow translation of -messages. It will automatically detect whether the system already -provides the GNU `gettext' functions. Installers may use special -options at configuration time for changing the default behaviour. The -command: - - ./configure --disable-nls - -will _totally_ disable translation of messages. - - When you already have GNU `gettext' installed on your system and run -configure without an option for your new package, `configure' will -probably detect the previously built and installed `libintl' library -and will decide to use it. If not, you may have to to use the -`--with-libintl-prefix' option to tell `configure' where to look for it. - - Internationalized packages usually have many `po/LL.po' files, where -LL gives an ISO 639 two-letter code identifying the language. Unless -translations have been forbidden at `configure' time by using the -`--disable-nls' switch, all available translations are installed -together with the package. However, the environment variable `LINGUAS' -may be set, prior to configuration, to limit the installed set. -`LINGUAS' should then contain a space separated list of two-letter -codes, stating which languages are allowed. - -1.2 Using This Package -====================== - -As a user, if your language has been installed for this package, you -only have to set the `LANG' environment variable to the appropriate -`LL_CC' combination. If you happen to have the `LC_ALL' or some other -`LC_xxx' environment variables set, you should unset them before -setting `LANG', otherwise the setting of `LANG' will not have the -desired effect. Here `LL' is an ISO 639 two-letter language code, and -`CC' is an ISO 3166 two-letter country code. For example, let's -suppose that you speak German and live in Germany. At the shell -prompt, merely execute `setenv LANG de_DE' (in `csh'), -`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). -This can be done from your `.login' or `.profile' file, once and for -all. - - You might think that the country code specification is redundant. -But in fact, some languages have dialects in different countries. For -example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The -country code serves to distinguish the dialects. - - The locale naming convention of `LL_CC', with `LL' denoting the -language and `CC' denoting the country, is the one use on systems based -on GNU libc. On other systems, some variations of this scheme are -used, such as `LL' or `LL_CC.ENCODING'. You can get the list of -locales supported by your system for your language by running the -command `locale -a | grep '^LL''. - - Not all programs have translations for all languages. By default, an -English message is shown in place of a nonexistent translation. If you -understand other languages, you can set up a priority list of languages. -This is done through a different environment variable, called -`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' -for the purpose of message handling, but you still need to have `LANG' -set to the primary language; this is required by other parts of the -system libraries. For example, some Swedish users who would rather -read translations in German than English for when Swedish is not -available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. - - Special advice for Norwegian users: The language code for Norwegian -bokma*l changed from `no' to `nb' recently (in 2003). During the -transition period, while some message catalogs for this language are -installed under `nb' and some older ones under `no', it's recommended -for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and -older translations are used. - - In the `LANGUAGE' environment variable, but not in the `LANG' -environment variable, `LL_CC' combinations can be abbreviated as `LL' -to denote the language's main dialect. For example, `de' is equivalent -to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' -(Portuguese as spoken in Portugal) in this context. - -1.3 Translating Teams -===================== - -For the Free Translation Project to be a success, we need interested -people who like their own language and write it well, and who are also -able to synergize with other translators speaking the same language. -Each translation team has its own mailing list. The up-to-date list of -teams can be found at the Free Translation Project's homepage, -`http://translationproject.org/', in the "Teams" area. - - If you'd like to volunteer to _work_ at translating messages, you -should become a member of the translating team for your own language. -The subscribing address is _not_ the same as the list itself, it has -`-request' appended. For example, speakers of Swedish can send a -message to `sv-request@li.org', having this message body: - - subscribe - - Keep in mind that team members are expected to participate -_actively_ in translations, or at solving translational difficulties, -rather than merely lurking around. If your team does not exist yet and -you want to start one, or if you are unsure about what to do or how to -get started, please write to `coordinator@translationproject.org' to -reach the coordinator for all translator teams. - - The English team is special. It works at improving and uniformizing -the terminology in use. Proven linguistic skills are praised more than -programming skills, here. - -1.4 Available Packages -====================== - -Languages are not equally supported in all packages. The following -matrix shows the current state of internationalization, as of June -2010. The matrix shows, in regard of each package, for which languages -PO files have been submitted to translation coordination, with a -translation percentage of at least 50%. - - Ready PO files af am an ar as ast az be be@latin bg bn_IN bs ca - +--------------------------------------------------+ - a2ps | [] [] | - aegis | | - ant-phone | | - anubis | | - aspell | [] [] | - bash | | - bfd | | - bibshelf | [] | - binutils | | - bison | | - bison-runtime | [] | - bluez-pin | [] [] | - bombono-dvd | | - buzztard | | - cflow | | - clisp | | - coreutils | [] [] | - cpio | | - cppi | | - cpplib | [] | - cryptsetup | | - dfarc | | - dialog | [] [] | - dico | | - diffutils | [] | - dink | | - doodle | | - e2fsprogs | [] | - enscript | [] | - exif | | - fetchmail | [] | - findutils | [] | - flex | [] | - freedink | | - gas | | - gawk | [] [] | - gcal | [] | - gcc | | - gettext-examples | [] [] [] [] | - gettext-runtime | [] [] | - gettext-tools | [] [] | - gip | [] | - gjay | | - gliv | [] | - glunarclock | [] [] | - gnubiff | | - gnucash | [] | - gnuedu | | - gnulib | | - gnunet | | - gnunet-gtk | | - gnutls | | - gold | | - gpe-aerial | | - gpe-beam | | - gpe-bluetooth | | - gpe-calendar | | - gpe-clock | [] | - gpe-conf | | - gpe-contacts | | - gpe-edit | | - gpe-filemanager | | - gpe-go | | - gpe-login | | - gpe-ownerinfo | [] | - gpe-package | | - gpe-sketchbook | | - gpe-su | [] | - gpe-taskmanager | [] | - gpe-timesheet | [] | - gpe-today | [] | - gpe-todo | | - gphoto2 | | - gprof | [] | - gpsdrive | | - gramadoir | | - grep | | - grub | [] [] | - gsasl | | - gss | | - gst-plugins-bad | [] | - gst-plugins-base | [] | - gst-plugins-good | [] | - gst-plugins-ugly | [] | - gstreamer | [] [] [] | - gtick | | - gtkam | [] | - gtkorphan | [] | - gtkspell | [] [] [] | - gutenprint | | - hello | [] | - help2man | | - hylafax | | - idutils | | - indent | [] [] | - iso_15924 | | - iso_3166 | [] [] [] [] [] [] [] | - iso_3166_2 | | - iso_4217 | | - iso_639 | [] [] [] [] | - iso_639_3 | | - jwhois | | - kbd | | - keytouch | [] | - keytouch-editor | | - keytouch-keyboa... | [] | - klavaro | [] | - latrine | | - ld | [] | - leafpad | [] [] | - libc | [] [] | - libexif | () | - libextractor | | - libgnutls | | - libgpewidget | | - libgpg-error | | - libgphoto2 | | - libgphoto2_port | | - libgsasl | | - libiconv | [] | - libidn | | - lifelines | | - liferea | [] [] | - lilypond | | - linkdr | [] | - lordsawar | | - lprng | | - lynx | [] | - m4 | | - mailfromd | | - mailutils | | - make | | - man-db | | - man-db-manpages | | - minicom | | - mkisofs | | - myserver | | - nano | [] [] | - opcodes | | - parted | | - pies | | - popt | | - psmisc | | - pspp | [] | - pwdutils | | - radius | [] | - recode | [] [] | - rosegarden | | - rpm | | - rush | | - sarg | | - screem | | - scrollkeeper | [] [] [] | - sed | [] [] | - sharutils | [] [] | - shishi | | - skencil | | - solfege | | - solfege-manual | | - soundtracker | | - sp | | - sysstat | | - tar | [] | - texinfo | | - tin | | - unicode-han-tra... | | - unicode-transla... | | - util-linux-ng | [] | - vice | | - vmm | | - vorbis-tools | | - wastesedge | | - wdiff | | - wget | [] [] | - wyslij-po | | - xchat | [] [] [] [] | - xdg-user-dirs | [] [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] | - +--------------------------------------------------+ - af am an ar as ast az be be@latin bg bn_IN bs ca - 6 0 1 2 3 19 1 10 3 28 3 1 38 - - crh cs da de el en en_GB en_ZA eo es et eu fa - +-------------------------------------------------+ - a2ps | [] [] [] [] [] [] [] | - aegis | [] [] [] | - ant-phone | [] () | - anubis | [] [] | - aspell | [] [] [] [] [] | - bash | [] [] [] | - bfd | [] | - bibshelf | [] [] [] | - binutils | [] | - bison | [] [] | - bison-runtime | [] [] [] [] | - bluez-pin | [] [] [] [] [] [] | - bombono-dvd | [] | - buzztard | [] [] [] | - cflow | [] [] | - clisp | [] [] [] [] | - coreutils | [] [] [] [] | - cpio | | - cppi | | - cpplib | [] [] [] | - cryptsetup | [] | - dfarc | [] [] [] | - dialog | [] [] [] [] [] | - dico | | - diffutils | [] [] [] [] [] [] | - dink | [] [] [] | - doodle | [] | - e2fsprogs | [] [] [] | - enscript | [] [] [] | - exif | () [] [] | - fetchmail | [] [] () [] [] [] | - findutils | [] [] [] | - flex | [] [] | - freedink | [] [] [] | - gas | [] | - gawk | [] [] [] | - gcal | [] | - gcc | [] [] | - gettext-examples | [] [] [] [] | - gettext-runtime | [] [] [] [] | - gettext-tools | [] [] [] | - gip | [] [] [] [] | - gjay | [] | - gliv | [] [] [] | - glunarclock | [] [] | - gnubiff | () | - gnucash | [] () () () () | - gnuedu | [] [] | - gnulib | [] [] | - gnunet | | - gnunet-gtk | [] | - gnutls | [] [] | - gold | [] | - gpe-aerial | [] [] [] [] | - gpe-beam | [] [] [] [] | - gpe-bluetooth | [] [] | - gpe-calendar | [] | - gpe-clock | [] [] [] [] | - gpe-conf | [] [] [] | - gpe-contacts | [] [] [] | - gpe-edit | [] [] | - gpe-filemanager | [] [] [] | - gpe-go | [] [] [] [] | - gpe-login | [] [] | - gpe-ownerinfo | [] [] [] [] | - gpe-package | [] [] [] | - gpe-sketchbook | [] [] [] [] | - gpe-su | [] [] [] [] | - gpe-taskmanager | [] [] [] [] | - gpe-timesheet | [] [] [] [] | - gpe-today | [] [] [] [] | - gpe-todo | [] [] [] | - gphoto2 | [] [] () [] [] [] | - gprof | [] [] [] | - gpsdrive | [] [] [] | - gramadoir | [] [] [] | - grep | [] | - grub | [] [] | - gsasl | [] | - gss | | - gst-plugins-bad | [] [] [] [] [] | - gst-plugins-base | [] [] [] [] [] | - gst-plugins-good | [] [] [] [] [] [] | - gst-plugins-ugly | [] [] [] [] [] [] | - gstreamer | [] [] [] [] [] | - gtick | [] () [] | - gtkam | [] [] () [] [] | - gtkorphan | [] [] [] [] | - gtkspell | [] [] [] [] [] [] [] | - gutenprint | [] [] [] | - hello | [] [] [] [] | - help2man | [] | - hylafax | [] [] | - idutils | [] [] | - indent | [] [] [] [] [] [] [] | - iso_15924 | [] () [] [] | - iso_3166 | [] [] [] [] () [] [] [] () | - iso_3166_2 | () | - iso_4217 | [] [] [] () [] [] | - iso_639 | [] [] [] [] () [] [] | - iso_639_3 | [] | - jwhois | [] | - kbd | [] [] [] [] [] | - keytouch | [] [] | - keytouch-editor | [] [] | - keytouch-keyboa... | [] | - klavaro | [] [] [] [] | - latrine | [] () | - ld | [] [] | - leafpad | [] [] [] [] [] [] | - libc | [] [] [] [] | - libexif | [] [] () | - libextractor | | - libgnutls | [] | - libgpewidget | [] [] | - libgpg-error | [] [] | - libgphoto2 | [] () | - libgphoto2_port | [] () [] | - libgsasl | | - libiconv | [] [] [] [] [] | - libidn | [] [] [] | - lifelines | [] () | - liferea | [] [] [] [] [] | - lilypond | [] [] [] | - linkdr | [] [] [] | - lordsawar | [] | - lprng | | - lynx | [] [] [] [] | - m4 | [] [] [] [] | - mailfromd | | - mailutils | [] | - make | [] [] [] | - man-db | | - man-db-manpages | | - minicom | [] [] [] [] | - mkisofs | | - myserver | | - nano | [] [] [] | - opcodes | [] [] | - parted | [] [] | - pies | | - popt | [] [] [] [] [] | - psmisc | [] [] [] | - pspp | [] | - pwdutils | [] | - radius | [] | - recode | [] [] [] [] [] [] | - rosegarden | () () () | - rpm | [] [] [] | - rush | | - sarg | | - screem | | - scrollkeeper | [] [] [] [] [] | - sed | [] [] [] [] [] [] | - sharutils | [] [] [] [] | - shishi | | - skencil | [] () [] | - solfege | [] [] [] | - solfege-manual | [] [] | - soundtracker | [] [] [] | - sp | [] | - sysstat | [] [] [] | - tar | [] [] [] [] | - texinfo | [] [] [] | - tin | [] [] | - unicode-han-tra... | | - unicode-transla... | | - util-linux-ng | [] [] [] [] | - vice | () () | - vmm | [] | - vorbis-tools | [] [] | - wastesedge | [] | - wdiff | [] [] | - wget | [] [] [] | - wyslij-po | | - xchat | [] [] [] [] [] | - xdg-user-dirs | [] [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] [] [] [] | - +-------------------------------------------------+ - crh cs da de el en en_GB en_ZA eo es et eu fa - 5 64 105 117 18 1 8 0 28 89 18 19 0 - - fi fr ga gl gu he hi hr hu hy id is it ja ka kn - +----------------------------------------------------+ - a2ps | [] [] [] [] | - aegis | [] [] | - ant-phone | [] [] | - anubis | [] [] [] [] | - aspell | [] [] [] [] | - bash | [] [] [] [] | - bfd | [] [] [] | - bibshelf | [] [] [] [] [] | - binutils | [] [] [] | - bison | [] [] [] [] | - bison-runtime | [] [] [] [] [] [] | - bluez-pin | [] [] [] [] [] [] [] [] | - bombono-dvd | [] | - buzztard | [] | - cflow | [] [] [] | - clisp | [] | - coreutils | [] [] [] [] [] | - cpio | [] [] [] [] | - cppi | [] [] | - cpplib | [] [] [] | - cryptsetup | [] [] [] | - dfarc | [] [] [] | - dialog | [] [] [] [] [] [] [] | - dico | | - diffutils | [] [] [] [] [] [] [] [] [] | - dink | [] | - doodle | [] [] | - e2fsprogs | [] [] | - enscript | [] [] [] [] | - exif | [] [] [] [] [] [] | - fetchmail | [] [] [] [] | - findutils | [] [] [] [] [] [] | - flex | [] [] [] | - freedink | [] [] [] | - gas | [] [] | - gawk | [] [] [] [] () [] | - gcal | [] | - gcc | [] | - gettext-examples | [] [] [] [] [] [] [] | - gettext-runtime | [] [] [] [] [] [] | - gettext-tools | [] [] [] [] | - gip | [] [] [] [] [] [] | - gjay | [] | - gliv | [] () | - glunarclock | [] [] [] [] | - gnubiff | () [] () | - gnucash | () () () () () [] | - gnuedu | [] [] | - gnulib | [] [] [] [] [] [] | - gnunet | | - gnunet-gtk | [] | - gnutls | [] [] | - gold | [] [] | - gpe-aerial | [] [] [] | - gpe-beam | [] [] [] [] | - gpe-bluetooth | [] [] [] [] | - gpe-calendar | [] [] | - gpe-clock | [] [] [] [] [] | - gpe-conf | [] [] [] [] | - gpe-contacts | [] [] [] [] | - gpe-edit | [] [] [] | - gpe-filemanager | [] [] [] [] | - gpe-go | [] [] [] [] [] | - gpe-login | [] [] [] | - gpe-ownerinfo | [] [] [] [] [] | - gpe-package | [] [] [] | - gpe-sketchbook | [] [] [] [] | - gpe-su | [] [] [] [] [] [] | - gpe-taskmanager | [] [] [] [] [] | - gpe-timesheet | [] [] [] [] [] | - gpe-today | [] [] [] [] [] [] [] | - gpe-todo | [] [] [] | - gphoto2 | [] [] [] [] [] [] | - gprof | [] [] [] [] | - gpsdrive | [] [] [] | - gramadoir | [] [] [] | - grep | [] [] | - grub | [] [] [] [] | - gsasl | [] [] [] [] [] | - gss | [] [] [] [] [] | - gst-plugins-bad | [] [] [] [] [] [] | - gst-plugins-base | [] [] [] [] [] [] | - gst-plugins-good | [] [] [] [] [] [] | - gst-plugins-ugly | [] [] [] [] [] [] | - gstreamer | [] [] [] [] [] | - gtick | [] [] [] [] [] | - gtkam | [] [] [] [] [] | - gtkorphan | [] [] [] | - gtkspell | [] [] [] [] [] [] [] [] [] | - gutenprint | [] [] [] [] | - hello | [] [] [] | - help2man | [] [] | - hylafax | [] | - idutils | [] [] [] [] [] [] | - indent | [] [] [] [] [] [] [] [] | - iso_15924 | [] () [] [] | - iso_3166 | [] () [] [] [] [] [] [] [] [] [] [] | - iso_3166_2 | () [] [] [] | - iso_4217 | [] () [] [] [] [] | - iso_639 | [] () [] [] [] [] [] [] [] | - iso_639_3 | () [] [] | - jwhois | [] [] [] [] [] | - kbd | [] [] | - keytouch | [] [] [] [] [] [] | - keytouch-editor | [] [] [] [] [] | - keytouch-keyboa... | [] [] [] [] [] | - klavaro | [] [] | - latrine | [] [] [] | - ld | [] [] [] [] | - leafpad | [] [] [] [] [] [] [] () | - libc | [] [] [] [] [] | - libexif | [] | - libextractor | | - libgnutls | [] [] | - libgpewidget | [] [] [] [] | - libgpg-error | [] [] | - libgphoto2 | [] [] [] | - libgphoto2_port | [] [] [] | - libgsasl | [] [] [] [] [] | - libiconv | [] [] [] [] [] [] | - libidn | [] [] [] [] | - lifelines | () | - liferea | [] [] [] [] | - lilypond | [] [] | - linkdr | [] [] [] [] [] | - lordsawar | | - lprng | [] | - lynx | [] [] [] [] [] | - m4 | [] [] [] [] [] [] | - mailfromd | | - mailutils | [] [] | - make | [] [] [] [] [] [] [] [] [] | - man-db | [] [] | - man-db-manpages | [] | - minicom | [] [] [] [] [] | - mkisofs | [] [] [] [] | - myserver | | - nano | [] [] [] [] [] [] | - opcodes | [] [] [] [] | - parted | [] [] [] [] | - pies | | - popt | [] [] [] [] [] [] [] [] [] | - psmisc | [] [] [] | - pspp | | - pwdutils | [] [] | - radius | [] [] | - recode | [] [] [] [] [] [] [] [] | - rosegarden | () () () () () | - rpm | [] [] | - rush | | - sarg | [] | - screem | [] [] | - scrollkeeper | [] [] [] [] | - sed | [] [] [] [] [] [] [] [] | - sharutils | [] [] [] [] [] [] [] | - shishi | [] | - skencil | [] | - solfege | [] [] [] [] | - solfege-manual | [] [] | - soundtracker | [] [] | - sp | [] () | - sysstat | [] [] [] [] [] | - tar | [] [] [] [] [] [] [] | - texinfo | [] [] [] [] | - tin | [] | - unicode-han-tra... | | - unicode-transla... | [] [] | - util-linux-ng | [] [] [] [] [] [] | - vice | () () () | - vmm | [] | - vorbis-tools | [] | - wastesedge | () () | - wdiff | [] | - wget | [] [] [] [] [] [] [] [] | - wyslij-po | [] [] [] | - xchat | [] [] [] [] [] [] [] [] [] | - xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] [] [] | - +----------------------------------------------------+ - fi fr ga gl gu he hi hr hu hy id is it ja ka kn - 105 121 53 20 4 8 3 5 53 2 120 5 84 67 0 4 - - ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne - +-----------------------------------------------+ - a2ps | [] | - aegis | | - ant-phone | | - anubis | [] [] | - aspell | [] | - bash | | - bfd | | - bibshelf | [] [] | - binutils | | - bison | [] | - bison-runtime | [] [] [] [] [] | - bluez-pin | [] [] [] [] [] | - bombono-dvd | | - buzztard | | - cflow | | - clisp | | - coreutils | [] | - cpio | | - cppi | | - cpplib | | - cryptsetup | | - dfarc | [] | - dialog | [] [] [] [] [] | - dico | | - diffutils | [] [] | - dink | | - doodle | | - e2fsprogs | | - enscript | | - exif | [] | - fetchmail | | - findutils | | - flex | | - freedink | [] | - gas | | - gawk | | - gcal | | - gcc | | - gettext-examples | [] [] [] [] | - gettext-runtime | [] | - gettext-tools | [] | - gip | [] [] | - gjay | | - gliv | | - glunarclock | [] | - gnubiff | | - gnucash | () () () () | - gnuedu | | - gnulib | | - gnunet | | - gnunet-gtk | | - gnutls | [] | - gold | | - gpe-aerial | [] | - gpe-beam | [] | - gpe-bluetooth | [] [] | - gpe-calendar | [] | - gpe-clock | [] [] [] [] [] | - gpe-conf | [] [] | - gpe-contacts | [] [] | - gpe-edit | [] | - gpe-filemanager | [] [] | - gpe-go | [] [] [] | - gpe-login | [] | - gpe-ownerinfo | [] [] | - gpe-package | [] [] | - gpe-sketchbook | [] [] | - gpe-su | [] [] [] [] [] [] | - gpe-taskmanager | [] [] [] [] [] [] | - gpe-timesheet | [] [] | - gpe-today | [] [] [] [] | - gpe-todo | [] [] | - gphoto2 | | - gprof | [] | - gpsdrive | | - gramadoir | | - grep | | - grub | | - gsasl | | - gss | | - gst-plugins-bad | [] [] [] [] | - gst-plugins-base | [] [] | - gst-plugins-good | [] [] | - gst-plugins-ugly | [] [] [] [] [] | - gstreamer | | - gtick | | - gtkam | [] | - gtkorphan | [] [] | - gtkspell | [] [] [] [] [] [] [] | - gutenprint | | - hello | [] [] [] | - help2man | | - hylafax | | - idutils | | - indent | | - iso_15924 | [] [] | - iso_3166 | [] [] () [] [] [] [] [] | - iso_3166_2 | | - iso_4217 | [] [] | - iso_639 | [] [] | - iso_639_3 | [] | - jwhois | [] | - kbd | | - keytouch | [] | - keytouch-editor | [] | - keytouch-keyboa... | [] | - klavaro | [] | - latrine | [] | - ld | | - leafpad | [] [] [] | - libc | [] | - libexif | | - libextractor | | - libgnutls | [] | - libgpewidget | [] [] | - libgpg-error | | - libgphoto2 | | - libgphoto2_port | | - libgsasl | | - libiconv | | - libidn | | - lifelines | | - liferea | | - lilypond | | - linkdr | | - lordsawar | | - lprng | | - lynx | | - m4 | | - mailfromd | | - mailutils | | - make | [] | - man-db | | - man-db-manpages | | - minicom | [] | - mkisofs | | - myserver | | - nano | [] [] | - opcodes | | - parted | | - pies | | - popt | [] [] [] | - psmisc | | - pspp | | - pwdutils | | - radius | | - recode | | - rosegarden | | - rpm | | - rush | | - sarg | | - screem | | - scrollkeeper | [] [] | - sed | | - sharutils | | - shishi | | - skencil | | - solfege | [] | - solfege-manual | | - soundtracker | | - sp | | - sysstat | [] | - tar | [] | - texinfo | [] | - tin | | - unicode-han-tra... | | - unicode-transla... | | - util-linux-ng | | - vice | | - vmm | | - vorbis-tools | | - wastesedge | | - wdiff | | - wget | [] | - wyslij-po | | - xchat | [] [] [] | - xdg-user-dirs | [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] | - +-----------------------------------------------+ - ko ku ky lg lt lv mk ml mn mr ms mt nb nds ne - 20 5 10 1 13 48 4 2 2 4 24 10 20 3 1 - - nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr - +---------------------------------------------------+ - a2ps | [] [] [] [] [] [] [] [] | - aegis | [] [] [] | - ant-phone | [] [] | - anubis | [] [] [] | - aspell | [] [] [] [] [] | - bash | [] [] | - bfd | [] | - bibshelf | [] [] | - binutils | [] [] | - bison | [] [] [] | - bison-runtime | [] [] [] [] [] [] [] | - bluez-pin | [] [] [] [] [] [] [] [] | - bombono-dvd | [] () | - buzztard | [] [] | - cflow | [] | - clisp | [] [] | - coreutils | [] [] [] [] [] [] | - cpio | [] [] [] | - cppi | [] | - cpplib | [] | - cryptsetup | [] | - dfarc | [] | - dialog | [] [] [] [] | - dico | [] | - diffutils | [] [] [] [] [] [] | - dink | () | - doodle | [] [] | - e2fsprogs | [] [] | - enscript | [] [] [] [] [] | - exif | [] [] [] () [] | - fetchmail | [] [] [] [] | - findutils | [] [] [] [] [] | - flex | [] [] [] [] [] | - freedink | [] [] | - gas | | - gawk | [] [] [] [] | - gcal | | - gcc | [] | - gettext-examples | [] [] [] [] [] [] [] [] | - gettext-runtime | [] [] [] [] [] [] [] [] [] | - gettext-tools | [] [] [] [] [] [] | - gip | [] [] [] [] [] | - gjay | | - gliv | [] [] [] [] [] [] | - glunarclock | [] [] [] [] [] | - gnubiff | [] () | - gnucash | [] () () () | - gnuedu | [] | - gnulib | [] [] [] [] | - gnunet | | - gnunet-gtk | | - gnutls | [] [] | - gold | | - gpe-aerial | [] [] [] [] [] [] [] | - gpe-beam | [] [] [] [] [] [] [] | - gpe-bluetooth | [] [] | - gpe-calendar | [] [] [] [] | - gpe-clock | [] [] [] [] [] [] [] [] | - gpe-conf | [] [] [] [] [] [] [] | - gpe-contacts | [] [] [] [] [] | - gpe-edit | [] [] [] | - gpe-filemanager | [] [] [] | - gpe-go | [] [] [] [] [] [] [] [] | - gpe-login | [] [] | - gpe-ownerinfo | [] [] [] [] [] [] [] [] | - gpe-package | [] [] | - gpe-sketchbook | [] [] [] [] [] [] [] | - gpe-su | [] [] [] [] [] [] [] [] | - gpe-taskmanager | [] [] [] [] [] [] [] [] | - gpe-timesheet | [] [] [] [] [] [] [] [] | - gpe-today | [] [] [] [] [] [] [] [] | - gpe-todo | [] [] [] [] [] | - gphoto2 | [] [] [] [] [] [] [] [] | - gprof | [] [] [] | - gpsdrive | [] [] | - gramadoir | [] [] | - grep | [] [] [] [] | - grub | [] [] [] | - gsasl | [] [] [] [] | - gss | [] [] [] | - gst-plugins-bad | [] [] [] [] [] [] | - gst-plugins-base | [] [] [] [] [] | - gst-plugins-good | [] [] [] [] [] | - gst-plugins-ugly | [] [] [] [] [] [] | - gstreamer | [] [] [] [] [] | - gtick | [] [] [] | - gtkam | [] [] [] [] [] [] | - gtkorphan | [] | - gtkspell | [] [] [] [] [] [] [] [] [] [] | - gutenprint | [] [] | - hello | [] [] [] [] | - help2man | [] [] | - hylafax | [] | - idutils | [] [] [] [] [] | - indent | [] [] [] [] [] [] [] | - iso_15924 | [] [] [] [] | - iso_3166 | [] [] [] [] [] () [] [] [] [] [] [] [] [] | - iso_3166_2 | [] [] [] | - iso_4217 | [] [] [] [] [] [] [] [] | - iso_639 | [] [] [] [] [] [] [] [] [] | - iso_639_3 | [] [] | - jwhois | [] [] [] [] | - kbd | [] [] [] | - keytouch | [] [] [] | - keytouch-editor | [] [] [] | - keytouch-keyboa... | [] [] [] | - klavaro | [] [] | - latrine | [] [] | - ld | | - leafpad | [] [] [] [] [] [] [] [] [] | - libc | [] [] [] [] | - libexif | [] [] () [] | - libextractor | | - libgnutls | [] [] | - libgpewidget | [] [] [] | - libgpg-error | [] [] | - libgphoto2 | [] [] | - libgphoto2_port | [] [] [] [] [] | - libgsasl | [] [] [] [] [] | - libiconv | [] [] [] [] [] | - libidn | [] [] | - lifelines | [] [] | - liferea | [] [] [] [] [] () () [] | - lilypond | [] | - linkdr | [] [] [] | - lordsawar | | - lprng | [] | - lynx | [] [] [] | - m4 | [] [] [] [] [] | - mailfromd | [] | - mailutils | [] | - make | [] [] [] [] | - man-db | [] [] [] | - man-db-manpages | [] [] [] | - minicom | [] [] [] [] | - mkisofs | [] [] [] | - myserver | | - nano | [] [] [] [] | - opcodes | [] [] | - parted | [] [] [] [] | - pies | [] | - popt | [] [] [] [] | - psmisc | [] [] [] | - pspp | [] [] | - pwdutils | [] | - radius | [] [] [] | - recode | [] [] [] [] [] [] [] [] | - rosegarden | () () | - rpm | [] [] [] | - rush | [] [] | - sarg | | - screem | | - scrollkeeper | [] [] [] [] [] [] [] [] | - sed | [] [] [] [] [] [] [] [] [] | - sharutils | [] [] [] [] | - shishi | [] | - skencil | [] [] | - solfege | [] [] [] [] | - solfege-manual | [] [] [] | - soundtracker | [] | - sp | | - sysstat | [] [] [] [] | - tar | [] [] [] [] | - texinfo | [] [] [] [] | - tin | [] | - unicode-han-tra... | | - unicode-transla... | | - util-linux-ng | [] [] [] [] [] | - vice | [] | - vmm | [] | - vorbis-tools | [] [] | - wastesedge | [] | - wdiff | [] [] | - wget | [] [] [] [] [] [] [] | - wyslij-po | [] [] [] | - xchat | [] [] [] [] [] [] [] [] [] | - xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] | - +---------------------------------------------------+ - nl nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr - 135 10 4 7 105 1 29 62 47 91 3 54 46 9 37 - - sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW - +---------------------------------------------------+ - a2ps | [] [] [] [] [] | 27 - aegis | [] | 9 - ant-phone | [] [] [] [] | 9 - anubis | [] [] [] [] | 15 - aspell | [] [] [] | 20 - bash | [] [] [] | 12 - bfd | [] | 6 - bibshelf | [] [] [] | 16 - binutils | [] [] | 8 - bison | [] [] | 12 - bison-runtime | [] [] [] [] [] [] | 29 - bluez-pin | [] [] [] [] [] [] [] [] | 37 - bombono-dvd | [] | 4 - buzztard | [] | 7 - cflow | [] [] [] | 9 - clisp | | 10 - coreutils | [] [] [] [] | 22 - cpio | [] [] [] [] [] [] | 13 - cppi | [] [] | 5 - cpplib | [] [] [] [] [] [] | 14 - cryptsetup | [] [] | 7 - dfarc | [] | 9 - dialog | [] [] [] [] [] [] [] | 30 - dico | [] | 2 - diffutils | [] [] [] [] [] [] | 30 - dink | | 4 - doodle | [] [] | 7 - e2fsprogs | [] [] [] | 11 - enscript | [] [] [] [] | 17 - exif | [] [] [] | 16 - fetchmail | [] [] [] | 17 - findutils | [] [] [] [] [] | 20 - flex | [] [] [] [] | 15 - freedink | [] | 10 - gas | [] | 4 - gawk | [] [] [] [] | 18 - gcal | [] [] | 5 - gcc | [] [] [] | 7 - gettext-examples | [] [] [] [] [] [] [] | 34 - gettext-runtime | [] [] [] [] [] [] [] | 29 - gettext-tools | [] [] [] [] [] [] | 22 - gip | [] [] [] [] | 22 - gjay | [] | 3 - gliv | [] [] [] | 14 - glunarclock | [] [] [] [] [] | 19 - gnubiff | [] [] | 4 - gnucash | () [] () [] () | 10 - gnuedu | [] [] | 7 - gnulib | [] [] [] [] | 16 - gnunet | [] | 1 - gnunet-gtk | [] [] [] | 5 - gnutls | [] [] [] | 10 - gold | [] | 4 - gpe-aerial | [] [] [] | 18 - gpe-beam | [] [] [] | 19 - gpe-bluetooth | [] [] [] | 13 - gpe-calendar | [] [] [] [] | 12 - gpe-clock | [] [] [] [] [] | 28 - gpe-conf | [] [] [] [] | 20 - gpe-contacts | [] [] [] | 17 - gpe-edit | [] [] [] | 12 - gpe-filemanager | [] [] [] [] | 16 - gpe-go | [] [] [] [] [] | 25 - gpe-login | [] [] [] | 11 - gpe-ownerinfo | [] [] [] [] [] | 25 - gpe-package | [] [] [] | 13 - gpe-sketchbook | [] [] [] | 20 - gpe-su | [] [] [] [] [] | 30 - gpe-taskmanager | [] [] [] [] [] | 29 - gpe-timesheet | [] [] [] [] [] | 25 - gpe-today | [] [] [] [] [] [] | 30 - gpe-todo | [] [] [] [] | 17 - gphoto2 | [] [] [] [] [] | 24 - gprof | [] [] [] | 15 - gpsdrive | [] [] [] | 11 - gramadoir | [] [] [] | 11 - grep | [] [] [] | 10 - grub | [] [] [] | 14 - gsasl | [] [] [] [] | 14 - gss | [] [] [] | 11 - gst-plugins-bad | [] [] [] [] | 26 - gst-plugins-base | [] [] [] [] [] | 24 - gst-plugins-good | [] [] [] [] | 24 - gst-plugins-ugly | [] [] [] [] [] | 29 - gstreamer | [] [] [] [] | 22 - gtick | [] [] [] | 13 - gtkam | [] [] [] | 20 - gtkorphan | [] [] [] | 14 - gtkspell | [] [] [] [] [] [] [] [] [] | 45 - gutenprint | [] | 10 - hello | [] [] [] [] [] [] | 21 - help2man | [] [] | 7 - hylafax | [] | 5 - idutils | [] [] [] [] | 17 - indent | [] [] [] [] [] [] | 30 - iso_15924 | () [] () [] [] | 16 - iso_3166 | [] [] () [] [] () [] [] [] () | 53 - iso_3166_2 | () [] () [] | 9 - iso_4217 | [] () [] [] () [] [] | 26 - iso_639 | [] [] [] () [] () [] [] [] [] | 38 - iso_639_3 | [] () | 8 - jwhois | [] [] [] [] [] | 16 - kbd | [] [] [] [] [] | 15 - keytouch | [] [] [] | 16 - keytouch-editor | [] [] [] | 14 - keytouch-keyboa... | [] [] [] | 14 - klavaro | [] | 11 - latrine | [] [] [] | 10 - ld | [] [] [] [] | 11 - leafpad | [] [] [] [] [] [] | 33 - libc | [] [] [] [] [] | 21 - libexif | [] () | 7 - libextractor | [] | 1 - libgnutls | [] [] [] | 9 - libgpewidget | [] [] [] | 14 - libgpg-error | [] [] [] | 9 - libgphoto2 | [] [] | 8 - libgphoto2_port | [] [] [] [] | 14 - libgsasl | [] [] [] | 13 - libiconv | [] [] [] [] | 21 - libidn | () [] [] | 11 - lifelines | [] | 4 - liferea | [] [] [] | 21 - lilypond | [] | 7 - linkdr | [] [] [] [] [] | 17 - lordsawar | | 1 - lprng | [] | 3 - lynx | [] [] [] [] | 17 - m4 | [] [] [] [] | 19 - mailfromd | [] [] | 3 - mailutils | [] | 5 - make | [] [] [] [] | 21 - man-db | [] [] [] | 8 - man-db-manpages | | 4 - minicom | [] [] | 16 - mkisofs | [] [] | 9 - myserver | | 0 - nano | [] [] [] [] | 21 - opcodes | [] [] [] | 11 - parted | [] [] [] [] [] | 15 - pies | [] [] | 3 - popt | [] [] [] [] [] [] | 27 - psmisc | [] [] | 11 - pspp | | 4 - pwdutils | [] [] | 6 - radius | [] [] | 9 - recode | [] [] [] [] | 28 - rosegarden | () | 0 - rpm | [] [] [] | 11 - rush | [] [] | 4 - sarg | | 1 - screem | [] | 3 - scrollkeeper | [] [] [] [] [] | 27 - sed | [] [] [] [] [] | 30 - sharutils | [] [] [] [] [] | 22 - shishi | [] | 3 - skencil | [] [] | 7 - solfege | [] [] [] [] | 16 - solfege-manual | [] | 8 - soundtracker | [] [] [] | 9 - sp | [] | 3 - sysstat | [] [] | 15 - tar | [] [] [] [] [] [] | 23 - texinfo | [] [] [] [] [] | 17 - tin | | 4 - unicode-han-tra... | | 0 - unicode-transla... | | 2 - util-linux-ng | [] [] [] [] | 20 - vice | () () | 1 - vmm | [] | 4 - vorbis-tools | [] | 6 - wastesedge | | 2 - wdiff | [] [] | 7 - wget | [] [] [] [] [] | 26 - wyslij-po | [] [] | 8 - xchat | [] [] [] [] [] [] | 36 - xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | 63 - xkeyboard-config | [] [] [] | 22 - +---------------------------------------------------+ - 85 teams sv sw ta te tg th tr uk vi wa zh_CN zh_HK zh_TW - 178 domains 119 1 3 3 0 10 65 51 155 17 98 7 41 2618 - - Some counters in the preceding matrix are higher than the number of -visible blocks let us expect. This is because a few extra PO files are -used for implementing regional variants of languages, or language -dialects. - - For a PO file in the matrix above to be effective, the package to -which it applies should also have been internationalized and -distributed as such by its maintainer. There might be an observable -lag between the mere existence a PO file and its wide availability in a -distribution. - - If June 2010 seems to be old, you may fetch a more recent copy of -this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date -matrix with full percentage details can be found at -`http://translationproject.org/extra/matrix.html'. - -1.5 Using `gettext' in new packages -=================================== - -If you are writing a freely available program and want to -internationalize it you are welcome to use GNU `gettext' in your -package. Of course you have to respect the GNU Library General Public -License which covers the use of the GNU `gettext' library. This means -in particular that even non-free programs can use `libintl' as a shared -library, whereas only free software can use `libintl' as a static -library or use modified versions of `libintl'. - - Once the sources are changed appropriately and the setup can handle -the use of `gettext' the only thing missing are the translations. The -Free Translation Project is also available for packages which are not -developed inside the GNU project. Therefore the information given above -applies also for every other Free Software Project. Contact -`coordinator@translationproject.org' to make the `.pot' files available -to the translation teams. - diff --git a/NEWS b/NEWS index 565f5cc..adc7151 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,13 @@ Copyright (C) 2014-2016 Tim Rühsen +30.07.2016 Release V0.14.0 + * Remove unneeded libraries from tools/psl link step + * Use https instead of http where possible + * Add man page for tools/psl + * Add header magic to DAFSA files + * Rename make_dafsa.py to psl-make-dafsa + * Add man page for psl-make-dafsa + 02.03.2016 Release V0.13.0 * Use tests.txt as PSL test file by default * Slightly shorter DAFSA array when sorting input diff --git a/README.md b/README.md index 8ed0b52..884084b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A "public suffix" is a domain name under which Internet users can directly regis Browsers and other web clients can use it to - avoid privacy-leaking "supercookies" -- avoid privacy-leaking "super domain" certificates ([see post from Jeffry Walton](http://lists.gnu.org/archive/html/bug-wget/2014-03/msg00093.html)) +- avoid privacy-leaking "super domain" certificates ([see post from Jeffry Walton](https://lists.gnu.org/archive/html/bug-wget/2014-03/msg00093.html)) - domain highlighting parts of the domain in a user interface - sorting domain lists by site @@ -24,7 +24,7 @@ Libpsl... - is thread-safe - handles IDNA2008 UTS#46 (libicu is used by psl2c if installed) -Find more information about the Publix Suffix List [here](http://publicsuffix.org/). +Find more information about the Publix Suffix List [here](https://publicsuffix.org/). Download the Public Suffix List [here](https://hg.mozilla.org/mozilla-central/raw-file/tip/netwerk/dns/effective_tld_names.dat). @@ -70,13 +70,27 @@ library API via command line. prints the usage. +Convert PSL into DAFSA +---------------------- + +The [DAFSA](https://en.wikipedia.org/wiki/Deterministic_acyclic_finite_state_automaton) format is a compressed +representation of strings. Here we use it to reduce the whole PSL to about 32k in size. + +Generate `psl.dafsa` from `list/public_suffix_list.dat` + + $ src/psl-make-dafsa --output-format=binary --input-format=psl list/public_suffix_list.dat psl.dafsa + +Test the result (example) + + $ tools/psl --load-psl-file psl.dafsa aeroclub.aero + License ------- Libpsl is made available under the terms of the MIT license.
See the LICENSE file that accompanies this distribution for the full text of the license. -src/make_dafsa.py and src/lookup_string_in_fixed_set.c are licensed under the term written in +src/psl-make-dafsa and src/lookup_string_in_fixed_set.c are licensed under the term written in src/LICENSE.chromium. Building from git @@ -86,7 +100,7 @@ You should have python2.7+ installed. Download project and prepare sources with - git clone http://github.com/rockdaboot/libpsl + git clone https://github.com/rockdaboot/libpsl ./autogen.sh ./configure make diff --git a/configure.ac b/configure.ac index 1cb1828..8fecc46 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ -AC_INIT([libpsl], [0.13.0], [tim.ruehsen@gmx.de], [libpsl], [http://github.com/rockdaboot/libpsl]) +AC_INIT([libpsl], [0.14.0], [tim.ruehsen@gmx.de], [libpsl], [https://github.com/rockdaboot/libpsl]) AC_PREREQ([2.59]) AM_INIT_AUTOMAKE([1.10 -Wall no-define foreign]) @@ -72,7 +72,7 @@ AS_IF([ test "$enable_man" != no ], [ AC_MSG_RESULT([no]) ]) -# src/make_dafsa.py needs python 2.7+ +# src/psl-make-dafsa needs python 2.7+ AM_PATH_PYTHON([2.7]) PKG_PROG_PKG_CONFIG @@ -80,7 +80,7 @@ PKG_PROG_PKG_CONFIG # Define these substitions here to keep all version information in one place. # For information on how to properly maintain the library version information, # refer to the libtool manual, section "Updating library version information": -# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html +# https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html # # 1. Start with version information of ‘0:0:0’ for each libtool library. # 2. Update the version information only immediately before a public release of your software. More frequent updates are unnecessary, and only guarantee that the current interface number gets larger faster. @@ -88,7 +88,7 @@ PKG_PROG_PKG_CONFIG # 4. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0. # 5. If any interfaces have been added since the last public release, then increment age. # 6. If any existing interfaces have been removed or changed since the last public release, then set age to 0. -AC_SUBST([LIBPSL_SO_VERSION], [5:0:0]) +AC_SUBST([LIBPSL_SO_VERSION], [5:1:0]) AC_SUBST([LIBPSL_VERSION], $VERSION) # Check for enable/disable builtin PSL data @@ -158,7 +158,6 @@ if test "$enable_runtime" = "libicu" -o "$enable_builtin" = "libicu"; then PKG_CHECK_MODULES([LIBICU], [icu-uc], [ HAVE_LIBICU=yes if test "$enable_runtime" = "libicu"; then - LIBS="$LIBICU_LIBS $LIBS" CFLAGS="$LIBICU_CFLAGS $CFLAGS" fi ], [ diff --git a/docs/libpsl/libpsl-docs.sgml b/docs/libpsl/libpsl-docs.sgml index 2aa080c..1eca9a2 100644 --- a/docs/libpsl/libpsl-docs.sgml +++ b/docs/libpsl/libpsl-docs.sgml @@ -11,7 +11,7 @@ for Libpsl &version;. The latest version of this documentation can be found on-line at - GitHub. + GitHub. diff --git a/include/libpsl.h.in b/include/libpsl.h.in index 467021f..f8cbedc 100644 --- a/include/libpsl.h.in +++ b/include/libpsl.h.in @@ -44,7 +44,7 @@ extern "C" { #endif -/* types for psl_is_publix_suffix2() */ +/* types for psl_is_public_suffix2() */ #define PSL_TYPE_ICANN (1<<0) #define PSL_TYPE_PRIVATE (1<<1) #define PSL_TYPE_ANY (PSL_TYPE_ICANN | PSL_TYPE_PRIVATE) diff --git a/list b/list index e2f2f4b..1df90f8 160000 --- a/list +++ b/list @@ -1 +1 @@ -Subproject commit e2f2f4bfe2ae57651afb7268bb9a0b53da5eb8cf +Subproject commit 1df90f84db1a041991a48e46e786705f7161ab4c diff --git a/src/LICENSE.chromium b/src/LICENSE.chromium index ffe66fe..e29f4ff 100644 --- a/src/LICENSE.chromium +++ b/src/LICENSE.chromium @@ -1,5 +1,5 @@ * The following License is for the source code files - make_dafsa.py and lookup_string_in_fixed_set.c. + psl-make-dafsa and lookup_string_in_fixed_set.c. // Copyright 2015 The Chromium Authors. All rights reserved. // diff --git a/src/Makefile.am b/src/Makefile.am index 9e04d53..71a1d01 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -22,7 +22,7 @@ endif noinst_PROGRAMS = psl2c psl2c_SOURCES = psl2c.c lookup_string_in_fixed_set.c -psl2c_CPPFLAGS = -I$(top_srcdir)/include -DMAKE_DAFSA=\"$(top_srcdir)/src/make_dafsa.py\" +psl2c_CPPFLAGS = -I$(top_srcdir)/include -DMAKE_DAFSA=\"$(top_srcdir)/src/psl-make-dafsa\" if BUILTIN_GENERATOR_LIBICU psl2c_LDADD = -licuuc endif @@ -38,4 +38,4 @@ endif suffixes_dafsa.c: $(PSL_FILE) psl2c$(EXEEXT) ./psl2c$(EXEEXT) "$(PSL_FILE)" suffixes_dafsa.c -EXTRA_DIST = make_dafsa.py LICENSE.chromium +EXTRA_DIST = psl-make-dafsa LICENSE.chromium diff --git a/src/lookup_string_in_fixed_set.c b/src/lookup_string_in_fixed_set.c index 81a4e4d..ddf63ae 100644 --- a/src/lookup_string_in_fixed_set.c +++ b/src/lookup_string_in_fixed_set.c @@ -118,14 +118,14 @@ static int GetReturnValue(const unsigned char* offset, * Looks up the string |key| with length |key_length| in a fixed set of * strings. The set of strings must be known at compile time. It is converted to * a graph structure named a DAFSA (Deterministic Acyclic Finite State - * Automaton) by the script make_dafsa.py during compilation. This permits - * efficient (in time and space) lookup. The graph generated by make_dafsa.py + * Automaton) by the script psl-make-dafsa during compilation. This permits + * efficient (in time and space) lookup. The graph generated by psl-make-dafsa * takes the form of a constant byte array which should be supplied via the * |graph| and |length| parameters. The return value is kDafsaNotFound, * kDafsaFound, or a bitmap consisting of one or more of kDafsaExceptionRule, * kDafsaWildcardRule and kDafsaPrivateRule ORed together. * - * Lookup a domain key in a byte array generated by make_dafsa.py. + * Lookup a domain key in a byte array generated by psl-make-dafsa. */ /* prototype to skip warning with -Wmissing-prototypes */ diff --git a/src/make_dafsa.py b/src/psl-make-dafsa similarity index 98% rename from src/make_dafsa.py rename to src/psl-make-dafsa index 837468a..50c9dac 100755 --- a/src/make_dafsa.py +++ b/src/psl-make-dafsa @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE.chromium file. @@ -7,7 +7,7 @@ A Deterministic acyclic finite state automaton (DAFSA) is a compact representation of an unordered word list (dictionary). -http://en.wikipedia.org/wiki/Deterministic_acyclic_finite_state_automaton +https://en.wikipedia.org/wiki/Deterministic_acyclic_finite_state_automaton This python program converts a list of strings to a byte array in C++. This python program fetches strings and return values from a gperf file @@ -418,7 +418,7 @@ def encode(dafsa): def to_cxx(data): """Generates C++ code from a list of encoded bytes.""" text = '/* This file is generated. DO NOT EDIT!\n\n' - text += 'The byte array encodes effective tld names. See make_dafsa.py for' + text += 'The byte array encodes effective tld names. See psl-make-dafsa source for' text += ' documentation.' text += '*/\n\n' text += 'static const unsigned char kDafsa[%s] = {\n' % len(data) @@ -445,7 +445,7 @@ def words_to_cxx(words): def words_to_binary(words): """Generates C++ code from a word list""" - return words_to_whatever(words, bytearray) + return b'.DAFSA@PSL_0 \n' + words_to_whatever(words, bytearray) def parse_psl2c(infile): diff --git a/src/psl-make-dafsa.1 b/src/psl-make-dafsa.1 new file mode 100644 index 0000000..9eb1fd7 --- /dev/null +++ b/src/psl-make-dafsa.1 @@ -0,0 +1,36 @@ +.TH PSL "1" "July 2016" "psl 0.13.0" "User Commands" +.SH NAME +psl-make-dafsa \- generate a compact and optimized DAFSA from a Public Suffix List +.SH SYNOPSIS +.B psl-make-dafsa +[\fI\,options\/\fR] \fIinfile\fR \fIoutfile\fR +.SH DESCRIPTION +\fBpsl-make-dafsa\fR produces C/C++ code or an +architecture-independent binary object that represents a Deterministic +Acyclic Finite State Automaton (DAFSA) from a textual representation +of a Public Suffix List. Input and output files must be specified on +the command line. + +This compact representation enables optimized queries of the list, +saving both time and space when compared to searches of human-readable +representations. +.SH OPTIONS +The format of the data read and written by \fBpsl-make-dafsa\fR +depends on options passed to it. +.br +.TP +\fB\-\-input\-format=\fR[\fIpsl2c\fR|\fIpsl\fR] +\fBpsl2c\fR: (default) input is C code generated by libpsl/psl2c +.br +\fBpsl\fR: input is standard textual Public Suffix List file +.TP +\fB\-\-output\-format=\fR[\fIcxx\fR|\fIbinary\fR] +\fBcxx\fR: (default) output is C/C++ code +.br +\fBbinary\fR: output is an architecture-independent binary format +.SH SEE ALSO +.IR https://publicsuffix.org/ ", " https://github.com/rockdaboot/libpsl +.SH COPYRIGHT +\fBpsl-make-dafsa\fR was originally part of the Chromium project, and +has been modified by Tim Ruehsen and Daniel Kahn Gillmor. The code +and its documentation is governed by a BSD-style license. diff --git a/src/psl.c b/src/psl.c index f8d1462..c3a4ffe 100644 --- a/src/psl.c +++ b/src/psl.c @@ -133,7 +133,7 @@ static char *strndup(const char *s, size_t n) * @stability: Stable * @include: libpsl.h * - * [Public Suffix List](http://publicsuffix.org/) library functions. + * [Public Suffix List](https://publicsuffix.org/) library functions. * */ @@ -628,9 +628,9 @@ static int _str_is_ascii(const char *s) * The function checks for a valid UTF-8 character sequence before * passing it to idna_to_ascii_8z(). * - * [1] http://lists.gnu.org/archive/html/help-libidn/2015-05/msg00002.html + * [1] https://lists.gnu.org/archive/html/help-libidn/2015-05/msg00002.html * [2] https://lists.gnu.org/archive/html/bug-wget/2015-06/msg00002.html - * [3] http://curl.haxx.se/mail/lib-2015-06/0143.html + * [3] https://curl.haxx.se/mail/lib-2015-06/0143.html */ static int _utf8_is_valid(const char *utf8) { @@ -930,7 +930,7 @@ suffix_yes: * @domain: Domain string * * This function checks if @domain is a public suffix by the means of the - * [Mozilla Public Suffix List](http://publicsuffix.org). + * [Mozilla Public Suffix List](https://publicsuffix.org). * * For cookie domain checking see psl_is_cookie_domain_acceptable(). * @@ -959,7 +959,7 @@ int psl_is_public_suffix(const psl_ctx_t *psl, const char *domain) * @type: Domain type * * This function checks if @domain is a public suffix by the means of the - * [Mozilla Public Suffix List](http://publicsuffix.org). + * [Mozilla Public Suffix List](https://publicsuffix.org). * * @type specifies the PSL section where to perform the lookup. Valid values are * %PSL_TYPE_PRIVATE, %PSL_TYPE_ICANN and %PSL_TYPE_ANY. @@ -987,8 +987,8 @@ int psl_is_public_suffix2(const psl_ctx_t *psl, const char *domain, int type) * @psl: PSL context * @domain: Domain string * - * This function finds the longest publix suffix part of @domain by the means - * of the [Mozilla Public Suffix List](http://publicsuffix.org). + * This function finds the longest public suffix part of @domain by the means + * of the [Mozilla Public Suffix List](https://publicsuffix.org). * * International @domain names have to be either in lowercase UTF-8 or in ASCII form (punycode). * Other encodings result in unexpected behavior. @@ -1027,7 +1027,7 @@ const char *psl_unregistrable_domain(const psl_ctx_t *psl, const char *domain) * @domain: Domain string * * This function finds the shortest private suffix part of @domain by the means - * of the [Mozilla Public Suffix List](http://publicsuffix.org). + * of the [Mozilla Public Suffix List](https://publicsuffix.org). * * International @domain names have to be either in lowercase UTF-8 or in ASCII form (punycode). * Other encodings result in unexpected behavior. @@ -1110,8 +1110,7 @@ psl_ctx_t *psl_load_fp(FILE *fp) psl_ctx_t *psl; _psl_entry_t suffix, *suffixp; char buf[256], *linep, *p; - size_t n; - int type = 0; + int type = 0, is_dafsa; _psl_idna_t *idna; if (!fp) @@ -1121,14 +1120,18 @@ psl_ctx_t *psl_load_fp(FILE *fp) return NULL; /* read first line to allow ASCII / DAFSA detection */ - if ((n = fread(buf, 1, sizeof(buf) - 1, fp)) < 1) + if (!(linep = fgets(buf, sizeof(buf) - 1, fp))) goto fail; - buf[n] = 0; + is_dafsa = strlen(buf) == 16 && !strncmp(buf, ".DAFSA@PSL_", 11); - if (!strstr(buf, "This Source Code Form is subject to")) { + if (is_dafsa) { void *m; - size_t size = 65536, len = n; + size_t size = 65536, n, len = 0; + int version = atoi(buf + 11); + + if (version != 0) + goto fail; if (!(psl->dafsa = malloc(size))) goto fail; @@ -1148,20 +1151,20 @@ psl_ctx_t *psl_load_fp(FILE *fp) if ((m = realloc(psl->dafsa, len))) psl->dafsa = m; + psl->dafsa_size = len; + return psl; } - rewind(fp); - idna = _psl_idna_open(); /* - * as of 02.11.2012, the list at http://publicsuffix.org/list/ contains ~6000 rules and 40 exceptions. - * as of 19.02.2014, the list at http://publicsuffix.org/list/ contains ~6500 rules and 19 exceptions. + * as of 02.11.2012, the list at https://publicsuffix.org/list/ contains ~6000 rules and 40 exceptions. + * as of 19.02.2014, the list at https://publicsuffix.org/list/ contains ~6500 rules and 19 exceptions. */ psl->suffixes = _vector_alloc(8*1024, _suffix_compare_array); - while ((linep = fgets(buf, sizeof(buf), fp))) { + do { while (_isspace_ascii(*linep)) linep++; /* ignore leading whitespace */ if (!*linep) continue; /* skip empty lines */ @@ -1232,7 +1235,7 @@ psl_ctx_t *psl_load_fp(FILE *fp) _add_punycode_if_needed(idna, psl->suffixes, suffixp); } - } + } while ((linep = fgets(buf, sizeof(buf), fp))); _vector_sort(psl->suffixes); diff --git a/src/psl2c.c b/src/psl2c.c index 2a4549c..f5654da 100644 --- a/src/psl2c.c +++ b/src/psl2c.c @@ -206,7 +206,7 @@ static int _print_psl_entries_dafsa_binary(const char *fname, const _psl_vector_ return 3; } - snprintf(cmd, sizeof(cmd), MAKE_DAFSA " --binary in.tmp %s", fname); + snprintf(cmd, sizeof(cmd), MAKE_DAFSA " --output-format=binary in.tmp %s", fname); if ((rc = system(cmd))) { fprintf(stderr, "Failed to execute '%s' (%d)\n", cmd, rc); ret = 2; diff --git a/tools/psl.1 b/tools/psl.1 new file mode 100644 index 0000000..ccc85aa --- /dev/null +++ b/tools/psl.1 @@ -0,0 +1,63 @@ +.TH PSL "1" "July 2016" "psl 0.13.0" "User Commands" +.SH NAME +psl \- Explore the Public Suffix List +.SH SYNOPSIS +.B psl +[\fI\,options\/\fR] \fI\,\/\fR +.SH DESCRIPTION +`psl' explores the Public Suffix List. It takes a list of domains on +the command line, or if no domains are present on the command line, it +reads one domain per line from standard input. It prints its results +to standard output, with each line containing one domain followed by a +colon, followed by the relevant information for that domain. +.SH MODES +The information printed per domain changes based on the selected mode. +.br +Available modes are: +.TP +\fB\-\-is\-public\-suffix\fR +check if domains are public suffixes. +.br +Returned data: 1 if the \fIdomain\fR is a public suffix, 0 otherwise. +[default] +.TP +\fB\-\-is\-cookie\-domain\-acceptable\fR +check if cookie\-domain is acceptable for domains. +.br +Returned data: 1 if \fIcookie-domain\fR is acceptable for the +\fIdomain\fR, 0 otherwise. +.TP +\fB\-\-print\-unreg\-domain\fR +Returned data: the longest public suffix part for each \fIdomain\fR. +.TP +\fB\-\-print\-reg\-domain\fR +Returned data: the shortest private suffix part for each \fIdomain\fR. +.SH VERSION INFORMATION +`psl' can instead be used to report information about the version of +the library and its built-in Public Suffix data: +.TP +\fB\-\-version\fR +show library version information +.TP +\fB\-\-print\-info\fR +print info about library builtin data +.SH PUBLIC SUFFIX DATA +By default, `psl' will use built-in Public Suffix data. +.br +You can also direct it to use a different file: +.TP +\fB\-\-use\-builtin\-data\fR +use the builtin PSL data [default] +.TP +\fB\-\-load\-psl\-file\fR +load PSL data from file +.SH SEE ALSO +https://publicsuffix.org/ +https://github.com/rockdaboot/libpsl +.SH COPYRIGHT +libpsl and `psl' are copyright \(co 2014\-2016 Tim Ruehsen under an +MIT-style License. +.br +This documentation was written by Daniel Kahn Gillmor for the Debian +project, but may be used by others under the same license as libpsl +itself. diff --git a/tools/psl.c b/tools/psl.c index ec21a76..35f56df 100644 --- a/tools/psl.c +++ b/tools/psl.c @@ -50,7 +50,7 @@ static void usage(int err, FILE* f) fprintf(f, " --is-public-suffix check if domains are public suffixes [default]\n"); fprintf(f, " --is-cookie-domain-acceptable \n"); fprintf(f, " check if cookie-domain is acceptable for domains\n"); - fprintf(f, " --print-unreg-domain print the longest publix suffix part\n"); + fprintf(f, " --print-unreg-domain print the longest public suffix part\n"); fprintf(f, " --print-reg-domain print the shortest private suffix part\n"); fprintf(f, " --print-info print info about library builtin data\n"); fprintf(f, "\n");