projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bc74a0
)
demos: improve argv parsing in fslight.c
author
Brian Paul
<brianp@vmware.com>
Thu, 18 Jun 2009 18:43:43 +0000
(12:43 -0600)
committer
Brian Paul
<brianp@vmware.com>
Fri, 26 Jun 2009 19:16:32 +0000
(13:16 -0600)
progs/demos/fslight.c
patch
|
blob
|
history
diff --git
a/progs/demos/fslight.c
b/progs/demos/fslight.c
index 41a13cc9f468b8e0940389f9d7b84e5510194319..f0d76a4a06fb50de4ec40ba530cf4c3bf179b229 100644
(file)
--- a/
progs/demos/fslight.c
+++ b/
progs/demos/fslight.c
@@
-583,10
+583,14
@@
ParseOptions(int argc, char *argv[])
int i;
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-fs") == 0) {
- FragProgFile = argv[
i+1
];
+ FragProgFile = argv[
++i
];
}
else if (strcmp(argv[i], "-vs") == 0) {
- VertProgFile = argv[i+1];
+ VertProgFile = argv[++i];
+ }
+ else {
+ fprintf(stderr, "unknown option %s\n", argv[i]);
+ break;
}
}
}