repo.or.cz
/
qemu
/
aliguori-queue.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
kvm: enable smp > 1
[qemu/aliguori-queue.git]
/
hxtool
blob
0fdbc641c643033c8d96028b1b02a5f0e6f9deb4
1
#!/bin/sh
2
3
hxtoh
()
4
{
5
flag
=
1
6
while
read -r
str
;
do
7
case
$str
in
8
HXCOMM
*)
9
;;
10
STEXI
*
|ETEXI
*)
flag
=
$
((
$flag
^
1
))
11
;;
12
*)
13
test
$flag
-eq
1
&&
printf
"%s
\n
"
"
$str
"
14
;;
15
esac
16
done
17
}
18
19
hxtotexi
()
20
{
21
flag
=
0
22
while
read -r
str
;
do
23
case
"
$str
"
in
24
HXCOMM
*)
25
;;
26
STEXI
*
|ETEXI
*)
flag
=
$
((
$flag
^
1
))
27
;;
28
DEFHEADING
*)
29
echo
"$(expr "
$str
" : "
DEFHEADING
(
\
(
.
*
\
))
")"
30
;;
31
*)
32
test
$flag
-eq
1
&&
echo
"
$str
"
33
;;
34
esac
35
done
36
}
37
38
case
"
$1
"
in
39
"-h"
)
hxtoh
;;
40
"-t"
)
hxtotexi
;;
41
*)
exit
1
;;
42
esac
43
44
exit
0