3 # Copyright (C) 2006 OpenedHand Ltd
5 # This program is free software; you can redistribute it and/or modify it under
6 # the terms of version 2 of the GNU Lesser General Public License as published
7 # by the Free Software Foundation.
9 # This program is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 # You should have received a copy of the GNU Lesser General Public License
15 # along with this program; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 # Author: Ross Burton <ross@openedhand.com>
26 print "static const char %s_table[] = {" % var
28 print " \"%s\\0\"" % s
31 print "static const guint %s_index[] = {" % var
38 (S_VAR, S_STRING) = range(0, 2)
41 print "/* This file is generated by gen-western-table.py. DO NOT EDIT */"
43 for l in sys.stdin.readlines():
53 elif state == S_STRING: