Krolyxon
Commit 79d780a

Branches

Refs →

nsxiv79d780a

List additional features in usage message (-v)

Author
Bert
Date
2011-09-10 12:29 +0200
Parent
6e575b0
Commit
79d780a701e47ea1aacf49728e28900bb2b17743

+26 −15

3 files changed

  1. M Makefile +1 −1
  2. M README.md +9 −10
  3. M options.c +16 −4
M Makefile View
@@ -1,4 +1,4 @@
1−VERSION = git-20110908
1+VERSION = git-20110910
22
33 CC = gcc
44 CFLAGS = -Wall -pedantic -O2
M README.md View
@@ -17,8 +17,8 @@ Features
1717 * Basic support for multi-frame images
1818 * Display image information in window title
1919
20−Additional features, that need to be included at compile-time--see next section
21−on how to enable them:
20+Additional features, that need to be included at compile-time--see section
21+*Installation* on how to enable them:
2222
2323 * Play GIF animations
2424 * Auto-orientate JPEG images according to their EXIF tags
@@ -57,14 +57,13 @@ check and change them, so that they fit your needs.
5757 Additional features
5858 -------------------
5959
60−The XFLAGS and XLIBS macros/environment variables control which additional
61−features (i.e. non-default compile-time features) should be enabled and
62−included during compilation.
60+The XFLAGS and XLIBS macros control which additional features (non-default
61+compile-time features) should be enabled and included during compilation.
6362
6463 The following table lists the available additional features--the column
6564 *Requires* indicates, which libraries need to be installed for a feature; the
66−columns *XFLAGS* and *XLIBS* show, what needs to be added to these
67−macros/environment variables to enable the corresponding feature:
65+columns *XFLAGS* and *XLIBS* show, what needs to be added to these macros to
66+enable the corresponding feature:
6867
6968 Feature | Requires | XFLAGS | XLIBS
7069 ----------------------------------+----------+----------------+--------
@@ -87,9 +86,9 @@ Or you need to run the following commands before building sxiv:
8786
8887 Usage
8988 =====
90−sxiv has two modes of operation: image and thumbnail mode. The default is image
91−mode, in which only the current image is shown. In thumbnail mode a grid of
92−small previews is displayed, making it easy to choose an image to open.
89+sxiv has two modes of operation: image and thumbnail mode. The default is
90+image mode, in which only the current image is shown. In thumbnail mode a grid
91+of small previews is displayed, making it easy to choose an image to open.
9392
9493 sxiv supports the following command-line options:
9594
M options.c View
@@ -33,11 +33,24 @@ options_t _options;
3333 const options_t *options = (const options_t*) &_options;
3434
3535 void print_usage() {
36− printf("usage: sxiv [-cdFfhpqrstvZ] [-g GEOMETRY] [-n NUM] [-z ZOOM] FILES...\n");
36+ printf("usage: sxiv [-cdFfhpqrstvZ] [-g GEOMETRY] [-n NUM] "
37+ "[-z ZOOM] FILES...\n");
3738 }
3839
3940 void print_version() {
40− printf("sxiv %s - simple x image viewer\n", VERSION);
41+ printf("sxiv %s - Simple X Image Viewer\n", VERSION);
42+ printf("Additional features included (+) or not (-): %s, %s\n",
43+#ifdef EXIF_SUPPORT
44+ "+exif",
45+#else
46+ "-exif",
47+#endif
48+#ifdef GIF_SUPPORT
49+ "+gif"
50+#else
51+ "-gif"
52+#endif
53+ );
4154 }
4255
4356 void parse_options(int argc, char **argv) {
@@ -119,9 +132,8 @@ void parse_options(int argc, char **argv) {
119132 fprintf(stderr, "sxiv: invalid argument for option -z: %s\n",
120133 optarg);
121134 exit(1);
122− } else {
123− _options.zoom = z / 100.0;
124135 }
136+ _options.zoom = z / 100.0;
125137 break;
126138 }
127139 }