+bool Hex2Num(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;
+char *safe_snprintf(char *Buffer,char *End,const char *Format,...) APT_FORMAT3;
+bool CheckDomainList(string Host,string List);
+
+#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));}; \
+inline int name(string A,const char *B) {return func(A.c_str(),A.c_str()+A.length(),B,B+strlen(B));}; \
+inline int name(string A,string B) {return func(A.c_str(),A.c_str()+A.length(),B.c_str(),B.c_str()+B.length());}; \
+inline int name(string A,const char *B,const char *BEnd) {return func(A.c_str(),A.c_str()+A.length(),B,BEnd);};
+
+#define APT_MKSTRCMP2(name,func) \
+inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \
+inline int name(string A,const char *B) {return func(A.begin(),A.end(),B,B+strlen(B));}; \
+inline int name(string A,string B) {return func(A.begin(),A.end(),B.begin(),B.end());}; \
+inline int name(string A,const char *B,const char *BEnd) {return func(A.begin(),A.end(),B,BEnd);};