repo.or.cz
/
qemu
/
hppa.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Win32: Don't remove const attribute in type casts.
[qemu/hppa.git]
/
hxtool
blob
885abe222d6408e15c9dcb9ef4c47e68f8890c65
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