Renamed FATAL to DIE
This commit is contained in:
		
							parent
							
								
									2a2f0307c1
								
							
						
					
					
						commit
						bb4edc756c
					
				
							
								
								
									
										2
									
								
								image.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								image.c
									
									
									
									
									
								
							| @ -40,7 +40,7 @@ void img_load(img_t *img, char *filename) { | |||||||
| 		imlib_free_image(); | 		imlib_free_image(); | ||||||
| 
 | 
 | ||||||
| 	if (!(img->im = imlib_load_image(filename))) | 	if (!(img->im = imlib_load_image(filename))) | ||||||
| 		FATAL("could not open image: %s", filename); | 		DIE("could not open image: %s", filename); | ||||||
| 	 | 	 | ||||||
| 	imlib_context_set_image(img->im); | 	imlib_context_set_image(img->im); | ||||||
| 	 | 	 | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								sxiv.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								sxiv.h
									
									
									
									
									
								
							| @ -30,7 +30,7 @@ | |||||||
| 		fprintf(stderr, "\n");                                         \ | 		fprintf(stderr, "\n");                                         \ | ||||||
| 	} while (0) | 	} while (0) | ||||||
| 
 | 
 | ||||||
| #define FATAL(...)                                                 \ | #define DIE(...)                                                 \ | ||||||
|   do {                                                             \ |   do {                                                             \ | ||||||
| 		fprintf(stderr, "sxiv: %s:%d: error: ", __FILE__, __LINE__);   \ | 		fprintf(stderr, "sxiv: %s:%d: error: ", __FILE__, __LINE__);   \ | ||||||
| 		fprintf(stderr, __VA_ARGS__);                                  \ | 		fprintf(stderr, __VA_ARGS__);                                  \ | ||||||
|  | |||||||
							
								
								
									
										6
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								window.c
									
									
									
									
									
								
							| @ -37,7 +37,7 @@ void win_open(win_t *win) { | |||||||
| 	e = &win->env; | 	e = &win->env; | ||||||
| 
 | 
 | ||||||
| 	if (!(e->dpy = XOpenDisplay(NULL))) | 	if (!(e->dpy = XOpenDisplay(NULL))) | ||||||
| 		FATAL("could not open display"); | 		DIE("could not open display"); | ||||||
| 	 | 	 | ||||||
| 	e->scr = DefaultScreen(e->dpy); | 	e->scr = DefaultScreen(e->dpy); | ||||||
| 	e->scrw = DisplayWidth(e->dpy, e->scr); | 	e->scrw = DisplayWidth(e->dpy, e->scr); | ||||||
| @ -49,7 +49,7 @@ void win_open(win_t *win) { | |||||||
| 
 | 
 | ||||||
| 	if (!XAllocNamedColor(e->dpy, DefaultColormap(e->dpy, e->scr), BG_COLOR, | 	if (!XAllocNamedColor(e->dpy, DefaultColormap(e->dpy, e->scr), BG_COLOR, | ||||||
| 		                    &bgcol, &bgcol)) | 		                    &bgcol, &bgcol)) | ||||||
| 		FATAL("could not allocate color: %s", BG_COLOR); | 		DIE("could not allocate color: %s", BG_COLOR); | ||||||
| 
 | 
 | ||||||
| 	if (win->w > e->scrw) | 	if (win->w > e->scrw) | ||||||
| 		win->w = e->scrw; | 		win->w = e->scrw; | ||||||
| @ -67,7 +67,7 @@ void win_open(win_t *win) { | |||||||
| 	                          win->x, win->y, win->w, win->h, 0, | 	                          win->x, win->y, win->w, win->h, 0, | ||||||
| 	                          e->depth, InputOutput, e->vis, mask, &attr); | 	                          e->depth, InputOutput, e->vis, mask, &attr); | ||||||
| 	if (win->xwin == None) | 	if (win->xwin == None) | ||||||
| 		FATAL("could not create window"); | 		DIE("could not create window"); | ||||||
| 	 | 	 | ||||||
| 	XSelectInput(e->dpy, win->xwin, | 	XSelectInput(e->dpy, win->xwin, | ||||||
| 	             StructureNotifyMask | ExposureMask | KeyPressMask); | 	             StructureNotifyMask | ExposureMask | KeyPressMask); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Bert
						Bert