|
|
@ -30,7 +30,7 @@ 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 [-dFfhpqrsvZ] [-g GEOMETRY] [-z ZOOM] FILES...\n");
|
|
|
|
printf("usage: sxiv [-dFfhpqrstvZ] [-g GEOMETRY] [-z ZOOM] FILES...\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void print_version() {
|
|
|
|
void print_version() {
|
|
|
@ -45,6 +45,7 @@ void parse_options(int argc, char **argv) {
|
|
|
|
_options.scalemode = SCALE_MODE;
|
|
|
|
_options.scalemode = SCALE_MODE;
|
|
|
|
_options.zoom = 1.0;
|
|
|
|
_options.zoom = 1.0;
|
|
|
|
_options.aa = 1;
|
|
|
|
_options.aa = 1;
|
|
|
|
|
|
|
|
_options.thumbnails = 0;
|
|
|
|
|
|
|
|
|
|
|
|
_options.fixed = 0;
|
|
|
|
_options.fixed = 0;
|
|
|
|
_options.fullscreen = 0;
|
|
|
|
_options.fullscreen = 0;
|
|
|
@ -53,7 +54,7 @@ void parse_options(int argc, char **argv) {
|
|
|
|
_options.quiet = 0;
|
|
|
|
_options.quiet = 0;
|
|
|
|
_options.recursive = 0;
|
|
|
|
_options.recursive = 0;
|
|
|
|
|
|
|
|
|
|
|
|
while ((opt = getopt(argc, argv, "dFfg:hpqrsvZz:")) != -1) {
|
|
|
|
while ((opt = getopt(argc, argv, "dFfg:hpqrstvZz:")) != -1) {
|
|
|
|
switch (opt) {
|
|
|
|
switch (opt) {
|
|
|
|
case '?':
|
|
|
|
case '?':
|
|
|
|
print_usage();
|
|
|
|
print_usage();
|
|
|
@ -85,6 +86,9 @@ void parse_options(int argc, char **argv) {
|
|
|
|
case 's':
|
|
|
|
case 's':
|
|
|
|
_options.scalemode = SCALE_FIT;
|
|
|
|
_options.scalemode = SCALE_FIT;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 't':
|
|
|
|
|
|
|
|
_options.thumbnails = 1;
|
|
|
|
|
|
|
|
break;
|
|
|
|
case 'v':
|
|
|
|
case 'v':
|
|
|
|
print_version();
|
|
|
|
print_version();
|
|
|
|
exit(0);
|
|
|
|
exit(0);
|
|
|
|