summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2011-03-10 23:54:16 +0100
committerUoti Urpala <uau@mplayer2.org>2011-04-20 04:22:53 +0300
commitd10b54fc2e1a669146541a8d17f0a36b3e22a405 (patch)
treefdb04079614fd431cd002bd3a369ccbc1e2ea869
parent79bb5650388883cbfe7a0fbae19aaf493d0f5118 (diff)
downloadmpv-d10b54fc2e1a669146541a8d17f0a36b3e22a405.tar.bz2
mpv-d10b54fc2e1a669146541a8d17f0a36b3e22a405.tar.xz
config: remove pointless cfg-mplayer-def.h file
-rw-r--r--cfg-mplayer-def.h28
-rw-r--r--mplayer.c6
2 files changed, 3 insertions, 31 deletions
diff --git a/cfg-mplayer-def.h b/cfg-mplayer-def.h
deleted file mode 100644
index 720b800ca4..0000000000
--- a/cfg-mplayer-def.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This file is part of MPlayer.
- *
- * MPlayer 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.
- *
- * MPlayer 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.
- *
- * You should have received a copy of the GNU General Public License along
- * with MPlayer; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#ifndef MPLAYER_CFG_MPLAYER_DEF_H
-#define MPLAYER_CFG_MPLAYER_DEF_H
-
-static char* default_config=
-"# Write your default config options here!\n"
-"\n"
-//"nosound=nem"
-"\n";
-
-#endif /* MPLAYER_CFG_MPLAYER_DEF_H */
diff --git a/mplayer.c b/mplayer.c
index b801999762..a9220797e0 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -67,8 +67,6 @@
#include "access_mpcontext.h"
#include "m_property.h"
-#include "cfg-mplayer-def.h"
-
#include "libavutil/avstring.h"
#include "sub/subreader.h"
@@ -879,6 +877,8 @@ static int cfg_include(m_option_t *conf, char *filename)
return m_config_parse_config_file(conf->priv, filename);
}
+#define DEF_CONFIG "# Write your default config options here!\n\n\n"
+
static void parse_cfgfiles(struct MPContext *mpctx, m_config_t* conf)
{
struct MPOpts *opts = &mpctx->opts;
@@ -901,7 +901,7 @@ if ((conffile = get_path("")) == NULL) {
} else {
if ((conffile_fd = open(conffile, O_CREAT | O_EXCL | O_WRONLY, 0666)) != -1) {
mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"Creating config file: %s\n", conffile);
- write(conffile_fd, default_config, strlen(default_config));
+ write(conffile_fd, DEF_CONFIG, sizeof(DEF_CONFIG) - 1);
close(conffile_fd);
}
if (!(opts->noconfig & 1) &&