summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-06-12 20:55:17 +0200
committerwm4 <wm4@nowhere>2017-06-12 20:55:17 +0200
commiteb22569ff082bd3e8b32d78d0ac050568ab8b130 (patch)
tree5072a8da5dede2e27c4c5b36bb02a4861a0f11e3 /options
parent26a173f40c460bb642108d9fffd1255fe3f37520 (diff)
downloadmpv-eb22569ff082bd3e8b32d78d0ac050568ab8b130.tar.bz2
mpv-eb22569ff082bd3e8b32d78d0ac050568ab8b130.tar.xz
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.
Diffstat (limited to 'options')
-rw-r--r--options/m_config.c14
-rw-r--r--options/m_config.h14
-rw-r--r--options/m_option.c2
-rw-r--r--options/m_option.h14
-rw-r--r--options/parse_commandline.c24
-rw-r--r--options/parse_commandline.h14
-rw-r--r--options/parse_configfile.c14
-rw-r--r--options/parse_configfile.h14
8 files changed, 58 insertions, 52 deletions
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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
/// \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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#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 <http://www.gnu.org/licenses/>.
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
@@ -22,6 +22,8 @@
#include <assert.h>
#include <stdbool.h>
+#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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#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 <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MPLAYER_PARSER_CFG_H