remove printall test executable

This commit is contained in:
Alain Zscheile 2023-01-03 09:30:02 +01:00
parent 1d2fd1e019
commit 6cac98bd4f
2 changed files with 0 additions and 42 deletions

View file

@ -22,14 +22,6 @@ liby16t = shared_library('y16t',
include_directories : include_directories('.'),
install : true)
executable('y16t-printall',
files('y16t_printall.c'),
link_with : [liby16t],
c_args : [c_base_args],
include_directories : include_directories('.'),
install : true
)
pkg_mod = import('pkgconfig')
pkg_mod.generate(
libraries : [liby16t],

View file

@ -1,34 +0,0 @@
#include "y16t.h"
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
int printall_fecb(uint32_t x, void* ctx)
{
printf("%08x\n", x);
return 0;
}
int main(int argc, char *argv[])
{
if(argc < 4) {
fprintf(stderr, "USAGE: y16t-print FILE x|y VALUE\n");
return -1;
}
int fd = open(argv[1], O_RDONLY);
if(fd < 0) {
perror("open");
fprintf(stderr, "ERROR: unable to open file\n");
return -1;
}
uint8_t value = atoi(argv[3]);
const y16t_idx_t idx = { fd, 0 };
switch(argv[2][0]) {
case 'x': return y16t_idx_foreach_x(idx, value, printall_fecb, 0);
case 'y': return y16t_idx_foreach_y(idx, value, printall_fecb, 0);
default: return -1;
}
}