Remove system includes from common.h

Avoiding obscure include order problems.
This commit is contained in:
Kim Woelders 2022-03-04 09:44:27 +01:00
parent 2ec3e5062f
commit 46dc96436a
42 changed files with 74 additions and 36 deletions

View File

@ -1,14 +1,16 @@
#include "config.h"
#include <Imlib2.h>
#include "common.h"
#include <math.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "blend.h"
#include "colormod.h"
#include "color_helpers.h"
#include "common.h"
#include "dynamic_filters.h"
#include "file.h"
#include "filter.h"

View File

@ -1,5 +1,7 @@
#include "common.h"
#include <stdlib.h>
#include "asm_c.h"
#if defined(DO_MMX_ASM) || defined(DO_AMD64_ASM)

View File

@ -1,5 +1,8 @@
#include "common.h"
#include <math.h>
#include <stdlib.h>
#include "asm_c.h"
#include "blend.h"
#include "colormod.h"

View File

@ -1,8 +1,12 @@
#include "color_helpers.h"
/*
* Color space conversion helper routines
* Convert between rgb and hsv and between rgb and hls
*/
#include "common.h"
#include <math.h>
#include "color_helpers.h"
void
__imlib_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v)

View File

@ -1,8 +1,6 @@
#ifndef __COLOR_HELPERS
#define __COLOR_HELPERS 1
#include "common.h"
void __imlib_rgb_to_hsv(int r, int g, int b, float *hue,
float *saturation, float *value);
void __imlib_hsv_to_rgb(float hue, float saturation, float value,

View File

@ -1,6 +1,8 @@
#include "common.h"
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "blend.h"
#include "colormod.h"

View File

@ -3,13 +3,6 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
#include <time.h>
#if __GNUC__
#define __PRINTF_N__(no) __attribute__((__format__(__printf__, (no), (no)+1)))
#else

View File

@ -1,5 +1,8 @@
#include "common.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include "debug.h"

View File

@ -1,10 +1,9 @@
#ifndef __FILE_H
#define __FILE_H 1
#include <time.h>
#include <sys/stat.h>
#include "common.h"
int __imlib_IsRealFile(const char *s);
char *__imlib_FileKey(const char *file);
char *__imlib_FileRealFile(const char *file);

View File

@ -1,5 +1,7 @@
#include "common.h"
#include <stdlib.h>
#include "blend.h"
#include "colormod.h"
#include "filter.h"

View File

@ -1,8 +1,6 @@
#ifndef __FILTER
#define __FILTER 1
#include "common.h"
typedef struct {
int xoff, yoff;
int a, r, g, b;

View File

@ -1,4 +1,4 @@
#include "config.h"
#include "common.h"
#include <ft2build.h>
#include FT_FREETYPE_H
@ -9,7 +9,6 @@
#include "blend.h"
#include "colormod.h"
#include "common.h"
#include "font.h"
#include "image.h"
#include "rgbadraw.h"

View File

@ -1,4 +1,4 @@
#include "config.h"
#include "common.h"
#include <ft2build.h>
#include FT_FREETYPE_H
@ -9,7 +9,6 @@
#include "blend.h"
#include "colormod.h"
#include "common.h"
#include "file.h"
#include "font.h"
#include "image.h"

View File

@ -1,4 +1,4 @@
#include "config.h"
#include "common.h"
#include <ft2build.h>
#include FT_FREETYPE_H
@ -9,7 +9,6 @@
#include "blend.h"
#include "colormod.h"
#include "common.h"
#include "font.h"
#include "image.h"
#include "rgbadraw.h"

View File

@ -1,4 +1,4 @@
#include "config.h"
#include "common.h"
#include <ft2build.h>
#include FT_FREETYPE_H
@ -9,7 +9,6 @@
#include "blend.h"
#include "colormod.h"
#include "common.h"
#include "image.h"
#include "font.h"
#include "rgbadraw.h"

View File

@ -1,6 +1,7 @@
#include "common.h"
#include <math.h>
#include <stdlib.h>
#include "blend.h"
#include "colormod.h"

View File

@ -1,15 +1,17 @@
#include "config.h"
#include <Imlib2.h>
#include "common.h"
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "common.h"
#include "debug.h"
#include "file.h"
#include "image.h"

View File

@ -1,6 +1,10 @@
#ifndef __IMAGE
#define __IMAGE 1
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "common.h"
typedef struct _imlibldctx ImlibLdCtx;

View File

@ -1,5 +1,7 @@
#include "common.h"
#include <stdlib.h>
#include "blend.h"
#include "colormod.h"
#include "image.h"

View File

@ -1,6 +1,7 @@
#include "common.h"
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

View File

@ -1,6 +1,8 @@
#include "config.h"
#include "common.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "file.h"
#include "image.h"

View File

@ -1,3 +1,5 @@
#include "common.h"
#include <stdlib.h>
#include <string.h>

View File

@ -1,5 +1,8 @@
#include "common.h"
#include <stdlib.h>
#include <string.h>
#include "blend.h"
#include "colormod.h"
#include "image.h"

View File

@ -1,6 +1,8 @@
#include "common.h"
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "blend.h"
#include "colormod.h"

View File

@ -1,5 +1,7 @@
#include "common.h"
#include <stdlib.h>
#include "asm_c.h"
#include "blend.h"
#include "rotate.h"

View File

@ -1,6 +1,8 @@
#include "common.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include "asm_c.h"
#include "blend.h"

View File

@ -1,5 +1,6 @@
#include "config.h"
#include <Imlib2.h>
#include "common.h"
#include <ctype.h>
#include <errno.h>
@ -12,7 +13,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include "common.h"
#include "dynamic_filters.h"
#include "image.h"
#include "script.h"

View File

@ -1,5 +1,7 @@
#include "common.h"
#include <stddef.h>
#include "blend.h"
#include "colormod.h"
#include "image.h"

View File

@ -1,5 +1,8 @@
#include "common.h"
#include <stdlib.h>
#include <string.h>
#include "updates.h"
enum _t_used {

View File

@ -1,8 +1,6 @@
#ifndef __UPDATES
#define __UPDATES 1
#include "common.h"
typedef struct _ImlibUpdate {
int x, y, w, h;
struct _ImlibUpdate *next;

View File

@ -1,5 +1,6 @@
#include "common.h"
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>

View File

@ -1,5 +1,6 @@
#include "common.h"
#include <stdlib.h>
#include <X11/Xlib.h>
#include "image.h"

View File

@ -1,5 +1,7 @@
#include "common.h"
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
#include "x11_pixmap.h"

View File

@ -1,5 +1,7 @@
#include "common.h"
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/extensions/XShm.h>

View File

@ -1,5 +1,7 @@
#include "common.h"
#include <stdlib.h>
#include <string.h>
#include <X11/Xlib.h>
#include "asm_c.h"

View File

@ -1,5 +1,8 @@
#include "common.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/extensions/XShm.h>
#include <X11/Xutil.h>

View File

@ -4,8 +4,6 @@
#include <X11/Xlib.h>
#include <X11/extensions/XShm.h>
#include "common.h"
void __imlib_SetXImageCacheCountMax(Display * d, int num);
int __imlib_GetXImageCacheCountMax(Display * d);
int __imlib_GetXImageCacheCountUsed(Display * d);

View File

@ -1,8 +1,9 @@
#include "config.h"
#include <Imlib2.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "filter_common.h"
#include "colormod.h"

View File

@ -1,8 +1,9 @@
#include "config.h"
#include <Imlib2.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "filter_common.h"

View File

@ -1,7 +1,6 @@
#ifndef __FILTER_COMMON_H
#define __FILTER_COMMON_H 1
#include "config.h"
#include "common.h"
#include "dynamic_filters.h"
#include "image.h"

View File

@ -1,6 +1,7 @@
#include "config.h"
#include <Imlib2.h>
#include <stdlib.h>
#include <string.h>
#include "filter_common.h"

View File

@ -1,14 +1,13 @@
#ifndef __LOADER_COMMON_H
#define __LOADER_COMMON_H 1
#include "config.h"
#include "common.h"
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/mman.h>
#include "common.h"
#include "debug.h"
#include "image.h"
#include "loaders.h"