Fix include. Add empty lines between include layers.
This commit is contained in:
		
							parent
							
								
									50fd0fae9b
								
							
						
					
					
						commit
						7037afb2bc
					
				
							
								
								
									
										17
									
								
								src/dbus.c
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								src/dbus.c
									
									
									
									
									
								
							| @ -1,15 +1,16 @@ | ||||
| /* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */ | ||||
| 
 | ||||
| #include <stdlib.h> | ||||
| #include <stdio.h> | ||||
| #include <glib.h> | ||||
| #include <string.h> | ||||
| #include <gio/gio.h> | ||||
| #include "dunst.h" | ||||
| #include "dbus.h" | ||||
| 
 | ||||
| #include <gio/gio.h> | ||||
| #include <glib.h> | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| 
 | ||||
| #include "dunst.h" | ||||
| #include "notification.h" | ||||
| #include "utils.h" | ||||
| #include "settings.h" | ||||
| #include "utils.h" | ||||
| 
 | ||||
| GDBusConnection *dbus_conn; | ||||
| 
 | ||||
|  | ||||
| @ -3,8 +3,6 @@ | ||||
| #ifndef DUNST_DBUS_H | ||||
| #define DUNST_DBUS_H | ||||
| 
 | ||||
| #include <dbus/dbus.h> | ||||
| 
 | ||||
| #include "notification.h" | ||||
| 
 | ||||
| int initdbus(void); | ||||
|  | ||||
							
								
								
									
										45
									
								
								src/dunst.c
									
									
									
									
									
								
							
							
						
						
									
										45
									
								
								src/dunst.c
									
									
									
									
									
								
							| @ -3,41 +3,24 @@ | ||||
| #define _GNU_SOURCE | ||||
| #define XLIB_ILLEGAL_ACCESS | ||||
| 
 | ||||
| #include <assert.h> | ||||
| #include <unistd.h> | ||||
| #include <time.h> | ||||
| #include <stdio.h> | ||||
| #include <ctype.h> | ||||
| #include <stdlib.h> | ||||
| #include <stdbool.h> | ||||
| #include <string.h> | ||||
| #include <fnmatch.h> | ||||
| #include <sys/time.h> | ||||
| #include <math.h> | ||||
| #include <errno.h> | ||||
| #include <signal.h> | ||||
| #include <sys/wait.h> | ||||
| #include <glib.h> | ||||
| #include <glib-unix.h> | ||||
| #include <X11/Xlib.h> | ||||
| #include <X11/XKBlib.h> | ||||
| #include <X11/Xatom.h> | ||||
| #include <X11/Xutil.h> | ||||
| #ifdef XINERAMA | ||||
| #include <X11/extensions/Xinerama.h> | ||||
| #endif | ||||
| #include <X11/extensions/scrnsaver.h> | ||||
| 
 | ||||
| #include "dunst.h" | ||||
| #include "x.h" | ||||
| #include "dbus.h" | ||||
| #include "utils.h" | ||||
| #include "rules.h" | ||||
| #include "notification.h" | ||||
| #include "menu.h" | ||||
| 
 | ||||
| #include <X11/Xlib.h> | ||||
| #include <glib-unix.h> | ||||
| #include <glib.h> | ||||
| #include <signal.h> | ||||
| #include <stdbool.h> | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| #include <time.h> | ||||
| 
 | ||||
| #include "dbus.h" | ||||
| #include "menu.h" | ||||
| #include "notification.h" | ||||
| #include "option_parser.h" | ||||
| #include "settings.h" | ||||
| #include "x.h" | ||||
| 
 | ||||
| #define LENGTH(X)               (sizeof X / sizeof X[0]) | ||||
| 
 | ||||
|  | ||||
| @ -7,7 +7,6 @@ | ||||
| #include <stdio.h> | ||||
| #include <stdbool.h> | ||||
| 
 | ||||
| #include "x.h" | ||||
| #include "notification.h" | ||||
| 
 | ||||
| #define ERR(msg) printf("%s : %d\n", (msg), __LINE__) | ||||
|  | ||||
							
								
								
									
										27
									
								
								src/menu.c
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								src/menu.c
									
									
									
									
									
								
							| @ -1,20 +1,23 @@ | ||||
| /* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */ | ||||
| 
 | ||||
| #define _GNU_SOURCE | ||||
| #include <stdlib.h> | ||||
| #include <stdbool.h> | ||||
| #include <regex.h> | ||||
| #include <stdio.h> | ||||
| #include <string.h> | ||||
| #include <unistd.h> | ||||
| #include <errno.h> | ||||
| #include <sys/wait.h> | ||||
| #include <glib.h> | ||||
| #include "menu.h" | ||||
| 
 | ||||
| #include <errno.h> | ||||
| #include <glib.h> | ||||
| #include <regex.h> | ||||
| #include <stdbool.h> | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| #include <sys/wait.h> | ||||
| #include <unistd.h> | ||||
| 
 | ||||
| #include "dunst.h" | ||||
| #include "utils.h" | ||||
| #include "settings.h" | ||||
| #include "dbus.h" | ||||
| #include "dunst.h" | ||||
| #include "settings.h" | ||||
| #include "notification.h" | ||||
| #include "utils.h" | ||||
| 
 | ||||
| static bool is_initialized = false; | ||||
| static regex_t cregex; | ||||
|  | ||||
| @ -2,9 +2,6 @@ | ||||
| #ifndef DUNST_MENU_H | ||||
| #define DUNST_MENU_H | ||||
| 
 | ||||
| #include "dunst.h" | ||||
| #include <regex.h> | ||||
| 
 | ||||
| char *extract_urls(const char *to_match); | ||||
| void open_browser(const char *url); | ||||
| void invoke_action(const char *action); | ||||
|  | ||||
| @ -1,24 +1,26 @@ | ||||
| /* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */ | ||||
| 
 | ||||
| #define _GNU_SOURCE | ||||
| #include <stdlib.h> | ||||
| #include <time.h> | ||||
| #include <glib.h> | ||||
| #include <errno.h> | ||||
| #include <string.h> | ||||
| #include <stdbool.h> | ||||
| #include <unistd.h> | ||||
| #include <sys/wait.h> | ||||
| #include "notification.h" | ||||
| 
 | ||||
| #include <assert.h> | ||||
| #include <errno.h> | ||||
| #include <glib.h> | ||||
| #include <stdbool.h> | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| #include <sys/wait.h> | ||||
| #include <time.h> | ||||
| #include <unistd.h> | ||||
| 
 | ||||
| #include "dbus.h" | ||||
| #include "x.h" | ||||
| #include "notification.h" | ||||
| #include "dunst.h" | ||||
| #include "utils.h" | ||||
| #include "settings.h" | ||||
| #include "rules.h" | ||||
| #include "menu.h" | ||||
| #include "rules.h" | ||||
| #include "settings.h" | ||||
| #include "utils.h" | ||||
| #include "x.h" | ||||
| 
 | ||||
| int next_notification_id = 1; | ||||
| 
 | ||||
|  | ||||
| @ -2,7 +2,10 @@ | ||||
| #ifndef DUNST_NOTIFICATION_H | ||||
| #define DUNST_NOTIFICATION_H | ||||
| 
 | ||||
| #include "x.h" | ||||
| #include <glib.h> | ||||
| #include <stdbool.h> | ||||
| #include <time.h> | ||||
| 
 | ||||
| #include "settings.h" | ||||
| 
 | ||||
| #define LOW 0 | ||||
|  | ||||
| @ -1,15 +1,14 @@ | ||||
| /* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */ | ||||
| 
 | ||||
| #define _GNU_SOURCE | ||||
| #include "option_parser.h" | ||||
| 
 | ||||
| #include <string.h> | ||||
| #include <stdlib.h> | ||||
| #include <unistd.h> | ||||
| #include <glib.h> | ||||
| #include <stdbool.h> | ||||
| #include <stdio.h> | ||||
| #include <glib.h> | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| 
 | ||||
| #include "option_parser.h" | ||||
| #include "utils.h" | ||||
| 
 | ||||
| typedef struct _entry_t { | ||||
|  | ||||
| @ -2,6 +2,7 @@ | ||||
| #ifndef DUNST_OPTION_PARSER_H | ||||
| #define DUNST_OPTION_PARSER_H | ||||
| 
 | ||||
| #include <stdbool.h> | ||||
| #include <stdio.h> | ||||
| 
 | ||||
| int load_ini_file(FILE *); | ||||
|  | ||||
| @ -1,10 +1,11 @@ | ||||
| /* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */ | ||||
| 
 | ||||
| #include <glib.h> | ||||
| #include "rules.h" | ||||
| 
 | ||||
| #include <fnmatch.h> | ||||
| #include <glib.h> | ||||
| 
 | ||||
| #include "dunst.h" | ||||
| #include "rules.h" | ||||
| 
 | ||||
| /*
 | ||||
|  * Apply rule to notification. | ||||
|  | ||||
| @ -3,8 +3,8 @@ | ||||
| #define DUNST_RULES_H | ||||
| 
 | ||||
| #include <glib.h> | ||||
| #include <stdbool.h> | ||||
| 
 | ||||
| #include "dunst.h" | ||||
| #include "notification.h" | ||||
| #include "settings.h" | ||||
| 
 | ||||
|  | ||||
| @ -1,19 +1,21 @@ | ||||
| /* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */ | ||||
| 
 | ||||
| #include "settings.h" | ||||
| 
 | ||||
| #include <glib.h> | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| 
 | ||||
| #ifndef STATIC_CONFIG | ||||
| #include <basedir.h> | ||||
| #include <basedir_fs.h> | ||||
| #endif | ||||
| 
 | ||||
| #include "dunst.h" | ||||
| #include "rules.h" | ||||
| #include "option_parser.h" | ||||
| #include "settings.h" | ||||
| #include "rules.h" // put before config.h to fix missing include | ||||
| #include "config.h" | ||||
| #include "dunst.h" | ||||
| #include "notification.h" | ||||
| #include "option_parser.h" | ||||
| #include "utils.h" | ||||
| 
 | ||||
| settings_t settings; | ||||
|  | ||||
| @ -2,6 +2,10 @@ | ||||
| #ifndef DUNST_SETTINGS_H | ||||
| #define DUNST_SETTINGS_H | ||||
| 
 | ||||
| #include <stdbool.h> | ||||
| 
 | ||||
| #include "x.h" | ||||
| 
 | ||||
| enum alignment { left, center, right }; | ||||
| enum icon_position_t { icons_left, icons_right, icons_off }; | ||||
| enum separator_color { FOREGROUND, AUTO, FRAME, CUSTOM }; | ||||
|  | ||||
							
								
								
									
										13
									
								
								src/utils.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								src/utils.c
									
									
									
									
									
								
							| @ -1,14 +1,11 @@ | ||||
| /* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */ | ||||
| #define _GNU_SOURCE | ||||
| 
 | ||||
| #include <string.h> | ||||
| #include <ctype.h> | ||||
| #include <stdlib.h> | ||||
| #include <stdio.h> | ||||
| #include <glib.h> | ||||
| 
 | ||||
| #include "utils.h" | ||||
| #include "dunst.h" | ||||
| 
 | ||||
| #include <glib.h> | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| 
 | ||||
| char *string_replace_char(char needle, char replacement, char *haystack) { | ||||
|         char *current = haystack; | ||||
|  | ||||
							
								
								
									
										34
									
								
								src/x.c
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								src/x.c
									
									
									
									
									
								
							| @ -1,26 +1,30 @@ | ||||
| /* copyright 2013 Sascha Kruse and contributors (see LICENSE for licensing information) */ | ||||
| #include <math.h> | ||||
| #include <sys/time.h> | ||||
| #include <ctype.h> | ||||
| #include <assert.h> | ||||
| #include <locale.h> | ||||
| #include <stdarg.h> | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <stdbool.h> | ||||
| #include <string.h> | ||||
| #include <X11/Xlib.h> | ||||
| #include "x.h" | ||||
| 
 | ||||
| #include <X11/X.h> | ||||
| #include <X11/XKBlib.h> | ||||
| #include <X11/Xatom.h> | ||||
| #include <pango/pangocairo.h> | ||||
| #include <X11/Xlib.h> | ||||
| #include <X11/Xutil.h> | ||||
| #ifdef XINERAMA | ||||
| #include <X11/extensions/Xinerama.h> | ||||
| #include <assert.h> | ||||
| #endif | ||||
| #include <cairo-xlib.h> | ||||
| #include <gdk/gdk.h> | ||||
| #include <locale.h> | ||||
| #include <math.h> | ||||
| #include <pango/pangocairo.h> | ||||
| #include <stdbool.h> | ||||
| #include <stdio.h> | ||||
| #include <stdlib.h> | ||||
| #include <string.h> | ||||
| #include <unistd.h> | ||||
| 
 | ||||
| #include "x.h" | ||||
| #include "utils.h" | ||||
| #include "dunst.h" | ||||
| #include "settings.h" | ||||
| #include "notification.h" | ||||
| #include "settings.h" | ||||
| #include "utils.h" | ||||
| 
 | ||||
| #define WIDTH 400 | ||||
| #define HEIGHT 400 | ||||
|  | ||||
							
								
								
									
										10
									
								
								src/x.h
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/x.h
									
									
									
									
									
								
							| @ -2,16 +2,10 @@ | ||||
| #ifndef DUNST_X_H | ||||
| #define DUNST_X_H | ||||
| 
 | ||||
| #include <stdbool.h> | ||||
| #include "glib.h" | ||||
| #include <X11/Xlib.h> | ||||
| #include <X11/XKBlib.h> | ||||
| #include <X11/Xatom.h> | ||||
| #include <X11/Xutil.h> | ||||
| #ifdef XINERAMA | ||||
| #include <X11/extensions/Xinerama.h> | ||||
| #endif | ||||
| #include <X11/extensions/scrnsaver.h> | ||||
| #include <glib.h> | ||||
| #include <stdbool.h> | ||||
| 
 | ||||
| #define BUTTONMASK              (ButtonPressMask|ButtonReleaseMask) | ||||
| #define FONT_HEIGHT_BORDER 2 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 John Chen
						John Chen