Comments (3)
I can't reproduce the segfault, but I do get the error messages. Looks like another case of weird memory management in feh/getopt... I'll see what I can do about it.
from feh.
I think I found the problem... and the fix is so simple:
diff --git a/src/options.c b/src/options.c
index b5a95dd..052f8a8 100644
--- a/src/options.c
+++ b/src/options.c
@@ -794,7 +794,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
add_file_to_filelist_recursively(".", FILELIST_FIRST);
/* So that we can safely be called again */
- optind = 1;
+ optind = 0;
return;
}
from manpage:
A program that scans multiple argument vectors, or [snip], or changes the value of POSIXLY_CORRECT between scans, must reinitialize getopt() by resetting optind to 0, rather than the traditional value of 1. (Resetting to 0 forces the invocation of an internal initialization routine that rechecks POSIXLY_CORRECT and checks for GNU extensions in optstring.)
A small suggestion, "--debug" should be a special case, when loading theme options, there are some D()
used, but they will never print anything out since "--debug" at least have to wait until theme options are processed. There should be a quick check on debug option at very early stage.
from feh.
Ooh. Yeah, that's looking good. Looks like I missed that while reading the documentation...
Thanks!
As for --debug: Right now it's useless for debugging getopt stuff, yeah. But I don't want yet another special case, I think I'll create a compile time switch for that (make debug=2 or similar). That way, you can really debug everything.
from feh.
Related Issues (20)
- Please introduce an option for interpolation on resize HOT 2
- Auto rotate disable for portrait oriantation.
- Different buttons for different modes? HOT 1
- Bug: Default window geometry does not increase with --zoom
- Automatic rescaling when resizing the window
- add none sort_type HOT 2
- use stat for sorting by size like we do with mtime HOT 1
- use stat for sorting by size like we do with mtime HOT 1
- feh only zooms correctly in bspwm after modifying window HOT 1
- Feature request: Variable display times in slideshow mode HOT 2
- feh modifies a passed filelist HOT 4
- make appimage file or binary file
- Feh crashes with SIGBUS when rapidly changing the underliying file HOT 5
- --keep-zoom and preserving window geometry
- right click crash HOT 1
- feh does not open ppm files which use the P3 version
- Feh's signal handler is not async-signal-safe
- Add option to enable aliasing
- FEH problem -c HOT 2
- feh -c option not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feh.