Add a shortcut option, '-I' which is the same as '-i' but defaults the

file format type to 'immediate mode' where the filename is assumed to
be the memory data itself.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@318 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Brian S. Dean 2003-04-19 23:06:01 +00:00
parent 57c7412a3c
commit 2528839c95
1 changed files with 11 additions and 1 deletions

View File

@ -375,7 +375,7 @@ int main(int argc, char * argv [])
/*
* process command line arguments
*/
while ((ch = getopt(argc,argv,"?c:C:eE:f:Fi:m:no:p:P:tvVyY:")) != -1) {
while ((ch = getopt(argc,argv,"?c:C:eE:f:FiI:m:no:p:P:tvVyY:")) != -1) {
switch (ch) {
case 'c': /* programmer id */
@ -441,6 +441,16 @@ int main(int argc, char * argv [])
inputf = optarg;
break;
case 'I': /* specify input file and assume 'immediate mode' */
if (outputf || terminal) {
fprintf(stderr,"%s: -o, -I, and -t are incompatible\n\n", progname);
return 1;
}
doread = 0;
inputf = optarg;
filefmt = FMT_IMM;
break;
case 'f': /* specify file format */
if (strlen(optarg) != 1) {
fprintf(stderr, "%s: invalid file format \"%s\"\n",