diff options
author | Ishan Jayawardena <udeshike@gmail.com> | 2011-07-16 14:41:53 +0530 |
---|---|---|
committer | Ishan Jayawardena <udeshike@gmail.com> | 2011-07-16 14:41:53 +0530 |
commit | 8a8ea4baa11f07e1de4cf190f82dbd79ff1affa5 (patch) | |
tree | f8710b0994c439f46e75c8f28af0f6b8251f380c /apt-pkg/contrib | |
parent | 3efe86af099d5a5d05e2e61a571da864676834c7 (diff) | |
parent | 0df8c3dccbda739af6e20999fb208ada0619ad80 (diff) |
fixed indentation issues
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/configuration.cc | 13 | ||||
-rw-r--r-- | apt-pkg/contrib/configuration.h | 1 | ||||
-rw-r--r-- | apt-pkg/contrib/fileutl.cc | 4 |
3 files changed, 16 insertions, 2 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index cc7093fe2..942ea9fbc 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -318,6 +318,19 @@ void Configuration::CndSet(const char *Name,const string &Value) Itm->Value = Value; } /*}}}*/ +// Configuration::Set - Set an integer value /*{{{*/ +// --------------------------------------------------------------------- +/* */ +void Configuration::CndSet(const char *Name,int const Value) +{ + Item *Itm = Lookup(Name,true); + if (Itm == 0 || Itm->Value.empty() == false) + return; + char S[300]; + snprintf(S,sizeof(S),"%i",Value); + Itm->Value = S; +} + /*}}}*/ // Configuration::Set - Set a value /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt-pkg/contrib/configuration.h b/apt-pkg/contrib/configuration.h index 71e5a0e47..2844ec097 100644 --- a/apt-pkg/contrib/configuration.h +++ b/apt-pkg/contrib/configuration.h @@ -82,6 +82,7 @@ class Configuration inline void Set(const string &Name,const string &Value) {Set(Name.c_str(),Value);}; void CndSet(const char *Name,const string &Value); + void CndSet(const char *Name,const int Value); void Set(const char *Name,const string &Value); void Set(const char *Name,const int &Value); diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index 0b7d91d3b..f65f7cf28 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -148,8 +148,7 @@ bool CopyFile(FileFd &From,FileFd &To) return true; } - -/*}}}*/ + /*}}}*/ // GetLock - Gets a lock file /*{{{*/ // --------------------------------------------------------------------- /* This will create an empty file of the given name and lock it. Once this @@ -617,6 +616,7 @@ bool WaitFd(int Fd,bool write,unsigned long timeout) if (Res <= 0) return false; } + return true; } /*}}}*/ |