got rid of avltree-stuff

FossilOrigin-Name: 41573b74d0d433b2e62feb78e580cbb351fee08b441e6735237cd3201a49a4e4
This commit is contained in:
tobias.herre@wikimedia.de
2018-03-06 17:28:31 +00:00
parent e50b8b29b0
commit cad0c6ab18
27 changed files with 60 additions and 147 deletions

View File

@ -62,55 +62,6 @@ int format_hex_bytes(char *dst, const char *format, const char *delim,
/**
* Read hex bytes from a string to an uint8_t array
* @param dst destination array
* @param s string to read
* @param len length of string
* @return 0 if all was ok \n 1 if an error has occured.
*/
int format_scan_hex_bytes(uint8_t *dst,const char *s, int len)
{
int rc ;
int err=0;
int val;
int c;
int i;
if ( len & 1){
rc = sscanf(s,"%01X",&c);
if (rc!=1){
c=0;
err=1;
}
*dst++=c;
s++;
len--;
}
for (i=0; i<len; i++){
rc = sscanf(s+i,"%01X",&c);
if (rc!=1){
c=0;
err=1;
}
if (!(i&1)) {
val = c<<4;
}
else{
val |= c;
*dst++=val;
}
}
return err;
}
char *format_s_hex_bytes(char *dst, const char *format, const char *delim,
const uint8_t * src, int len)