Commit a1e2ecfea9db6e1f9074fd805013e3dcdfa3a526
authorDaniël Geelen <daniel.geelen+github@gmail.com>
Wed, 23 May 2018 17:03:04 +0000 (19:03 +0200)
committerDaniël Geelen <daniel.geelen+github@gmail.com>
Wed, 23 May 2018 17:03:04 +0000 (19:03 +0200)
simavr/sim/run_avr.c

index 15925cbc54cfa59c8846defd928f5a5c7d6fc8e7..7559e94139c2ba861bcadf6841f86986e2faba34 100644 (file)
@@ -122,14 +122,14 @@ main(
                } else if (!strcmp(argv[pi], "-t") || !strcmp(argv[pi], "--trace")) {
                        trace++;
                } else if (!strcmp(argv[pi], "--vcd-trace-name")) {
-                       if(pi+1>=argc) {
+                       if (pi+1>=argc) {
                                fprintf(stderr, "%s: missing mandatory argument for %s.\n", argv[0], argv[pi]);
                                exit(1);
                        }
                        ++pi;
                        strncpy(f.tracename, argv[pi], sizeof(f.tracename));
                } else if (!strcmp(argv[pi], "--add-vcd-trace")) {
-                       if(pi+1>=argc) {
+                       if (pi+1>=argc) {
                                fprintf(stderr, "%s: missing mandatory argument for %s.\n", argv[0], argv[pi]);
                                exit(1);
                        }
@@ -148,17 +148,17 @@ main(
                                &trace.addr,
                                &trace.mask
                        );
-                       if(n_args != 4) {
+                       if (n_args != 4) {
                                --pi;
                                fprintf(stderr, "%s: format for %s is name=kind@addr/mask.\n", argv[0], argv[pi]);
                                exit(1);
                        }
 
-                       /****/ if(!strcmp(trace.kind, "portpin")) {
+                       /****/ if (!strcmp(trace.kind, "portpin")) {
                                f.trace[f.tracecount].kind = AVR_MMCU_TAG_VCD_PORTPIN;
-                       } else if(!strcmp(trace.kind, "irq")) {
+                       } else if (!strcmp(trace.kind, "irq")) {
                                f.trace[f.tracecount].kind = AVR_MMCU_TAG_VCD_IRQ;
-                       } else if(!strcmp(trace.kind, "trace")) {
+                       } else if (!strcmp(trace.kind, "trace")) {
                                f.trace[f.tracecount].kind = AVR_MMCU_TAG_VCD_TRACE;
                        } else {
                                fprintf(
@@ -186,7 +186,7 @@ main(
 
                        ++f.tracecount;
                } else if (!strcmp(argv[pi], "--vcd-trace-file")) {
-                       if(pi+1>=argc) {
+                       if (pi+1>=argc) {
                                fprintf(stderr, "%s: missing mandatory argument for %s.\n", argv[0], argv[pi]);
                                exit(1);
                        }