Skip to content

Commit

Permalink
[WiP] Make vips7compat.h part of vips.h
Browse files Browse the repository at this point in the history
This automatically includes `vips7compat.h` unless building with
`-Ddeprecated=false`, preventing unexpected API breaks.
  • Loading branch information
kleisauke committed Oct 11, 2024
1 parent 19b499d commit 18449a2
Show file tree
Hide file tree
Showing 99 changed files with 11 additions and 117 deletions.
6 changes: 0 additions & 6 deletions libvips/conversion/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@
#include <vips/internal.h>
#include <vips/debug.h>

/* For the vips_cache() header decl.
*/
#if ENABLE_DEPRECATED
#include <vips/vips7compat.h>
#endif

#include "pconversion.h"

typedef struct _VipsCache {
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/arith_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <stdio.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/* One image in, one out.
*/
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/cimg_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <stdio.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

static int
greyc_vec(im_object *argv)
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/colour_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <stdio.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/* One image in, one out.
*/
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/conver_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <glib/gi18n-lib.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

static int
system_vec(im_object *argv)
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/convol_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <stdio.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/* One image in, one out.
*/
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/cooc_funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
#include <math.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

static int
im_cooc_sym(IMAGE *im, IMAGE *m, int xpos, int ypos, int xsize, int ysize, int dx, int dy)
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/deprecated_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <stdio.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>
#include <vips/internal.h>

/* One image in, one out.
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/dispatch_types.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include <string.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>
#include <vips/internal.h>

/* String containing each of the characters which can be used within a
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/fits.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <string.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>
#include <vips/internal.h>
#include <vips/debug.h>

Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/format.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <stdio.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>
#include <vips/internal.h>

/* To iterate over supported formats, we build a temp list of subclasses of
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/format_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <stdio.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

static int
jpeg2vips_vec(im_object *argv)
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/freq_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <stdarg.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/* One image in, one out.
*/
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/glds_funcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
#include <math.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/* Keep the greylevel difference matrix as a 256x1 double image */

Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/hist_dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <stdio.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/* One image in, one out.
*/
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_align_bands.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@

#include <glib/gi18n-lib.h>
#include <vips/vips.h>
#include <vips/vips7compat.h>

/**
* im_align_bands:
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_analyze2vips.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <glib/gi18n-lib.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

static VipsFormatFlags
analyze_flags(const char *filename)
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include <math.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/*
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_bernd.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
#include <stdlib.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

static int
extract(IMAGE *in, int x, int y, int w, int h)
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_clamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
#include <stdlib.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>
#include <vips/internal.h>

int
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_cmulnorm.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include <glib/gi18n-lib.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

#include <stdio.h>
#include <stdlib.h>
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_convsub.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
#include <stdlib.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>
#include <vips/internal.h>

/* Create multiplication luts for all non zero elements of the original mask;
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_csv2vips.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include <stdlib.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

#include "../foreign/pforeign.h"

Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_debugim.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
#include <stdio.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

int
im_debugim(IMAGE *in)
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_dif_std.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include <math.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>
#include <vips/internal.h>

static int
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_exr2vips.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include <string.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>
#include <vips/thread.h>
#include <vips/internal.h>

Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_fav4.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Copyright (C) 1992, Kirk Martinez, History of Art Dept, Birkbeck College
#include <string.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

#define ARGS "fav4: frame average 4 frames\nARGS: im1 im2 im3 im4 outfile"
#define NFRAMES 4
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_freq_mask.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include <stdarg.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>
#include <vips/internal.h>

/* Make a mask image.
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_gadd.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
#include <assert.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

int im_gfadd(double a, IMAGE *in1, double b, IMAGE *in2, double c, IMAGE *out);
int im_gaddim(double a, IMAGE *in1, double b, IMAGE *in2, double c, IMAGE *out);
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_gaddim.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
#include <math.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/* This function works on either mmaped files or on images in buffer
*/
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_gfadd.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
#include <math.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/* uchar char ushort short uint int float double */
static int array[8][8] = {
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_gradcor.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include <stdlib.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

typedef struct {
REGION *reg;
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_jpeg2vips.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include <setjmp.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

#include "../foreign/pforeign.h"

Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_lab_morph.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include <stdlib.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>
#include <vips/internal.h>

int
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_line.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
#include <math.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

int
im_line(IMAGE *image, int x1, int y1, int x2, int y2, int pelval)
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_linreg.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include <stdlib.h>
#include <math.h>
#include <vips/vips.h>
#include <vips/vips7compat.h>

typedef struct {

Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_litecor.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
#include <stdlib.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/* If maximum output is > 255 scale output between minout and maxout,
* by normalising maxout to 255.
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_magick2vips.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <glib/gi18n-lib.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

#include "../foreign/pforeign.h"

Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_mask2vips.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include <stdlib.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/**
* im_mask2vips:
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_matcat.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include <string.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/**
* im_matcat:
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_matinv.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <vips/vips.h>
#include <vips/vips7compat.h>

#define TOO_SMALL (2.0 * DBL_MIN)
/* DBL_MIN is smallest *normalized* double precision float */
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_matmul.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <stdio.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/**
* im_matmul:
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_mattrn.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include <stdio.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/**
* im_mattrn:
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_maxpos_avg.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
#include <math.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>
#include <vips/internal.h>

/* A position and maximum.
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_maxpos_subpel.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@

#include <stdlib.h>
#include <vips/vips.h>
#include <vips/vips7compat.h>

#define MOST_OF(A, B) ((A) > 0.9 * (B))
#define LITTLE_OF(A, B) ((B) < 0.1 * (B))
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_measure.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
#include <math.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>

/* Measure into array.
*/
Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_nifti2vips.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include <string.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>
#include <vips/thread.h>
#include <vips/internal.h>

Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_openslide2vips.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include <string.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>
#include <vips/thread.h>
#include <vips/internal.h>

Expand Down
1 change: 0 additions & 1 deletion libvips/deprecated/im_png2vips.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include <stdio.h>

#include <vips/vips.h>
#include <vips/vips7compat.h>
#include <vips/internal.h>

#include "../foreign/pforeign.h"
Expand Down
Loading

0 comments on commit 18449a2

Please sign in to comment.