From ce73143d964c8b55b6523129fa90e5e5fd74663d Mon Sep 17 00:00:00 2001 From: tth Date: Fri, 23 Apr 2021 11:15:56 +0200 Subject: [PATCH] bla --- funcs/Makefile | 2 +- funcs/t.c | 6 +++++- funcs/tests.c | 12 ++++++------ funcs/tests.h | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/funcs/Makefile b/funcs/Makefile index 4361cbd..bdc9f77 100644 --- a/funcs/Makefile +++ b/funcs/Makefile @@ -3,7 +3,7 @@ # Please, use the 'Gloabl.makefile' system ! -COPT = -Wall -fpic -g -no-pie -DDEBUG_LEVEL=1 +COPT = -Wall -fpic -g -no-pie -DDEBUG_LEVEL=0 DEPS = ../floatimg.h Makefile OBJS = fimg-png.o fimg-tiff.o misc-plots.o filtrage.o utils.o \ diff --git a/funcs/t.c b/funcs/t.c index 2f16c7d..c751fa1 100644 --- a/funcs/t.c +++ b/funcs/t.c @@ -22,7 +22,7 @@ float global_fvalue; enum nCmd { Equalize=1, Rotate, Sfx0, F3x3, MIRE, Wfits, Wpng, Wtiff, Histo, Hsv, Classif, Ctr2x2, Qsortrgb, Displace, ReadPNG, Plasmas, Hilight, OpenEXR, - Geometrie }; + Geometrie, FileType }; typedef struct { char *name; int Cmd; @@ -48,6 +48,7 @@ Command commands[] = { { "hilight", Hilight }, { "openexr", OpenEXR }, { "geometrie", Geometrie, }, + { "filetype", FileType }, { NULL, 0 } } ; @@ -207,6 +208,9 @@ switch(opt) { case Geometrie: foo = essai_geometrie(filename, 0); break; + case FileType: + foo = essai_detect_type(); + break; default: fprintf(stderr, "'%s' is a bad command\n", command); exit(1); diff --git a/funcs/tests.c b/funcs/tests.c index 76c7d02..d9bfd25 100644 --- a/funcs/tests.c +++ b/funcs/tests.c @@ -616,22 +616,22 @@ int foo; char *fname; foo = format_from_extension(fname="foo.fimg"); -printf("%-10s %d\n\n", fname, foo); +printf("%-10s %3d\n", fname, foo); foo = format_from_extension(fname="foo.pnm"); -printf("%-10s %d\n\n", fname, foo); +printf("%-10s %3d\n", fname, foo); foo = format_from_extension(fname="foo.png"); -printf("%-10s %d\n\n", fname, foo); +printf("%-10s %3d\n", fname, foo); foo = format_from_extension(fname="foo.tiff"); -printf("%-10s %d\n\n", fname, foo); +printf("%-10s %3d\n", fname, foo); foo = format_from_extension(fname="foo.fits"); -printf("%-10s %d\n\n", fname, foo); +printf("%-10s %3d\n", fname, foo); foo = format_from_extension(fname="foo.xyzzy"); -printf("%-10s %d\n\n", fname, foo); +printf("%-10s %3d\n", fname, foo); return 0; } diff --git a/funcs/tests.h b/funcs/tests.h index bc46751..c955a89 100644 --- a/funcs/tests.h +++ b/funcs/tests.h @@ -20,7 +20,7 @@ int fimg_essai_hsv(char *infile); int essai_classif(char *infile, char *outfile, float fvalue); int essai_contour_2x2(char *filename, char *outfile); int essai_geometrie(char *infile, int notused); - +int essai_detect_type(void); int fimg_essai_histo(FloatImg *src, char *outpic, int k); /* histogram.c */ int essai_histogramme(char *fname, int k);