]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/configuration.cc
apt-pkg/pkgcachegen.cc: fix compiler error
[apt.git] / apt-pkg / contrib / configuration.cc
index cc7093fe2cf4146c1574dcd38f03fead67ed2dc6..942ea9fbc6fc975bd3be912d79dafed7e0ee655e 100644 (file)
@@ -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                                    /*{{{*/
 // ---------------------------------------------------------------------
 /* */