~ubuntu-branches/ubuntu/trusty/frog/trusty

« back to all changes in this revision

Viewing changes to src/Configuration.cxx

  • Committer: Package Import Robot
  • Author(s): Joost van Baal-Ilić
  • Date: 2013-03-05 12:12:59 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20130305121259-07lzsvg4e1ipr1js
Tags: 0.12.16-4
* debian/changelog: cosmetics.
* debian/control: more strict build-depends: libmbt0-dev from 3.2.8 to
  3.2.9; libtimblserver2-dev from 1.4 to 1.6.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <map>
30
30
#include <fstream>
31
31
#include <iostream>
32
 
#include "timbl/StringOps.h"
 
32
#include <stdexcept>
 
33
#include "ticcutils/StringOps.h"
33
34
#include "frog/Configuration.h"
34
35
 
35
36
 
101
102
  string inLine;
102
103
  string section = "global";
103
104
  while ( getline( is, inLine ) ){
104
 
    string line = Timbl::compress(inLine);
 
105
    string line = TiCC::trim(inLine);
105
106
    if ( line.empty() )
106
107
      continue;
107
108
    if ( line[0] == '#' )
118
119
      }
119
120
    else {
120
121
      vector<string> parts;
121
 
      int num = Timbl::split_at( line, parts, "=" );
 
122
      int num = TiCC::split_at( line, parts, "=" );
122
123
      if ( num == 2 ){
123
124
        string val = parts[1];
124
125
        if ( val[0] == '"' && val[val.length()-1] == '"' )
149
150
  string localsection;
150
151
  //  cerr << "looking for section = " << section << endl;
151
152
  while ( getline( is, inLine ) ){
152
 
    string line = Timbl::compress(inLine);
 
153
    string line = TiCC::trim(inLine);
153
154
    if ( line.empty() )
154
155
      continue;
155
156
    if ( line[0] == '#' )
167
168
    else if ( localsection == section ){
168
169
      found = true;
169
170
      vector<string> parts;
170
 
      int num = Timbl::split_at( line, parts, "=" );
 
171
      int num = TiCC::split_at( line, parts, "=" );
171
172
      if ( num == 2 ){
172
173
        string val = parts[1];
173
174
        if ( val[0] == '"' && val[val.length()-1] == '"' )