diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ClientPattern.cc | 2 | ||||
-rw-r--r-- | src/CommandParser.cc | 26 | ||||
-rw-r--r-- | src/FbTk/StringUtil.hh | 2 | ||||
-rw-r--r-- | src/Keys.cc | 2 |
4 files changed, 12 insertions, 20 deletions
diff --git a/src/ClientPattern.cc b/src/ClientPattern.cc index 93f0000..fd9ab9d 100644 --- a/src/ClientPattern.cc +++ b/src/ClientPattern.cc | |||
@@ -24,8 +24,8 @@ | |||
24 | 24 | ||
25 | #include "ClientPattern.hh" | 25 | #include "ClientPattern.hh" |
26 | #include "RegExp.hh" | 26 | #include "RegExp.hh" |
27 | #include "StringUtil.hh" | ||
28 | #include "WinClient.hh" | 27 | #include "WinClient.hh" |
28 | #include "FbTk/StringUtil.hh" | ||
29 | #include "FbTk/App.hh" | 29 | #include "FbTk/App.hh" |
30 | 30 | ||
31 | // use GNU extensions | 31 | // use GNU extensions |
diff --git a/src/CommandParser.cc b/src/CommandParser.cc index 582fa44..d4c6a28 100644 --- a/src/CommandParser.cc +++ b/src/CommandParser.cc | |||
@@ -23,22 +23,14 @@ | |||
23 | // $Id$ | 23 | // $Id$ |
24 | 24 | ||
25 | #include "CommandParser.hh" | 25 | #include "CommandParser.hh" |
26 | 26 | #include "FbTk/StringUtil.hh" | |
27 | #include "StringUtil.hh" | ||
28 | 27 | ||
29 | #include <vector> | 28 | #include <vector> |
30 | using namespace std; | ||
31 | |||
32 | namespace { | ||
33 | |||
34 | string::size_type removeFirstWhitespace(std::string &str) { | ||
35 | string::size_type first_pos = str.find_first_not_of(" \t"); | ||
36 | if (first_pos != string::npos) | ||
37 | str.erase(0, first_pos); | ||
38 | return first_pos; | ||
39 | } | ||
40 | 29 | ||
41 | }; // end anonymous namespace | 30 | using std::string; |
31 | using std::vector; | ||
32 | using FbTk::StringUtil::removeFirstWhitespace; | ||
33 | using FbTk::StringUtil::toLower; | ||
42 | 34 | ||
43 | CommandFactory::CommandFactory() { | 35 | CommandFactory::CommandFactory() { |
44 | 36 | ||
@@ -49,7 +41,7 @@ CommandFactory::~CommandFactory() { | |||
49 | CommandParser::instance().removeAssociation(*this); | 41 | CommandParser::instance().removeAssociation(*this); |
50 | } | 42 | } |
51 | 43 | ||
52 | void CommandFactory::addCommand(const std::string &command_name) { | 44 | void CommandFactory::addCommand(const string &command_name) { |
53 | CommandParser::instance().associateCommand(command_name, *this); | 45 | CommandParser::instance().associateCommand(command_name, *this); |
54 | } | 46 | } |
55 | 47 | ||
@@ -58,7 +50,7 @@ CommandParser &CommandParser::instance() { | |||
58 | return singleton; | 50 | return singleton; |
59 | } | 51 | } |
60 | 52 | ||
61 | FbTk::Command *CommandParser::parseLine(const std::string &line) { | 53 | FbTk::Command *CommandParser::parseLine(const string &line) { |
62 | 54 | ||
63 | // parse arguments and command | 55 | // parse arguments and command |
64 | string command = line; | 56 | string command = line; |
@@ -74,7 +66,7 @@ FbTk::Command *CommandParser::parseLine(const std::string &line) { | |||
74 | 66 | ||
75 | // now we have parsed command and arguments | 67 | // now we have parsed command and arguments |
76 | 68 | ||
77 | command = FbTk::StringUtil::toLower(command); | 69 | command = toLower(command); |
78 | 70 | ||
79 | // we didn't find any matching command in default commands, | 71 | // we didn't find any matching command in default commands, |
80 | // so we search in the command creators modules for a | 72 | // so we search in the command creators modules for a |
@@ -100,7 +92,7 @@ void CommandParser::associateCommand(const std::string &command, CommandFactory | |||
100 | 92 | ||
101 | void CommandParser::removeAssociation(CommandFactory &factory) { | 93 | void CommandParser::removeAssociation(CommandFactory &factory) { |
102 | // commands that are associated with the factory | 94 | // commands that are associated with the factory |
103 | std::vector<std::string> commands; | 95 | vector<string> commands; |
104 | // find associations | 96 | // find associations |
105 | CommandFactoryMap::iterator factory_it = m_commandfactorys.begin(); | 97 | CommandFactoryMap::iterator factory_it = m_commandfactorys.begin(); |
106 | const CommandFactoryMap::iterator factory_it_end = m_commandfactorys.end(); | 98 | const CommandFactoryMap::iterator factory_it_end = m_commandfactorys.end(); |
diff --git a/src/FbTk/StringUtil.hh b/src/FbTk/StringUtil.hh index 2b0a930..3112a9d 100644 --- a/src/FbTk/StringUtil.hh +++ b/src/FbTk/StringUtil.hh | |||
@@ -1,5 +1,5 @@ | |||
1 | // StringUtil.hh for fluxbox | 1 | // StringUtil.hh for fluxbox |
2 | // Copyright (c) 2001 - 2004 Henrik Kinnunen (fluxgen at fluxbox dot org) | 2 | // Copyright (c) 2001 - 2005 Henrik Kinnunen (fluxgen at fluxbox dot org) |
3 | // | 3 | // |
4 | // Permission is hereby granted, free of charge, to any person obtaining a | 4 | // Permission is hereby granted, free of charge, to any person obtaining a |
5 | // copy of this software and associated documentation files (the "Software"), | 5 | // copy of this software and associated documentation files (the "Software"), |
diff --git a/src/Keys.cc b/src/Keys.cc index e3e47cb..96f57cb 100644 --- a/src/Keys.cc +++ b/src/Keys.cc | |||
@@ -1,5 +1,5 @@ | |||
1 | // Keys.cc for Fluxbox - an X11 Window manager | 1 | // Keys.cc for Fluxbox - an X11 Window manager |
2 | // Copyright (c) 2001 - 2003 Henrik Kinnunen (fluxgen at fluxbox dot org) | 2 | // Copyright (c) 2001 - 2005 Henrik Kinnunen (fluxgen at fluxbox dot org) |
3 | // | 3 | // |
4 | // Permission is hereby granted, free of charge, to any person obtaining a | 4 | // Permission is hereby granted, free of charge, to any person obtaining a |
5 | // copy of this software and associated documentation files (the "Software"), | 5 | // copy of this software and associated documentation files (the "Software"), |