some changes

This commit is contained in:
/jdi/ 2015-09-30 00:01:23 +02:00
parent 5544792bfb
commit aca82979c3
13 changed files with 102 additions and 79 deletions

View file

@ -22,6 +22,20 @@ static void printHex(bytes d) {
}
}
static void print(byteArray<6> d) {
printf("%.2X", d[0]);
for (unsigned i = 1; i < 6; i++) {
printf(":%.2X", d[i]);
}
}
static void print(byteArray<4> d) {
printf("%.1d", d[0]);
for (unsigned i = 1; i < 4; i++) {
printf(".%.1d", d[i]);
}
}
static void printDec(bytes d) {
if (d.size() > 0)
printf("%.1d", d[0]);