aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/Makefile524
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/Makefile.am26
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/Makefile.in524
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/imp_vrml.c122
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/imp_vrml_v1.c2788
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/imp_vrml_v1.h356
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile518
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.am26
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.in518
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.c82
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.h42
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_nodes.h42
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.c78
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.h103
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.c647
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.h56
-rw-r--r--src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_types.h88
17 files changed, 6540 insertions, 0 deletions
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/Makefile
new file mode 100644
index 0000000..b9a3491
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/Makefile
@@ -0,0 +1,524 @@
1# Makefile.in generated by automake 1.10.1 from Makefile.am.
2# plugins/import/imp_vrml/Makefile. Generated from Makefile.in by configure.
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6# This Makefile.in is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
15
16
17
18pkgdatadir = $(datadir)/libg3d
19pkglibdir = $(libdir)/libg3d
20pkgincludedir = $(includedir)/libg3d
21am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
22install_sh_DATA = $(install_sh) -c -m 644
23install_sh_PROGRAM = $(install_sh) -c
24install_sh_SCRIPT = $(install_sh) -c
25INSTALL_HEADER = $(INSTALL_DATA)
26transform = $(program_transform_name)
27NORMAL_INSTALL = :
28PRE_INSTALL = :
29POST_INSTALL = :
30NORMAL_UNINSTALL = :
31PRE_UNINSTALL = :
32POST_UNINSTALL = :
33build_triplet = x86_64-unknown-linux-gnu
34host_triplet = x86_64-unknown-linux-gnu
35subdir = plugins/import/imp_vrml
36DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
37 imp_vrml_v1.c
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
40 $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \
41 $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \
42 $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \
43 $(top_srcdir)/configure.in
44am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
45 $(ACLOCAL_M4)
46mkinstalldirs = $(install_sh) -d
47CONFIG_HEADER = $(top_builddir)/include/g3d/config.h
48CONFIG_CLEAN_FILES =
49am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
50am__vpath_adj = case $$p in \
51 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
52 *) f=$$p;; \
53 esac;
54am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
55am__installdirs = "$(DESTDIR)$(pluginimpdir)"
56pluginimpLTLIBRARIES_INSTALL = $(INSTALL)
57LTLIBRARIES = $(pluginimp_LTLIBRARIES)
58am__DEPENDENCIES_1 =
59imp_vrml_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la \
60 $(am__DEPENDENCIES_1)
61am_imp_vrml_la_OBJECTS = imp_vrml_v1.lo imp_vrml.lo
62imp_vrml_la_OBJECTS = $(am_imp_vrml_la_OBJECTS)
63am_imp_vrml_la_rpath = -rpath $(pluginimpdir)
64DEFAULT_INCLUDES = -I. -I$(top_builddir)/include/g3d
65depcomp = $(SHELL) $(top_srcdir)/config/depcomp
66am__depfiles_maybe = depfiles
67COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
68 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
69LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
70 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
71 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
72CCLD = $(CC)
73LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
74 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
75 $(LDFLAGS) -o $@
76LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
77LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
78 --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
79YLWRAP = $(top_srcdir)/config/ylwrap
80SOURCES = $(imp_vrml_la_SOURCES)
81DIST_SOURCES = $(imp_vrml_la_SOURCES)
82ETAGS = etags
83CTAGS = ctags
84DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
85ACLOCAL = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run aclocal-1.10
86AMTAR = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run tar
87AR = ar
88AS = as
89AUTOCONF = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoconf
90AUTOHEADER = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoheader
91AUTOMAKE = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run automake-1.10
92AWK = gawk
93CC = gcc
94CCDEPMODE = depmode=gcc3
95CFLAGS = -g -O2
96CPP = gcc -E
97CPPFLAGS =
98CXX = g++
99CXXCPP = g++ -E
100CXXDEPMODE = depmode=gcc3
101CXXFLAGS = -g -O2
102CYGPATH_W = echo
103DBG_CFLAGS = -O2
104DEBUG = 0
105DEFS = -DHAVE_CONFIG_H
106DEPDIR = .deps
107DLLTOOL = dlltool
108ECHO = echo
109ECHO_C =
110ECHO_N = -n
111ECHO_T =
112EGREP = /bin/grep -E
113EXEEXT =
114F77 =
115FFLAGS =
116GDKPIXBUF_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
117GDKPIXBUF_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0
118GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
119GLIB_GENMARSHAL = glib-genmarshal
120GLIB_LIBS = -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0
121GLIB_MKENUMS = glib-mkenums
122GOBJECT_QUERY = gobject-query
123GREP = /bin/grep
124GTKDOC_CHECK = /usr/bin/gtkdoc-check
125GTK_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
126GTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0
127HTML_DIR = ${datadir}/gtk-doc/html
128INSTALL = /usr/bin/install -c
129INSTALL_DATA = ${INSTALL} -m 644
130INSTALL_PROGRAM = ${INSTALL}
131INSTALL_SCRIPT = ${INSTALL}
132INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
133LDFLAGS =
134LEX = flex
135LEXLIB = -lfl
136LEX_OUTPUT_ROOT = lex.yy
137LIBGSF_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/libgsf-1
138LIBGSF_LIBS = -lgsf-1 -lgobject-2.0 -lxml2 -lglib-2.0
139LIBOBJS =
140LIBS = -lm
141LIBTOOL = $(SHELL) $(top_builddir)/libtool --quiet
142LIBXML2_CFLAGS = -I/usr/include/libxml2
143LIBXML2_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2
144LN_S = ln -s
145LTLIBOBJS =
146LTVERSION = 0:8:0
147MAGIC_LIBS = -lmagic
148MAKEINFO = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run makeinfo
149MATH_LIBS = -lm
150MKDIR_P = /bin/mkdir -p
151OBJDUMP = objdump
152OBJEXT = o
153PACKAGE = libg3d
154PACKAGE_BUGREPORT =
155PACKAGE_NAME =
156PACKAGE_STRING =
157PACKAGE_TARNAME =
158PACKAGE_VERSION =
159PATH_SEPARATOR = :
160PKG_CONFIG = /usr/bin/pkg-config
161PLUGINS_LDFLAGS = -avoid-version -export-dynamic
162RANLIB = ranlib
163SET_MAKE =
164SHELL = /bin/bash
165STRIP = strip
166VERSION = 0.0.8
167XML2_CONFIG = /usr/bin/xml2-config
168XML_CPPFLAGS = -I/usr/include/libxml2
169XML_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2
170Z_CFLAGS =
171Z_LIBS = -lz
172abs_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml
173abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml
174abs_top_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8
175abs_top_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8
176ac_ct_CC = gcc
177ac_ct_CXX = g++
178ac_ct_F77 =
179am__include = include
180am__leading_dot = .
181am__quote =
182am__tar = ${AMTAR} chof - "$$tardir"
183am__untar = ${AMTAR} xf -
184bindir = ${exec_prefix}/bin
185build = x86_64-unknown-linux-gnu
186build_alias =
187build_cpu = x86_64
188build_os = linux-gnu
189build_vendor = unknown
190builddir = .
191datadir = ${datarootdir}
192datarootdir = ${prefix}/share
193docdir = ${datarootdir}/doc/${PACKAGE}
194dvidir = ${docdir}
195exec_prefix = ${prefix}
196host = x86_64-unknown-linux-gnu
197host_alias =
198host_cpu = x86_64
199host_os = linux-gnu
200host_vendor = unknown
201htmldir = ${docdir}
202includedir = ${prefix}/include
203infodir = ${datarootdir}/info
204install_sh = $(SHELL) /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/install-sh
205libdir = ${exec_prefix}/lib
206libexecdir = ${exec_prefix}/libexec
207localedir = ${datarootdir}/locale
208localstatedir = ${prefix}/var
209mandir = ${datarootdir}/man
210mkdir_p = /bin/mkdir -p
211oldincludedir = /usr/include
212pdfdir = ${docdir}
213prefix = /usr/local
214program_transform_name = s,x,x,
215psdir = ${docdir}
216sbindir = ${exec_prefix}/sbin
217sharedstatedir = ${prefix}/com
218srcdir = .
219sysconfdir = ${prefix}/etc
220target_alias =
221top_builddir = ../../..
222top_srcdir = ../../..
223pluginimpdir = $(pkglibdir)/plugins/import
224pluginimp_LTLIBRARIES = imp_vrml.la
225AM_CFLAGS = \
226 -Wall -ansi -pedantic \
227 -DG_LOG_DOMAIN=\"LibG3D\" \
228 -O2 -DDEBUG=0 \
229 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
230
231INCLUDES = -I$(top_srcdir)/include
232AM_LDFLAGS = \
233 -no-undefined -module \
234 -avoid-version -export-dynamic
235
236AM_LFLAGS = -o${LEX_OUTPUT_ROOT}.c --header-file=${LEX_OUTPUT_ROOT}.h -R
237imp_vrml_la_SOURCES = imp_vrml_v1.l imp_vrml_v1.h imp_vrml.c
238imp_vrml_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0 ${LEXLIB}
239EXTRA_DIST = imp_vrml_v1.c imp_vrml_v1.h
240all: all-am
241
242.SUFFIXES:
243.SUFFIXES: .c .l .lo .o .obj
244$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
245 @for dep in $?; do \
246 case '$(am__configure_deps)' in \
247 *$$dep*) \
248 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
249 && exit 0; \
250 exit 1;; \
251 esac; \
252 done; \
253 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_vrml/Makefile'; \
254 cd $(top_srcdir) && \
255 $(AUTOMAKE) --gnu plugins/import/imp_vrml/Makefile
256.PRECIOUS: Makefile
257Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
258 @case '$?' in \
259 *config.status*) \
260 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
261 *) \
262 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
263 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
264 esac;
265
266$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
267 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
268
269$(top_srcdir)/configure: $(am__configure_deps)
270 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
271$(ACLOCAL_M4): $(am__aclocal_m4_deps)
272 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
273install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES)
274 @$(NORMAL_INSTALL)
275 test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)"
276 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
277 if test -f $$p; then \
278 f=$(am__strip_dir) \
279 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \
280 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \
281 else :; fi; \
282 done
283
284uninstall-pluginimpLTLIBRARIES:
285 @$(NORMAL_UNINSTALL)
286 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
287 p=$(am__strip_dir) \
288 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \
289 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \
290 done
291
292clean-pluginimpLTLIBRARIES:
293 -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES)
294 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
295 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
296 test "$$dir" != "$$p" || dir=.; \
297 echo "rm -f \"$${dir}/so_locations\""; \
298 rm -f "$${dir}/so_locations"; \
299 done
300imp_vrml.la: $(imp_vrml_la_OBJECTS) $(imp_vrml_la_DEPENDENCIES)
301 $(LINK) $(am_imp_vrml_la_rpath) $(imp_vrml_la_OBJECTS) $(imp_vrml_la_LIBADD) $(LIBS)
302
303mostlyclean-compile:
304 -rm -f *.$(OBJEXT)
305
306distclean-compile:
307 -rm -f *.tab.c
308
309include ./$(DEPDIR)/imp_vrml.Plo
310include ./$(DEPDIR)/imp_vrml_v1.Plo
311
312.c.o:
313 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
314 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
315# source='$<' object='$@' libtool=no \
316# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
317# $(COMPILE) -c $<
318
319.c.obj:
320 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
321 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
322# source='$<' object='$@' libtool=no \
323# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
324# $(COMPILE) -c `$(CYGPATH_W) '$<'`
325
326.c.lo:
327 $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
328 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
329# source='$<' object='$@' libtool=yes \
330# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
331# $(LTCOMPILE) -c -o $@ $<
332
333.l.c:
334 $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
335
336mostlyclean-libtool:
337 -rm -f *.lo
338
339clean-libtool:
340 -rm -rf .libs _libs
341
342ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
343 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
344 unique=`for i in $$list; do \
345 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
346 done | \
347 $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
348 END { if (nonempty) { for (i in files) print i; }; }'`; \
349 mkid -fID $$unique
350tags: TAGS
351
352TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
353 $(TAGS_FILES) $(LISP)
354 tags=; \
355 here=`pwd`; \
356 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
357 unique=`for i in $$list; do \
358 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
359 done | \
360 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
361 END { if (nonempty) { for (i in files) print i; }; }'`; \
362 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
363 test -n "$$unique" || unique=$$empty_fix; \
364 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
365 $$tags $$unique; \
366 fi
367ctags: CTAGS
368CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
369 $(TAGS_FILES) $(LISP)
370 tags=; \
371 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
372 unique=`for i in $$list; do \
373 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
374 done | \
375 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
376 END { if (nonempty) { for (i in files) print i; }; }'`; \
377 test -z "$(CTAGS_ARGS)$$tags$$unique" \
378 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
379 $$tags $$unique
380
381GTAGS:
382 here=`$(am__cd) $(top_builddir) && pwd` \
383 && cd $(top_srcdir) \
384 && gtags -i $(GTAGS_ARGS) $$here
385
386distclean-tags:
387 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
388
389distdir: $(DISTFILES)
390 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
391 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
392 list='$(DISTFILES)'; \
393 dist_files=`for file in $$list; do echo $$file; done | \
394 sed -e "s|^$$srcdirstrip/||;t" \
395 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
396 case $$dist_files in \
397 */*) $(MKDIR_P) `echo "$$dist_files" | \
398 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
399 sort -u` ;; \
400 esac; \
401 for file in $$dist_files; do \
402 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
403 if test -d $$d/$$file; then \
404 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
405 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
406 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
407 fi; \
408 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
409 else \
410 test -f $(distdir)/$$file \
411 || cp -p $$d/$$file $(distdir)/$$file \
412 || exit 1; \
413 fi; \
414 done
415check-am: all-am
416check: check-am
417all-am: Makefile $(LTLIBRARIES)
418installdirs:
419 for dir in "$(DESTDIR)$(pluginimpdir)"; do \
420 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
421 done
422install: install-am
423install-exec: install-exec-am
424install-data: install-data-am
425uninstall: uninstall-am
426
427install-am: all-am
428 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
429
430installcheck: installcheck-am
431install-strip:
432 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
433 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
434 `test -z '$(STRIP)' || \
435 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
436mostlyclean-generic:
437
438clean-generic:
439
440distclean-generic:
441 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
442
443maintainer-clean-generic:
444 @echo "This command is intended for maintainers to use"
445 @echo "it deletes files that may require special tools to rebuild."
446 -rm -f imp_vrml_v1.c
447clean: clean-am
448
449clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \
450 mostlyclean-am
451
452distclean: distclean-am
453 -rm -rf ./$(DEPDIR)
454 -rm -f Makefile
455distclean-am: clean-am distclean-compile distclean-generic \
456 distclean-tags
457
458dvi: dvi-am
459
460dvi-am:
461
462html: html-am
463
464info: info-am
465
466info-am:
467
468install-data-am: install-pluginimpLTLIBRARIES
469
470install-dvi: install-dvi-am
471
472install-exec-am:
473
474install-html: install-html-am
475
476install-info: install-info-am
477
478install-man:
479
480install-pdf: install-pdf-am
481
482install-ps: install-ps-am
483
484installcheck-am:
485
486maintainer-clean: maintainer-clean-am
487 -rm -rf ./$(DEPDIR)
488 -rm -f Makefile
489maintainer-clean-am: distclean-am maintainer-clean-generic
490
491mostlyclean: mostlyclean-am
492
493mostlyclean-am: mostlyclean-compile mostlyclean-generic \
494 mostlyclean-libtool
495
496pdf: pdf-am
497
498pdf-am:
499
500ps: ps-am
501
502ps-am:
503
504uninstall-am: uninstall-pluginimpLTLIBRARIES
505
506.MAKE: install-am install-strip
507
508.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
509 clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \
510 distclean-compile distclean-generic distclean-libtool \
511 distclean-tags distdir dvi dvi-am html html-am info info-am \
512 install install-am install-data install-data-am install-dvi \
513 install-dvi-am install-exec install-exec-am install-html \
514 install-html-am install-info install-info-am install-man \
515 install-pdf install-pdf-am install-pluginimpLTLIBRARIES \
516 install-ps install-ps-am install-strip installcheck \
517 installcheck-am installdirs maintainer-clean \
518 maintainer-clean-generic mostlyclean mostlyclean-compile \
519 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
520 tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES
521
522# Tell versions [3.59,3.63) of GNU make to not export all variables.
523# Otherwise a system limit (for SysV at least) may be exceeded.
524.NOEXPORT:
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/Makefile.am
new file mode 100644
index 0000000..656f588
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/Makefile.am
@@ -0,0 +1,26 @@
1pluginimpdir = $(pkglibdir)/plugins/import
2
3if OS_WIN32
4else
5pluginimp_LTLIBRARIES = imp_vrml.la
6endif
7
8AM_CFLAGS = \
9 -Wall -ansi -pedantic \
10 -DG_LOG_DOMAIN=\"LibG3D\" \
11 @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \
12 @GLIB_CFLAGS@
13
14INCLUDES = -I$(top_srcdir)/include
15
16AM_LDFLAGS = \
17 -no-undefined -module \
18 @PLUGINS_LDFLAGS@
19
20AM_LFLAGS = -o${LEX_OUTPUT_ROOT}.c --header-file=${LEX_OUTPUT_ROOT}.h -R
21LIBTOOL += --quiet
22
23imp_vrml_la_SOURCES = imp_vrml_v1.l imp_vrml_v1.h imp_vrml.c
24imp_vrml_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ ${LEXLIB}
25
26EXTRA_DIST = imp_vrml_v1.c imp_vrml_v1.h
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/Makefile.in
new file mode 100644
index 0000000..2efd826
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/Makefile.in
@@ -0,0 +1,524 @@
1# Makefile.in generated by automake 1.10.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6# This Makefile.in is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
15@SET_MAKE@
16
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkglibdir = $(libdir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
22install_sh_DATA = $(install_sh) -c -m 644
23install_sh_PROGRAM = $(install_sh) -c
24install_sh_SCRIPT = $(install_sh) -c
25INSTALL_HEADER = $(INSTALL_DATA)
26transform = $(program_transform_name)
27NORMAL_INSTALL = :
28PRE_INSTALL = :
29POST_INSTALL = :
30NORMAL_UNINSTALL = :
31PRE_UNINSTALL = :
32POST_UNINSTALL = :
33build_triplet = @build@
34host_triplet = @host@
35subdir = plugins/import/imp_vrml
36DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
37 imp_vrml_v1.c
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
40 $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \
41 $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \
42 $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \
43 $(top_srcdir)/configure.in
44am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
45 $(ACLOCAL_M4)
46mkinstalldirs = $(install_sh) -d
47CONFIG_HEADER = $(top_builddir)/include/g3d/config.h
48CONFIG_CLEAN_FILES =
49am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
50am__vpath_adj = case $$p in \
51 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
52 *) f=$$p;; \
53 esac;
54am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
55am__installdirs = "$(DESTDIR)$(pluginimpdir)"
56pluginimpLTLIBRARIES_INSTALL = $(INSTALL)
57LTLIBRARIES = $(pluginimp_LTLIBRARIES)
58am__DEPENDENCIES_1 =
59imp_vrml_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la \
60 $(am__DEPENDENCIES_1)
61am_imp_vrml_la_OBJECTS = imp_vrml_v1.lo imp_vrml.lo
62imp_vrml_la_OBJECTS = $(am_imp_vrml_la_OBJECTS)
63@OS_WIN32_FALSE@am_imp_vrml_la_rpath = -rpath $(pluginimpdir)
64DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/g3d
65depcomp = $(SHELL) $(top_srcdir)/config/depcomp
66am__depfiles_maybe = depfiles
67COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
68 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
69LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
70 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
71 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
72CCLD = $(CC)
73LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
74 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
75 $(LDFLAGS) -o $@
76LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
77LTLEXCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
78 --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
79YLWRAP = $(top_srcdir)/config/ylwrap
80SOURCES = $(imp_vrml_la_SOURCES)
81DIST_SOURCES = $(imp_vrml_la_SOURCES)
82ETAGS = etags
83CTAGS = ctags
84DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
85ACLOCAL = @ACLOCAL@
86AMTAR = @AMTAR@
87AR = @AR@
88AS = @AS@
89AUTOCONF = @AUTOCONF@
90AUTOHEADER = @AUTOHEADER@
91AUTOMAKE = @AUTOMAKE@
92AWK = @AWK@
93CC = @CC@
94CCDEPMODE = @CCDEPMODE@
95CFLAGS = @CFLAGS@
96CPP = @CPP@
97CPPFLAGS = @CPPFLAGS@
98CXX = @CXX@
99CXXCPP = @CXXCPP@
100CXXDEPMODE = @CXXDEPMODE@
101CXXFLAGS = @CXXFLAGS@
102CYGPATH_W = @CYGPATH_W@
103DBG_CFLAGS = @DBG_CFLAGS@
104DEBUG = @DEBUG@
105DEFS = @DEFS@
106DEPDIR = @DEPDIR@
107DLLTOOL = @DLLTOOL@
108ECHO = @ECHO@
109ECHO_C = @ECHO_C@
110ECHO_N = @ECHO_N@
111ECHO_T = @ECHO_T@
112EGREP = @EGREP@
113EXEEXT = @EXEEXT@
114F77 = @F77@
115FFLAGS = @FFLAGS@
116GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
117GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
118GLIB_CFLAGS = @GLIB_CFLAGS@
119GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
120GLIB_LIBS = @GLIB_LIBS@
121GLIB_MKENUMS = @GLIB_MKENUMS@
122GOBJECT_QUERY = @GOBJECT_QUERY@
123GREP = @GREP@
124GTKDOC_CHECK = @GTKDOC_CHECK@
125GTK_CFLAGS = @GTK_CFLAGS@
126GTK_LIBS = @GTK_LIBS@
127HTML_DIR = @HTML_DIR@
128INSTALL = @INSTALL@
129INSTALL_DATA = @INSTALL_DATA@
130INSTALL_PROGRAM = @INSTALL_PROGRAM@
131INSTALL_SCRIPT = @INSTALL_SCRIPT@
132INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
133LDFLAGS = @LDFLAGS@
134LEX = @LEX@
135LEXLIB = @LEXLIB@
136LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
137LIBGSF_CFLAGS = @LIBGSF_CFLAGS@
138LIBGSF_LIBS = @LIBGSF_LIBS@
139LIBOBJS = @LIBOBJS@
140LIBS = @LIBS@
141LIBTOOL = @LIBTOOL@ --quiet
142LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
143LIBXML2_LIBS = @LIBXML2_LIBS@
144LN_S = @LN_S@
145LTLIBOBJS = @LTLIBOBJS@
146LTVERSION = @LTVERSION@
147MAGIC_LIBS = @MAGIC_LIBS@
148MAKEINFO = @MAKEINFO@
149MATH_LIBS = @MATH_LIBS@
150MKDIR_P = @MKDIR_P@
151OBJDUMP = @OBJDUMP@
152OBJEXT = @OBJEXT@
153PACKAGE = @PACKAGE@
154PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
155PACKAGE_NAME = @PACKAGE_NAME@
156PACKAGE_STRING = @PACKAGE_STRING@
157PACKAGE_TARNAME = @PACKAGE_TARNAME@
158PACKAGE_VERSION = @PACKAGE_VERSION@
159PATH_SEPARATOR = @PATH_SEPARATOR@
160PKG_CONFIG = @PKG_CONFIG@
161PLUGINS_LDFLAGS = @PLUGINS_LDFLAGS@
162RANLIB = @RANLIB@
163SET_MAKE = @SET_MAKE@
164SHELL = @SHELL@
165STRIP = @STRIP@
166VERSION = @VERSION@
167XML2_CONFIG = @XML2_CONFIG@
168XML_CPPFLAGS = @XML_CPPFLAGS@
169XML_LIBS = @XML_LIBS@
170Z_CFLAGS = @Z_CFLAGS@
171Z_LIBS = @Z_LIBS@
172abs_builddir = @abs_builddir@
173abs_srcdir = @abs_srcdir@
174abs_top_builddir = @abs_top_builddir@
175abs_top_srcdir = @abs_top_srcdir@
176ac_ct_CC = @ac_ct_CC@
177ac_ct_CXX = @ac_ct_CXX@
178ac_ct_F77 = @ac_ct_F77@
179am__include = @am__include@
180am__leading_dot = @am__leading_dot@
181am__quote = @am__quote@
182am__tar = @am__tar@
183am__untar = @am__untar@
184bindir = @bindir@
185build = @build@
186build_alias = @build_alias@
187build_cpu = @build_cpu@
188build_os = @build_os@
189build_vendor = @build_vendor@
190builddir = @builddir@
191datadir = @datadir@
192datarootdir = @datarootdir@
193docdir = @docdir@
194dvidir = @dvidir@
195exec_prefix = @exec_prefix@
196host = @host@
197host_alias = @host_alias@
198host_cpu = @host_cpu@
199host_os = @host_os@
200host_vendor = @host_vendor@
201htmldir = @htmldir@
202includedir = @includedir@
203infodir = @infodir@
204install_sh = @install_sh@
205libdir = @libdir@
206libexecdir = @libexecdir@
207localedir = @localedir@
208localstatedir = @localstatedir@
209mandir = @mandir@
210mkdir_p = @mkdir_p@
211oldincludedir = @oldincludedir@
212pdfdir = @pdfdir@
213prefix = @prefix@
214program_transform_name = @program_transform_name@
215psdir = @psdir@
216sbindir = @sbindir@
217sharedstatedir = @sharedstatedir@
218srcdir = @srcdir@
219sysconfdir = @sysconfdir@
220target_alias = @target_alias@
221top_builddir = @top_builddir@
222top_srcdir = @top_srcdir@
223pluginimpdir = $(pkglibdir)/plugins/import
224@OS_WIN32_FALSE@pluginimp_LTLIBRARIES = imp_vrml.la
225AM_CFLAGS = \
226 -Wall -ansi -pedantic \
227 -DG_LOG_DOMAIN=\"LibG3D\" \
228 @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \
229 @GLIB_CFLAGS@
230
231INCLUDES = -I$(top_srcdir)/include
232AM_LDFLAGS = \
233 -no-undefined -module \
234 @PLUGINS_LDFLAGS@
235
236AM_LFLAGS = -o${LEX_OUTPUT_ROOT}.c --header-file=${LEX_OUTPUT_ROOT}.h -R
237imp_vrml_la_SOURCES = imp_vrml_v1.l imp_vrml_v1.h imp_vrml.c
238imp_vrml_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@ ${LEXLIB}
239EXTRA_DIST = imp_vrml_v1.c imp_vrml_v1.h
240all: all-am
241
242.SUFFIXES:
243.SUFFIXES: .c .l .lo .o .obj
244$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
245 @for dep in $?; do \
246 case '$(am__configure_deps)' in \
247 *$$dep*) \
248 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
249 && exit 0; \
250 exit 1;; \
251 esac; \
252 done; \
253 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_vrml/Makefile'; \
254 cd $(top_srcdir) && \
255 $(AUTOMAKE) --gnu plugins/import/imp_vrml/Makefile
256.PRECIOUS: Makefile
257Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
258 @case '$?' in \
259 *config.status*) \
260 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
261 *) \
262 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
263 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
264 esac;
265
266$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
267 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
268
269$(top_srcdir)/configure: $(am__configure_deps)
270 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
271$(ACLOCAL_M4): $(am__aclocal_m4_deps)
272 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
273install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES)
274 @$(NORMAL_INSTALL)
275 test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)"
276 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
277 if test -f $$p; then \
278 f=$(am__strip_dir) \
279 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \
280 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \
281 else :; fi; \
282 done
283
284uninstall-pluginimpLTLIBRARIES:
285 @$(NORMAL_UNINSTALL)
286 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
287 p=$(am__strip_dir) \
288 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \
289 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \
290 done
291
292clean-pluginimpLTLIBRARIES:
293 -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES)
294 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
295 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
296 test "$$dir" != "$$p" || dir=.; \
297 echo "rm -f \"$${dir}/so_locations\""; \
298 rm -f "$${dir}/so_locations"; \
299 done
300imp_vrml.la: $(imp_vrml_la_OBJECTS) $(imp_vrml_la_DEPENDENCIES)
301 $(LINK) $(am_imp_vrml_la_rpath) $(imp_vrml_la_OBJECTS) $(imp_vrml_la_LIBADD) $(LIBS)
302
303mostlyclean-compile:
304 -rm -f *.$(OBJEXT)
305
306distclean-compile:
307 -rm -f *.tab.c
308
309@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_vrml.Plo@am__quote@
310@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_vrml_v1.Plo@am__quote@
311
312.c.o:
313@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
314@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
315@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
316@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
317@am__fastdepCC_FALSE@ $(COMPILE) -c $<
318
319.c.obj:
320@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
321@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
322@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
323@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
324@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
325
326.c.lo:
327@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
328@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
329@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
330@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
331@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
332
333.l.c:
334 $(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
335
336mostlyclean-libtool:
337 -rm -f *.lo
338
339clean-libtool:
340 -rm -rf .libs _libs
341
342ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
343 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
344 unique=`for i in $$list; do \
345 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
346 done | \
347 $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
348 END { if (nonempty) { for (i in files) print i; }; }'`; \
349 mkid -fID $$unique
350tags: TAGS
351
352TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
353 $(TAGS_FILES) $(LISP)
354 tags=; \
355 here=`pwd`; \
356 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
357 unique=`for i in $$list; do \
358 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
359 done | \
360 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
361 END { if (nonempty) { for (i in files) print i; }; }'`; \
362 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
363 test -n "$$unique" || unique=$$empty_fix; \
364 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
365 $$tags $$unique; \
366 fi
367ctags: CTAGS
368CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
369 $(TAGS_FILES) $(LISP)
370 tags=; \
371 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
372 unique=`for i in $$list; do \
373 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
374 done | \
375 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
376 END { if (nonempty) { for (i in files) print i; }; }'`; \
377 test -z "$(CTAGS_ARGS)$$tags$$unique" \
378 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
379 $$tags $$unique
380
381GTAGS:
382 here=`$(am__cd) $(top_builddir) && pwd` \
383 && cd $(top_srcdir) \
384 && gtags -i $(GTAGS_ARGS) $$here
385
386distclean-tags:
387 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
388
389distdir: $(DISTFILES)
390 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
391 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
392 list='$(DISTFILES)'; \
393 dist_files=`for file in $$list; do echo $$file; done | \
394 sed -e "s|^$$srcdirstrip/||;t" \
395 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
396 case $$dist_files in \
397 */*) $(MKDIR_P) `echo "$$dist_files" | \
398 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
399 sort -u` ;; \
400 esac; \
401 for file in $$dist_files; do \
402 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
403 if test -d $$d/$$file; then \
404 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
405 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
406 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
407 fi; \
408 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
409 else \
410 test -f $(distdir)/$$file \
411 || cp -p $$d/$$file $(distdir)/$$file \
412 || exit 1; \
413 fi; \
414 done
415check-am: all-am
416check: check-am
417all-am: Makefile $(LTLIBRARIES)
418installdirs:
419 for dir in "$(DESTDIR)$(pluginimpdir)"; do \
420 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
421 done
422install: install-am
423install-exec: install-exec-am
424install-data: install-data-am
425uninstall: uninstall-am
426
427install-am: all-am
428 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
429
430installcheck: installcheck-am
431install-strip:
432 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
433 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
434 `test -z '$(STRIP)' || \
435 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
436mostlyclean-generic:
437
438clean-generic:
439
440distclean-generic:
441 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
442
443maintainer-clean-generic:
444 @echo "This command is intended for maintainers to use"
445 @echo "it deletes files that may require special tools to rebuild."
446 -rm -f imp_vrml_v1.c
447clean: clean-am
448
449clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \
450 mostlyclean-am
451
452distclean: distclean-am
453 -rm -rf ./$(DEPDIR)
454 -rm -f Makefile
455distclean-am: clean-am distclean-compile distclean-generic \
456 distclean-tags
457
458dvi: dvi-am
459
460dvi-am:
461
462html: html-am
463
464info: info-am
465
466info-am:
467
468install-data-am: install-pluginimpLTLIBRARIES
469
470install-dvi: install-dvi-am
471
472install-exec-am:
473
474install-html: install-html-am
475
476install-info: install-info-am
477
478install-man:
479
480install-pdf: install-pdf-am
481
482install-ps: install-ps-am
483
484installcheck-am:
485
486maintainer-clean: maintainer-clean-am
487 -rm -rf ./$(DEPDIR)
488 -rm -f Makefile
489maintainer-clean-am: distclean-am maintainer-clean-generic
490
491mostlyclean: mostlyclean-am
492
493mostlyclean-am: mostlyclean-compile mostlyclean-generic \
494 mostlyclean-libtool
495
496pdf: pdf-am
497
498pdf-am:
499
500ps: ps-am
501
502ps-am:
503
504uninstall-am: uninstall-pluginimpLTLIBRARIES
505
506.MAKE: install-am install-strip
507
508.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
509 clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \
510 distclean-compile distclean-generic distclean-libtool \
511 distclean-tags distdir dvi dvi-am html html-am info info-am \
512 install install-am install-data install-data-am install-dvi \
513 install-dvi-am install-exec install-exec-am install-html \
514 install-html-am install-info install-info-am install-man \
515 install-pdf install-pdf-am install-pluginimpLTLIBRARIES \
516 install-ps install-ps-am install-strip installcheck \
517 installcheck-am installdirs maintainer-clean \
518 maintainer-clean-generic mostlyclean mostlyclean-compile \
519 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
520 tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES
521
522# Tell versions [3.59,3.63) of GNU make to not export all variables.
523# Otherwise a system limit (for SysV at least) may be exceeded.
524.NOEXPORT:
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/imp_vrml.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/imp_vrml.c
new file mode 100644
index 0000000..15069d3
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/imp_vrml.c
@@ -0,0 +1,122 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22
23#include <stdio.h>
24#include <string.h>
25#include <locale.h>
26
27#include <glib.h>
28
29#include <g3d/types.h>
30#include <g3d/stream.h>
31#include <g3d/material.h>
32
33#include "imp_vrml_v1.h"
34
35#define VRML_FT_VRML 0x01
36#define VRML_FT_INVENTOR 0x02
37
38#define MAX_LINE_SIZE 2048
39
40EAPI
41gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream,
42 G3DModel *model, gpointer user_data)
43{
44 yyscan_t scanner;
45 YY_BUFFER_STATE bufstate;
46 G3DMaterial *material;
47 gchar line[MAX_LINE_SIZE + 1], *buffer, *bufp;
48 guint32 ver_maj, ver_min, filetype, buflen;
49
50 memset(line, 0, MAX_LINE_SIZE);
51 g3d_stream_read_line(stream, line, MAX_LINE_SIZE);
52 if(strncmp(line, "#VRML", 5) == 0)
53 filetype = VRML_FT_VRML;
54 else if(strncmp(line, "#Inventor", 9) == 0)
55 filetype = VRML_FT_INVENTOR;
56 else {
57 g_warning("file '%s' is not a VRML file", stream->uri);
58 return FALSE;
59 }
60
61 /* FIXME: more than one space between VRML and Vx.x? */
62 ver_maj = line[7] - '0';
63 ver_min = line[9] - '0';
64
65#if DEBUG > 0
66 g_debug("VRML: version %d.%d", ver_maj, ver_min);
67#endif
68
69 setlocale(LC_NUMERIC, "C");
70
71 if((filetype == VRML_FT_INVENTOR) || (ver_maj == 1)) {
72 /* Inventor / VRML 1.x */
73 /* read complete file to buffer */
74 buflen = g3d_stream_size(stream) + 1;
75 buffer = g_new0(gchar, buflen);
76 bufp = buffer;
77 memset(buffer, 0, buflen);
78 memset(line, 0, MAX_LINE_SIZE);
79 while(!g3d_stream_eof(stream) &&
80 g3d_stream_read_line(stream, line, MAX_LINE_SIZE)) {
81 memcpy(bufp, line, strlen(line));
82 bufp += strlen(line);
83 }
84 material = g3d_material_new();
85 material->name = g_strdup("fallback material");
86 model->materials = g_slist_append(model->materials, material);
87
88 vrml_v1_yylex_init(&scanner);
89 vrml_v1_yyset_extra(model, scanner);
90 bufstate = vrml_v1_yy_scan_string(buffer, scanner);
91 if(bufstate) {
92 vrml_v1_yylex(scanner);
93 vrml_v1_yy_delete_buffer(bufstate, scanner);
94 }
95 vrml_v1_yylex_destroy(scanner);
96 g_free(buffer);
97 } else if(ver_maj == 2) {
98 g_warning("VRML 2 is not yet supported");
99 return FALSE;
100 } else {
101 g_warning("unknown VRML version %d.%d", ver_maj, ver_min);
102 return FALSE;
103 }
104
105 return TRUE;
106}
107
108EAPI
109gchar *plugin_description(void)
110{
111 return g_strdup("VRML 1.x & SGI inventor models.");
112}
113
114EAPI
115gchar **plugin_extensions(void)
116{
117 return g_strsplit("vrml:iv", ":", 0);
118}
119
120/* FIXME */
121extern int yywrap(yyscan_t yyscanner);
122int vrml_v1_yywrap(yyscan_t yyscanner) { return yywrap(yyscanner); }
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/imp_vrml_v1.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/imp_vrml_v1.c
new file mode 100644
index 0000000..38e0497
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/imp_vrml_v1.c
@@ -0,0 +1,2788 @@
1#line 2 "imp_vrml_v1.c"
2
3#line 4 "imp_vrml_v1.c"
4
5#define YY_INT_ALIGNED short int
6
7/* A lexical scanner generated by flex */
8
9#define FLEX_SCANNER
10#define YY_FLEX_MAJOR_VERSION 2
11#define YY_FLEX_MINOR_VERSION 5
12#define YY_FLEX_SUBMINOR_VERSION 35
13#if YY_FLEX_SUBMINOR_VERSION > 0
14#define FLEX_BETA
15#endif
16
17/* First, we deal with platform-specific or compiler-specific issues. */
18
19/* begin standard C headers. */
20#include <stdio.h>
21#include <string.h>
22#include <errno.h>
23#include <stdlib.h>
24
25/* end standard C headers. */
26
27/* flex integer type definitions */
28
29#ifndef FLEXINT_H
30#define FLEXINT_H
31
32/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
33
34#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
35
36/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
37 * if you want the limit (max/min) macros for int types.
38 */
39#ifndef __STDC_LIMIT_MACROS
40#define __STDC_LIMIT_MACROS 1
41#endif
42
43#include <inttypes.h>
44typedef int8_t flex_int8_t;
45typedef uint8_t flex_uint8_t;
46typedef int16_t flex_int16_t;
47typedef uint16_t flex_uint16_t;
48typedef int32_t flex_int32_t;
49typedef uint32_t flex_uint32_t;
50#else
51typedef signed char flex_int8_t;
52typedef short int flex_int16_t;
53typedef int flex_int32_t;
54typedef unsigned char flex_uint8_t;
55typedef unsigned short int flex_uint16_t;
56typedef unsigned int flex_uint32_t;
57
58/* Limits of integral types. */
59#ifndef INT8_MIN
60#define INT8_MIN (-128)
61#endif
62#ifndef INT16_MIN
63#define INT16_MIN (-32767-1)
64#endif
65#ifndef INT32_MIN
66#define INT32_MIN (-2147483647-1)
67#endif
68#ifndef INT8_MAX
69#define INT8_MAX (127)
70#endif
71#ifndef INT16_MAX
72#define INT16_MAX (32767)
73#endif
74#ifndef INT32_MAX
75#define INT32_MAX (2147483647)
76#endif
77#ifndef UINT8_MAX
78#define UINT8_MAX (255U)
79#endif
80#ifndef UINT16_MAX
81#define UINT16_MAX (65535U)
82#endif
83#ifndef UINT32_MAX
84#define UINT32_MAX (4294967295U)
85#endif
86
87#endif /* ! C99 */
88
89#endif /* ! FLEXINT_H */
90
91#ifdef __cplusplus
92
93/* The "const" storage-class-modifier is valid. */
94#define YY_USE_CONST
95
96#else /* ! __cplusplus */
97
98/* C99 requires __STDC__ to be defined as 1. */
99#if defined (__STDC__)
100
101#define YY_USE_CONST
102
103#endif /* defined (__STDC__) */
104#endif /* ! __cplusplus */
105
106#ifdef YY_USE_CONST
107#define yyconst const
108#else
109#define yyconst
110#endif
111
112/* Returned upon end-of-file. */
113#define YY_NULL 0
114
115/* Promotes a possibly negative, possibly signed char to an unsigned
116 * integer for use as an array index. If the signed char is negative,
117 * we want to instead treat it as an 8-bit unsigned char, hence the
118 * double cast.
119 */
120#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
121
122/* An opaque pointer. */
123#ifndef YY_TYPEDEF_YY_SCANNER_T
124#define YY_TYPEDEF_YY_SCANNER_T
125typedef void* yyscan_t;
126#endif
127
128/* For convenience, these vars (plus the bison vars far below)
129 are macros in the reentrant scanner. */
130#define yyin yyg->yyin_r
131#define yyout yyg->yyout_r
132#define yyextra yyg->yyextra_r
133#define yyleng yyg->yyleng_r
134#define yytext yyg->yytext_r
135#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
136#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
137#define yy_flex_debug yyg->yy_flex_debug_r
138
139/* Enter a start condition. This macro really ought to take a parameter,
140 * but we do it the disgusting crufty way forced on us by the ()-less
141 * definition of BEGIN.
142 */
143#define BEGIN yyg->yy_start = 1 + 2 *
144
145/* Translate the current start state into a value that can be later handed
146 * to BEGIN to return to the state. The YYSTATE alias is for lex
147 * compatibility.
148 */
149#define YY_START ((yyg->yy_start - 1) / 2)
150#define YYSTATE YY_START
151
152/* Action number for EOF rule of a given start state. */
153#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
154
155/* Special action meaning "start processing a new file". */
156#define YY_NEW_FILE vrml_v1_yyrestart(yyin ,yyscanner )
157
158#define YY_END_OF_BUFFER_CHAR 0
159
160/* Size of default input buffer. */
161#ifndef YY_BUF_SIZE
162#define YY_BUF_SIZE 16384
163#endif
164
165/* The state buf must be large enough to hold one state per character in the main buffer.
166 */
167#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
168
169#ifndef YY_TYPEDEF_YY_BUFFER_STATE
170#define YY_TYPEDEF_YY_BUFFER_STATE
171typedef struct yy_buffer_state *YY_BUFFER_STATE;
172#endif
173
174#define EOB_ACT_CONTINUE_SCAN 0
175#define EOB_ACT_END_OF_FILE 1
176#define EOB_ACT_LAST_MATCH 2
177
178 #define YY_LESS_LINENO(n)
179
180/* Return all but the first "n" matched characters back to the input stream. */
181#define yyless(n) \
182 do \
183 { \
184 /* Undo effects of setting up yytext. */ \
185 int yyless_macro_arg = (n); \
186 YY_LESS_LINENO(yyless_macro_arg);\
187 *yy_cp = yyg->yy_hold_char; \
188 YY_RESTORE_YY_MORE_OFFSET \
189 yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
190 YY_DO_BEFORE_ACTION; /* set up yytext again */ \
191 } \
192 while ( 0 )
193
194#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
195
196#ifndef YY_TYPEDEF_YY_SIZE_T
197#define YY_TYPEDEF_YY_SIZE_T
198typedef size_t yy_size_t;
199#endif
200
201#ifndef YY_STRUCT_YY_BUFFER_STATE
202#define YY_STRUCT_YY_BUFFER_STATE
203struct yy_buffer_state
204 {
205 FILE *yy_input_file;
206
207 char *yy_ch_buf; /* input buffer */
208 char *yy_buf_pos; /* current position in input buffer */
209
210 /* Size of input buffer in bytes, not including room for EOB
211 * characters.
212 */
213 yy_size_t yy_buf_size;
214
215 /* Number of characters read into yy_ch_buf, not including EOB
216 * characters.
217 */
218 int yy_n_chars;
219
220 /* Whether we "own" the buffer - i.e., we know we created it,
221 * and can realloc() it to grow it, and should free() it to
222 * delete it.
223 */
224 int yy_is_our_buffer;
225
226 /* Whether this is an "interactive" input source; if so, and
227 * if we're using stdio for input, then we want to use getc()
228 * instead of fread(), to make sure we stop fetching input after
229 * each newline.
230 */
231 int yy_is_interactive;
232
233 /* Whether we're considered to be at the beginning of a line.
234 * If so, '^' rules will be active on the next match, otherwise
235 * not.
236 */
237 int yy_at_bol;
238
239 int yy_bs_lineno; /**< The line count. */
240 int yy_bs_column; /**< The column count. */
241
242 /* Whether to try to fill the input buffer when we reach the
243 * end of it.
244 */
245 int yy_fill_buffer;
246
247 int yy_buffer_status;
248
249#define YY_BUFFER_NEW 0
250#define YY_BUFFER_NORMAL 1
251 /* When an EOF's been seen but there's still some text to process
252 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
253 * shouldn't try reading from the input source any more. We might
254 * still have a bunch of tokens to match, though, because of
255 * possible backing-up.
256 *
257 * When we actually see the EOF, we change the status to "new"
258 * (via vrml_v1_yyrestart()), so that the user can continue scanning by
259 * just pointing yyin at a new input file.
260 */
261#define YY_BUFFER_EOF_PENDING 2
262
263 };
264#endif /* !YY_STRUCT_YY_BUFFER_STATE */
265
266/* We provide macros for accessing buffer states in case in the
267 * future we want to put the buffer states in a more general
268 * "scanner state".
269 *
270 * Returns the top of the stack, or NULL.
271 */
272#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \
273 ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \
274 : NULL)
275
276/* Same as previous macro, but useful when we know that the buffer stack is not
277 * NULL or when we need an lvalue. For internal use only.
278 */
279#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top]
280
281void vrml_v1_yyrestart (FILE *input_file ,yyscan_t yyscanner );
282void vrml_v1_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
283YY_BUFFER_STATE vrml_v1_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
284void vrml_v1_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
285void vrml_v1_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
286void vrml_v1_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
287void vrml_v1_yypop_buffer_state (yyscan_t yyscanner );
288
289static void vrml_v1_yyensure_buffer_stack (yyscan_t yyscanner );
290static void vrml_v1_yy_load_buffer_state (yyscan_t yyscanner );
291static void vrml_v1_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
292
293#define YY_FLUSH_BUFFER vrml_v1_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner)
294
295YY_BUFFER_STATE vrml_v1_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
296YY_BUFFER_STATE vrml_v1_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
297YY_BUFFER_STATE vrml_v1_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
298
299void *vrml_v1_yyalloc (yy_size_t ,yyscan_t yyscanner );
300void *vrml_v1_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
301void vrml_v1_yyfree (void * ,yyscan_t yyscanner );
302
303#define yy_new_buffer vrml_v1_yy_create_buffer
304
305#define yy_set_interactive(is_interactive) \
306 { \
307 if ( ! YY_CURRENT_BUFFER ){ \
308 vrml_v1_yyensure_buffer_stack (yyscanner); \
309 YY_CURRENT_BUFFER_LVALUE = \
310 vrml_v1_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
311 } \
312 YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
313 }
314
315#define yy_set_bol(at_bol) \
316 { \
317 if ( ! YY_CURRENT_BUFFER ){\
318 vrml_v1_yyensure_buffer_stack (yyscanner); \
319 YY_CURRENT_BUFFER_LVALUE = \
320 vrml_v1_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \
321 } \
322 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
323 }
324
325#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
326
327/* Begin user sect3 */
328
329typedef unsigned char YY_CHAR;
330
331typedef int yy_state_type;
332
333#define yytext_ptr yytext_r
334
335static yy_state_type yy_get_previous_state (yyscan_t yyscanner );
336static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner);
337static int yy_get_next_buffer (yyscan_t yyscanner );
338static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
339
340/* Done after the current pattern has been matched and before the
341 * corresponding action - sets up yytext.
342 */
343#define YY_DO_BEFORE_ACTION \
344 yyg->yytext_ptr = yy_bp; \
345 yyleng = (size_t) (yy_cp - yy_bp); \
346 yyg->yy_hold_char = *yy_cp; \
347 *yy_cp = '\0'; \
348 yyg->yy_c_buf_p = yy_cp;
349
350#define YY_NUM_RULES 32
351#define YY_END_OF_BUFFER 33
352/* This struct is not used in this scanner,
353 but its presence is necessary. */
354struct yy_trans_info
355 {
356 flex_int32_t yy_verify;
357 flex_int32_t yy_nxt;
358 };
359static yyconst flex_int16_t yy_acclist[299] =
360 { 0,
361 33, 30, 32, 31, 32, 30, 32, 15, 30, 32,
362 30, 32,16411, 30, 32,16411, 30, 32,16411, 30,
363 32,16411, 30, 32,16411, 30, 32,16411, 26, 30,
364 32, 30, 32, 30, 32, 30, 32, 30, 32, 30,
365 32, 30, 32, 30, 32, 30, 32, 28, 30, 32,
366 29, 30, 32, 1, 30, 32, 30, 32, 4, 30,
367 32, 5, 31, 32, 4, 30, 32, 4, 15, 30,
368 32, 4, 30, 32,16411, 4, 30, 32,16411, 4,
369 30, 32,16411, 4, 30, 32,16411, 4, 30, 32,
370 16411, 4, 30, 32,16411, 4, 30, 32,16411, 4,
371
372 26, 30, 32, 4, 30, 32, 4, 30, 32, 4,
373 30, 32, 4, 30, 32, 4, 30, 32, 4, 30,
374 32, 4, 30, 32, 4, 30, 32, 4, 28, 30,
375 32, 4, 29, 30, 32, 6, 30, 32, 7, 31,
376 32, 6, 30, 32, 6, 15, 30, 32, 6, 30,
377 32,16411, 6, 30, 32,16411, 6, 30, 32,16411,
378 6, 30, 32,16411, 6, 30, 32,16411, 6, 30,
379 32,16411, 6, 26, 30, 32, 6, 30, 32, 6,
380 30, 32, 6, 30, 32, 6, 30, 32, 6, 30,
381 32, 6, 30, 32, 6, 30, 32, 6, 30, 32,
382
383 6, 28, 30, 32, 6, 29, 30, 32, 15, 15,
384 15, 14, 15,16411, 8219,16411,16411,16411,16411,16411,
385 1, 3, 3,16411,16411,16411,16411,16411,16411,16411,
386 16411,16411,16411,16411,16411,16411,16411,16411,16411,16411,
387 16411,16411, 9, 8219,16411,16411,16411,16411, 25, 22,
388 16411, 9,16411,16411,16411,16411, 2,16411,16411,16411,
389 16411,16411,16411,16411, 10, 8219,16411,16411,16411,16411,
390 16411, 8, 8219, 20,16411,16411,16411, 23, 12, 8219,
391 16411,16411,16411,16411, 16, 17, 21,16411,16411, 19,
392 24, 18, 13, 8219,16411, 11, 8219, 11
393
394 } ;
395
396static yyconst flex_int16_t yy_accept[276] =
397 { 0,
398 1, 1, 1, 1, 1, 1, 1, 2, 4, 6,
399 8, 11, 14, 17, 20, 23, 26, 29, 32, 34,
400 36, 38, 40, 42, 44, 46, 48, 51, 54, 57,
401 59, 62, 65, 68, 72, 76, 80, 84, 88, 92,
402 96, 100, 104, 107, 110, 113, 116, 119, 122, 125,
403 128, 132, 136, 139, 142, 145, 149, 153, 157, 161,
404 165, 169, 173, 177, 180, 183, 186, 189, 192, 195,
405 198, 201, 205, 209, 210, 211, 212, 213, 214, 214,
406 214, 215, 216, 217, 218, 219, 220, 221, 221, 221,
407 221, 221, 221, 221, 221, 221, 221, 221, 222, 222,
408
409 223, 225, 226, 227, 228, 229, 230, 230, 230, 230,
410 230, 230, 230, 230, 230, 230, 230, 231, 232, 233,
411 234, 235, 236, 236, 236, 236, 236, 236, 236, 236,
412 236, 236, 236, 236, 237, 238, 239, 240, 241, 242,
413 242, 242, 242, 242, 242, 242, 242, 242, 242, 242,
414 242, 243, 243, 243, 245, 246, 247, 248, 249, 249,
415 249, 249, 249, 249, 250, 250, 251, 251, 251, 251,
416 251, 252, 253, 254, 255, 256, 257, 257, 257, 257,
417 257, 257, 257, 257, 257, 258, 259, 260, 261, 262,
418 263, 263, 263, 263, 263, 263, 263, 263, 263, 264,
419
420 265, 265, 267, 268, 269, 269, 269, 269, 269, 269,
421 269, 269, 269, 270, 271, 272, 272, 274, 274, 274,
422 274, 274, 274, 274, 275, 275, 275, 276, 277, 278,
423 278, 278, 279, 279, 279, 279, 279, 279, 279, 281,
424 282, 283, 283, 283, 283, 283, 283, 283, 284, 285,
425 285, 286, 286, 287, 287, 287, 287, 287, 288, 289,
426 290, 290, 291, 291, 292, 292, 293, 293, 295, 296,
427 296, 296, 298, 299, 299
428 } ;
429
430static yyconst flex_int32_t yy_ec[256] =
431 { 0,
432 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
433 2, 2, 2, 1, 1, 1, 1, 1, 1, 1,
434 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
435 1, 4, 1, 1, 5, 1, 1, 1, 1, 1,
436 1, 1, 1, 6, 7, 8, 1, 9, 9, 9,
437 10, 9, 9, 9, 9, 9, 9, 1, 1, 1,
438 1, 1, 1, 1, 11, 11, 12, 11, 11, 13,
439 14, 11, 15, 11, 11, 16, 17, 11, 11, 11,
440 11, 18, 19, 20, 11, 21, 11, 11, 11, 11,
441 22, 1, 23, 1, 1, 1, 24, 25, 26, 27,
442
443 28, 29, 30, 31, 32, 30, 30, 33, 34, 35,
444 36, 37, 30, 38, 39, 40, 41, 42, 30, 43,
445 44, 30, 45, 1, 46, 1, 1, 1, 1, 1,
446 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
447 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
448 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
449 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
450 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
451 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
452 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
453
454 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
455 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
456 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
457 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
458 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
459 1, 1, 1, 1, 1
460 } ;
461
462static yyconst flex_int32_t yy_meta[47] =
463 { 0,
464 1, 2, 2, 3, 1, 4, 5, 5, 3, 3,
465 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
466 6, 1, 4, 6, 6, 6, 6, 7, 6, 6,
467 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
468 6, 6, 6, 6, 6, 1
469 } ;
470
471static yyconst flex_int16_t yy_base[278] =
472 { 0,
473 0, 42, 81, 0, 127, 0, 619, 620, 620, 39,
474 172, 173, 179, 181, 182, 180, 183, 620, 584, 581,
475 584, 581, 590, 577, 19, 574, 620, 620, 590, 183,
476 620, 620, 42, 0, 185, 187, 193, 194, 188, 206,
477 197, 620, 576, 573, 576, 573, 582, 569, 22, 566,
478 620, 620, 620, 620, 45, 0, 190, 204, 198, 209,
479 192, 217, 620, 569, 566, 569, 566, 575, 562, 26,
480 559, 620, 620, 0, 0, 51, 620, 0, 52, 205,
481 237, 620, 242, 243, 244, 251, 248, 571, 559, 565,
482 561, 552, 559, 558, 561, 564, 568, 620, 251, 56,
483
484 249, 257, 256, 264, 270, 259, 549, 538, 546, 533,
485 34, 536, 534, 542, 531, 548, 272, 266, 262, 268,
486 280, 276, 536, 536, 521, 522, 522, 527, 518, 525,
487 515, 516, 538, 296, 316, 282, 312, 319, 318, 518,
488 537, 512, 518, 517, 505, 327, 512, 513, 508, 540,
489 320, 330, 333, 620, 339, 322, 334, 336, 503, 507,
490 512, 497, 513, 620, 348, 620, 508, 510, 509, 492,
491 335, 620, 343, 341, 344, 349, 500, 482, 495, 476,
492 470, 462, 459, 437, 620, 356, 367, 354, 368, 364,
493 436, 439, 428, 435, 422, 390, 269, 249, 365, 369,
494
495 373, 620, 386, 379, 242, 230, 236, 231, 230, 401,
496 228, 168, 396, 383, 393, 394, 620, 163, 413, 157,
497 157, 53, 423, 620, 46, 52, 403, 415, 404, 39,
498 440, 620, 38, 38, 45, 35, 26, 416, 620, 418,
499 432, 448, 451, 31, 25, 29, 454, 426, 436, 476,
500 620, 480, 620, 483, 486, 489, 492, 620, 455, 465,
501 513, 620, 516, 620, 519, 620, 461, 620, 522, 525,
502 528, 620, 620, 620, 571, 577, 580
503 } ;
504
505static yyconst flex_int16_t yy_def[278] =
506 { 0,
507 274, 1, 274, 3, 274, 5, 274, 274, 274, 274,
508 274, 275, 275, 275, 275, 275, 275, 274, 274, 274,
509 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
510 274, 274, 274, 11, 275, 275, 275, 275, 275, 275,
511 275, 274, 274, 274, 274, 274, 274, 274, 274, 274,
512 274, 274, 274, 274, 274, 11, 275, 275, 275, 275,
513 275, 275, 274, 274, 274, 274, 274, 274, 274, 274,
514 274, 274, 274, 11, 276, 11, 274, 11, 277, 274,
515 275, 274, 275, 275, 275, 275, 275, 274, 274, 274,
516 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
517
518 275, 275, 275, 275, 275, 275, 274, 274, 274, 274,
519 274, 274, 274, 274, 274, 274, 275, 275, 275, 275,
520 275, 275, 274, 274, 274, 274, 274, 274, 274, 274,
521 274, 274, 274, 275, 275, 275, 275, 275, 275, 274,
522 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
523 275, 274, 274, 274, 275, 275, 275, 275, 274, 274,
524 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
525 275, 274, 275, 275, 275, 275, 274, 274, 274, 274,
526 274, 274, 274, 274, 274, 275, 275, 275, 275, 275,
527 274, 274, 274, 274, 274, 274, 274, 274, 275, 275,
528
529 274, 274, 275, 275, 274, 274, 274, 274, 274, 274,
530 274, 274, 275, 275, 275, 274, 274, 274, 274, 274,
531 274, 274, 274, 274, 274, 274, 275, 275, 275, 274,
532 274, 274, 274, 274, 274, 274, 274, 274, 274, 275,
533 275, 274, 274, 274, 274, 274, 274, 275, 275, 274,
534 274, 274, 274, 274, 274, 274, 274, 274, 275, 275,
535 274, 274, 274, 274, 274, 274, 274, 274, 275, 274,
536 274, 274, 274, 0, 274, 274, 274
537 } ;
538
539static yyconst flex_int16_t yy_nxt[667] =
540 { 0,
541 8, 8, 9, 8, 8, 8, 10, 8, 11, 11,
542 12, 13, 12, 14, 15, 12, 16, 12, 17, 12,
543 12, 8, 18, 19, 8, 20, 21, 22, 8, 8,
544 8, 8, 8, 23, 8, 8, 24, 8, 25, 26,
545 8, 8, 8, 8, 27, 28, 29, 74, 74, 94,
546 74, 74, 94, 74, 74, 95, 94, 77, 95, 76,
547 76, 127, 95, 100, 100, 100, 256, 255, 254, 247,
548 246, 128, 245, 244, 77, 243, 242, 237, 236, 235,
549 30, 31, 31, 32, 31, 31, 31, 33, 31, 34,
550 34, 35, 36, 35, 37, 38, 35, 39, 35, 40,
551
552 35, 41, 31, 42, 43, 31, 44, 45, 46, 31,
553 31, 31, 31, 31, 47, 31, 31, 48, 31, 49,
554 50, 31, 31, 31, 31, 51, 52, 53, 53, 54,
555 53, 53, 53, 55, 53, 56, 56, 57, 58, 57,
556 59, 60, 57, 61, 57, 62, 57, 57, 53, 63,
557 64, 53, 65, 66, 67, 53, 53, 53, 53, 53,
558 68, 53, 53, 69, 53, 70, 71, 53, 53, 53,
559 53, 72, 73, 75, 75, 76, 80, 77, 76, 76,
560 78, 78, 80, 80, 80, 80, 80, 98, 80, 234,
561 80, 80, 233, 80, 77, 80, 80, 80, 230, 79,
562
563 80, 80, 226, 86, 100, 101, 101, 80, 80, 80,
564 87, 86, 80, 94, 83, 86, 85, 82, 84, 95,
565 80, 99, 83, 82, 82, 82, 82, 82, 85, 82,
566 84, 82, 82, 87, 82, 84, 82, 82, 82, 83,
567 80, 82, 82, 85, 87, 80, 80, 80, 82, 82,
568 82, 80, 80, 82, 80, 98, 100, 101, 101, 80,
569 80, 82, 80, 225, 222, 80, 221, 80, 220, 80,
570 104, 80, 219, 80, 218, 80, 212, 102, 103, 80,
571 211, 82, 122, 80, 106, 80, 82, 82, 82, 99,
572 105, 119, 82, 82, 117, 82, 118, 120, 134, 80,
573
574 82, 82, 135, 82, 136, 137, 82, 121, 82, 155,
575 82, 138, 82, 139, 82, 80, 82, 152, 152, 153,
576 82, 80, 80, 80, 82, 80, 82, 151, 165, 165,
577 165, 152, 152, 152, 152, 152, 153, 80, 80, 80,
578 82, 158, 80, 156, 80, 174, 80, 80, 166, 165,
579 165, 165, 80, 175, 171, 187, 82, 201, 186, 80,
580 154, 157, 82, 82, 82, 173, 82, 80, 80, 166,
581 80, 80, 80, 188, 172, 176, 201, 154, 82, 82,
582 82, 189, 216, 82, 190, 82, 80, 82, 82, 80,
583 200, 203, 213, 82, 214, 199, 80, 216, 202, 80,
584
585 82, 204, 223, 223, 223, 227, 238, 80, 82, 82,
586 228, 82, 82, 82, 231, 231, 231, 202, 80, 238,
587 215, 80, 224, 217, 223, 223, 223, 82, 210, 80,
588 82, 229, 241, 240, 232, 80, 209, 82, 217, 80,
589 82, 231, 231, 231, 224, 248, 208, 239, 82, 250,
590 250, 250, 252, 252, 252, 257, 257, 257, 267, 82,
591 239, 232, 82, 207, 267, 259, 206, 249, 80, 251,
592 82, 205, 253, 260, 198, 258, 82, 250, 250, 250,
593 82, 252, 252, 252, 261, 261, 261, 263, 263, 263,
594 265, 265, 265, 257, 257, 257, 197, 251, 269, 268,
595
596 196, 253, 195, 194, 262, 268, 193, 264, 192, 82,
597 266, 191, 185, 258, 261, 261, 261, 263, 263, 263,
598 265, 265, 265, 270, 270, 271, 270, 270, 270, 270,
599 270, 271, 184, 183, 262, 182, 181, 264, 180, 179,
600 266, 178, 177, 170, 169, 168, 167, 164, 163, 162,
601 161, 160, 159, 150, 149, 148, 147, 146, 145, 144,
602 143, 142, 141, 140, 133, 132, 272, 131, 130, 273,
603 129, 126, 272, 81, 125, 124, 81, 81, 75, 75,
604 123, 75, 79, 79, 79, 116, 79, 115, 114, 113,
605 112, 111, 110, 109, 108, 107, 96, 93, 92, 91,
606
607 90, 89, 88, 96, 93, 92, 91, 90, 89, 88,
608 97, 96, 93, 92, 91, 90, 89, 88, 274, 7,
609 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
610 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
611 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
612 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
613 274, 274, 274, 274, 274, 274
614 } ;
615
616static yyconst flex_int16_t yy_chk[667] =
617 { 0,
618 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
619 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
620 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
621 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
622 1, 1, 1, 1, 1, 1, 2, 10, 10, 25,
623 33, 33, 49, 55, 55, 25, 70, 79, 49, 76,
624 76, 111, 70, 100, 100, 100, 246, 245, 244, 237,
625 236, 111, 235, 234, 79, 233, 230, 226, 225, 222,
626 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
627 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
628
629 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
630 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
631 3, 3, 3, 3, 3, 3, 3, 5, 5, 5,
632 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
633 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
634 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
635 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
636 5, 5, 5, 11, 11, 11, 12, 11, 11, 11,
637 11, 11, 13, 16, 14, 15, 17, 30, 35, 221,
638 36, 39, 220, 57, 11, 61, 37, 38, 218, 11,
639
640 41, 59, 212, 16, 41, 41, 41, 58, 80, 40,
641 17, 39, 60, 30, 13, 61, 15, 12, 14, 30,
642 62, 30, 36, 13, 16, 14, 15, 17, 38, 35,
643 37, 36, 39, 40, 57, 59, 61, 37, 38, 58,
644 81, 41, 59, 60, 62, 83, 84, 85, 58, 80,
645 40, 87, 101, 60, 86, 99, 101, 101, 101, 103,
646 102, 62, 106, 211, 209, 119, 208, 104, 207, 118,
647 85, 120, 206, 105, 205, 117, 198, 83, 84, 122,
648 197, 81, 106, 121, 87, 136, 83, 84, 85, 99,
649 86, 104, 87, 101, 102, 86, 103, 105, 117, 134,
650
651 103, 102, 118, 106, 119, 120, 119, 105, 104, 136,
652 118, 121, 120, 122, 105, 137, 117, 135, 135, 135,
653 122, 139, 138, 151, 121, 156, 136, 134, 146, 146,
654 146, 152, 152, 152, 153, 153, 153, 157, 171, 158,
655 134, 139, 155, 137, 174, 156, 173, 175, 146, 165,
656 165, 165, 176, 157, 151, 173, 137, 188, 171, 186,
657 135, 138, 139, 138, 151, 155, 156, 190, 199, 165,
658 187, 189, 200, 174, 152, 158, 201, 153, 157, 171,
659 158, 175, 204, 155, 176, 174, 214, 173, 175, 203,
660 187, 189, 199, 176, 200, 186, 215, 216, 188, 213,
661
662 186, 190, 210, 210, 210, 213, 227, 229, 190, 199,
663 214, 187, 189, 200, 219, 219, 219, 201, 228, 238,
664 203, 240, 210, 204, 223, 223, 223, 214, 196, 248,
665 203, 215, 229, 228, 219, 241, 195, 215, 216, 249,
666 213, 231, 231, 231, 223, 240, 194, 227, 229, 242,
667 242, 242, 243, 243, 243, 247, 247, 247, 259, 228,
668 238, 231, 240, 193, 267, 248, 192, 241, 260, 242,
669 248, 191, 243, 249, 184, 247, 241, 250, 250, 250,
670 249, 252, 252, 252, 254, 254, 254, 255, 255, 255,
671 256, 256, 256, 257, 257, 257, 183, 250, 260, 259,
672
673 182, 252, 181, 180, 254, 267, 179, 255, 178, 260,
674 256, 177, 170, 257, 261, 261, 261, 263, 263, 263,
675 265, 265, 265, 269, 269, 269, 270, 270, 270, 271,
676 271, 271, 169, 168, 261, 167, 163, 263, 162, 161,
677 265, 160, 159, 150, 149, 148, 147, 145, 144, 143,
678 142, 141, 140, 133, 132, 131, 130, 129, 128, 127,
679 126, 125, 124, 123, 116, 115, 269, 114, 113, 270,
680 112, 110, 271, 275, 109, 108, 275, 275, 276, 276,
681 107, 276, 277, 277, 277, 97, 277, 96, 95, 94,
682 93, 92, 91, 90, 89, 88, 71, 69, 68, 67,
683
684 66, 65, 64, 50, 48, 47, 46, 45, 44, 43,
685 29, 26, 24, 23, 22, 21, 20, 19, 7, 274,
686 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
687 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
688 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
689 274, 274, 274, 274, 274, 274, 274, 274, 274, 274,
690 274, 274, 274, 274, 274, 274
691 } ;
692
693#define YY_TRAILING_MASK 0x2000
694#define YY_TRAILING_HEAD_MASK 0x4000
695#define REJECT \
696{ \
697*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ \
698yy_cp = yyg->yy_full_match; /* restore poss. backed-over text */ \
699yyg->yy_lp = yyg->yy_full_lp; /* restore orig. accepting pos. */ \
700yyg->yy_state_ptr = yyg->yy_full_state; /* restore orig. state */ \
701yy_current_state = *yyg->yy_state_ptr; /* restore curr. state */ \
702++yyg->yy_lp; \
703goto find_rule; \
704}
705
706#define yymore() yymore_used_but_not_detected
707#define YY_MORE_ADJ 0
708#define YY_RESTORE_YY_MORE_OFFSET
709#line 1 "imp_vrml_v1.l"
710/* $Id$ */
711/*
712 libg3d - 3D object loading library
713
714 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
715
716 This library is free software; you can redistribute it and/or
717 modify it under the terms of the GNU Lesser General Public
718 License as published by the Free Software Foundation; either
719 version 2.1 of the License, or (at your option) any later version.
720
721 This library is distributed in the hope that it will be useful,
722 but WITHOUT ANY WARRANTY; without even the implied warranty of
723 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
724 Lesser General Public License for more details.
725
726 You should have received a copy of the GNU Lesser General Public
727 License along with this library; if not, write to the Free Software
728 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
729*/
730
731
732/* $Id$ */
733/*
734libg3d - 3D object loading library
735Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
736This library is free software; you can redistribute it and/or
737modify it under the terms of the GNU Lesser General Public
738License as published by the Free Software Foundation; either
739version 2.1 of the License, or (at your option) any later version.
740This library is distributed in the hope that it will be useful,
741but WITHOUT ANY WARRANTY; without even the implied warranty of
742MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
743Lesser General Public License for more details.
744You should have received a copy of the GNU Lesser General Public
745License along with this library; if not, write to the Free Software
746Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
747*/
748#define __USE_POSIX 1
749#define _XOPEN_SOURCE 500
750#define _POSIX_C_SOURCE 200112L
751#include <stdio.h>
752#include <string.h>
753#include <locale.h>
754#include <g3d/types.h>
755#include <g3d/material.h>
756#include <g3d/vector.h>
757#if DEBUG > 0
758# define vrml_dump_hier(level, section) g_debug("\\%.*s[%s]", \
759level, " ", section)
760#else
761# define vrml_dump_hier(level, section) /* */
762#endif
763#define VRML_OTYPE_MAT 0x0100
764#define VRML_OTYPE_MAT_AMBIENTCOLOR 0x0101
765#define VRML_OTYPE_MAT_DIFFUSECOLOR 0x0102
766#define VRML_OTYPE_MAT_SPECULARCOLOR 0x0103
767#define VRML_OTYPE_MAT_EMISSIVECOLOR 0x0104
768#define VRML_OTYPE_MAT_SHININESS 0x0105
769#define VRML_OTYPE_MAT_TRANSPARENCY 0x0106
770#define VRML_OTYPE_COORD3 0x0200
771#define VRML_OTYPE_COORD3_POINT 0x0201
772#define VRML_OTYPE_IDXFACESET 0x0300
773#define VRML_OTYPE_IDXFACESET_COORDIDX 0x0301
774#define VRML_OTYPE_IDXFACESET_MATIDX 0x0302
775#define VRML_OTYPE_MTRANS 0x0400
776#define VRML_OTYPE_MTRANS_MATRIX 0x0401
777#line 778 "imp_vrml_v1.c"
778
779#define INITIAL 0
780#define VRMLHEADER 1
781#define COMMENT 2
782
783#ifndef YY_NO_UNISTD_H
784/* Special case for "unistd.h", since it is non-ANSI. We include it way
785 * down here because we want the user's section 1 to have been scanned first.
786 * The user has a chance to override it with an option.
787 */
788#include <unistd.h>
789#endif
790
791#ifndef YY_EXTRA_TYPE
792#define YY_EXTRA_TYPE void *
793#endif
794
795/* Holds the entire state of the reentrant scanner. */
796struct yyguts_t
797 {
798
799 /* User-defined. Not touched by flex. */
800 YY_EXTRA_TYPE yyextra_r;
801
802 /* The rest are the same as the globals declared in the non-reentrant scanner. */
803 FILE *yyin_r, *yyout_r;
804 size_t yy_buffer_stack_top; /**< index of top of stack. */
805 size_t yy_buffer_stack_max; /**< capacity of stack. */
806 YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
807 char yy_hold_char;
808 int yy_n_chars;
809 int yyleng_r;
810 char *yy_c_buf_p;
811 int yy_init;
812 int yy_start;
813 int yy_did_buffer_switch_on_eof;
814 int yy_start_stack_ptr;
815 int yy_start_stack_depth;
816 int *yy_start_stack;
817 yy_state_type yy_last_accepting_state;
818 char* yy_last_accepting_cpos;
819
820 int yylineno_r;
821 int yy_flex_debug_r;
822
823 yy_state_type *yy_state_buf;
824 yy_state_type *yy_state_ptr;
825 char *yy_full_match;
826 int yy_lp;
827
828 /* These are only needed for trailing context rules,
829 * but there's no conditional variable for that yet. */
830 int yy_looking_for_trail_begin;
831 int yy_full_lp;
832 int *yy_full_state;
833
834 char *yytext_r;
835 int yy_more_flag;
836 int yy_more_len;
837
838 }; /* end struct yyguts_t */
839
840static int yy_init_globals (yyscan_t yyscanner );
841
842int vrml_v1_yylex_init (yyscan_t* scanner);
843
844int vrml_v1_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
845
846/* Accessor methods to globals.
847 These are made visible to non-reentrant scanners for convenience. */
848
849int vrml_v1_yylex_destroy (yyscan_t yyscanner );
850
851int vrml_v1_yyget_debug (yyscan_t yyscanner );
852
853void vrml_v1_yyset_debug (int debug_flag ,yyscan_t yyscanner );
854
855YY_EXTRA_TYPE vrml_v1_yyget_extra (yyscan_t yyscanner );
856
857void vrml_v1_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
858
859FILE *vrml_v1_yyget_in (yyscan_t yyscanner );
860
861void vrml_v1_yyset_in (FILE * in_str ,yyscan_t yyscanner );
862
863FILE *vrml_v1_yyget_out (yyscan_t yyscanner );
864
865void vrml_v1_yyset_out (FILE * out_str ,yyscan_t yyscanner );
866
867int vrml_v1_yyget_leng (yyscan_t yyscanner );
868
869char *vrml_v1_yyget_text (yyscan_t yyscanner );
870
871int vrml_v1_yyget_lineno (yyscan_t yyscanner );
872
873void vrml_v1_yyset_lineno (int line_number ,yyscan_t yyscanner );
874
875/* Macros after this point can all be overridden by user definitions in
876 * section 1.
877 */
878
879#ifndef YY_SKIP_YYWRAP
880#ifdef __cplusplus
881extern "C" int vrml_v1_yywrap (yyscan_t yyscanner );
882#else
883extern int vrml_v1_yywrap (yyscan_t yyscanner );
884#endif
885#endif
886
887 static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
888
889#ifndef yytext_ptr
890static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
891#endif
892
893#ifdef YY_NEED_STRLEN
894static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
895#endif
896
897#ifndef YY_NO_INPUT
898
899#ifdef __cplusplus
900static int yyinput (yyscan_t yyscanner );
901#else
902static int input (yyscan_t yyscanner );
903#endif
904
905#endif
906
907/* Amount of stuff to slurp up with each read. */
908#ifndef YY_READ_BUF_SIZE
909#define YY_READ_BUF_SIZE 8192
910#endif
911
912/* Copy whatever the last rule matched to the standard output. */
913#ifndef ECHO
914/* This used to be an fputs(), but since the string might contain NUL's,
915 * we now use fwrite().
916 */
917#define ECHO fwrite( yytext, yyleng, 1, yyout )
918#endif
919
920/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
921 * is returned in "result".
922 */
923#ifndef YY_INPUT
924#define YY_INPUT(buf,result,max_size) \
925 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
926 { \
927 int c = '*'; \
928 size_t n; \
929 for ( n = 0; n < max_size && \
930 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
931 buf[n] = (char) c; \
932 if ( c == '\n' ) \
933 buf[n++] = (char) c; \
934 if ( c == EOF && ferror( yyin ) ) \
935 YY_FATAL_ERROR( "input in flex scanner failed" ); \
936 result = n; \
937 } \
938 else \
939 { \
940 errno=0; \
941 while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
942 { \
943 if( errno != EINTR) \
944 { \
945 YY_FATAL_ERROR( "input in flex scanner failed" ); \
946 break; \
947 } \
948 errno=0; \
949 clearerr(yyin); \
950 } \
951 }\
952\
953
954#endif
955
956/* No semi-colon after return; correct usage is to write "yyterminate();" -
957 * we don't want an extra ';' after the "return" because that will cause
958 * some compilers to complain about unreachable statements.
959 */
960#ifndef yyterminate
961#define yyterminate() return YY_NULL
962#endif
963
964/* Number of entries by which start-condition stack grows. */
965#ifndef YY_START_STACK_INCR
966#define YY_START_STACK_INCR 25
967#endif
968
969/* Report a fatal error. */
970#ifndef YY_FATAL_ERROR
971#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner)
972#endif
973
974/* end tables serialization structures and prototypes */
975
976/* Default declaration of generated scanner - a define so the user can
977 * easily add parameters.
978 */
979#ifndef YY_DECL
980#define YY_DECL_IS_OURS 1
981
982extern int vrml_v1_yylex (yyscan_t yyscanner);
983
984#define YY_DECL int vrml_v1_yylex (yyscan_t yyscanner)
985#endif /* !YY_DECL */
986
987/* Code executed at the beginning of each rule, after yytext and yyleng
988 * have been set up.
989 */
990#ifndef YY_USER_ACTION
991#define YY_USER_ACTION
992#endif
993
994/* Code executed at the end of each rule. */
995#ifndef YY_BREAK
996#define YY_BREAK break;
997#endif
998
999#define YY_RULE_SETUP \
1000 if ( yyleng > 0 ) \
1001 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
1002 (yytext[yyleng - 1] == '\n'); \
1003 YY_USER_ACTION
1004
1005/** The main scanner function which does all the work.
1006 */
1007YY_DECL
1008{
1009 register yy_state_type yy_current_state;
1010 register char *yy_cp, *yy_bp;
1011 register int yy_act;
1012 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1013
1014#line 86 "imp_vrml_v1.l"
1015
1016 G3DObject *object = NULL;
1017 G3DFace *face;
1018 G3DMaterial *material = NULL;
1019 guint32 level = 0, off, otype = 0, sep_level = 0;
1020 guint32 ohasmtrx = 0;
1021 guint32 faceidx = 0, faceidxbuf[128];
1022 guint32 matidx = 0;
1023 gint32 tmps32, i;
1024 G3DFloat matrix[16];
1025
1026#line 1027 "imp_vrml_v1.c"
1027
1028 if ( !yyg->yy_init )
1029 {
1030 yyg->yy_init = 1;
1031
1032#ifdef YY_USER_INIT
1033 YY_USER_INIT;
1034#endif
1035
1036 /* Create the reject buffer large enough to save one state per allowed character. */
1037 if ( ! yyg->yy_state_buf )
1038 yyg->yy_state_buf = (yy_state_type *)vrml_v1_yyalloc(YY_STATE_BUF_SIZE ,yyscanner);
1039 if ( ! yyg->yy_state_buf )
1040 YY_FATAL_ERROR( "out of dynamic memory in vrml_v1_yylex()" );
1041
1042 if ( ! yyg->yy_start )
1043 yyg->yy_start = 1; /* first start state */
1044
1045 if ( ! yyin )
1046 yyin = stdin;
1047
1048 if ( ! yyout )
1049 yyout = stdout;
1050
1051 if ( ! YY_CURRENT_BUFFER ) {
1052 vrml_v1_yyensure_buffer_stack (yyscanner);
1053 YY_CURRENT_BUFFER_LVALUE =
1054 vrml_v1_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
1055 }
1056
1057 vrml_v1_yy_load_buffer_state(yyscanner );
1058 }
1059
1060 while ( 1 ) /* loops until end-of-file is reached */
1061 {
1062 yy_cp = yyg->yy_c_buf_p;
1063
1064 /* Support of yytext. */
1065 *yy_cp = yyg->yy_hold_char;
1066
1067 /* yy_bp points to the position in yy_ch_buf of the start of
1068 * the current run.
1069 */
1070 yy_bp = yy_cp;
1071
1072 yy_current_state = yyg->yy_start;
1073 yy_current_state += YY_AT_BOL();
1074
1075 yyg->yy_state_ptr = yyg->yy_state_buf;
1076 *yyg->yy_state_ptr++ = yy_current_state;
1077
1078yy_match:
1079 do
1080 {
1081 register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1082 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1083 {
1084 yy_current_state = (int) yy_def[yy_current_state];
1085 if ( yy_current_state >= 275 )
1086 yy_c = yy_meta[(unsigned int) yy_c];
1087 }
1088 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1089 *yyg->yy_state_ptr++ = yy_current_state;
1090 ++yy_cp;
1091 }
1092 while ( yy_base[yy_current_state] != 620 );
1093
1094yy_find_action:
1095 yy_current_state = *--yyg->yy_state_ptr;
1096 yyg->yy_lp = yy_accept[yy_current_state];
1097find_rule: /* we branch to this label when backing up */
1098 for ( ; ; ) /* until we find what rule we matched */
1099 {
1100 if ( yyg->yy_lp && yyg->yy_lp < yy_accept[yy_current_state + 1] )
1101 {
1102 yy_act = yy_acclist[yyg->yy_lp];
1103 if ( yy_act & YY_TRAILING_HEAD_MASK ||
1104 yyg->yy_looking_for_trail_begin )
1105 {
1106 if ( yy_act == yyg->yy_looking_for_trail_begin )
1107 {
1108 yyg->yy_looking_for_trail_begin = 0;
1109 yy_act &= ~YY_TRAILING_HEAD_MASK;
1110 break;
1111 }
1112 }
1113 else if ( yy_act & YY_TRAILING_MASK )
1114 {
1115 yyg->yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK;
1116 yyg->yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK;
1117 }
1118 else
1119 {
1120 yyg->yy_full_match = yy_cp;
1121 yyg->yy_full_state = yyg->yy_state_ptr;
1122 yyg->yy_full_lp = yyg->yy_lp;
1123 break;
1124 }
1125 ++yyg->yy_lp;
1126 goto find_rule;
1127 }
1128 --yy_cp;
1129 yy_current_state = *--yyg->yy_state_ptr;
1130 yyg->yy_lp = yy_accept[yy_current_state];
1131 }
1132
1133 YY_DO_BEFORE_ACTION;
1134
1135do_action: /* This label is used only to access EOF actions. */
1136
1137 switch ( yy_act )
1138 { /* beginning of action switch */
1139case 1:
1140YY_RULE_SETUP
1141#line 97 "imp_vrml_v1.l"
1142{
1143 BEGIN COMMENT;
1144}
1145 YY_BREAK
1146case 2:
1147*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1148yyg->yy_c_buf_p = yy_cp = yy_bp + 5;
1149YY_DO_BEFORE_ACTION; /* set up yytext again */
1150YY_RULE_SETUP
1151#line 101 "imp_vrml_v1.l"
1152{
1153 /* magic header */
1154 #if DEBUG > 0
1155 g_debug("VRML: got header");
1156 #endif
1157 BEGIN VRMLHEADER;
1158}
1159 YY_BREAK
1160case 3:
1161YY_RULE_SETUP
1162#line 109 "imp_vrml_v1.l"
1163{
1164 #if DEBUG > 0
1165 g_debug("VRML: version %s", yytext + 1);
1166 #endif
1167}
1168 YY_BREAK
1169case 4:
1170YY_RULE_SETUP
1171#line 115 "imp_vrml_v1.l"
1172/* */
1173 YY_BREAK
1174case 5:
1175/* rule 5 can match eol */
1176YY_RULE_SETUP
1177#line 117 "imp_vrml_v1.l"
1178{
1179 BEGIN INITIAL;
1180}
1181 YY_BREAK
1182case 6:
1183YY_RULE_SETUP
1184#line 121 "imp_vrml_v1.l"
1185{
1186 #if DEBUG > 0
1187 g_debug("COMMENT: %s", yytext);
1188 #endif
1189}
1190 YY_BREAK
1191case 7:
1192/* rule 7 can match eol */
1193YY_RULE_SETUP
1194#line 127 "imp_vrml_v1.l"
1195{
1196 BEGIN INITIAL;
1197}
1198 YY_BREAK
1199case 8:
1200*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1201yyg->yy_c_buf_p = yy_cp = yy_bp + 9;
1202YY_DO_BEFORE_ACTION; /* set up yytext again */
1203YY_RULE_SETUP
1204#line 131 "imp_vrml_v1.l"
1205{
1206 vrml_dump_hier(level, "Separator");
1207 if((object == NULL) || (object->vertex_count == 0))
1208 {
1209 object = g_new0(G3DObject, 1);
1210 ((G3DModel *)yyextra)->objects = g_slist_append(
1211 ((G3DModel *)yyextra)->objects, object);
1212 sep_level = level;
1213 ohasmtrx = 0;
1214 }
1215}
1216 YY_BREAK
1217case 9:
1218/* rule 9 can match eol */
1219*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1220yyg->yy_c_buf_p = yy_cp = yy_bp + 5;
1221YY_DO_BEFORE_ACTION; /* set up yytext again */
1222YY_RULE_SETUP
1223#line 143 "imp_vrml_v1.l"
1224{
1225 vrml_dump_hier(level, "Group");
1226}
1227 YY_BREAK
1228case 10:
1229*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1230yyg->yy_c_buf_p = yy_cp = yy_bp + 8;
1231YY_DO_BEFORE_ACTION; /* set up yytext again */
1232YY_RULE_SETUP
1233#line 147 "imp_vrml_v1.l"
1234{
1235 vrml_dump_hier(level, "Material");
1236 if(object)
1237 {
1238 material = g3d_material_new();
1239 material->name = g_strdup("object material");
1240 object->materials = g_slist_append(object->materials, material);
1241 }
1242 otype = VRML_OTYPE_MAT;
1243}
1244 YY_BREAK
1245case 11:
1246/* rule 11 can match eol */
1247*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1248yyg->yy_c_buf_p = yy_cp = yy_bp + 15;
1249YY_DO_BEFORE_ACTION; /* set up yytext again */
1250YY_RULE_SETUP
1251#line 158 "imp_vrml_v1.l"
1252{
1253 vrml_dump_hier(level, "MatrixTransform");
1254 otype = VRML_OTYPE_MTRANS;
1255}
1256 YY_BREAK
1257case 12:
1258*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1259yyg->yy_c_buf_p = yy_cp = yy_bp + 11;
1260YY_DO_BEFORE_ACTION; /* set up yytext again */
1261YY_RULE_SETUP
1262#line 163 "imp_vrml_v1.l"
1263{
1264 vrml_dump_hier(level, "Coordinate3");
1265 if(!object)
1266 {
1267 object = g_new0(G3DObject, 1);
1268 object->name = g_strdup("VRML 1 object");
1269 ((G3DModel *)yyextra)->objects = g_slist_append(
1270 ((G3DModel *)yyextra)->objects, object);
1271 ohasmtrx = 0;
1272 }
1273 otype = VRML_OTYPE_COORD3;
1274}
1275 YY_BREAK
1276case 13:
1277*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1278yyg->yy_c_buf_p = yy_cp = yy_bp + 14;
1279YY_DO_BEFORE_ACTION; /* set up yytext again */
1280YY_RULE_SETUP
1281#line 176 "imp_vrml_v1.l"
1282{
1283 vrml_dump_hier(level, "IndexedFaceSet");
1284 otype = VRML_OTYPE_IDXFACESET;
1285}
1286 YY_BREAK
1287case 14:
1288*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1289yyg->yy_c_buf_p = yy_cp -= 1;
1290YY_DO_BEFORE_ACTION; /* set up yytext again */
1291YY_RULE_SETUP
1292#line 181 "imp_vrml_v1.l"
1293{
1294 #if DEBUG > 3
1295 g_debug("# (0x%04x) %s", otype, yytext);
1296 #endif
1297 if((otype & 0xFF00) == VRML_OTYPE_MAT)
1298 {
1299 if(object == NULL) continue;
1300 material = g_slist_nth_data(object->materials, matidx);
1301 if(material == NULL)
1302 {
1303 material = g3d_material_new();
1304 material->name = g_strdup_printf("material #%d", matidx);
1305 object->materials = g_slist_append(object->materials, material);
1306 }
1307 matidx ++;
1308 switch(otype)
1309 {
1310 case VRML_OTYPE_MAT_DIFFUSECOLOR:
1311 if(sscanf(yytext, "%f%f%f",
1312 &(material->r), &(material->g), &(material->b)) != 3)
1313 {
1314 #if DEBUG > 0
1315 g_debug("VRML1: failed to get ambient color");
1316 #endif
1317 }
1318 break;
1319
1320 default:
1321 #if DEBUG > 0
1322 g_debug("VRML: unhandled material property: 0x%02x (%s)",
1323 otype, yytext);
1324 #endif
1325 break;
1326 }
1327 }
1328 else if(otype == VRML_OTYPE_COORD3_POINT)
1329 {
1330 off = object->vertex_count;
1331 object->vertex_count ++;
1332 object->vertex_data = g_realloc(object->vertex_data,
1333 object->vertex_count * 3 * sizeof(G3DFloat));
1334
1335 #if DEBUG > 3
1336 g_debug("VRML: object vertex count: %d", object->vertex_count);
1337 #endif
1338
1339 if(sscanf(yytext, "%f%f%f",
1340 &(object->vertex_data[off * 3 + 0]),
1341 &(object->vertex_data[off * 3 + 1]),
1342 &(object->vertex_data[off * 3 + 2])) != 3)
1343 {
1344 g_warning("VRML: failed to read vertex (%s)\n", yytext);
1345 }
1346 else
1347 {
1348 #if DEBUG > 3
1349 if((object->vertex_data[off * 3 + 0] == 0.0) ||
1350 (object->vertex_data[off * 3 + 1] == 0.0) ||
1351 (object->vertex_data[off * 3 + 2] == 0.0))
1352 {
1353 g_debug("VRML1: 0.0: %+2.2f %+2.2f %+2.2f (%s)",
1354 object->vertex_data[off * 3 + 0],
1355 object->vertex_data[off * 3 + 1],
1356 object->vertex_data[off * 3 + 2],
1357 yytext);
1358 }
1359 #endif
1360 if(ohasmtrx)
1361 g3d_vector_transform(
1362 &(object->vertex_data[off * 3 + 0]),
1363 &(object->vertex_data[off * 3 + 1]),
1364 &(object->vertex_data[off * 3 + 2]),
1365 matrix);
1366 }
1367 }
1368 else if(otype == VRML_OTYPE_IDXFACESET_COORDIDX)
1369 {
1370 sscanf(yytext, "%i", &tmps32);
1371 if(tmps32 == -1)
1372 {
1373 if(object == NULL) continue;
1374
1375 face = g_new0(G3DFace, 1);
1376 face->material = material;
1377 if(face->material == NULL)
1378 face->material = g_slist_nth_data(
1379 object->materials, 0);
1380 if(face->material == NULL)
1381 face->material = g_slist_nth_data(
1382 ((G3DModel *)yyextra)->materials, 0);
1383 face->vertex_count = faceidx;
1384 face->vertex_indices = g_new0(guint32, face->vertex_count);
1385 for(i = 0; i < face->vertex_count; i ++)
1386 {
1387 if(faceidxbuf[i] >= object->vertex_count)
1388 {
1389 g_debug("VRML: Face: index %d >= vertex count (%d)",
1390 faceidxbuf[i], object->vertex_count);
1391 }
1392 else
1393 {
1394 face->vertex_indices[i] = faceidxbuf[i];
1395 }
1396 }
1397
1398 if(face->vertex_count >= 3)
1399 object->faces = g_slist_prepend(object->faces, face);
1400 faceidx = 0;
1401 }
1402 else
1403 {
1404 #if DEBUG > 3
1405 if(tmps32 == 0)
1406 g_debug("VRML1: faceidx 0: %s", yytext);
1407 #endif
1408 faceidxbuf[faceidx] = tmps32;
1409 faceidx ++;
1410 }
1411 }
1412 else if(otype == VRML_OTYPE_IDXFACESET_MATIDX)
1413 {
1414 i = atoi(yytext);
1415 #if DEBUG > 3
1416 g_debug("VRML1: looking for object material #%d", i);
1417 #endif
1418 material = g_slist_nth_data(object->materials, i);
1419 if(material)
1420 {
1421 #if DEBUG > 3
1422 g_debug("VRML1: got material to update");
1423 #endif
1424 face = g_slist_nth_data(object->faces, faceidx);
1425 if(face)
1426 {
1427 face->material = material;
1428 #if DEBUG > 1
1429 g_debug("VRML1: updating material of face #%d", faceidx);
1430 #endif
1431 }
1432 }
1433 faceidx ++;
1434 }
1435}
1436 YY_BREAK
1437case 15:
1438/* rule 15 can match eol */
1439YY_RULE_SETUP
1440#line 325 "imp_vrml_v1.l"
1441{
1442 if(otype == VRML_OTYPE_MTRANS_MATRIX)
1443 {
1444 if(sscanf(yytext, "%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f%f",
1445 &matrix[0 * 4 + 0],
1446 &matrix[0 * 4 + 1],
1447 &matrix[0 * 4 + 2],
1448 &matrix[0 * 4 + 3],
1449
1450 &matrix[1 * 4 + 0],
1451 &matrix[1 * 4 + 1],
1452 &matrix[1 * 4 + 2],
1453 &matrix[1 * 4 + 3],
1454
1455 &matrix[2 * 4 + 0],
1456 &matrix[2 * 4 + 1],
1457 &matrix[2 * 4 + 2],
1458 &matrix[2 * 4 + 3],
1459
1460 &matrix[3 * 4 + 0],
1461 &matrix[3 * 4 + 1],
1462 &matrix[3 * 4 + 2],
1463 &matrix[3 * 4 + 3]) != 16)
1464 {
1465 g_warning("VRML: failed to read matrix line (%s)", yytext);
1466 }
1467 }
1468}
1469 YY_BREAK
1470case 16:
1471/* rule 16 can match eol */
1472*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1473yyg->yy_c_buf_p = yy_cp = yy_bp + 12;
1474YY_DO_BEFORE_ACTION; /* set up yytext again */
1475YY_RULE_SETUP
1476#line 354 "imp_vrml_v1.l"
1477{
1478 otype = VRML_OTYPE_MAT_AMBIENTCOLOR;
1479}
1480 YY_BREAK
1481case 17:
1482/* rule 17 can match eol */
1483*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1484yyg->yy_c_buf_p = yy_cp = yy_bp + 12;
1485YY_DO_BEFORE_ACTION; /* set up yytext again */
1486YY_RULE_SETUP
1487#line 358 "imp_vrml_v1.l"
1488{
1489 otype = VRML_OTYPE_MAT_DIFFUSECOLOR;
1490}
1491 YY_BREAK
1492case 18:
1493/* rule 18 can match eol */
1494*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1495yyg->yy_c_buf_p = yy_cp = yy_bp + 13;
1496YY_DO_BEFORE_ACTION; /* set up yytext again */
1497YY_RULE_SETUP
1498#line 362 "imp_vrml_v1.l"
1499{
1500 otype = VRML_OTYPE_MAT_SPECULARCOLOR;
1501}
1502 YY_BREAK
1503case 19:
1504/* rule 19 can match eol */
1505*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1506yyg->yy_c_buf_p = yy_cp = yy_bp + 13;
1507YY_DO_BEFORE_ACTION; /* set up yytext again */
1508YY_RULE_SETUP
1509#line 366 "imp_vrml_v1.l"
1510{
1511 otype = VRML_OTYPE_MAT_EMISSIVECOLOR;
1512}
1513 YY_BREAK
1514case 20:
1515/* rule 20 can match eol */
1516*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1517yyg->yy_c_buf_p = yy_cp = yy_bp + 9;
1518YY_DO_BEFORE_ACTION; /* set up yytext again */
1519YY_RULE_SETUP
1520#line 370 "imp_vrml_v1.l"
1521{
1522 otype = VRML_OTYPE_MAT_SHININESS;
1523}
1524 YY_BREAK
1525case 21:
1526/* rule 21 can match eol */
1527*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1528yyg->yy_c_buf_p = yy_cp = yy_bp + 12;
1529YY_DO_BEFORE_ACTION; /* set up yytext again */
1530YY_RULE_SETUP
1531#line 374 "imp_vrml_v1.l"
1532{
1533 otype = VRML_OTYPE_MAT_TRANSPARENCY;
1534}
1535 YY_BREAK
1536case 22:
1537/* rule 22 can match eol */
1538*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1539yyg->yy_c_buf_p = yy_cp = yy_bp + 5;
1540YY_DO_BEFORE_ACTION; /* set up yytext again */
1541YY_RULE_SETUP
1542#line 378 "imp_vrml_v1.l"
1543{
1544 otype = VRML_OTYPE_COORD3_POINT;
1545}
1546 YY_BREAK
1547case 23:
1548/* rule 23 can match eol */
1549*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1550yyg->yy_c_buf_p = yy_cp = yy_bp + 10;
1551YY_DO_BEFORE_ACTION; /* set up yytext again */
1552YY_RULE_SETUP
1553#line 382 "imp_vrml_v1.l"
1554{
1555 if(otype == VRML_OTYPE_IDXFACESET)
1556 otype = VRML_OTYPE_IDXFACESET_COORDIDX;
1557}
1558 YY_BREAK
1559case 24:
1560/* rule 24 can match eol */
1561*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */
1562yyg->yy_c_buf_p = yy_cp = yy_bp + 13;
1563YY_DO_BEFORE_ACTION; /* set up yytext again */
1564YY_RULE_SETUP
1565#line 387 "imp_vrml_v1.l"
1566{
1567 #if DEBUG > 0
1568 g_debug("VRML1: materialIndex");
1569 #endif
1570 /*if(otype == VRML_OTYPE_IDXFACESET)*/
1571 otype = VRML_OTYPE_IDXFACESET_MATIDX;
1572}
1573 YY_BREAK
1574case 25:
1575YY_RULE_SETUP
1576#line 395 "imp_vrml_v1.l"
1577{
1578 if(otype == VRML_OTYPE_MTRANS)
1579 {
1580 otype = VRML_OTYPE_MTRANS_MATRIX;
1581 ohasmtrx = 1;
1582 }
1583}
1584 YY_BREAK
1585case 26:
1586YY_RULE_SETUP
1587#line 403 "imp_vrml_v1.l"
1588{
1589 /* set to parent object */
1590 otype &= 0xFF00;
1591 matidx = 0;
1592 faceidx = 0;
1593}
1594 YY_BREAK
1595case 27:
1596YY_RULE_SETUP
1597#line 410 "imp_vrml_v1.l"
1598{
1599 vrml_dump_hier(level, yytext);
1600}
1601 YY_BREAK
1602case 28:
1603YY_RULE_SETUP
1604#line 414 "imp_vrml_v1.l"
1605{
1606 level ++;
1607}
1608 YY_BREAK
1609case 29:
1610YY_RULE_SETUP
1611#line 418 "imp_vrml_v1.l"
1612{
1613 #if DEBUG > 3
1614 g_debug("}");
1615 #endif
1616 level --;
1617
1618 if(material)
1619 material = NULL;
1620
1621 if(object && (sep_level == level))
1622 {
1623 object = NULL;
1624 }
1625
1626 /* reset object type */
1627 otype = 0x0000;
1628}
1629 YY_BREAK
1630case 30:
1631YY_RULE_SETUP
1632#line 436 "imp_vrml_v1.l"
1633/* */
1634 YY_BREAK
1635case 31:
1636/* rule 31 can match eol */
1637YY_RULE_SETUP
1638#line 437 "imp_vrml_v1.l"
1639/* */
1640 YY_BREAK
1641case YY_STATE_EOF(INITIAL):
1642case YY_STATE_EOF(VRMLHEADER):
1643case YY_STATE_EOF(COMMENT):
1644#line 439 "imp_vrml_v1.l"
1645{
1646 yyterminate();
1647}
1648 YY_BREAK
1649case 32:
1650YY_RULE_SETUP
1651#line 443 "imp_vrml_v1.l"
1652YY_FATAL_ERROR( "flex scanner jammed" );
1653 YY_BREAK
1654#line 1655 "imp_vrml_v1.c"
1655
1656 case YY_END_OF_BUFFER:
1657 {
1658 /* Amount of text matched not including the EOB char. */
1659 int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1;
1660
1661 /* Undo the effects of YY_DO_BEFORE_ACTION. */
1662 *yy_cp = yyg->yy_hold_char;
1663 YY_RESTORE_YY_MORE_OFFSET
1664
1665 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
1666 {
1667 /* We're scanning a new file or input source. It's
1668 * possible that this happened because the user
1669 * just pointed yyin at a new source and called
1670 * vrml_v1_yylex(). If so, then we have to assure
1671 * consistency between YY_CURRENT_BUFFER and our
1672 * globals. Here is the right place to do so, because
1673 * this is the first action (other than possibly a
1674 * back-up) that will match for the new input source.
1675 */
1676 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
1677 YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
1678 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
1679 }
1680
1681 /* Note that here we test for yy_c_buf_p "<=" to the position
1682 * of the first EOB in the buffer, since yy_c_buf_p will
1683 * already have been incremented past the NUL character
1684 * (since all states make transitions on EOB to the
1685 * end-of-buffer state). Contrast this with the test
1686 * in input().
1687 */
1688 if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
1689 { /* This was really a NUL. */
1690 yy_state_type yy_next_state;
1691
1692 yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
1693
1694 yy_current_state = yy_get_previous_state( yyscanner );
1695
1696 /* Okay, we're now positioned to make the NUL
1697 * transition. We couldn't have
1698 * yy_get_previous_state() go ahead and do it
1699 * for us because it doesn't know how to deal
1700 * with the possibility of jamming (and we don't
1701 * want to build jamming into it because then it
1702 * will run more slowly).
1703 */
1704
1705 yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
1706
1707 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1708
1709 if ( yy_next_state )
1710 {
1711 /* Consume the NUL. */
1712 yy_cp = ++yyg->yy_c_buf_p;
1713 yy_current_state = yy_next_state;
1714 goto yy_match;
1715 }
1716
1717 else
1718 {
1719 yy_cp = yyg->yy_c_buf_p;
1720 goto yy_find_action;
1721 }
1722 }
1723
1724 else switch ( yy_get_next_buffer( yyscanner ) )
1725 {
1726 case EOB_ACT_END_OF_FILE:
1727 {
1728 yyg->yy_did_buffer_switch_on_eof = 0;
1729
1730 if ( vrml_v1_yywrap(yyscanner ) )
1731 {
1732 /* Note: because we've taken care in
1733 * yy_get_next_buffer() to have set up
1734 * yytext, we can now set up
1735 * yy_c_buf_p so that if some total
1736 * hoser (like flex itself) wants to
1737 * call the scanner after we return the
1738 * YY_NULL, it'll still work - another
1739 * YY_NULL will get returned.
1740 */
1741 yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ;
1742
1743 yy_act = YY_STATE_EOF(YY_START);
1744 goto do_action;
1745 }
1746
1747 else
1748 {
1749 if ( ! yyg->yy_did_buffer_switch_on_eof )
1750 YY_NEW_FILE;
1751 }
1752 break;
1753 }
1754
1755 case EOB_ACT_CONTINUE_SCAN:
1756 yyg->yy_c_buf_p =
1757 yyg->yytext_ptr + yy_amount_of_matched_text;
1758
1759 yy_current_state = yy_get_previous_state( yyscanner );
1760
1761 yy_cp = yyg->yy_c_buf_p;
1762 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1763 goto yy_match;
1764
1765 case EOB_ACT_LAST_MATCH:
1766 yyg->yy_c_buf_p =
1767 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars];
1768
1769 yy_current_state = yy_get_previous_state( yyscanner );
1770
1771 yy_cp = yyg->yy_c_buf_p;
1772 yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
1773 goto yy_find_action;
1774 }
1775 break;
1776 }
1777
1778 default:
1779 YY_FATAL_ERROR(
1780 "fatal flex scanner internal error--no action found" );
1781 } /* end of action switch */
1782 } /* end of scanning one token */
1783} /* end of vrml_v1_yylex */
1784
1785/* yy_get_next_buffer - try to read in a new buffer
1786 *
1787 * Returns a code representing an action:
1788 * EOB_ACT_LAST_MATCH -
1789 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
1790 * EOB_ACT_END_OF_FILE - end of file
1791 */
1792static int yy_get_next_buffer (yyscan_t yyscanner)
1793{
1794 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1795 register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
1796 register char *source = yyg->yytext_ptr;
1797 register int number_to_move, i;
1798 int ret_val;
1799
1800 if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
1801 YY_FATAL_ERROR(
1802 "fatal flex scanner internal error--end of buffer missed" );
1803
1804 if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
1805 { /* Don't try to fill the buffer, so this is an EOF. */
1806 if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 )
1807 {
1808 /* We matched a single character, the EOB, so
1809 * treat this as a final EOF.
1810 */
1811 return EOB_ACT_END_OF_FILE;
1812 }
1813
1814 else
1815 {
1816 /* We matched some text prior to the EOB, first
1817 * process it.
1818 */
1819 return EOB_ACT_LAST_MATCH;
1820 }
1821 }
1822
1823 /* Try to read more data. */
1824
1825 /* First move last chars to start of buffer. */
1826 number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1;
1827
1828 for ( i = 0; i < number_to_move; ++i )
1829 *(dest++) = *(source++);
1830
1831 if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
1832 /* don't do the read, it's not guaranteed to return an EOF,
1833 * just force an EOF
1834 */
1835 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0;
1836
1837 else
1838 {
1839 int num_to_read =
1840 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1841
1842 while ( num_to_read <= 0 )
1843 { /* Not enough room in the buffer - grow it. */
1844
1845 YY_FATAL_ERROR(
1846"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
1847
1848 }
1849
1850 if ( num_to_read > YY_READ_BUF_SIZE )
1851 num_to_read = YY_READ_BUF_SIZE;
1852
1853 /* Read in more data. */
1854 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1855 yyg->yy_n_chars, (size_t) num_to_read );
1856
1857 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
1858 }
1859
1860 if ( yyg->yy_n_chars == 0 )
1861 {
1862 if ( number_to_move == YY_MORE_ADJ )
1863 {
1864 ret_val = EOB_ACT_END_OF_FILE;
1865 vrml_v1_yyrestart(yyin ,yyscanner);
1866 }
1867
1868 else
1869 {
1870 ret_val = EOB_ACT_LAST_MATCH;
1871 YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
1872 YY_BUFFER_EOF_PENDING;
1873 }
1874 }
1875
1876 else
1877 ret_val = EOB_ACT_CONTINUE_SCAN;
1878
1879 if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
1880 /* Extend the array by 50%, plus the number we really need. */
1881 yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
1882 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) vrml_v1_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
1883 if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1884 YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
1885 }
1886
1887 yyg->yy_n_chars += number_to_move;
1888 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR;
1889 YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
1890
1891 yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
1892
1893 return ret_val;
1894}
1895
1896/* yy_get_previous_state - get the state just before the EOB char was reached */
1897
1898 static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
1899{
1900 register yy_state_type yy_current_state;
1901 register char *yy_cp;
1902 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1903
1904 yy_current_state = yyg->yy_start;
1905 yy_current_state += YY_AT_BOL();
1906
1907 yyg->yy_state_ptr = yyg->yy_state_buf;
1908 *yyg->yy_state_ptr++ = yy_current_state;
1909
1910 for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
1911 {
1912 register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
1913 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1914 {
1915 yy_current_state = (int) yy_def[yy_current_state];
1916 if ( yy_current_state >= 275 )
1917 yy_c = yy_meta[(unsigned int) yy_c];
1918 }
1919 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1920 *yyg->yy_state_ptr++ = yy_current_state;
1921 }
1922
1923 return yy_current_state;
1924}
1925
1926/* yy_try_NUL_trans - try to make a transition on the NUL character
1927 *
1928 * synopsis
1929 * next_state = yy_try_NUL_trans( current_state );
1930 */
1931 static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
1932{
1933 register int yy_is_jam;
1934 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
1935
1936 register YY_CHAR yy_c = 1;
1937 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1938 {
1939 yy_current_state = (int) yy_def[yy_current_state];
1940 if ( yy_current_state >= 275 )
1941 yy_c = yy_meta[(unsigned int) yy_c];
1942 }
1943 yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1944 yy_is_jam = (yy_current_state == 274);
1945 if ( ! yy_is_jam )
1946 *yyg->yy_state_ptr++ = yy_current_state;
1947
1948 return yy_is_jam ? 0 : yy_current_state;
1949}
1950
1951 static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
1952{
1953 register char *yy_cp;
1954 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1955
1956 yy_cp = yyg->yy_c_buf_p;
1957
1958 /* undo effects of setting up yytext */
1959 *yy_cp = yyg->yy_hold_char;
1960
1961 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1962 { /* need to shift things up to make room */
1963 /* +2 for EOB chars. */
1964 register int number_to_move = yyg->yy_n_chars + 2;
1965 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
1966 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
1967 register char *source =
1968 &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
1969
1970 while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
1971 *--dest = *--source;
1972
1973 yy_cp += (int) (dest - source);
1974 yy_bp += (int) (dest - source);
1975 YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
1976 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
1977
1978 if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
1979 YY_FATAL_ERROR( "flex scanner push-back overflow" );
1980 }
1981
1982 *--yy_cp = (char) c;
1983
1984 yyg->yytext_ptr = yy_bp;
1985 yyg->yy_hold_char = *yy_cp;
1986 yyg->yy_c_buf_p = yy_cp;
1987}
1988
1989#ifndef YY_NO_INPUT
1990#ifdef __cplusplus
1991 static int yyinput (yyscan_t yyscanner)
1992#else
1993 static int input (yyscan_t yyscanner)
1994#endif
1995
1996{
1997 int c;
1998 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
1999
2000 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2001
2002 if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
2003 {
2004 /* yy_c_buf_p now points to the character we want to return.
2005 * If this occurs *before* the EOB characters, then it's a
2006 * valid NUL; if not, then we've hit the end of the buffer.
2007 */
2008 if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] )
2009 /* This was really a NUL. */
2010 *yyg->yy_c_buf_p = '\0';
2011
2012 else
2013 { /* need more input */
2014 int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
2015 ++yyg->yy_c_buf_p;
2016
2017 switch ( yy_get_next_buffer( yyscanner ) )
2018 {
2019 case EOB_ACT_LAST_MATCH:
2020 /* This happens because yy_g_n_b()
2021 * sees that we've accumulated a
2022 * token and flags that we need to
2023 * try matching the token before
2024 * proceeding. But for input(),
2025 * there's no matching to consider.
2026 * So convert the EOB_ACT_LAST_MATCH
2027 * to EOB_ACT_END_OF_FILE.
2028 */
2029
2030 /* Reset buffer status. */
2031 vrml_v1_yyrestart(yyin ,yyscanner);
2032
2033 /*FALLTHROUGH*/
2034
2035 case EOB_ACT_END_OF_FILE:
2036 {
2037 if ( vrml_v1_yywrap(yyscanner ) )
2038 return EOF;
2039
2040 if ( ! yyg->yy_did_buffer_switch_on_eof )
2041 YY_NEW_FILE;
2042#ifdef __cplusplus
2043 return yyinput(yyscanner);
2044#else
2045 return input(yyscanner);
2046#endif
2047 }
2048
2049 case EOB_ACT_CONTINUE_SCAN:
2050 yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
2051 break;
2052 }
2053 }
2054 }
2055
2056 c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */
2057 *yyg->yy_c_buf_p = '\0'; /* preserve yytext */
2058 yyg->yy_hold_char = *++yyg->yy_c_buf_p;
2059
2060 YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
2061
2062 return c;
2063}
2064#endif /* ifndef YY_NO_INPUT */
2065
2066/** Immediately switch to a different input stream.
2067 * @param input_file A readable stream.
2068 * @param yyscanner The scanner object.
2069 * @note This function does not reset the start condition to @c INITIAL .
2070 */
2071 void vrml_v1_yyrestart (FILE * input_file , yyscan_t yyscanner)
2072{
2073 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2074
2075 if ( ! YY_CURRENT_BUFFER ){
2076 vrml_v1_yyensure_buffer_stack (yyscanner);
2077 YY_CURRENT_BUFFER_LVALUE =
2078 vrml_v1_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
2079 }
2080
2081 vrml_v1_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
2082 vrml_v1_yy_load_buffer_state(yyscanner );
2083}
2084
2085/** Switch to a different input buffer.
2086 * @param new_buffer The new input buffer.
2087 * @param yyscanner The scanner object.
2088 */
2089 void vrml_v1_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2090{
2091 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2092
2093 /* TODO. We should be able to replace this entire function body
2094 * with
2095 * vrml_v1_yypop_buffer_state();
2096 * vrml_v1_yypush_buffer_state(new_buffer);
2097 */
2098 vrml_v1_yyensure_buffer_stack (yyscanner);
2099 if ( YY_CURRENT_BUFFER == new_buffer )
2100 return;
2101
2102 if ( YY_CURRENT_BUFFER )
2103 {
2104 /* Flush out information for old buffer. */
2105 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2106 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2107 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2108 }
2109
2110 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2111 vrml_v1_yy_load_buffer_state(yyscanner );
2112
2113 /* We don't actually know whether we did this switch during
2114 * EOF (vrml_v1_yywrap()) processing, but the only time this flag
2115 * is looked at is after vrml_v1_yywrap() is called, so it's safe
2116 * to go ahead and always set it.
2117 */
2118 yyg->yy_did_buffer_switch_on_eof = 1;
2119}
2120
2121static void vrml_v1_yy_load_buffer_state (yyscan_t yyscanner)
2122{
2123 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2124 yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2125 yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
2126 yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
2127 yyg->yy_hold_char = *yyg->yy_c_buf_p;
2128}
2129
2130/** Allocate and initialize an input buffer state.
2131 * @param file A readable stream.
2132 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
2133 * @param yyscanner The scanner object.
2134 * @return the allocated buffer state.
2135 */
2136 YY_BUFFER_STATE vrml_v1_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner)
2137{
2138 YY_BUFFER_STATE b;
2139
2140 b = (YY_BUFFER_STATE) vrml_v1_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2141 if ( ! b )
2142 YY_FATAL_ERROR( "out of dynamic memory in vrml_v1_yy_create_buffer()" );
2143
2144 b->yy_buf_size = size;
2145
2146 /* yy_ch_buf has to be 2 characters longer than the size given because
2147 * we need to put in 2 end-of-buffer characters.
2148 */
2149 b->yy_ch_buf = (char *) vrml_v1_yyalloc(b->yy_buf_size + 2 ,yyscanner );
2150 if ( ! b->yy_ch_buf )
2151 YY_FATAL_ERROR( "out of dynamic memory in vrml_v1_yy_create_buffer()" );
2152
2153 b->yy_is_our_buffer = 1;
2154
2155 vrml_v1_yy_init_buffer(b,file ,yyscanner);
2156
2157 return b;
2158}
2159
2160/** Destroy the buffer.
2161 * @param b a buffer created with vrml_v1_yy_create_buffer()
2162 * @param yyscanner The scanner object.
2163 */
2164 void vrml_v1_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2165{
2166 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2167
2168 if ( ! b )
2169 return;
2170
2171 if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
2172 YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
2173
2174 if ( b->yy_is_our_buffer )
2175 vrml_v1_yyfree((void *) b->yy_ch_buf ,yyscanner );
2176
2177 vrml_v1_yyfree((void *) b ,yyscanner );
2178}
2179
2180#ifndef __cplusplus
2181extern int isatty (int );
2182#endif /* __cplusplus */
2183
2184/* Initializes or reinitializes a buffer.
2185 * This function is sometimes called more than once on the same buffer,
2186 * such as during a vrml_v1_yyrestart() or at EOF.
2187 */
2188 static void vrml_v1_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
2189
2190{
2191 int oerrno = errno;
2192 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2193
2194 vrml_v1_yy_flush_buffer(b ,yyscanner);
2195
2196 b->yy_input_file = file;
2197 b->yy_fill_buffer = 1;
2198
2199 /* If b is the current buffer, then vrml_v1_yy_init_buffer was _probably_
2200 * called from vrml_v1_yyrestart() or through yy_get_next_buffer.
2201 * In that case, we don't want to reset the lineno or column.
2202 */
2203 if (b != YY_CURRENT_BUFFER){
2204 b->yy_bs_lineno = 1;
2205 b->yy_bs_column = 0;
2206 }
2207
2208 b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
2209
2210 errno = oerrno;
2211}
2212
2213/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
2214 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
2215 * @param yyscanner The scanner object.
2216 */
2217 void vrml_v1_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
2218{
2219 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2220 if ( ! b )
2221 return;
2222
2223 b->yy_n_chars = 0;
2224
2225 /* We always need two end-of-buffer characters. The first causes
2226 * a transition to the end-of-buffer state. The second causes
2227 * a jam in that state.
2228 */
2229 b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
2230 b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
2231
2232 b->yy_buf_pos = &b->yy_ch_buf[0];
2233
2234 b->yy_at_bol = 1;
2235 b->yy_buffer_status = YY_BUFFER_NEW;
2236
2237 if ( b == YY_CURRENT_BUFFER )
2238 vrml_v1_yy_load_buffer_state(yyscanner );
2239}
2240
2241/** Pushes the new state onto the stack. The new state becomes
2242 * the current state. This function will allocate the stack
2243 * if necessary.
2244 * @param new_buffer The new state.
2245 * @param yyscanner The scanner object.
2246 */
2247void vrml_v1_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2248{
2249 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2250 if (new_buffer == NULL)
2251 return;
2252
2253 vrml_v1_yyensure_buffer_stack(yyscanner);
2254
2255 /* This block is copied from vrml_v1_yy_switch_to_buffer. */
2256 if ( YY_CURRENT_BUFFER )
2257 {
2258 /* Flush out information for old buffer. */
2259 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2260 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2261 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2262 }
2263
2264 /* Only push if top exists. Otherwise, replace top. */
2265 if (YY_CURRENT_BUFFER)
2266 yyg->yy_buffer_stack_top++;
2267 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2268
2269 /* copied from vrml_v1_yy_switch_to_buffer. */
2270 vrml_v1_yy_load_buffer_state(yyscanner );
2271 yyg->yy_did_buffer_switch_on_eof = 1;
2272}
2273
2274/** Removes and deletes the top of the stack, if present.
2275 * The next element becomes the new top.
2276 * @param yyscanner The scanner object.
2277 */
2278void vrml_v1_yypop_buffer_state (yyscan_t yyscanner)
2279{
2280 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2281 if (!YY_CURRENT_BUFFER)
2282 return;
2283
2284 vrml_v1_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner);
2285 YY_CURRENT_BUFFER_LVALUE = NULL;
2286 if (yyg->yy_buffer_stack_top > 0)
2287 --yyg->yy_buffer_stack_top;
2288
2289 if (YY_CURRENT_BUFFER) {
2290 vrml_v1_yy_load_buffer_state(yyscanner );
2291 yyg->yy_did_buffer_switch_on_eof = 1;
2292 }
2293}
2294
2295/* Allocates the stack if it does not exist.
2296 * Guarantees space for at least one push.
2297 */
2298static void vrml_v1_yyensure_buffer_stack (yyscan_t yyscanner)
2299{
2300 int num_to_alloc;
2301 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2302
2303 if (!yyg->yy_buffer_stack) {
2304
2305 /* First allocation is just for 2 elements, since we don't know if this
2306 * scanner will even need a stack. We use 2 instead of 1 to avoid an
2307 * immediate realloc on the next call.
2308 */
2309 num_to_alloc = 1;
2310 yyg->yy_buffer_stack = (struct yy_buffer_state**)vrml_v1_yyalloc
2311 (num_to_alloc * sizeof(struct yy_buffer_state*)
2312 , yyscanner);
2313 if ( ! yyg->yy_buffer_stack )
2314 YY_FATAL_ERROR( "out of dynamic memory in vrml_v1_yyensure_buffer_stack()" );
2315
2316 memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
2317
2318 yyg->yy_buffer_stack_max = num_to_alloc;
2319 yyg->yy_buffer_stack_top = 0;
2320 return;
2321 }
2322
2323 if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){
2324
2325 /* Increase the buffer to prepare for a possible push. */
2326 int grow_size = 8 /* arbitrary grow size */;
2327
2328 num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
2329 yyg->yy_buffer_stack = (struct yy_buffer_state**)vrml_v1_yyrealloc
2330 (yyg->yy_buffer_stack,
2331 num_to_alloc * sizeof(struct yy_buffer_state*)
2332 , yyscanner);
2333 if ( ! yyg->yy_buffer_stack )
2334 YY_FATAL_ERROR( "out of dynamic memory in vrml_v1_yyensure_buffer_stack()" );
2335
2336 /* zero only the new slots.*/
2337 memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
2338 yyg->yy_buffer_stack_max = num_to_alloc;
2339 }
2340}
2341
2342/** Setup the input buffer state to scan directly from a user-specified character buffer.
2343 * @param base the character buffer
2344 * @param size the size in bytes of the character buffer
2345 * @param yyscanner The scanner object.
2346 * @return the newly allocated buffer state object.
2347 */
2348YY_BUFFER_STATE vrml_v1_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
2349{
2350 YY_BUFFER_STATE b;
2351
2352 if ( size < 2 ||
2353 base[size-2] != YY_END_OF_BUFFER_CHAR ||
2354 base[size-1] != YY_END_OF_BUFFER_CHAR )
2355 /* They forgot to leave room for the EOB's. */
2356 return 0;
2357
2358 b = (YY_BUFFER_STATE) vrml_v1_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner );
2359 if ( ! b )
2360 YY_FATAL_ERROR( "out of dynamic memory in vrml_v1_yy_scan_buffer()" );
2361
2362 b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
2363 b->yy_buf_pos = b->yy_ch_buf = base;
2364 b->yy_is_our_buffer = 0;
2365 b->yy_input_file = 0;
2366 b->yy_n_chars = b->yy_buf_size;
2367 b->yy_is_interactive = 0;
2368 b->yy_at_bol = 1;
2369 b->yy_fill_buffer = 0;
2370 b->yy_buffer_status = YY_BUFFER_NEW;
2371
2372 vrml_v1_yy_switch_to_buffer(b ,yyscanner );
2373
2374 return b;
2375}
2376
2377/** Setup the input buffer state to scan a string. The next call to vrml_v1_yylex() will
2378 * scan from a @e copy of @a str.
2379 * @param yystr a NUL-terminated string to scan
2380 * @param yyscanner The scanner object.
2381 * @return the newly allocated buffer state object.
2382 * @note If you want to scan bytes that may contain NUL values, then use
2383 * vrml_v1_yy_scan_bytes() instead.
2384 */
2385YY_BUFFER_STATE vrml_v1_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
2386{
2387
2388 return vrml_v1_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner);
2389}
2390
2391/** Setup the input buffer state to scan the given bytes. The next call to vrml_v1_yylex() will
2392 * scan from a @e copy of @a bytes.
2393 * @param bytes the byte buffer to scan
2394 * @param len the number of bytes in the buffer pointed to by @a bytes.
2395 * @param yyscanner The scanner object.
2396 * @return the newly allocated buffer state object.
2397 */
2398YY_BUFFER_STATE vrml_v1_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner)
2399{
2400 YY_BUFFER_STATE b;
2401 char *buf;
2402 yy_size_t n;
2403 int i;
2404
2405 /* Get memory for full buffer, including space for trailing EOB's. */
2406 n = _yybytes_len + 2;
2407 buf = (char *) vrml_v1_yyalloc(n ,yyscanner );
2408 if ( ! buf )
2409 YY_FATAL_ERROR( "out of dynamic memory in vrml_v1_yy_scan_bytes()" );
2410
2411 for ( i = 0; i < _yybytes_len; ++i )
2412 buf[i] = yybytes[i];
2413
2414 buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
2415
2416 b = vrml_v1_yy_scan_buffer(buf,n ,yyscanner);
2417 if ( ! b )
2418 YY_FATAL_ERROR( "bad buffer in vrml_v1_yy_scan_bytes()" );
2419
2420 /* It's okay to grow etc. this buffer, and we should throw it
2421 * away when we're done.
2422 */
2423 b->yy_is_our_buffer = 1;
2424
2425 return b;
2426}
2427
2428#ifndef YY_EXIT_FAILURE
2429#define YY_EXIT_FAILURE 2
2430#endif
2431
2432static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
2433{
2434 (void) fprintf( stderr, "%s\n", msg );
2435 exit( YY_EXIT_FAILURE );
2436}
2437
2438/* Redefine yyless() so it works in section 3 code. */
2439
2440#undef yyless
2441#define yyless(n) \
2442 do \
2443 { \
2444 /* Undo effects of setting up yytext. */ \
2445 int yyless_macro_arg = (n); \
2446 YY_LESS_LINENO(yyless_macro_arg);\
2447 yytext[yyleng] = yyg->yy_hold_char; \
2448 yyg->yy_c_buf_p = yytext + yyless_macro_arg; \
2449 yyg->yy_hold_char = *yyg->yy_c_buf_p; \
2450 *yyg->yy_c_buf_p = '\0'; \
2451 yyleng = yyless_macro_arg; \
2452 } \
2453 while ( 0 )
2454
2455/* Accessor methods (get/set functions) to struct members. */
2456
2457/** Get the user-defined data for this scanner.
2458 * @param yyscanner The scanner object.
2459 */
2460YY_EXTRA_TYPE vrml_v1_yyget_extra (yyscan_t yyscanner)
2461{
2462 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2463 return yyextra;
2464}
2465
2466/** Get the current line number.
2467 * @param yyscanner The scanner object.
2468 */
2469int vrml_v1_yyget_lineno (yyscan_t yyscanner)
2470{
2471 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2472
2473 if (! YY_CURRENT_BUFFER)
2474 return 0;
2475
2476 return yylineno;
2477}
2478
2479/** Get the current column number.
2480 * @param yyscanner The scanner object.
2481 */
2482int vrml_v1_yyget_column (yyscan_t yyscanner)
2483{
2484 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2485
2486 if (! YY_CURRENT_BUFFER)
2487 return 0;
2488
2489 return yycolumn;
2490}
2491
2492/** Get the input stream.
2493 * @param yyscanner The scanner object.
2494 */
2495FILE *vrml_v1_yyget_in (yyscan_t yyscanner)
2496{
2497 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2498 return yyin;
2499}
2500
2501/** Get the output stream.
2502 * @param yyscanner The scanner object.
2503 */
2504FILE *vrml_v1_yyget_out (yyscan_t yyscanner)
2505{
2506 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2507 return yyout;
2508}
2509
2510/** Get the length of the current token.
2511 * @param yyscanner The scanner object.
2512 */
2513int vrml_v1_yyget_leng (yyscan_t yyscanner)
2514{
2515 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2516 return yyleng;
2517}
2518
2519/** Get the current token.
2520 * @param yyscanner The scanner object.
2521 */
2522
2523char *vrml_v1_yyget_text (yyscan_t yyscanner)
2524{
2525 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2526 return yytext;
2527}
2528
2529/** Set the user-defined data. This data is never touched by the scanner.
2530 * @param user_defined The data to be associated with this scanner.
2531 * @param yyscanner The scanner object.
2532 */
2533void vrml_v1_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
2534{
2535 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2536 yyextra = user_defined ;
2537}
2538
2539/** Set the current line number.
2540 * @param line_number
2541 * @param yyscanner The scanner object.
2542 */
2543void vrml_v1_yyset_lineno (int line_number , yyscan_t yyscanner)
2544{
2545 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2546
2547 /* lineno is only valid if an input buffer exists. */
2548 if (! YY_CURRENT_BUFFER )
2549 yy_fatal_error( "vrml_v1_yyset_lineno called with no buffer" , yyscanner);
2550
2551 yylineno = line_number;
2552}
2553
2554/** Set the current column.
2555 * @param line_number
2556 * @param yyscanner The scanner object.
2557 */
2558void vrml_v1_yyset_column (int column_no , yyscan_t yyscanner)
2559{
2560 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2561
2562 /* column is only valid if an input buffer exists. */
2563 if (! YY_CURRENT_BUFFER )
2564 yy_fatal_error( "vrml_v1_yyset_column called with no buffer" , yyscanner);
2565
2566 yycolumn = column_no;
2567}
2568
2569/** Set the input stream. This does not discard the current
2570 * input buffer.
2571 * @param in_str A readable stream.
2572 * @param yyscanner The scanner object.
2573 * @see vrml_v1_yy_switch_to_buffer
2574 */
2575void vrml_v1_yyset_in (FILE * in_str , yyscan_t yyscanner)
2576{
2577 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2578 yyin = in_str ;
2579}
2580
2581void vrml_v1_yyset_out (FILE * out_str , yyscan_t yyscanner)
2582{
2583 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2584 yyout = out_str ;
2585}
2586
2587int vrml_v1_yyget_debug (yyscan_t yyscanner)
2588{
2589 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2590 return yy_flex_debug;
2591}
2592
2593void vrml_v1_yyset_debug (int bdebug , yyscan_t yyscanner)
2594{
2595 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2596 yy_flex_debug = bdebug ;
2597}
2598
2599/* Accessor methods for yylval and yylloc */
2600
2601/* User-visible API */
2602
2603/* vrml_v1_yylex_init is special because it creates the scanner itself, so it is
2604 * the ONLY reentrant function that doesn't take the scanner as the last argument.
2605 * That's why we explicitly handle the declaration, instead of using our macros.
2606 */
2607
2608int vrml_v1_yylex_init(yyscan_t* ptr_yy_globals)
2609
2610{
2611 if (ptr_yy_globals == NULL){
2612 errno = EINVAL;
2613 return 1;
2614 }
2615
2616 *ptr_yy_globals = (yyscan_t) vrml_v1_yyalloc ( sizeof( struct yyguts_t ), NULL );
2617
2618 if (*ptr_yy_globals == NULL){
2619 errno = ENOMEM;
2620 return 1;
2621 }
2622
2623 /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */
2624 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2625
2626 return yy_init_globals ( *ptr_yy_globals );
2627}
2628
2629/* vrml_v1_yylex_init_extra has the same functionality as vrml_v1_yylex_init, but follows the
2630 * convention of taking the scanner as the last argument. Note however, that
2631 * this is a *pointer* to a scanner, as it will be allocated by this call (and
2632 * is the reason, too, why this function also must handle its own declaration).
2633 * The user defined value in the first argument will be available to vrml_v1_yyalloc in
2634 * the yyextra field.
2635 */
2636
2637int vrml_v1_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2638
2639{
2640 struct yyguts_t dummy_yyguts;
2641
2642 vrml_v1_yyset_extra (yy_user_defined, &dummy_yyguts);
2643
2644 if (ptr_yy_globals == NULL){
2645 errno = EINVAL;
2646 return 1;
2647 }
2648
2649 *ptr_yy_globals = (yyscan_t) vrml_v1_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2650
2651 if (*ptr_yy_globals == NULL){
2652 errno = ENOMEM;
2653 return 1;
2654 }
2655
2656 /* By setting to 0xAA, we expose bugs in
2657 yy_init_globals. Leave at 0x00 for releases. */
2658 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2659
2660 vrml_v1_yyset_extra (yy_user_defined, *ptr_yy_globals);
2661
2662 return yy_init_globals ( *ptr_yy_globals );
2663}
2664
2665static int yy_init_globals (yyscan_t yyscanner)
2666{
2667 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2668 /* Initialization is the same as for the non-reentrant scanner.
2669 * This function is called from vrml_v1_yylex_destroy(), so don't allocate here.
2670 */
2671
2672 yyg->yy_buffer_stack = 0;
2673 yyg->yy_buffer_stack_top = 0;
2674 yyg->yy_buffer_stack_max = 0;
2675 yyg->yy_c_buf_p = (char *) 0;
2676 yyg->yy_init = 0;
2677 yyg->yy_start = 0;
2678
2679 yyg->yy_start_stack_ptr = 0;
2680 yyg->yy_start_stack_depth = 0;
2681 yyg->yy_start_stack = NULL;
2682
2683 yyg->yy_state_buf = 0;
2684 yyg->yy_state_ptr = 0;
2685 yyg->yy_full_match = 0;
2686 yyg->yy_lp = 0;
2687
2688/* Defined in main.c */
2689#ifdef YY_STDINIT
2690 yyin = stdin;
2691 yyout = stdout;
2692#else
2693 yyin = (FILE *) 0;
2694 yyout = (FILE *) 0;
2695#endif
2696
2697 /* For future reference: Set errno on error, since we are called by
2698 * vrml_v1_yylex_init()
2699 */
2700 return 0;
2701}
2702
2703/* vrml_v1_yylex_destroy is for both reentrant and non-reentrant scanners. */
2704int vrml_v1_yylex_destroy (yyscan_t yyscanner)
2705{
2706 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2707
2708 /* Pop the buffer stack, destroying each element. */
2709 while(YY_CURRENT_BUFFER){
2710 vrml_v1_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
2711 YY_CURRENT_BUFFER_LVALUE = NULL;
2712 vrml_v1_yypop_buffer_state(yyscanner);
2713 }
2714
2715 /* Destroy the stack itself. */
2716 vrml_v1_yyfree(yyg->yy_buffer_stack ,yyscanner);
2717 yyg->yy_buffer_stack = NULL;
2718
2719 /* Destroy the start condition stack. */
2720 vrml_v1_yyfree(yyg->yy_start_stack ,yyscanner );
2721 yyg->yy_start_stack = NULL;
2722
2723 vrml_v1_yyfree ( yyg->yy_state_buf , yyscanner);
2724 yyg->yy_state_buf = NULL;
2725
2726 /* Reset the globals. This is important in a non-reentrant scanner so the next time
2727 * vrml_v1_yylex() is called, initialization will occur. */
2728 yy_init_globals( yyscanner);
2729
2730 /* Destroy the main struct (reentrant only). */
2731 vrml_v1_yyfree ( yyscanner , yyscanner );
2732 yyscanner = NULL;
2733 return 0;
2734}
2735
2736/*
2737 * Internal utility routines.
2738 */
2739
2740#ifndef yytext_ptr
2741static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
2742{
2743 register int i;
2744 for ( i = 0; i < n; ++i )
2745 s1[i] = s2[i];
2746}
2747#endif
2748
2749#ifdef YY_NEED_STRLEN
2750static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
2751{
2752 register int n;
2753 for ( n = 0; s[n]; ++n )
2754 ;
2755
2756 return n;
2757}
2758#endif
2759
2760void *vrml_v1_yyalloc (yy_size_t size , yyscan_t yyscanner)
2761{
2762 return (void *) malloc( size );
2763}
2764
2765void *vrml_v1_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
2766{
2767 /* The cast to (char *) in the following accommodates both
2768 * implementations that use char* generic pointers, and those
2769 * that use void* generic pointers. It works with the latter
2770 * because both ANSI C and C++ allow castless assignment from
2771 * any pointer type to void*, and deal with argument conversions
2772 * as though doing an assignment.
2773 */
2774 return (void *) realloc( (char *) ptr, size );
2775}
2776
2777void vrml_v1_yyfree (void * ptr , yyscan_t yyscanner)
2778{
2779 free( (char *) ptr ); /* see vrml_v1_yyrealloc() for (char *) cast */
2780}
2781
2782#define YYTABLES_NAME "yytables"
2783
2784#line 443 "imp_vrml_v1.l"
2785
2786
2787
2788
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/imp_vrml_v1.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/imp_vrml_v1.h
new file mode 100644
index 0000000..404f8f6
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml/imp_vrml_v1.h
@@ -0,0 +1,356 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#ifndef vrml_v1_yyHEADER_H
23#define vrml_v1_yyHEADER_H 1
24#define vrml_v1_yyIN_HEADER 1
25
26#line 6 "imp_vrml_v1.h"
27
28#line 8 "imp_vrml_v1.h"
29
30#define YY_INT_ALIGNED short int
31
32/* A lexical scanner generated by flex */
33
34#define FLEX_SCANNER
35#define YY_FLEX_MAJOR_VERSION 2
36#define YY_FLEX_MINOR_VERSION 5
37#define YY_FLEX_SUBMINOR_VERSION 35
38#if YY_FLEX_SUBMINOR_VERSION > 0
39#define FLEX_BETA
40#endif
41
42/* First, we deal with platform-specific or compiler-specific issues. */
43
44/* begin standard C headers. */
45#include <stdio.h>
46#include <string.h>
47#include <errno.h>
48#include <stdlib.h>
49
50/* end standard C headers. */
51
52/* flex integer type definitions */
53
54#ifndef FLEXINT_H
55#define FLEXINT_H
56
57/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
58
59#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
60
61/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
62 * if you want the limit (max/min) macros for int types.
63 */
64#ifndef __STDC_LIMIT_MACROS
65#define __STDC_LIMIT_MACROS 1
66#endif
67
68#include <inttypes.h>
69typedef int8_t flex_int8_t;
70typedef uint8_t flex_uint8_t;
71typedef int16_t flex_int16_t;
72typedef uint16_t flex_uint16_t;
73typedef int32_t flex_int32_t;
74typedef uint32_t flex_uint32_t;
75#else
76typedef signed char flex_int8_t;
77typedef short int flex_int16_t;
78typedef int flex_int32_t;
79typedef unsigned char flex_uint8_t;
80typedef unsigned short int flex_uint16_t;
81typedef unsigned int flex_uint32_t;
82
83/* Limits of integral types. */
84#ifndef INT8_MIN
85#define INT8_MIN (-128)
86#endif
87#ifndef INT16_MIN
88#define INT16_MIN (-32767-1)
89#endif
90#ifndef INT32_MIN
91#define INT32_MIN (-2147483647-1)
92#endif
93#ifndef INT8_MAX
94#define INT8_MAX (127)
95#endif
96#ifndef INT16_MAX
97#define INT16_MAX (32767)
98#endif
99#ifndef INT32_MAX
100#define INT32_MAX (2147483647)
101#endif
102#ifndef UINT8_MAX
103#define UINT8_MAX (255U)
104#endif
105#ifndef UINT16_MAX
106#define UINT16_MAX (65535U)
107#endif
108#ifndef UINT32_MAX
109#define UINT32_MAX (4294967295U)
110#endif
111
112#endif /* ! C99 */
113
114#endif /* ! FLEXINT_H */
115
116#ifdef __cplusplus
117
118/* The "const" storage-class-modifier is valid. */
119#define YY_USE_CONST
120
121#else /* ! __cplusplus */
122
123/* C99 requires __STDC__ to be defined as 1. */
124#if defined (__STDC__)
125
126#define YY_USE_CONST
127
128#endif /* defined (__STDC__) */
129#endif /* ! __cplusplus */
130
131#ifdef YY_USE_CONST
132#define yyconst const
133#else
134#define yyconst
135#endif
136
137/* An opaque pointer. */
138#ifndef YY_TYPEDEF_YY_SCANNER_T
139#define YY_TYPEDEF_YY_SCANNER_T
140typedef void* yyscan_t;
141#endif
142
143/* For convenience, these vars (plus the bison vars far below)
144 are macros in the reentrant scanner. */
145#define yyin yyg->yyin_r
146#define yyout yyg->yyout_r
147#define yyextra yyg->yyextra_r
148#define yyleng yyg->yyleng_r
149#define yytext yyg->yytext_r
150#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno)
151#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column)
152#define yy_flex_debug yyg->yy_flex_debug_r
153
154/* Size of default input buffer. */
155#ifndef YY_BUF_SIZE
156#define YY_BUF_SIZE 16384
157#endif
158
159#ifndef YY_TYPEDEF_YY_BUFFER_STATE
160#define YY_TYPEDEF_YY_BUFFER_STATE
161typedef struct yy_buffer_state *YY_BUFFER_STATE;
162#endif
163
164#ifndef YY_TYPEDEF_YY_SIZE_T
165#define YY_TYPEDEF_YY_SIZE_T
166typedef size_t yy_size_t;
167#endif
168
169#ifndef YY_STRUCT_YY_BUFFER_STATE
170#define YY_STRUCT_YY_BUFFER_STATE
171struct yy_buffer_state
172 {
173 FILE *yy_input_file;
174
175 char *yy_ch_buf; /* input buffer */
176 char *yy_buf_pos; /* current position in input buffer */
177
178 /* Size of input buffer in bytes, not including room for EOB
179 * characters.
180 */
181 yy_size_t yy_buf_size;
182
183 /* Number of characters read into yy_ch_buf, not including EOB
184 * characters.
185 */
186 int yy_n_chars;
187
188 /* Whether we "own" the buffer - i.e., we know we created it,
189 * and can realloc() it to grow it, and should free() it to
190 * delete it.
191 */
192 int yy_is_our_buffer;
193
194 /* Whether this is an "interactive" input source; if so, and
195 * if we're using stdio for input, then we want to use getc()
196 * instead of fread(), to make sure we stop fetching input after
197 * each newline.
198 */
199 int yy_is_interactive;
200
201 /* Whether we're considered to be at the beginning of a line.
202 * If so, '^' rules will be active on the next match, otherwise
203 * not.
204 */
205 int yy_at_bol;
206
207 int yy_bs_lineno; /**< The line count. */
208 int yy_bs_column; /**< The column count. */
209
210 /* Whether to try to fill the input buffer when we reach the
211 * end of it.
212 */
213 int yy_fill_buffer;
214
215 int yy_buffer_status;
216
217 };
218#endif /* !YY_STRUCT_YY_BUFFER_STATE */
219
220void vrml_v1_yyrestart (FILE *input_file ,yyscan_t yyscanner );
221void vrml_v1_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
222YY_BUFFER_STATE vrml_v1_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner );
223void vrml_v1_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
224void vrml_v1_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner );
225void vrml_v1_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner );
226void vrml_v1_yypop_buffer_state (yyscan_t yyscanner );
227
228YY_BUFFER_STATE vrml_v1_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
229YY_BUFFER_STATE vrml_v1_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
230YY_BUFFER_STATE vrml_v1_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
231
232void *vrml_v1_yyalloc (yy_size_t ,yyscan_t yyscanner );
233void *vrml_v1_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
234void vrml_v1_yyfree (void * ,yyscan_t yyscanner );
235
236/* Begin user sect3 */
237
238#define yytext_ptr yytext_r
239
240#ifdef YY_HEADER_EXPORT_START_CONDITIONS
241#define INITIAL 0
242#define VRMLHEADER 1
243#define COMMENT 2
244
245#endif
246
247#ifndef YY_NO_UNISTD_H
248/* Special case for "unistd.h", since it is non-ANSI. We include it way
249 * down here because we want the user's section 1 to have been scanned first.
250 * The user has a chance to override it with an option.
251 */
252#include <unistd.h>
253#endif
254
255#ifndef YY_EXTRA_TYPE
256#define YY_EXTRA_TYPE void *
257#endif
258
259int vrml_v1_yylex_init (yyscan_t* scanner);
260
261int vrml_v1_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
262
263/* Accessor methods to globals.
264 These are made visible to non-reentrant scanners for convenience. */
265
266int vrml_v1_yylex_destroy (yyscan_t yyscanner );
267
268int vrml_v1_yyget_debug (yyscan_t yyscanner );
269
270void vrml_v1_yyset_debug (int debug_flag ,yyscan_t yyscanner );
271
272YY_EXTRA_TYPE vrml_v1_yyget_extra (yyscan_t yyscanner );
273
274void vrml_v1_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner );
275
276FILE *vrml_v1_yyget_in (yyscan_t yyscanner );
277
278void vrml_v1_yyset_in (FILE * in_str ,yyscan_t yyscanner );
279
280FILE *vrml_v1_yyget_out (yyscan_t yyscanner );
281
282void vrml_v1_yyset_out (FILE * out_str ,yyscan_t yyscanner );
283
284int vrml_v1_yyget_leng (yyscan_t yyscanner );
285
286char *vrml_v1_yyget_text (yyscan_t yyscanner );
287
288int vrml_v1_yyget_lineno (yyscan_t yyscanner );
289
290void vrml_v1_yyset_lineno (int line_number ,yyscan_t yyscanner );
291
292/* Macros after this point can all be overridden by user definitions in
293 * section 1.
294 */
295
296#ifndef YY_SKIP_YYWRAP
297#ifdef __cplusplus
298extern "C" int vrml_v1_yywrap (yyscan_t yyscanner );
299#else
300extern int vrml_v1_yywrap (yyscan_t yyscanner );
301#endif
302#endif
303
304#ifndef yytext_ptr
305static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner);
306#endif
307
308#ifdef YY_NEED_STRLEN
309static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner);
310#endif
311
312#ifndef YY_NO_INPUT
313
314#endif
315
316/* Amount of stuff to slurp up with each read. */
317#ifndef YY_READ_BUF_SIZE
318#define YY_READ_BUF_SIZE 8192
319#endif
320
321/* Number of entries by which start-condition stack grows. */
322#ifndef YY_START_STACK_INCR
323#define YY_START_STACK_INCR 25
324#endif
325
326/* Default declaration of generated scanner - a define so the user can
327 * easily add parameters.
328 */
329#ifndef YY_DECL
330#define YY_DECL_IS_OURS 1
331
332extern int vrml_v1_yylex (yyscan_t yyscanner);
333
334#define YY_DECL int vrml_v1_yylex (yyscan_t yyscanner)
335#endif /* !YY_DECL */
336
337/* yy_get_previous_state - get the state just before the EOB char was reached */
338
339#undef YY_NEW_FILE
340#undef YY_FLUSH_BUFFER
341#undef yy_set_bol
342#undef yy_new_buffer
343#undef yy_set_interactive
344#undef YY_DO_BEFORE_ACTION
345
346#ifdef YY_DECL_IS_OURS
347#undef YY_DECL_IS_OURS
348#undef YY_DECL
349#endif
350
351#line 446 "imp_vrml_v1.l"
352
353
354#line 334 "imp_vrml_v1.h"
355#undef vrml_v1_yyIN_HEADER
356#endif /* vrml_v1_yyHEADER_H */
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile
new file mode 100644
index 0000000..a0d2345
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile
@@ -0,0 +1,518 @@
1# Makefile.in generated by automake 1.10.1 from Makefile.am.
2# plugins/import/imp_vrml2/Makefile. Generated from Makefile.in by configure.
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6# This Makefile.in is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
15
16
17
18pkgdatadir = $(datadir)/libg3d
19pkglibdir = $(libdir)/libg3d
20pkgincludedir = $(includedir)/libg3d
21am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
22install_sh_DATA = $(install_sh) -c -m 644
23install_sh_PROGRAM = $(install_sh) -c
24install_sh_SCRIPT = $(install_sh) -c
25INSTALL_HEADER = $(INSTALL_DATA)
26transform = $(program_transform_name)
27NORMAL_INSTALL = :
28PRE_INSTALL = :
29POST_INSTALL = :
30NORMAL_UNINSTALL = :
31PRE_UNINSTALL = :
32POST_UNINSTALL = :
33build_triplet = x86_64-unknown-linux-gnu
34host_triplet = x86_64-unknown-linux-gnu
35subdir = plugins/import/imp_vrml2
36DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
37ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
38am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
39 $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \
40 $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \
41 $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \
42 $(top_srcdir)/configure.in
43am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
44 $(ACLOCAL_M4)
45mkinstalldirs = $(install_sh) -d
46CONFIG_HEADER = $(top_builddir)/include/g3d/config.h
47CONFIG_CLEAN_FILES =
48am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
49am__vpath_adj = case $$p in \
50 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
51 *) f=$$p;; \
52 esac;
53am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
54am__installdirs = "$(DESTDIR)$(pluginimpdir)"
55pluginimpLTLIBRARIES_INSTALL = $(INSTALL)
56LTLIBRARIES = $(pluginimp_LTLIBRARIES)
57imp_vrml2_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la
58am_imp_vrml2_la_OBJECTS = imp_vrml2.lo imp_vrml_read.lo \
59 imp_vrml2_types.lo
60imp_vrml2_la_OBJECTS = $(am_imp_vrml2_la_OBJECTS)
61#am_imp_vrml2_la_rpath = -rpath $(pluginimpdir)
62DEFAULT_INCLUDES = -I. -I$(top_builddir)/include/g3d
63depcomp = $(SHELL) $(top_srcdir)/config/depcomp
64am__depfiles_maybe = depfiles
65COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
66 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
67LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
68 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
69 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
70CCLD = $(CC)
71LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
72 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
73 $(LDFLAGS) -o $@
74SOURCES = $(imp_vrml2_la_SOURCES)
75DIST_SOURCES = $(imp_vrml2_la_SOURCES)
76ETAGS = etags
77CTAGS = ctags
78DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
79ACLOCAL = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run aclocal-1.10
80AMTAR = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run tar
81AR = ar
82AS = as
83AUTOCONF = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoconf
84AUTOHEADER = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run autoheader
85AUTOMAKE = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run automake-1.10
86AWK = gawk
87CC = gcc
88CCDEPMODE = depmode=gcc3
89CFLAGS = -g -O2
90CPP = gcc -E
91CPPFLAGS =
92CXX = g++
93CXXCPP = g++ -E
94CXXDEPMODE = depmode=gcc3
95CXXFLAGS = -g -O2
96CYGPATH_W = echo
97DBG_CFLAGS = -O2
98DEBUG = 0
99DEFS = -DHAVE_CONFIG_H
100DEPDIR = .deps
101DLLTOOL = dlltool
102ECHO = echo
103ECHO_C =
104ECHO_N = -n
105ECHO_T =
106EGREP = /bin/grep -E
107EXEEXT =
108F77 =
109FFLAGS =
110GDKPIXBUF_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
111GDKPIXBUF_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0
112GLIB_CFLAGS = -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
113GLIB_GENMARSHAL = glib-genmarshal
114GLIB_LIBS = -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0
115GLIB_MKENUMS = glib-mkenums
116GOBJECT_QUERY = gobject-query
117GREP = /bin/grep
118GTKDOC_CHECK = /usr/bin/gtkdoc-check
119GTK_CFLAGS = -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
120GTK_LIBS = -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0
121HTML_DIR = ${datadir}/gtk-doc/html
122INSTALL = /usr/bin/install -c
123INSTALL_DATA = ${INSTALL} -m 644
124INSTALL_PROGRAM = ${INSTALL}
125INSTALL_SCRIPT = ${INSTALL}
126INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
127LDFLAGS =
128LEX = flex
129LEXLIB = -lfl
130LEX_OUTPUT_ROOT = lex.yy
131LIBGSF_CFLAGS = -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/libgsf-1
132LIBGSF_LIBS = -lgsf-1 -lgobject-2.0 -lxml2 -lglib-2.0
133LIBOBJS =
134LIBS = -lm
135LIBTOOL = $(SHELL) $(top_builddir)/libtool --quiet
136LIBXML2_CFLAGS = -I/usr/include/libxml2
137LIBXML2_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2
138LN_S = ln -s
139LTLIBOBJS =
140LTVERSION = 0:8:0
141MAGIC_LIBS = -lmagic
142MAKEINFO = ${SHELL} /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/missing --run makeinfo
143MATH_LIBS = -lm
144MKDIR_P = /bin/mkdir -p
145OBJDUMP = objdump
146OBJEXT = o
147PACKAGE = libg3d
148PACKAGE_BUGREPORT =
149PACKAGE_NAME =
150PACKAGE_STRING =
151PACKAGE_TARNAME =
152PACKAGE_VERSION =
153PATH_SEPARATOR = :
154PKG_CONFIG = /usr/bin/pkg-config
155PLUGINS_LDFLAGS = -avoid-version -export-dynamic
156RANLIB = ranlib
157SET_MAKE =
158SHELL = /bin/bash
159STRIP = strip
160VERSION = 0.0.8
161XML2_CONFIG = /usr/bin/xml2-config
162XML_CPPFLAGS = -I/usr/include/libxml2
163XML_LIBS = -L/usr/lib/x86_64-linux-gnu -lxml2
164Z_CFLAGS =
165Z_LIBS = -lz
166abs_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2
167abs_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2
168abs_top_builddir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8
169abs_top_srcdir = /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8
170ac_ct_CC = gcc
171ac_ct_CXX = g++
172ac_ct_F77 =
173am__include = include
174am__leading_dot = .
175am__quote =
176am__tar = ${AMTAR} chof - "$$tardir"
177am__untar = ${AMTAR} xf -
178bindir = ${exec_prefix}/bin
179build = x86_64-unknown-linux-gnu
180build_alias =
181build_cpu = x86_64
182build_os = linux-gnu
183build_vendor = unknown
184builddir = .
185datadir = ${datarootdir}
186datarootdir = ${prefix}/share
187docdir = ${datarootdir}/doc/${PACKAGE}
188dvidir = ${docdir}
189exec_prefix = ${prefix}
190host = x86_64-unknown-linux-gnu
191host_alias =
192host_cpu = x86_64
193host_os = linux-gnu
194host_vendor = unknown
195htmldir = ${docdir}
196includedir = ${prefix}/include
197infodir = ${datarootdir}/info
198install_sh = $(SHELL) /home/dvs1/VirtualWorlds/SOURCE/SledjHamr/src/others/mimesh/libg3d-0.0.8/config/install-sh
199libdir = ${exec_prefix}/lib
200libexecdir = ${exec_prefix}/libexec
201localedir = ${datarootdir}/locale
202localstatedir = ${prefix}/var
203mandir = ${datarootdir}/man
204mkdir_p = /bin/mkdir -p
205oldincludedir = /usr/include
206pdfdir = ${docdir}
207prefix = /usr/local
208program_transform_name = s,x,x,
209psdir = ${docdir}
210sbindir = ${exec_prefix}/sbin
211sharedstatedir = ${prefix}/com
212srcdir = .
213sysconfdir = ${prefix}/etc
214target_alias =
215top_builddir = ../../..
216top_srcdir = ../../..
217pluginimpdir = $(pkglibdir)/plugins/import
218#pluginimp_LTLIBRARIES = imp_vrml2.la
219AM_CFLAGS = \
220 -Wall -ansi -pedantic \
221 -DG_LOG_DOMAIN=\"LibG3D\" \
222 -O2 -DDEBUG=0 \
223 -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
224
225INCLUDES = -I$(top_srcdir)/include
226AM_LDFLAGS = \
227 -no-undefined -module \
228 -avoid-version -export-dynamic
229
230imp_vrml2_la_SOURCES = imp_vrml2.c imp_vrml2.h \
231 imp_vrml_read.c imp_vrml_read.h \
232 imp_vrml_types.h \
233 imp_vrml2_types.c imp_vrml2_types.h \
234 imp_vrml2_nodes.h
235
236imp_vrml2_la_LIBADD = $(top_builddir)/src/libg3d.la -Wl,--export-dynamic -pthread -lgmodule-2.0 -lrt -lgobject-2.0 -lglib-2.0
237all: all-am
238
239.SUFFIXES:
240.SUFFIXES: .c .lo .o .obj
241$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
242 @for dep in $?; do \
243 case '$(am__configure_deps)' in \
244 *$$dep*) \
245 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
246 && exit 0; \
247 exit 1;; \
248 esac; \
249 done; \
250 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_vrml2/Makefile'; \
251 cd $(top_srcdir) && \
252 $(AUTOMAKE) --gnu plugins/import/imp_vrml2/Makefile
253.PRECIOUS: Makefile
254Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
255 @case '$?' in \
256 *config.status*) \
257 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
258 *) \
259 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
260 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
261 esac;
262
263$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
264 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
265
266$(top_srcdir)/configure: $(am__configure_deps)
267 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
268$(ACLOCAL_M4): $(am__aclocal_m4_deps)
269 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
270install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES)
271 @$(NORMAL_INSTALL)
272 test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)"
273 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
274 if test -f $$p; then \
275 f=$(am__strip_dir) \
276 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \
277 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \
278 else :; fi; \
279 done
280
281uninstall-pluginimpLTLIBRARIES:
282 @$(NORMAL_UNINSTALL)
283 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
284 p=$(am__strip_dir) \
285 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \
286 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \
287 done
288
289clean-pluginimpLTLIBRARIES:
290 -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES)
291 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
292 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
293 test "$$dir" != "$$p" || dir=.; \
294 echo "rm -f \"$${dir}/so_locations\""; \
295 rm -f "$${dir}/so_locations"; \
296 done
297imp_vrml2.la: $(imp_vrml2_la_OBJECTS) $(imp_vrml2_la_DEPENDENCIES)
298 $(LINK) $(am_imp_vrml2_la_rpath) $(imp_vrml2_la_OBJECTS) $(imp_vrml2_la_LIBADD) $(LIBS)
299
300mostlyclean-compile:
301 -rm -f *.$(OBJEXT)
302
303distclean-compile:
304 -rm -f *.tab.c
305
306include ./$(DEPDIR)/imp_vrml2.Plo
307include ./$(DEPDIR)/imp_vrml2_types.Plo
308include ./$(DEPDIR)/imp_vrml_read.Plo
309
310.c.o:
311 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
312 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
313# source='$<' object='$@' libtool=no \
314# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
315# $(COMPILE) -c $<
316
317.c.obj:
318 $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
319 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
320# source='$<' object='$@' libtool=no \
321# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
322# $(COMPILE) -c `$(CYGPATH_W) '$<'`
323
324.c.lo:
325 $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
326 mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
327# source='$<' object='$@' libtool=yes \
328# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
329# $(LTCOMPILE) -c -o $@ $<
330
331mostlyclean-libtool:
332 -rm -f *.lo
333
334clean-libtool:
335 -rm -rf .libs _libs
336
337ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
338 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
339 unique=`for i in $$list; do \
340 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
341 done | \
342 $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
343 END { if (nonempty) { for (i in files) print i; }; }'`; \
344 mkid -fID $$unique
345tags: TAGS
346
347TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
348 $(TAGS_FILES) $(LISP)
349 tags=; \
350 here=`pwd`; \
351 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
352 unique=`for i in $$list; do \
353 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
354 done | \
355 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
356 END { if (nonempty) { for (i in files) print i; }; }'`; \
357 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
358 test -n "$$unique" || unique=$$empty_fix; \
359 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
360 $$tags $$unique; \
361 fi
362ctags: CTAGS
363CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
364 $(TAGS_FILES) $(LISP)
365 tags=; \
366 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
367 unique=`for i in $$list; do \
368 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
369 done | \
370 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
371 END { if (nonempty) { for (i in files) print i; }; }'`; \
372 test -z "$(CTAGS_ARGS)$$tags$$unique" \
373 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
374 $$tags $$unique
375
376GTAGS:
377 here=`$(am__cd) $(top_builddir) && pwd` \
378 && cd $(top_srcdir) \
379 && gtags -i $(GTAGS_ARGS) $$here
380
381distclean-tags:
382 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
383
384distdir: $(DISTFILES)
385 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
386 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
387 list='$(DISTFILES)'; \
388 dist_files=`for file in $$list; do echo $$file; done | \
389 sed -e "s|^$$srcdirstrip/||;t" \
390 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
391 case $$dist_files in \
392 */*) $(MKDIR_P) `echo "$$dist_files" | \
393 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
394 sort -u` ;; \
395 esac; \
396 for file in $$dist_files; do \
397 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
398 if test -d $$d/$$file; then \
399 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
400 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
401 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
402 fi; \
403 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
404 else \
405 test -f $(distdir)/$$file \
406 || cp -p $$d/$$file $(distdir)/$$file \
407 || exit 1; \
408 fi; \
409 done
410check-am: all-am
411check: check-am
412all-am: Makefile $(LTLIBRARIES)
413installdirs:
414 for dir in "$(DESTDIR)$(pluginimpdir)"; do \
415 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
416 done
417install: install-am
418install-exec: install-exec-am
419install-data: install-data-am
420uninstall: uninstall-am
421
422install-am: all-am
423 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
424
425installcheck: installcheck-am
426install-strip:
427 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
428 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
429 `test -z '$(STRIP)' || \
430 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
431mostlyclean-generic:
432
433clean-generic:
434
435distclean-generic:
436 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
437
438maintainer-clean-generic:
439 @echo "This command is intended for maintainers to use"
440 @echo "it deletes files that may require special tools to rebuild."
441clean: clean-am
442
443clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \
444 mostlyclean-am
445
446distclean: distclean-am
447 -rm -rf ./$(DEPDIR)
448 -rm -f Makefile
449distclean-am: clean-am distclean-compile distclean-generic \
450 distclean-tags
451
452dvi: dvi-am
453
454dvi-am:
455
456html: html-am
457
458info: info-am
459
460info-am:
461
462install-data-am: install-pluginimpLTLIBRARIES
463
464install-dvi: install-dvi-am
465
466install-exec-am:
467
468install-html: install-html-am
469
470install-info: install-info-am
471
472install-man:
473
474install-pdf: install-pdf-am
475
476install-ps: install-ps-am
477
478installcheck-am:
479
480maintainer-clean: maintainer-clean-am
481 -rm -rf ./$(DEPDIR)
482 -rm -f Makefile
483maintainer-clean-am: distclean-am maintainer-clean-generic
484
485mostlyclean: mostlyclean-am
486
487mostlyclean-am: mostlyclean-compile mostlyclean-generic \
488 mostlyclean-libtool
489
490pdf: pdf-am
491
492pdf-am:
493
494ps: ps-am
495
496ps-am:
497
498uninstall-am: uninstall-pluginimpLTLIBRARIES
499
500.MAKE: install-am install-strip
501
502.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
503 clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \
504 distclean-compile distclean-generic distclean-libtool \
505 distclean-tags distdir dvi dvi-am html html-am info info-am \
506 install install-am install-data install-data-am install-dvi \
507 install-dvi-am install-exec install-exec-am install-html \
508 install-html-am install-info install-info-am install-man \
509 install-pdf install-pdf-am install-pluginimpLTLIBRARIES \
510 install-ps install-ps-am install-strip installcheck \
511 installcheck-am installdirs maintainer-clean \
512 maintainer-clean-generic mostlyclean mostlyclean-compile \
513 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
514 tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES
515
516# Tell versions [3.59,3.63) of GNU make to not export all variables.
517# Otherwise a system limit (for SysV at least) may be exceeded.
518.NOEXPORT:
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.am b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.am
new file mode 100644
index 0000000..981cc62
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.am
@@ -0,0 +1,26 @@
1pluginimpdir = $(pkglibdir)/plugins/import
2
3if EXPERIMENTAL
4pluginimp_LTLIBRARIES = imp_vrml2.la
5endif
6
7AM_CFLAGS = \
8 -Wall -ansi -pedantic \
9 -DG_LOG_DOMAIN=\"LibG3D\" \
10 @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \
11 @GLIB_CFLAGS@
12
13INCLUDES = -I$(top_srcdir)/include
14
15AM_LDFLAGS = \
16 -no-undefined -module \
17 @PLUGINS_LDFLAGS@
18
19LIBTOOL += --quiet
20
21imp_vrml2_la_SOURCES = imp_vrml2.c imp_vrml2.h \
22 imp_vrml_read.c imp_vrml_read.h \
23 imp_vrml_types.h \
24 imp_vrml2_types.c imp_vrml2_types.h \
25 imp_vrml2_nodes.h
26imp_vrml2_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.in b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.in
new file mode 100644
index 0000000..5c08daa
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/Makefile.in
@@ -0,0 +1,518 @@
1# Makefile.in generated by automake 1.10.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6# This Makefile.in is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
15@SET_MAKE@
16
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkglibdir = $(libdir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
22install_sh_DATA = $(install_sh) -c -m 644
23install_sh_PROGRAM = $(install_sh) -c
24install_sh_SCRIPT = $(install_sh) -c
25INSTALL_HEADER = $(INSTALL_DATA)
26transform = $(program_transform_name)
27NORMAL_INSTALL = :
28PRE_INSTALL = :
29POST_INSTALL = :
30NORMAL_UNINSTALL = :
31PRE_UNINSTALL = :
32POST_UNINSTALL = :
33build_triplet = @build@
34host_triplet = @host@
35subdir = plugins/import/imp_vrml2
36DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
37ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
38am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
39 $(top_srcdir)/m4/glib-2.0.m4 $(top_srcdir)/m4/gtk-2.0.m4 \
40 $(top_srcdir)/m4/gtk-doc.m4 $(top_srcdir)/m4/libtool.m4 \
41 $(top_srcdir)/m4/libxml2.m4 $(top_srcdir)/m4/win32.m4 \
42 $(top_srcdir)/configure.in
43am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
44 $(ACLOCAL_M4)
45mkinstalldirs = $(install_sh) -d
46CONFIG_HEADER = $(top_builddir)/include/g3d/config.h
47CONFIG_CLEAN_FILES =
48am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
49am__vpath_adj = case $$p in \
50 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
51 *) f=$$p;; \
52 esac;
53am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
54am__installdirs = "$(DESTDIR)$(pluginimpdir)"
55pluginimpLTLIBRARIES_INSTALL = $(INSTALL)
56LTLIBRARIES = $(pluginimp_LTLIBRARIES)
57imp_vrml2_la_DEPENDENCIES = $(top_builddir)/src/libg3d.la
58am_imp_vrml2_la_OBJECTS = imp_vrml2.lo imp_vrml_read.lo \
59 imp_vrml2_types.lo
60imp_vrml2_la_OBJECTS = $(am_imp_vrml2_la_OBJECTS)
61@EXPERIMENTAL_TRUE@am_imp_vrml2_la_rpath = -rpath $(pluginimpdir)
62DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/g3d
63depcomp = $(SHELL) $(top_srcdir)/config/depcomp
64am__depfiles_maybe = depfiles
65COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
66 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
67LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
68 --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
69 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
70CCLD = $(CC)
71LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
72 --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
73 $(LDFLAGS) -o $@
74SOURCES = $(imp_vrml2_la_SOURCES)
75DIST_SOURCES = $(imp_vrml2_la_SOURCES)
76ETAGS = etags
77CTAGS = ctags
78DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
79ACLOCAL = @ACLOCAL@
80AMTAR = @AMTAR@
81AR = @AR@
82AS = @AS@
83AUTOCONF = @AUTOCONF@
84AUTOHEADER = @AUTOHEADER@
85AUTOMAKE = @AUTOMAKE@
86AWK = @AWK@
87CC = @CC@
88CCDEPMODE = @CCDEPMODE@
89CFLAGS = @CFLAGS@
90CPP = @CPP@
91CPPFLAGS = @CPPFLAGS@
92CXX = @CXX@
93CXXCPP = @CXXCPP@
94CXXDEPMODE = @CXXDEPMODE@
95CXXFLAGS = @CXXFLAGS@
96CYGPATH_W = @CYGPATH_W@
97DBG_CFLAGS = @DBG_CFLAGS@
98DEBUG = @DEBUG@
99DEFS = @DEFS@
100DEPDIR = @DEPDIR@
101DLLTOOL = @DLLTOOL@
102ECHO = @ECHO@
103ECHO_C = @ECHO_C@
104ECHO_N = @ECHO_N@
105ECHO_T = @ECHO_T@
106EGREP = @EGREP@
107EXEEXT = @EXEEXT@
108F77 = @F77@
109FFLAGS = @FFLAGS@
110GDKPIXBUF_CFLAGS = @GDKPIXBUF_CFLAGS@
111GDKPIXBUF_LIBS = @GDKPIXBUF_LIBS@
112GLIB_CFLAGS = @GLIB_CFLAGS@
113GLIB_GENMARSHAL = @GLIB_GENMARSHAL@
114GLIB_LIBS = @GLIB_LIBS@
115GLIB_MKENUMS = @GLIB_MKENUMS@
116GOBJECT_QUERY = @GOBJECT_QUERY@
117GREP = @GREP@
118GTKDOC_CHECK = @GTKDOC_CHECK@
119GTK_CFLAGS = @GTK_CFLAGS@
120GTK_LIBS = @GTK_LIBS@
121HTML_DIR = @HTML_DIR@
122INSTALL = @INSTALL@
123INSTALL_DATA = @INSTALL_DATA@
124INSTALL_PROGRAM = @INSTALL_PROGRAM@
125INSTALL_SCRIPT = @INSTALL_SCRIPT@
126INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
127LDFLAGS = @LDFLAGS@
128LEX = @LEX@
129LEXLIB = @LEXLIB@
130LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
131LIBGSF_CFLAGS = @LIBGSF_CFLAGS@
132LIBGSF_LIBS = @LIBGSF_LIBS@
133LIBOBJS = @LIBOBJS@
134LIBS = @LIBS@
135LIBTOOL = @LIBTOOL@ --quiet
136LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
137LIBXML2_LIBS = @LIBXML2_LIBS@
138LN_S = @LN_S@
139LTLIBOBJS = @LTLIBOBJS@
140LTVERSION = @LTVERSION@
141MAGIC_LIBS = @MAGIC_LIBS@
142MAKEINFO = @MAKEINFO@
143MATH_LIBS = @MATH_LIBS@
144MKDIR_P = @MKDIR_P@
145OBJDUMP = @OBJDUMP@
146OBJEXT = @OBJEXT@
147PACKAGE = @PACKAGE@
148PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
149PACKAGE_NAME = @PACKAGE_NAME@
150PACKAGE_STRING = @PACKAGE_STRING@
151PACKAGE_TARNAME = @PACKAGE_TARNAME@
152PACKAGE_VERSION = @PACKAGE_VERSION@
153PATH_SEPARATOR = @PATH_SEPARATOR@
154PKG_CONFIG = @PKG_CONFIG@
155PLUGINS_LDFLAGS = @PLUGINS_LDFLAGS@
156RANLIB = @RANLIB@
157SET_MAKE = @SET_MAKE@
158SHELL = @SHELL@
159STRIP = @STRIP@
160VERSION = @VERSION@
161XML2_CONFIG = @XML2_CONFIG@
162XML_CPPFLAGS = @XML_CPPFLAGS@
163XML_LIBS = @XML_LIBS@
164Z_CFLAGS = @Z_CFLAGS@
165Z_LIBS = @Z_LIBS@
166abs_builddir = @abs_builddir@
167abs_srcdir = @abs_srcdir@
168abs_top_builddir = @abs_top_builddir@
169abs_top_srcdir = @abs_top_srcdir@
170ac_ct_CC = @ac_ct_CC@
171ac_ct_CXX = @ac_ct_CXX@
172ac_ct_F77 = @ac_ct_F77@
173am__include = @am__include@
174am__leading_dot = @am__leading_dot@
175am__quote = @am__quote@
176am__tar = @am__tar@
177am__untar = @am__untar@
178bindir = @bindir@
179build = @build@
180build_alias = @build_alias@
181build_cpu = @build_cpu@
182build_os = @build_os@
183build_vendor = @build_vendor@
184builddir = @builddir@
185datadir = @datadir@
186datarootdir = @datarootdir@
187docdir = @docdir@
188dvidir = @dvidir@
189exec_prefix = @exec_prefix@
190host = @host@
191host_alias = @host_alias@
192host_cpu = @host_cpu@
193host_os = @host_os@
194host_vendor = @host_vendor@
195htmldir = @htmldir@
196includedir = @includedir@
197infodir = @infodir@
198install_sh = @install_sh@
199libdir = @libdir@
200libexecdir = @libexecdir@
201localedir = @localedir@
202localstatedir = @localstatedir@
203mandir = @mandir@
204mkdir_p = @mkdir_p@
205oldincludedir = @oldincludedir@
206pdfdir = @pdfdir@
207prefix = @prefix@
208program_transform_name = @program_transform_name@
209psdir = @psdir@
210sbindir = @sbindir@
211sharedstatedir = @sharedstatedir@
212srcdir = @srcdir@
213sysconfdir = @sysconfdir@
214target_alias = @target_alias@
215top_builddir = @top_builddir@
216top_srcdir = @top_srcdir@
217pluginimpdir = $(pkglibdir)/plugins/import
218@EXPERIMENTAL_TRUE@pluginimp_LTLIBRARIES = imp_vrml2.la
219AM_CFLAGS = \
220 -Wall -ansi -pedantic \
221 -DG_LOG_DOMAIN=\"LibG3D\" \
222 @DBG_CFLAGS@ -DDEBUG=@DEBUG@ \
223 @GLIB_CFLAGS@
224
225INCLUDES = -I$(top_srcdir)/include
226AM_LDFLAGS = \
227 -no-undefined -module \
228 @PLUGINS_LDFLAGS@
229
230imp_vrml2_la_SOURCES = imp_vrml2.c imp_vrml2.h \
231 imp_vrml_read.c imp_vrml_read.h \
232 imp_vrml_types.h \
233 imp_vrml2_types.c imp_vrml2_types.h \
234 imp_vrml2_nodes.h
235
236imp_vrml2_la_LIBADD = $(top_builddir)/src/libg3d.la @GLIB_LIBS@
237all: all-am
238
239.SUFFIXES:
240.SUFFIXES: .c .lo .o .obj
241$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
242 @for dep in $?; do \
243 case '$(am__configure_deps)' in \
244 *$$dep*) \
245 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
246 && exit 0; \
247 exit 1;; \
248 esac; \
249 done; \
250 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/import/imp_vrml2/Makefile'; \
251 cd $(top_srcdir) && \
252 $(AUTOMAKE) --gnu plugins/import/imp_vrml2/Makefile
253.PRECIOUS: Makefile
254Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
255 @case '$?' in \
256 *config.status*) \
257 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
258 *) \
259 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
260 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
261 esac;
262
263$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
264 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
265
266$(top_srcdir)/configure: $(am__configure_deps)
267 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
268$(ACLOCAL_M4): $(am__aclocal_m4_deps)
269 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
270install-pluginimpLTLIBRARIES: $(pluginimp_LTLIBRARIES)
271 @$(NORMAL_INSTALL)
272 test -z "$(pluginimpdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginimpdir)"
273 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
274 if test -f $$p; then \
275 f=$(am__strip_dir) \
276 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pluginimpdir)/$$f'"; \
277 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(pluginimpLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pluginimpdir)/$$f"; \
278 else :; fi; \
279 done
280
281uninstall-pluginimpLTLIBRARIES:
282 @$(NORMAL_UNINSTALL)
283 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
284 p=$(am__strip_dir) \
285 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pluginimpdir)/$$p'"; \
286 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pluginimpdir)/$$p"; \
287 done
288
289clean-pluginimpLTLIBRARIES:
290 -test -z "$(pluginimp_LTLIBRARIES)" || rm -f $(pluginimp_LTLIBRARIES)
291 @list='$(pluginimp_LTLIBRARIES)'; for p in $$list; do \
292 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
293 test "$$dir" != "$$p" || dir=.; \
294 echo "rm -f \"$${dir}/so_locations\""; \
295 rm -f "$${dir}/so_locations"; \
296 done
297imp_vrml2.la: $(imp_vrml2_la_OBJECTS) $(imp_vrml2_la_DEPENDENCIES)
298 $(LINK) $(am_imp_vrml2_la_rpath) $(imp_vrml2_la_OBJECTS) $(imp_vrml2_la_LIBADD) $(LIBS)
299
300mostlyclean-compile:
301 -rm -f *.$(OBJEXT)
302
303distclean-compile:
304 -rm -f *.tab.c
305
306@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_vrml2.Plo@am__quote@
307@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_vrml2_types.Plo@am__quote@
308@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imp_vrml_read.Plo@am__quote@
309
310.c.o:
311@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
312@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
313@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
314@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
315@am__fastdepCC_FALSE@ $(COMPILE) -c $<
316
317.c.obj:
318@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
319@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
320@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
321@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
322@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
323
324.c.lo:
325@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
326@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
327@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
328@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
329@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
330
331mostlyclean-libtool:
332 -rm -f *.lo
333
334clean-libtool:
335 -rm -rf .libs _libs
336
337ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
338 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
339 unique=`for i in $$list; do \
340 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
341 done | \
342 $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
343 END { if (nonempty) { for (i in files) print i; }; }'`; \
344 mkid -fID $$unique
345tags: TAGS
346
347TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
348 $(TAGS_FILES) $(LISP)
349 tags=; \
350 here=`pwd`; \
351 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
352 unique=`for i in $$list; do \
353 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
354 done | \
355 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
356 END { if (nonempty) { for (i in files) print i; }; }'`; \
357 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
358 test -n "$$unique" || unique=$$empty_fix; \
359 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
360 $$tags $$unique; \
361 fi
362ctags: CTAGS
363CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
364 $(TAGS_FILES) $(LISP)
365 tags=; \
366 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
367 unique=`for i in $$list; do \
368 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
369 done | \
370 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
371 END { if (nonempty) { for (i in files) print i; }; }'`; \
372 test -z "$(CTAGS_ARGS)$$tags$$unique" \
373 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
374 $$tags $$unique
375
376GTAGS:
377 here=`$(am__cd) $(top_builddir) && pwd` \
378 && cd $(top_srcdir) \
379 && gtags -i $(GTAGS_ARGS) $$here
380
381distclean-tags:
382 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
383
384distdir: $(DISTFILES)
385 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
386 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
387 list='$(DISTFILES)'; \
388 dist_files=`for file in $$list; do echo $$file; done | \
389 sed -e "s|^$$srcdirstrip/||;t" \
390 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
391 case $$dist_files in \
392 */*) $(MKDIR_P) `echo "$$dist_files" | \
393 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
394 sort -u` ;; \
395 esac; \
396 for file in $$dist_files; do \
397 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
398 if test -d $$d/$$file; then \
399 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
400 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
401 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
402 fi; \
403 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
404 else \
405 test -f $(distdir)/$$file \
406 || cp -p $$d/$$file $(distdir)/$$file \
407 || exit 1; \
408 fi; \
409 done
410check-am: all-am
411check: check-am
412all-am: Makefile $(LTLIBRARIES)
413installdirs:
414 for dir in "$(DESTDIR)$(pluginimpdir)"; do \
415 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
416 done
417install: install-am
418install-exec: install-exec-am
419install-data: install-data-am
420uninstall: uninstall-am
421
422install-am: all-am
423 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
424
425installcheck: installcheck-am
426install-strip:
427 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
428 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
429 `test -z '$(STRIP)' || \
430 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
431mostlyclean-generic:
432
433clean-generic:
434
435distclean-generic:
436 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
437
438maintainer-clean-generic:
439 @echo "This command is intended for maintainers to use"
440 @echo "it deletes files that may require special tools to rebuild."
441clean: clean-am
442
443clean-am: clean-generic clean-libtool clean-pluginimpLTLIBRARIES \
444 mostlyclean-am
445
446distclean: distclean-am
447 -rm -rf ./$(DEPDIR)
448 -rm -f Makefile
449distclean-am: clean-am distclean-compile distclean-generic \
450 distclean-tags
451
452dvi: dvi-am
453
454dvi-am:
455
456html: html-am
457
458info: info-am
459
460info-am:
461
462install-data-am: install-pluginimpLTLIBRARIES
463
464install-dvi: install-dvi-am
465
466install-exec-am:
467
468install-html: install-html-am
469
470install-info: install-info-am
471
472install-man:
473
474install-pdf: install-pdf-am
475
476install-ps: install-ps-am
477
478installcheck-am:
479
480maintainer-clean: maintainer-clean-am
481 -rm -rf ./$(DEPDIR)
482 -rm -f Makefile
483maintainer-clean-am: distclean-am maintainer-clean-generic
484
485mostlyclean: mostlyclean-am
486
487mostlyclean-am: mostlyclean-compile mostlyclean-generic \
488 mostlyclean-libtool
489
490pdf: pdf-am
491
492pdf-am:
493
494ps: ps-am
495
496ps-am:
497
498uninstall-am: uninstall-pluginimpLTLIBRARIES
499
500.MAKE: install-am install-strip
501
502.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
503 clean-libtool clean-pluginimpLTLIBRARIES ctags distclean \
504 distclean-compile distclean-generic distclean-libtool \
505 distclean-tags distdir dvi dvi-am html html-am info info-am \
506 install install-am install-data install-data-am install-dvi \
507 install-dvi-am install-exec install-exec-am install-html \
508 install-html-am install-info install-info-am install-man \
509 install-pdf install-pdf-am install-pluginimpLTLIBRARIES \
510 install-ps install-ps-am install-strip installcheck \
511 installcheck-am installdirs maintainer-clean \
512 maintainer-clean-generic mostlyclean mostlyclean-compile \
513 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
514 tags uninstall uninstall-am uninstall-pluginimpLTLIBRARIES
515
516# Tell versions [3.59,3.63) of GNU make to not export all variables.
517# Otherwise a system limit (for SysV at least) may be exceeded.
518.NOEXPORT:
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.c
new file mode 100644
index 0000000..f295175
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.c
@@ -0,0 +1,82 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22
23/*
24 * an experiment to parse VRML without flex, version 2 is tried as a starter,
25 * v1 and Inventor stuff will be added if successful.
26 */
27
28#include <stdlib.h>
29#include <string.h>
30#include <locale.h>
31
32#include <g3d/types.h>
33#include <g3d/stream.h>
34
35#include "imp_vrml2.h"
36#include "imp_vrml_read.h"
37
38EAPI
39gboolean plugin_load_model_from_stream(G3DContext *context, G3DStream *stream,
40 G3DModel *model, gpointer user_data)
41{
42 gchar buf[128];
43 gboolean retval;
44 VrmlReader *reader;
45
46 setlocale(LC_NUMERIC, "C");
47
48 buf[127] = '\0';
49 g3d_stream_read_line(stream, buf, 127);
50 if(strncmp(buf, "#VRML V2.0 utf8", 15) != 0) {
51 g_warning("%s is not a valid VRML 2.0 UTF-8 stream", stream->uri);
52 return FALSE;
53 }
54
55 reader = g_new0(VrmlReader, 1);
56 reader->max_bufsize = 2048;
57 reader->buffer = g_new0(gchar, reader->max_bufsize);
58 reader->bufp = reader->buffer;
59 reader->line = 2;
60 reader->stream = stream;
61 reader->model = model;
62
63 retval = vrml_read_global(reader);
64
65 g_free(reader);
66
67 return retval;
68}
69
70EAPI
71gchar *plugin_description(void)
72{
73 return g_strdup("VRML v2 models.");
74}
75
76EAPI
77gchar **plugin_extensions(void)
78{
79 return g_strsplit("wrl", ":", 0);
80}
81
82/*****************************************************************************/
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.h
new file mode 100644
index 0000000..4946d6b
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2.h
@@ -0,0 +1,42 @@
1/* $Id:$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#ifndef _IMP_VRML2_H
23#define _IMP_VRML2_H
24
25#include <glib.h>
26
27#include <g3d/types.h>
28#include <g3d/stream.h>
29
30typedef struct {
31 G3DStream *stream;
32 gchar *buffer;
33 gchar *bufp;
34 gsize bufsize;
35 gsize max_bufsize;
36 guint32 line;
37
38 G3DModel *model;
39 G3DObject *object;
40} VrmlReader;
41
42#endif
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_nodes.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_nodes.h
new file mode 100644
index 0000000..837c728
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_nodes.h
@@ -0,0 +1,42 @@
1/* $Id:$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#ifndef _IMP_VRML2_NODES_H
23#define _IMP_VRML2_NODES_H
24
25#include "imp_vrml_types.h"
26
27static VrmlNodeDef vrml2_nodes[] = {
28 { "Appearence", NULL },
29 { "Background", NULL },
30 { "Color", NULL },
31 { "Coordinate", NULL },
32 { "IndexedFaceSet", NULL },
33 { "Material", NULL },
34 { "Normal", NULL },
35 { "Shape", NULL },
36 { "Transform", NULL },
37 { "Viewpoint", NULL },
38
39 { NULL, NULL }
40};
41
42#endif
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.c
new file mode 100644
index 0000000..3c10bf2
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.c
@@ -0,0 +1,78 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#include <string.h>
23
24#include "imp_vrml_types.h"
25#include "imp_vrml_read.h"
26
27VrmlType vrml2_type_cb__float3(VrmlReader *reader)
28{
29 if(!vrml_read_skip_ws(reader))
30 return T_UNKNOWN;
31 if(*(reader->bufp) == '[')
32 return T_LIST_FLOAT3;
33 return T_FLOAT3;
34}
35
36VrmlType vrml2_type_cb__int(VrmlReader *reader)
37{
38 if(!vrml_read_skip_ws(reader))
39 return T_UNKNOWN;
40 if(*(reader->bufp) == '[')
41 return T_LIST_INT;
42 return T_INT;
43}
44
45VrmlType vrml2_type_cb_field(VrmlReader *reader)
46{
47 gchar *id;
48 VrmlType t = T_UNKNOWN;
49
50 id = vrml_read_id(reader);
51 if(!id) {
52 g_warning("VRML: vrml2_type_cb_field: failed to read id");
53 return T_UNKNOWN;
54 }
55 if(strcmp(id, "SFFloat") == 0)
56 t = T_TOKEN2; /* data 0 */
57
58 g_free(id);
59 return t;
60}
61
62VrmlType vrml2_type_cb_children(VrmlReader *reader)
63{
64 if(!vrml_read_skip_ws(reader))
65 return T_UNKNOWN;
66 if(*(reader->bufp) == '[')
67 return T_LIST_OBJECT;
68 return T_OBJECT;
69}
70
71VrmlType vrml2_type_cb_color(VrmlReader *reader)
72{
73 if(!vrml_read_skip_ws(reader))
74 return T_UNKNOWN;
75 if(*(reader->bufp) == '[')
76 return T_LIST_FLOAT3;
77 return T_OBJECT;
78}
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.h
new file mode 100644
index 0000000..a4747ec
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml2_types.h
@@ -0,0 +1,103 @@
1/* $Id:$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#ifndef _IMP_VRML2_TYPES_H
23#define _IMP_VRML2_TYPES_H
24
25#include "imp_vrml2.h"
26#include "imp_vrml_types.h"
27
28/* list or not list */
29VrmlType vrml2_type_cb__float3(VrmlReader *reader);
30VrmlType vrml2_type_cb__int(VrmlReader *reader);
31
32VrmlType vrml2_type_cb_field(VrmlReader *reader);
33VrmlType vrml2_type_cb_children(VrmlReader *reader);
34VrmlType vrml2_type_cb_color(VrmlReader *reader);
35
36static VrmlTypeDef vrml2_types[] = {
37 { "ambientIntensity", T_FLOAT, NULL },
38 { "appearance", T_OBJECT, NULL },
39 { "autoOffset", T_BOOLEAN, NULL },
40 { "ccw", T_BOOLEAN, NULL },
41 { "center", T_FLOAT_X, NULL },
42 { "children", T_UNKNOWN, vrml2_type_cb_children },
43 { "color", T_UNKNOWN, vrml2_type_cb_color },
44 { "colorIndex", T_LIST_INT, vrml2_type_cb__int },
45 { "colorPerVertex", T_BOOLEAN, NULL },
46 { "convex", T_BOOLEAN, NULL },
47 { "coord", T_OBJECT, NULL },
48 { "coordIndex", T_LIST_INT, NULL },
49 { "creaseAngle", T_FLOAT, NULL },
50 { "cycleInterval", T_INT, NULL },
51 { "description", T_STRING, NULL },
52 { "diffuseColor", T_FLOAT3, NULL },
53 { "emissiveColor", T_FLOAT3, NULL },
54 { "eventIn", T_TOKEN2, NULL },
55 { "eventOut", T_TOKEN2, NULL },
56 { "field", T_UNKNOWN, vrml2_type_cb_field },
57 { "fieldOfView", T_FLOAT, NULL },
58 { "geometry", T_OBJECT, NULL },
59 { "groundAngle", T_LIST_FLOAT2, NULL },
60 { "groundColor", T_LIST_FLOAT3, NULL },
61 { "height", T_FLOAT, NULL },
62 { "info", T_LIST_STRING, NULL },
63 { "key", T_LIST_FLOAT, NULL },
64 { "keyValue", T_LIST_FLOAT4, NULL },
65 { "material", T_OBJECT, NULL },
66 { "maxPosition", T_FLOAT_X, NULL },
67 { "minPosition", T_FLOAT_X, NULL },
68 { "normal", T_OBJECT, NULL },
69 { "normalIndex", T_LIST_INT, NULL },
70 { "normalPerVertex", T_BOOLEAN, NULL },
71 { "offset", T_FLOAT_X, NULL },
72 { "orientation", T_FLOAT4, NULL },
73 { "parameter", T_STRING, NULL },
74 { "point", T_LIST_FLOAT_X, NULL },
75 { "position", T_FLOAT3, NULL },
76 { "radius", T_FLOAT, NULL },
77 { "repeatS", T_BOOLEAN, NULL },
78 { "repeatT", T_BOOLEAN, NULL },
79 { "rotation", T_FLOAT_X, NULL },
80 { "scale", T_FLOAT_X, NULL },
81 { "scaleOrientation", T_FLOAT_X, NULL },
82 { "shininess", T_FLOAT, NULL },
83 { "size", T_FLOAT3, NULL },
84 { "skyAngle", T_LIST_FLOAT2, NULL },
85 { "skyColor", T_LIST_FLOAT3, vrml2_type_cb__float3 },
86 { "solid", T_BOOLEAN, NULL },
87 { "specularColor", T_FLOAT3, NULL },
88 { "startTime", T_INT, NULL },
89 { "stopTime", T_INT, NULL },
90 { "texCoord", T_OBJECT, NULL },
91 { "texCoordIndex", T_LIST_INT, NULL },
92 { "texture", T_OBJECT, NULL },
93 { "textureTransform", T_OBJECT, NULL },
94 { "translation", T_FLOAT3, NULL },
95 { "transparency", T_FLOAT, NULL },
96 { "type", T_STRING, NULL },
97 { "url", T_STRING, NULL },
98 { "vector", T_LIST_FLOAT3, NULL },
99
100 { NULL, T_UNKNOWN }
101};
102
103#endif /* _IMP_VRML2_TYPES_H */
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.c b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.c
new file mode 100644
index 0000000..580c5cd
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.c
@@ -0,0 +1,647 @@
1/* $Id$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#include <string.h>
23#include <stdlib.h>
24
25#include "imp_vrml_types.h"
26#include "imp_vrml_read.h"
27
28#include "imp_vrml2_nodes.h"
29#include "imp_vrml2_types.h"
30
31gboolean vrml_read_check_buffer(VrmlReader *reader)
32{
33 if(reader->bufsize > 0)
34 return TRUE;
35 if(g3d_stream_eof(reader->stream))
36 return FALSE;
37 memset(reader->buffer, '\0', reader->max_bufsize);
38 g3d_stream_read_line(reader->stream, reader->buffer,
39 reader->max_bufsize - 1);
40 reader->line ++;
41 reader->bufsize = strlen(reader->buffer);
42 reader->bufp = reader->buffer;
43 return (reader->bufsize > 0);
44}
45
46gboolean vrml_read_skip_ws(VrmlReader *reader)
47{
48 if(!vrml_read_check_buffer(reader))
49 return FALSE;
50 while(g_ascii_isspace(*(reader->bufp))) {
51 vrml_read_dec(reader);
52 if(!vrml_read_check_buffer(reader))
53 return FALSE;
54 }
55 return TRUE;
56}
57
58gchar *vrml_read_token(VrmlReader *reader)
59{
60 gchar *s = NULL;
61 gsize len = 0;
62
63 if(!vrml_read_skip_ws(reader))
64 return NULL;
65 while(vrml_read_check_buffer(reader) &&
66 !g_ascii_isspace(*(reader->bufp)) &&
67 (*(reader->bufp) != ',')) {
68 len ++;
69 s = g_realloc(s, (len + 1) * sizeof(gchar));
70 s[len - 1] = *(reader->bufp);
71 s[len - 0] = '\0';
72 vrml_read_dec(reader);
73 }
74#if DEBUG > 3
75 g_debug("token: %s", s);
76#endif
77 return s;
78}
79
80gchar *vrml_read_numeric(VrmlReader *reader)
81{
82 gchar *s = NULL;
83 gsize len = 0;
84 gboolean first = TRUE;
85
86 if(!vrml_read_skip_ws(reader))
87 return NULL;
88 while(vrml_read_check_buffer(reader) &&
89 (g_ascii_isdigit(*(reader->bufp)) ||
90 strchr(".-e", *(reader->bufp)))) {
91
92 if(first) {
93 if(*(reader->bufp) == 'e')
94 return NULL;
95 first = FALSE;
96 }
97
98 len ++;
99 s = g_realloc(s, (len + 1) * sizeof(gchar));
100 s[len - 1] = *(reader->bufp);
101 s[len - 0] = '\0';
102 vrml_read_dec(reader);
103 }
104#if DEBUG > 3
105 g_debug("numeric: %s", s);
106#endif
107 return s;
108}
109
110gchar *vrml_read_id(VrmlReader *reader)
111{
112 gchar *buf;
113 gsize bufsize;
114
115 if(!vrml_read_skip_ws(reader))
116 return NULL;
117 if(!vrml_read_check_buffer(reader))
118 return NULL;
119 bufsize = 2;
120 buf = g_new(gchar, 2 * sizeof(gchar));
121 buf[0] = *(reader->bufp);
122 buf[1] = '\0';
123 if(!(g_ascii_isalpha(buf[0]) || strchr("_", buf[0]))) {
124 g_free(buf);
125 return NULL;
126 }
127 vrml_read_dec(reader);
128 if(!vrml_read_check_buffer(reader))
129 return buf;
130 while(g_ascii_isalnum(*(reader->bufp)) || strchr("_.", *(reader->bufp))) {
131 bufsize ++;
132 buf = g_realloc(buf, bufsize * sizeof(gchar));
133 buf[bufsize - 2] = *(reader->bufp);
134 buf[bufsize - 1] = '\0';
135 vrml_read_dec(reader);
136 if(!vrml_read_check_buffer(reader))
137 return buf;
138 }
139 return buf;
140}
141
142gchar *vrml_read_string(VrmlReader *reader)
143{
144 gchar *buf = NULL;
145 gsize bufsize = 0;
146
147 if(!vrml_read_check_buffer(reader))
148 return NULL;
149 while(*(reader->bufp) != '"') {
150 bufsize ++;
151 buf = g_realloc(buf, (bufsize + 1) * sizeof(gchar));
152 buf[bufsize - 1] = *(reader->bufp);
153 buf[bufsize] = '\0';
154 vrml_read_dec(reader);
155 if(!vrml_read_check_buffer(reader))
156 return buf;
157 }
158 vrml_read_dec(reader);
159 return buf;
160}
161
162gboolean vrml_read_skip_unknown(VrmlReader *reader)
163{
164 gchar c, *s;
165#if DEBUG > 0
166 g_debug("vrml: skipping unknown stuff in line %d", reader->line);
167#endif
168
169 while(vrml_read_check_buffer(reader)) {
170 c = *(reader->bufp);
171 vrml_read_dec(reader);
172 switch(c) {
173 case '"':
174 s = vrml_read_string(reader);
175 if(s) {
176 g_debug("found string '%s'", s);
177 g_free(s);
178 }
179 break;
180 case '{':
181 case '[':
182 vrml_read_skip_unknown(reader);
183 break;
184 case '}':
185 case ']':
186 return TRUE;
187 break;
188 default:
189 break;
190 }
191 }
192 return FALSE;
193}
194
195gchar *vrml_read_nodeid(VrmlReader *reader)
196{
197 gchar *id;
198 id = vrml_read_id(reader);
199 if(id == NULL)
200 return NULL;
201 if(!g_ascii_isupper(id[0])) {
202 g_free(id);
203 return NULL;
204 }
205 return id;
206}
207
208gboolean vrml_read_expect(VrmlReader *reader, const gchar c)
209{
210 gchar b;
211 if(!vrml_read_skip_ws(reader))
212 return FALSE;
213 if(!vrml_read_check_buffer(reader))
214 return FALSE;
215 b = *(reader->bufp);
216 vrml_read_dec(reader);
217 return (b == c);
218}
219
220gboolean vrml_read_list(VrmlReader *reader, vrml_read_list_item_callback cb,
221 gpointer user_data)
222{
223 if(!vrml_read_expect(reader, '['))
224 return FALSE;
225
226 while(vrml_read_skip_ws(reader)) {
227 if(*(reader->bufp) == ']') {
228 vrml_read_dec(reader);
229 return TRUE;
230 }
231 if(!cb(reader, user_data))
232 return FALSE;
233
234 if(!vrml_read_skip_ws(reader))
235 return FALSE;
236 if(*(reader->bufp) == ',')
237 vrml_read_dec(reader);
238 }
239 /* should not be reached */
240 return vrml_read_expect(reader, ']');
241}
242
243/*****************************************************************************/
244
245static VrmlObject *vrml_lookup_object(VrmlReader *reader, const gchar *id)
246{
247 VrmlObject *object;
248
249 object = g_new0(VrmlObject, 1);
250 object->defid = g_strdup(id);
251 object->name = g_strdup("object from library");
252
253 return object;
254}
255
256static gboolean vrml_read_float_n(VrmlReader *reader, G3DFloat *a, guint32 n)
257{
258 gint i;
259 gchar *s;
260
261 for(i = 0; i < n; i ++) {
262 s = vrml_read_numeric(reader);
263 if(s) {
264 a[i] = atof(s);
265 g_free(s);
266 } else
267 return FALSE;
268 }
269 return TRUE;
270}
271
272static gboolean vrml_read_token_n(VrmlReader *reader, VrmlProperty *property,
273 guint32 n)
274{
275 gchar *token;
276 gint32 i;
277
278 for(i = 0; i < n; i ++) {
279 token = vrml_read_token(reader);
280#if DEBUG > 2
281 g_debug("Token: %s", token);
282#endif
283 g_free(token);
284 }
285
286 return TRUE;
287}
288
289/* property list callbacks */
290
291gboolean vrml_read_list_object_cb(VrmlReader *reader, gpointer data)
292{
293 VrmlProperty *property = data;
294
295 property->n_items ++;
296 property->v_object = g_realloc(property->v_object,
297 property->n_items * sizeof(VrmlObject *));
298 property->v_object[property->n_items - 1] =
299 vrml_read_object(reader, property->level + 1);
300 return (property->v_object[property->n_items - 1] != NULL);
301}
302
303gboolean vrml_read_list_string_cb(VrmlReader *reader, gpointer data)
304{
305 VrmlProperty *property = data;
306
307 if(!vrml_read_expect(reader, '"'))
308 return FALSE;
309
310 property->n_items ++;
311 property->v_str = g_realloc(property->v_str,
312 property->n_items * sizeof(gchar *));
313 property->v_str[property->n_items - 1] =
314 vrml_read_string(reader);
315 return TRUE;
316}
317
318gboolean vrml_read_list_int_cb(VrmlReader *reader, gpointer data)
319{
320 VrmlProperty *property = data;
321 gchar *s;
322
323 s = vrml_read_numeric(reader);
324 if(s) {
325 property->n_items ++;
326 property->v_int = g_realloc(property->v_int,
327 property->n_items * sizeof(gint32));
328 property->v_int[property->n_items - 1] = atoi(s);
329 g_free(s);
330 return TRUE;
331 }
332 return FALSE;
333}
334
335gboolean vrml_read_list_float_cb(VrmlReader *reader, gpointer data)
336{
337 VrmlProperty *property = data;
338
339 property->n_items ++;
340 property->v_float = g_realloc(property->v_float,
341 property->n_items * sizeof(G3DFloat));
342 return vrml_read_float_n(reader,
343 property->v_float + (property->n_items - 1), 1);
344}
345
346gboolean vrml_read_list_float2_cb(VrmlReader *reader, gpointer data)
347{
348 VrmlProperty *property = data;
349
350 property->n_items += 2;
351 property->v_float = g_realloc(property->v_float,
352 property->n_items * sizeof(G3DFloat));
353 return vrml_read_float_n(reader,
354 property->v_float + (property->n_items - 2), 2);
355}
356
357gboolean vrml_read_list_float3_cb(VrmlReader *reader, gpointer data)
358{
359 VrmlProperty *property = data;
360
361 property->n_items += 3;
362 property->v_float = g_realloc(property->v_float,
363 property->n_items * sizeof(G3DFloat));
364 return vrml_read_float_n(reader,
365 property->v_float + (property->n_items - 3), 3);
366}
367
368gboolean vrml_read_list_float4_cb(VrmlReader *reader, gpointer data)
369{
370 VrmlProperty *property = data;
371
372 property->n_items += 4;
373 property->v_float = g_realloc(property->v_float,
374 property->n_items * sizeof(G3DFloat));
375 return vrml_read_float_n(reader,
376 property->v_float + (property->n_items - 4), 4);
377}
378
379gboolean vrml_read_list_floatx_cb(VrmlReader *reader, gpointer data)
380{
381 VrmlProperty *property = data;
382 gchar *s;
383
384 s = vrml_read_numeric(reader);
385 while(s) {
386 property->n_items ++;
387 property->v_float = g_realloc(property->v_float,
388 property->n_items * sizeof(G3DFloat));
389 property->v_float[property->n_items - 1] = atof(s);
390 g_free(s);
391 s = vrml_read_numeric(reader);
392 }
393 return TRUE;
394}
395
396/* property reader */
397
398VrmlProperty *vrml_read_property(VrmlReader *reader, guint32 level)
399{
400 VrmlProperty *property;
401 VrmlTypeDef *type = NULL;
402 gint i;
403 gchar *id, *s;
404
405 id = vrml_read_id(reader);
406 if(id == NULL)
407 return NULL;
408
409 /* look up object */
410 for(i = 0; vrml2_types[i].name != NULL; i ++)
411 if(strcmp(id, vrml2_types[i].name) == 0) {
412 type = &(vrml2_types[i]);
413 break;
414 }
415 if(type == NULL) {
416 g_warning("VRML: unknown type %s in line %d", id, reader->line);
417 return NULL;
418 }
419 property = g_new0(VrmlProperty, 1);
420 property->name = id;
421 if(type->detect != NULL)
422 property->id = type->detect(reader);
423 else
424 property->id = type->id;
425 property->level = level;
426
427#if DEBUG > 0
428 g_debug("\\%sproperty '%s', type %d",
429 vrml_read_padding + strlen(vrml_read_padding) - 1 - level,
430 id, property->id);
431#endif
432
433 switch(property->id) {
434 case T_OBJECT:
435 property->n_items = 1;
436 property->v_object = g_new0(VrmlObject *, 1);
437 property->v_object[0] = vrml_read_object(reader, level + 1);
438 break;
439 case T_TOKEN2:
440 vrml_read_token_n(reader, property, 2);
441 break;
442 case T_TOKEN3:
443 vrml_read_token_n(reader, property, 3);
444 break;
445 case T_STRING:
446 property->n_items = 1;
447 if(!vrml_read_expect(reader, '"'))
448 return FALSE;
449 property->v_str = g_new0(gchar *, 1);
450 property->v_str[0] = vrml_read_string(reader);
451 break;
452 case T_BOOLEAN:
453 s = vrml_read_token(reader);
454 if(s) {
455 if(strcmp(s, "TRUE") == 0)
456 property->v_boolean = TRUE;
457 g_free(s);
458 }
459 break;
460 case T_INT:
461 s = vrml_read_numeric(reader);
462 if(s) {
463 property->n_items = 1;
464 property->v_int = g_new0(gint32, 1);
465 property->v_int[0] = atoi(s);
466 g_free(s);
467 }
468 break;
469 case T_FLOAT:
470 property->n_items = 1;
471 property->v_float = g_new0(G3DFloat, 1);
472 vrml_read_float_n(reader, property->v_float, 1);
473 break;
474 case T_FLOAT2:
475 property->n_items = 2;
476 property->v_float = g_new0(G3DFloat, 2);
477 vrml_read_float_n(reader, property->v_float, 2);
478 break;
479 case T_FLOAT3:
480 property->n_items = 3;
481 property->v_float = g_new0(G3DFloat, 3);
482 vrml_read_float_n(reader, property->v_float, 3);
483 break;
484 case T_FLOAT4:
485 property->n_items = 4;
486 property->v_float = g_new0(G3DFloat, 4);
487 vrml_read_float_n(reader, property->v_float, 4);
488 break;
489 case T_FLOAT_X:
490 s = vrml_read_numeric(reader);
491 while(s) {
492 property->n_items ++;
493 property->v_float = g_realloc(property->v_float,
494 property->n_items * sizeof(G3DFloat));
495 property->v_float[property->n_items - 1] = atof(s);
496#if DEBUG > 2
497 g_debug("T_FLOAT_X: %i: %.2f", property->n_items,
498 property->v_float[property->n_items - 1]);
499#endif
500 g_free(s);
501 s = vrml_read_numeric(reader);
502 }
503 break;
504 case T_LIST_OBJECT:
505 vrml_read_list(reader, vrml_read_list_object_cb, property);
506 break;
507 case T_LIST_STRING:
508 vrml_read_list(reader, vrml_read_list_string_cb, property);
509 break;
510 case T_LIST_INT:
511 vrml_read_list(reader, vrml_read_list_int_cb, property);
512 break;
513 case T_LIST_FLOAT:
514 vrml_read_list(reader, vrml_read_list_float_cb, property);
515 break;
516 case T_LIST_FLOAT2:
517 vrml_read_list(reader, vrml_read_list_float2_cb, property);
518 break;
519 case T_LIST_FLOAT3:
520 vrml_read_list(reader, vrml_read_list_float3_cb, property);
521 break;
522 case T_LIST_FLOAT4:
523 vrml_read_list(reader, vrml_read_list_float4_cb, property);
524 break;
525 case T_LIST_FLOAT_X:
526 vrml_read_list(reader, vrml_read_list_floatx_cb, property);
527 break;
528
529 default:
530 g_free(property->name);
531 g_free(property);
532 return NULL;
533 break;
534 }
535
536 return property;
537}
538
539static VrmlObject *vrml_read_route_object(VrmlReader *reader, guint32 level)
540{
541 VrmlObject *object;
542 gchar *id;
543#if DEBUG > 2
544 g_debug("ROUTE object");
545#endif
546 id = vrml_read_id(reader); /* source */
547 if(id == NULL) {
548 g_warning("ROUTE: could not get source");
549 return NULL;
550 }
551 g_free(id);
552 id = vrml_read_id(reader); /* TO */
553 if(id == NULL) {
554 g_warning("ROUTE: could not get TO");
555 return NULL;
556 }
557 g_free(id);
558 id = vrml_read_id(reader); /* destination */
559 if(id == NULL) {
560 g_warning("ROUTE: could not get destination");
561 return NULL;
562 }
563 g_free(id);
564 object = g_new0(VrmlObject, 1);
565 object->name = g_strdup("ROUTE object");
566 object->level = level;
567 return object;
568}
569
570VrmlObject *vrml_read_object(VrmlReader *reader, guint32 level)
571{
572 VrmlObject *object;
573 VrmlProperty *property;
574 gchar *id, *defid = NULL;
575 gboolean define = FALSE;
576
577 id = vrml_read_id(reader);
578 if(id == NULL)
579 return NULL;
580 if(strcmp(id, "NULL") == 0) {
581 return NULL;
582 } else if(strcmp(id, "DEF") == 0) {
583 define = TRUE;
584 defid = vrml_read_id(reader);
585 if(defid == NULL)
586 return NULL;
587 id = vrml_read_id(reader);
588 if(id == NULL)
589 return NULL;
590 } else if(strcmp(id, "USE") == 0) {
591 defid = vrml_read_id(reader);
592#if DEBUG > 2
593 g_debug("looking up '%s'", defid);
594#endif
595 return vrml_lookup_object(reader, defid);
596 } else if(strcmp(id, "ROUTE") == 0) {
597 return vrml_read_route_object(reader, level);
598 }
599
600 if(!vrml_read_expect(reader, '{')) {
601 g_warning("vrml_read_object: expected '{' in line %d", reader->line);
602 g_free(id);
603 if(defid)
604 g_free(defid);
605 return FALSE;
606 }
607#if DEBUG > 0
608 g_debug("\\%sobject '%s'",
609 vrml_read_padding + strlen(vrml_read_padding) - 1 - level,
610 id);
611#endif
612
613 object = g_new0(VrmlObject, 1);
614 object->name = id;
615 object->defid = defid;
616 object->define = define;
617 object->level = level;
618
619 /* read properties */
620 while(vrml_read_skip_ws(reader)) {
621#if DEBUG > 2
622 g_debug("O: '%c'", *(reader->bufp));
623#endif
624 if(*(reader->bufp) == '}') {
625 vrml_read_dec(reader);
626 return object;
627 }
628 property = vrml_read_property(reader, level + 1);
629 if(property != NULL)
630 object->properties = g_slist_append(object->properties, property);
631 else {
632 vrml_read_skip_unknown(reader);
633 return object;
634 }
635 }
636 vrml_read_expect(reader, '}');
637 return object;
638}
639
640gboolean vrml_read_global(VrmlReader *reader)
641{
642 while(vrml_read_skip_ws(reader)) {
643 if(!vrml_read_object(reader, 0))
644 return FALSE;
645 }
646 return TRUE;
647}
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.h
new file mode 100644
index 0000000..691eb57
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_read.h
@@ -0,0 +1,56 @@
1/* $Id:$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#ifndef _IMP_VRML_READ_H
23#define _IMP_VRML_READ_H
24
25#include "imp_vrml2.h"
26#include "imp_vrml_types.h"
27
28typedef gboolean (* vrml_read_list_item_callback)(VrmlReader *reader,
29 gpointer user_data);
30
31gboolean vrml_read_global(VrmlReader *reader);
32gboolean vrml_read_check_buffer(VrmlReader *reader);
33gboolean vrml_read_skip_ws(VrmlReader *reader);
34gboolean vrml_read_skip_unknown(VrmlReader *reader);
35gboolean vrml_read_expect(VrmlReader *reader, const gchar c);
36gboolean vrml_read_list(VrmlReader *reader, vrml_read_list_item_callback cb,
37 gpointer user_data);
38
39gchar *vrml_read_token(VrmlReader *reader);
40gchar *vrml_read_numeric(VrmlReader *reader);
41gchar *vrml_read_id(VrmlReader *reader);
42gchar *vrml_read_nodeid(VrmlReader *reader);
43gchar *vrml_read_string(VrmlReader *reader);
44
45VrmlProperty *vrml_read_property(VrmlReader *reader, guint32 level);
46VrmlObject *vrml_read_object(VrmlReader *reader, guint32 level);
47
48static inline void vrml_read_dec(VrmlReader *reader)
49{
50 reader->bufp ++;
51 reader->bufsize --;
52}
53
54static gchar vrml_read_padding[] = " ";
55
56#endif /* _IMP_VRML_READ_H */
diff --git a/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_types.h b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_types.h
new file mode 100644
index 0000000..6ca2327
--- /dev/null
+++ b/src/others/mimesh/libg3d-0.0.8/plugins/import/imp_vrml2/imp_vrml_types.h
@@ -0,0 +1,88 @@
1/* $Id:$ */
2
3/*
4 libg3d - 3D object loading library
5
6 Copyright (C) 2005-2009 Markus Dahms <mad@automagically.de>
7
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21*/
22#ifndef _IMP_VRML_TYPES_H
23#define _IMP_VRML_TYPES_H
24
25#include "imp_vrml2.h"
26
27typedef enum {
28 T_UNKNOWN = 0,
29 T_SPECIAL,
30 T_OBJECT,
31 T_TOKEN2,
32 T_TOKEN3,
33 T_STRING,
34 T_BOOLEAN,
35 T_INT,
36 T_FLOAT,
37 T_FLOAT2,
38 T_FLOAT3,
39 T_FLOAT4,
40 T_FLOAT_X,
41 T_LIST_OBJECT,
42 T_LIST_STRING,
43 T_LIST_INT,
44 T_LIST_FLOAT,
45 T_LIST_FLOAT2,
46 T_LIST_FLOAT3,
47 T_LIST_FLOAT4,
48 T_LIST_FLOAT_X,
49 N_TYPES
50} VrmlType;
51
52typedef struct {
53 gchar *name;
54 gchar *defid;
55 gboolean define;
56 guint32 level;
57 GSList *properties;
58} VrmlObject;
59
60typedef struct {
61 gchar *name;
62 VrmlType id;
63
64 gsize n_items;
65 VrmlObject **v_object;
66 gchar **v_str;
67 G3DFloat *v_float;
68 gint32 *v_int;
69 gboolean v_boolean;
70 guint32 level;
71} VrmlProperty;
72
73typedef VrmlType (* VrmlTypeDetect)(VrmlReader *reader);
74
75typedef struct {
76 const gchar *name;
77 VrmlType id;
78 VrmlTypeDetect detect;
79} VrmlTypeDef;
80
81typedef gboolean (* VrmlNodeCallback)(VrmlReader *reader, VrmlObject *object);
82
83typedef struct {
84 const gchar *name;
85 VrmlNodeCallback callback;
86} VrmlNodeDef;
87
88#endif /* _IMP_VRML_TYPES_H */