virtio-serial: Remove redundant check for 0-sized write request
[qemu/kraxel.git] / hxtool
blob0fdbc641c643033c8d96028b1b02a5f0e6f9deb4
1 #!/bin/sh
3 hxtoh()
5 flag=1
6 while read -r str; do
7 case $str in
8 HXCOMM*)
9 ;;
10 STEXI*|ETEXI*) flag=$(($flag^1))
13 test $flag -eq 1 && printf "%s\n" "$str"
15 esac
16 done
19 hxtotexi()
21 flag=0
22 while read -r str; do
23 case "$str" in
24 HXCOMM*)
26 STEXI*|ETEXI*) flag=$(($flag^1))
28 DEFHEADING*)
29 echo "$(expr "$str" : "DEFHEADING(\(.*\))")"
32 test $flag -eq 1 && echo "$str"
34 esac
35 done
38 case "$1" in
39 "-h") hxtoh ;;
40 "-t") hxtotexi ;;
41 *) exit 1 ;;
42 esac
44 exit 0