summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/configuration.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib/configuration.cc')
-rw-r--r--apt-pkg/contrib/configuration.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index 2d1dee22d..0949ec223 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -15,16 +15,19 @@
##################################################################### */
/*}}}*/
// Include files /*{{{*/
+#include <config.h>
+
#include <apt-pkg/configuration.h>
#include <apt-pkg/error.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/fileutl.h>
-#include <apti18n.h>
#include <vector>
#include <fstream>
#include <iostream>
+#include <apti18n.h>
+
using namespace std;
/*}}}*/
@@ -672,9 +675,9 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool const &AsSectio
// Put the last fragment into the buffer
std::string::const_iterator NonWhitespaceStart = Start;
std::string::const_iterator NonWhitespaceStop = I;
- for (; NonWhitespaceStart != I && isspace(*NonWhitespaceStart) != 0; NonWhitespaceStart++)
+ for (; NonWhitespaceStart != I && isspace(*NonWhitespaceStart) != 0; ++NonWhitespaceStart)
;
- for (; NonWhitespaceStop != NonWhitespaceStart && isspace(NonWhitespaceStop[-1]) != 0; NonWhitespaceStop--)
+ for (; NonWhitespaceStop != NonWhitespaceStart && isspace(NonWhitespaceStop[-1]) != 0; --NonWhitespaceStop)
;
if (LineBuffer.empty() == false && NonWhitespaceStop - NonWhitespaceStart != 0)
LineBuffer += ' ';
@@ -850,7 +853,7 @@ bool ReadConfigDir(Configuration &Conf,const string &Dir,
vector<string> const List = GetListOfFilesInDir(Dir, "conf", true, true);
// Read the files
- for (vector<string>::const_iterator I = List.begin(); I != List.end(); I++)
+ for (vector<string>::const_iterator I = List.begin(); I != List.end(); ++I)
if (ReadConfigFile(Conf,*I,AsSectional,Depth) == false)
return false;
return true;