From 8d1f9b3d18fd18a223bfbeaaef51c67a637d5f4e Mon Sep 17 00:00:00 2001 From: martin-s Date: Thu, 16 Dec 2010 13:43:28 +0000 Subject: Fix:script:Made prettier git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3793 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/script/dump_types | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'navit/script') diff --git a/navit/script/dump_types b/navit/script/dump_types index 65636f3ef..ca1bbdfff 100755 --- a/navit/script/dump_types +++ b/navit/script/dump_types @@ -1,25 +1,20 @@ #! /bin/sh +IFS="()," function print_defs { type=$1 - while read line + while read a1 a2 a3 do - case $line in - *2\(*) - id=${line%%,*} - id=${id#*(} - id=$(($id)) - name=${line%%)*} - name=${name#*,} - printf "%s%s 0x%x\n" $type $name $id - id=$((id+1)) + case $a1 in + *2) + id=$(($a2)) + name=$a3 ;; *) - name=${line%%)*} - name=${name#*(} - printf "%s%s 0x%x\n" $type $name $id - id=$((id+1)) + name=$a2 esac + printf "%s%s 0x%x\n" $type $name $id + id=$((id+1)) done } dir=$0 -- cgit v1.2.1