Release V0.2.4

This commit is contained in:
Tim Ruehsen 2014-05-30 17:19:27 +02:00
commit dd68aceac9
4 changed files with 17 additions and 4 deletions

3
NEWS
View File

@ -1,5 +1,8 @@
Copyright (C) 2014 Tim Ruehsen
30.05.2014
* Fixed psl_builtin() to return NULL if no built-in PSL data is available
27.05.2014 Release V0.2.3
* changed API version to 0.2

View File

@ -1,5 +1,5 @@
AC_INIT([libpsl], [0.2.3], [tim.ruehsen@gmx.de], [libpsl], [http://github.com/rockdaboot/libpsl])
AC_INIT([libpsl], [0.2.4], [tim.ruehsen@gmx.de], [libpsl], [http://github.com/rockdaboot/libpsl])
AC_PREREQ([2.59])
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.
# 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.
AC_SUBST([LIBPSL_SO_VERSION], [0:3:0])
AC_SUBST([LIBPSL_SO_VERSION], [0:4:0])
AC_SUBST([LIBPSL_API_VERSION], [0.2])
# Check for idn2

View File

@ -557,7 +557,11 @@ void psl_free(psl_ctx_t *psl)
*/
const psl_ctx_t *psl_builtin(void)
{
#ifdef WITH_BUILTIN
return &_builtin_psl;
#else
return NULL;
#endif
}
/**

View File

@ -90,7 +90,8 @@ int main(int argc, const char *const *argv)
fprintf(stderr, "Dropped data from %s\n", psl_file);
psl_file = NULL;
}
psl = (psl_ctx_t *) psl_builtin();
if (!(psl = (psl_ctx_t *) psl_builtin()))
printf("No builtin PSL data available\n");
}
else if (!strcmp(*arg, "--load-psl-file") && arg < argv + argc - 1) {
psl_free(psl);
@ -118,6 +119,11 @@ int main(int argc, const char *const *argv)
break;
}
if (!psl && mode != 99) {
printf("No PSL data available - aborting\n");
exit(2);
}
if (mode == 1) {
for (; arg < argv + argc; arg++)
printf("%s: %d\n", *arg, psl_is_public_suffix(psl, *arg));
@ -135,7 +141,7 @@ int main(int argc, const char *const *argv)
printf("%s: %d\n", *arg, psl_is_cookie_domain_acceptable(psl, *arg, cookie_domain));
}
else if (mode == 99) {
if (psl != psl_builtin()) {
if (psl && psl != psl_builtin()) {
printf("suffixes: %d\n", psl_suffix_count(psl));
printf("exceptions: %d\n", psl_suffix_exception_count(psl));
}