List additional features in usage message (-v)
This commit is contained in:
		
							parent
							
								
									6e575b0f72
								
							
						
					
					
						commit
						79d780a701
					
				
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @ -1,4 +1,4 @@ | |||||||
| VERSION = git-20110908 | VERSION = git-20110910 | ||||||
| 
 | 
 | ||||||
| CC      = gcc | CC      = gcc | ||||||
| CFLAGS  = -Wall -pedantic -O2 | CFLAGS  = -Wall -pedantic -O2 | ||||||
|  | |||||||
							
								
								
									
										19
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								README.md
									
									
									
									
									
								
							| @ -17,8 +17,8 @@ Features | |||||||
| * Basic support for multi-frame images | * Basic support for multi-frame images | ||||||
| * Display image information in window title | * Display image information in window title | ||||||
| 
 | 
 | ||||||
| Additional features, that need to be included at compile-time--see next section | Additional features, that need to be included at compile-time--see section | ||||||
| on how to enable them: | *Installation* on how to enable them: | ||||||
| 
 | 
 | ||||||
| * Play GIF animations | * Play GIF animations | ||||||
| * Auto-orientate JPEG images according to their EXIF tags | * Auto-orientate JPEG images according to their EXIF tags | ||||||
| @ -57,14 +57,13 @@ check and change them, so that they fit your needs. | |||||||
| Additional features | Additional features | ||||||
| ------------------- | ------------------- | ||||||
| 
 | 
 | ||||||
| The XFLAGS and XLIBS macros/environment variables control which additional | The XFLAGS and XLIBS macros control which additional features (non-default | ||||||
| features (i.e. non-default compile-time features) should be enabled and | compile-time features) should be enabled and included during compilation. | ||||||
| included during compilation. |  | ||||||
| 
 | 
 | ||||||
| The following table lists the available additional features--the column | The following table lists the available additional features--the column | ||||||
| *Requires* indicates, which libraries need to be installed for a feature; the | *Requires* indicates, which libraries need to be installed for a feature; the | ||||||
| columns *XFLAGS* and *XLIBS* show, what needs to be added to these | columns *XFLAGS* and *XLIBS* show, what needs to be added to these macros to | ||||||
| macros/environment variables to enable the corresponding feature: | enable the corresponding feature: | ||||||
| 
 | 
 | ||||||
|     Feature                           | Requires | XFLAGS         | XLIBS |     Feature                           | Requires | XFLAGS         | XLIBS | ||||||
|     ----------------------------------+----------+----------------+-------- |     ----------------------------------+----------+----------------+-------- | ||||||
| @ -87,9 +86,9 @@ Or you need to run the following commands before building sxiv: | |||||||
| 
 | 
 | ||||||
| Usage | Usage | ||||||
| ===== | ===== | ||||||
| sxiv has two modes of operation: image and thumbnail mode. The default is image | sxiv has two modes of operation: image and thumbnail mode. The default is | ||||||
| mode, in which only the current image is shown. In thumbnail mode a grid of | image mode, in which only the current image is shown. In thumbnail mode a grid | ||||||
| small previews is displayed, making it easy to choose an image to open. | of small previews is displayed, making it easy to choose an image to open. | ||||||
| 
 | 
 | ||||||
| sxiv supports the following command-line options: | sxiv supports the following command-line options: | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										20
									
								
								options.c
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								options.c
									
									
									
									
									
								
							| @ -33,11 +33,24 @@ options_t _options; | |||||||
| const options_t *options = (const options_t*) &_options; | const options_t *options = (const options_t*) &_options; | ||||||
| 
 | 
 | ||||||
| void print_usage() { | void print_usage() { | ||||||
| 	printf("usage: sxiv [-cdFfhpqrstvZ] [-g GEOMETRY] [-n NUM] [-z ZOOM] FILES...\n"); | 	printf("usage: sxiv [-cdFfhpqrstvZ] [-g GEOMETRY] [-n NUM] " | ||||||
|  | 	       "[-z ZOOM] FILES...\n"); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void print_version() { | void print_version() { | ||||||
| 	printf("sxiv %s - simple x image viewer\n", VERSION); | 	printf("sxiv %s - Simple X Image Viewer\n", VERSION); | ||||||
|  | 	printf("Additional features included (+) or not (-): %s, %s\n", | ||||||
|  | #ifdef EXIF_SUPPORT | ||||||
|  | 	       "+exif", | ||||||
|  | #else | ||||||
|  | 	       "-exif", | ||||||
|  | #endif | ||||||
|  | #ifdef GIF_SUPPORT | ||||||
|  | 	       "+gif" | ||||||
|  | #else | ||||||
|  | 	       "-gif" | ||||||
|  | #endif | ||||||
|  | 	      ); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void parse_options(int argc, char **argv) { | void parse_options(int argc, char **argv) { | ||||||
| @ -119,9 +132,8 @@ void parse_options(int argc, char **argv) { | |||||||
| 					fprintf(stderr, "sxiv: invalid argument for option -z: %s\n", | 					fprintf(stderr, "sxiv: invalid argument for option -z: %s\n", | ||||||
| 					        optarg); | 					        optarg); | ||||||
| 					exit(1); | 					exit(1); | ||||||
| 				} else { |  | ||||||
| 					_options.zoom = z / 100.0; |  | ||||||
| 				} | 				} | ||||||
|  | 				_options.zoom = z / 100.0; | ||||||
| 				break; | 				break; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Bert
						Bert