From eb22569ff082bd3e8b32d78d0ac050568ab8b130 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 12 Jun 2017 20:55:17 +0200 Subject: options: change license of most files to LGPL (except options.c/.h) All authors of the current code have agreed (as far as this commit requires). options.c/options.h will take more effort, because it contains all the option declarations, and thus is touched extremely often. m_option.c is technically still GPL, because of commit 2c82d5a1d85378dd0 (michael has agreed to LGPL, but only once the core of mpv is LGPL). The geometry parsing code in m_option.c was originally by someone who could not be reached. However, it was heavily rewritten anyway, and only the syntax remains (i.e. not copyright-relevant). parse_commandline.c contains a change by "adland" (commit 1d0ac71ae8ba), who could not be reached - this this specific part is GPL only. Fortunately, it matters only for DVD (and even then is more like a hack, but whatever). There are some other relevant changes, but they have all been reverted, moved somewhere else, deleted, or replaced. --- options/m_config.c | 14 +++++++------- options/m_config.h | 14 +++++++------- options/m_option.c | 2 ++ options/m_option.h | 14 +++++++------- options/parse_commandline.c | 24 ++++++++++++++---------- options/parse_commandline.h | 14 +++++++------- options/parse_configfile.c | 14 +++++++------- options/parse_configfile.h | 14 +++++++------- 8 files changed, 58 insertions(+), 52 deletions(-) (limited to 'options') diff --git a/options/m_config.c b/options/m_config.c index 16a0b38eb1..b6e1720f39 100644 --- a/options/m_config.c +++ b/options/m_config.c @@ -1,18 +1,18 @@ /* * This file is part of mpv. * - * mpv is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * mpv 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. * * mpv 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 General Public License for more details. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with mpv. If not, see . + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see . */ /// \file diff --git a/options/m_config.h b/options/m_config.h index 1e199cacd9..ff2dcf14a6 100644 --- a/options/m_config.h +++ b/options/m_config.h @@ -1,18 +1,18 @@ /* * This file is part of mpv. * - * mpv is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * mpv 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. * * mpv 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 General Public License for more details. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with mpv. If not, see . + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see . */ #ifndef MPLAYER_M_CONFIG_H diff --git a/options/m_option.c b/options/m_option.c index cdabfe65a9..a7bf05cec5 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -13,6 +13,8 @@ * * You should have received a copy of the GNU General Public License along * with mpv. If not, see . + * + * Almost LGPL. */ /// \file diff --git a/options/m_option.h b/options/m_option.h index d4a795a834..8f4e5e6a5c 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -1,18 +1,18 @@ /* * This file is part of mpv. * - * mpv is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * mpv 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. * * mpv 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 General Public License for more details. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with mpv. If not, see . + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see . */ #ifndef MPLAYER_M_OPTION_H diff --git a/options/parse_commandline.c b/options/parse_commandline.c index f51d19deff..f65af9e41e 100644 --- a/options/parse_commandline.c +++ b/options/parse_commandline.c @@ -1,18 +1,18 @@ /* * This file is part of mpv. * - * mpv is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * mpv 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. * * mpv 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 General Public License for more details. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with mpv. If not, see . + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see . */ #include @@ -22,6 +22,8 @@ #include #include +#include "config.h" + #include "osdep/io.h" #include "common/global.h" #include "common/msg.h" @@ -35,9 +37,6 @@ #define GLOBAL 0 #define LOCAL 1 -#define dvd_range(a) (a >= 0 && a < 255) - - struct parse_state { struct m_config *config; char **argv; @@ -224,6 +223,7 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files, void *tmp = talloc_new(NULL); bstr file = p.arg; char *file0 = bstrdup0(tmp, p.arg); +#if HAVE_GPL // expand DVD filename entries like dvd://1-3 into component titles if (bstr_startswith0(file, "dvd://")) { int offset = 6; @@ -239,6 +239,7 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files, } else end_title = strtol(splitpos + 1, &endpos, 10); + #define dvd_range(a) (a >= 0 && a < 255) if (dvd_range(start_title) && dvd_range(end_title) && (start_title < end_title)) { for (int j = start_title; j <= end_title; j++) { @@ -254,6 +255,9 @@ int m_config_parse_mp_command_line(m_config_t *config, struct playlist *files, } else { process_non_option(files, file0); } +#else + process_non_option(files, file0); +#endif talloc_free(tmp); } } diff --git a/options/parse_commandline.h b/options/parse_commandline.h index 6624b58022..8c39047814 100644 --- a/options/parse_commandline.h +++ b/options/parse_commandline.h @@ -1,18 +1,18 @@ /* * This file is part of mpv. * - * mpv is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * mpv 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. * * mpv 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 General Public License for more details. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with mpv. If not, see . + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see . */ #ifndef MPLAYER_PARSER_MPCMD_H diff --git a/options/parse_configfile.c b/options/parse_configfile.c index 0ef80082d4..14b30e87b4 100644 --- a/options/parse_configfile.c +++ b/options/parse_configfile.c @@ -1,18 +1,18 @@ /* * This file is part of mpv. * - * mpv is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * mpv 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. * * mpv 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 General Public License for more details. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with mpv. If not, see . + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see . */ #include "config.h" diff --git a/options/parse_configfile.h b/options/parse_configfile.h index 9bbaf620d1..f023c20e85 100644 --- a/options/parse_configfile.h +++ b/options/parse_configfile.h @@ -1,18 +1,18 @@ /* * This file is part of mpv. * - * mpv is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * mpv 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. * * mpv 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 General Public License for more details. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with mpv. If not, see . + * You should have received a copy of the GNU Lesser General Public + * License along with mpv. If not, see . */ #ifndef MPLAYER_PARSER_CFG_H -- cgit v1.2.3