Release v0.8.1

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCgAGBQJVzgQiAAoJEAgwLbaiZwQo9yIQAKoE+KwiWa+Lh60RdfcVYXXW
 QVTrXVZYjcE1mx7NtdfExSMlhC3htcktyPAvvM5yecjhAN8T6DVKqN9kID2i+jHf
 LxUzh03V9N/qUy+wKBC0qevzsP41MN6tAkxqpW5vk1w/DcghOaNHTuxzqrGHOdqA
 iK/f1QM6citEhZGqTaVK0HTFMiljJYOX1UYq9knCCU5oRcKj67dCf+SqYG9m8HfC
 KGlF/nNONAmxMPGeHxV6aDobuG1yf2zzhlzga/iP0cvfz+4/f2wbt0qeKaH49HBz
 E4Wg1y7yGgdE+95nI84sqa8mCv9iOOxP+U6OphTjzrVuVy2gpB31HExBKnOdLbEK
 o3iuvvOzu/SC6wVsf4BHl/16QL3IMkCWtykcb/yoviD1sXCFUy2UEkmU0kurnJvW
 Qct6NC6PQUMaa8UZup24RYlZY7rOummE8YisQEVhlyo5Ki7q026yC28q9LynkpAP
 u/EkiFs90vE9sU8lcXe1kfIX9HdLJ8WzHc/fgb6oyhvYe2/QoKDoV1n/TU4x134k
 pYrXhMIaXy1Uo3uB/yuetY7Dj2/Q+e5MePgp8ZayyIwSei7ovJ4y9RCZT9H+B5qU
 Er6b/Xm3cRMidQ4U5vmbMezz0uefS5+SyEjYk+GBBYEmXNtEAGwVNv7mOcmwpJyg
 Mfbor7jKiv4rSNZXcYS9
 =AzWS
 -----END PGP SIGNATURE-----

Merge tag 'libpsl-0.8.1' into debian

Release v0.8.1
This commit is contained in:
Daniel Kahn Gillmor 2015-08-15 13:54:46 +02:00
commit 56dc0f293a
4 changed files with 33 additions and 16 deletions

4
NEWS
View File

@ -1,5 +1,9 @@
Copyright (C) 2014 Tim Rühsen
14.08.2015 Release V0.8.1
* Fix documentation
* Add syntax checking of tests_psl.txt
06.08.2015 Release V0.8.0
* Add https://github.com/publicsuffix as git submodule
* Support Debian 'Reproducible Builds'

View File

@ -1,5 +1,5 @@
AC_INIT([libpsl], [0.8.0], [tim.ruehsen@gmx.de], [libpsl], [http://github.com/rockdaboot/libpsl])
AC_INIT([libpsl], [0.8.1], [tim.ruehsen@gmx.de], [libpsl], [http://github.com/rockdaboot/libpsl])
AC_PREREQ([2.59])
AM_INIT_AUTOMAKE([1.10 -Wall no-define foreign])

View File

@ -776,14 +776,12 @@ psl_ctx_t *psl_load_fp(FILE *fp)
}
/**
* psl_load_free:
* psl_free:
* @psl: PSL context pointer
*
* This function frees the the PSL context that has been retrieved via
* psl_load_fp() or psl_load_file().
*
* Returns: Pointer to a PSL context private or %NULL on failure.
*
* Since: 0.1
*/
void psl_free(psl_ctx_t *psl)
@ -827,8 +825,6 @@ const psl_ctx_t *psl_builtin(void)
* This function returns number of public suffixes maintained by @psl.
* The number of exceptions within the Public Suffix List are not included.
*
* If the generation of built-in data has been disabled during compilation, 0 will be returned.
*
* Returns: Number of public suffixes entries in PSL context.
*
* Since: 0.1
@ -849,8 +845,6 @@ int psl_suffix_count(const psl_ctx_t *psl)
*
* This function returns number of public suffix exceptions maintained by @psl.
*
* If the generation of built-in data has been disabled during compilation, 0 will be returned.
*
* Returns: Number of public suffix exceptions in PSL context.
*
* Since: 0.1

View File

@ -66,7 +66,7 @@ static void test(const psl_ctx_t *psl, const char *domain, const char *expected_
} else {
failed++;
printf("psl_registrable_domain(%s)=%s (expected %s)\n",
domain, result ? result : "NULL", expected_result ? expected_result : "NULL");
domain ? domain : "NULL", result ? result : "NULL", expected_result ? expected_result : "NULL");
}
free(lower);
@ -76,7 +76,9 @@ static void test_psl(void)
{
FILE *fp;
const psl_ctx_t *psl;
char buf[256], domain[128], expected_regdom[128];
const char *p;
char buf[256], domain[128], expected_regdom[128], semicolon[2];
int er_is_null, d_is_null;
psl = psl_builtin();
@ -110,15 +112,32 @@ static void test_psl(void)
if ((fp = fopen(PSL_TESTFILE, "r"))) {
while ((fgets(buf, sizeof(buf), fp))) {
if (sscanf(buf, " checkPublicSuffix('%127[^']' , '%127[^']", domain, expected_regdom) != 2) {
if (sscanf(buf, " checkPublicSuffix('%127[^']' , %127[nul]", domain, expected_regdom) != 2)
/* advance over ASCII white space */
for (p = buf; *p == ' ' || *p == '\t' || *p == '\r' || *p == '\n'; p++)
;
if (!*p || (*p == '/' && p[1] == '/'))
continue; /* ignore comments and blank lines */
er_is_null = 0;
d_is_null = 0;
if (sscanf(p, "checkPublicSuffix ( '%127[^']' , '%127[^']' ) %1[;]", domain, expected_regdom, semicolon) != 3) {
if (sscanf(p, "checkPublicSuffix ( '%127[^']' , null ) %1[;]", domain, semicolon) == 2) {
er_is_null = 1;
} else if (sscanf(p, "checkPublicSuffix ( null , '%127[^']' ) %1[;]", expected_regdom, semicolon) == 2) {
d_is_null = 1;
} else if (sscanf(p, "checkPublicSuffix ( null , null ) %1[;]", semicolon) == 1) {
d_is_null = 1;
er_is_null = 1;
} else {
failed++;
printf("Malformed line from '" PSL_TESTFILE "': %s", buf);
continue;
}
}
if (!strcmp(expected_regdom, "null"))
test(psl, domain, NULL);
else
test(psl, domain, expected_regdom);
test(psl, d_is_null ? NULL : domain, er_is_null ? NULL : expected_regdom);
}
fclose(fp);