Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesdna/intern')
-rw-r--r--source/blender/makesdna/intern/Makefile86
-rw-r--r--source/blender/makesdna/intern/dna.c874
-rw-r--r--source/blender/makesdna/intern/makesdna.c1121
3 files changed, 2081 insertions, 0 deletions
diff --git a/source/blender/makesdna/intern/Makefile b/source/blender/makesdna/intern/Makefile
new file mode 100644
index 00000000000..d6a762156ca
--- /dev/null
+++ b/source/blender/makesdna/intern/Makefile
@@ -0,0 +1,86 @@
+#
+# $Id$
+#
+# ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version. The Blender
+# Foundation also sells licenses for use in proprietary software under
+# the Blender License. See http://www.blender.org/BL/ for information
+# about this.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): none yet.
+#
+# ***** END GPL/BL DUAL LICENSE BLOCK *****
+#
+#
+
+DIR = $(OCGDIR)/blender/makesdna
+CSRCS = $(wildcard *.c)
+
+ALLTARGETS = $(OBJS) $(DIR)/$(DEBUG_DIR)makesdna $(DIR)/$(SHARED_DIR)$(DEBUG_DIR)DNA.o
+
+include nan_compile.mk
+
+ifneq ($(OS),irix)
+ CFLAGS += -funsigned-char
+endif
+
+CFLAGS += $(LEVEL_1_C_WARNINGS)
+
+CPPFLAGS += -I$(OPENGL_HEADERS)
+CPPFLAGS += -I$(NAN_GUARDEDALLOC)/include
+CPPFLAGS += -I../../blenlib
+CPPFLAGS += -I..
+
+ifeq ($(OS),windows)
+ # Windows needs these extra libs because of winstuff... It is not
+ # _really_ needed, but it is the easiest fix for now. If you have
+ # some spare time, try to trace down the exact dep. Then again, you
+ # could also spend that time making the sdna system more robust.
+ WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
+ WINLIBS += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
+ WINLIBS += winmm.lib opengl32.lib glu32.lib largeint.lib
+ WINLIBS += /link /nodefaultlib:libc
+endif
+
+clean::
+ @$(RM) $(DIR)/makesdna* $(DIR)/DNA.c
+ @$(RM) $(DIR)/debug/makesdna* $(DIR)/debug/DNA.c
+
+# TODO include right .mk for ldflags
+
+# A small note: we do not use the debug version of the alloc lib. That
+# is done quite intentionally. If there is a bug in that lib, it needs
+# to be fixed by the module maintainer.
+$(DIR)/$(DEBUG_DIR)makesdna: $(OBJS) $(OCGDIR)/blender/blenlib/$(DEBUG_DIR)libblenlib.a
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) \
+ $(NAN_GUARDEDALLOC)/lib/libguardedalloc.a $(WINLIBS)
+
+$(DIR)/$(DEBUG_DIR)DNA.c: $(DIR)/$(DEBUG_DIR)makesdna
+ ifeq ($(OS),windows)
+ $(SRCHOME)/tools/cygwin/cl_wrapper.pl - $(DIR)/$(DEBUG_DIR)makesdna \
+ $(DIR)/$(DEBUG_DIR)DNA.c
+ else
+ $(DIR)/$(DEBUG_DIR)makesdna $(DIR)/$(DEBUG_DIR)DNA.c
+ endif
+
+$(DIR)/$(SHARED_DIR)$(DEBUG_DIR)DNA.o: $(DIR)/$(DEBUG_DIR)DNA.c
+ $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
+
diff --git a/source/blender/makesdna/intern/dna.c b/source/blender/makesdna/intern/dna.c
new file mode 100644
index 00000000000..e4de70fbc34
--- /dev/null
+++ b/source/blender/makesdna/intern/dna.c
@@ -0,0 +1,874 @@
+unsigned char DNAstr[]= {
+83,68,78,65,78,65,77,69,219,3,0,0,42,110,101,120,116,0,42,112,
+114,101,118,0,42,102,105,114,115,116,0,42,108,97,115,116,0,120,0,121,
+0,122,0,119,0,120,109,105,110,0,120,109,97,120,0,121,109,105,110,0,
+121,109,97,120,0,42,110,101,119,105,100,0,42,108,105,98,0,110,97,109,
+101,91,50,52,93,0,117,115,0,102,108,97,103,0,112,97,100,0,105,100,
+0,42,105,100,98,108,111,99,107,0,42,102,105,108,101,100,97,116,97,0,
+110,97,109,101,91,49,54,48,93,0,116,111,116,0,99,117,114,118,101,0,
+99,117,114,0,98,108,111,99,107,116,121,112,101,0,115,104,111,119,107,101,
+121,0,112,111,115,0,116,111,116,101,108,101,109,0,116,121,112,101,0,114,
+116,0,42,100,97,116,97,0,42,114,101,102,107,101,121,0,101,108,101,109,
+115,116,114,91,51,50,93,0,101,108,101,109,115,105,122,101,0,99,117,114,
+118,97,108,0,98,108,111,99,107,0,42,105,112,111,0,42,102,114,111,109,
+0,116,111,116,107,101,121,0,115,108,117,114,112,104,0,97,99,116,107,101,
+121,0,42,42,115,99,114,105,112,116,115,0,42,102,108,97,103,0,97,99,
+116,115,99,114,105,112,116,0,116,111,116,115,99,114,105,112,116,0,42,108,
+105,110,101,0,108,101,110,0,98,108,101,110,0,42,110,97,109,101,0,102,
+108,97,103,115,0,110,108,105,110,101,115,0,108,105,110,101,115,0,42,99,
+117,114,108,0,42,115,101,108,108,0,99,117,114,99,0,115,101,108,99,0,
+42,117,110,100,111,95,98,117,102,0,117,110,100,111,95,112,111,115,0,117,
+110,100,111,95,108,101,110,0,42,99,111,109,112,105,108,101,100,0,115,105,
+122,101,0,115,101,101,107,0,100,114,97,119,122,111,111,109,0,104,111,108,
+100,0,99,108,105,112,115,116,97,0,99,108,105,112,101,110,100,0,110,101,
+116,115,116,97,0,110,101,116,101,110,100,0,108,101,110,115,0,100,114,97,
+119,115,105,122,101,0,104,111,108,111,108,101,110,0,104,111,108,111,108,101,
+110,49,0,115,99,114,105,112,116,108,105,110,107,0,42,97,110,105,109,0,
+42,105,98,117,102,0,42,109,105,112,109,97,112,91,49,48,93,0,111,107,
+0,108,97,115,116,102,114,97,109,101,0,108,97,115,116,113,117,97,108,105,
+116,121,0,116,112,97,103,101,102,108,97,103,0,116,111,116,98,105,110,100,
+0,120,114,101,112,0,121,114,101,112,0,116,119,115,116,97,0,116,119,101,
+110,100,0,98,105,110,100,99,111,100,101,0,42,114,101,112,98,105,110,100,
+0,42,112,97,99,107,101,100,102,105,108,101,0,108,97,115,116,117,112,100,
+97,116,101,0,97,110,105,109,115,112,101,101,100,0,114,101,115,101,114,118,
+101,100,49,0,116,101,120,99,111,0,109,97,112,116,111,0,109,97,112,116,
+111,110,101,103,0,98,108,101,110,100,116,121,112,101,0,42,111,98,106,101,
+99,116,0,42,116,101,120,0,112,114,111,106,120,0,112,114,111,106,121,0,
+112,114,111,106,122,0,109,97,112,112,105,110,103,0,111,102,115,91,51,93,
+0,115,105,122,101,91,51,93,0,116,101,120,102,108,97,103,0,99,111,108,
+111,114,109,111,100,101,108,0,114,0,103,0,98,0,107,0,100,101,102,95,
+118,97,114,0,99,111,108,102,97,99,0,110,111,114,102,97,99,0,118,97,
+114,102,97,99,0,42,104,97,110,100,108,101,0,42,112,110,97,109,101,0,
+42,115,116,110,97,109,101,115,0,115,116,121,112,101,115,0,118,97,114,115,
+0,42,118,97,114,115,116,114,0,42,114,101,115,117,108,116,0,42,99,102,
+114,97,0,100,97,116,97,91,51,50,93,0,40,42,100,111,105,116,41,40,
+41,0,40,42,99,97,108,108,98,97,99,107,41,40,41,0,118,101,114,115,
+105,111,110,0,97,0,105,112,111,116,121,112,101,0,100,97,116,97,91,49,
+54,93,0,42,105,109,97,0,42,99,117,98,101,91,54,93,0,105,109,97,
+116,91,52,93,91,52,93,0,115,116,121,112,101,0,110,111,116,108,97,121,
+0,99,117,98,101,114,101,115,0,110,111,105,115,101,115,105,122,101,0,116,
+117,114,98,117,108,0,98,114,105,103,104,116,0,99,111,110,116,114,97,115,
+116,0,114,102,97,99,0,103,102,97,99,0,98,102,97,99,0,102,105,108,
+116,101,114,115,105,122,101,0,110,111,105,115,101,100,101,112,116,104,0,110,
+111,105,115,101,116,121,112,101,0,105,109,97,102,108,97,103,0,99,114,111,
+112,120,109,105,110,0,99,114,111,112,121,109,105,110,0,99,114,111,112,120,
+109,97,120,0,99,114,111,112,121,109,97,120,0,120,114,101,112,101,97,116,
+0,121,114,101,112,101,97,116,0,101,120,116,101,110,100,0,102,114,97,109,
+101,115,0,111,102,102,115,101,116,0,115,102,114,97,0,102,105,101,95,105,
+109,97,0,42,110,111,114,0,42,112,108,117,103,105,110,0,42,99,111,98,
+97,0,42,101,110,118,0,102,114,97,100,117,114,91,52,93,91,50,93,0,
+109,111,100,101,0,116,111,116,101,120,0,101,110,101,114,103,121,0,100,105,
+115,116,0,115,112,111,116,115,105,122,101,0,115,112,111,116,98,108,101,110,
+100,0,104,97,105,110,116,0,97,116,116,49,0,97,116,116,50,0,98,117,
+102,115,105,122,101,0,115,97,109,112,0,115,104,97,100,115,112,111,116,115,
+105,122,101,0,98,105,97,115,0,115,111,102,116,0,116,101,120,97,99,116,
+0,115,104,97,100,104,97,108,111,115,116,101,112,0,42,109,116,101,120,91,
+56,93,0,108,97,121,0,115,112,101,99,114,0,115,112,101,99,103,0,115,
+112,101,99,98,0,109,105,114,114,0,109,105,114,103,0,109,105,114,98,0,
+97,109,98,114,0,97,109,98,98,0,97,109,98,103,0,97,109,98,0,101,
+109,105,116,0,97,110,103,0,115,112,101,99,116,114,97,0,97,108,112,104,
+97,0,114,101,102,0,115,112,101,99,0,122,111,102,102,115,0,97,100,100,
+0,107,102,97,99,0,104,97,114,0,115,101,101,100,49,0,115,101,101,100,
+50,0,109,111,100,101,50,0,102,108,97,114,101,99,0,115,116,97,114,99,
+0,108,105,110,101,99,0,114,105,110,103,99,0,104,97,115,105,122,101,0,
+102,108,97,114,101,115,105,122,101,0,115,117,98,115,105,122,101,0,102,108,
+97,114,101,98,111,111,115,116,0,114,103,98,115,101,108,0,112,114,95,116,
+121,112,101,0,115,101,112,116,101,120,0,112,114,95,98,97,99,107,0,112,
+114,95,108,97,109,112,0,112,97,100,49,0,42,114,101,110,0,102,114,105,
+99,116,105,111,110,0,102,104,0,114,101,102,108,101,99,116,0,102,104,100,
+105,115,116,0,120,121,102,114,105,99,116,0,100,121,110,97,109,111,100,101,
+0,110,97,109,101,91,50,53,54,93,0,115,99,97,108,101,0,115,101,108,
+99,111,108,0,101,120,112,120,0,101,120,112,121,0,101,120,112,122,0,114,
+97,100,0,114,97,100,50,0,115,0,109,97,120,114,97,100,50,0,42,109,
+97,116,0,42,105,109,97,116,0,42,98,98,0,101,108,101,109,115,0,100,
+105,115,112,0,42,42,109,97,116,0,116,111,116,99,111,108,0,108,111,99,
+91,51,93,0,114,111,116,91,51,93,0,119,105,114,101,115,105,122,101,0,
+114,101,110,100,101,114,115,105,122,101,0,116,104,114,101,115,104,0,118,101,
+99,91,51,93,91,51,93,0,97,108,102,97,0,115,91,51,93,91,50,93,
+0,104,49,0,104,50,0,102,49,0,102,50,0,102,51,0,104,105,100,101,
+0,118,101,99,91,52,93,0,115,91,50,93,0,109,97,116,95,110,114,0,
+112,110,116,115,117,0,112,110,116,115,118,0,114,101,115,111,108,117,0,114,
+101,115,111,108,118,0,111,114,100,101,114,117,0,111,114,100,101,114,118,0,
+102,108,97,103,117,0,102,108,97,103,118,0,42,107,110,111,116,115,117,0,
+42,107,110,111,116,115,118,0,42,98,112,0,42,98,101,122,116,0,110,117,
+114,98,0,42,98,101,118,111,98,106,0,42,116,101,120,116,111,110,99,117,
+114,118,101,0,42,112,97,116,104,0,42,107,101,121,0,98,101,118,0,42,
+111,114,99,111,0,112,97,116,104,108,101,110,0,98,101,118,114,101,115,111,
+108,0,119,105,100,116,104,0,101,120,116,49,0,101,120,116,50,0,115,112,
+97,99,101,109,111,100,101,0,115,112,97,99,105,110,103,0,108,105,110,101,
+100,105,115,116,0,115,104,101,97,114,0,102,115,105,122,101,0,120,111,102,
+0,121,111,102,0,42,115,116,114,0,102,97,109,105,108,121,91,50,52,93,
+0,42,118,102,111,110,116,0,109,97,120,114,99,116,0,116,111,116,114,99,
+116,0,97,100,114,99,111,100,101,0,118,97,114,116,121,112,101,0,116,111,
+116,118,101,114,116,0,105,112,111,0,101,120,116,114,97,112,0,98,105,116,
+109,97,115,107,0,118,49,0,118,50,0,118,51,0,118,52,0,112,117,110,
+111,0,101,100,99,111,100,101,0,42,116,112,97,103,101,0,117,118,91,52,
+93,91,50,93,0,99,111,108,91,52,93,0,116,114,97,110,115,112,0,116,
+105,108,101,0,100,101,102,95,110,114,0,119,101,105,103,104,116,0,42,100,
+119,0,116,111,116,119,101,105,103,104,116,0,99,111,91,51,93,0,110,111,
+91,51,93,0,99,111,91,50,93,0,101,102,102,101,99,116,0,42,109,102,
+97,99,101,0,42,100,102,97,99,101,0,42,116,102,97,99,101,0,42,109,
+118,101,114,116,0,42,100,118,101,114,116,0,42,109,99,111,108,0,42,109,
+115,116,105,99,107,121,0,42,116,101,120,99,111,109,101,115,104,0,42,111,
+99,0,42,115,117,109,111,104,97,110,100,108,101,0,116,111,116,102,97,99,
+101,0,115,109,111,111,116,104,114,101,115,104,0,115,117,98,100,105,118,0,
+115,117,98,100,105,118,114,0,114,101,115,101,114,118,101,100,50,0,114,101,
+115,101,114,118,101,100,51,0,99,117,98,101,109,97,112,115,105,122,101,0,
+114,116,102,0,112,110,116,115,119,0,116,121,112,101,117,0,116,121,112,101,
+118,0,116,121,112,101,119,0,42,100,101,102,0,110,97,109,101,91,51,50,
+93,0,112,97,114,116,121,112,101,0,112,97,114,49,0,112,97,114,50,0,
+112,97,114,51,0,112,97,114,115,117,98,115,116,114,91,51,50,93,0,42,
+112,97,114,100,97,116,97,0,42,112,97,114,101,110,116,0,42,116,114,97,
+99,107,0,42,97,99,116,105,111,110,0,42,112,111,115,101,0,42,97,99,
+116,105,118,101,99,111,110,0,99,111,110,115,116,114,97,105,110,116,67,104,
+97,110,110,101,108,115,0,110,101,116,119,111,114,107,0,100,101,102,98,97,
+115,101,0,100,108,111,99,91,51,93,0,111,114,105,103,91,51,93,0,100,
+115,105,122,101,91,51,93,0,100,114,111,116,91,51,93,0,113,117,97,116,
+91,52,93,0,100,113,117,97,116,91,52,93,0,111,98,109,97,116,91,52,
+93,91,52,93,0,112,97,114,101,110,116,105,110,118,91,52,93,91,52,93,
+0,99,111,108,98,105,116,115,0,116,114,97,110,115,102,108,97,103,0,105,
+112,111,102,108,97,103,0,116,114,97,99,107,102,108,97,103,0,117,112,102,
+108,97,103,0,105,112,111,119,105,110,0,115,99,97,102,108,97,103,0,115,
+99,97,118,105,115,102,108,97,103,0,98,111,117,110,100,116,121,112,101,0,
+100,117,112,111,110,0,100,117,112,111,102,102,0,100,117,112,115,116,97,0,
+100,117,112,101,110,100,0,115,102,0,99,116,105,109,101,0,109,97,115,115,
+0,100,97,109,112,105,110,103,0,105,110,101,114,116,105,97,0,102,111,114,
+109,102,97,99,116,111,114,0,100,117,109,109,121,95,49,0,114,100,97,109,
+112,105,110,103,0,115,105,122,101,102,97,99,0,100,116,0,100,116,120,0,
+97,99,116,99,111,108,0,112,114,111,112,0,115,101,110,115,111,114,115,0,
+99,111,110,116,114,111,108,108,101,114,115,0,97,99,116,117,97,116,111,114,
+115,0,98,98,115,105,122,101,91,51,93,0,100,102,114,97,115,0,97,99,
+116,100,101,102,0,103,97,109,101,102,108,97,103,0,103,97,109,101,102,108,
+97,103,50,0,97,110,105,115,111,116,114,111,112,105,99,70,114,105,99,116,
+105,111,110,91,51,93,0,99,111,110,115,116,114,97,105,110,116,115,0,110,
+108,97,115,116,114,105,112,115,0,109,105,115,116,121,112,101,0,104,111,114,
+114,0,104,111,114,103,0,104,111,114,98,0,104,111,114,107,0,122,101,110,
+114,0,122,101,110,103,0,122,101,110,98,0,122,101,110,107,0,97,109,98,
+107,0,102,97,115,116,99,111,108,0,101,120,112,111,115,117,114,101,0,103,
+114,97,118,105,116,121,0,97,99,116,105,118,105,116,121,66,111,120,82,97,
+100,105,117,115,0,115,107,121,116,121,112,101,0,109,105,115,105,0,109,105,
+115,116,115,116,97,0,109,105,115,116,100,105,115,116,0,109,105,115,116,104,
+105,0,115,116,97,114,114,0,115,116,97,114,103,0,115,116,97,114,98,0,
+115,116,97,114,107,0,115,116,97,114,115,105,122,101,0,115,116,97,114,109,
+105,110,100,105,115,116,0,115,116,97,114,100,105,115,116,0,115,116,97,114,
+99,111,108,110,111,105,115,101,0,100,111,102,115,116,97,0,100,111,102,101,
+110,100,0,100,111,102,109,105,110,0,100,111,102,109,97,120,0,104,101,109,
+105,114,101,115,0,109,97,120,105,116,101,114,0,100,114,97,119,116,121,112,
+101,0,115,117,98,115,104,111,111,116,112,0,115,117,98,115,104,111,111,116,
+101,0,110,111,100,101,108,105,109,0,109,97,120,115,117,98,108,97,109,112,
+0,112,97,109,97,0,112,97,109,105,0,101,108,109,97,0,101,108,109,105,
+0,109,97,120,110,111,100,101,0,99,111,110,118,101,114,103,101,110,99,101,
+0,114,97,100,102,97,99,0,103,97,109,109,97,0,115,120,0,115,121,0,
+42,108,112,70,111,114,109,97,116,0,42,108,112,80,97,114,109,115,0,99,
+98,70,111,114,109,97,116,0,99,98,80,97,114,109,115,0,102,99,99,84,
+121,112,101,0,102,99,99,72,97,110,100,108,101,114,0,100,119,75,101,121,
+70,114,97,109,101,69,118,101,114,121,0,100,119,81,117,97,108,105,116,121,
+0,100,119,66,121,116,101,115,80,101,114,83,101,99,111,110,100,0,100,119,
+70,108,97,103,115,0,100,119,73,110,116,101,114,108,101,97,118,101,69,118,
+101,114,121,0,42,97,118,105,99,111,100,101,99,100,97,116,97,0,99,102,
+114,97,0,101,102,114,97,0,105,109,97,103,101,115,0,102,114,97,109,97,
+112,116,111,0,102,114,97,109,101,108,101,110,0,98,108,117,114,102,97,99,
+0,101,100,103,101,82,0,101,100,103,101,71,0,101,100,103,101,66,0,102,
+117,108,108,115,99,114,101,101,110,0,120,112,108,97,121,0,121,112,108,97,
+121,0,102,114,101,113,112,108,97,121,0,100,101,112,116,104,0,97,116,116,
+114,105,98,0,114,116,49,0,114,116,50,0,115,116,101,114,101,111,109,111,
+100,101,0,112,97,100,91,51,93,0,109,97,120,105,109,115,105,122,101,0,
+120,115,99,104,0,121,115,99,104,0,120,97,115,112,0,121,97,115,112,0,
+120,112,97,114,116,115,0,121,112,97,114,116,115,0,115,97,102,101,116,121,
+0,98,111,114,100,101,114,0,119,105,110,112,111,115,0,112,108,97,110,101,
+115,0,105,109,116,121,112,101,0,98,117,102,102,108,97,103,0,113,117,97,
+108,105,116,121,0,115,99,101,109,111,100,101,0,97,108,112,104,97,109,111,
+100,101,0,100,111,103,97,109,109,97,0,111,115,97,0,102,114,115,95,115,
+101,99,0,101,100,103,101,105,110,116,0,115,97,109,101,95,109,97,116,95,
+114,101,100,117,120,0,112,97,100,95,51,91,51,93,0,112,111,115,116,109,
+117,108,0,112,111,115,116,103,97,109,109,97,0,112,111,115,116,97,100,100,
+0,112,111,115,116,105,103,97,109,109,97,0,98,97,99,107,98,117,102,91,
+49,54,48,93,0,112,105,99,91,49,54,48,93,0,102,116,121,112,101,91,
+49,54,48,93,0,99,111,108,91,51,93,0,112,97,100,50,0,112,97,100,
+51,0,42,99,97,109,101,114,97,0,42,119,111,114,108,100,0,42,115,101,
+116,0,98,97,115,101,0,42,98,97,115,97,99,116,0,42,103,114,111,117,
+112,0,99,117,114,115,111,114,91,51,93,0,42,102,99,97,109,0,42,101,
+100,0,42,114,97,100,105,111,0,102,114,97,109,105,110,103,0,122,111,111,
+109,0,98,108,101,110,100,0,120,105,109,0,121,105,109,0,42,114,101,99,
+116,0,115,112,97,99,101,116,121,112,101,0,42,97,114,101,97,0,118,105,
+101,119,109,97,116,91,52,93,91,52,93,0,118,105,101,119,105,110,118,91,
+52,93,91,52,93,0,112,101,114,115,109,97,116,91,52,93,91,52,93,0,
+112,101,114,115,105,110,118,91,52,93,91,52,93,0,118,105,101,119,113,117,
+97,116,91,52,93,0,112,101,114,115,112,0,118,105,101,119,0,42,98,103,
+112,105,99,0,42,108,111,99,97,108,118,100,0,108,111,99,97,108,118,105,
+101,119,0,108,97,121,97,99,116,0,115,99,101,110,101,108,111,99,107,0,
+97,114,111,117,110,100,0,99,97,109,122,111,111,109,0,103,114,105,100,0,
+110,101,97,114,0,102,97,114,0,109,120,0,109,121,0,109,120,111,0,109,
+121,111,0,103,114,105,100,108,105,110,101,115,0,118,105,101,119,98,117,116,
+0,118,101,114,116,0,104,111,114,0,109,97,115,107,0,109,105,110,91,50,
+93,0,109,97,120,91,50,93,0,109,105,110,122,111,111,109,0,109,97,120,
+122,111,111,109,0,115,99,114,111,108,108,0,107,101,101,112,116,111,116,0,
+107,101,101,112,97,115,112,101,99,116,0,107,101,101,112,122,111,111,109,0,
+114,111,119,98,117,116,0,118,50,100,0,42,101,100,105,116,105,112,111,0,
+105,112,111,107,101,121,0,116,111,116,105,112,111,0,112,105,110,0,98,117,
+116,111,102,115,0,99,104,97,110,110,101,108,0,109,101,110,117,110,114,0,
+108,111,99,107,0,99,117,114,115,101,110,115,0,99,117,114,97,99,116,0,
+109,97,105,110,98,0,109,97,105,110,98,111,0,42,108,111,99,107,112,111,
+105,110,0,116,101,120,110,114,0,116,101,120,102,114,111,109,0,115,104,111,
+119,103,114,111,117,112,0,114,101,99,116,120,0,114,101,99,116,121,0,99,
+117,114,121,0,109,111,100,101,108,116,121,112,101,0,115,99,114,105,112,116,
+98,108,111,99,107,0,112,97,100,51,91,55,93,0,42,97,110,105,109,95,
+108,105,110,107,101,100,95,115,105,112,111,0,42,102,105,108,101,108,105,115,
+116,0,116,111,116,102,105,108,101,0,116,105,116,108,101,91,50,52,93,0,
+100,105,114,91,49,54,48,93,0,102,105,108,101,91,56,48,93,0,111,102,
+115,0,115,111,114,116,0,109,97,120,110,97,109,101,108,101,110,0,99,111,
+108,108,117,109,115,0,42,108,105,98,102,105,108,101,100,97,116,97,0,114,
+101,116,118,97,108,0,109,101,110,117,0,97,99,116,0,40,42,114,101,116,
+117,114,110,102,117,110,99,41,40,41,0,42,109,101,110,117,112,0,111,111,
+112,115,0,118,105,115,105,102,108,97,103,0,42,105,109,97,103,101,0,105,
+109,97,110,114,0,99,117,114,116,105,108,101,0,42,116,101,120,116,0,116,
+111,112,0,118,105,101,119,108,105,110,101,115,0,102,111,110,116,95,105,100,
+0,108,104,101,105,103,104,116,0,108,101,102,116,0,112,105,120,95,112,101,
+114,95,108,105,110,101,0,116,120,116,115,99,114,111,108,108,0,116,120,116,
+98,97,114,0,42,112,121,95,100,114,97,119,0,42,112,121,95,101,118,101,
+110,116,0,42,112,121,95,98,117,116,116,111,110,0,42,112,121,95,103,108,
+111,98,97,108,100,105,99,116,0,116,105,116,108,101,91,50,56,93,0,102,
+97,115,101,0,115,117,98,102,97,115,101,0,109,111,117,115,101,95,109,111,
+118,101,95,114,101,100,114,97,119,0,105,109,97,102,97,115,101,0,100,105,
+114,115,108,105,0,100,105,114,115,108,105,95,108,105,110,101,115,0,100,105,
+114,115,108,105,95,115,120,0,100,105,114,115,108,105,95,101,121,0,100,105,
+114,115,108,105,95,101,120,0,100,105,114,115,108,105,95,104,0,105,109,97,
+115,108,105,0,102,105,108,101,115,101,108,109,101,110,117,105,116,101,109,0,
+105,109,97,115,108,105,95,115,120,0,105,109,97,115,108,105,95,101,121,0,
+105,109,97,115,108,105,95,101,120,0,105,109,97,115,108,105,95,104,0,100,
+115,115,120,0,100,115,115,121,0,100,115,101,120,0,100,115,101,121,0,100,
+101,115,120,0,100,101,115,121,0,100,101,101,120,0,100,101,101,121,0,102,
+115,115,120,0,102,115,115,121,0,102,115,101,120,0,102,115,101,121,0,100,
+115,100,104,0,102,115,100,104,0,102,101,115,120,0,102,101,115,121,0,102,
+101,101,120,0,102,101,101,121,0,105,110,102,115,120,0,105,110,102,115,121,
+0,105,110,102,101,120,0,105,110,102,101,121,0,100,110,115,120,0,100,110,
+115,121,0,100,110,119,0,100,110,104,0,102,110,115,120,0,102,110,115,121,
+0,102,110,119,0,102,110,104,0,102,111,108,101,91,49,50,56,93,0,100,
+111,114,91,49,50,56,93,0,102,105,108,101,91,49,50,56,93,0,100,105,
+114,91,49,50,56,93,0,42,102,105,114,115,116,100,105,114,0,42,102,105,
+114,115,116,102,105,108,101,0,116,111,112,100,105,114,0,116,111,116,97,108,
+100,105,114,115,0,104,105,108,105,116,101,0,116,111,112,102,105,108,101,0,
+116,111,116,97,108,102,105,108,101,115,0,105,109,97,103,101,95,115,108,105,
+100,101,114,0,115,108,105,100,101,114,95,104,101,105,103,104,116,0,115,108,
+105,100,101,114,95,115,112,97,99,101,0,116,111,112,105,109,97,0,116,111,
+116,97,108,105,109,97,0,99,117,114,105,109,97,120,0,99,117,114,105,109,
+97,121,0,42,102,105,114,115,116,95,115,101,108,95,105,109,97,0,42,104,
+105,108,105,116,101,95,105,109,97,0,116,111,116,97,108,95,115,101,108,101,
+99,116,101,100,0,105,109,97,95,114,101,100,114,97,119,0,42,99,109,97,
+112,0,42,97,114,103,49,0,100,117,112,102,108,97,103,0,115,97,118,101,
+116,105,109,101,0,116,101,109,112,100,105,114,91,54,52,93,0,102,111,110,
+116,100,105,114,91,54,52,93,0,114,101,110,100,101,114,100,105,114,91,54,
+52,93,0,116,101,120,116,117,100,105,114,91,54,52,93,0,112,108,117,103,
+116,101,120,100,105,114,91,54,52,93,0,112,108,117,103,115,101,113,100,105,
+114,91,54,52,93,0,112,121,116,104,111,110,100,105,114,91,54,52,93,0,
+115,111,117,110,100,100,105,114,91,54,52,93,0,118,101,114,115,105,111,110,
+115,0,118,114,109,108,102,108,97,103,0,103,97,109,101,102,108,97,103,115,
+0,118,101,114,116,98,97,115,101,0,101,100,103,101,98,97,115,101,0,97,
+114,101,97,98,97,115,101,0,42,115,99,101,110,101,0,115,116,97,114,116,
+120,0,101,110,100,120,0,115,116,97,114,116,121,0,101,110,100,121,0,115,
+105,122,101,120,0,115,105,122,101,121,0,115,99,101,110,101,110,114,0,115,
+99,114,101,101,110,110,114,0,102,117,108,108,0,109,97,105,110,119,105,110,
+0,119,105,110,97,107,116,0,42,110,101,119,118,0,118,101,99,0,42,118,
+49,0,42,118,50,0,42,118,51,0,42,118,52,0,42,102,117,108,108,0,
+119,105,110,109,97,116,91,52,93,91,52,93,0,104,101,97,100,114,99,116,
+0,119,105,110,114,99,116,0,104,101,97,100,119,105,110,0,119,105,110,0,
+104,101,97,100,101,114,116,121,112,101,0,98,117,116,115,112,97,99,101,116,
+121,112,101,0,119,105,110,120,0,119,105,110,121,0,104,101,97,100,95,115,
+119,97,112,0,104,101,97,100,95,101,113,117,97,108,0,119,105,110,95,115,
+119,97,112,0,119,105,110,95,101,113,117,97,108,0,104,101,97,100,98,117,
+116,108,101,110,0,104,101,97,100,98,117,116,111,102,115,0,99,117,114,115,
+111,114,0,115,112,97,99,101,100,97,116,97,0,117,105,98,108,111,99,107,
+115,0,42,99,117,114,115,99,114,101,101,110,0,100,105,115,112,108,97,121,
+109,111,100,101,0,102,105,108,101,102,108,97,103,115,0,110,97,109,101,91,
+52,48,93,0,42,115,101,49,0,42,115,101,50,0,42,115,101,51,0,110,
+114,0,100,111,110,101,0,42,115,116,114,105,112,100,97,116,97,0,100,105,
+114,91,56,48,93,0,111,114,120,0,111,114,121,0,110,97,109,101,91,56,
+48,93,0,42,110,101,119,115,101,113,0,115,116,97,114,116,0,115,116,97,
+114,116,111,102,115,0,101,110,100,111,102,115,0,115,116,97,114,116,115,116,
+105,108,108,0,101,110,100,115,116,105,108,108,0,109,97,99,104,105,110,101,
+0,115,116,97,114,116,100,105,115,112,0,101,110,100,100,105,115,112,0,109,
+117,108,0,104,97,110,100,115,105,122,101,0,42,115,116,114,105,112,0,42,
+99,117,114,101,108,101,109,0,102,97,99,102,48,0,102,97,99,102,49,0,
+42,115,101,113,49,0,42,115,101,113,50,0,42,115,101,113,51,0,115,101,
+113,98,97,115,101,0,42,115,101,113,98,97,115,101,112,0,109,101,116,97,
+115,116,97,99,107,0,98,117,116,116,121,112,101,0,115,116,97,0,101,110,
+100,0,108,105,102,101,116,105,109,101,0,116,111,116,112,97,114,116,0,115,
+101,101,100,0,110,111,114,109,102,97,99,0,111,98,102,97,99,0,114,97,
+110,100,102,97,99,0,116,101,120,102,97,99,0,114,97,110,100,108,105,102,
+101,0,102,111,114,99,101,91,51,93,0,100,97,109,112,0,110,97,98,108,
+97,0,118,101,99,116,115,105,122,101,0,100,101,102,118,101,99,91,51,93,
+0,109,117,108,116,91,52,93,0,108,105,102,101,91,52,93,0,99,104,105,
+108,100,91,52,93,0,109,97,116,91,52,93,0,116,101,120,109,97,112,0,
+99,117,114,109,117,108,116,0,115,116,97,116,105,99,115,116,101,112,0,42,
+107,101,121,115,0,104,101,105,103,104,116,0,110,97,114,114,111,119,0,115,
+112,101,101,100,0,109,105,110,102,97,99,0,116,105,109,101,111,102,102,115,
+0,42,111,98,0,112,114,101,109,97,116,91,52,93,91,52,93,0,112,111,
+115,116,109,97,116,91,52,93,91,52,93,0,118,101,99,91,51,93,0,102,
+97,99,0,108,101,110,111,0,97,108,112,104,97,111,0,101,102,102,91,50,
+93,0,105,116,101,114,0,108,97,115,116,102,114,97,0,108,105,109,98,98,
+97,115,101,0,101,102,102,91,51,93,0,101,102,102,103,91,51,93,0,101,
+102,102,110,91,51,93,0,109,101,109,0,115,108,111,119,0,116,111,116,121,
+0,116,111,116,120,0,120,121,99,111,110,115,116,114,97,105,110,116,0,116,
+111,116,100,101,102,0,100,101,102,95,115,99,114,111,108,108,0,108,105,109,
+98,95,115,99,114,111,108,108,0,100,120,0,100,121,0,42,105,100,0,108,
+105,110,107,0,111,116,121,112,101,0,100,97,116,97,0,111,108,100,0,42,
+112,111,105,110,0,42,111,108,100,112,111,105,110,0,114,101,115,101,116,100,
+105,115,116,0,108,97,115,116,118,97,108,0,42,109,97,0,107,101,121,0,
+113,117,97,108,0,113,117,97,108,50,0,116,97,114,103,101,116,78,97,109,
+101,91,51,50,93,0,116,111,103,103,108,101,78,97,109,101,91,51,50,93,
+0,118,97,108,117,101,91,51,50,93,0,109,97,120,118,97,108,117,101,91,
+51,50,93,0,109,97,116,101,114,105,97,108,78,97,109,101,91,51,50,93,
+0,100,97,109,112,116,105,109,101,114,0,97,110,103,108,101,0,114,97,110,
+103,101,0,97,120,105,115,0,100,101,108,97,121,0,112,114,111,112,110,97,
+109,101,91,51,50,93,0,109,97,116,110,97,109,101,91,51,50,93,0,97,
+120,105,115,102,108,97,103,0,42,102,114,111,109,79,98,106,101,99,116,0,
+115,117,98,106,101,99,116,91,51,50,93,0,98,111,100,121,91,51,50,93,
+0,112,117,108,115,101,0,102,114,101,113,0,116,111,116,108,105,110,107,115,
+0,42,42,108,105,110,107,115,0,105,110,118,101,114,116,0,102,114,101,113,
+50,0,115,116,114,91,49,50,56,93,0,42,109,121,110,101,119,0,105,110,
+112,117,116,115,0,116,111,116,115,108,105,110,107,115,0,42,42,115,108,105,
+110,107,115,0,118,97,108,0,118,97,108,111,0,112,97,100,53,0,116,105,
+109,101,0,42,97,99,116,0,98,108,101,110,100,105,110,0,112,114,105,111,
+114,105,116,121,0,115,116,114,105,100,101,108,101,110,103,116,104,0,115,116,
+114,105,100,101,97,120,105,115,0,115,110,100,110,114,0,42,115,111,117,110,
+100,0,109,97,107,101,99,111,112,121,0,99,111,112,121,109,97,100,101,0,
+112,97,100,91,49,93,0,116,114,97,99,107,0,118,111,108,117,109,101,0,
+42,109,101,0,108,105,110,86,101,108,111,99,105,116,121,91,51,93,0,108,
+111,99,97,108,102,108,97,103,0,102,111,114,99,101,108,111,99,91,51,93,
+0,102,111,114,99,101,114,111,116,91,51,93,0,108,105,110,101,97,114,118,
+101,108,111,99,105,116,121,91,51,93,0,97,110,103,117,108,97,114,118,101,
+108,111,99,105,116,121,91,51,93,0,97,100,100,101,100,108,105,110,101,97,
+114,118,101,108,111,99,105,116,121,91,51,93,0,97,110,111,116,104,101,114,
+112,97,100,91,52,93,0,98,117,116,115,116,97,0,98,117,116,101,110,100,
+0,109,105,110,0,109,97,120,0,118,105,115,105,102,97,99,0,109,105,110,
+108,111,99,91,51,93,0,109,97,120,108,111,99,91,51,93,0,109,105,110,
+114,111,116,91,51,93,0,109,97,120,114,111,116,91,51,93,0,100,105,115,
+116,114,105,98,117,116,105,111,110,0,105,110,116,95,97,114,103,95,49,0,
+105,110,116,95,97,114,103,95,50,0,102,108,111,97,116,95,97,114,103,95,
+49,0,102,108,111,97,116,95,97,114,103,95,50,0,116,111,80,114,111,112,
+78,97,109,101,91,51,50,93,0,42,116,111,79,98,106,101,99,116,0,98,
+111,100,121,84,121,112,101,0,102,105,108,101,110,97,109,101,91,54,52,93,
+0,108,111,97,100,97,110,105,110,97,109,101,91,54,52,93,0,103,111,0,
+97,99,99,101,108,108,101,114,97,116,105,111,110,0,109,97,120,115,112,101,
+101,100,0,109,97,120,114,111,116,115,112,101,101,100,0,109,97,120,116,105,
+108,116,115,112,101,101,100,0,114,111,116,100,97,109,112,0,116,105,108,116,
+100,97,109,112,0,115,112,101,101,100,100,97,109,112,0,42,115,97,109,112,
+108,101,0,42,110,101,119,112,97,99,107,101,100,102,105,108,101,0,42,115,
+110,100,95,115,111,117,110,100,0,112,97,110,110,105,110,103,0,97,116,116,
+101,110,117,97,116,105,111,110,0,112,105,116,99,104,0,109,105,110,95,103,
+97,105,110,0,109,97,120,95,103,97,105,110,0,100,105,115,116,97,110,99,
+101,0,108,111,111,112,115,116,97,114,116,0,108,111,111,112,101,110,100,0,
+99,104,97,110,110,101,108,115,0,104,105,103,104,112,114,105,111,0,112,97,
+100,91,54,93,0,103,97,105,110,0,100,111,112,112,108,101,114,102,97,99,
+116,111,114,0,100,111,112,112,108,101,114,118,101,108,111,99,105,116,121,0,
+110,117,109,115,111,117,110,100,115,98,108,101,110,100,101,114,0,110,117,109,
+115,111,117,110,100,115,103,97,109,101,101,110,103,105,110,101,0,42,103,107,
+101,121,0,112,97,100,102,0,111,107,101,121,0,103,111,98,106,101,99,116,
+0,103,107,101,121,0,42,97,99,116,105,118,101,0,99,104,105,108,100,98,
+97,115,101,0,114,111,108,108,0,104,101,97,100,91,51,93,0,116,97,105,
+108,91,51,93,0,112,97,114,109,97,116,91,52,93,91,52,93,0,100,101,
+102,109,97,116,91,52,93,91,52,93,0,105,114,101,115,116,109,97,116,91,
+52,93,91,52,93,0,112,111,115,101,109,97,116,91,52,93,91,52,93,0,
+98,111,110,101,98,97,115,101,0,99,104,97,105,110,98,97,115,101,0,114,
+101,115,49,0,114,101,115,50,0,114,101,115,51,0,99,104,97,110,98,97,
+115,101,0,42,97,99,104,97,110,0,42,112,99,104,97,110,0,97,99,116,
+110,114,0,110,97,109,101,91,51,48,93,0,101,110,102,111,114,99,101,0,
+111,102,102,115,101,116,91,51,93,0,111,114,105,101,110,116,91,51,93,0,
+114,111,108,108,91,51,93,0,42,116,97,114,0,116,111,108,101,114,97,110,
+99,101,0,105,116,101,114,97,116,105,111,110,115,0,115,117,98,116,97,114,
+103,101,116,91,51,50,93,0,99,97,99,104,101,101,102,102,91,51,93,0,
+99,97,99,104,101,109,97,116,91,52,93,91,52,93,0,122,109,105,110,0,
+122,109,97,120,0,97,99,116,115,116,97,114,116,0,97,99,116,101,110,100,
+0,115,116,114,105,100,101,108,101,110,0,114,101,112,101,97,116,0,98,108,
+101,110,100,111,117,116,0,0,84,89,80,69,174,0,0,0,99,104,97,114,
+0,117,99,104,97,114,0,115,104,111,114,116,0,117,115,104,111,114,116,0,
+105,110,116,0,108,111,110,103,0,117,108,111,110,103,0,102,108,111,97,116,
+0,100,111,117,98,108,101,0,118,111,105,100,0,76,105,110,107,0,76,105,
+115,116,66,97,115,101,0,118,101,99,50,115,0,118,101,99,50,105,0,118,
+101,99,50,102,0,118,101,99,50,100,0,118,101,99,51,105,0,118,101,99,
+51,102,0,118,101,99,51,100,0,118,101,99,52,105,0,118,101,99,52,102,
+0,118,101,99,52,100,0,114,99,116,105,0,114,99,116,102,0,73,68,0,
+76,105,98,114,97,114,121,0,70,105,108,101,68,97,116,97,0,73,112,111,
+0,75,101,121,66,108,111,99,107,0,75,101,121,0,83,99,114,105,112,116,
+76,105,110,107,0,84,101,120,116,76,105,110,101,0,84,101,120,116,0,80,
+97,99,107,101,100,70,105,108,101,0,67,97,109,101,114,97,0,73,109,97,
+103,101,0,97,110,105,109,0,73,109,66,117,102,0,77,84,101,120,0,79,
+98,106,101,99,116,0,84,101,120,0,80,108,117,103,105,110,84,101,120,0,
+67,66,68,97,116,97,0,67,111,108,111,114,66,97,110,100,0,69,110,118,
+77,97,112,0,76,97,109,112,0,87,97,118,101,0,77,97,116,101,114,105,
+97,108,0,86,70,111,110,116,0,86,70,111,110,116,68,97,116,97,0,77,
+101,116,97,69,108,101,109,0,77,101,116,97,66,97,108,108,0,66,111,117,
+110,100,66,111,120,0,66,101,122,84,114,105,112,108,101,0,66,80,111,105,
+110,116,0,78,117,114,98,0,67,117,114,118,101,0,80,97,116,104,0,73,
+112,111,67,117,114,118,101,0,77,70,97,99,101,0,77,70,97,99,101,73,
+110,116,0,84,70,97,99,101,0,77,68,101,102,111,114,109,87,101,105,103,
+104,116,0,66,111,110,101,0,77,68,101,102,111,114,109,86,101,114,116,0,
+77,86,101,114,116,0,77,67,111,108,0,77,83,116,105,99,107,121,0,77,
+101,115,104,0,79,99,73,110,102,111,0,76,97,116,116,105,99,101,0,98,
+68,101,102,111,114,109,71,114,111,117,112,0,98,65,99,116,105,111,110,0,
+98,80,111,115,101,0,98,67,111,110,115,116,114,97,105,110,116,67,104,97,
+110,110,101,108,0,87,111,114,108,100,0,82,97,100,105,111,0,66,97,115,
+101,0,65,118,105,67,111,100,101,99,68,97,116,97,0,82,101,110,100,101,
+114,68,97,116,97,0,71,97,109,101,70,114,97,109,105,110,103,0,83,99,
+101,110,101,0,71,114,111,117,112,0,70,114,101,101,67,97,109,101,114,97,
+0,66,71,112,105,99,0,86,105,101,119,51,68,0,83,112,97,99,101,76,
+105,110,107,0,83,99,114,65,114,101,97,0,86,105,101,119,50,68,0,83,
+112,97,99,101,73,110,102,111,0,83,112,97,99,101,73,112,111,0,83,112,
+97,99,101,66,117,116,115,0,83,112,97,99,101,83,101,113,0,83,112,97,
+99,101,70,105,108,101,0,100,105,114,101,110,116,114,121,0,66,108,101,110,
+100,72,97,110,100,108,101,0,83,112,97,99,101,79,111,112,115,0,83,112,
+97,99,101,73,109,97,103,101,0,83,112,97,99,101,78,108,97,0,83,112,
+97,99,101,84,101,120,116,0,83,112,97,99,101,73,109,97,83,101,108,0,
+73,109,97,68,105,114,0,79,110,101,83,101,108,101,99,116,97,98,108,101,
+73,109,97,0,85,115,101,114,68,101,102,0,98,83,99,114,101,101,110,0,
+83,99,114,86,101,114,116,0,83,99,114,69,100,103,101,0,70,105,108,101,
+71,108,111,98,97,108,0,83,116,114,105,112,69,108,101,109,0,83,116,114,
+105,112,0,80,108,117,103,105,110,83,101,113,0,83,101,113,117,101,110,99,
+101,0,69,100,105,116,105,110,103,0,69,102,102,101,99,116,0,66,117,105,
+108,100,69,102,102,0,80,97,114,116,69,102,102,0,80,97,114,116,105,99,
+108,101,0,87,97,118,101,69,102,102,0,68,101,102,111,114,109,0,76,105,
+109,98,0,73,107,97,0,79,111,112,115,0,98,80,114,111,112,101,114,116,
+121,0,98,78,101,97,114,83,101,110,115,111,114,0,98,77,111,117,115,101,
+83,101,110,115,111,114,0,98,84,111,117,99,104,83,101,110,115,111,114,0,
+98,75,101,121,98,111,97,114,100,83,101,110,115,111,114,0,98,80,114,111,
+112,101,114,116,121,83,101,110,115,111,114,0,98,67,111,108,108,105,115,105,
+111,110,83,101,110,115,111,114,0,98,82,97,100,97,114,83,101,110,115,111,
+114,0,98,82,97,110,100,111,109,83,101,110,115,111,114,0,98,82,97,121,
+83,101,110,115,111,114,0,98,77,101,115,115,97,103,101,83,101,110,115,111,
+114,0,98,83,101,110,115,111,114,0,98,67,111,110,116,114,111,108,108,101,
+114,0,98,69,120,112,114,101,115,115,105,111,110,67,111,110,116,0,98,80,
+121,116,104,111,110,67,111,110,116,0,98,65,99,116,117,97,116,111,114,0,
+98,65,100,100,79,98,106,101,99,116,65,99,116,117,97,116,111,114,0,98,
+65,99,116,105,111,110,65,99,116,117,97,116,111,114,0,98,83,111,117,110,
+100,65,99,116,117,97,116,111,114,0,98,83,111,117,110,100,0,98,67,68,
+65,99,116,117,97,116,111,114,0,98,69,100,105,116,79,98,106,101,99,116,
+65,99,116,117,97,116,111,114,0,98,83,99,101,110,101,65,99,116,117,97,
+116,111,114,0,98,80,114,111,112,101,114,116,121,65,99,116,117,97,116,111,
+114,0,98,79,98,106,101,99,116,65,99,116,117,97,116,111,114,0,98,73,
+112,111,65,99,116,117,97,116,111,114,0,98,67,97,109,101,114,97,65,99,
+116,117,97,116,111,114,0,98,67,111,110,115,116,114,97,105,110,116,65,99,
+116,117,97,116,111,114,0,98,71,114,111,117,112,65,99,116,117,97,116,111,
+114,0,98,82,97,110,100,111,109,65,99,116,117,97,116,111,114,0,98,77,
+101,115,115,97,103,101,65,99,116,117,97,116,111,114,0,98,71,97,109,101,
+65,99,116,117,97,116,111,114,0,98,86,105,115,105,98,105,108,105,116,121,
+65,99,116,117,97,116,111,114,0,98,83,97,109,112,108,101,0,98,83,111,
+117,110,100,76,105,115,116,101,110,101,114,0,83,112,97,99,101,83,111,117,
+110,100,0,71,114,111,117,112,75,101,121,0,79,98,106,101,99,116,75,101,
+121,0,71,114,111,117,112,79,98,106,101,99,116,0,98,65,114,109,97,116,
+117,114,101,0,98,80,111,115,101,67,104,97,110,110,101,108,0,98,65,99,
+116,105,111,110,67,104,97,110,110,101,108,0,83,112,97,99,101,65,99,116,
+105,111,110,0,98,67,111,110,115,116,114,97,105,110,116,0,98,75,105,110,
+101,109,97,116,105,99,67,111,110,115,116,114,97,105,110,116,0,98,84,114,
+97,99,107,84,111,67,111,110,115,116,114,97,105,110,116,0,98,82,111,116,
+97,116,101,76,105,107,101,67,111,110,115,116,114,97,105,110,116,0,98,76,
+111,99,97,116,101,76,105,107,101,67,111,110,115,116,114,97,105,110,116,0,
+98,65,99,116,105,111,110,67,111,110,115,116,114,97,105,110,116,0,98,70,
+111,108,108,111,119,80,97,116,104,67,111,110,115,116,114,97,105,110,116,0,
+98,82,111,116,97,116,105,111,110,67,111,110,115,116,114,97,105,110,116,0,
+98,65,99,116,105,111,110,83,116,114,105,112,0,0,0,0,84,76,69,78,
+1,0,1,0,2,0,2,0,4,0,4,0,4,0,4,0,8,0,0,0,
+8,0,8,0,4,0,8,0,8,0,16,0,12,0,12,0,24,0,16,0,
+16,0,32,0,16,0,16,0,48,0,224,0,0,0,80,0,28,0,116,0,
+16,0,20,0,100,0,20,0,108,0,40,1,0,0,0,0,80,0,168,2,
+168,0,80,1,24,0,136,1,120,0,180,0,52,0,16,1,64,1,0,0,
+72,0,132,0,0,0,60,0,28,0,48,0,232,0,0,0,80,0,12,0,
+20,0,60,0,12,0,236,1,12,0,20,0,4,0,8,0,196,0,0,0,
+76,0,44,0,64,0,8,0,44,0,236,0,40,0,28,0,48,0,132,2,
+16,0,20,3,68,0,40,0,36,0,136,1,20,0,180,0,112,0,20,0,
+200,0,184,0,140,0,68,1,0,0,0,0,152,0,160,0,132,0,104,0,
+224,2,0,0,0,0,20,2,100,0,20,0,24,0,12,0,64,0,108,0,
+240,0,148,0,28,0,16,0,24,0,156,0,0,0,56,0,236,0,40,0,
+156,0,44,0,64,0,48,0,8,0,44,0,72,0,104,0,72,0,44,0,
+40,0,108,0,68,0,76,0,80,0,128,0,4,0,60,0,12,0,60,0,
+20,0,20,1,16,0,64,0,16,0,76,0,120,0,48,0,28,0,56,0,
+52,0,56,0,108,0,136,0,4,0,0,0,64,0,152,0,48,0,112,1,
+20,0,80,0,160,0,60,0,152,0,96,0,124,0,44,0,44,0,44,0,
+56,0,4,0,24,0,56,0,83,84,82,67,151,0,0,0,10,0,2,0,
+10,0,0,0,10,0,1,0,11,0,2,0,9,0,2,0,9,0,3,0,
+12,0,2,0,2,0,4,0,2,0,5,0,13,0,2,0,4,0,4,0,
+4,0,5,0,14,0,2,0,7,0,4,0,7,0,5,0,15,0,2,0,
+8,0,4,0,8,0,5,0,16,0,3,0,4,0,4,0,4,0,5,0,
+4,0,6,0,17,0,3,0,7,0,4,0,7,0,5,0,7,0,6,0,
+18,0,3,0,8,0,4,0,8,0,5,0,8,0,6,0,19,0,4,0,
+4,0,4,0,4,0,5,0,4,0,6,0,4,0,7,0,20,0,4,0,
+7,0,4,0,7,0,5,0,7,0,6,0,7,0,7,0,21,0,4,0,
+8,0,4,0,8,0,5,0,8,0,6,0,8,0,7,0,22,0,4,0,
+4,0,8,0,4,0,9,0,4,0,10,0,4,0,11,0,23,0,4,0,
+7,0,8,0,7,0,9,0,7,0,10,0,7,0,11,0,24,0,8,0,
+9,0,0,0,9,0,1,0,24,0,12,0,25,0,13,0,0,0,14,0,
+2,0,15,0,2,0,16,0,4,0,17,0,25,0,6,0,24,0,18,0,
+24,0,19,0,26,0,20,0,0,0,21,0,4,0,22,0,4,0,17,0,
+27,0,6,0,24,0,18,0,11,0,23,0,23,0,24,0,2,0,25,0,
+2,0,26,0,4,0,17,0,28,0,9,0,28,0,0,0,28,0,1,0,
+7,0,27,0,2,0,16,0,2,0,28,0,2,0,29,0,2,0,30,0,
+4,0,17,0,9,0,31,0,29,0,12,0,24,0,18,0,28,0,32,0,
+0,0,33,0,4,0,34,0,7,0,35,0,11,0,36,0,27,0,37,0,
+24,0,38,0,2,0,29,0,2,0,39,0,2,0,40,0,2,0,41,0,
+30,0,5,0,24,0,42,0,2,0,43,0,2,0,44,0,2,0,45,0,
+4,0,17,0,31,0,5,0,31,0,0,0,31,0,1,0,0,0,46,0,
+4,0,47,0,4,0,48,0,32,0,13,0,24,0,18,0,0,0,49,0,
+4,0,50,0,4,0,51,0,11,0,52,0,31,0,53,0,31,0,54,0,
+4,0,55,0,4,0,56,0,0,0,57,0,4,0,58,0,4,0,59,0,
+9,0,60,0,33,0,5,0,4,0,61,0,4,0,62,0,4,0,50,0,
+4,0,17,0,9,0,31,0,34,0,15,0,24,0,18,0,2,0,29,0,
+2,0,16,0,2,0,63,0,2,0,64,0,7,0,65,0,7,0,66,0,
+7,0,67,0,7,0,68,0,7,0,69,0,7,0,70,0,7,0,71,0,
+7,0,72,0,27,0,37,0,30,0,73,0,35,0,21,0,24,0,18,0,
+0,0,21,0,36,0,74,0,37,0,75,0,37,0,76,0,2,0,77,0,
+2,0,16,0,2,0,78,0,2,0,79,0,2,0,80,0,2,0,81,0,
+2,0,82,0,2,0,83,0,2,0,84,0,2,0,85,0,4,0,86,0,
+4,0,87,0,33,0,88,0,7,0,89,0,2,0,90,0,2,0,91,0,
+38,0,22,0,2,0,92,0,2,0,93,0,2,0,94,0,2,0,95,0,
+39,0,96,0,40,0,97,0,0,0,98,0,0,0,99,0,0,0,100,0,
+0,0,101,0,7,0,102,0,7,0,103,0,2,0,104,0,2,0,105,0,
+7,0,106,0,7,0,107,0,7,0,108,0,7,0,109,0,7,0,110,0,
+7,0,111,0,7,0,112,0,7,0,113,0,41,0,14,0,0,0,21,0,
+9,0,114,0,0,0,115,0,0,0,116,0,4,0,117,0,4,0,118,0,
+9,0,119,0,7,0,120,0,7,0,121,0,7,0,122,0,4,0,123,0,
+9,0,124,0,4,0,125,0,4,0,17,0,42,0,6,0,7,0,106,0,
+7,0,107,0,7,0,108,0,7,0,126,0,7,0,27,0,4,0,24,0,
+43,0,5,0,2,0,16,0,2,0,22,0,2,0,24,0,2,0,127,0,
+42,0,128,0,44,0,12,0,39,0,96,0,35,0,129,0,35,0,130,0,
+7,0,131,0,2,0,29,0,2,0,132,0,7,0,65,0,7,0,66,0,
+4,0,133,0,4,0,134,0,2,0,77,0,2,0,78,0,40,0,35,0,
+24,0,18,0,7,0,135,0,7,0,136,0,7,0,137,0,7,0,138,0,
+7,0,139,0,7,0,140,0,7,0,141,0,7,0,142,0,2,0,143,0,
+2,0,144,0,2,0,145,0,2,0,16,0,2,0,29,0,2,0,132,0,
+7,0,146,0,7,0,147,0,7,0,148,0,7,0,149,0,2,0,150,0,
+2,0,151,0,2,0,152,0,2,0,47,0,2,0,153,0,2,0,154,0,
+2,0,155,0,2,0,156,0,7,0,112,0,7,0,157,0,27,0,37,0,
+35,0,129,0,41,0,158,0,43,0,159,0,44,0,160,0,2,0,161,0,
+45,0,28,0,24,0,18,0,2,0,29,0,2,0,162,0,2,0,105,0,
+2,0,163,0,7,0,106,0,7,0,107,0,7,0,108,0,7,0,109,0,
+7,0,164,0,7,0,165,0,7,0,166,0,7,0,167,0,7,0,168,0,
+7,0,169,0,7,0,170,0,2,0,171,0,2,0,172,0,7,0,65,0,
+7,0,66,0,7,0,173,0,7,0,174,0,7,0,175,0,2,0,176,0,
+2,0,177,0,38,0,178,0,27,0,37,0,30,0,73,0,46,0,2,0,
+24,0,18,0,27,0,37,0,47,0,58,0,24,0,18,0,2,0,105,0,
+2,0,179,0,7,0,106,0,7,0,107,0,7,0,108,0,7,0,180,0,
+7,0,181,0,7,0,182,0,7,0,183,0,7,0,184,0,7,0,185,0,
+7,0,186,0,7,0,187,0,7,0,188,0,7,0,189,0,7,0,190,0,
+7,0,191,0,7,0,192,0,7,0,193,0,7,0,194,0,7,0,195,0,
+7,0,196,0,7,0,197,0,7,0,198,0,2,0,199,0,0,0,200,0,
+0,0,201,0,4,0,162,0,4,0,202,0,2,0,203,0,2,0,204,0,
+2,0,205,0,2,0,206,0,7,0,207,0,7,0,208,0,7,0,209,0,
+7,0,210,0,0,0,211,0,0,0,176,0,0,0,212,0,0,0,213,0,
+2,0,214,0,2,0,215,0,4,0,216,0,2,0,92,0,2,0,93,0,
+38,0,178,0,27,0,37,0,47,0,217,0,7,0,218,0,7,0,219,0,
+7,0,220,0,7,0,221,0,7,0,222,0,2,0,223,0,2,0,17,0,
+30,0,73,0,48,0,6,0,24,0,18,0,0,0,224,0,7,0,225,0,
+7,0,17,0,49,0,31,0,33,0,88,0,50,0,20,0,50,0,0,0,
+50,0,1,0,2,0,29,0,2,0,179,0,2,0,16,0,2,0,226,0,
+7,0,4,0,7,0,5,0,7,0,6,0,7,0,227,0,7,0,228,0,
+7,0,229,0,7,0,230,0,7,0,231,0,7,0,232,0,7,0,47,0,
+7,0,233,0,4,0,17,0,7,0,234,0,7,0,235,0,51,0,15,0,
+24,0,18,0,52,0,236,0,11,0,237,0,11,0,238,0,27,0,37,0,
+47,0,239,0,2,0,16,0,2,0,240,0,4,0,104,0,7,0,241,0,
+7,0,103,0,7,0,242,0,7,0,243,0,7,0,244,0,7,0,245,0,
+53,0,9,0,7,0,246,0,7,0,247,0,2,0,248,0,2,0,249,0,
+2,0,250,0,0,0,251,0,0,0,252,0,0,0,253,0,0,0,254,0,
+54,0,5,0,7,0,255,0,7,0,247,0,2,0,0,1,2,0,251,0,
+2,0,254,0,55,0,18,0,55,0,0,0,55,0,1,0,2,0,29,0,
+2,0,1,1,2,0,254,0,2,0,16,0,2,0,2,1,2,0,3,1,
+2,0,4,1,2,0,5,1,2,0,6,1,2,0,7,1,2,0,8,1,
+2,0,9,1,7,0,10,1,7,0,11,1,54,0,12,1,53,0,13,1,
+56,0,38,0,24,0,18,0,52,0,236,0,11,0,14,1,11,0,238,0,
+39,0,15,1,39,0,16,1,27,0,37,0,57,0,17,1,29,0,18,1,
+47,0,239,0,11,0,19,1,7,0,20,1,7,0,241,0,7,0,103,0,
+7,0,242,0,4,0,104,0,2,0,21,1,2,0,240,0,2,0,16,0,
+2,0,22,1,7,0,23,1,7,0,24,1,7,0,25,1,2,0,4,1,
+2,0,5,1,2,0,47,0,2,0,52,0,2,0,27,0,2,0,26,1,
+7,0,27,1,7,0,28,1,7,0,29,1,7,0,30,1,7,0,31,1,
+7,0,32,1,0,0,33,1,0,0,34,1,48,0,35,1,58,0,18,0,
+58,0,0,0,58,0,1,0,54,0,12,1,53,0,13,1,23,0,36,1,
+23,0,37,1,2,0,25,0,2,0,38,1,2,0,39,1,2,0,40,1,
+2,0,41,1,2,0,42,1,2,0,16,0,2,0,30,0,7,0,10,0,
+7,0,11,0,4,0,43,1,7,0,35,0,59,0,8,0,3,0,44,1,
+3,0,45,1,3,0,46,1,3,0,47,1,0,0,48,1,0,0,1,1,
+0,0,49,1,0,0,16,0,60,0,8,0,4,0,44,1,4,0,45,1,
+4,0,46,1,4,0,47,1,0,0,48,1,0,0,1,1,0,0,49,1,
+0,0,16,0,61,0,8,0,9,0,50,1,7,0,51,1,4,0,52,1,
+0,0,16,0,0,0,53,1,2,0,162,0,2,0,54,1,2,0,17,0,
+62,0,3,0,4,0,55,1,7,0,56,1,63,0,31,0,64,0,3,0,
+62,0,57,1,4,0,58,1,4,0,91,0,65,0,4,0,7,0,59,1,
+2,0,60,1,0,0,16,0,0,0,1,1,66,0,4,0,0,0,126,0,
+0,0,106,0,0,0,107,0,0,0,108,0,67,0,1,0,7,0,61,1,
+68,0,34,0,24,0,18,0,52,0,236,0,11,0,62,1,11,0,238,0,
+27,0,37,0,29,0,18,1,47,0,239,0,9,0,63,1,9,0,64,1,
+9,0,65,1,65,0,66,1,64,0,67,1,66,0,68,1,67,0,69,1,
+68,0,70,1,7,0,20,1,69,0,71,1,9,0,72,1,4,0,40,1,
+4,0,73,1,4,0,104,0,7,0,241,0,7,0,103,0,7,0,242,0,
+2,0,74,1,2,0,16,0,2,0,75,1,2,0,76,1,2,0,240,0,
+2,0,91,0,2,0,77,1,2,0,78,1,7,0,79,1,7,0,80,1,
+70,0,13,0,24,0,18,0,2,0,2,1,2,0,3,1,2,0,81,1,
+2,0,16,0,0,0,82,1,0,0,83,1,0,0,84,1,0,0,29,0,
+4,0,17,0,54,0,85,1,27,0,37,0,29,0,18,1,71,0,4,0,
+71,0,0,0,71,0,1,0,0,0,86,1,9,0,31,0,39,0,79,0,
+24,0,18,0,2,0,29,0,2,0,87,1,4,0,88,1,4,0,89,1,
+4,0,90,1,0,0,91,1,9,0,92,1,39,0,93,1,39,0,94,1,
+27,0,37,0,57,0,17,1,52,0,236,0,72,0,95,1,73,0,96,1,
+9,0,31,0,74,0,97,1,11,0,98,1,11,0,62,1,11,0,99,1,
+11,0,238,0,11,0,100,1,47,0,239,0,7,0,241,0,7,0,101,1,
+7,0,102,1,7,0,103,0,7,0,103,1,7,0,242,0,7,0,104,1,
+7,0,105,1,7,0,106,1,7,0,107,1,7,0,108,1,7,0,131,0,
+4,0,179,0,2,0,16,0,2,0,109,1,0,0,110,1,0,0,111,1,
+0,0,112,1,0,0,113,1,2,0,114,1,2,0,115,1,2,0,116,1,
+2,0,117,1,2,0,118,1,2,0,119,1,2,0,120,1,2,0,121,1,
+7,0,122,1,7,0,123,1,7,0,124,1,7,0,125,1,7,0,126,1,
+7,0,127,1,7,0,128,1,7,0,129,1,7,0,130,1,0,0,131,1,
+0,0,132,1,0,0,240,0,0,0,133,1,30,0,73,0,11,0,134,1,
+11,0,135,1,11,0,136,1,11,0,137,1,9,0,72,1,7,0,138,1,
+2,0,139,1,2,0,140,1,7,0,52,1,4,0,141,1,4,0,142,1,
+4,0,17,0,7,0,143,1,11,0,144,1,11,0,145,1,75,0,43,0,
+24,0,18,0,2,0,105,0,2,0,163,0,2,0,176,0,2,0,146,1,
+7,0,147,1,7,0,148,1,7,0,149,1,7,0,150,1,7,0,151,1,
+7,0,152,1,7,0,153,1,7,0,154,1,7,0,186,0,7,0,188,0,
+7,0,187,0,7,0,155,1,4,0,156,1,7,0,157,1,7,0,158,1,
+7,0,159,1,2,0,160,1,2,0,162,0,7,0,161,1,7,0,162,1,
+7,0,163,1,7,0,164,1,7,0,165,1,7,0,166,1,7,0,167,1,
+7,0,168,1,7,0,169,1,7,0,170,1,7,0,171,1,7,0,172,1,
+2,0,173,1,2,0,174,1,2,0,175,1,2,0,176,1,4,0,216,0,
+27,0,37,0,38,0,178,0,30,0,73,0,76,0,16,0,2,0,177,1,
+2,0,178,1,2,0,179,1,2,0,16,0,2,0,180,1,2,0,181,1,
+2,0,182,1,2,0,183,1,2,0,184,1,2,0,185,1,2,0,186,1,
+2,0,187,1,4,0,188,1,7,0,189,1,7,0,190,1,7,0,191,1,
+77,0,8,0,77,0,0,0,77,0,1,0,4,0,179,0,4,0,226,0,
+4,0,16,0,2,0,192,1,2,0,193,1,39,0,96,0,78,0,12,0,
+9,0,194,1,9,0,195,1,4,0,196,1,4,0,197,1,4,0,198,1,
+4,0,199,1,4,0,200,1,4,0,201,1,4,0,202,1,4,0,203,1,
+4,0,204,1,4,0,17,0,79,0,55,0,78,0,205,1,2,0,206,1,
+2,0,155,0,2,0,207,1,2,0,208,1,2,0,209,1,2,0,16,0,
+7,0,123,1,7,0,210,1,7,0,211,1,7,0,212,1,7,0,213,1,
+7,0,214,1,2,0,215,1,2,0,216,1,2,0,217,1,2,0,218,1,
+2,0,219,1,2,0,220,1,2,0,221,1,2,0,222,1,2,0,223,1,
+2,0,224,1,2,0,61,0,2,0,225,1,2,0,226,1,2,0,227,1,
+2,0,228,1,2,0,229,1,2,0,230,1,2,0,231,1,23,0,232,1,
+23,0,233,1,2,0,234,1,2,0,235,1,2,0,236,1,2,0,237,1,
+2,0,238,1,2,0,239,1,2,0,162,0,2,0,240,1,2,0,241,1,
+2,0,242,1,2,0,243,1,2,0,244,1,2,0,245,1,2,0,246,1,
+7,0,191,1,7,0,247,1,7,0,248,1,7,0,249,1,7,0,250,1,
+0,0,251,1,0,0,252,1,0,0,253,1,80,0,5,0,7,0,254,1,
+0,0,29,0,0,0,216,0,0,0,255,1,0,0,0,2,81,0,17,0,
+24,0,18,0,39,0,1,2,75,0,2,2,81,0,3,2,35,0,129,0,
+11,0,4,2,77,0,5,2,82,0,6,2,7,0,7,2,4,0,179,0,
+83,0,8,2,9,0,9,2,76,0,10,2,9,0,72,1,80,0,11,2,
+79,0,106,0,30,0,73,0,84,0,10,0,35,0,129,0,40,0,97,0,
+7,0,31,1,7,0,32,1,7,0,61,0,7,0,12,2,7,0,13,2,
+2,0,14,2,2,0,15,2,4,0,16,2,85,0,38,0,86,0,0,0,
+86,0,1,0,4,0,17,2,4,0,17,0,87,0,18,2,7,0,19,2,
+7,0,20,2,7,0,21,2,7,0,22,2,7,0,23,2,7,0,165,0,
+2,0,24,2,2,0,25,2,39,0,1,2,84,0,26,2,85,0,27,2,
+2,0,179,1,2,0,28,2,4,0,179,0,4,0,29,2,2,0,30,2,
+2,0,31,2,2,0,32,2,2,0,16,0,7,0,69,0,7,0,33,2,
+7,0,34,2,7,0,35,2,7,0,102,0,7,0,7,2,2,0,36,2,
+2,0,37,2,2,0,38,2,2,0,39,2,2,0,40,2,2,0,41,2,
+4,0,255,1,4,0,0,2,88,0,13,0,23,0,22,0,23,0,24,0,
+22,0,42,2,22,0,43,2,22,0,44,2,7,0,45,2,7,0,46,2,
+7,0,47,2,7,0,48,2,2,0,49,2,2,0,50,2,2,0,51,2,
+2,0,52,2,86,0,5,0,86,0,0,0,86,0,1,0,4,0,17,2,
+4,0,17,0,87,0,18,2,89,0,5,0,86,0,0,0,86,0,1,0,
+4,0,17,2,4,0,216,0,87,0,18,2,90,0,23,0,86,0,0,0,
+86,0,1,0,4,0,17,2,4,0,216,0,87,0,18,2,4,0,53,2,
+4,0,255,1,88,0,54,2,9,0,55,2,11,0,56,2,27,0,37,0,
+24,0,38,0,2,0,57,2,2,0,58,2,2,0,59,2,2,0,60,2,
+2,0,26,0,2,0,25,0,2,0,61,2,2,0,62,2,4,0,16,0,
+4,0,91,0,23,0,22,0,91,0,27,0,86,0,0,0,86,0,1,0,
+4,0,17,2,4,0,216,0,87,0,18,2,2,0,63,2,2,0,64,2,
+4,0,255,1,88,0,54,2,2,0,65,2,2,0,61,2,2,0,58,2,
+2,0,66,2,9,0,67,2,2,0,68,2,0,0,69,2,0,0,70,2,
+2,0,71,2,2,0,72,2,4,0,16,2,2,0,73,2,2,0,74,2,
+2,0,75,2,2,0,115,1,0,0,176,0,0,0,76,2,90,0,77,2,
+92,0,9,0,86,0,0,0,86,0,1,0,4,0,17,2,4,0,17,0,
+87,0,18,2,88,0,54,2,2,0,65,2,2,0,12,2,4,0,255,1,
+93,0,23,0,86,0,0,0,86,0,1,0,4,0,17,2,4,0,17,0,
+87,0,18,2,94,0,78,2,4,0,79,2,0,0,80,2,0,0,81,2,
+0,0,82,2,2,0,29,0,2,0,83,2,2,0,16,0,2,0,84,2,
+2,0,85,2,2,0,86,2,95,0,87,2,2,0,88,2,2,0,127,0,
+2,0,89,2,2,0,90,2,9,0,91,2,2,0,92,2,96,0,12,0,
+86,0,0,0,86,0,1,0,4,0,17,2,4,0,17,0,87,0,18,2,
+88,0,54,2,11,0,93,2,2,0,58,2,2,0,94,2,2,0,16,0,
+2,0,30,0,9,0,67,2,97,0,17,0,86,0,0,0,86,0,1,0,
+4,0,17,2,4,0,17,0,87,0,18,2,88,0,54,2,35,0,95,2,
+7,0,12,2,7,0,255,1,2,0,162,0,2,0,58,2,2,0,96,2,
+2,0,97,2,2,0,31,1,2,0,32,1,2,0,16,0,2,0,62,2,
+98,0,6,0,86,0,0,0,86,0,1,0,4,0,17,2,4,0,62,2,
+87,0,18,2,88,0,54,2,99,0,21,0,86,0,0,0,86,0,1,0,
+4,0,17,2,4,0,17,0,87,0,18,2,32,0,98,2,4,0,99,2,
+4,0,100,2,2,0,50,0,2,0,61,2,4,0,101,2,4,0,102,2,
+4,0,103,2,4,0,255,1,7,0,104,2,22,0,105,2,22,0,106,2,
+9,0,107,2,9,0,108,2,9,0,109,2,9,0,110,2,100,0,81,0,
+86,0,0,0,86,0,1,0,4,0,17,2,4,0,216,0,87,0,18,2,
+0,0,111,2,4,0,112,2,2,0,162,0,2,0,113,2,2,0,114,2,
+2,0,115,2,2,0,36,2,2,0,37,2,2,0,116,2,2,0,117,2,
+2,0,118,2,2,0,119,2,2,0,120,2,2,0,121,2,2,0,122,2,
+2,0,123,2,2,0,124,2,2,0,125,2,2,0,126,2,2,0,127,2,
+2,0,128,2,2,0,129,2,2,0,130,2,2,0,131,2,2,0,132,2,
+2,0,133,2,2,0,134,2,2,0,135,2,2,0,136,2,2,0,137,2,
+2,0,138,2,2,0,139,2,2,0,140,2,2,0,141,2,2,0,142,2,
+2,0,143,2,2,0,144,2,2,0,145,2,2,0,146,2,2,0,147,2,
+2,0,148,2,2,0,149,2,2,0,150,2,2,0,151,2,2,0,152,2,
+2,0,153,2,2,0,154,2,2,0,155,2,2,0,156,2,2,0,157,2,
+0,0,158,2,0,0,159,2,0,0,160,2,0,0,161,2,101,0,162,2,
+101,0,163,2,4,0,164,2,4,0,165,2,4,0,166,2,4,0,167,2,
+4,0,168,2,7,0,169,2,7,0,170,2,7,0,171,2,2,0,172,2,
+2,0,173,2,2,0,174,2,2,0,175,2,102,0,176,2,102,0,177,2,
+2,0,178,2,2,0,179,2,4,0,255,1,37,0,180,2,9,0,91,2,
+9,0,181,2,103,0,15,0,2,0,16,0,2,0,182,2,4,0,183,2,
+0,0,184,2,0,0,185,2,0,0,186,2,0,0,187,2,0,0,188,2,
+0,0,189,2,0,0,190,2,0,0,191,2,2,0,192,2,2,0,193,2,
+4,0,194,2,4,0,128,1,104,0,17,0,24,0,18,0,11,0,195,2,
+11,0,196,2,11,0,197,2,81,0,198,2,2,0,199,2,2,0,200,2,
+2,0,201,2,2,0,202,2,2,0,203,2,2,0,204,2,2,0,205,2,
+2,0,206,2,2,0,207,2,2,0,30,0,2,0,208,2,2,0,209,2,
+105,0,5,0,105,0,0,0,105,0,1,0,105,0,210,2,12,0,211,2,
+4,0,16,0,106,0,7,0,106,0,0,0,106,0,1,0,105,0,212,2,
+105,0,213,2,2,0,233,1,2,0,16,0,4,0,17,0,87,0,28,0,
+87,0,0,0,87,0,1,0,105,0,212,2,105,0,213,2,105,0,214,2,
+105,0,215,2,104,0,216,2,7,0,217,2,22,0,37,1,22,0,218,2,
+22,0,219,2,2,0,220,2,2,0,221,2,2,0,222,2,0,0,17,2,
+0,0,223,2,2,0,224,2,2,0,225,2,0,0,226,2,0,0,227,2,
+0,0,228,2,0,0,229,2,2,0,230,2,2,0,231,2,2,0,232,2,
+2,0,30,0,11,0,233,2,11,0,234,2,107,0,4,0,9,0,235,2,
+2,0,236,2,2,0,234,1,4,0,237,2,108,0,8,0,0,0,238,2,
+37,0,75,0,108,0,239,2,108,0,240,2,108,0,241,2,2,0,77,0,
+2,0,242,2,4,0,17,0,109,0,11,0,109,0,0,0,109,0,1,0,
+2,0,30,0,2,0,47,0,2,0,15,0,2,0,243,2,108,0,244,2,
+0,0,245,2,2,0,246,2,2,0,247,2,4,0,17,0,110,0,10,0,
+0,0,248,2,9,0,114,0,0,0,115,0,4,0,118,0,4,0,125,0,
+9,0,119,0,7,0,121,0,7,0,122,0,9,0,123,0,9,0,124,0,
+111,0,32,0,111,0,0,0,111,0,1,0,111,0,249,2,9,0,13,0,
+0,0,14,0,2,0,16,0,2,0,29,0,4,0,47,0,4,0,250,2,
+4,0,251,2,4,0,252,2,4,0,253,2,4,0,254,2,4,0,255,2,
+4,0,219,1,4,0,0,3,4,0,1,3,7,0,2,3,7,0,3,3,
+4,0,155,0,109,0,4,3,108,0,5,3,27,0,37,0,81,0,198,2,
+36,0,74,0,7,0,6,3,7,0,7,3,110,0,158,0,111,0,8,3,
+111,0,9,3,111,0,10,3,11,0,11,3,112,0,6,0,11,0,12,3,
+11,0,11,3,11,0,13,3,2,0,16,0,2,0,30,0,4,0,17,0,
+113,0,6,0,113,0,0,0,113,0,1,0,2,0,29,0,2,0,16,0,
+2,0,14,3,2,0,30,0,114,0,8,0,114,0,0,0,114,0,1,0,
+2,0,29,0,2,0,16,0,2,0,14,3,2,0,30,0,7,0,47,0,
+7,0,155,0,115,0,31,0,115,0,0,0,115,0,1,0,2,0,29,0,
+2,0,16,0,2,0,14,3,2,0,132,0,7,0,15,3,7,0,16,3,
+7,0,17,3,4,0,18,3,4,0,39,0,4,0,19,3,7,0,20,3,
+7,0,21,3,7,0,22,3,7,0,23,3,7,0,24,3,7,0,25,3,
+7,0,26,3,7,0,27,3,7,0,28,3,7,0,29,3,7,0,30,3,
+7,0,31,3,2,0,32,3,2,0,33,3,2,0,34,3,2,0,35,3,
+2,0,36,3,2,0,17,0,116,0,37,3,117,0,16,0,117,0,0,0,
+117,0,1,0,2,0,29,0,2,0,16,0,2,0,14,3,2,0,132,0,
+7,0,199,2,7,0,201,2,7,0,38,3,7,0,23,1,7,0,39,3,
+7,0,40,3,7,0,41,3,7,0,26,3,7,0,42,3,7,0,17,3,
+118,0,13,0,39,0,43,3,2,0,16,0,2,0,87,1,4,0,88,1,
+4,0,89,1,4,0,90,1,7,0,131,0,7,0,44,3,7,0,45,3,
+7,0,46,3,7,0,47,3,7,0,165,0,7,0,17,0,119,0,9,0,
+119,0,0,0,119,0,1,0,7,0,47,0,7,0,48,3,7,0,47,3,
+7,0,193,0,7,0,49,3,7,0,17,0,7,0,50,3,120,0,23,0,
+24,0,18,0,2,0,87,1,2,0,16,0,2,0,51,3,2,0,52,3,
+11,0,53,3,7,0,54,3,7,0,55,3,7,0,56,3,7,0,57,3,
+7,0,58,3,7,0,59,3,7,0,60,3,7,0,61,3,27,0,37,0,
+39,0,93,1,4,0,88,1,4,0,89,1,4,0,90,1,4,0,62,3,
+118,0,85,1,4,0,63,3,4,0,64,3,121,0,12,0,121,0,0,0,
+121,0,1,0,2,0,29,0,2,0,16,0,2,0,131,1,2,0,254,0,
+7,0,4,0,7,0,5,0,7,0,65,3,7,0,66,3,24,0,67,3,
+11,0,68,3,122,0,11,0,122,0,0,0,122,0,1,0,0,0,86,1,
+2,0,29,0,2,0,69,3,4,0,70,3,4,0,71,3,2,0,16,0,
+2,0,17,0,9,0,72,3,9,0,73,3,123,0,5,0,0,0,86,1,
+7,0,165,0,7,0,74,3,4,0,75,3,4,0,17,0,124,0,4,0,
+2,0,29,0,2,0,16,0,2,0,216,0,2,0,255,1,125,0,4,0,
+0,0,86,1,47,0,76,3,7,0,165,0,7,0,17,0,126,0,6,0,
+2,0,77,3,2,0,78,3,2,0,29,0,2,0,79,3,0,0,80,3,
+0,0,81,3,127,0,5,0,4,0,29,0,4,0,17,0,0,0,86,1,
+0,0,82,3,0,0,83,3,128,0,6,0,0,0,86,1,0,0,84,3,
+2,0,85,3,2,0,26,3,2,0,162,0,2,0,255,1,129,0,5,0,
+0,0,86,1,7,0,86,3,7,0,87,3,2,0,16,0,2,0,88,3,
+130,0,3,0,0,0,86,1,4,0,19,3,4,0,89,3,131,0,7,0,
+0,0,86,1,7,0,87,3,0,0,90,3,0,0,91,3,2,0,162,0,
+2,0,216,0,4,0,92,3,132,0,3,0,39,0,93,3,0,0,94,3,
+0,0,95,3,133,0,17,0,133,0,0,0,133,0,1,0,2,0,29,0,
+2,0,69,3,2,0,16,0,2,0,96,3,2,0,97,3,2,0,98,3,
+2,0,216,0,2,0,255,1,0,0,86,1,9,0,31,0,134,0,99,3,
+39,0,43,3,2,0,100,3,2,0,101,3,4,0,17,0,135,0,1,0,
+0,0,102,3,136,0,1,0,32,0,98,2,134,0,18,0,134,0,0,0,
+134,0,1,0,134,0,103,3,2,0,29,0,2,0,16,0,2,0,104,3,
+2,0,98,3,2,0,69,3,2,0,105,3,2,0,255,1,2,0,0,2,
+0,0,86,1,9,0,31,0,137,0,99,3,133,0,106,3,2,0,107,3,
+2,0,108,3,4,0,109,3,138,0,3,0,4,0,110,3,4,0,17,0,
+39,0,43,3,139,0,13,0,72,0,111,3,2,0,29,0,2,0,16,0,
+2,0,15,3,2,0,16,3,0,0,86,1,2,0,112,3,2,0,113,3,
+7,0,114,3,2,0,115,3,2,0,91,0,2,0,77,1,2,0,78,1,
+140,0,9,0,2,0,16,0,2,0,116,3,2,0,15,3,2,0,16,3,
+141,0,117,3,2,0,29,0,2,0,118,3,2,0,119,3,2,0,120,3,
+142,0,7,0,2,0,16,0,2,0,116,3,2,0,15,3,2,0,16,3,
+2,0,29,0,2,0,121,3,7,0,122,3,143,0,9,0,4,0,110,3,
+2,0,29,0,2,0,16,0,39,0,43,3,68,0,123,3,0,0,86,1,
+7,0,124,3,2,0,125,3,2,0,17,0,144,0,5,0,2,0,29,0,
+2,0,16,0,4,0,17,0,81,0,198,2,39,0,1,2,145,0,5,0,
+4,0,16,0,4,0,29,0,0,0,86,1,0,0,82,3,39,0,43,3,
+146,0,12,0,4,0,16,0,4,0,29,0,7,0,126,3,7,0,127,3,
+7,0,241,0,7,0,242,0,7,0,101,1,7,0,104,1,7,0,128,3,
+7,0,129,3,7,0,130,3,0,0,131,3,147,0,9,0,2,0,16,0,
+2,0,29,0,2,0,15,3,2,0,16,3,0,0,86,1,2,0,216,0,
+2,0,24,0,2,0,132,3,2,0,133,3,148,0,8,0,39,0,43,3,
+7,0,38,3,7,0,134,3,7,0,135,3,7,0,47,3,2,0,16,0,
+2,0,88,3,7,0,136,3,149,0,7,0,2,0,16,0,2,0,26,3,
+7,0,58,3,7,0,137,3,7,0,138,3,7,0,139,3,7,0,140,3,
+150,0,10,0,2,0,16,0,2,0,29,0,2,0,15,3,2,0,16,3,
+0,0,86,1,2,0,216,0,2,0,24,0,2,0,132,3,2,0,133,3,
+82,0,6,2,151,0,7,0,4,0,19,3,4,0,141,3,4,0,142,3,
+4,0,143,3,7,0,144,3,7,0,145,3,0,0,90,3,152,0,7,0,
+0,0,146,3,39,0,147,3,0,0,94,3,2,0,148,3,2,0,216,0,
+4,0,255,1,0,0,95,3,153,0,6,0,2,0,16,0,2,0,29,0,
+2,0,15,3,2,0,16,3,0,0,149,3,0,0,150,3,154,0,1,0,
+4,0,16,0,137,0,10,0,137,0,0,0,137,0,1,0,137,0,103,3,
+2,0,29,0,2,0,16,0,2,0,69,3,2,0,151,3,0,0,86,1,
+9,0,31,0,39,0,43,3,83,0,10,0,7,0,124,1,7,0,152,3,
+7,0,153,3,7,0,154,3,7,0,155,3,4,0,16,0,7,0,156,3,
+7,0,157,3,7,0,158,3,7,0,17,0,141,0,20,0,24,0,18,0,
+0,0,21,0,155,0,159,3,33,0,88,0,33,0,160,3,9,0,161,3,
+27,0,37,0,7,0,122,3,7,0,162,3,7,0,163,3,7,0,164,3,
+7,0,165,3,7,0,166,3,7,0,167,3,4,0,50,0,4,0,168,3,
+4,0,169,3,0,0,170,3,0,0,171,3,0,0,172,3,156,0,6,0,
+24,0,18,0,7,0,173,3,7,0,174,3,7,0,175,3,2,0,176,3,
+2,0,177,3,157,0,14,0,86,0,0,0,86,0,1,0,4,0,17,2,
+4,0,17,0,87,0,18,2,88,0,54,2,141,0,117,3,2,0,162,0,
+2,0,116,3,2,0,31,1,2,0,32,1,2,0,16,0,2,0,62,2,
+4,0,255,1,158,0,6,0,158,0,0,0,158,0,1,0,2,0,155,0,
+2,0,207,1,7,0,206,1,0,0,86,1,159,0,31,0,159,0,0,0,
+159,0,1,0,158,0,178,3,2,0,87,1,2,0,17,0,4,0,88,1,
+4,0,89,1,4,0,90,1,39,0,93,1,39,0,94,1,27,0,37,0,
+7,0,241,0,7,0,101,1,7,0,102,1,7,0,103,0,7,0,103,1,
+7,0,242,0,7,0,104,1,7,0,105,1,7,0,106,1,7,0,107,1,
+7,0,108,1,7,0,131,0,4,0,179,0,0,0,110,1,0,0,111,1,
+0,0,112,1,0,0,113,1,7,0,122,1,7,0,123,1,7,0,179,3,
+160,0,4,0,160,0,0,0,160,0,1,0,39,0,43,3,11,0,180,3,
+82,0,4,0,24,0,18,0,11,0,181,3,11,0,182,3,158,0,183,3,
+63,0,22,0,63,0,0,0,63,0,1,0,63,0,93,1,11,0,184,3,
+0,0,86,1,7,0,185,3,7,0,186,3,7,0,187,3,4,0,16,0,
+7,0,165,0,7,0,56,1,7,0,241,0,7,0,101,1,7,0,103,0,
+7,0,103,1,7,0,105,1,7,0,106,1,7,0,107,1,7,0,188,3,
+7,0,189,3,7,0,190,3,7,0,191,3,161,0,7,0,24,0,18,0,
+11,0,192,3,11,0,193,3,4,0,16,0,4,0,194,3,4,0,195,3,
+4,0,196,3,162,0,10,0,162,0,0,0,162,0,1,0,11,0,144,1,
+4,0,16,0,7,0,241,0,7,0,103,0,7,0,105,1,7,0,107,1,
+0,0,86,1,4,0,91,0,73,0,1,0,11,0,197,3,163,0,7,0,
+163,0,0,0,163,0,1,0,27,0,37,0,11,0,98,1,4,0,16,0,
+0,0,86,1,4,0,91,0,72,0,4,0,24,0,18,0,11,0,197,3,
+163,0,198,3,162,0,199,3,164,0,13,0,86,0,0,0,86,0,1,0,
+4,0,17,2,4,0,17,0,87,0,18,2,88,0,54,2,72,0,95,1,
+4,0,16,0,2,0,58,2,2,0,91,0,2,0,200,3,2,0,62,2,
+4,0,255,1,74,0,5,0,74,0,0,0,74,0,1,0,27,0,37,0,
+2,0,16,0,0,0,201,3,165,0,14,0,165,0,0,0,165,0,1,0,
+9,0,31,0,27,0,37,0,0,0,29,0,0,0,69,3,2,0,16,0,
+2,0,91,0,0,0,201,3,7,0,202,3,7,0,110,3,7,0,203,3,
+7,0,204,3,7,0,205,3,166,0,7,0,39,0,206,3,7,0,207,3,
+4,0,208,3,0,0,209,3,7,0,210,3,4,0,91,0,7,0,211,3,
+167,0,4,0,39,0,206,3,4,0,91,0,4,0,77,1,0,0,209,3,
+168,0,4,0,39,0,206,3,4,0,16,0,4,0,91,0,0,0,209,3,
+169,0,4,0,39,0,206,3,4,0,16,0,4,0,91,0,0,0,209,3,
+170,0,8,0,39,0,206,3,4,0,29,0,2,0,250,2,2,0,16,3,
+7,0,134,3,7,0,135,3,72,0,111,3,0,0,209,3,171,0,1,0,
+39,0,206,3,172,0,6,0,7,0,8,0,7,0,9,0,7,0,10,0,
+7,0,11,0,7,0,212,3,7,0,213,3,173,0,15,0,173,0,0,0,
+173,0,1,0,2,0,16,0,2,0,162,0,4,0,91,0,27,0,37,0,
+72,0,111,3,7,0,250,2,7,0,16,3,7,0,214,3,7,0,215,3,
+7,0,216,3,7,0,217,3,7,0,112,3,7,0,218,3,};
+int DNAlen= sizeof(DNAstr);
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
new file mode 100644
index 00000000000..98a23472a9c
--- /dev/null
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -0,0 +1,1121 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL/BL DUAL LICENSE BLOCK *****
+ *
+ * Struct muncher for making SDNA
+ *
+ * Originally by Ton, some mods by Frank, and some cleaning and
+ * extension by Nzc.
+ *
+ * Makesdna creates a .c file with a long string of numbers that
+ * encode the Blender file format. It is fast, because it is basically
+ * a binary dump. There are some details to mind when reconstructing
+ * the file (endianness and byte-alignment).
+ *
+ * This little program scans all structs that need to be serialized,
+ * and determined the names and types of all members. It calculates
+ * how much memory (on disk or in ram) is needed to store that struct,
+ * and the offsets for reaching a particular one.
+ *
+ * There is a facility to get verbose output from sdna. Search for
+ * debugSDNA. This int can be set to 0 (no output) to some int. Higher
+ * numbers give more output.
+ * */
+
+#define DNA_VERSION_DATE "$Id$"
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_sdna_types.h"
+
+#define SDNA_MAX_FILENAME_LENGTH 255
+
+
+/* Included the path relative from /source/blender/ here, so we can move */
+/* headers around with more freedom. */
+char *includefiles[] = {
+
+ // if you add files here, please add them at the end
+ // of makesdna.c (this file) as well
+
+ "DNA_listBase.h",
+ "DNA_vec_types.h",
+ "DNA_ID.h",
+ "DNA_ipo_types.h",
+ "DNA_key_types.h",
+ "DNA_scriptlink_types.h",
+ "DNA_text_types.h",
+ "DNA_packedFile_types.h",
+ "DNA_camera_types.h",
+ "DNA_image_types.h",
+ "DNA_texture_types.h",
+ "DNA_lamp_types.h",
+ "DNA_wave_types.h",
+ "DNA_material_types.h",
+ "DNA_vfont_types.h",
+ // if you add files here, please add them at the end
+ // of makesdna.c (this file) as well
+ "DNA_meta_types.h",
+ "DNA_curve_types.h",
+ "DNA_mesh_types.h",
+ "DNA_lattice_types.h",
+ "DNA_object_types.h",
+ "DNA_world_types.h",
+ "DNA_radio_types.h",
+ "DNA_scene_types.h",
+ "DNA_view3d_types.h",
+ "DNA_view2d_types.h",
+ "DNA_space_types.h",
+ "DNA_userdef_types.h",
+ "DNA_screen_types.h",
+ "DNA_sdna_types.h",
+ // if you add files here, please add them at the end
+ // of makesdna.c (this file) as well
+ "DNA_fileglobal_types.h",
+ "DNA_sequence_types.h",
+ "DNA_effect_types.h",
+ "DNA_ika_types.h",
+ "DNA_oops_types.h",
+ "DNA_property_types.h",
+ "DNA_sensor_types.h",
+ "DNA_controller_types.h",
+ "DNA_actuator_types.h",
+ "DNA_sound_types.h",
+ "DNA_group_types.h",
+ "DNA_armature_types.h",
+ "DNA_action_types.h",
+ "DNA_constraint_types.h",
+ "DNA_nla_types.h",
+ // if you add files here, please add them at the end
+ // of makesdna.c (this file) as well
+
+ // empty string to indicate end of includefiles
+ ""
+};
+
+int maxdata= 500000, maxnr= 50000;
+int nr_names=0;
+int nr_types=0;
+int nr_structs=0;
+char **names, *namedata; /* op adres names[a] staat string a */
+char **types, *typedata; /* op adres types[a] staat string a */
+short *typelens; /* op typelens[a] staat de lengte van type a */
+short *alphalens; /* contains sizes as they are calculated on the alpha */
+short **structs, *structdata; /* op sp= structs[a] staat eerste adres structdefinitie
+ sp[0] is typenummer
+ sp[1] is aantal elementen
+ sp[2] sp[3] is typenr, namenr (enz) */
+/*
+ * debugSDNA:
+ * - 0 = no output, except errors
+ * - 1 = detail actions
+ * - 2 = full trace, tell which names and types were found
+ * - 4 = full trace, plus all gritty details
+ */
+int debugSDNA = 0;
+int additional_slen_offset;
+
+/* ************************************************************************** */
+/* Functions */
+/* ************************************************************************** */
+
+/**
+ * Add type <str> to struct indexed by <len>, if it was not yet found.
+ */
+int add_type(char *str, int len);
+
+/**
+ * Add variable <str> to
+ */
+int add_name(char *str);
+
+/**
+ * Search whether this structure type was already found, and if not,
+ * add it.
+ */
+short *add_struct(int namecode);
+
+/**
+ * Remove comments from this buffer. Assumes that the buffer refers to
+ * ascii-code text.
+ */
+int preprocess_include(char *maindata, int len);
+
+/**
+ * Scan this file for serializable types.
+ */
+int convert_include(char *filename);
+
+/**
+ * Determine how many bytes are needed for an array.
+ */
+int arraysize(char *astr, int len);
+
+/**
+ * Determine how many bytes are needed for each struct.
+ */
+int calculate_structlens(void);
+
+/**
+ * Construct the DNA.c file
+ */
+void dna_write(FILE *file, void *pntr, int size);
+
+/**
+ * Report all structures found so far, and print their lenghts.
+ */
+void printStructLenghts(void);
+
+/**
+ *
+ */
+int make_structDNA(FILE *file);
+
+/**
+ *
+ */
+int main(int argc, char ** argv);
+
+
+
+/* ************************************************************************** */
+/* Implementation */
+/* ************************************************************************** */
+
+/* ************************* MAKEN DNA ********************** */
+
+int add_type(char *str, int len)
+{
+ int nr;
+ char *cp;
+
+ if(str[0]==0) return -1;
+
+ /* zoek typearray door */
+ for(nr=0; nr<nr_types; nr++) {
+ if(strcmp(str, types[nr])==0) {
+ if (len) {
+ typelens[nr]= len;
+ alphalens[nr] = len;
+ }
+ return nr;
+ }
+ }
+
+ /* nieuw type appenden */
+ if(nr_types==0) cp= typedata;
+ else {
+ cp= types[nr_types-1]+strlen(types[nr_types-1])+1;
+ }
+ strcpy(cp, str);
+ types[nr_types]= cp;
+ typelens[nr_types]= len;
+ alphalens[nr_types]= len;
+
+ if(nr_types>=maxnr) {
+ printf("too many types\n");
+ return nr_types-1;;
+ }
+ nr_types++;
+
+ return nr_types-1;
+}
+
+
+/**
+ *
+ * Because of the weird way of tokenizing, we have to 'cast' function
+ * pointers to ... (*f)(), whatever the original signature. In fact,
+ * we add name and type at the same time... There are two special
+ * cases, unfortunately. These are explicitly checked.
+ *
+ * */
+int add_name(char *str)
+{
+ int nr, i, j, k;
+ char *cp;
+ char buf[255]; /* stupid limit, change it :) */
+ char *name;
+
+ additional_slen_offset = 0;
+
+ if((str[0]==0) /* || (str[1]==0) */) return -1;
+
+ if (str[0] == '(' && str[1] == '*') {
+ if (debugSDNA > 3) printf("\t\t\t\t*** Function pointer found\n");
+ /* functionpointer: transform the type (sometimes) */
+ i = 0;
+ j = 0;
+
+ while (str[i] != ')') {
+ buf[i] = str[i];
+ i++;
+ }
+
+ /* Another number we need is the extra slen offset. This extra
+ * offset is the overshoot after a space. If there is no
+ * space, no overshoot should be calculated. */
+ j = i; /* j at first closing brace */
+
+ if (debugSDNA > 3) printf("first brace after offset %d\n", i);
+
+ j++; /* j beyond closing brace ? */
+ while ((str[j] != 0) && (str[j] != ')' )) {
+ if (debugSDNA > 3) printf("seen %c ( %d) \n", str[j], str[j]);
+ j++;
+ }
+ if (debugSDNA > 3) printf("seen %c ( %d) \n", str[j], str[j]);
+ if (debugSDNA > 3) printf("special after offset %d\n", j);
+
+ if (str[j] == 0 ) {
+ if (debugSDNA > 3) printf("offsetting for space\n");
+ /* get additional offset */
+ k = 0;
+ while (str[j] != ')') {
+ j++;
+ k++;
+ }
+ if (debugSDNA > 3) printf("extra offset %d\n", k);
+ additional_slen_offset = k;
+ } else if (str[j] == ')' ) {
+ if (debugSDNA > 3) printf("offsetting for brace\n");
+ ; /* don't get extra offset */
+ } else {
+ printf("Error during tokening function pointer argument list\n");
+ }
+
+ /*
+ * Put )(void) at the end? Maybe )(). Should check this with
+ * old sdna. Actually, sometimes )(), sometimes )(void...)
+ * Alas.. such is the nature of braindamage :(
+ *
+ * Sorted it out: always do )(), except for headdraw and
+ * windraw, part of ScrArea. This is important, because some
+ * linkers will treat different fp's differently when called
+ * !!! This has to do with interference in byte-alignment and
+ * the way args are pushed on the stack.
+ *
+ * */
+ buf[i] = 0;
+ if (debugSDNA > 3) printf("Name before chomping: %s\n", buf);
+ if ( (strncmp(buf,"(*headdraw", 10) == 0)
+ || (strncmp(buf,"(*windraw", 9) == 0) ) {
+ buf[i] = ')';
+ buf[i+1] = '(';
+ buf[i+2] = 'v';
+ buf[i+3] = 'o';
+ buf[i+4] = 'i';
+ buf[i+5] = 'd';
+ buf[i+6] = ')';
+ buf[i+7] = 0;
+ } else {
+ buf[i] = ')';
+ buf[i+1] = '(';
+ buf[i+2] = ')';
+ buf[i+3] = 0;
+ }
+ /* now precede with buf*/
+ if (debugSDNA > 3) printf("\t\t\t\t\tProposing fp name %s\n", buf);
+ name = buf;
+ } else {
+ /* normal field: old code */
+ name = str;
+ }
+
+ /* zoek name array door */
+ for(nr=0; nr<nr_names; nr++) {
+ if(strcmp(name, names[nr])==0) {
+ return nr;
+ }
+ }
+
+ /* nieuw type appenden */
+ if(nr_names==0) cp= namedata;
+ else {
+ cp= names[nr_names-1]+strlen(names[nr_names-1])+1;
+ }
+ strcpy(cp, name);
+ names[nr_names]= cp;
+
+ if(nr_names>=maxnr) {
+ printf("too many names\n");
+ return nr_names-1;
+ }
+ nr_names++;
+
+ return nr_names-1;
+}
+
+short *add_struct(int namecode)
+{
+ int len;
+ short *sp;
+
+ if(nr_structs==0) {
+ structs[0]= structdata;
+ }
+ else {
+ sp= structs[nr_structs-1];
+ len= sp[1];
+ structs[nr_structs]= sp+ 2*len+2;
+ }
+
+ sp= structs[nr_structs];
+ sp[0]= namecode;
+
+ if(nr_structs>=maxnr) {
+ printf("too many structs\n");
+ return sp;
+ }
+ nr_structs++;
+
+ return sp;
+}
+
+int preprocess_include(char *maindata, int len)
+{
+ int a, newlen, comment = 0;
+ char *cp, *temp, *md;
+
+ temp= MEM_mallocN(len, "preprocess_include");
+ memcpy(temp, maindata, len);
+
+ // remove all c++ comments
+ /* alle enters/tabs/etc vervangen door spaties */
+ cp= temp;
+ a= len;
+ comment = 0;
+ while(a--) {
+ if(cp[0]=='/' && cp[1]=='/') {
+ comment = 1;
+ } else if (*cp<32) {
+ comment = 0;
+ }
+ if (comment || *cp<32 || *cp>128 ) *cp= 32;
+ cp++;
+ }
+
+
+ /* data uit temp naar maindata kopieeren, verwijder commentaar en dubbele spaties */
+ cp= temp;
+ md= maindata;
+ newlen= 0;
+ comment= 0;
+ a= len;
+ while(a--) {
+
+ if(cp[0]=='/' && cp[1]=='*') {
+ comment= 1;
+ cp[0]=cp[1]= 32;
+ }
+ if(cp[0]=='*' && cp[1]=='/') {
+ comment= 0;
+ cp[0]=cp[1]= 32;
+ }
+
+ /* niet kopieeren als: */
+ if(comment);
+ else if( cp[0]==' ' && cp[1]==' ' );
+ else if( cp[-1]=='*' && cp[0]==' ' ); /* pointers met spatie */
+ else {
+ md[0]= cp[0];
+ md++;
+ newlen++;
+ }
+ cp++;
+ }
+
+ MEM_freeN(temp);
+ return newlen;
+}
+
+void *read_file_data(char *filename, int *len_r)
+{
+#ifdef WIN32
+ FILE *fp= fopen(filename, "rb");
+#else
+ FILE *fp= fopen(filename, "r");
+#endif
+ void *data;
+
+ if (!fp) {
+ *len_r= -1;
+ return NULL;
+ }
+
+ fseek(fp, 0L, SEEK_END);
+ *len_r= ftell(fp);
+ fseek(fp, 0L, SEEK_SET);
+
+ data= MEM_mallocN(*len_r, "read_file_data");
+ if (!data) {
+ *len_r= -1;
+ return NULL;
+ }
+
+ if (fread(data, *len_r, 1, fp)!=1) {
+ *len_r= -1;
+ MEM_freeN(data);
+ return NULL;
+ }
+
+ return data;
+}
+
+int convert_include(char *filename)
+{
+ /* lees includefile, sla structen over die op regel ervoor '#' hebben.
+ sla alle data op in tijdelijke arrays.
+ */
+ int filelen, count, overslaan, slen, type, name, strct;
+ short *structpoin, *sp;
+ char *maindata, *mainend, *md, *md1;
+
+ md= maindata= read_file_data(filename, &filelen);
+ if (filelen==-1) {
+ printf("Can't read file %s\n", filename);
+ return 1;
+ }
+
+ filelen= preprocess_include(maindata, filelen);
+ mainend= maindata+filelen-1;
+
+ /* we zoeken naar '{' en dan terug naar 'struct' */
+ count= 0;
+ overslaan= 0;
+ while(count<filelen) {
+
+ /* code voor struct overslaan: twee hekjes. (voor spatie zorgt preprocess) */
+ if(md[0]=='#' && md[1]==' ' && md[2]=='#') {
+ overslaan= 1;
+ }
+
+ if(md[0]=='{') {
+ md[0]= 0;
+ if(overslaan) {
+ overslaan= 0;
+ }
+ else {
+ if(md[-1]==' ') md[-1]= 0;
+ md1= md-2;
+ while( *md1!=32) md1--; /* naar begin woord */
+ md1++;
+
+ /* structnaam te pakken, als... */
+ if( strncmp(md1-7, "struct", 6)==0 ) {
+
+
+ strct= add_type(md1, 0);
+ structpoin= add_struct(strct);
+ sp= structpoin+2;
+
+ if (debugSDNA > 1) printf("\t|\t|-- detected struct %s\n", types[strct]);
+
+ /* eerst overal keurige strings van maken */
+ md1= md+1;
+ while(*md1 != '}') {
+ if( ((long)md1) > ((long)mainend) ) break;
+
+ if(*md1==',' || *md1==' ') *md1= 0;
+ md1++;
+ }
+
+ /* types en namen lezen tot eerste karakter niet '}' */
+ md1= md+1;
+ while( *md1 != '}' ) {
+ if( ((long)md1) > ((long)mainend) ) break;
+
+ /* als er 'struct' of 'unsigned' staat, overslaan */
+ if(*md1) {
+ if( strncmp(md1, "struct", 6)==0 ) md1+= 7;
+ if( strncmp(md1, "unsigned", 6)==0 ) md1+= 9;
+
+ /* type te pakken! */
+ type= add_type(md1, 0);
+
+ if (debugSDNA > 1) printf("\t|\t|\tfound type %s (", md1);
+
+ md1+= strlen(md1);
+
+
+ /* doorlezen tot ';' */
+ while( *md1 != ';' ) {
+ if( ((long)md1) > ((long)mainend) ) break;
+
+ if(*md1) {
+ /* Name te pakken. slen needs
+ * correction for function
+ * pointers! */
+ slen= strlen(md1);
+ if( md1[slen-1]==';' ) {
+ md1[slen-1]= 0;
+
+
+ name= add_name(md1);
+ slen += additional_slen_offset;
+ sp[0]= type;
+ sp[1]= name;
+
+ if ((debugSDNA>1) && (names[name] != 0 )) printf("%s |", names[name]);
+
+ structpoin[1]++;
+ sp+= 2;
+
+ md1+= slen;
+ break;
+ }
+
+
+ name= add_name(md1);
+ slen += additional_slen_offset;
+
+ sp[0]= type;
+ sp[1]= name;
+ if ((debugSDNA > 1) && (names[name] != 0 )) printf("%s ||", names[name]);
+
+ structpoin[1]++;
+ sp+= 2;
+
+ md1+= slen;
+ }
+ md1++;
+ }
+
+ if (debugSDNA > 1) printf(")\n");
+
+ }
+ md1++;
+ }
+ }
+ }
+ }
+ count++;
+ md++;
+ }
+
+ MEM_freeN(maindata);
+
+ return 0;
+}
+
+int arraysize(char *astr, int len)
+{
+ int a, mul=1;
+ char str[100], *cp=0;
+
+ memcpy(str, astr, len+1);
+
+ for(a=0; a<len; a++) {
+ if( str[a]== '[' ) {
+ cp= &(str[a+1]);
+ }
+ else if( str[a]==']' && cp) {
+ str[a]= 0;
+ mul*= atoi(cp);
+ }
+ }
+
+ return mul;
+}
+
+int calculate_structlens(void)
+{
+ int a, b, len, alphalen, unknown= nr_structs, lastunknown, structtype, type, mul, namelen;
+ short *sp, *structpoin;
+ char *cp;
+ int has_pointer, dna_error = 0;
+
+ while(unknown) {
+ lastunknown= unknown;
+ unknown= 0;
+
+ /* loop alle structen af... */
+ for(a=0; a<nr_structs; a++) {
+ structpoin= structs[a];
+ structtype= structpoin[0];
+
+ /* als lengte nog niet bekend */
+ if(typelens[structtype]==0) {
+
+ sp= structpoin+2;
+ len= 0;
+ alphalen = 0;
+ has_pointer = 0;
+
+ /* loop alle elementen in struct af */
+ for(b=0; b<structpoin[1]; b++, sp+=2) {
+ type= sp[0];
+ cp= names[sp[1]];
+
+ namelen= strlen(cp);
+ /* is het een pointer of functiepointer? */
+ if(cp[0]=='*' || cp[1]=='*') {
+ has_pointer = 1;
+ /* heeft de naam een extra lengte? (array) */
+ mul= 1;
+ if( cp[namelen-1]==']') mul= arraysize(cp, namelen);
+
+ /* 4-8 aligned/ */
+ if(sizeof(void *) == 4) {
+ if (len % 4) {
+ printf("Align pointer error in struct: %s %s\n", types[structtype], cp);
+ dna_error = 1;
+ }
+ } else {
+ if (len % 8) {
+ printf("Align pointer error in struct: %s %s\n", types[structtype], cp);
+ dna_error = 1;
+ }
+ }
+
+ if (alphalen % 8) {
+ printf("Align pointer error in struct: %s %s\n", types[structtype],cp);
+ dna_error = 1;
+ }
+
+ len += sizeof(void *) * mul;
+ alphalen += 8 * mul;
+
+ } else if( typelens[type] ) {
+ /* heeft de naam een extra lengte? (array) */
+ mul= 1;
+ if( cp[namelen-1]==']') mul= arraysize(cp, namelen);
+
+ /* 2-4 aligned/ */
+ if(typelens[type]>3 && (len % 4) ) {
+ printf("Align 4 error in struct: %s %s\n", types[structtype], cp);
+ }
+ else if(typelens[type]==2 && (len % 2) ) {
+ printf("Align 2 error in struct: %s %s\n", types[structtype], cp);
+ }
+
+ len += mul*typelens[type];
+ alphalen += mul * alphalens[type];
+
+ } else {
+ len= 0;
+ alphalen = 0;
+ break;
+ }
+ }
+
+ if (len==0) {
+ unknown++;
+ } else {
+ typelens[structtype]= len;
+ alphalens[structtype]= alphalen;
+ // two ways to detect if a struct contains a pointer:
+ // has_pointer is set or alphalen != len
+ if (has_pointer || alphalen != len) {
+ if (alphalen % 8) {
+ printf("Sizeerror in struct: %s\n", types[structtype]);
+ dna_error = 1;
+ }
+ }
+ }
+ }
+ }
+
+ if(unknown==lastunknown) break;
+ }
+
+ if(unknown) {
+ printf("ERROR: still %d structs unknown\n", unknown);
+
+ if (debugSDNA) {
+ printf("*** Known structs : \n");
+
+ for(a=0; a<nr_structs; a++) {
+ structpoin= structs[a];
+ structtype= structpoin[0];
+
+ /* lengte nog niet bekend */
+ if(typelens[structtype]!=0) {
+ printf(" %s\n", types[structtype]);
+ }
+ }
+ }
+
+
+ printf("*** Unknown structs : \n");
+
+ for(a=0; a<nr_structs; a++) {
+ structpoin= structs[a];
+ structtype= structpoin[0];
+
+ /* lengte nog niet bekend */
+ if(typelens[structtype]==0) {
+ printf(" %s\n", types[structtype]);
+ }
+ }
+ }
+
+ return(dna_error);
+}
+
+#define MAX_DNA_LINE_LENGTH 20
+
+void dna_write(FILE *file, void *pntr, int size)
+{
+ static int linelength = 0;
+ int i;
+ char *data;
+
+ data = (char *) pntr;
+
+ for (i = 0 ; i < size ; i++)
+ {
+ fprintf(file, "%d,", data[i]);
+ linelength++;
+ if (linelength >= MAX_DNA_LINE_LENGTH) {
+ fprintf(file, "\n");
+ linelength = 0;
+ }
+ }
+}
+
+void printStructLenghts(void)
+{
+ int a, unknown= nr_structs, lastunknown, structtype;
+ short *structpoin;
+ printf("\n\n*** All detected structs:\n");
+
+ while(unknown) {
+ lastunknown= unknown;
+ unknown= 0;
+
+ /* loop alle structen af... */
+ for(a=0; a<nr_structs; a++) {
+ structpoin= structs[a];
+ structtype= structpoin[0];
+ printf("\t%s\t:%d\n", types[structtype], typelens[structtype]);
+ }
+ }
+
+ printf("*** End of list\n");
+
+}
+
+
+int make_structDNA(FILE *file)
+{
+ int len, i;
+ short *sp;
+ /* str contains filenames. Since we now include paths, I stretched */
+ /* it a bit. Hope this is enough :) -nzc- */
+ char str[SDNA_MAX_FILENAME_LENGTH], *cp;
+ int firststruct;
+
+ if (debugSDNA > -1) {
+ fflush(stdout);
+ printf("Running makesdna at debug level %d\n", debugSDNA);
+ printf("\tProgram version: %s\n", DNA_VERSION_DATE);
+ }
+
+ /* de allerlangst bekende struct is 50k, 100k is ruimte genoeg! */
+ namedata= MEM_callocN(maxdata, "namedata");
+ typedata= MEM_callocN(maxdata, "typedata");
+ structdata= MEM_callocN(maxdata, "structdata");
+
+ /* maximaal 5000 variablen, vast voldoende? */
+ names= MEM_callocN(sizeof(char *)*maxnr, "names");
+ types= MEM_callocN(sizeof(char *)*maxnr, "types");
+ typelens= MEM_callocN(sizeof(short)*maxnr, "typelens");
+ alphalens= MEM_callocN(sizeof(short)*maxnr, "alphalens");
+ structs= MEM_callocN(sizeof(short)*maxnr, "structs");
+
+ /* inserten alle bekende types */
+ /* let op: uint komt niet voor! gebruik in structen unsigned int */
+ add_type("char", 1); /* 0 */
+ add_type("uchar", 1); /* 1 */
+ add_type("short", 2); /* 2 */
+ add_type("ushort", 2); /* 3 */
+ add_type("int", 4); /* 4 */
+ add_type("long", 4); /* 5 */
+ add_type("ulong", 4); /* 6 */
+ add_type("float", 4); /* 7 */
+ add_type("double", 8); /* 8 */
+ add_type("void", 0); /* 9 */
+
+ // the defines above shouldn't be output in the padding file...
+ firststruct = nr_types;
+
+#define BASE_HEADER "../"
+
+ /* add all include files defined in the global array */
+ /* Since the internal file+path name buffer has limited length, I do a */
+ /* little test first... */
+ /* Mind the breaking condition here! */
+ if (debugSDNA) printf("\tStart of header scan:\n");
+ for (i = 0; strlen(includefiles[i]); i++) {
+ if (debugSDNA) printf("\t|-- Converting %s%s\n", BASE_HEADER, includefiles[i]);
+ if (strlen(includefiles[i]) > SDNA_MAX_FILENAME_LENGTH) {
+ /* this would cause coredumps*/
+ printf("*** \tError in makesdna: the specified filenames is too long "
+ "for parsing.\n\tFile: %s%s\n", BASE_HEADER, includefiles[i]);
+ } else {
+ sprintf(str, "%s%s", BASE_HEADER, includefiles[i]);
+ if (convert_include(str)) {
+ return (1);
+ }
+ }
+ }
+ if (debugSDNA) printf("\tFinished scanning %d headers.\n", i);
+
+ if (calculate_structlens()) {
+ // error
+ return(1);
+ }
+
+ /* DIT DEEL VOOR DEBUG */
+ if (debugSDNA > 1)
+ {
+ int a,b;
+/* short *elem; */
+ short num_types;
+
+ printf("nr_names %d nr_types %d nr_structs %d\n", nr_names, nr_types, nr_structs);
+ for(a=0; a<nr_names; a++) {
+ printf(" %s \n", names[a]);
+ }
+ printf("\n");
+
+ sp= typelens;
+ for(a=0; a<nr_types; a++, sp++) {
+ printf(" %s %d\n", types[a], *sp);
+ }
+ printf("\n");
+
+ for(a=0; a<nr_structs; a++) {
+ sp= structs[a];
+ printf(" struct %s elems: %d size: %d\n", types[sp[0]], sp[1],typelens[sp[0]]);
+ num_types = sp[1];
+ sp+= 2;
+ /* ? num_types was elem? */
+ for(b=0; b< num_types; b++, sp+= 2) {
+ printf(" %s %s\n", types[sp[0]], names[sp[1]]);
+ }
+ }
+ }
+
+ /* file schrijven */
+
+ if (debugSDNA > -1) printf("Writing file ... ");
+
+ if(nr_names==0 || nr_structs==0);
+ else {
+ strcpy(str, "SDNA");
+ dna_write(file, str, 4);
+
+ /* SCHRIJF NAMEN */
+ strcpy(str, "NAME");
+ dna_write(file, str, 4);
+ len= nr_names;
+ dna_write(file, &len, 4);
+
+ /* lengte berekenen datablok met strings */
+ cp= names[nr_names-1];
+ cp+= strlen(names[nr_names-1]) + 1; /* +1: nul-terminator */
+ len= (long)cp - (long)(names[0]);
+ len= (len+3) & ~3;
+ dna_write(file, names[0], len);
+
+ /* SCHRIJF TYPES */
+ strcpy(str, "TYPE");
+ dna_write(file, str, 4);
+ len= nr_types;
+ dna_write(file, &len, 4);
+
+ /* lengte berekenen datablok */
+ cp= types[nr_types-1];
+ cp+= strlen(types[nr_types-1]) + 1; /* +1: nul-terminator */
+ len= (long)cp - (long)(types[0]);
+ len= (len+3) & ~3;
+
+ dna_write(file, types[0], len);
+
+ /* SCHRIJF TYPELENGTES */
+ strcpy(str, "TLEN");
+ dna_write(file, str, 4);
+
+ len= 2*nr_types;
+ if(nr_types & 1) len+= 2;
+ dna_write(file, typelens, len);
+
+ /* SCHRIJF STRUCTEN */
+ strcpy(str, "STRC");
+ dna_write(file, str, 4);
+ len= nr_structs;
+ dna_write(file, &len, 4);
+
+ /* lengte berekenen datablok */
+ sp= structs[nr_structs-1];
+ sp+= 2+ 2*( sp[1] );
+ len= (long)sp - (long)(structs[0]);
+ len= (len+3) & ~3;
+
+ dna_write(file, structs[0], len);
+
+ /* dna padding test */
+
+ if (0) {
+ FILE *fp;
+ int a;
+
+ fp= fopen("padding.c", "w");
+ if(fp==NULL);
+ else {
+
+ // add all include files defined in the global array
+ for (i = 0; strlen(includefiles[i]); i++) {
+ fprintf(fp, "#include \"%s\"\n", includefiles[i]);
+ }
+
+ fprintf(fp, "main(){\n");
+ sp = typelens;
+ sp += firststruct;
+ for(a=firststruct; a<nr_types; a++, sp++) {
+ fprintf(fp, "\tprintf(\" ");
+ fprintf(fp, "%%d %s %d ", types[a], *sp);
+ fprintf(fp, "\\n\", sizeof(struct %s) - %d);\n", types[a], *sp);
+ }
+ fprintf(fp, "}\n");
+ fclose(fp);
+ }
+ }
+ /* end end padding test */
+ }
+
+
+ MEM_freeN(namedata);
+ MEM_freeN(typedata);
+ MEM_freeN(structdata);
+ MEM_freeN(names);
+ MEM_freeN(types);
+ MEM_freeN(typelens);
+ MEM_freeN(structs);
+
+ if (debugSDNA > -1) printf("done.\n");
+
+ return(0);
+}
+
+/* ************************* END MAKEN DNA ********************** */
+
+void make_bad_file(char *file)
+{
+ FILE *fp= fopen(file, "w");
+ fprintf(fp, "NO NO NO! YOUR STUPID STUPID STUPID!\n");
+ fclose(fp);
+}
+
+int main(int argc, char ** argv)
+{
+ FILE *file;
+ int return_status = 0;
+
+ if (argc != 2) {
+ printf("Usage: %s outfile.c\n", argv[0]);
+ return_status = 1;
+ } else {
+ file = fopen(argv[1], "w");
+ if (!file) {
+ printf ("Unable to open file: %s\n", argv[1]);
+ return_status = 1;
+ } else {
+ fprintf (file, "unsigned char DNAstr[]= {\n");
+ if (make_structDNA(file)) {
+ // error
+ fclose(file);
+ make_bad_file(argv[1]);
+ return_status = 1;
+ } else {
+ fprintf(file, "};\n");
+ fprintf(file, "int DNAlen= sizeof(DNAstr);\n");
+
+ fclose(file);
+ }
+ }
+ }
+
+
+ return(return_status);
+}
+
+// include files for automatic dependancies
+#include "DNA_listBase.h"
+#include "DNA_vec_types.h"
+#include "DNA_ID.h"
+#include "DNA_ipo_types.h"
+#include "DNA_key_types.h"
+#include "DNA_scriptlink_types.h"
+#include "DNA_text_types.h"
+#include "DNA_packedFile_types.h"
+#include "DNA_camera_types.h"
+#include "DNA_image_types.h"
+#include "DNA_texture_types.h"
+#include "DNA_lamp_types.h"
+#include "DNA_wave_types.h"
+#include "DNA_material_types.h"
+#include "DNA_vfont_types.h"
+#include "DNA_meta_types.h"
+#include "DNA_curve_types.h"
+#include "DNA_mesh_types.h"
+#include "DNA_lattice_types.h"
+#include "DNA_object_types.h"
+#include "DNA_world_types.h"
+#include "DNA_radio_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_view3d_types.h"
+#include "DNA_view2d_types.h"
+#include "DNA_space_types.h"
+#include "DNA_userdef_types.h"
+#include "DNA_screen_types.h"
+#include "DNA_sdna_types.h"
+#include "DNA_fileglobal_types.h"
+#include "DNA_sequence_types.h"
+#include "DNA_effect_types.h"
+#include "DNA_ika_types.h"
+#include "DNA_oops_types.h"
+#include "DNA_property_types.h"
+#include "DNA_sensor_types.h"
+#include "DNA_controller_types.h"
+#include "DNA_actuator_types.h"
+#include "DNA_sound_types.h"
+#include "DNA_group_types.h"
+#include "DNA_armature_types.h"
+#include "DNA_action_types.h"
+#include "DNA_constraint_types.h"
+#include "DNA_nla_types.h"
+/* end of list */