Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@ tests/test-is-public-builtin
tests/test-is-tld
tests/test-registrable-domain
tools/psl
tools/psl.1
19 changes: 0 additions & 19 deletions COPYING

This file was deleted.

1 change: 1 addition & 0 deletions COPYING
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (C) 2014-2024 Tim Rühsen
Copyright (C) Tim Rühsen and Libpsl Contributors.
See Git history for individual modification years.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
Expand Down
8 changes: 7 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
Copyright (C) 2014-2026 Tim Rühsen
/*
* SPDX-License-Identifier: MIT
*
* See the LICENSE file in the root directory for details and copyrights.
*
* This file is part of libpsl.
*/

24.06.2026 Release V0.22.0
* Allow building from tarball without Python
Expand Down
4 changes: 3 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ AC_SUBST([LIBPSL_VERSION_MAJOR], [$(echo $VERSION | cut -d'.' -f1)])
AC_SUBST([LIBPSL_VERSION_MINOR], [$(echo $VERSION | cut -d'.' -f2)])
AC_SUBST([LIBPSL_VERSION_PATCH], [$(echo $VERSION | cut -d'.' -f3)])
AC_SUBST([LIBPSL_VERSION_NUMBER], [$(printf '0x%02x%02x%02x' $LIBPSL_VERSION_MAJOR $LIBPSL_VERSION_MINOR $LIBPSL_VERSION_PATCH)])
AC_CONFIG_FILES([include/libpsl.h])
AC_SUBST([COPYRIGHT_MONTH], [$(date +%B)])
AC_SUBST([COPYRIGHT_YEAR], [$(date +%Y)])
AC_CONFIG_FILES([include/libpsl.h tools/psl.1])

dnl
dnl Gettext
Expand Down
21 changes: 3 additions & 18 deletions fuzz/fuzzer.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
/*
* Copyright(c) 2017-2024 Tim Ruehsen
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* 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.
* See the LICENSE file in the root directory for details and copyrights.
*
* This file is part of libpsl.
*
*/

#include <config.h>
Expand Down
21 changes: 3 additions & 18 deletions fuzz/libpsl_fuzzer.c
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
/*
* Copyright(c) 2017-2024 Tim Ruehsen
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* 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.
* See the LICENSE file in the root directory for details and copyrights.
*
* This file is part of libpsl.
*
*/

#include <config.h>
Expand Down
21 changes: 3 additions & 18 deletions fuzz/libpsl_load_dafsa_fuzzer.c
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
/*
* Copyright(c) 2017-2024 Tim Ruehsen
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* 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.
* See the LICENSE file in the root directory for details and copyrights.
*
* This file is part of libpsl.
*
*/

#include <config.h>
Expand Down
21 changes: 3 additions & 18 deletions fuzz/libpsl_load_fuzzer.c
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
/*
* Copyright(c) 2017-2024 Tim Ruehsen
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* 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.
* See the LICENSE file in the root directory for details and copyrights.
*
* This file is part of libpsl.
*
*/

#include <config.h>
Expand Down
21 changes: 3 additions & 18 deletions fuzz/main.c
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
/*
* Copyright(c) 2017-2024 Tim Ruehsen
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* 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.
* See the LICENSE file in the root directory for details and copyrights.
*
* This file is part of libpsl.
*
*/

#include <config.h>
Expand Down
20 changes: 2 additions & 18 deletions fuzz/run-afl.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
#!/bin/sh -eu
#
# Copyright(c) 2017-2024 Tim Ruehsen
# SPDX-License-Identifier: MIT
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# 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.
# See the LICENSE file in the root directory for details and copyrights.
#
# This file is part of libpsl.

Expand Down
20 changes: 2 additions & 18 deletions fuzz/run-clang.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
#!/bin/bash -e
#
# Copyright(c) 2017-2024 Tim Ruehsen
# SPDX-License-Identifier: MIT
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# 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.
# See the LICENSE file in the root directory for details and copyrights.
#
# This file is part of libpsl.

Expand Down
5 changes: 1 addition & 4 deletions include/libpsl.h.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright(c) 2014-2024 Tim Ruehsen
* Copyright (C) 2014-@COPYRIGHT_YEAR@ Tim Rühsen and Libpsl Contributors.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand All @@ -23,9 +23,6 @@
*
* Header file for libpsl library routines
*
* Changelog
* 20.03.2014 Tim Ruehsen created
*
*/

#ifndef LIBPSL_LIBPSL_H
Expand Down
14 changes: 7 additions & 7 deletions include/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ major = version_arr[0].to_int()
minor = version_arr[1].to_int()
patch = version_arr[2].to_int()

cdata = configuration_data()
cdata.set('LIBPSL_VERSION', version)
cdata.set('LIBPSL_VERSION_MAJOR', major)
cdata.set('LIBPSL_VERSION_MINOR', minor)
cdata.set('LIBPSL_VERSION_PATCH', patch)
# Extend shared _cdata from parent scope with version defines
_cdata.set('LIBPSL_VERSION', version)
_cdata.set('LIBPSL_VERSION_MAJOR', major)
_cdata.set('LIBPSL_VERSION_MINOR', minor)
_cdata.set('LIBPSL_VERSION_PATCH', patch)

hex = '0123456789abcdef'
ver = '0x@0@@1@@2@@3@@4@@5@'
cdata.set('LIBPSL_VERSION_NUMBER',
_cdata.set('LIBPSL_VERSION_NUMBER',
ver.format(
hex[major / 16], hex[major % 16],
hex[minor / 16], hex[minor % 16],
Expand All @@ -21,6 +21,6 @@ cdata.set('LIBPSL_VERSION_NUMBER',
libpsl_h = configure_file(
input : 'libpsl.h.in',
output : 'libpsl.h',
configuration : cdata)
configuration : _cdata)

install_headers(libpsl_h)
7 changes: 7 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ if cc.get_id() == 'msvc'
endif
endif

# Shared configuration data for copyright date and version
_cdata = configuration_data()
_cdata.set('PACKAGE_VERSION', meson.project_version())
copyright_date = run_command(['date', '+%B %Y'], check: true).stdout().strip()
_cdata.set('COPYRIGHT_MONTH', copyright_date.split()[0])
_cdata.set('COPYRIGHT_YEAR', copyright_date.split()[1])

subdir('include')
subdir('src')
subdir('tools')
Expand Down
25 changes: 3 additions & 22 deletions src/psl.c
Original file line number Diff line number Diff line change
@@ -1,31 +1,12 @@
/*
* Copyright(c) 2014-2024 Tim Ruehsen
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* 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.
* SPDX-License-Identifier: MIT
*
* See the LICENSE file in the root directory for details and copyrights.
*
* This file is part of libpsl.
*
* Public Suffix List routines
*
* Changelog
* 19.03.2014 Tim Ruehsen created from libmget/cookie.c
*
*/

#if HAVE_CONFIG_H
Expand Down
21 changes: 3 additions & 18 deletions tests/common.c
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
/*
* Copyright(c) 2014-2024 Tim Ruehsen
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
* See the LICENSE file in the root directory for details and copyrights.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* This file is part of libpsl.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* 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.
*
* This file is part of the test suite of libpsl.
*/

#include <stdio.h> /* snprintf */
Expand Down
Loading
Loading