Fix 1887179, and add new command line option "-i"

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@999 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 17 years ago
parent 1ee93ee5f3
commit fec0b29826

@ -1,3 +1,9 @@
2008-02-07 Kolja Waschk <kawk>
* src/jtag.c, doc/jtag.1: Fix dropthrough to caller if -n was given
(fixes [1887179] reported by A.Dyer), add command line option "-i"
to run interactive mode even after executing commands from files
2008-02-07 Arnim Laeuger <arniml@users.sourceforge.net>
* src/tap/cable/ft2232.c (ft2232_connect): check parport driver setting

@ -17,6 +17,9 @@ UrJTAG is a software package which enables working with JTAG-aware (IEEE
.I \-h, \-\-help
Display a short help text and exit
.TP
.I \-i, \-\-interactive
Enter interactive mode after executing commands from files (this is the default if no files are named on the command line)
.TP
.I \-n, \-\-norc
Disable reading ~/.jtag/rc on startup
.TP

@ -336,6 +336,7 @@ main( int argc, char *const argv[] )
int i;
int c;
int norc = 0;
int interactive = 0;
int help = 0;
int version = 0;
@ -358,6 +359,7 @@ main( int argc, char *const argv[] )
{
{"version", no_argument, 0, 'v'},
{"norc", no_argument, 0, 'n'},
{"interactive", no_argument, 0, 'i'},
{"help", no_argument, 0, 'h'},
{0, 0, 0, 0}
};
@ -365,7 +367,7 @@ main( int argc, char *const argv[] )
/* `getopt_long' stores the option index here. */
int option_index = 0;
c = getopt_long (argc, argv, "vnh",
c = getopt_long (argc, argv, "vnhi",
long_options, &option_index);
/* Detect the end of the options. */
@ -382,6 +384,10 @@ main( int argc, char *const argv[] )
norc = 1;
break;
case 'i':
interactive = 1;
break;
case 'h':
default:
help = 1;
@ -401,10 +407,9 @@ main( int argc, char *const argv[] )
printf (_(" -h, --help display this help and exit\n"));
printf (_(" -v, --version display version information and exit\n"));
printf ("\n");
printf (_(" -n, --norc disable reading ~/.jtag/rc on startup\n"));
printf (_(" -i, --interactive enter interactive mode after reading files\n"));
printf ("\n");
printf (_(" [FILE] file containing commands to execute\n"));
printf ("\n");
@ -455,7 +460,8 @@ main( int argc, char *const argv[] )
break;
}
}
return 0;
if(!interactive) return 0;
}
/* input from stdin */
@ -497,7 +503,7 @@ main( int argc, char *const argv[] )
jtag_create_jtagdir();
/* Parse and execute the RC file */
if(!norc) go = jtag_parse_rc();
go = norc ? 1 : jtag_parse_rc();
if (go) {

Loading…
Cancel
Save