refactor; start adding debugging logs to midpoint rend stuff

svn:r1445
This commit is contained in:
Nick Mathewson
2004-04-02 23:30:54 +00:00
parent 25a9bc594f
commit e8345bfced
11 changed files with 36 additions and 13 deletions
+11
View File
@@ -109,6 +109,17 @@ void set_uint32(char *cp, uint32_t v)
}
#endif
void hex_encode(const char *from, int fromlen, char *to)
{
const unsigned char *fp = from;
static const char TABLE[] = "0123456789abcdef";
while (fromlen) {
*to++ = TABLE[*fp >> 4];
*to++ = TABLE[*fp & 7];
++fp;
}
*to = '\0';
}
/*
* A simple smartlist interface to make an unordered list of acceptable