Removed unnecessary #include directives

This commit is contained in:
Ingo Ruhnke 2011-01-22 04:13:13 +01:00
parent d6c3039bdc
commit d3c966916a
44 changed files with 52 additions and 205 deletions

1
.gitignore vendored
View file

@ -9,3 +9,4 @@ doc/xboxdrv-daemon.html/
doc/xboxdrv.html/
doc/xboxdrv.ent
custom.py
cache/

View file

@ -16,16 +16,12 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <iomanip>
#include <iostream>
#include <stdexcept>
#include "arg_parser.hpp"
#include <stdio.h>
#include <stdint.h>
#include <boost/format.hpp>
#include "helper.hpp"
#include "pretty_printer.hpp"
#include "arg_parser.hpp"
ArgParser::ArgParser() :
programm(),

View file

@ -16,17 +16,12 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/input.h>
#include <assert.h>
#include "axis_event.hpp"
#include <boost/tokenizer.hpp>
#include <boost/lexical_cast.hpp>
#include <stdlib.h>
#include <iostream>
#include "axis_event.hpp"
#include "evdev_helper.hpp"
#include "uinput.hpp"
#include "uinput_deviceid.hpp"
AxisEventPtr
AxisEvent::invalid()

View file

@ -22,8 +22,6 @@
#include <boost/tokenizer.hpp>
#include <iostream>
#include <math.h>
#include <sstream>
#include <stdexcept>
#include "helper.hpp"

View file

@ -16,23 +16,14 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <boost/lexical_cast.hpp>
#include "button_event.hpp"
#include <boost/tokenizer.hpp>
#include <errno.h>
#include <iostream>
#include <linux/input.h>
#include <memory>
#include <stdexcept>
#include <string.h>
#include <unistd.h>
#include <fstream>
#include "helper.hpp"
#include "button_event.hpp"
#include "evdev_helper.hpp"
#include "uinput.hpp"
#include "uinput_deviceid.hpp"
ButtonEventPtr
ButtonEvent::invalid()

View file

@ -19,7 +19,6 @@
#include "button_filter.hpp"
#include <iostream>
#include <sstream>
#include <boost/tokenizer.hpp>
#include <boost/lexical_cast.hpp>

View file

@ -20,8 +20,6 @@
#include <iostream>
#include <boost/format.hpp>
#include <libusb.h>
#include <string.h>
#include "linux_uinput.hpp"
#include "usb_helper.hpp"

View file

@ -18,28 +18,14 @@
#include "command_line_options.hpp"
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <stdexcept>
#include <boost/bind.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/tokenizer.hpp>
#include <boost/format.hpp>
#include <boost/tokenizer.hpp>
#include "arg_parser.hpp"
#include "button_filter.hpp"
#include "helper.hpp"
#include "ini_parser.hpp"
#include "ini_schema_builder.hpp"
#include "log.hpp"
#include "options.hpp"
#include "uinput_deviceid.hpp"
#include "modifier/square_axis_modifier.hpp"
#include "modifier/four_way_restrictor_modifier.hpp"
#include "modifier/dpad_rotation_modifier.hpp"
#define RAISE_EXCEPTION(x) do { \
std::ostringstream kiJk8f08d4oMX; \

View file

@ -19,7 +19,6 @@
#include "controller_config.hpp"
#include "options.hpp"
#include "uinput_options.hpp"
ControllerConfig::ControllerConfig(uInput& uinput, const ControllerOptions& opts) :
m_modifier(),

View file

@ -18,8 +18,6 @@
#include "controller_config_set.hpp"
#include <assert.h>
ControllerConfigSet::ControllerConfigSet() :
m_config(),
m_current_config(0)

View file

@ -18,15 +18,10 @@
#include "default_message_processor.hpp"
#include <string.h>
#include <iostream>
#include "log.hpp"
#include "options.hpp"
#include "uinput.hpp"
#include "modifier/axismap_modifier.hpp"
#include "modifier/buttonmap_modifier.hpp"
#include "modifier/dpad_rotation_modifier.hpp"
#include "modifier/four_way_restrictor_modifier.hpp"
#include "modifier/square_axis_modifier.hpp"

View file

@ -20,8 +20,9 @@
#define HEADER_XBOXDRV_ENUM_BOX_HPP
#include <map>
#include <string>
#include <sstream>
#include <stdexcept>
#include <string>
template<class Enum>
class EnumBox

View file

@ -19,12 +19,8 @@
#include "evdev_controller.hpp"
#include <boost/format.hpp>
#include <linux/input.h>
#include <stdexcept>
#include <string.h>
#include <iostream>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>

View file

@ -16,18 +16,12 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <X11/Xlib.h>
#include "evdev_helper.hpp"
#include <linux/input.h>
#include <boost/lexical_cast.hpp>
#include <iostream>
#include <sstream>
#include <stdexcept>
#include <map>
#include <ctype.h>
#include "log.hpp"
#include "enum_box.hpp"
#include "evdev_helper.hpp"
EvDevRelEnum evdev_rel_names;
EvDevKeyEnum evdev_key_names;
@ -37,20 +31,20 @@ X11KeysymEnum x11keysym_names;
EvDevRelEnum::EvDevRelEnum() :
EnumBox<int>("EV_REL")
{
#include "rel_list.x"
# include "rel_list.x"
}
EvDevAbsEnum::EvDevAbsEnum() :
EnumBox<int>("EV_ABS")
{
#include "abs_list.x"
# include "abs_list.x"
}
EvDevKeyEnum::EvDevKeyEnum() :
EnumBox<int>("EV_KEY")
{
#include "key_list.x"
# include "key_list.x"
}
X11KeysymEnum::X11KeysymEnum() :

View file

@ -16,15 +16,13 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "firestorm_dual_controller.hpp"
#include <iostream>
#include <errno.h>
#include <stdexcept>
#include <sstream>
#include <string.h>
#include <boost/format.hpp>
#include "helper.hpp"
#include "firestorm_dual_controller.hpp"
#include "usb_helper.hpp"
// 044f:b312

View file

@ -16,11 +16,10 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <iostream>
#include <assert.h>
#include "options.hpp"
#include "force_feedback_handler.hpp"
#include <iostream>
#include "options.hpp"
std::ostream& operator<<(std::ostream& out, const struct ff_envelope& envelope)
{

View file

@ -21,7 +21,6 @@
#include <boost/format.hpp>
#include <fstream>
#include <iostream>
#include <string.h>
#include "usb_helper.hpp"

View file

@ -16,16 +16,14 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "helper.hpp"
#include <iostream>
#include <boost/format.hpp>
#include <boost/tokenizer.hpp>
#include <boost/lexical_cast.hpp>
#include <sys/time.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include "helper.hpp"
void print_raw_data(std::ostream& out, uint8_t* data, int len)
{

View file

@ -18,9 +18,6 @@
#include "ini_parser.hpp"
#include <stdlib.h>
#include <iostream>
#include <ctype.h>
#include <stdexcept>
#include "ini_builder.hpp"

View file

@ -16,21 +16,15 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "linux_uinput.hpp"
#include <boost/format.hpp>
#include <assert.h>
#include <iostream>
#include <sstream>
#include <stdexcept>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "evdev_helper.hpp"
#include "force_feedback_handler.hpp"
#include "linux_uinput.hpp"
LinuxUinput::LinuxUinput(DeviceType device_type, const std::string& name_, uint16_t vendor_, uint16_t product_) :
m_device_type(device_type),

View file

@ -18,8 +18,6 @@
#include "log.hpp"
#include <sstream>
std::string log_pretty_print(const std::string& str)
{
// FIXME: very basic, might not work with complex return types

View file

@ -20,6 +20,7 @@
#define HEADER_XBOXDRV_LOG_HPP
#include <iostream>
#include <string>
/** Takes __PRETTY_FUNCTION__ and tries to shorten it to the form:
Classname::function() */

View file

@ -19,10 +19,7 @@
#include "modifier.hpp"
#include <boost/tokenizer.hpp>
#include <vector>
#include "modifier/axismap_modifier.hpp"
#include "modifier/buttonmap_modifier.hpp"
#include "modifier/dpad_rotation_modifier.hpp"
#include "modifier/four_way_restrictor_modifier.hpp"
#include "modifier/square_axis_modifier.hpp"

View file

@ -19,7 +19,6 @@
#include "axismap_modifier.hpp"
#include <boost/tokenizer.hpp>
#include <memory>
#include <sstream>
/** converts the arbitary range to [-1,1] */

View file

@ -20,8 +20,6 @@
#include <stdexcept>
#include <boost/lexical_cast.hpp>
#include "xboxmsg.hpp"
DpadRotationModifier*
DpadRotationModifier::from_string(const std::vector<std::string>& args)

View file

@ -16,11 +16,9 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <iostream>
#include <iostream>
#include "helper.hpp"
#include "pretty_printer.hpp"
#include <iostream>
PrettyPrinter::PrettyPrinter(int terminal_width_)
: terminal_width(terminal_width_)

View file

@ -16,15 +16,11 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <iostream>
#include <errno.h>
#include <stdexcept>
#include "saitek_p2500_controller.hpp"
#include <sstream>
#include <string.h>
#include <boost/format.hpp>
#include "helper.hpp"
#include "saitek_p2500_controller.hpp"
#include "usb_helper.hpp"
struct SaitekP2500Msg

View file

@ -16,22 +16,9 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <algorithm>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <stdexcept>
#include <iostream>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/input.h>
#include <linux/uinput.h>
#include "xboxmsg.hpp"
#include "uinput.hpp"
#include "uinput_deviceid.hpp"
#include <iostream>
bool
uInput::is_mouse_button(int ev_code)

View file

@ -18,11 +18,9 @@
#include "uinput_config.hpp"
#include <linux/input.h>
#include <iostream>
#include "uinput.hpp"
#include "uinput_options.hpp"
UInputConfig::UInputConfig(uInput& uinput, const UInputOptions& opts) :
m_uinput(uinput),

View file

@ -16,10 +16,9 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/input.h>
#include "uinput_deviceid.hpp"
#include "uinput.hpp"
#include "uinput_deviceid.hpp"
UIEvent
UIEvent::create(int device_id, int type, int code)

View file

@ -16,12 +16,11 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <boost/tokenizer.hpp>
#include <iostream>
#include <linux/input.h>
#include "uinput_options.hpp"
#include <boost/tokenizer.hpp>
#include <linux/input.h>
UInputOptions::UInputOptions() :
device_name("Xbox Gamepad (userspace driver)"),
force_feedback(false),

View file

@ -19,7 +19,6 @@
#include "usb_helper.hpp"
#include <libusb.h>
#include <errno.h>
int usb_claim_n_detach_interface(libusb_device_handle* handle, int interface, bool try_detach)
{

View file

@ -16,16 +16,12 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <boost/thread/thread.hpp>
#include <boost/bind.hpp>
#include "usb_read_thread.hpp"
#include <string.h>
#include <libusb.h>
#include <iostream>
#include "log.hpp"
#include "usb_helper.hpp"
#include "usb_read_thread.hpp"
USBReadThread::USBReadThread(libusb_device_handle* handle, int endpoint, int len) :
m_handle(handle),

View file

@ -25,6 +25,7 @@
#include <boost/thread/condition.hpp>
#include <boost/shared_array.hpp>
#include <queue>
#include <libusb.h>
// FIXME: USBReadThread was created for libusb-0.1, as we where losing
// events otherwise for some reason, might no longer be needed with

View file

@ -16,22 +16,15 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <stdexcept>
#include <sstream>
#include "xbox360_controller.hpp"
#include <iostream>
#include <fstream>
#include <boost/format.hpp>
#include "chatpad.hpp"
#include "headset.hpp"
#include "helper.hpp"
#include "options.hpp"
#include "usb_helper.hpp"
#include "xbox360_controller.hpp"
#include "xboxmsg.hpp"
Xbox360Controller::Xbox360Controller(libusb_device* dev_,
bool chatpad, bool chatpad_no_init, bool chatpad_debug,

View file

@ -20,6 +20,9 @@
#define HEADER_XBOX360_CONTROLLER_HPP
#include <libusb.h>
#include <memory>
#include <string>
#include "xbox_generic_controller.hpp"
class Chatpad;

View file

@ -16,18 +16,14 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libusb.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include "xbox360_wireless_controller.hpp"
#include <sstream>
#include <iostream>
#include <boost/format.hpp>
#include <stdexcept>
#include "helper.hpp"
#include "usb_helper.hpp"
#include "xbox360_wireless_controller.hpp"
#include "xboxmsg.hpp"
Xbox360WirelessController::Xbox360WirelessController(libusb_device* dev_, int controller_id,

View file

@ -19,6 +19,9 @@
#ifndef HEADER_XBOX360_WIRELESS_CONTROLLER_HPP
#define HEADER_XBOX360_WIRELESS_CONTROLLER_HPP
#include <libusb.h>
#include <string>
#include "xbox_generic_controller.hpp"
struct XboxGenericMsg;

View file

@ -16,16 +16,15 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <errno.h>
#include "xbox_controller.hpp"
#include <iostream>
#include <libusb.h>
#include <sstream>
#include <stdexcept>
#include <string.h>
#include "usb_helper.hpp"
#include "xboxmsg.hpp"
#include "xbox_controller.hpp"
XboxController::XboxController(libusb_device* dev_, bool try_detach) :
dev(dev_),

View file

@ -20,7 +20,6 @@
#include <stdexcept>
#include "options.hpp"
#include "xbox360_controller.hpp"
#include "xbox360_wireless_controller.hpp"
#include "saitek_p2500_controller.hpp"

View file

@ -18,40 +18,18 @@
#include "xboxdrv.hpp"
#include <boost/bind.hpp>
#include <boost/format.hpp>
#include <boost/function.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/scoped_array.hpp>
#include <ctype.h>
#include <errno.h>
#include <fstream>
#include <iostream>
#include <libusb.h>
#include <math.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
#include "command_line_options.hpp"
#include "default_message_processor.hpp"
#include "evdev_controller.hpp"
#include "evdev_helper.hpp"
#include "helper.hpp"
#include "log.hpp"
#include "options.hpp"
#include "uinput.hpp"
#include "word_wrap.hpp"
#include "xbox_controller_factory.hpp"
#include "xbox_generic_controller.hpp"
#include "xboxdrv_daemon.hpp"
#include "xboxdrv_thread.hpp"
#include "xboxmsg.hpp"
// Some ugly global variables, needed for sigint catching
bool global_exit_xboxdrv = false;

View file

@ -18,25 +18,15 @@
#include "xboxdrv_daemon.hpp"
#include <algorithm>
#include <assert.h>
#include <boost/bind.hpp>
#include <boost/format.hpp>
#include <boost/lexical_cast.hpp>
#include <fstream>
#include <iostream>
#include <stdexcept>
#include <stdio.h>
#include <string.h>
#include "default_message_processor.hpp"
#include "log.hpp"
#include "options.hpp"
#include "uinput.hpp"
#include "usb_helper.hpp"
#include "xbox_controller_factory.hpp"
#include "xboxdrv_thread.hpp"
#include "xpad_device.hpp"
extern bool global_exit_xboxdrv;

View file

@ -18,21 +18,11 @@
#include "xboxdrv_thread.hpp"
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <errno.h>
#include <iostream>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <vector>
#include <assert.h>
#include "controller_config.hpp"
#include "helper.hpp"
#include "log.hpp"
#include "modifier.hpp"
#include "options.hpp"
#include "uinput.hpp"
#include "xbox_generic_controller.hpp"
#include "message_processor.hpp"

View file

@ -16,14 +16,12 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include "xboxmsg.hpp"
#include <boost/format.hpp>
#include <iostream>
#include <algorithm>
#include "helper.hpp"
#include "options.hpp"
#include "xboxmsg.hpp"
std::string gamepadtype_to_string(const GamepadType& type)
{