projects
/
libam7xxx.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5ec0c02
)
picoproj: issue a warning when passing "-f" more than once
author
Antonio Ospite <ospite@studenti.unina.it>
Thu, 10 May 2012 10:10:45 +0000
(12:10 +0200)
committer
Antonio Ospite <ospite@studenti.unina.it>
Thu, 10 May 2012 13:58:00 +0000
(15:58 +0200)
examples/picoproj.c
patch
|
blob
|
history
diff --git
a/examples/picoproj.c
b/examples/picoproj.c
index
a44a266
..
e18cc7d
100644
(file)
--- a/
examples/picoproj.c
+++ b/
examples/picoproj.c
@@
-74,6
+74,8
@@
int main(int argc, char *argv[])
while ((opt = getopt(argc, argv, "f:F:l:p:W:H:h")) != -1) {
switch (opt) {
case 'f':
while ((opt = getopt(argc, argv, "f:F:l:p:W:H:h")) != -1) {
switch (opt) {
case 'f':
+ if (filename[0] != '\0')
+ fprintf(stderr, "Warning: image file already specified\n");
strncpy(filename, optarg, FILENAME_MAX);
break;
case 'F':
strncpy(filename, optarg, FILENAME_MAX);
break;
case 'F':