Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/clujtag-client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCluster <clusterrr@clusterrr.com>2015-05-28 09:04:08 +0300
committerCluster <clusterrr@clusterrr.com>2015-05-28 09:04:08 +0300
commit5aea2c6200f7f8139de1d6d7f56b7e38606df9db (patch)
treee6be630b4192c07b4a212758598ebadb3e0a6ad8
parentae4ca7b644b002844443d764ac39fe32732787a2 (diff)
Some fixes
-rw-r--r--clujtag.c42
-rw-r--r--clujtag.exebin93360 -> 93536 bytes
2 files changed, 22 insertions, 20 deletions
diff --git a/clujtag.c b/clujtag.c
index 5d5a525..33ead70 100644
--- a/clujtag.c
+++ b/clujtag.c
@@ -478,24 +478,7 @@ int main(int argc, char **argv)
break;
case 'x':
case 's':
- gotaction = 1;
- if (verbose)
- fprintf(stderr, "Playing %s file `%s'.\n", opt == 's' ? "SVF" : "XSVF", optarg);
- if (!strcmp(optarg, "-"))
- f = stdin;
- else
- f = fopen(optarg, "rb");
- if (f == NULL) {
- fprintf(stderr, "Can't open %s file `%s': %s\n", opt == 's' ? "SVF" : "XSVF", optarg, strerror(errno));
- rc = 1;
- break;
- }
- if (libxsvf_play(&h, opt == 's' ? LIBXSVF_MODE_SVF : LIBXSVF_MODE_XSVF) < 0) {
- fprintf(stderr, "Error while playing %s file `%s'.\n", opt == 's' ? "SVF" : "XSVF", optarg);
- rc = 1;
- }
- if (strcmp(optarg, "-"))
- fclose(f);
+ gotaction = opt;
break;
case 'c':
gotaction = 1;
@@ -514,9 +497,28 @@ int main(int argc, char **argv)
break;
}
}
-
- if (!gotaction)
+
+ if (gotaction)
+ {
+ if (verbose)
+ fprintf(stderr, "Playing %s file `%s'.\n", opt == 's' ? "SVF" : "XSVF", optarg);
+ if (!strcmp(optarg, "-"))
+ f = stdin;
+ else
+ f = fopen(optarg, "rb");
+ if (f == NULL) {
+ fprintf(stderr, "Can't open %s file `%s': %s\n", opt == 's' ? "SVF" : "XSVF", optarg, strerror(errno));
+ rc = 1;
+ }
+ if (libxsvf_play(&h, opt == 's' ? LIBXSVF_MODE_SVF : LIBXSVF_MODE_XSVF) < 0) {
+ fprintf(stderr, "Error while playing %s file `%s'.\n", opt == 's' ? "SVF" : "XSVF", optarg);
+ rc = 1;
+ }
+ if (strcmp(optarg, "-"))
+ fclose(f);
+ } else {
help();
+ }
if (rc == 0) {
fprintf(stderr, "Done!\n");
diff --git a/clujtag.exe b/clujtag.exe
index 270d223..4f037e3 100644
--- a/clujtag.exe
+++ b/clujtag.exe
Binary files differ