tracediff (5725:61c838ecc225) tracediff (5751:54cb03a1a577)
1#! /usr/bin/env perl
2# Copyright (c) 2003-2007 The Regents of The University of Michigan
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 73 unchanged lines hidden (view full) ---

82}
83
84if (@ARGV < 1) {
85 die "Usage: tracediff [-n] \"sim1|sim2\" [common-arg \"arg1|arg2\" ...]\n";
86}
87
88foreach $arg (@ARGV) {
89 $a1 = $a2 = '';
1#! /usr/bin/env perl
2# Copyright (c) 2003-2007 The Regents of The University of Michigan
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

--- 73 unchanged lines hidden (view full) ---

82}
83
84if (@ARGV < 1) {
85 die "Usage: tracediff [-n] \"sim1|sim2\" [common-arg \"arg1|arg2\" ...]\n";
86}
87
88foreach $arg (@ARGV) {
89 $a1 = $a2 = '';
90 @subargs = split('#', $arg, -1);
90 @subargs = split('#', $arg);
91 foreach $subarg (@subargs) {
91 foreach $subarg (@subargs) {
92 if ($subarg eq '') {
93 next;
94 }
92 @pair = split('\|', $subarg, -1); # -1 enables null trailing fields
93 if (@pair == 1) {
94 $a1 .= $subarg;
95 $a2 .= $subarg;
96 } elsif (@pair == 2) {
97 $a1 .= $pair[0];
98 $a2 .= $pair[1];
99 } else {
95 @pair = split('\|', $subarg, -1); # -1 enables null trailing fields
96 if (@pair == 1) {
97 $a1 .= $subarg;
98 $a2 .= $subarg;
99 } elsif (@pair == 2) {
100 $a1 .= $pair[0];
101 $a2 .= $pair[1];
102 } else {
100 print 'Parse error: too many |s in ', $arg, '\n';
103 print 'Parse error: too many |s in ', $arg, "\n";
101 exit(1);
102 }
103 }
104
105 push @cmd1, $a1;
106 push @cmd2, $a2;
107}
108

--- 42 unchanged lines hidden ---
104 exit(1);
105 }
106 }
107
108 push @cmd1, $a1;
109 push @cmd2, $a2;
110}
111

--- 42 unchanged lines hidden ---