2669
2669
void test_d2b2d(const char *str, int p, int s, const char *orig, int ex)
2671
2671
char s1[100], buf[100], *end;
2672
int res, i, size=decimal_bin_size(p, s);
2674
2674
snprintf(s1, sizeof(s1), "'%s'", str);
2676
2676
string2decimal(str, &a, &end);
2677
res=decimal2bin(&a, buf, p, s);
2677
int res=decimal2bin(&a, buf, p, s);
2678
2678
printf("%-31s {%2d, %2d} => res=%d size=%-2d ", s1, p, s, res, size);
2683
2683
printf("%02x", ((unsigned char *)buf)[i]);
2685
2685
res=bin2decimal(buf, &a, p, s);