aboutsummaryrefslogtreecommitdiff
path: root/src/Keys.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-06-30 20:59:28 (GMT)
committerfluxgen <fluxgen>2003-06-30 20:59:28 (GMT)
commit785b3f955f909865445f6b92f7daac1a14d2595c (patch)
treede48e0991815b2e1b21c67da30cf9a9b210d1b57 /src/Keys.cc
parentda2fe66b59bbb0051a3a1c11190fd6e49cc75f23 (diff)
downloadfluxbox-785b3f955f909865445f6b92f7daac1a14d2595c.zip
fluxbox-785b3f955f909865445f6b92f7daac1a14d2595c.tar.bz2
some extra checking
Diffstat (limited to 'src/Keys.cc')
-rw-r--r--src/Keys.cc23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/Keys.cc b/src/Keys.cc
index e6105aa..f25eb4a 100644
--- a/src/Keys.cc
+++ b/src/Keys.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22//$Id: Keys.cc,v 1.33 2003/06/30 19:42:20 fluxgen Exp $ 22//$Id: Keys.cc,v 1.34 2003/06/30 20:59:28 fluxgen Exp $
23 23
24 24
25#include "Keys.hh" 25#include "Keys.hh"
@@ -194,19 +194,22 @@ bool Keys::load(const char *filename) {
194 const char *str = 194 const char *str =
195 FbTk::StringUtil::strcasestr(linebuffer.c_str(), 195 FbTk::StringUtil::strcasestr(linebuffer.c_str(),
196 val[argc].c_str() + 1); // +1 to skip ':' 196 val[argc].c_str() + 1); // +1 to skip ':'
197 197 if (str == 0) {
198 // +1 to remove the first ':'
199 last_key->m_command = CommandParser::instance().parseLine(str);
200
201 if (*last_key->m_command == 0) {
202 cerr<<"File: "<<filename<<". Error on line: "<<line<<endl; 198 cerr<<"File: "<<filename<<". Error on line: "<<line<<endl;
203 cerr<<"> "<<linebuffer<<endl; 199 cerr<<"> "<<linebuffer<<endl;
204 } else { 200 } else {
205 // Add the keychain to list 201
206 if (!mergeTree(current_key)) 202 last_key->m_command = CommandParser::instance().parseLine(str);
207 cerr<<"Keys: Failed to merge keytree!"<<endl; 203
204 if (*last_key->m_command == 0) {
205 cerr<<"File: "<<filename<<". Error on line: "<<line<<endl;
206 cerr<<"> "<<linebuffer<<endl;
207 } else {
208 // Add the keychain to list
209 if (!mergeTree(current_key))
210 cerr<<"Keys: Failed to merge keytree!"<<endl;
211 }
208 } 212 }
209
210 delete current_key; 213 delete current_key;
211 current_key = 0; 214 current_key = 0;
212 last_key = 0; 215 last_key = 0;