~vcs-imports/qemu/git

6835 by blueswir1
Syncing documentation vs. -help vs. qemu_options table
1
#!/bin/sh
2
3
hxtoh()
4
{
5
    flag=1
6893 by blueswir1
Fix hxtool eating backslash sequences
6
    while read -r str; do
6835 by blueswir1
Syncing documentation vs. -help vs. qemu_options table
7
        case $str in
8
            HXCOMM*)
9
            ;;
10
            STEXI*|ETEXI*) flag=$(($flag^1))
11
            ;;
12
            *)
6894 by blueswir1
Fix hxtool eating backslash sequences for sh != bash
13
            test $flag -eq 1 && printf "%s\n" "$str"
6835 by blueswir1
Syncing documentation vs. -help vs. qemu_options table
14
            ;;
15
        esac
16
    done
17
}
18
19
hxtotexi()
20
{
21
    flag=0
6893 by blueswir1
Fix hxtool eating backslash sequences
22
    while read -r str; do
6835 by blueswir1
Syncing documentation vs. -help vs. qemu_options table
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
6836 by blueswir1
Fix compile problems with r6884
43
44
exit 0