repo.or.cz
/
topgit
/
pro.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
tg export: no need for merge or hook setup
[topgit/pro.git]
/
t
/
t1200
/
maketable.pl
blob
2bafa5335a0182fbd83a1e8a212d53b77b93562f
1
#!/usr/bin/perl
2
3
use
strict
;
4
use
warnings
;
5
6
my
(
$b
,
$o
,
$t
,
$s
,
$r
);
7
8
foreach
$b
(
0
,
1
,
2
) {
9
foreach
$o
(
0
,
1
,
2
) {
10
foreach
$t
(
0
,
1
,
2
) {
11
foreach
$s
(
'r'
,
't'
,
'o'
,
'm'
) {
12
$r
= -
1
;
13
my
$mr
= -
1
;
14
if
(
$o
eq
$t
) {
15
$mr
=
$o
;
16
}
elsif
(
$b
eq
$o
) {
17
$mr
=
$t
;
18
}
elsif
(
$b
eq
$t
) {
19
$mr
=
$o
;
20
}
else
{
21
$mr
=
3
;
22
}
23
$s
eq
'm'
and
$r
=
$mr
;
24
$s
eq
'o'
and
$r
=
$o
;
25
$s
eq
't'
and
$r
=
$t
;
26
$s
eq
'r'
and
$r
=
0
;
27
print
"
$b
$o
$t
$s
$r
$mr
\n
"
;
28
}
29
}
30
}
31
}