cmdline: convert to C++
This commit is contained in:
@@ -68,7 +68,6 @@ mpd_headers = \
|
|||||||
src/filter/volume_filter_plugin.h \
|
src/filter/volume_filter_plugin.h \
|
||||||
src/command.h \
|
src/command.h \
|
||||||
src/idle.h \
|
src/idle.h \
|
||||||
src/cmdline.h \
|
|
||||||
src/conf.h \
|
src/conf.h \
|
||||||
src/crossfade.h \
|
src/crossfade.h \
|
||||||
src/decoder_control.h \
|
src/decoder_control.h \
|
||||||
@@ -202,7 +201,7 @@ src_mpd_SOURCES = \
|
|||||||
src/MessageCommands.cxx src/MessageCommands.hxx \
|
src/MessageCommands.cxx src/MessageCommands.hxx \
|
||||||
src/OtherCommands.cxx src/OtherCommands.hxx \
|
src/OtherCommands.cxx src/OtherCommands.hxx \
|
||||||
src/idle.c \
|
src/idle.c \
|
||||||
src/cmdline.c \
|
src/CommandLine.cxx src/CommandLine.hxx \
|
||||||
src/conf.c \
|
src/conf.c \
|
||||||
src/crossfade.c \
|
src/crossfade.c \
|
||||||
src/cue/cue_parser.c src/cue/cue_parser.h \
|
src/cue/cue_parser.c src/cue/cue_parser.h \
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2011 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -18,10 +18,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "cmdline.h"
|
#include "CommandLine.hxx"
|
||||||
#include "path.h"
|
#include "path.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
|
#include "ls.h"
|
||||||
|
}
|
||||||
|
|
||||||
#include "decoder_list.h"
|
#include "decoder_list.h"
|
||||||
#include "decoder_plugin.h"
|
#include "decoder_plugin.h"
|
||||||
#include "output_list.h"
|
#include "output_list.h"
|
||||||
@@ -30,7 +35,6 @@
|
|||||||
#include "input_plugin.h"
|
#include "input_plugin.h"
|
||||||
#include "playlist_list.h"
|
#include "playlist_list.h"
|
||||||
#include "playlist_plugin.h"
|
#include "playlist_plugin.h"
|
||||||
#include "ls.h"
|
|
||||||
#include "mpd_error.h"
|
#include "mpd_error.h"
|
||||||
#include "glib_compat.h"
|
#include "glib_compat.h"
|
||||||
|
|
||||||
@@ -159,7 +163,7 @@ parse_cmdline(int argc, char **argv, struct options *options,
|
|||||||
"verbose logging", NULL },
|
"verbose logging", NULL },
|
||||||
{ "version", 'V', 0, G_OPTION_ARG_NONE, &option_version,
|
{ "version", 'V', 0, G_OPTION_ARG_NONE, &option_version,
|
||||||
"print version number", NULL },
|
"print version number", NULL },
|
||||||
{ .long_name = NULL }
|
{ nullptr, 0, 0, G_OPTION_ARG_NONE, nullptr, nullptr, nullptr }
|
||||||
};
|
};
|
||||||
|
|
||||||
options->kill = false;
|
options->kill = false;
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2011 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -17,13 +17,11 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CMDLINE_H
|
#ifndef MPD_COMMAND_LINE_HXX
|
||||||
#define CMDLINE_H
|
#define MPD_COMMAND_LINE_HXX
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
struct options {
|
struct options {
|
||||||
gboolean kill;
|
gboolean kill;
|
||||||
gboolean daemon;
|
gboolean daemon;
|
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "Main.hxx"
|
#include "Main.hxx"
|
||||||
|
#include "CommandLine.hxx"
|
||||||
#include "PlaylistFile.hxx"
|
#include "PlaylistFile.hxx"
|
||||||
#include "UpdateGlue.hxx"
|
#include "UpdateGlue.hxx"
|
||||||
#include "chunk.h"
|
#include "chunk.h"
|
||||||
@@ -38,7 +39,6 @@ extern "C" {
|
|||||||
#include "io_thread.h"
|
#include "io_thread.h"
|
||||||
#include "idle.h"
|
#include "idle.h"
|
||||||
#include "playlist.h"
|
#include "playlist.h"
|
||||||
#include "cmdline.h"
|
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
#include "path.h"
|
#include "path.h"
|
||||||
#include "player_control.h"
|
#include "player_control.h"
|
||||||
|
Reference in New Issue
Block a user