summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/configuration.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:57:57 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:57:57 +0000
commit851a45a85fa486abc642e10f19afef11f621c29d (patch)
tree4422363bbe6e4bf3fc5f9ca8f9efcfe9ec79f0b9 /apt-pkg/contrib/configuration.cc
parent422d9f6e1887b3adbb2a8e6798c61390079a0965 (diff)
G++3 fixes from Randolph
Author: jgg Date: 2001-05-14 05:47:30 GMT G++3 fixes from Randolph
Diffstat (limited to 'apt-pkg/contrib/configuration.cc')
-rw-r--r--apt-pkg/contrib/configuration.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index b8c806e28..2fa570c21 100644
--- a/apt-pkg/contrib/configuration.cc
+++ b/apt-pkg/contrib/configuration.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: configuration.cc,v 1.21 2001/04/29 05:24:42 jgg Exp $
+// $Id: configuration.cc,v 1.22 2001/05/14 05:47:30 jgg Exp $
/* ######################################################################
Configuration Class
@@ -24,11 +24,14 @@
#include <vector>
#include <algorithm>
#include <fstream>
+#include <iostream>
#include <stdio.h>
#include <dirent.h>
#include <sys/stat.h>
#include <unistd.h>
+
+using namespace std;
/*}}}*/
Configuration *_config = new Configuration;
@@ -92,7 +95,7 @@ Configuration::Item *Configuration::Lookup(Item *Head,const char *S,
if (Len != 0)
{
for (; I != 0; Last = &I->Next, I = I->Next)
- if ((Res = stringcasecmp(I->Tag.begin(),I->Tag.end(),S,S + Len)) == 0)
+ if ((Res = stringcasecmp(I->Tag,S,S + Len)) == 0)
break;
}
else
@@ -438,7 +441,7 @@ bool ReadConfigFile(Configuration &Conf,string FName,bool AsSectional,
unsigned Depth)
{
// Open the stream for reading
- ifstream F(FName.c_str(),ios::in | ios::nocreate);
+ ifstream F(FName.c_str(),ios::in);
if (!F != 0)
return _error->Errno("ifstream::ifstream",_("Opening configuration file %s"),FName.c_str());