From 72e162e4cf974f2a99e8ba39d1df54de4a106967 Mon Sep 17 00:00:00 2001 From: tth Date: Thu, 20 May 2021 09:31:28 +0200 Subject: [PATCH] use everywhere --- Fonderie/crapulator.c | 1 + Fonderie/fifo.c | 1 + Fonderie/filterstack.c | 1 + Fonderie/fonderie.c | 1 + Fonderie/glitches.c | 1 + Fonderie/interpolator.c | 1 + Fonderie/sfx.c | 1 + Fonderie/singlepass.c | 1 + Fonderie/t.c | 1 + essai.c | 1 + floatimg.h | 8 ++++---- funcs/classif.c | 1 + funcs/contour2x2.c | 1 + funcs/displacement.c | 1 + funcs/dithering.c | 2 ++ funcs/exporter.c | 1 + funcs/filtrage.c | 4 ++++ funcs/fimg-fits.c | 1 + funcs/fimg-libpnm.c | 1 + funcs/fimg-openexr.c | 1 + funcs/fimg-png.c | 1 + funcs/fimg-tiff.c | 2 +- funcs/geometry.c | 1 + funcs/histogram.c | 1 + funcs/hsv.c | 1 + funcs/incrustator.c | 1 + funcs/misc-plots.c | 1 + funcs/qsortrgb.c | 1 + funcs/t.c | 1 + funcs/tests.c | 1 + lib/contrast.c | 8 +++++++- lib/fimg-2gray.c | 1 + lib/fimg-compare.c | 1 + lib/fimg-core.c | 1 + lib/fimg-file.c | 1 + lib/fimg-math.c | 1 + lib/fimg-pnm.c | 5 +++-- lib/interpolate.c | 1 + lib/operators.c | 1 + tools/addpnm2fimg.c | 1 + tools/cumulfimgs.c | 1 + tools/fimg2fits.c | 1 + tools/fimg2png.c | 1 + tools/fimg2pnm.c | 1 + tools/fimg2text.c | 1 + tools/fimg2tiff.c | 1 + tools/fimgfx.c | 1 + tools/fimghalfsize.c | 1 + tools/fimgops.c | 1 + tools/fimgstats.c | 1 + tools/mkfimg.c | 1 + tools/png2fimg.c | 1 + 52 files changed, 67 insertions(+), 8 deletions(-) diff --git a/Fonderie/crapulator.c b/Fonderie/crapulator.c index 3f8890fe..533b3b00 100644 --- a/Fonderie/crapulator.c +++ b/Fonderie/crapulator.c @@ -4,6 +4,7 @@ #include #include +#include #include #include diff --git a/Fonderie/fifo.c b/Fonderie/fifo.c index 47f925a0..ef12b355 100644 --- a/Fonderie/fifo.c +++ b/Fonderie/fifo.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include diff --git a/Fonderie/filterstack.c b/Fonderie/filterstack.c index 3e93c7ca..f7303a53 100644 --- a/Fonderie/filterstack.c +++ b/Fonderie/filterstack.c @@ -4,6 +4,7 @@ #include #include +#include #include #include #include diff --git a/Fonderie/fonderie.c b/Fonderie/fonderie.c index 29f83e2e..a82a5733 100644 --- a/Fonderie/fonderie.c +++ b/Fonderie/fonderie.c @@ -4,6 +4,7 @@ #include #include +#include #include #include #include diff --git a/Fonderie/glitches.c b/Fonderie/glitches.c index ebe468ab..d7342751 100644 --- a/Fonderie/glitches.c +++ b/Fonderie/glitches.c @@ -7,6 +7,7 @@ #include #include +#include #include #include diff --git a/Fonderie/interpolator.c b/Fonderie/interpolator.c index 20e8a3ed..6e83d82e 100644 --- a/Fonderie/interpolator.c +++ b/Fonderie/interpolator.c @@ -10,6 +10,7 @@ */ #include #include +#include #include #include #include diff --git a/Fonderie/sfx.c b/Fonderie/sfx.c index fb052962..c48ac87f 100644 --- a/Fonderie/sfx.c +++ b/Fonderie/sfx.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include #include diff --git a/Fonderie/singlepass.c b/Fonderie/singlepass.c index b8791a0c..585d30e3 100644 --- a/Fonderie/singlepass.c +++ b/Fonderie/singlepass.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/Fonderie/t.c b/Fonderie/t.c index 288cc1e2..1a22ed97 100644 --- a/Fonderie/t.c +++ b/Fonderie/t.c @@ -4,6 +4,7 @@ #include #include +#include #include #include #include diff --git a/essai.c b/essai.c index 4f9b6738..c6520bd0 100644 --- a/essai.c +++ b/essai.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/floatimg.h b/floatimg.h index b50f8be6..9933fc0c 100644 --- a/floatimg.h +++ b/floatimg.h @@ -4,14 +4,14 @@ * http://la.buvette.org/photos/cumul */ -#define FIMG_VERSION 150 +#define FIMG_VERSION 151 /* * in memory descriptor */ #define MAGIC_FIMG 0x00F11F00 typedef struct { - unsigned long magic; + uint32_t magic; int width; int height; int type; @@ -31,7 +31,7 @@ typedef struct { #define MAGIC_AREA51 0xA5EA0051 typedef struct { - unsigned long magic; + uint32_t magic; int w, h; int x, y; int flags; @@ -57,7 +57,7 @@ typedef struct { #define CONTRAST_POW2 2 #define CONTRAST_COS01 3 #define CONTRAST_COS010 4 - +#define CONTRAST_XPER 5 /* use with caution */ /* * core module */ diff --git a/funcs/classif.c b/funcs/classif.c index 29860f33..9e880020 100644 --- a/funcs/classif.c +++ b/funcs/classif.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include "../floatimg.h" diff --git a/funcs/contour2x2.c b/funcs/contour2x2.c index 694c52a2..2384c349 100644 --- a/funcs/contour2x2.c +++ b/funcs/contour2x2.c @@ -4,6 +4,7 @@ #include #include +#include #include #include diff --git a/funcs/displacement.c b/funcs/displacement.c index 872b4e79..8e47a338 100644 --- a/funcs/displacement.c +++ b/funcs/displacement.c @@ -4,6 +4,7 @@ #include #include +#include #include #include diff --git a/funcs/dithering.c b/funcs/dithering.c index 14305487..a8407cfd 100644 --- a/funcs/dithering.c +++ b/funcs/dithering.c @@ -4,6 +4,7 @@ #include #include +#include #include #include @@ -21,6 +22,7 @@ for (y=0; yheight; y++) { for (x=0; xwidth; x++) { + /* PLEASE DO SOMETHING HERE */ } } diff --git a/funcs/exporter.c b/funcs/exporter.c index d71ff7f4..10bc3e08 100644 --- a/funcs/exporter.c +++ b/funcs/exporter.c @@ -4,6 +4,7 @@ #include #include +#include #include #include "../floatimg.h" diff --git a/funcs/filtrage.c b/funcs/filtrage.c index d3db336f..6b385ac9 100644 --- a/funcs/filtrage.c +++ b/funcs/filtrage.c @@ -1,5 +1,9 @@ +/* + * Floating filters are all WIP ! + */ #include #include +#include #include #include #include diff --git a/funcs/fimg-fits.c b/funcs/fimg-fits.c index 7e5a6da0..9e78f91d 100644 --- a/funcs/fimg-fits.c +++ b/funcs/fimg-fits.c @@ -8,6 +8,7 @@ #include #include +#include #include diff --git a/funcs/fimg-libpnm.c b/funcs/fimg-libpnm.c index 8a126e54..4f409701 100644 --- a/funcs/fimg-libpnm.c +++ b/funcs/fimg-libpnm.c @@ -4,6 +4,7 @@ #include #include +#include #include #include diff --git a/funcs/fimg-openexr.c b/funcs/fimg-openexr.c index 8ea5e44e..73c563c4 100644 --- a/funcs/fimg-openexr.c +++ b/funcs/fimg-openexr.c @@ -5,6 +5,7 @@ #include #include +#include #include #include "../floatimg.h" diff --git a/funcs/fimg-png.c b/funcs/fimg-png.c index d494df79..3e9ebd32 100644 --- a/funcs/fimg-png.c +++ b/funcs/fimg-png.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/funcs/fimg-tiff.c b/funcs/fimg-tiff.c index 7f084a2a..355b2ee2 100644 --- a/funcs/fimg-tiff.c +++ b/funcs/fimg-tiff.c @@ -5,7 +5,7 @@ #include #include - +#include #include #include "../floatimg.h" diff --git a/funcs/geometry.c b/funcs/geometry.c index fd332d56..2dc4223d 100644 --- a/funcs/geometry.c +++ b/funcs/geometry.c @@ -5,6 +5,7 @@ #include #include +#include #include #include "../floatimg.h" diff --git a/funcs/histogram.c b/funcs/histogram.c index bd865246..96b5b66f 100644 --- a/funcs/histogram.c +++ b/funcs/histogram.c @@ -6,6 +6,7 @@ #include #include #include +#include #include "../floatimg.h" diff --git a/funcs/hsv.c b/funcs/hsv.c index c0fb0f3b..d2b24f2b 100644 --- a/funcs/hsv.c +++ b/funcs/hsv.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include "../floatimg.h" diff --git a/funcs/incrustator.c b/funcs/incrustator.c index 64c076bc..6a00fbf9 100644 --- a/funcs/incrustator.c +++ b/funcs/incrustator.c @@ -5,6 +5,7 @@ #include #include +#include #include #include "../floatimg.h" diff --git a/funcs/misc-plots.c b/funcs/misc-plots.c index 3570b4f5..2c2e574d 100644 --- a/funcs/misc-plots.c +++ b/funcs/misc-plots.c @@ -4,6 +4,7 @@ #include #include +#include #include #include "../floatimg.h" diff --git a/funcs/qsortrgb.c b/funcs/qsortrgb.c index c561a5ad..b1c58aaf 100644 --- a/funcs/qsortrgb.c +++ b/funcs/qsortrgb.c @@ -4,6 +4,7 @@ #include #include +#include #include #include diff --git a/funcs/t.c b/funcs/t.c index 77ef3c60..59948a05 100644 --- a/funcs/t.c +++ b/funcs/t.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/funcs/tests.c b/funcs/tests.c index 4ff6d05e..8882205d 100644 --- a/funcs/tests.c +++ b/funcs/tests.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/lib/contrast.c b/lib/contrast.c index be298064..181e839b 100644 --- a/lib/contrast.c +++ b/lib/contrast.c @@ -3,11 +3,12 @@ * -------------------------------- * * you can see some use in 'tools/fimgfx.c', so you can thing - * about the 'maxval' parameter. C'est touchy :) + * about the 'maxval' parameter. It was touchy :) */ #include #include +#include #include #include #include @@ -25,6 +26,11 @@ if (!strcmp(str, "sqrt")) return CONTRAST_SQRT; if (!strcmp(str, "pow2")) return CONTRAST_POW2; if (!strcmp(str, "cos01")) return CONTRAST_COS01; if (!strcmp(str, "cos010")) return CONTRAST_COS010; +if (!strcmp(str, "xper")) return CONTRAST_XPER; + +#if DEBUG_LEVEL +fprintf(stderr, "%s: unknow contrast name '%s'\n", __func__, str); +#endif return -1; } diff --git a/lib/fimg-2gray.c b/lib/fimg-2gray.c index 5aca461b..c06c96e0 100644 --- a/lib/fimg-2gray.c +++ b/lib/fimg-2gray.c @@ -4,6 +4,7 @@ #include #include +#include #include #include "string.h" diff --git a/lib/fimg-compare.c b/lib/fimg-compare.c index c0b6a72a..d07a16e5 100644 --- a/lib/fimg-compare.c +++ b/lib/fimg-compare.c @@ -5,6 +5,7 @@ #include #include +#include #include #include "string.h" diff --git a/lib/fimg-core.c b/lib/fimg-core.c index 475249b8..f865d046 100644 --- a/lib/fimg-core.c +++ b/lib/fimg-core.c @@ -6,6 +6,7 @@ #include #include +#include #include #include "string.h" diff --git a/lib/fimg-file.c b/lib/fimg-file.c index 1c872b10..b5da57f0 100644 --- a/lib/fimg-file.c +++ b/lib/fimg-file.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/lib/fimg-math.c b/lib/fimg-math.c index c734941a..d6fd10c9 100644 --- a/lib/fimg-math.c +++ b/lib/fimg-math.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include /* for FLT_MAX */ diff --git a/lib/fimg-pnm.c b/lib/fimg-pnm.c index cbbbd59a..88e0e707 100644 --- a/lib/fimg-pnm.c +++ b/lib/fimg-pnm.c @@ -1,14 +1,15 @@ /* * fimg-pnm.c * - * + * crude version who make HUGE ascii files ! */ #include #include #include +#include -#include "string.h" +#include #include "../floatimg.h" diff --git a/lib/interpolate.c b/lib/interpolate.c index 1807d487..a453a056 100644 --- a/lib/interpolate.c +++ b/lib/interpolate.c @@ -4,6 +4,7 @@ #include #include +#include #include #include #include diff --git a/lib/operators.c b/lib/operators.c index 9e57bb3f..291b3a5b 100644 --- a/lib/operators.c +++ b/lib/operators.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/tools/addpnm2fimg.c b/tools/addpnm2fimg.c index 03bcb398..f06b23b8 100644 --- a/tools/addpnm2fimg.c +++ b/tools/addpnm2fimg.c @@ -4,6 +4,7 @@ #include #include +#include #include #include "../floatimg.h" diff --git a/tools/cumulfimgs.c b/tools/cumulfimgs.c index 5f53d685..3a4c32d5 100644 --- a/tools/cumulfimgs.c +++ b/tools/cumulfimgs.c @@ -4,6 +4,7 @@ #include #include #include +#include #include "../floatimg.h" diff --git a/tools/fimg2fits.c b/tools/fimg2fits.c index 41221ede..272d4f78 100644 --- a/tools/fimg2fits.c +++ b/tools/fimg2fits.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "../floatimg.h" diff --git a/tools/fimg2png.c b/tools/fimg2png.c index 64505ff0..5d4617a5 100644 --- a/tools/fimg2png.c +++ b/tools/fimg2png.c @@ -4,6 +4,7 @@ #include #include +#include #include #include "../floatimg.h" diff --git a/tools/fimg2pnm.c b/tools/fimg2pnm.c index a8a393b2..f1b3fb30 100644 --- a/tools/fimg2pnm.c +++ b/tools/fimg2pnm.c @@ -4,6 +4,7 @@ */ #include #include +#include #include #include "../floatimg.h" diff --git a/tools/fimg2text.c b/tools/fimg2text.c index 3935bb07..55031bea 100644 --- a/tools/fimg2text.c +++ b/tools/fimg2text.c @@ -5,6 +5,7 @@ #include #include +#include #include #include diff --git a/tools/fimg2tiff.c b/tools/fimg2tiff.c index 9dfc51a6..7f086a9d 100644 --- a/tools/fimg2tiff.c +++ b/tools/fimg2tiff.c @@ -4,6 +4,7 @@ #include #include +#include #include #include "../floatimg.h" diff --git a/tools/fimgfx.c b/tools/fimgfx.c index f8fe055f..883f48ad 100644 --- a/tools/fimgfx.c +++ b/tools/fimgfx.c @@ -6,6 +6,7 @@ */ #include #include +#include #include #include diff --git a/tools/fimghalfsize.c b/tools/fimghalfsize.c index efba6e97..9cceca36 100644 --- a/tools/fimghalfsize.c +++ b/tools/fimghalfsize.c @@ -4,6 +4,7 @@ #include #include /* pour getopt */ +#include #include #include diff --git a/tools/fimgops.c b/tools/fimgops.c index 99aad5e5..9775890b 100644 --- a/tools/fimgops.c +++ b/tools/fimgops.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "../floatimg.h" diff --git a/tools/fimgstats.c b/tools/fimgstats.c index 23ea2ec0..7e0efa19 100644 --- a/tools/fimgstats.c +++ b/tools/fimgstats.c @@ -4,6 +4,7 @@ #include #include +#include #include #include "../floatimg.h" diff --git a/tools/mkfimg.c b/tools/mkfimg.c index 6e568d8b..74fd16f3 100644 --- a/tools/mkfimg.c +++ b/tools/mkfimg.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/tools/png2fimg.c b/tools/png2fimg.c index ff8a4a2f..3e7c9f26 100644 --- a/tools/png2fimg.c +++ b/tools/png2fimg.c @@ -9,6 +9,7 @@ #include #include +#include #include #include