Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
derf
feh
Commits
6931987a
Commit
6931987a
authored
14 years ago
by
Birte Kristina Friesel
Browse files
Options
Downloads
Patches
Plain Diff
options.c: Do not run "feh ." when calling "feh nonexistant"
parent
0d9f71a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/options.c
+8
-8
8 additions, 8 deletions
src/options.c
with
8 additions
and
8 deletions
src/options.c
+
8
−
8
View file @
6931987a
...
...
@@ -30,7 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
static
void
check_options
(
void
);
static
void
feh_getopt_theme
(
int
argc
,
char
**
argv
);
static
void
feh_parse_option_array
(
int
argc
,
char
**
argv
);
static
void
feh_parse_option_array
(
int
argc
,
char
**
argv
,
int
finalrun
);
static
void
feh_check_theme_options
(
int
arg
,
char
**
argv
);
static
void
feh_parse_options_from_string
(
char
*
opts
);
static
void
feh_load_options_for_theme
(
char
*
theme
);
...
...
@@ -94,7 +94,7 @@ void init_parse_options(int argc, char **argv)
D
((
"About to parse commandline options
\n
"
));
/* Parse the cmdline args */
feh_parse_option_array
(
argc
,
argv
);
feh_parse_option_array
(
argc
,
argv
,
1
);
/* If we have a filelist to read, do it now */
if
(
opt
.
filelistfile
)
{
...
...
@@ -111,10 +111,8 @@ void init_parse_options(int argc, char **argv)
return
;
filelist_len
=
gib_list_length
(
filelist
);
if
(
!
filelist_len
)
{
add_file_to_filelist_recursively
(
"."
,
FILELIST_FIRST
);
filelist_len
=
gib_list_length
(
filelist
);
}
if
(
!
filelist_len
)
show_mini_usage
();
check_options
();
...
...
@@ -258,7 +256,7 @@ static void feh_parse_options_from_string(char *opts)
last
=
*
t
;
}
feh_parse_option_array
(
num
,
list
);
feh_parse_option_array
(
num
,
list
,
0
);
for
(
i
=
0
;
i
<
num
;
i
++
)
if
(
list
[
i
])
...
...
@@ -320,7 +318,7 @@ static void feh_getopt_theme(int argc, char **argv)
optind
=
0
;
}
static
void
feh_parse_option_array
(
int
argc
,
char
**
argv
)
static
void
feh_parse_option_array
(
int
argc
,
char
**
argv
,
int
finalrun
)
{
static
char
stropts
[]
=
"a:A:b:B:cC:dD:e:E:f:Fg:GhH:iIj:J:kK:lL:mM:nNo:O:pPqrR:sS:tT:uUvVwW:xXy:YzZ"
...
...
@@ -789,6 +787,8 @@ static void feh_parse_option_array(int argc, char **argv)
add_file_to_filelist_recursively
(
argv
[
optind
++
],
FILELIST_FIRST
);
}
}
else
if
(
finalrun
&&
!
opt
.
filelistfile
)
add_file_to_filelist_recursively
(
"."
,
FILELIST_FIRST
);
/* So that we can safely be called again */
optind
=
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment