Print out a list of valid parts for '-p ?' and a list of valid

programmers for '-c ?'.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@254 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Brian S. Dean 2003-03-05 00:53:49 +00:00
parent 143e30d32c
commit bec6fe57d4
1 changed files with 21 additions and 0 deletions

21
main.c
View File

@ -565,6 +565,27 @@ int main(int argc, char * argv [])
fprintf(stderr, "\n");
}
if (partdesc) {
if (strcmp(partdesc, "?") == 0) {
fprintf(stderr, "\n");
fprintf(stderr,"Valid parts are:\n");
list_parts(stderr, " ", part_list);
fprintf(stderr, "\n");
exit(1);
}
}
if (programmer) {
if (strcmp(programmer, "?") == 0) {
fprintf(stderr, "\n");
fprintf(stderr,"Valid programmers are:\n");
list_programmers(stderr, " ", programmers);
fprintf(stderr,"\n");
exit(1);
}
}
if (programmer[0] == 0) {
fprintf(stderr,
"\n%s: no programmer has been specified on the command line "