From c3f5419745d099de0cc4e770fc7850fde4b6aa2d Mon Sep 17 00:00:00 2001 From: tth Date: Fri, 13 Sep 2019 14:34:56 +0200 Subject: [PATCH] bla --- floatimg.h | 2 +- funcs/fimg-libpnm.c | 12 ++++++------ funcs/t.c | 5 ++++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/floatimg.h b/floatimg.h index fc0fe62..1f61a10 100644 --- a/floatimg.h +++ b/floatimg.h @@ -2,7 +2,7 @@ * floatimg.h */ -#define FIMG_VERSION 72 +#define FIMG_VERSION 73 /* * in memory descriptor diff --git a/funcs/fimg-libpnm.c b/funcs/fimg-libpnm.c index decbd06..8a126e5 100644 --- a/funcs/fimg-libpnm.c +++ b/funcs/fimg-libpnm.c @@ -16,13 +16,13 @@ extern int verbosity; static void print_struct_pam(struct pam *ppam, char *txt) { -printf("size %d\n", ppam->size); +printf(" size %d\n", ppam->size); -printf("format %d\n", ppam->format); -printf("plainformat %d\n", ppam->plainformat); -printf("width & height %d %d\n", ppam->width, ppam->height); -printf("depth %d\n", ppam->depth); -printf("maxval %lu\n", ppam->maxval); +printf(" format %d\n", ppam->format); +printf(" plainformat %d\n", ppam->plainformat); +printf(" width & height %d %d\n", ppam->width, ppam->height); +printf(" depth %d\n", ppam->depth); +printf(" maxval %lu\n", ppam->maxval); } /* --------------------------------------------------------------------- */ diff --git a/funcs/t.c b/funcs/t.c index 7c20627..0f90ab9 100644 --- a/funcs/t.c +++ b/funcs/t.c @@ -14,10 +14,13 @@ int fimg_pnm_infos(char *); int main(int argc, char *argv[]) { int foo; +char *infile = "foo.pnm"; pnm_init(&argc, argv); -foo = fimg_pnm_infos("foo.pnm"); +if (2 == argc) infile = argv[1]; + +foo = fimg_pnm_infos(infile); fprintf(stderr, "got %d\n", foo); return 0;