summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/contrib/configuration.cc4
-rw-r--r--apt-pkg/contrib/configuration.h4
-rw-r--r--apt-pkg/contrib/sptr.h10
-rw-r--r--apt-pkg/contrib/strutl.cc4
-rw-r--r--apt-pkg/tagfile.h6
5 files changed, 14 insertions, 14 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc
index e15bc67ca..97d99210f 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.18 2001/03/05 21:09:12 jgg Exp $
+// $Id: configuration.cc,v 1.19 2001/03/11 07:22:19 jgg Exp $
/* ######################################################################
Configuration Class
@@ -276,7 +276,7 @@ string Configuration::FindAny(const char *Name,const char *Default) const
case 'i':
{
char buf[16];
- snprintf(buf, sizeof(buf)-1, "%d", FindI(key, Default));
+ snprintf(buf, sizeof(buf)-1, "%d", FindI(key, atoi(Default)));
return buf;
}
}
diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h
index 643e0f628..84a8cf07e 100644
--- a/apt-pkg/contrib/configuration.h
+++ b/apt-pkg/contrib/configuration.h
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: configuration.h,v 1.12 2001/02/20 07:03:17 jgg Exp $
+// $Id: configuration.h,v 1.13 2001/03/11 07:22:19 jgg Exp $
/* ######################################################################
Configuration Class
@@ -70,7 +70,7 @@ class Configuration
string FindFile(const char *Name,const char *Default = 0) const;
string FindDir(const char *Name,const char *Default = 0) const;
int FindI(const char *Name,int Default = 0) const;
- int FindI(string Name,bool Default = 0) const {return FindI(Name.c_str(),Default);};
+ int FindI(string Name,int Default = 0) const {return FindI(Name.c_str(),Default);};
bool FindB(const char *Name,bool Default = false) const;
bool FindB(string Name,bool Default = false) const {return FindB(Name.c_str(),Default);};
string FindAny(const char *Name,const char *Default = 0) const;
diff --git a/apt-pkg/contrib/sptr.h b/apt-pkg/contrib/sptr.h
index a9347edf9..9df0e44a7 100644
--- a/apt-pkg/contrib/sptr.h
+++ b/apt-pkg/contrib/sptr.h
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: sptr.h,v 1.2 2001/02/20 07:03:17 jgg Exp $
+// $Id: sptr.h,v 1.3 2001/03/11 07:22:19 jgg Exp $
/* ######################################################################
Trivial non-ref counted 'smart pointer'
@@ -48,19 +48,19 @@ class SPtrArray
public:
T *Ptr;
- inline T &operator *() {return *Ptr;};
+ //inline T &operator *() {return *Ptr;};
inline operator T *() {return Ptr;};
inline operator void *() {return Ptr;};
inline T *UnGuard() {T *Tmp = Ptr; Ptr = 0; return Tmp;};
- inline T &operator [](signed long I) {return Ptr[I];};
+ //inline T &operator [](signed long I) {return Ptr[I];};
inline void operator =(T *N) {Ptr = N;};
inline bool operator ==(T *lhs) const {return Ptr == lhs;};
inline bool operator !=(T *lhs) const {return Ptr != lhs;};
- inline T*Get() {return Ptr;};
+ inline T *Get() {return Ptr;};
inline SPtrArray(T *Ptr) : Ptr(Ptr) {};
inline SPtrArray() : Ptr(0) {};
- inline ~SPtrArray() {delete []Ptr;};
+ inline ~SPtrArray() {delete [] Ptr;};
};
#endif
diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
index d7a5925da..9be173542 100644
--- a/apt-pkg/contrib/strutl.cc
+++ b/apt-pkg/contrib/strutl.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: strutl.cc,v 1.37 2001/02/23 06:08:57 jgg Exp $
+// $Id: strutl.cc,v 1.38 2001/03/11 07:22:19 jgg Exp $
/* ######################################################################
String Util - Some useful string functions.
@@ -495,7 +495,7 @@ string LookupTag(string Message,const char *Tag,const char *Default)
// ---------------------------------------------------------------------
/* This inspects the string to see if it is true or if it is false and
then returns the result. Several varients on true/false are checked. */
-int StringToBool(string Text,int Default = -1)
+int StringToBool(string Text,int Default)
{
char *End;
int Res = strtol(Text.c_str(),&End,0);
diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h
index 948adb426..a85d24b7e 100644
--- a/apt-pkg/tagfile.h
+++ b/apt-pkg/tagfile.h
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: tagfile.h,v 1.15 2001/02/20 07:03:17 jgg Exp $
+// $Id: tagfile.h,v 1.16 2001/03/11 07:22:19 jgg Exp $
/* ######################################################################
Fast scanner for RFC-822 type header information
@@ -47,8 +47,8 @@ class pkgTagSection
bool Find(const char *Tag,unsigned &Pos) const;
string FindS(const char *Tag) const;
signed int FindI(const char *Tag,signed long Default = 0) const ;
- bool pkgTagSection::FindFlag(const char *Tag,unsigned long &Flags,
- unsigned long Flag) const;
+ bool FindFlag(const char *Tag,unsigned long &Flags,
+ unsigned long Flag) const;
bool Scan(const char *Start,unsigned long MaxLength);
inline unsigned long size() const {return Stop - Section;};
void Trim();