diff --git a/CMakeLists.txt b/CMakeLists.txt index 8955161..c02a27c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,9 @@ # # Copyright 2013,2016–2018 Alexander Dahl # +# SPDX-License-Identifier: LGPL-2.1+ +# License-Filename: LICENSES/LGPL-2.1.txt +# cmake_minimum_required(VERSION 3.1) diff --git a/COPYING b/LICENSES/LGPL-2.1.txt similarity index 100% rename from COPYING rename to LICENSES/LGPL-2.1.txt diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 0000000..9072510 --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2001 Bob Trower, Trantor Standard Systems Inc. + +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. diff --git a/include/libcgi/CMakeLists.txt b/include/libcgi/CMakeLists.txt index 0657840..15fc242 100644 --- a/include/libcgi/CMakeLists.txt +++ b/include/libcgi/CMakeLists.txt @@ -1,6 +1,9 @@ # # Copyright 2018 Alexander Dahl # +# SPDX-License-Identifier: LGPL-2.1+ +# License-Filename: LICENSES/LGPL-2.1.txt +# configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/config.h.in" diff --git a/include/libcgi/cgi.h b/include/libcgi/cgi.h index 4c6c049..d345543 100644 --- a/include/libcgi/cgi.h +++ b/include/libcgi/cgi.h @@ -1,23 +1,12 @@ /* - LibCGI - A library to make CGI programs using C - Copyright (C) 2001 Rafael Steil - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * LibCGI - A library to make CGI programs using C + * + * Copyright 2001 Rafael Steil + * + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + */ - You can contact the author by e-mail: rafael@insanecorp.com -*/ #ifndef _CGI_H #define _CGI_H 1 diff --git a/include/libcgi/error.h b/include/libcgi/error.h index 4f4e47b..ac27675 100644 --- a/include/libcgi/error.h +++ b/include/libcgi/error.h @@ -1,3 +1,10 @@ +/* + * Copyright 2001 Rafael Steil + * + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + */ + #ifndef _ERROR_H #define _ERROR_H 1 diff --git a/include/libcgi/session.h b/include/libcgi/session.h index 127b76d..2394407 100644 --- a/include/libcgi/session.h +++ b/include/libcgi/session.h @@ -1,23 +1,11 @@ /* - LibCGI - A library to make CGI programs using C - Copyright (C) 2001 Rafael Steil - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - You can contact the author by e-mail: rafael@insanecorp.com -*/ + * LibCGI - A library to make CGI programs using C + * + * Copyright 2001 Rafael Steil + * + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + */ #ifndef _SESSION_H #define _SESSION_H 1 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 23f3a40..8e5f1ac 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,9 @@ # # Copyright 2013,2016,2018 Alexander Dahl # +# SPDX-License-Identifier: LGPL-2.1+ +# License-Filename: LICENSES/LGPL-2.1.txt +# set(CGI_SRC base64.c diff --git a/src/base64.c b/src/base64.c index 3195f65..b35db4f 100644 --- a/src/base64.c +++ b/src/base64.c @@ -1,32 +1,12 @@ /* - LibCGI base64 manipulation functions is extremely based on the work of Bob Tower, - from its projec http://base64.sourceforge.net. The functions were a bit modicated. - Above is the MIT license from b64.c original code: - -LICENCE: Copyright (c) 2001 Bob Trower, Trantor Standard Systems Inc. - - 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 -*/ + * LibCGI base64 manipulation functions is extremely based on the work of Bob Tower, + * from its projec http://base64.sourceforge.net. The functions were a bit modicated. + * + * Copyright (c) 2001 Bob Trower, Trantor Standard Systems Inc. + * + * SPDX-License-Identifier: MIT + * License-Filename: LICENSES/MIT.txt + */ #include #include diff --git a/src/cgi.c b/src/cgi.c index 6279543..9c34b62 100644 --- a/src/cgi.c +++ b/src/cgi.c @@ -1,23 +1,11 @@ /* - LibCGI - A library to make CGI programs using C - Copyright (C) 2001 Rafael Steil - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - You can contact the author by e-mail: rafael@insanecorp.com -*/ + * LibCGI - A library to make CGI programs using C + * + * Copyright 2001 Rafael Steil + * + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + */ #include #include diff --git a/src/cookie.c b/src/cookie.c index 2272e91..0978095 100644 --- a/src/cookie.c +++ b/src/cookie.c @@ -1,23 +1,11 @@ /* - LibCGI - A library to make CGI programs using C - Copyright (C) 2001 Rafael Steil - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - You can contact the author by e-mail: rafael@insanecorp.com -*/ + * LibCGI - A library to make CGI programs using C + * + * Copyright 2001 Rafael Steil + * + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + */ #include #include diff --git a/src/error.c b/src/error.c index 0e64c09..f63fb62 100644 --- a/src/error.c +++ b/src/error.c @@ -1,3 +1,12 @@ +/* + * LibCGI - A library to make CGI programs using C + * + * Copyright 2001 Rafael Steil + * + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + */ + #include #include #include diff --git a/src/general.c b/src/general.c index 9ef7455..7f0a026 100644 --- a/src/general.c +++ b/src/general.c @@ -1,23 +1,11 @@ /* - LibCGI - A library to make CGI programs using C - Copyright (C) 2001 Rafael Steil - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - You can contact the author by e-mail: rafael@insanecorp.com -*/ + * LibCGI - A library to make CGI programs using C + * + * Copyright 2001 Rafael Steil + * + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + */ #include #include diff --git a/src/list.c b/src/list.c index b995997..cd6e2b2 100644 --- a/src/list.c +++ b/src/list.c @@ -1,24 +1,12 @@ /* - LibCGI - A library to make CGI programs using C - Copyright (C) 2001 Rafael Steil - Copyright 2016 Alexander Dahl - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - You can contact the author by e-mail: rafael@insanecorp.com -*/ + * LibCGI - A library to make CGI programs using C + * + * Copyright 2001 Rafael Steil + * Copyright 2016 Alexander Dahl + * + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + */ #include #include diff --git a/src/session.c b/src/session.c index ef70cc5..806053d 100644 --- a/src/session.c +++ b/src/session.c @@ -1,23 +1,11 @@ /* - LibCGI - A library to make CGI programs using C - Copyright (C) 2001 Rafael Steil - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - You can contact the author by e-mail: rafael@insanecorp.com -*/ + * LibCGI - A library to make CGI programs using C + * + * Copyright 2001 Rafael Steil + * + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + */ /***************************************************** * The variables/functions beginning with sess_ are diff --git a/src/string.c b/src/string.c index 9859634..7887636 100644 --- a/src/string.c +++ b/src/string.c @@ -1,23 +1,11 @@ /* - LibCGI - A library to make CGI programs using C - Copyright (C) 2001/2002 Rafael Steil - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - You can contact the author by e-mail: rafael@insanecorp.com -*/ + * LibCGI - A library to make CGI programs using C + * + * Copyright 2001,2002 Rafael Steil + * + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + */ #include #include diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 979542f..f1244b8 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,6 +1,9 @@ # # Copyright 2016–2018 Alexander Dahl # +# SPDX-License-Identifier: LGPL-2.1+ +# License-Filename: LICENSES/LGPL-2.1.txt +# # misc add_executable(cgi-test diff --git a/test/cgi_test.c b/test/cgi_test.c index 6945618..ea1dd82 100644 --- a/test/cgi_test.c +++ b/test/cgi_test.c @@ -1,11 +1,14 @@ /*******************************************************************//** - * @file cgi_test.c + * @file cgi_test.c * * Actual test routines checking stuff we want to check in unit tests. * - * @author Alexander Dahl + * @author Alexander Dahl * - * Copyright 2016 Alexander Dahl + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + * + * @copyright 2016 Alexander Dahl **********************************************************************/ #include "cgi_test.h" diff --git a/test/cgi_test.h b/test/cgi_test.h index 9e8e0b5..587a9ad 100644 --- a/test/cgi_test.h +++ b/test/cgi_test.h @@ -1,13 +1,16 @@ /*******************************************************************//** - * @file cgi_test.h + * @file cgi_test.h * * Macros for test routines, inspired by »Learn C The Hard Way« … * - * @see http://c.learncodethehardway.org/ + * @see http://c.learncodethehardway.org/ * - * @author Alexander Dahl + * @author Alexander Dahl * - * Copyright 2015,2016 Alexander Dahl + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + * + * @copyright 2015,2016 Alexander Dahl **********************************************************************/ #ifndef CGI_TEST_H diff --git a/test/test.c b/test/test.c index 23bc48b..bd1538e 100644 --- a/test/test.c +++ b/test/test.c @@ -1,4 +1,12 @@ -/* test cases for module "cgi.c" */ +/*******************************************************************//** + * test cases for module "cgi.c" + * + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + * + * @copyright 2015 D Frost + * @copyright 2017,2018 Alexander Dahl + **********************************************************************/ #include #include @@ -335,3 +343,5 @@ int unescape_special_chars( void ) error: return EXIT_FAILURE; } + +/* vim: set noet sts=0 ts=4 sw=4 sr: */ diff --git a/test/test_session.c b/test/test_session.c index 9b0e9a4..cc03b3b 100644 --- a/test/test_session.c +++ b/test/test_session.c @@ -5,7 +5,10 @@ * * @author Alexander Dahl * - * @copyright 2017 Alexander Dahl + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + * + * @copyright 2017 Alexander Dahl **********************************************************************/ #include diff --git a/test/test_slist.c b/test/test_slist.c index e3c69a5..dfa92f0 100644 --- a/test/test_slist.c +++ b/test/test_slist.c @@ -1,11 +1,14 @@ /*******************************************************************//** - * @file test_slist.c + * @file test_slist.c * * Test cgi slist implementation. * - * @author Alexander Dahl + * @author Alexander Dahl * - * Copyright 2016 Alexander Dahl + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + * + * @copyright 2016 Alexander Dahl **********************************************************************/ #include diff --git a/test/test_trim.c b/test/test_trim.c index 4eb62c3..8254d3c 100644 --- a/test/test_trim.c +++ b/test/test_trim.c @@ -1,11 +1,14 @@ /*******************************************************************//** - * @file test_trim.c + * @file test_trim.c * * Test different trim implementations. * - * @author Alexander Dahl + * @author Alexander Dahl * - * Copyright 2017 Alexander Dahl + * SPDX-License-Identifier: LGPL-2.1+ + * License-Filename: LICENSES/LGPL-2.1.txt + * + * @copyright 2017 Alexander Dahl **********************************************************************/ #include