diff options
-rw-r--r-- | cfg-mplayer-def.h | 28 | ||||
-rw-r--r-- | mplayer.c | 6 |
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 */ @@ -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) && |