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/avrdude@318 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
bdean 2003-04-19 23:06:01 +00:00
parent 7007ab14ba
commit fa3d83df02
1 changed files with 11 additions and 1 deletions

12
main.c
View File

@ -375,7 +375,7 @@ int main(int argc, char * argv [])
/* /*
* process command line arguments * 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) { switch (ch) {
case 'c': /* programmer id */ case 'c': /* programmer id */
@ -441,6 +441,16 @@ int main(int argc, char * argv [])
inputf = optarg; inputf = optarg;
break; 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 */ case 'f': /* specify file format */
if (strlen(optarg) != 1) { if (strlen(optarg) != 1) {
fprintf(stderr, "%s: invalid file format \"%s\"\n", fprintf(stderr, "%s: invalid file format \"%s\"\n",