X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/facac1c52ebe40656af693502cab66eb4c09ad2f..53391d0fc55f118194467b3d436f91fbc1097c31:/apt-pkg/contrib/strutl.h diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index 254087267..e1f9e3a1f 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -16,12 +16,11 @@ #ifndef STRUTL_H #define STRUTL_H -#ifdef __GNUG__ -#pragma interface "apt-pkg/strutl.h" -#endif + #include #include +#include #include #include #include @@ -49,6 +48,7 @@ string DeQuoteString(const string &Str); string SizeToStr(double Bytes); string TimeToStr(unsigned long Sec); string Base64Encode(const string &Str); +string OutputInDepth(const unsigned long Depth, const char* Separator=" "); string URItoFileName(const string &URI); string TimeRFC1123(time_t Date); bool StrToTime(const string &Val,time_t &Result); @@ -60,8 +60,10 @@ bool Hex2Num(const string &Str,unsigned char *Num,unsigned int Length); bool TokSplitString(char Tok,char *Input,char **List, unsigned long ListMax); void ioprintf(ostream &out,const char *format,...) APT_FORMAT2; +void strprintf(string &out,const char *format,...) APT_FORMAT2; char *safe_snprintf(char *Buffer,char *End,const char *Format,...) APT_FORMAT3; bool CheckDomainList(const string &Host, const string &List); +int tolower_ascii(int c); #define APT_MKSTRCMP(name,func) \ inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \