From 5425342a0b9ca0a20a2e8e380b2b6af42e7ca80c Mon Sep 17 00:00:00 2001
From: "Brian S. Dean" <bsd@bsdhome.com>
Date: Sat, 19 Apr 2003 23:06:01 +0000
Subject: [PATCH] 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
---
 main.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/main.c b/main.c
index 848eb576..e66c66fa 100644
--- a/main.c
+++ b/main.c
@@ -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",