freebsd-ports/graphics/pho/files/patch-options
Alexey Dokuchaev 35a180fa53 Teach pho to skip further options handling (previously, it was impossible to
view files which names start with `-').  Bump PORTREVISION.
2006-09-11 09:10:19 +00:00

34 lines
969 B
Text

--- gmain.c.orig Mon Jul 25 12:18:05 2005
+++ gmain.c Mon Sep 11 16:05:05 2006
@@ -643,9 +643,11 @@
int main(int argc, char** argv)
{
+ int options = 1;
+
while (argc > 1)
{
- if (argv[1][0] == '-') {
+ if (argv[1][0] == '-' && options) {
if (argv[1][1] == 'd')
gDebug = 1;
else if (argv[1][1] == 'h')
@@ -656,6 +658,8 @@
gMakeNewWindows = 1;
else if (argv[1][1] == 'p')
gPresentationMode = 1;
+ else if (argv[1][1] == '-')
+ options = 0;
else Usage();
}
else {
--- pho.c.orig Mon Mar 21 07:28:03 2005
+++ pho.c Mon Sep 11 16:05:05 2006
@@ -439,6 +439,7 @@
printf("\t-d: Debug messages\n");
printf("\t-h: Help: Print this summary\n");
printf("\t-v: Verbose help: Print a summary of key bindings\n");
+ printf("\t--: Assume no more options are given\n");
exit(1);
}