Added STREQ macro
This commit is contained in:
		
							parent
							
								
									d08408e942
								
							
						
					
					
						commit
						d721d8453e
					
				
							
								
								
									
										4
									
								
								image.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								image.c
									
									
									
									
									
								
							| @ -303,11 +303,11 @@ bool img_load(img_t *img, const fileinfo_t *file) { | |||||||
| 	(void) fmt; | 	(void) fmt; | ||||||
| 
 | 
 | ||||||
| #if EXIF_SUPPORT | #if EXIF_SUPPORT | ||||||
| 	if (!strcmp(fmt, "jpeg")) | 	if (STREQ(fmt, "jpeg")) | ||||||
| 		exif_auto_orientate(file); | 		exif_auto_orientate(file); | ||||||
| #endif | #endif | ||||||
| #if GIF_SUPPORT | #if GIF_SUPPORT | ||||||
| 	if (!strcmp(fmt, "gif")) | 	if (STREQ(fmt, "gif")) | ||||||
| 		img_load_gif(img, file); | 		img_load_gif(img, file); | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -140,5 +140,5 @@ void parse_options(int argc, char **argv) { | |||||||
| 	_options.filenames = argv + optind; | 	_options.filenames = argv + optind; | ||||||
| 	_options.filecnt = argc - optind; | 	_options.filecnt = argc - optind; | ||||||
| 	_options.from_stdin = _options.filecnt == 1 && | 	_options.from_stdin = _options.filecnt == 1 && | ||||||
| 	                      !strcmp(_options.filenames[0], "-"); | 	                      STREQ(_options.filenames[0], "-"); | ||||||
| } | } | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								thumbs.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								thumbs.c
									
									
									
									
									
								
							| @ -255,7 +255,7 @@ bool tns_load(tns_t *tns, int n, const fileinfo_t *file, | |||||||
| 	(void) fmt; | 	(void) fmt; | ||||||
| 
 | 
 | ||||||
| #if EXIF_SUPPORT | #if EXIF_SUPPORT | ||||||
| 	if (!cache_hit && !strcmp(fmt, "jpeg")) | 	if (!cache_hit && STREQ(fmt, "jpeg")) | ||||||
| 		exif_auto_orientate(file); | 		exif_auto_orientate(file); | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								util.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								util.c
									
									
									
									
									
								
							| @ -270,7 +270,7 @@ char* r_readdir(r_dir_t *rdir) { | |||||||
| 
 | 
 | ||||||
| 	while (1) { | 	while (1) { | ||||||
| 		if (rdir->dir && (dentry = readdir(rdir->dir))) { | 		if (rdir->dir && (dentry = readdir(rdir->dir))) { | ||||||
| 			if (!strcmp(dentry->d_name, ".") || !strcmp(dentry->d_name, "..")) | 			if (STREQ(dentry->d_name, ".") || STREQ(dentry->d_name, "..")) | ||||||
| 				continue; | 				continue; | ||||||
| 
 | 
 | ||||||
| 			len = strlen(rdir->name) + strlen(dentry->d_name) + 2; | 			len = strlen(rdir->name) + strlen(dentry->d_name) + 2; | ||||||
|  | |||||||
							
								
								
									
										4
									
								
								util.h
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								util.h
									
									
									
									
									
								
							| @ -30,7 +30,9 @@ | |||||||
| #define MAX(a,b) ((a) > (b) ? (a) : (b)) | #define MAX(a,b) ((a) > (b) ? (a) : (b)) | ||||||
| #endif | #endif | ||||||
| 
 | 
 | ||||||
| #define ARRLEN(a) (sizeof(a) / sizeof(a[0])) | #define ARRLEN(a) (sizeof(a) / sizeof((a)[0])) | ||||||
|  | 
 | ||||||
|  | #define STREQ(a,b) (!strcmp((a), (b))) | ||||||
| 
 | 
 | ||||||
| #define TIMEDIFF(t1,t2) (((t1)->tv_sec - (t2)->tv_sec) * 1000 +  \ | #define TIMEDIFF(t1,t2) (((t1)->tv_sec - (t2)->tv_sec) * 1000 +  \ | ||||||
|                          ((t1)->tv_usec - (t2)->tv_usec) / 1000) |                          ((t1)->tv_usec - (t2)->tv_usec) / 1000) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Bert Münnich
						Bert Münnich