Release V0.3.1
This commit is contained in:
commit
a835b78e53
36
COPYING
36
COPYING
|
@ -1,17 +1,19 @@
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
Copyright (C) 2014 Tim Ruehsen
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
|
||||||
* to deal in the Software without restriction, including without limitation
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
copy of this software and associated documentation files (the "Software"),
|
||||||
* and/or sell copies of the Software, and to permit persons to whom the
|
to deal in the Software without restriction, including without limitation
|
||||||
* Software is furnished to do so, subject to the following conditions:
|
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
*
|
and/or sell copies of the Software, and to permit persons to whom the
|
||||||
* The above copyright notice and this permission notice shall be included in
|
Software is furnished to do so, subject to the following conditions:
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
The above copyright notice and this permission notice shall be included in
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
all copies or substantial portions of the Software.
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
* DEALINGS IN THE SOFTWARE.
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
DEALINGS IN THE SOFTWARE.
|
||||||
|
|
36
LICENSE
36
LICENSE
|
@ -1,17 +1,19 @@
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
Copyright (C) 2014 Tim Ruehsen
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
|
||||||
* to deal in the Software without restriction, including without limitation
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
copy of this software and associated documentation files (the "Software"),
|
||||||
* and/or sell copies of the Software, and to permit persons to whom the
|
to deal in the Software without restriction, including without limitation
|
||||||
* Software is furnished to do so, subject to the following conditions:
|
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
*
|
and/or sell copies of the Software, and to permit persons to whom the
|
||||||
* The above copyright notice and this permission notice shall be included in
|
Software is furnished to do so, subject to the following conditions:
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
The above copyright notice and this permission notice shall be included in
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
all copies or substantial portions of the Software.
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
* DEALINGS IN THE SOFTWARE.
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
DEALINGS IN THE SOFTWARE.
|
||||||
|
|
6
NEWS
6
NEWS
|
@ -1,5 +1,11 @@
|
||||||
Copyright (C) 2014 Tim Ruehsen
|
Copyright (C) 2014 Tim Ruehsen
|
||||||
|
|
||||||
|
10.06.2014 Release V0.3.1
|
||||||
|
* link psl utility dynamically
|
||||||
|
* fix output of psl_filename()
|
||||||
|
* cleanup for psl --help
|
||||||
|
* removed check for idn2 in autogen.sh
|
||||||
|
|
||||||
05.06.2014 Release V0.3.0
|
05.06.2014 Release V0.3.0
|
||||||
* added support for libicu in psl2c (IDNA2008 UTS#46)
|
* added support for libicu in psl2c (IDNA2008 UTS#46)
|
||||||
this needs pkg-config and libicu-dev installed
|
this needs pkg-config and libicu-dev installed
|
||||||
|
|
|
@ -5,11 +5,6 @@ if test -z `which autoreconf`; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z `which idn2`; then
|
|
||||||
echo "No 'idn2' found. You must install the idn2 package."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# create m4 before gtkdocize
|
# create m4 before gtkdocize
|
||||||
mkdir m4 2>/dev/null
|
mkdir m4 2>/dev/null
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
AC_INIT([libpsl], [0.3.0], [tim.ruehsen@gmx.de], [libpsl], [http://github.com/rockdaboot/libpsl])
|
AC_INIT([libpsl], [0.3.1], [tim.ruehsen@gmx.de], [libpsl], [http://github.com/rockdaboot/libpsl])
|
||||||
AC_PREREQ([2.59])
|
AC_PREREQ([2.59])
|
||||||
AM_INIT_AUTOMAKE([1.10 -Wall no-define])
|
AM_INIT_AUTOMAKE([1.10 -Wall no-define])
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ AS_IF([ test "$enable_man" != no ], [
|
||||||
# 4. If any interfaces have been added, removed, or changed since the last update, increment current, and set revision to 0.
|
# 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.
|
# 5. If any interfaces have been added since the last public release, then increment age.
|
||||||
# 6. If any interfaces have been removed or changed since the last public release, then set age to 0.
|
# 6. If any interfaces have been removed or changed since the last public release, then set age to 0.
|
||||||
AC_SUBST([LIBPSL_SO_VERSION], [1:0:1])
|
AC_SUBST([LIBPSL_SO_VERSION], [1:1:1])
|
||||||
AC_SUBST([LIBPSL_VERSION], $VERSION)
|
AC_SUBST([LIBPSL_VERSION], $VERSION)
|
||||||
|
|
||||||
# Check for enable/disable builtin PSL data
|
# Check for enable/disable builtin PSL data
|
||||||
|
|
|
@ -446,7 +446,7 @@ int main(int argc, const char **argv)
|
||||||
fprintf(fpout, "static time_t _psl_file_time = %lu;\n", st.st_mtime);
|
fprintf(fpout, "static time_t _psl_file_time = %lu;\n", st.st_mtime);
|
||||||
fprintf(fpout, "static time_t _psl_compile_time = %lu;\n", time(NULL));
|
fprintf(fpout, "static time_t _psl_compile_time = %lu;\n", time(NULL));
|
||||||
fprintf(fpout, "static const char _psl_sha1_checksum[] = \"%s\";\n", checksum);
|
fprintf(fpout, "static const char _psl_sha1_checksum[] = \"%s\";\n", checksum);
|
||||||
fprintf(fpout, "static const char _psl_filename[] = \"%s\";\n", checksum);
|
fprintf(fpout, "static const char _psl_filename[] = \"%s\";\n", argv[1]);
|
||||||
|
|
||||||
if (fclose(fpout) != 0)
|
if (fclose(fpout) != 0)
|
||||||
ret = 4;
|
ret = 4;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
bin_PROGRAMS = psl
|
bin_PROGRAMS = psl
|
||||||
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/include
|
AM_CPPFLAGS = -I$(top_srcdir)/include
|
||||||
AM_LDFLAGS = -static
|
|
||||||
LDADD = ../src/libpsl.la
|
LDADD = ../src/libpsl.la
|
||||||
|
|
48
tools/psl.c
48
tools/psl.c
|
@ -36,22 +36,21 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <libpsl.h>
|
#include <libpsl.h>
|
||||||
|
|
||||||
static void usage(int err)
|
static void usage(int err, FILE* f)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "\n");
|
fprintf(f, "Usage: psl [options] <domains...>\n");
|
||||||
fprintf(stderr, "Usage: psl [options] <domains...>\n");
|
fprintf(f, "\n");
|
||||||
fprintf(stderr, "\n");
|
fprintf(f, "Options:\n");
|
||||||
fprintf(stderr, "Options:\n");
|
fprintf(f, " --version show library version information\n");
|
||||||
fprintf(stderr, " --version show library version information\n");
|
fprintf(f, " --use-builtin-data use the builtin PSL data [default]\n");
|
||||||
fprintf(stderr, " --use-builtin-data use the builtin PSL data. [default]\n");
|
fprintf(f, " --load-psl-file <filename> load PSL data from file\n");
|
||||||
fprintf(stderr, " --load-psl-file <filename> load PSL data from file.\n");
|
fprintf(f, " --is-public-suffix check if domains are public suffixes [default]\n");
|
||||||
fprintf(stderr, " --is-public-suffix check if domains are public suffixes or not. [default]\n");
|
fprintf(f, " --is-cookie-domain-acceptable <cookie-domain>\n");
|
||||||
fprintf(stderr, " --is-cookie-domain-acceptable <cookie-domain>\n");
|
fprintf(f, " check if cookie-domain is acceptable for domains\n");
|
||||||
fprintf(stderr, " check if cookie-domain is acceptable for domains.\n");
|
fprintf(f, " --print-unreg-domain print the longest publix suffix part\n");
|
||||||
fprintf(stderr, " --print-unreg-domain print the longest publix suffix part\n");
|
fprintf(f, " --print-reg-domain print the shortest private suffix part\n");
|
||||||
fprintf(stderr, " --print-reg-domain print the shortest private suffix part\n");
|
fprintf(f, " --print-info print info about library builtin data\n");
|
||||||
fprintf(stderr, " --print-info print info about library builtin data\n");
|
fprintf(f, "\n");
|
||||||
fprintf(stderr, "\n");
|
|
||||||
|
|
||||||
exit(err);
|
exit(err);
|
||||||
}
|
}
|
||||||
|
@ -102,12 +101,13 @@ int main(int argc, const char *const *argv)
|
||||||
psl_file = NULL;
|
psl_file = NULL;
|
||||||
}
|
}
|
||||||
if (!(psl = psl_load_file(psl_file = *(++arg)))) {
|
if (!(psl = psl_load_file(psl_file = *(++arg)))) {
|
||||||
fprintf(stderr, "Failed to load PSL data from %s\n", psl_file);
|
fprintf(stderr, "Failed to load PSL data from %s\n\n", psl_file);
|
||||||
psl_file = NULL;
|
psl_file = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!strcmp(*arg, "--help")) {
|
else if (!strcmp(*arg, "--help")) {
|
||||||
usage(0);
|
fprintf(stdout, "`psl' explores the Public Suffix List\n\n");
|
||||||
|
usage(0, stdout);
|
||||||
}
|
}
|
||||||
else if (!strcmp(*arg, "--version")) {
|
else if (!strcmp(*arg, "--version")) {
|
||||||
printf("psl %s\n", PACKAGE_VERSION);
|
printf("psl %s\n", PACKAGE_VERSION);
|
||||||
|
@ -123,15 +123,21 @@ int main(int argc, const char *const *argv)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fprintf(stderr, "Unknown option '%s'\n", *arg);
|
fprintf(stderr, "Unknown option '%s'\n", *arg);
|
||||||
usage(1);
|
usage(1, stderr);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!psl && mode != 99) {
|
if (mode != 99) {
|
||||||
printf("No PSL data available - aborting\n");
|
if (!psl) {
|
||||||
exit(2);
|
fprintf(stderr, "No PSL data available - aborting\n");
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
|
if (arg >= argv + argc) {
|
||||||
|
fprintf(stderr, "No domains given - aborting\n");
|
||||||
|
exit(3);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode == 1) {
|
if (mode == 1) {
|
||||||
|
|
Loading…
Reference in New Issue