{
unsigned size;
unsigned char buf[4];
- unsigned i;
*value = 0;
err:
printf("(ERROR %d - %s)\n", errno, strerror(errno));
- return;
+ return false;
}
static void show_hard(FILE *f, int c)
{
unsigned type = c >> 3;
unsigned value;
- unsigned size;
char *label;
printf("DWT - ");
static void show_swit(FILE *f, int c)
{
- unsigned size;
unsigned port = c >> 3;
- unsigned char buf[4];
unsigned value = 0;
unsigned i;
return;
printf("%#08x", value);
- for (i = 0; i <= sizeof(format) / sizeof(format[0]); i++) {
+ for (i = 0; i < sizeof(format) / sizeof(format[0]); i++) {
if (format[i].port == port) {
printf(", ");
format[i].show(port, value);
printf("\n");
return;
-
-err:
- printf("(ERROR %d - %s)\n", errno, strerror(errno));
- return;
}
static void show_timestamp(FILE *f, int c)
}
break;
default:
-usage:
fprintf(stderr, "usage: %s [-f input]",
basename(argv[0]));
return 1;