Subversion Repositories public

Rev

Rev 100 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 100 Rev 108
Line 3... Line 3...
3
/**
3
/**
4
 * \file incroncfg.cpp
4
 * \file incroncfg.cpp
5
 *
5
 *
6
 * incron configuration
6
 * incron configuration
7
 *
7
 *
8
 * Copyright (C) 2007, 2008 Lukas Jelinek, <lukas@aiken.cz>
8
 * Copyright (C) 2007, 2008, 2012 Lukas Jelinek, <lukas@aiken.cz>
9
 *
9
 *
10
 * This program is free software; you can use it, redistribute
10
 * This program is free software; you can use it, redistribute
11
 * it and/or modify it under the terms of the GNU General Public
11
 * it and/or modify it under the terms of the GNU General Public
12
 * License, version 2 (see LICENSE-GPL).
12
 * License, version 2 (see LICENSE-GPL).
13
 *  
13
 *  
-
 
14
 * Credits:
-
 
15
 *   Christian Ruppert (new include to build with GCC 4.4+)
-
 
16
 *
14
 */
17
 */
15
18
16
19
17
#include <fstream>
20
#include <fstream>
18
#include <sstream>
21
#include <sstream>
Line 179... Line 182...
179
  return true;
182
  return true;
180
}
183
}
181
184
182
bool IncronCfg::IsComment(const char* s)
185
bool IncronCfg::IsComment(const char* s)
183
{
186
{
184
  char* sx = strchr(s, '#');
187
  const char* sx = strchr(s, '#'); // 
185
  if (sx == NULL)
188
  if (sx == NULL)
186
    return false;
189
    return false;
187
   
190
   
188
  size_t len = sx - s;
191
  size_t len = sx - s;
189
  for (size_t i = 0; i < len; i++) {
192
  for (size_t i = 0; i < len; i++) {